/* =====================================================
   ALERTAS DE PASSAGENS — Custom Stylesheet
   Color Palette:
     Navy:  #1a3a6b
     Blue:  #0066cc
     White: #ffffff
     Light: #f4f7fb
===================================================== */

:root {
    --navy: #1a3a6b;
    --navy-dark: #122a50;
    --navy-light: #2a4d88;
    --blue: #0066cc;
    --blue-light: #1a7de0;
    --blue-pale: #e8f0fb;
    --gold: #f59e0b;
    --success: #16a34a;
    --bg-light: #f4f7fb;
    --text-muted: #6b7280;
    --border-color: #e5e7eb;
    --shadow-sm: 0 1px 3px rgba(0,0,0,.08), 0 1px 2px rgba(0,0,0,.04);
    --shadow-md: 0 4px 16px rgba(0,0,0,.10);
    --shadow-lg: 0 10px 40px rgba(0,0,0,.14);
    --radius: 12px;
    --radius-sm: 8px;
}

/* ─── Base ─────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; }

body {
    font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
    background: var(--bg-light);
    color: #1f2937;
    min-height: 100vh;
}

/* ─── Navbar ─────────────────────────────────── */
.main-navbar {
    background: var(--navy) !important;
    box-shadow: 0 2px 12px rgba(26,58,107,.4);
    padding: 0.6rem 0;
    position: sticky;
    top: 0;
    z-index: 1030;
}

.navbar-logo-img {
    height: 44px;
    width: auto;
    object-fit: contain;
}

.login-logo-img {
    max-width: 260px;
    width: 100%;
    height: auto;
    object-fit: contain;
}

.login-icon-img {
    width: 80px;
    height: 80px;
    object-fit: contain;
}

.navbar-logo-icon {
    font-size: 1.6rem;
    line-height: 1;
}

.navbar-logo-text {
    font-size: 1.15rem;
    font-weight: 700;
    letter-spacing: -0.3px;
    color: #fff;
}

.main-navbar .nav-link {
    color: rgba(255,255,255,.82) !important;
    font-weight: 500;
    padding: 0.5rem 0.9rem !important;
    border-radius: var(--radius-sm);
    transition: background .15s, color .15s;
}
.main-navbar .nav-link:hover,
.main-navbar .nav-link.active {
    color: #fff !important;
    background: rgba(255,255,255,.12);
}

.main-navbar .dropdown-menu {
    border: none;
    box-shadow: var(--shadow-md);
    border-radius: var(--radius-sm);
    padding: 0.4rem;
}
.main-navbar .dropdown-item {
    border-radius: 6px;
    padding: 0.5rem 0.85rem;
    font-size: 0.9rem;
}
.main-navbar .dropdown-item:hover { background: var(--blue-pale); color: var(--blue); }

/* ─── Main content padding ────────────────────── */
.main-content { padding-top: 0; }

/* ─── Hero Section ────────────────────────────── */
.hero-section {
    background: linear-gradient(135deg, var(--navy) 0%, var(--navy-light) 60%, #1e5fa8 100%);
    padding: 3.5rem 0 5rem;
    position: relative;
    overflow: hidden;
}

.hero-section::before {
    content: '';
    position: absolute;
    inset: 0;
    background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.04'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
    pointer-events: none;
}

.hero-content { position: relative; z-index: 1; }

.hero-title {
    font-size: clamp(1.8rem, 4vw, 2.8rem);
    font-weight: 800;
    letter-spacing: -0.5px;
    text-shadow: 0 2px 8px rgba(0,0,0,.25);
    margin-bottom: 0.6rem;
}

.hero-subtitle {
    font-size: 1.1rem;
    color: rgba(255,255,255,.85);
    margin-bottom: 0;
}

/* ─── Search Box ──────────────────────────────── */
.search-box-wrapper {
    margin-top: 2.2rem;
    position: relative;
    z-index: 2;
}

.search-box {
    background: rgba(255,255,255,.12);
    backdrop-filter: blur(12px);
    border: 1px solid rgba(255,255,255,.2);
    border-radius: var(--radius);
    padding: 1.5rem;
}

.search-label {
    color: rgba(255,255,255,.9);
    font-weight: 600;
    font-size: 0.88rem;
    letter-spacing: 0.3px;
    margin-bottom: 0.4rem;
    display: block;
}

.search-input {
    border: none;
    border-radius: var(--radius-sm) !important;
    font-size: 1rem;
    height: 3rem;
    box-shadow: 0 2px 8px rgba(0,0,0,.12);
}
.search-input:focus {
    box-shadow: 0 0 0 3px rgba(0,102,204,.35);
    outline: none;
}

.btn-search {
    height: 3rem;
    font-weight: 700;
    border-radius: var(--radius-sm) !important;
    background: var(--gold);
    border-color: var(--gold);
    color: #1a1a1a;
    letter-spacing: 0.2px;
    box-shadow: 0 3px 12px rgba(245,158,11,.4);
    transition: transform .15s, box-shadow .15s;
}
.btn-search:hover {
    background: #d97706;
    border-color: #d97706;
    transform: translateY(-1px);
    box-shadow: 0 5px 18px rgba(245,158,11,.5);
}

/* ─── Section titles ──────────────────────────── */
.section-title {
    font-size: 1.45rem;
    font-weight: 800;
    color: var(--navy);
    letter-spacing: -0.3px;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    justify-content: center;
}

.section-title-line {
    flex: 1;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--border-color));
    max-width: 80px;
}
.section-title-line:last-child {
    background: linear-gradient(90deg, var(--border-color), transparent);
}

/* ─── Category Cards ──────────────────────────── */
.categories-section { background: #fff; }

.category-card {
    background: #fff;
    border: 2px solid var(--border-color);
    border-radius: var(--radius);
    padding: 1.4rem 1rem;
    text-align: center;
    cursor: pointer;
    transition: border-color .2s, box-shadow .2s, transform .2s;
    height: 100%;
    position: relative;
    overflow: hidden;
}

.category-card::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, var(--blue-pale), transparent);
    opacity: 0;
    transition: opacity .2s;
}

.category-card:hover {
    border-color: var(--blue);
    box-shadow: 0 6px 24px rgba(0,102,204,.15);
    transform: translateY(-3px);
}
.category-card:hover::before { opacity: 1; }

.category-card-overlay { display: contents; }

.category-emoji {
    font-size: 2.4rem;
    line-height: 1;
    margin-bottom: 0.7rem;
    position: relative;
}

.category-name {
    font-weight: 700;
    color: var(--navy);
    font-size: 0.95rem;
    margin-bottom: 0.4rem;
    position: relative;
}

.category-miles {
    position: relative;
}

.miles-label {
    display: block;
    font-size: 0.72rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.miles-value {
    display: block;
    font-size: 0.9rem;
    font-weight: 800;
    color: var(--blue);
}

/* ─── Deals Table ─────────────────────────────── */
.deals-section { background: var(--bg-light); }

.deals-table-wrapper {
    background: #fff;
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
    overflow: hidden;
}

.deals-table thead th {
    background: var(--navy);
    color: rgba(255,255,255,.9);
    font-size: 0.8rem;
    font-weight: 600;
    letter-spacing: 0.4px;
    text-transform: uppercase;
    padding: 0.85rem 1rem;
    border: none;
    white-space: nowrap;
}

.deals-table tbody tr {
    transition: background .12s;
}
.deals-table tbody tr:hover { background: var(--blue-pale); }

.deals-table td {
    padding: 0.85rem 1rem;
    vertical-align: middle;
    border-color: var(--border-color);
    font-size: 0.92rem;
}

/* Miles pills */
.miles-pill {
    display: inline-block;
    padding: 0.25rem 0.65rem;
    border-radius: 20px;
    font-weight: 700;
    font-size: 0.88rem;
    white-space: nowrap;
}
.miles-pill.ida-volta {
    background: rgba(0,102,204,.1);
    color: var(--blue);
}
.miles-pill.so-ida {
    background: rgba(22,163,74,.1);
    color: var(--success);
}

/* Category badge in table */
.category-badge {
    font-size: 0.82rem;
    color: var(--text-muted);
}

/* ─── Empty State ─────────────────────────────── */
.empty-state-icon { font-size: 3.5rem; }

/* ─── Deal Detail Page ────────────────────────── */
.deal-detail-card { border-radius: var(--radius); overflow: hidden; }

.deal-detail-header {
    background: linear-gradient(135deg, var(--navy) 0%, var(--navy-light) 100%);
    color: #fff;
    padding: 2rem 2rem 1.8rem;
}

.deal-route {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.deal-city {
    font-size: 1.35rem;
    font-weight: 800;
    letter-spacing: -0.3px;
}

.deal-arrow {
    font-size: 1.4rem;
    color: var(--gold);
}

/* Miles detail cards */
.miles-detail-card {
    border-radius: var(--radius);
    padding: 1.5rem;
    text-align: center;
}
.miles-detail-card.ida-volta-card {
    background: linear-gradient(135deg, #eff6ff, #dbeafe);
    border: 2px solid #93c5fd;
}
.miles-detail-card.so-ida-card {
    background: linear-gradient(135deg, #f0fdf4, #dcfce7);
    border: 2px solid #86efac;
}

.miles-detail-label {
    font-size: 0.82rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-muted);
    margin-bottom: 0.5rem;
}
.miles-detail-value {
    font-size: 2.2rem;
    font-weight: 900;
    color: var(--navy);
    letter-spacing: -1px;
    line-height: 1;
}
.miles-detail-unit {
    font-size: 0.82rem;
    color: var(--text-muted);
    font-weight: 500;
    margin-top: 0.25rem;
}

/* Info grid */
.info-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }

@media (max-width: 576px) {
    .info-grid { grid-template-columns: 1fr; }
}

.info-item {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    background: var(--bg-light);
    border-radius: var(--radius-sm);
    padding: 0.85rem 1rem;
}
.info-icon { font-size: 1.2rem; flex-shrink: 0; margin-top: 0.1rem; }
.info-label { font-size: 0.78rem; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.4px; font-weight: 600; }
.info-value { font-size: 0.95rem; font-weight: 600; color: #1f2937; margin-top: 0.1rem; }

/* ─── Login Page ──────────────────────────────── */
.login-page {
    background: linear-gradient(135deg, var(--navy) 0%, var(--navy-light) 50%, #1e5fa8 100%);
    min-height: 100vh;
}

.login-card {
    border-radius: var(--radius) !important;
    background: #fff;
}

.login-logo-icon {
    font-size: 3rem;
    display: block;
}

.login-brand-title {
    font-size: 1.4rem;
    font-weight: 800;
    color: var(--navy);
    letter-spacing: -0.3px;
}

.btn-login {
    background: var(--navy) !important;
    border-color: var(--navy) !important;
    font-weight: 700;
    border-radius: var(--radius-sm) !important;
    transition: background .15s, transform .15s;
}
.btn-login:hover {
    background: var(--navy-dark) !important;
    border-color: var(--navy-dark) !important;
    transform: translateY(-1px);
}

/* ─── Category Page ──────────────────────────── */
.cat-hero {
    background: #fff;
}
.cat-hero-title {
    font-size: 1.6rem;
    font-weight: 800;
    color: var(--navy);
}
.cat-filter-input {
    border: 1.5px solid #d1d5db;
    border-radius: var(--radius-sm);
    font-size: 0.95rem;
}
.cat-filter-input:focus {
    border-color: var(--blue);
    box-shadow: 0 0 0 3px rgba(0,102,204,.12);
}
.cat-breadcrumb {
    font-size: 0.88rem;
}
.breadcrumb-link {
    color: var(--blue);
    text-decoration: none;
    font-weight: 600;
}
.breadcrumb-link:hover { text-decoration: underline; }
.breadcrumb-item.active { color: #374151; }
.breadcrumb-item+.breadcrumb-item::before { content: "›"; color: var(--blue); font-weight: 700; }

.cat-table-wrapper {
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
}
.cat-deals-table {
    margin-bottom: 0;
    font-size: 0.93rem;
}
.cat-deals-table thead tr {
    background: var(--navy);
    color: #fff;
}
.cat-deals-table thead th {
    font-weight: 600;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.4px;
    padding: 0.85rem 1rem;
    border: none;
    white-space: nowrap;
}
.cat-deals-table tbody tr {
    border-bottom: 1px solid #f0f0f0;
    transition: background .12s;
}
.cat-deals-table tbody tr:hover { background: #f0f6ff; }
.cat-deals-table tbody td { padding: 0.75rem 1rem; vertical-align: middle; border: none; }

.cat-miles-iv {
    font-weight: 800;
    font-size: 1.05rem;
    color: var(--blue);
}
.cat-miles-si {
    font-weight: 700;
    font-size: 0.95rem;
    color: var(--success);
}

/* ─── Price block (hierarquia visual 3 níveis) ── */
.cat-price-block {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 1px;
}
.cat-price-brl {
    font-size: 0.78rem;
    font-weight: 500;
    color: #374151;
    line-height: 1.2;
    white-space: nowrap;
}
.cat-price-taxes {
    font-size: 0.67rem;
    color: #9ca3af;
    font-weight: 400;
    line-height: 1.2;
}

/* ─── Mobile Cards (categoria) ───────────────── */
.cat-mobile-list {
    display: flex;
    flex-direction: column;
}

.cat-mobile-card {
    background: #fff;
    border-bottom: 1px solid #f0f0f0;
    padding: 0.9rem 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.55rem;
    transition: background .12s;
}
.cat-mobile-card:first-child {
    border-radius: var(--radius) var(--radius) 0 0;
}
.cat-mobile-card:last-child {
    border-radius: 0 0 var(--radius) var(--radius);
    border-bottom: none;
}
.cat-mobile-card:hover { background: #f0f6ff; }

.cat-mobile-route {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.3rem;
    line-height: 1.3;
}
.cat-mobile-origin {
    font-weight: 600;
    font-size: 0.9rem;
    color: #1f2937;
    white-space: nowrap;
}
.cat-mobile-arrow {
    font-size: 0.8rem;
    color: #9ca3af;
    flex-shrink: 0;
}
.cat-mobile-dest {
    font-weight: 700;
    font-size: 0.9rem;
    color: var(--blue);
    text-decoration: none;
    white-space: nowrap;
}
.cat-mobile-dest:hover { text-decoration: underline; }

.cat-mobile-programs {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
}

.cat-mobile-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    padding-top: 0.2rem;
}
.cat-mobile-footer .cat-price-block {
    align-items: flex-start;
}
.cat-mobile-btn {
    flex-shrink: 0;
    white-space: nowrap;
    font-weight: 600;
    width: 100%;
}

@media (max-width: 767.98px) {
    .cat-mobile-list {
        border-radius: var(--radius);
        box-shadow: var(--shadow-sm);
        overflow: hidden;
    }
    .cat-mobile-btn {
        width: auto;
    }
}

/* Card link wrapper */
.category-card-link { display: block; }
.category-card-link:hover .category-card {
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
    border-color: var(--blue);
}

/* ─── Admin Area ──────────────────────────────── */
.stat-card {
    border-radius: var(--radius) !important;
    transition: transform .15s, box-shadow .15s;
}
.stat-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md) !important;
}

.stat-label {
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-muted);
    margin-bottom: 0.25rem;
}

.stat-value {
    font-size: 2.2rem;
    font-weight: 900;
    color: var(--navy);
    letter-spacing: -1px;
    margin: 0;
}

.stat-sub { font-size: 0.82rem; }

.stat-icon {
    width: 52px;
    height: 52px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
}

/* Quick action cards */
.quick-action-card {
    border-radius: var(--radius) !important;
    transition: transform .15s, box-shadow .15s;
}
.quick-action-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-md) !important;
}
.quick-action-icon { font-size: 2rem; }

/* Admin tables */
.admin-table thead th {
    background: #f8fafc;
    color: var(--text-muted);
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    border-bottom: 2px solid var(--border-color);
    padding: 0.75rem 1rem;
    white-space: nowrap;
}
.admin-table td {
    padding: 0.85rem 1rem;
    vertical-align: middle;
    border-color: var(--border-color);
    font-size: 0.9rem;
}

/* Form sections */
.form-section-title {
    font-size: 1rem;
    font-weight: 700;
    color: var(--navy);
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--blue-pale);
    margin-bottom: 1.25rem;
}

/* ─── Upload Drop Zone ────────────────────────── */
.upload-drop-zone {
    border: 2.5px dashed var(--border-color);
    border-radius: var(--radius);
    padding: 3rem 2rem;
    text-align: center;
    cursor: pointer;
    transition: border-color .2s, background .2s;
    background: var(--bg-light);
}
.upload-drop-zone:hover,
.upload-drop-zone.drag-over {
    border-color: var(--blue);
    background: var(--blue-pale);
}
.upload-drop-content h5 { color: var(--navy); font-weight: 700; }

/* ─── Date Grid (Deal Detail) ────────────────── */
.date-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.date-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 62px;
    height: 70px;
    border-radius: 10px;
    text-decoration: none;
    cursor: default;
    transition: transform .12s, box-shadow .12s;
    border: 2px solid transparent;
}

a.date-card {
    cursor: pointer;
}

a.date-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 16px rgba(0,0,0,.15);
}

.date-card-ida {
    background: linear-gradient(135deg, #eff6ff, #dbeafe);
    border-color: #93c5fd;
    color: var(--navy);
}

a.date-card-ida:hover {
    background: linear-gradient(135deg, #dbeafe, #bfdbfe);
}

.date-card-volta {
    background: linear-gradient(135deg, #f0fdf4, #dcfce7);
    border-color: #86efac;
    color: #166534;
}

a.date-card-volta:hover {
    background: linear-gradient(135deg, #dcfce7, #bbf7d0);
}

.date-card-day {
    font-size: 1.4rem;
    font-weight: 900;
    line-height: 1;
}

.date-card-month {
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    line-height: 1.4;
}

.date-card-year {
    font-size: 0.65rem;
    opacity: 0.6;
}

/* Miles summary boxes */
.miles-summary-box {
    padding: 0.75rem 1rem;
    border-radius: 10px;
    text-align: center;
}

.miles-summary-box.ida {
    background: linear-gradient(135deg, #f0fdf4, #dcfce7);
    border: 1.5px solid #86efac;
    color: #166534;
}

.miles-summary-box.ida-volta {
    background: linear-gradient(135deg, #eff6ff, #dbeafe);
    border: 1.5px solid #93c5fd;
    color: var(--navy);
}

.miles-summary-box.volta {
    background: linear-gradient(135deg, #fff7ed, #ffedd5);
    border: 1.5px solid #fdba74;
    color: #7c2d12;
}

/* ─── Autocomplete dropdown ──────────────────── */
.autocomplete-dropdown {
    position: fixed; /* posicionado via JS com getBoundingClientRect */
    background: #fff;
    border: 1px solid #d1dae6;
    border-radius: 10px;
    box-shadow: 0 8px 28px rgba(0,0,0,.18);
    z-index: 9999;
    max-height: 320px;
    overflow-y: auto;
    padding: 4px 0;
    margin: 0;
}

.autocomplete-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 9px 14px;
    cursor: pointer;
    border-bottom: 1px solid #f1f3f5;
}

.autocomplete-item:last-child { border-bottom: none; }

.autocomplete-icon {
    font-size: 0.8rem;
    color: #9ca3af;
    flex-shrink: 0;
}

.autocomplete-city {
    flex: 1;
    font-size: 0.9rem;
    font-weight: 500;
    color: #1f2937;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.autocomplete-iata-tag {
    font-size: 0.7rem;
    color: #9ca3af;
    font-weight: 600;
    flex-shrink: 0;
}

.autocomplete-item:hover { background: #f0f7ff; }
.autocomplete-item:hover .autocomplete-city { color: var(--blue); }
.autocomplete-item:hover .autocomplete-icon { color: var(--blue); }

.autocomplete-item-combined {
    background: #f0f7ff;
    border-bottom: 1px solid #d1dae6 !important;
}
.autocomplete-item-combined:hover { background: #dbeafe; }

/* ─── Airline Pills ──────────────────────────── */
.airline-pill {
    display: inline-block;
    font-size: 0.78rem;
    font-weight: 700;
    padding: 4px 11px;
    border-radius: 20px;
    letter-spacing: 0.2px;
    white-space: nowrap;
}
.airline-azul              { background: #e3eeff; color: #003087; border: 1px solid #bdd0f5; }
.airline-smiles            { background: #fff4e0; color: #a86000; border: 1px solid #f5d08a; }
.airline-latam             { background: #ffeaea; color: #b80010; border: 1px solid #f5b0b0; }
.airline-milhas            { background: #f0f0f0; color: #555;    border: 1px solid #ddd; }
.airline-tudoazul          { background: #e3eeff; color: #003087; border: 1px solid #bdd0f5; }
.airline-aadvantage        { background: #e8eaf6; color: #1a237e; border: 1px solid #9fa8da; }
.airline-aircanada-aeroplan { background: #fff2f2; color: #c00010; border: 1px solid #f7b0b0; }
.airline-iberia-plus-avios  { background: #fffce8; color: #8a1000; border: 1px solid #f5d850; }

/* ─── Month Tabs ─────────────────────────────── */
.month-tabs-scroll {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    padding-bottom: 4px;
}

.month-tab-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 8px 14px;
    border: 1.5px solid #dee2e6;
    border-radius: 8px;
    background: #fff;
    cursor: pointer;
    transition: all .15s;
    min-width: 76px;
    line-height: 1.3;
}
.month-tab-btn:hover { border-color: var(--blue); background: #f0f7ff; }
.month-tab-btn.active { background: var(--blue); border-color: var(--blue); color: #fff; }
.month-tab-btn.active .month-tab-price { color: rgba(255,255,255,.85); }
.month-tab-name { font-size: 0.78rem; font-weight: 700; text-transform: uppercase; }
.month-tab-price { font-size: 0.72rem; color: #198754; font-weight: 700; }

/* ─── Program filter bar (inside section cards) ── */
.program-filter-bar {
    background: #f8faff;
    border-radius: 8px;
    padding: 0.5rem 0.75rem;
    border: 1px solid #e8eef8;
}

/* ─── Program filter buttons ─────────────────── */
.program-filter-btn {
    padding: 0.22rem 0.9rem;
    border-radius: 20px;
    border: 1.5px solid #dee2e6;
    background: #f8f9fa;
    font-size: 0.82rem;
    font-weight: 600;
    cursor: pointer;
    color: #4b5563;
    transition: all 0.2s ease;
    line-height: 1.6;
    white-space: nowrap;
}
.program-filter-btn:hover:not(.active) {
    background: #e8f0fe;
    border-color: #93c5fd;
    box-shadow: 0 2px 6px rgba(0,0,0,0.09);
    transform: translateY(-1px);
}
/* "Todos" active */
.program-filter-btn.active {
    background: var(--blue);
    color: #fff;
    border-color: var(--blue);
    box-shadow: 0 2px 8px rgba(30,90,200,0.22);
}

/* ── Smiles ── */
.program-filter-btn.airline-smiles { background: #fff8ed; border-color: #f5d08a; color: #a86000; }
.program-filter-btn.airline-smiles:hover:not(.active) { background: #fde68a; border-color: #f59e0b; color: #92400e; box-shadow: 0 2px 8px rgba(245,158,11,0.22); }
.program-filter-btn.airline-smiles.active { background: #f59e0b; border-color: #f59e0b; color: #fff; box-shadow: 0 2px 8px rgba(245,158,11,0.35); }

/* ── Azul ── */
.program-filter-btn.airline-azul { background: #edf3ff; border-color: #bdd0f5; color: #003087; }
.program-filter-btn.airline-azul:hover:not(.active) { background: #d0e1ff; border-color: #0066cc; color: #002070; box-shadow: 0 2px 8px rgba(0,102,204,0.2); }
.program-filter-btn.airline-azul.active { background: #0066cc; border-color: #0066cc; color: #fff; box-shadow: 0 2px 8px rgba(0,102,204,0.35); }

/* ── AAdvantage ── */
.program-filter-btn.airline-aadvantage { background: #eef0fb; border-color: #9fa8da; color: #1a237e; }
.program-filter-btn.airline-aadvantage:hover:not(.active) { background: #c5cae9; border-color: #3949ab; color: #1a237e; box-shadow: 0 2px 8px rgba(57,73,171,0.2); }
.program-filter-btn.airline-aadvantage.active { background: #3949ab; border-color: #3949ab; color: #fff; box-shadow: 0 2px 8px rgba(57,73,171,0.35); }

/* ── Air Canada (Aeroplan) ── */
.program-filter-btn.airline-aircanada-aeroplan { background: #fff2f2; border-color: #f7b0b0; color: #c00010; }
.program-filter-btn.airline-aircanada-aeroplan:hover:not(.active) { background: #ffd5d5; border-color: #f01428; color: #900010; box-shadow: 0 2px 8px rgba(240,20,40,0.2); }
.program-filter-btn.airline-aircanada-aeroplan.active { background: #f01428; border-color: #f01428; color: #fff; box-shadow: 0 2px 8px rgba(240,20,40,0.35); }

/* ── Iberia Plus (Avios) ── */
.program-filter-btn.airline-iberia-plus-avios { background: #fffce8; border-color: #f5d850; color: #8a1000; }
.program-filter-btn.airline-iberia-plus-avios:hover:not(.active) { background: #fcd100; border-color: #d7192d; color: #700000; box-shadow: 0 2px 8px rgba(215,25,45,0.2); }
.program-filter-btn.airline-iberia-plus-avios.active { background: #d7192d; border-color: #d7192d; color: #fcd100; box-shadow: 0 2px 8px rgba(215,25,45,0.35); }

/* ── LATAM ── */
.program-filter-btn.airline-latam { background: #ffeaea; border-color: #f5b0b0; color: #b80010; }
.program-filter-btn.airline-latam:hover:not(.active) { background: #ffc8c8; border-color: #e02020; color: #800000; box-shadow: 0 2px 8px rgba(224,32,32,0.2); }
.program-filter-btn.airline-latam.active { background: #e02020; border-color: #e02020; color: #fff; box-shadow: 0 2px 8px rgba(224,32,32,0.35); }

/* ─── Alert button ───────────────────────────── */
#alertCard .btn-success {
    background: #16a34a;
    border-color: #16a34a;
    font-weight: 600;
}
#alertCard .btn-outline-primary {
    font-weight: 600;
}
.alert-route-preview {
    background: #f0f7ff;
    border: 1px solid #dbeafe;
    text-align: center;
    font-size: 0.95rem;
}

/* ─── Tier expand ────────────────────────────── */
.tier-expand-wrapper {
    padding: 10px 0 4px;
    border-top: 2px dashed #e9ecef;
    margin-top: 4px;
}

/* ─── Footer ──────────────────────────────────── */
.footer-main {
    background: var(--navy);
    color: rgba(255,255,255,.7);
    margin-top: auto;
}
.footer-main .fw-bold { color: #fff; }

/* ─── Utilities & Overrides ───────────────────── */
.card { border-radius: var(--radius) !important; }
.badge { font-weight: 600; letter-spacing: 0.2px; }

/* Smooth scrolling */
html { scroll-behavior: smooth; }

/* Scrollbar styling */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: #cbd5e1; border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: #94a3b8; }

/* Button transitions */
.btn { transition: transform .12s, box-shadow .12s; }
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(0); }

/* Responsive */
@media (max-width: 768px) {
    .hero-section { padding: 2rem 0 3.5rem; }
    .search-box { padding: 1rem; }
    .deal-detail-header { padding: 1.5rem; }
    .deal-city { font-size: 1.1rem; }
    .miles-detail-value { font-size: 1.8rem; }
    .stat-value { font-size: 1.8rem; }
}

@media (max-width: 576px) {
    .section-title { font-size: 1.2rem; }
    .hero-title { font-size: 1.6rem; }
    .category-emoji { font-size: 2rem; }
}


/* ─── Admin Layout (sidebar fixa) ─────────────── */
:root {
    --sidebar-w: 240px;
    --sidebar-w-collapsed: 56px;
    --topbar-h: 56px;
    --sidebar-bg: #12294d;
    --sidebar-hover: rgba(255,255,255,.09);
    --sidebar-active-bg: rgba(255,255,255,.14);
    --sidebar-text: rgba(255,255,255,.82);
    --sidebar-border: rgba(255,255,255,.09);
}

/* Body admin */
body.admin-body {
    background: #f0f2f5;
}

/* ── Topbar ── */
.admin-topbar {
    position: fixed;
    top: 0; left: 0; right: 0;
    height: var(--topbar-h);
    background: var(--navy, #1a3a6b);
    display: flex;
    align-items: center;
    z-index: 1030;
    padding: 0 1rem;
    gap: .5rem;
    box-shadow: 0 2px 8px rgba(0,0,0,.18);
}

.admin-topbar-toggler {
    background: none;
    border: none;
    color: rgba(255,255,255,.85);
    font-size: 1.4rem;
    line-height: 1;
    padding: .25rem .4rem;
    border-radius: 6px;
    cursor: pointer;
    transition: background .15s;
    flex-shrink: 0;
}
.admin-topbar-toggler:hover { background: rgba(255,255,255,.1); color: #fff; }

.admin-topbar-brand {
    display: flex;
    align-items: center;
    text-decoration: none;
    margin-right: auto;
}

.admin-topbar-links {
    display: flex;
    align-items: center;
    gap: .25rem;
}

.admin-topbar-link {
    display: flex;
    align-items: center;
    gap: .4rem;
    padding: .35rem .75rem;
    color: rgba(255,255,255,.8);
    text-decoration: none;
    border-radius: 6px;
    font-size: .875rem;
    font-weight: 500;
    transition: background .15s, color .15s;
    position: relative;
    white-space: nowrap;
}
.admin-topbar-link:hover { background: rgba(255,255,255,.1); color: #fff; }
.admin-topbar-link.active { background: rgba(255,255,255,.15); color: #fff; }

.admin-badge {
    position: absolute;
    top: 2px; right: 2px;
    background: #ef4444;
    color: #fff;
    font-size: .6rem;
    font-weight: 700;
    min-width: 16px;
    height: 16px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 3px;
    line-height: 1;
}

.admin-topbar-right {
    display: flex;
    align-items: center;
    gap: .5rem;
    margin-left: .5rem;
}

.admin-topbar-user {
    display: flex;
    align-items: center;
    gap: .4rem;
    color: rgba(255,255,255,.85);
    text-decoration: none;
    font-size: .875rem;
    padding: .3rem .6rem;
    border-radius: 6px;
    transition: background .15s;
}
.admin-topbar-user:hover { background: rgba(255,255,255,.1); color: #fff; }

/* ── Sidebar ── */
.admin-sidebar {
    position: fixed;
    top: var(--topbar-h);
    left: 0;
    width: var(--sidebar-w);
    height: calc(100vh - var(--topbar-h));
    background: var(--sidebar-bg);
    z-index: 1020;
    overflow-x: hidden;
    overflow-y: auto;
    transition: width .25s ease, transform .25s ease;
    flex-shrink: 0;
}

/* Collapsed: encolhe para ícones apenas */
.admin-sidebar.collapsed {
    width: var(--sidebar-w-collapsed);
}
.admin-sidebar.collapsed .sidebar-text,
.admin-sidebar.collapsed .sidebar-section-label {
    opacity: 0;
    pointer-events: none;
    width: 0;
    overflow: hidden;
    white-space: nowrap;
}
.admin-sidebar.collapsed .sidebar-link {
    justify-content: center;
    padding: .75rem 0;
}
.admin-sidebar.collapsed .sidebar-link i {
    margin: 0;
}

/* ── Sidebar Nav ── */
.sidebar-section-label {
    padding: .75rem 1rem .25rem;
    font-size: .7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .08em;
    color: rgba(255,255,255,.4);
    transition: opacity .2s;
    white-space: nowrap;
}

.sidebar-link {
    display: flex;
    align-items: center;
    gap: .75rem;
    padding: .65rem 1rem;
    color: var(--sidebar-text);
    text-decoration: none;
    font-size: .875rem;
    font-weight: 500;
    transition: background .15s, color .15s, padding .25s;
    border-left: 3px solid transparent;
    white-space: nowrap;
}
.sidebar-link i { font-size: 1rem; flex-shrink: 0; }
.sidebar-link:hover { background: var(--sidebar-hover); color: #fff; }
.sidebar-link.active {
    background: var(--sidebar-active-bg);
    color: #fff;
    border-left-color: #f59e0b;
}

.sidebar-text {
    transition: opacity .2s, width .25s;
    overflow: hidden;
    white-space: nowrap;
}

/* ── Content wrap ── */
.admin-content-wrap {
    margin-top: var(--topbar-h);
    margin-left: var(--sidebar-w);
    min-height: calc(100vh - var(--topbar-h));
    transition: margin-left .25s ease;
    padding-bottom: 2rem;
}

body.admin-body.sidebar-collapsed .admin-content-wrap {
    margin-left: var(--sidebar-w-collapsed);
}

/* ── Overlay mobile ── */
.sidebar-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,.5);
    z-index: 1019;
}
.sidebar-overlay.show { display: block; }

/* ── Mobile: sidebar vira overlay ── */
@media (max-width: 767px) {
    .admin-sidebar {
        transform: translateX(calc(-1 * var(--sidebar-w)));
        width: var(--sidebar-w) !important;
    }
    .admin-sidebar.mobile-open {
        transform: translateX(0);
    }
    .admin-content-wrap {
        margin-left: 0 !important;
    }
    .admin-topbar-link span { display: none; }
    .admin-sidebar.collapsed .sidebar-text { opacity: 1; width: auto; }
    .admin-sidebar.collapsed .sidebar-section-label { opacity: 1; width: auto; }
    .admin-sidebar.collapsed .sidebar-link { justify-content: flex-start; padding: .65rem 1rem; }
}

@media (min-width: 768px) and (max-width: 991px) {
    .admin-topbar-link span { display: none; }
}

/* ─── Sidebar extras ──────────────────────────── */
.sidebar-badge {
    margin-left: auto;
    background: #ef4444;
    color: #fff;
    font-size: .62rem;
    font-weight: 700;
    min-width: 18px;
    height: 18px;
    border-radius: 9px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 4px;
    flex-shrink: 0;
}

.sidebar-divider {
    border-top: 1px solid var(--sidebar-border);
    margin: .5rem 0;
}

.sidebar-user-info {
    cursor: default;
    padding: .6rem 1rem;
}
.sidebar-user-info:hover { background: none; }

.text-danger-soft { color: rgba(255,100,100,.85) !important; }
.text-danger-soft:hover { color: #ff6b6b !important; background: rgba(239,68,68,.12) !important; }

/* ─── Offcanvas Mobile Menu ──────────────────── */
.offcanvas-nav-custom {
    background-color: var(--navy);
    color: #fff;
    width: 280px;
}
.offcanvas-nav-custom .btn-close {
    filter: invert(1) grayscale(100%) brightness(200%);
}
.offcanvas-nav-links {
    padding: 1rem 0;
}
.offcanvas-nav-link {
    display: flex;
    align-items: center;
    width: 100%;
    padding: 0.8rem 1.5rem;
    color: rgba(255, 255, 255, 0.85);
    text-decoration: none;
    font-size: 1rem;
    font-weight: 500;
    text-align: left;
    background: transparent;
    border: none;
    transition: background 0.15s, color 0.15s;
    cursor: pointer;
}
.offcanvas-nav-link:hover, .offcanvas-nav-link:focus {
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
}
.offcanvas-nav-link.active {
    background: rgba(255, 255, 255, 0.15);
    color: #fff;
    border-left: 3px solid var(--gold);
}
.offcanvas-nav-link i {
    width: 24px;
    text-align: center;
    margin-right: 0.5rem;
}
.offcanvas-divider {
    height: 1px;
    background: rgba(255, 255, 255, 0.1);
    margin: 0.5rem 1rem;
}
.offcanvas-footer {
    padding: 1rem 1.5rem;
    background: rgba(0, 0, 0, 0.2);
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}
.offcanvas-user {
    display: flex;
    align-items: center;
    margin-bottom: 1rem;
}
.offcanvas-user i {
    font-size: 2rem;
    color: rgba(255, 255, 255, 0.8);
}
.offcanvas-footer .offcanvas-nav-link {
    padding: 0;
}
