@import url('https://fonts.googleapis.com/css2?family=Sora:wght@400;500;600;700;800&family=DM+Sans:ital,wght@0,400;0,500;1,400&display=swap');

:root {
    --primary: #1B5E3B;
    --primary-mid: #2D7A52;
    --primary-light: #E4F2EA;
    --primary-glow: rgba(45, 122, 82, 0.12);
    --accent: #52C07A;
    --text-dark: #111827;
    --text-mid: #374151;
    --text-muted: #6B7280;
    --text-hint: #9CA3AF;
    --bg-page: #F3F6F3;
    --bg-surface: #FFFFFF;
    --bg-subtle: #F9FBF9;
    --border: #E5E9E5;
    --border-mid: #D1D9D1;
    --shadow-sm: 0 1px 3px rgba(0,0,0,0.06), 0 1px 2px rgba(0,0,0,0.04);
    --shadow-md: 0 4px 12px rgba(0,0,0,0.07), 0 2px 4px rgba(0,0,0,0.04);
    --shadow-lg: 0 10px 30px rgba(0,0,0,0.10), 0 4px 8px rgba(0,0,0,0.05);
    --radius-sm: 10px;
    --radius-md: 16px;
    --radius-lg: 22px;
    --radius-xl: 28px;
    --font-display: 'Sora', system-ui, sans-serif;
    --font-body: 'DM Sans', system-ui, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; padding: 0; }

body {
    font-family: var(--font-body);
    background-color: var(--bg-page);
    color: var(--text-dark);
    line-height: 1.5;
    padding-bottom: 90px;
    -webkit-font-smoothing: antialiased;
}

/* ========================
   HEADER
======================== */
.main-header {
    background: linear-gradient(160deg, var(--primary) 0%, var(--primary-mid) 100%);
    padding: 20px 20px 0;
    position: relative;
    overflow: hidden;
}

.main-header::before {
    content: '';
    position: absolute;
    top: -40px; right: -40px;
    width: 200px; height: 200px;
    border-radius: 50%;
    background: rgba(255,255,255,0.05);
}

.main-header::after {
    content: '';
    position: absolute;
    bottom: 10px; left: -60px;
    width: 160px; height: 160px;
    border-radius: 50%;
    background: rgba(255,255,255,0.04);
}

.header-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: relative;
    z-index: 1;
}

.logo-area {
    display: flex;
    align-items: center;
    gap: 10px;
}

.logo-icon {
    width: 36px; height: 36px;
    border-radius: 10px;
    display: flex; align-items: center; justify-content: center;
    color: white;
    font-size: 16px;
    -webkit-backdrop-filter: blur(4px);
    backdrop-filter: blur(4px);
}

.main-header h1 {
    font-family: var(--font-display);
    font-size: 20px;
    font-weight: 800;
    color: white;
    letter-spacing: -0.3px;
}

.btn-nova-vaga {
    display: flex;
    align-items: center;
    gap: 6px;
    background: white;
    color: var(--primary);
    border: none;
    padding: 8px 14px;
    border-radius: var(--radius-sm);
    font-family: var(--font-display);
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
    transition: transform 0.15s, box-shadow 0.15s;
}

.btn-nova-vaga:hover { transform: translateY(-1px); box-shadow: 0 4px 12px rgba(0,0,0,0.2); }
.btn-nova-vaga:active { transform: scale(0.96); }

.header-sub {
    font-family: var(--font-body);
    font-size: 13px;
    color: rgba(255,255,255,0.72);
    margin-top: 6px;
    position: relative;
    z-index: 1;
    font-style: italic;
}

.header-nav {
    display: flex;
    gap: 4px;
    margin-top: 16px;
    position: relative;
    z-index: 1;
}

.nav-link {
    font-family: var(--font-display);
    font-size: 13px;
    font-weight: 600;
    color: rgba(255,255,255,0.6);
    padding: 8px 14px;
    border-radius: var(--radius-sm) var(--radius-sm) 0 0;
    transition: all 0.2s;
}

.nav-link.active {
    background: var(--bg-page);
    color: var(--primary);
}

/* ========================
   SEARCH
======================== */
.search-section {
    padding: 16px 20px 8px;
}

.search-box {
    display: flex;
    align-items: center;
    background: var(--bg-surface);
    border: 1.5px solid var(--border);
    border-radius: var(--radius-md);
    padding: 0 8px 0 16px;
    box-shadow: var(--shadow-sm);
    transition: border-color 0.2s, box-shadow 0.2s;
}

.search-box:focus-within {
    border-color: var(--primary-mid);
    box-shadow: 0 0 0 3px var(--primary-glow);
}

.search-icon {
    color: var(--primary-mid);
    margin-right: 10px;
    font-size: 15px;
}

.search-box input {
    border: none;
    outline: none;
    height: 52px;
    width: 100%;
    font-size: 15px;
    font-family: var(--font-body);
    background: transparent;
    color: var(--text-dark);
}

.search-box input::placeholder { color: var(--text-hint); }

.search-btn {
    width: 36px; height: 36px;
    background: var(--primary);
    border: none;
    border-radius: var(--radius-sm);
    color: white;
    cursor: pointer;
    display: flex; align-items: center; justify-content: center;
    font-size: 13px;
    flex-shrink: 0;
    transition: background 0.2s;
}

.search-btn:hover { background: var(--primary-mid); }

/* Filters */
.filters-container {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    padding: 12px 0 4px;
    -ms-overflow-style: none;
}

.filters-container::-webkit-scrollbar { display: none; }

.filter-chip {
    display: flex;
    align-items: center;
    gap: 6px;
    background: var(--bg-surface);
    border: 1.5px solid var(--border);
    padding: 7px 14px;
    border-radius: 20px;
    font-family: var(--font-display);
    font-size: 13px;
    font-weight: 600;
    color: var(--text-muted);
    white-space: nowrap;
    cursor: pointer;
    transition: all 0.2s ease;
}

.filter-chip i { font-size: 11px; }

.filter-chip:hover {
    border-color: var(--border-mid);
    color: var(--text-mid);
}

.filter-chip.active {
    background: var(--primary-light);
    border-color: var(--primary-mid);
    color: var(--primary);
}

/* ========================
   FEED
======================== */
.vagas-container {
    padding: 8px 20px;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    margin-bottom: 16px;
}

.section-header h2 {
    font-family: var(--font-display);
    font-size: 17px;
    font-weight: 700;
    color: var(--text-dark);
}

.vaga-count {
    font-family: var(--font-display);
    font-size: 12px;
    font-weight: 600;
    color: var(--text-hint);
    background: var(--bg-surface);
    border: 1px solid var(--border);
    padding: 3px 10px;
    border-radius: 20px;
}

/* ========================
   CARD
======================== */
.vaga-card {
    background: var(--bg-surface);
    border-radius: var(--radius-lg);
    padding: 0;
    margin-bottom: 16px;
    border: 1.5px solid var(--border);
    box-shadow: var(--shadow-sm);
    overflow: hidden;
    transition: transform 0.2s, box-shadow 0.2s;
    animation: fadeUp 0.35s ease both;
}

.vaga-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

@keyframes fadeUp {
    from { opacity: 0; transform: translateY(12px); }
    to { opacity: 1; transform: translateY(0); }
}

.card-body {
    padding: 20px 20px 16px;
}

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 10px;
    gap: 12px;
}

.card-header-left { flex: 1; }

.tag {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-family: var(--font-display);
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    padding: 3px 9px;
    border-radius: 6px;
    margin-bottom: 6px;
}

.tag-animal    { background: #FEF3C7; color: #92400E; }
.tag-educacao  { background: #DBEAFE; color: #1E40AF; }
.tag-ambiente  { background: #D1FAE5; color: #065F46; }
.tag-cozinha   { background: #FCE7F3; color: #9D174D; }
.tag-saude     { background: #FEE2E2; color: #991B1B; }
.tag-outros    { background: #F3F4F6; color: #374151; }

.card-header h3 {
    font-family: var(--font-display);
    font-size: 16px;
    font-weight: 700;
    color: var(--text-dark);
    line-height: 1.3;
}

.distancia {
    flex-shrink: 0;
    background: var(--primary-light);
    color: var(--primary);
    padding: 5px 10px;
    border-radius: 8px;
    font-family: var(--font-display);
    font-size: 12px;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 4px;
}

.card-descricao {
    font-size: 13.5px;
    color: var(--text-muted);
    line-height: 1.6;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    margin-bottom: 0;
}

.card-map {
    overflow: hidden;
    height: 150px;
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
    position: relative;
}

.card-map iframe {
    width: 100%;
    height: 100%;
    display: block;
}

.card-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 14px 20px;
}

.card-data {
    font-size: 12px;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    gap: 6px;
    font-family: var(--font-display);
    font-weight: 500;
}

.card-data i { color: var(--primary-mid); }

.btn-ajudar {
    background: var(--primary);
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: var(--radius-sm);
    font-family: var(--font-display);
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.15s ease;
    display: flex;
    align-items: center;
    gap: 6px;
}

.btn-ajudar:hover { background: var(--primary-mid); transform: translateY(-1px); }
.btn-ajudar:active { transform: scale(0.96); }

/* Empty state */
.empty-state {
    text-align: center;
    padding: 48px 20px;
    color: var(--text-hint);
}

.empty-state i { font-size: 36px; margin-bottom: 10px; }
.empty-state p { font-size: 14px; font-family: var(--font-display); }

/* ========================
   BOTTOM NAV
======================== */
.bottom-nav {
    position: fixed;
    bottom: 0; left: 0; right: 0;
    background: var(--bg-surface);
    border-top: 1px solid var(--border);
    display: flex;
    justify-content: space-around;
    align-items: center;
    padding: 10px 0 16px;
    box-shadow: 0 -4px 20px rgba(0,0,0,0.06);
    z-index: 100;
}

.nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    color: var(--text-hint);
    gap: 3px;
    padding: 0 20px;
    transition: color 0.2s;
}

.nav-item i { font-size: 20px; }
.nav-item span { font-family: var(--font-display); font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.5px; }
.nav-item.active { color: var(--primary); }

.nav-item-center { padding: 0; }

.nav-plus {
    width: 48px; height: 48px;
    background: var(--primary);
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    color: white;
    font-size: 18px;
    box-shadow: 0 4px 16px rgba(27, 94, 59, 0.4);
    transform: translateY(-12px);
    transition: transform 0.2s, box-shadow 0.2s;
}

.nav-plus:hover { transform: translateY(-14px); box-shadow: 0 6px 20px rgba(27,94,59,0.5); }

/* ========================
   CADASTRO PAGE
======================== */
.cadastro-page { background: var(--bg-page); }

.cadastro-header .header-top {
    justify-content: space-between;
    align-items: center;
}

.btn-voltar {
    width: 38px; height: 38px;
    background: rgba(255,255,255,0.18);
    border: none;
    border-radius: 10px;
    color: white;
    font-size: 15px;
    cursor: pointer;
    display: flex; align-items: center; justify-content: center;
    transition: background 0.2s;
}

.btn-voltar:hover { background: rgba(255,255,255,0.28); }

.cadastro-container {
    padding: 20px;
    max-width: 600px;
    margin: 0 auto;
}

.form-progress {
    margin-bottom: 20px;
}

.progress-bar {
    height: 5px;
    background: var(--border);
    border-radius: 10px;
    overflow: hidden;
    margin-bottom: 6px;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--primary), var(--accent));
    border-radius: 10px;
    width: 0%;
    transition: width 0.4s ease;
}

.progress-label {
    font-family: var(--font-display);
    font-size: 12px;
    color: var(--text-hint);
    font-weight: 600;
}

.form-card {
    background: var(--bg-surface);
    border-radius: var(--radius-lg);
    border: 1.5px solid var(--border);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
}

.form-section {
    padding: 20px;
    border-bottom: 1px solid var(--border);
}

.form-section:last-child { border-bottom: none; }

.form-section-label {
    font-family: var(--font-display);
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    color: var(--primary);
    display: flex;
    align-items: center;
    gap: 7px;
    margin-bottom: 16px;
}

/* Categoria grid */
.categoria-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
}

.categoria-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 7px;
    padding: 14px 10px;
    border-radius: var(--radius-md);
    border: 1.5px solid var(--border);
    background: var(--bg-subtle);
    color: var(--text-muted);
    cursor: pointer;
    transition: all 0.2s;
    font-family: var(--font-display);
}

.categoria-btn i { font-size: 20px; }
.categoria-btn span { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.5px; }

.categoria-btn:hover {
    border-color: var(--primary-mid);
    color: var(--primary);
    background: var(--primary-light);
}

.categoria-btn.active {
    border-color: var(--primary);
    background: var(--primary-light);
    color: var(--primary);
    box-shadow: 0 0 0 3px var(--primary-glow);
}

/* Fields */
.field-group {
    margin-bottom: 16px;
    position: relative;
}

.field-group:last-child { margin-bottom: 0; }

.field-label {
    display: block;
    font-family: var(--font-display);
    font-size: 12px;
    font-weight: 700;
    color: var(--text-mid);
    margin-bottom: 7px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.field-input {
    width: 100%;
    border: 1.5px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 11px 14px;
    font-size: 15px;
    font-family: var(--font-body);
    color: var(--text-dark);
    background: var(--bg-subtle);
    outline: none;
    transition: border-color 0.2s, box-shadow 0.2s, background 0.2s;
}

.field-input:focus {
    border-color: var(--primary-mid);
    background: var(--bg-surface);
    box-shadow: 0 0 0 3px var(--primary-glow);
}

.field-input::placeholder { color: var(--text-hint); font-style: italic; }

.field-textarea {
    resize: vertical;
    min-height: 100px;
    line-height: 1.6;
}

.field-counter {
    position: absolute;
    right: 12px;
    bottom: 10px;
    font-size: 11px;
    color: var(--text-hint);
    font-family: var(--font-display);
    pointer-events: none;
}

.field-with-icon { position: relative; }

.field-icon {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--primary-mid);
    font-size: 13px;
}

.has-icon { padding-left: 36px; }

.btn-preview-map {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-top: 10px;
    background: none;
    border: 1.5px dashed var(--border-mid);
    padding: 7px 14px;
    border-radius: var(--radius-sm);
    font-family: var(--font-display);
    font-size: 12px;
    font-weight: 700;
    color: var(--primary);
    cursor: pointer;
    transition: all 0.2s;
}

.btn-preview-map:hover {
    border-color: var(--primary-mid);
    background: var(--primary-light);
}

.map-preview {
    display: none;
    margin-top: 12px;
    border-radius: var(--radius-sm);
    overflow: hidden;
    border: 1.5px solid var(--border);
}

.field-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

/* Form actions */
.form-actions {
    display: flex;
    gap: 12px;
    padding: 20px;
    border-top: 1px solid var(--border);
    background: var(--bg-subtle);
}

.btn-cancelar {
    flex: 1;
    padding: 13px;
    border: 1.5px solid var(--border-mid);
    border-radius: var(--radius-sm);
    background: var(--bg-surface);
    font-family: var(--font-display);
    font-size: 14px;
    font-weight: 700;
    color: var(--text-muted);
    cursor: pointer;
    transition: all 0.15s;
}

.btn-cancelar:hover { border-color: var(--text-muted); color: var(--text-dark); }

.btn-publicar {
    flex: 2;
    padding: 13px;
    border: none;
    border-radius: var(--radius-sm);
    background: var(--primary);
    font-family: var(--font-display);
    font-size: 14px;
    font-weight: 700;
    color: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: all 0.15s;
    box-shadow: 0 3px 12px rgba(27,94,59,0.3);
}

.btn-publicar:hover { background: var(--primary-mid); transform: translateY(-1px); }
.btn-publicar:active { transform: scale(0.97); }

/* Toast */
.toast {
    position: fixed;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%) translateY(80px);
    background: var(--primary);
    color: white;
    padding: 14px 22px;
    border-radius: var(--radius-md);
    font-family: var(--font-display);
    font-size: 14px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 10px;
    box-shadow: 0 8px 24px rgba(27,94,59,0.4);
    transition: transform 0.4s cubic-bezier(0.34,1.56,0.64,1), opacity 0.3s;
    opacity: 0;
    z-index: 999;
}

.toast.show {
    transform: translateX(-50%) translateY(0);
    opacity: 1;
}

/* ========================
   SKELETON LOADING
======================== */
@keyframes shimmer {
    0%   { background-position: -400px 0; }
    100% { background-position: 400px 0; }
}

.skeleton {
    background: linear-gradient(90deg, var(--border) 25%, #e8ece8 50%, var(--border) 75%);
    background-size: 800px 100%;
    animation: shimmer 1.4s infinite;
    border-radius: 6px;
}

.skeleton-card { pointer-events: none; }
.skeleton-tag   { height: 18px; width: 80px; margin-bottom: 10px; }
.skeleton-title { height: 22px; width: 70%; margin-bottom: 10px; }
.skeleton-text  { height: 14px; width: 100%; margin-bottom: 6px; }
.skeleton-text.short { width: 60%; }
.skeleton-map   { height: 150px; border-radius: 0; border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.skeleton-date  { height: 14px; width: 100px; }
.skeleton-btn   { height: 38px; width: 120px; border-radius: var(--radius-sm); }
