/* ═══════════════════════════════════════════════════════
   AKHAN AIR — Premium Dark Theme
   Cyan (#06b6d4) + Gold (#f59e0b) dual-color branding
   ═══════════════════════════════════════════════════════ */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800;900&display=swap');

:root {
    --bg-deep: #0a0e1a;
    --bg-card: #111827;
    --bg-card-alt: #0f172a;
    --bg-elevated: #1e293b;
    --border: #1e293b;
    --border-light: #334155;
    --cyan: #06b6d4;
    --cyan-glow: rgba(6, 182, 212, 0.3);
    --blue: #3b82f6;
    --purple: #8b5cf6;
    --gold: #f59e0b;
    --gold-glow: rgba(245, 158, 11, 0.3);
    --success: #10b981;
    --error: #ef4444;
    --warning: #f59e0b;
    --text-primary: #f1f5f9;
    --text-secondary: #94a3b8;
    --text-muted: #64748b;
    --text-dim: #475569;
    --row-even: #111827;
    --row-odd: #0f172a;
    --row-best: #052e16;
    --row-best-fg: #86efac;
}

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

body {
    font-family: 'Inter', 'Segoe UI', sans-serif;
    background: var(--bg-deep);
    color: var(--text-primary);
    min-height: 100vh;
    overflow-x: hidden;
}

/* ── HEADER ──────────────────────────────────────────── */

.header {
    background: linear-gradient(135deg, var(--bg-card) 0%, #0c1322 100%);
    border-bottom: 1px solid var(--border);
    padding: 0 2rem;
    height: 70px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: sticky;
    top: 0;
    z-index: 100;
    backdrop-filter: blur(20px);
}

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

.logo-icon {
    font-size: 2.2rem;
    margin-right: 8px;
    filter: drop-shadow(0 0 12px var(--cyan-glow));
    animation: float 3s ease-in-out infinite;
}

@keyframes float {
    0%, 100% { transform: translateY(0) rotate(-2deg); }
    50% { transform: translateY(-4px) rotate(2deg); }
}

.logo-akhan {
    font-size: 1.8rem;
    font-weight: 900;
    color: var(--cyan);
    letter-spacing: 2px;
    text-shadow: 0 0 20px var(--cyan-glow);
}

.logo-air {
    font-size: 1.8rem;
    font-weight: 900;
    color: var(--gold);
    letter-spacing: 2px;
    text-shadow: 0 0 20px var(--gold-glow);
}

.logo-divider {
    width: 1px;
    height: 30px;
    background: var(--border-light);
    margin: 0 16px;
}

.logo-subtitle {
    font-size: 0.8rem;
    color: var(--text-muted);
    font-weight: 400;
    letter-spacing: 1px;
}

.header-right {
    display: flex;
    align-items: center;
    gap: 12px;
}

.status-dot {
    width: 8px; height: 8px;
    background: var(--success);
    border-radius: 50%;
    box-shadow: 0 0 8px var(--success);
    animation: pulse-dot 2s infinite;
}

@keyframes pulse-dot {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

.status-text { font-size: 0.75rem; color: var(--success); font-weight: 600; }
.version { font-size: 0.75rem; color: var(--gold); font-weight: 700; }

/* ── HERO SECTION ────────────────────────────────────── */

.hero {
    background: linear-gradient(135deg, #0c1322 0%, #0a1628 50%, #0d1117 100%);
    padding: 48px 2rem 36px;
    text-align: center;
    border-bottom: 1px solid var(--border);
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '✈';
    position: absolute;
    font-size: 12rem;
    opacity: 0.03;
    top: -20px;
    right: 5%;
    transform: rotate(-15deg);
}

.hero-title {
    font-size: 2.4rem;
    font-weight: 900;
    color: var(--text-primary);
    line-height: 1.2;
    margin-bottom: 12px;
}

.hero-highlight {
    background: linear-gradient(135deg, var(--cyan), var(--blue));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero-subtitle {
    font-size: 1rem;
    color: var(--text-secondary);
    max-width: 550px;
    margin: 0 auto 24px;
    line-height: 1.5;
}

.hero-stats {
    display: flex;
    justify-content: center;
    gap: 40px;
}

.stat { text-align: center; }

.stat-num {
    display: block;
    font-size: 1.8rem;
    font-weight: 900;
    color: var(--gold);
}

.stat-label {
    font-size: 0.75rem;
    color: var(--text-muted);
    font-weight: 500;
}

/* ── POPULAR ROUTES ──────────────────────────────────── */

.popular-section {
    padding: 20px 2rem;
    max-width: 1400px;
    margin: 0 auto;
}

.section-title {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 14px;
}

.popular-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 10px;
}

.route-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 14px;
    text-align: center;
    transition: all 0.3s;
    cursor: pointer;
}

.route-card:hover {
    border-color: var(--cyan);
    transform: translateY(-3px);
    box-shadow: 0 8px 24px rgba(6, 182, 212, 0.15);
}

.route-cities {
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 6px;
}

.route-price {
    font-size: 1.2rem;
    font-weight: 900;
    color: var(--gold);
    margin-bottom: 4px;
}

.route-airline {
    font-size: 0.72rem;
    color: var(--text-secondary);
}

.route-meta {
    font-size: 0.65rem;
    color: var(--text-dim);
    margin-top: 4px;
}

.deal-card {
    border-color: var(--gold);
    background: linear-gradient(135deg, var(--bg-card) 0%, #1a1510 100%);
}

.btn-deal {
    display: inline-block;
    margin-top: 8px;
    padding: 6px 14px;
    border-radius: 8px;
    font-size: 0.75rem;
    font-weight: 700;
    color: #000;
    background: linear-gradient(135deg, var(--gold), #d97706);
    text-decoration: none;
    transition: all 0.3s;
    box-shadow: 0 2px 8px var(--gold-glow);
}

.btn-deal:hover {
    transform: scale(1.08);
    box-shadow: 0 4px 16px var(--gold-glow);
}

/* ── PRICE ALERT SECTION ─────────────────────────────── */

.alert-section {
    padding: 0 2rem 12px;
    max-width: 1400px;
    margin: 0 auto;
}

.alert-card {
    background: linear-gradient(135deg, #0c2d48 0%, #0a1628 100%);
    border: 1px solid var(--cyan);
    border-radius: 14px;
    padding: 20px 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    flex-wrap: wrap;
}

.alert-title {
    font-size: 1rem;
    font-weight: 700;
    color: var(--cyan);
    margin-bottom: 4px;
}

.alert-desc {
    font-size: 0.8rem;
    color: var(--text-secondary);
}

.alert-form {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.btn-subscribe {
    padding: 8px 16px;
    border-radius: 8px;
    border: none;
    cursor: pointer;
    font-size: 0.82rem;
    font-weight: 700;
    font-family: 'Inter', sans-serif;
    color: #000;
    background: linear-gradient(135deg, var(--gold), #d97706);
    transition: all 0.3s;
    white-space: nowrap;
}

.btn-subscribe:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 16px var(--gold-glow);
}

/* ── AD BANNER ───────────────────────────────────────── */

.ad-banner {
    background: var(--bg-card-alt);
    border: 1px dashed var(--border-light);
    border-radius: 8px;
    padding: 12px;
    text-align: center;
    color: var(--text-dim);
    font-size: 0.75rem;
    margin: 12px 1.5rem;
    min-height: 90px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.ad-banner-side {
    background: var(--bg-card-alt);
    border: 1px dashed var(--border-light);
    border-radius: 8px;
    padding: 10px;
    text-align: center;
    color: var(--text-dim);
    font-size: 0.7rem;
    min-height: 250px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* ── MAIN LAYOUT ─────────────────────────────────────── */

.main-content {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 1.5rem 2rem;
}

/* ── CARDS ────────────────────────────────────────────── */

.card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 20px;
    margin-bottom: 16px;
    transition: border-color 0.3s, box-shadow 0.3s;
}

.card:hover {
    border-color: var(--border-light);
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.3);
}

.card-title {
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--cyan);
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.card-title-icon {
    font-size: 1.1rem;
}

/* ── SEARCH PANELS ───────────────────────────────────── */

.search-grid {
    display: grid;
    grid-template-columns: 1fr 1.3fr;
    gap: 16px;
    margin-bottom: 16px;
}

.checkbox-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
    gap: 4px;
}

.checkbox-item {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 5px 8px;
    border-radius: 8px;
    cursor: pointer;
    transition: background 0.2s;
    font-size: 0.82rem;
    user-select: none;
}

.checkbox-item:hover { background: var(--bg-elevated); }

.custom-input-row {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 10px;
    padding: 8px 10px;
    background: var(--bg-card-alt);
    border-radius: 10px;
    border: 1px solid var(--border);
}

.input-hint {
    font-size: 0.68rem;
    color: var(--text-dim);
    font-style: italic;
}

.checkbox-item input[type="checkbox"] {
    accent-color: var(--cyan);
    width: 15px; height: 15px;
    cursor: pointer;
}

.vize-icon { font-size: 0.7rem; }

.card-actions {
    display: flex;
    gap: 6px;
    margin-bottom: 10px;
}

.btn-sm {
    font-size: 0.7rem;
    padding: 4px 10px;
    border-radius: 6px;
    border: none;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.2s;
}

.btn-sm.select-all { background: var(--blue); color: #fff; }
.btn-sm.clear-all { background: var(--bg-elevated); color: var(--text-secondary); }
.btn-sm:hover { transform: scale(1.05); filter: brightness(1.2); }

/* ── DATE MODULE ─────────────────────────────────────── */

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

.mode-tabs {
    display: flex;
    gap: 0;
    background: var(--bg-elevated);
    border-radius: 10px;
    padding: 3px;
    margin-bottom: 14px;
    width: fit-content;
}

.mode-tab {
    padding: 7px 18px;
    border-radius: 8px;
    border: none;
    cursor: pointer;
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--text-muted);
    background: transparent;
    transition: all 0.3s;
}

.mode-tab.active {
    background: var(--blue);
    color: #fff;
    box-shadow: 0 2px 12px rgba(59, 130, 246, 0.3);
}

.mode-tab:hover:not(.active) { color: var(--text-primary); }

.holiday-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 4px;
}

.settings-row {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-top: 12px;
    flex-wrap: wrap;
}

.setting-group {
    display: flex;
    align-items: center;
    gap: 6px;
}

.setting-label {
    font-size: 0.8rem;
    color: var(--text-secondary);
}

.input-sm {
    background: var(--bg-elevated);
    border: 1px solid var(--border-light);
    border-radius: 8px;
    padding: 6px 10px;
    color: var(--text-primary);
    font-size: 0.82rem;
    font-family: 'Inter', sans-serif;
    width: 100px;
    transition: border-color 0.3s;
}

.input-sm:focus {
    outline: none;
    border-color: var(--cyan);
    box-shadow: 0 0 0 3px var(--cyan-glow);
}

.radio-group {
    display: flex;
    gap: 12px;
}

.radio-item {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 0.82rem;
    color: var(--text-secondary);
    cursor: pointer;
}

.radio-item input { accent-color: var(--cyan); cursor: pointer; }

#manual-panel { display: none; }

.manual-row {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

/* ── ACTION BUTTONS ──────────────────────────────────── */

.action-bar {
    display: flex;
    gap: 10px;
    margin-bottom: 16px;
}

.btn-scan {
    flex: 1;
    padding: 14px 24px;
    border-radius: 14px;
    border: none;
    cursor: pointer;
    font-size: 1rem;
    font-weight: 800;
    font-family: 'Inter', sans-serif;
    color: #fff;
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    box-shadow: 0 4px 20px rgba(16, 185, 129, 0.3);
    transition: all 0.3s;
    letter-spacing: 0.5px;
}

.btn-scan:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 6px 28px rgba(16, 185, 129, 0.5);
}

.btn-scan:disabled { opacity: 0.5; cursor: not-allowed; transform: none; }

.btn-cancel {
    padding: 14px 24px;
    border-radius: 14px;
    border: none;
    cursor: pointer;
    font-size: 1rem;
    font-weight: 700;
    font-family: 'Inter', sans-serif;
    color: #fff;
    background: linear-gradient(135deg, var(--error) 0%, #dc2626 100%);
    transition: all 0.3s;
}

.btn-cancel:hover:not(:disabled) { transform: translateY(-2px); }
.btn-cancel:disabled { opacity: 0.3; cursor: not-allowed; }

/* ── PROGRESS ────────────────────────────────────────── */

.progress-section {
    margin-bottom: 16px;
}

.progress-bar-container {
    background: var(--bg-card);
    border-radius: 8px;
    height: 8px;
    overflow: hidden;
    border: 1px solid var(--border);
}

.progress-bar {
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, var(--cyan), var(--blue), var(--purple));
    border-radius: 8px;
    transition: width 0.4s ease;
    background-size: 200% 100%;
    animation: shimmer 2s linear infinite;
}

@keyframes shimmer {
    0% { background-position: -200% 0; }
    100% { background-position: 200% 0; }
}

.progress-info {
    display: flex;
    justify-content: space-between;
    margin-top: 6px;
    font-size: 0.78rem;
}

.progress-status { color: var(--warning); font-weight: 500; }
.progress-count { color: var(--text-muted); }

/* ── RESULTS TABLE ───────────────────────────────────── */

.results-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.results-count {
    font-size: 0.85rem;
    color: var(--text-muted);
}

.results-actions {
    display: flex;
    gap: 8px;
}

.btn-action {
    padding: 7px 14px;
    border-radius: 8px;
    border: none;
    cursor: pointer;
    font-size: 0.78rem;
    font-weight: 600;
    font-family: 'Inter', sans-serif;
    transition: all 0.2s;
}

.btn-sort { background: var(--blue); color: #fff; }
.btn-excel { background: var(--bg-elevated); color: var(--text-secondary); border: 1px solid var(--border-light); }
.btn-action:hover { transform: scale(1.05); filter: brightness(1.2); }

.results-table-container {
    border: 1px solid var(--border);
    border-radius: 14px;
    overflow: hidden;
}

.results-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.82rem;
}

.results-table thead th {
    background: var(--bg-card-alt);
    color: var(--cyan);
    font-weight: 700;
    padding: 12px 14px;
    text-align: center;
    font-size: 0.78rem;
    letter-spacing: 0.5px;
    border-bottom: 1px solid var(--border);
    cursor: pointer;
    transition: color 0.2s;
    white-space: nowrap;
}

.results-table thead th:hover { color: var(--gold); }

.results-table tbody tr {
    transition: background 0.2s;
    animation: fadeInRow 0.4s ease;
}

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

.results-table tbody tr:nth-child(even) { background: var(--row-even); }
.results-table tbody tr:nth-child(odd) { background: var(--row-odd); }
.results-table tbody tr:hover { background: var(--bg-elevated); }
.results-table tbody tr.best-row { background: var(--row-best); }
.results-table tbody tr.best-row td { color: var(--row-best-fg); font-weight: 600; }

.results-table td {
    padding: 10px 14px;
    text-align: center;
    border-bottom: 1px solid var(--border);
    white-space: nowrap;
}

.price-cell { color: var(--gold); font-weight: 700; font-size: 0.9rem; }
.airline-cell { color: var(--text-primary); font-weight: 500; }

/* ── AFFILIATE BUTTON ────────────────────────────────── */

.btn-affiliate {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 5px 12px;
    border-radius: 8px;
    border: none;
    cursor: pointer;
    font-size: 0.72rem;
    font-weight: 700;
    font-family: 'Inter', sans-serif;
    color: #fff;
    background: linear-gradient(135deg, var(--gold), #d97706);
    text-decoration: none;
    transition: all 0.2s;
    box-shadow: 0 2px 8px var(--gold-glow);
}

.btn-affiliate:hover {
    transform: scale(1.08);
    box-shadow: 0 4px 16px var(--gold-glow);
}

/* ── VIZE LEGEND ─────────────────────────────────────── */

.vize-legend {
    display: flex;
    gap: 14px;
    font-size: 0.72rem;
    color: var(--text-muted);
    margin-top: 8px;
}

.vize-legend span { display: flex; align-items: center; gap: 3px; }

/* ── FOOTER ──────────────────────────────────────────── */

.footer {
    text-align: center;
    padding: 24px;
    border-top: 1px solid var(--border);
    margin-top: 20px;
}

.footer-brand {
    font-size: 0.9rem;
    font-weight: 700;
}

.footer-brand .cyan { color: var(--cyan); }
.footer-brand .gold { color: var(--gold); }

.footer-copy {
    font-size: 0.7rem;
    color: var(--text-dim);
    margin-top: 4px;
}

/* ── EMPTY STATE ─────────────────────────────────────── */

.empty-state {
    text-align: center;
    padding: 48px 20px;
    color: var(--text-dim);
}

.empty-state .icon { font-size: 3rem; margin-bottom: 12px; opacity: 0.5; }
.empty-state .title { font-size: 1rem; font-weight: 600; color: var(--text-muted); }
.empty-state .subtitle { font-size: 0.82rem; margin-top: 6px; }

/* ── TOAST ───────────────────────────────────────────── */

.toast {
    position: fixed;
    bottom: 24px;
    right: 24px;
    background: var(--bg-card);
    border: 1px solid var(--border-light);
    border-radius: 12px;
    padding: 14px 20px;
    color: var(--text-primary);
    font-size: 0.85rem;
    font-weight: 500;
    box-shadow: 0 8px 32px rgba(0,0,0,0.4);
    z-index: 1000;
    transform: translateY(100px);
    opacity: 0;
    transition: all 0.4s ease;
}

.toast.show { transform: translateY(0); opacity: 1; }
.toast.success { border-left: 4px solid var(--success); }
.toast.error { border-left: 4px solid var(--error); }

/* ── RESPONSIVE ──────────────────────────────────────── */

@media (max-width: 768px) {
    .search-grid { grid-template-columns: 1fr; }
    .header { padding: 0 1rem; height: 60px; }
    .logo-akhan, .logo-air { font-size: 1.3rem; }
    .logo-divider { display: none; }
    .logo-subtitle { display: none; }
    .main-content { padding: 0 0.8rem 1rem; }
    .card { padding: 14px; }
    .checkbox-grid { grid-template-columns: repeat(2, 1fr); }
    .holiday-grid { grid-template-columns: repeat(2, 1fr); }
    .settings-row { gap: 10px; }
    .results-table { font-size: 0.72rem; }
    .results-table td, .results-table th { padding: 8px 6px; }
}

/* ── SCROLLBAR ───────────────────────────────────────── */

::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--bg-deep); }
::-webkit-scrollbar-thumb { background: var(--border-light); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--text-dim); }
