/* Umrah Flight Hunter — Soft & Responsive Styles */
:root {
    --primary: #2d6a4f;
    --primary-light: #40916c;
    --primary-bg: #d8f3dc;
    --gold: #b8860b;
    --gold-light: #fef3c7;
    --dark: #1e293b;
    --bg: #f1f5f9;
    --card: #ffffff;
    --text: #334155;
    --text-muted: #94a3b8;
    --danger: #dc2626;
    --danger-bg: #fef2f2;
    --success: #16a34a;
    --success-bg: #f0fdf4;
    --warning: #d97706;
    --warning-bg: #fffbeb;
    --border: #e2e8f0;
    --radius: 10px;
    --radius-sm: 6px;
    --shadow: 0 1px 2px rgba(0,0,0,.04);
    --shadow-md: 0 2px 8px rgba(0,0,0,.06);
    --max-w: 680px;
}

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

html { font-size: 16px; -webkit-text-size-adjust: 100%; }

body {
    font-family: system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
    background: var(--bg);
    color: var(--text);
    min-height: 100vh;
    line-height: 1.6;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

/* ─── Header ─── */
.header {
    background: linear-gradient(135deg, var(--primary), var(--primary-light));
    color: #fff;
    padding: 12px 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 1px 4px rgba(0,0,0,.1);
    flex-wrap: wrap;
}

.header-brand {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 1.05em;
    font-weight: 700;
    min-width: 0;
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    font-size: .88em;
}

/* ─── Buttons ─── */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 8px 16px;
    border: none;
    border-radius: var(--radius-sm);
    font-size: .9em;
    font-weight: 600;
    cursor: pointer;
    transition: all .15s;
    white-space: nowrap;
    line-height: 1.3;
}

.btn-primary { background: var(--primary); color: #fff; }
.btn-primary:hover { background: var(--primary-light); }

.btn-gold { background: var(--gold); color: #fff; }
.btn-gold:hover { filter: brightness(1.1); }

.btn-outline {
    background: transparent;
    border: 1.5px solid var(--border);
    color: var(--text-muted);
}
.btn-outline:hover { border-color: var(--primary); color: var(--primary); }

.btn-danger { background: var(--danger); color: #fff; }

.btn-google {
    background: #fff;
    color: var(--text);
    border: 1.5px solid var(--border);
    box-shadow: var(--shadow);
}
.btn-google:hover { background: var(--bg); }

.btn-sm { padding: 5px 12px; font-size: .82em; }
.btn-block { width: 100%; justify-content: center; }

.btn:disabled { opacity: .6; cursor: not-allowed; }

/* ─── Cards ─── */
.card {
    background: var(--card);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 16px;
    border: 1px solid var(--border);
}

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

.card-title { font-size: 1em; font-weight: 700; }

/* ─── Token Badge ─── */
.token-badge {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    background: var(--gold-light);
    color: var(--gold);
    padding: 3px 10px;
    border-radius: 20px;
    font-weight: 700;
    font-size: .82em;
}

/* ─── Route List ─── */
.route-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    padding: 12px 0;
    border-bottom: 1px solid var(--bg);
}
.route-item:last-child { border-bottom: none; }

.route-info { flex: 1; min-width: 0; }
.route-path { font-weight: 700; font-size: .95em; display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.route-path .arrow { color: var(--primary); }
.route-meta { font-size: .82em; color: var(--text-muted); margin-top: 3px; word-break: break-word; }
.route-price { text-align: right; font-weight: 700; font-size: 1em; color: var(--primary); white-space: nowrap; }

/* ─── Alert List ─── */
.alert-item {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 10px 0;
    border-bottom: 1px solid var(--bg);
}
.alert-item:last-child { border-bottom: none; }
.alert-icon { font-size: 1.3em; flex-shrink: 0; }
.alert-body { flex: 1; min-width: 0; }
.alert-title { font-weight: 700; font-size: .92em; }
.alert-detail { font-size: .8em; color: var(--text-muted); }
.alert-price { font-weight: 700; color: var(--success); font-size: .95em; }

/* ─── Login Page ─── */
.login-container {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100dvh;
    background: linear-gradient(160deg, #d8f3dc, #f0fdf4, #fef3c7);
    padding: 20px;
}

.login-card {
    background: #fff;
    border-radius: var(--radius);
    padding: 32px 24px;
    width: 100%;
    max-width: 360px;
    text-align: center;
    box-shadow: var(--shadow-md);
    border: 1px solid var(--border);
}

.login-logo { font-size: 2.8em; margin-bottom: 6px; }
.login-title { font-size: 1.3em; font-weight: 700; margin-bottom: 2px; }
.login-subtitle { color: var(--text-muted); font-size: .9em; margin-bottom: 20px; }

/* ─── Landing ─── */
.hero {
    text-align: center;
    padding: 48px 20px;
    background: linear-gradient(160deg, var(--primary-bg), var(--gold-light));
    color: var(--text);
}
.hero h1 { font-size: 1.7em; margin-bottom: 6px; max-width: 100%; }
.hero p { font-size: .95em; color: var(--text-muted); margin-bottom: 20px; max-width: 460px; margin-left: auto; margin-right: auto; }

.features {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 14px;
    padding: 32px 16px;
    max-width: var(--max-w);
    margin: 0 auto;
}

.feature-card {
    background: var(--card);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    border: 1px solid var(--border);
    padding: 20px;
    text-align: center;
}
.feature-icon { font-size: 2em; margin-bottom: 8px; }
.feature-card h3 { font-size: 1em; margin-bottom: 4px; }
.feature-card p { color: var(--text-muted); font-size: .85em; }

/* ─── Modals ─── */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(15,23,42,.4);
    display: flex;
    align-items: flex-end;
    justify-content: center;
    z-index: 200;
    padding: 16px;
}

.modal {
    background: #fff;
    border-radius: var(--radius) var(--radius) 0 0;
    padding: 20px 16px;
    width: 100%;
    max-width: 480px;
    max-height: 90dvh;
    overflow-y: auto;
    box-shadow: 0 -4px 20px rgba(0,0,0,.1);
    animation: slideUp .25s ease;
}

@keyframes slideUp {
    from { transform: translateY(100%); }
    to { transform: translateY(0); }
}

@media (min-width: 500px) {
    .modal {
        border-radius: var(--radius);
        margin-bottom: 40px;
    }
    .modal-overlay { align-items: center; }
}

.modal h2 { font-size: 1.15em; margin-bottom: 14px; }

.form-group { margin-bottom: 12px; }
.form-group label { display: block; font-weight: 600; font-size: .85em; margin-bottom: 3px; color: var(--text); }
.form-group select, .form-group input[type="number"], .form-group input[type="date"] {
    width: 100%;
    padding: 9px 11px;
    border: 1.5px solid var(--border);
    border-radius: var(--radius-sm);
    font-size: .92em;
    background: #fff;
    transition: border-color .15s;
}
.form-group select:focus, .form-group input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(45,106,79,.1);
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

.modal-actions {
    display: flex;
    gap: 8px;
    margin-top: 16px;
    flex-wrap: wrap;
}

/* ─── Push Banner ─── */
.push-banner {
    background: var(--warning-bg);
    border-bottom: 2px solid var(--warning);
    color: var(--text);
    padding: 10px 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    font-size: .9em;
    font-weight: 600;
    flex-wrap: wrap;
}

/* ─── Empty State ─── */
.empty-state { text-align: center; padding: 28px 16px; color: var(--text-muted); }
.empty-state .icon { font-size: 2.5em; margin-bottom: 8px; }
.empty-state h3 { margin-bottom: 4px; color: var(--text); font-size: 1em; }
.empty-state p { font-size: .85em; }

/* ─── Skeleton ─── */
.skeleton {
    background: linear-gradient(90deg, #f1f5f9 25%, #e2e8f0 50%, #f1f5f9 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
    border-radius: 4px;
}

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

/* ─── Toast ─── */
.toast {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--dark);
    color: #fff;
    padding: 10px 20px;
    border-radius: 8px;
    font-weight: 600;
    font-size: .88em;
    z-index: 300;
    animation: toastIn .25s ease;
    max-width: calc(100vw - 32px);
}

@keyframes toastIn {
    from { opacity: 0; transform: translateX(-50%) translateY(8px); }
    to { opacity: 1; transform: translateX(-50%) translateY(0); }
}

/* ─── Dual Range Slider ─── */
.dual-slider {
    position: relative;
    height: 36px;
    margin: 0 2px;
}
.dual-slider input[type="range"] {
    position: absolute;
    width: 100%;
    top: 0; left: 0;
    height: 36px;
    -webkit-appearance: none; appearance: none;
    background: transparent;
    pointer-events: none;
    margin: 0;
}
.dual-slider input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none; appearance: none;
    pointer-events: all;
    width: 22px; height: 22px;
    border-radius: 50%;
    background: var(--primary);
    border: 2.5px solid #fff;
    box-shadow: 0 1px 4px rgba(0,0,0,.15);
    cursor: pointer;
    z-index: 3;
    margin-top: -7px;
}
.dual-slider input[type="range"]::-moz-range-thumb {
    pointer-events: all;
    width: 22px; height: 22px;
    border-radius: 50%;
    background: var(--primary);
    border: 2.5px solid #fff;
    box-shadow: 0 1px 4px rgba(0,0,0,.15);
    cursor: pointer;
    z-index: 3;
}
.slider-track {
    position: absolute;
    top: 14px; left: 0; right: 0;
    height: 6px;
    background: var(--border);
    border-radius: 3px;
    z-index: 1;
}
.slider-fill {
    position: absolute;
    top: 14px;
    height: 6px;
    background: var(--primary-light);
    border-radius: 3px;
    z-index: 2;
    transition: left .08s, width .08s;
}
.slider-scale {
    display: flex;
    justify-content: space-between;
    padding: 0 1px;
    margin-top: 2px;
}
.slider-scale span { font-size: .62em; color: var(--text-muted); text-align: center; min-width: 24px; }

/* ─── Responsive ─── */
@media (max-width: 500px) {
    .header { padding: 10px 12px; }
    .header-brand { font-size: .95em; }
    .hero { padding: 36px 14px; }
    .hero h1 { font-size: 1.35em; }
    .features { grid-template-columns: 1fr; padding: 20px 12px; }
    .form-row { grid-template-columns: 1fr; }
    .route-item { flex-wrap: wrap; }
    .route-price { width: 100%; text-align: left; }
}
