@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800;900&family=Space+Grotesk:wght@500;600;700;800;900&family=JetBrains+Mono:wght@500;700&display=swap');

:root {
    --bg-primary: #0a0e1a;
    --bg-secondary: #111827;
    --bg-card: rgba(17, 24, 39, 0.7);
    --bg-card-hover: rgba(30, 41, 59, 0.8);
    --bg-input: rgba(15, 23, 42, 0.9);
    --border: rgba(99, 102, 115, 0.25);
    --border-focus: var(--accent-primary);
    --text-primary: #f1f5f9;
    --text-secondary: #94a3b8;
    --text-muted: #64748b;
    --accent: var(--accent-primary);
    --accent-light: #ff2d47;
    --accent-dark: #9b0016;
    --accent-glow: rgba(208, 2, 27, 0.3);
    --success: #10b981;
    --warning: #f59e0b;
    --info: #3b82f6;
    --glass: rgba(255, 255, 255, 0.04);
    --glass-border: rgba(255, 255, 255, 0.08);
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 20px;
    --shadow-card: 0 4px 24px rgba(0,0,0,0.3), 0 1px 2px rgba(0,0,0,0.2);
    --shadow-glow: 0 0 40px rgba(208, 2, 27, 0.15);
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    min-height: 100vh;
    overflow-x: hidden;
}

body::before {
    content: '';
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background:
        radial-gradient(ellipse at 20% 0%, rgba(208,2,27,0.08) 0%, transparent 60%),
        radial-gradient(ellipse at 80% 100%, rgba(59,130,246,0.06) 0%, transparent 60%);
    pointer-events: none;
    z-index: 0;
}

/* ─── HEADER ─── */
.site-header {
    background: rgba(10,14,26,0.85);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--glass-border);
    padding: 16px 0;
    position: sticky;
    top: 0;
    z-index: 100;
}

.header-inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.header-brand {
    display: flex;
    align-items: center;
    gap: 14px;
    text-decoration: none;
}

.header-brand .brand-icon {
    width: 44px;
    height: 44px;
    background: linear-gradient(135deg, var(--accent), var(--accent-dark));
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    box-shadow: 0 4px 16px rgba(208,2,27,0.3);
}

.header-brand .brand-text {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 20px;
    font-weight: 800;
    color: var(--text-primary);
    letter-spacing: -0.5px;
}

.header-brand .brand-sub {
    font-size: 11px;
    font-weight: 500;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 1.5px;
}

.header-actions {
    display: flex;
    gap: 10px;
}

/* ─── CONTAINER ─── */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 32px 24px;
    position: relative;
    z-index: 1;
}

/* ─── PAGE TITLE ─── */
.page-title {
    text-align: center;
    margin-bottom: 40px;
}

.page-title h1 {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 36px;
    font-weight: 900;
    background: linear-gradient(135deg, var(--text-primary) 0%, var(--accent-light) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 8px;
}

.page-title p {
    font-size: 15px;
    color: var(--text-secondary);
    font-weight: 500;
}

/* ─── FORM SECTIONS ─── */
.form-section {
    background: var(--bg-card);
    backdrop-filter: blur(12px);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-xl);
    padding: 28px;
    margin-bottom: 24px;
    box-shadow: var(--shadow-card);
    transition: all 0.3s ease;
}

.form-section:hover {
    border-color: rgba(208,2,27,0.2);
    box-shadow: var(--shadow-card), var(--shadow-glow);
}

.section-header {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 24px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--glass-border);
}

.section-icon {
    width: 44px;
    height: 44px;
    background: linear-gradient(135deg, rgba(208,2,27,0.15), rgba(208,2,27,0.05));
    border: 1px solid rgba(208,2,27,0.25);
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    flex-shrink: 0;
}

.section-header h2 {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 20px;
    font-weight: 800;
    color: var(--text-primary);
}

.section-header .section-desc {
    font-size: 13px;
    color: var(--text-muted);
    font-weight: 500;
    margin-top: 2px;
}

/* ─── FORM GRID ─── */
.form-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 18px;
}

.form-grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 18px; }
.form-grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; }

.form-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.form-group.full-width { grid-column: 1 / -1; }
.form-group.span-2 { grid-column: span 2; }

.form-label {
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    color: var(--text-secondary);
}

.form-label .required {
    color: var(--accent);
    margin-left: 2px;
}

/* ─── INPUTS ─── */
.form-input,
.form-select,
.form-textarea {
    width: 100%;
    padding: 12px 16px;
    background: var(--bg-input);
    border: 1.5px solid var(--border);
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    font-family: 'Inter', sans-serif;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.25s ease;
    outline: none;
}

.form-input::placeholder { color: var(--text-muted); font-weight: 400; }

.form-input:focus,
.form-select:focus,
.form-textarea:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(208,2,27,0.15);
    background: rgba(15,23,42,1);
}

.form-select {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='%2394a3b8' viewBox='0 0 16 16'%3E%3Cpath d='M8 11L3 6h10l-5 5z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    padding-right: 36px;
    cursor: pointer;
}

.form-select option {
    background: var(--bg-secondary);
    color: var(--text-primary);
}

.form-textarea {
    resize: vertical;
    min-height: 80px;
}

/* ─── AUTOCOMPLETE ─── */
.autocomplete-wrapper {
    position: relative;
}

.autocomplete-list {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: 0 0 var(--radius-sm) var(--radius-sm);
    max-height: 220px;
    overflow-y: auto;
    z-index: 50;
    display: none;
    box-shadow: 0 12px 32px rgba(0,0,0,0.5);
}

.autocomplete-list.active { display: block; }

.autocomplete-item {
    padding: 10px 16px;
    cursor: pointer;
    font-size: 13px;
    color: var(--text-secondary);
    border-bottom: 1px solid var(--glass-border);
    transition: all 0.15s ease;
}

.autocomplete-item:hover,
.autocomplete-item.selected {
    background: rgba(208,2,27,0.1);
    color: var(--text-primary);
}

.autocomplete-item .iata-code {
    font-family: 'JetBrains Mono', monospace;
    font-weight: 700;
    color: var(--accent-light);
    margin-right: 8px;
}

/* ─── AIRLINE SELECTOR ─── */
.airline-preview {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 12px 16px;
    background: var(--glass);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-sm);
    margin-top: 8px;
    min-height: 56px;
}

.airline-preview img {
    height: 32px;
    width: auto;
    object-fit: contain;
    filter: brightness(1.1);
}

.airline-preview .airline-name {
    font-size: 14px;
    font-weight: 700;
    color: var(--text-primary);
}

.airline-preview .airline-code {
    font-family: 'JetBrains Mono', monospace;
    font-size: 12px;
    color: var(--text-muted);
}

/* ─── FLIGHT ROUTE VISUAL ─── */
.route-visual {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
    padding: 24px;
    background: linear-gradient(135deg, rgba(59,130,246,0.05), rgba(208,2,27,0.05));
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-lg);
    margin-bottom: 20px;
}

.route-point {
    text-align: center;
}

.route-point .code {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 32px;
    font-weight: 900;
    color: var(--text-primary);
}

.route-point .city {
    font-size: 12px;
    color: var(--text-muted);
    font-weight: 600;
}

.route-line {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 8px;
    position: relative;
}

.route-line::before {
    content: '';
    flex: 1;
    height: 2px;
    background: linear-gradient(90deg, var(--info), var(--accent));
    border-radius: 2px;
}

.route-line .plane-icon {
    font-size: 24px;
    color: var(--accent-light);
    animation: flyPlane 3s ease-in-out infinite;
}

@keyframes flyPlane {
    0%, 100% { transform: translateX(0); }
    50% { transform: translateX(6px); }
}

/* ─── PASSENGER ROW ─── */
.passenger-row,
.segment-row {
    background: var(--glass);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-md);
    padding: 20px;
    margin-bottom: 14px;
    position: relative;
    transition: all 0.25s ease;
}

.passenger-row:hover,
.segment-row:hover {
    border-color: rgba(208,2,27,0.2);
}

.row-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 16px;
}

.row-badge {
    font-family: 'JetBrains Mono', monospace;
    font-size: 11px;
    font-weight: 700;
    background: linear-gradient(135deg, var(--accent), var(--accent-dark));
    color: white;
    padding: 4px 12px;
    border-radius: 100px;
    letter-spacing: 0.5px;
}

.btn-remove-row {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    border: 1px solid rgba(239,68,68,0.3);
    background: rgba(239,68,68,0.1);
    color: #ef4444;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    transition: all 0.2s ease;
}

.btn-remove-row:hover {
    background: rgba(239,68,68,0.25);
    border-color: #ef4444;
    transform: scale(1.1);
}

/* ─── BUTTONS ─── */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 24px;
    font-family: 'Inter', sans-serif;
    font-size: 14px;
    font-weight: 700;
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: all 0.25s ease;
    border: none;
    text-decoration: none;
    white-space: nowrap;
}

.btn-primary {
    background: linear-gradient(135deg, var(--accent), var(--accent-dark));
    color: white;
    box-shadow: 0 4px 16px rgba(208,2,27,0.3);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(208,2,27,0.4);
}

.btn-secondary {
    background: var(--glass);
    border: 1px solid var(--glass-border);
    color: var(--text-secondary);
}

.btn-secondary:hover {
    border-color: var(--accent);
    color: var(--text-primary);
    background: rgba(208,2,27,0.08);
}

.btn-success {
    background: linear-gradient(135deg, #059669, #047857);
    color: white;
    box-shadow: 0 4px 16px rgba(5,150,105,0.3);
}

.btn-success:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(5,150,105,0.4);
}

.btn-whatsapp {
    background: linear-gradient(135deg, #25D366, #128C7E);
    color: white;
    box-shadow: 0 4px 16px rgba(37,211,102,0.3);
}

.btn-whatsapp:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(37,211,102,0.4);
}

.btn-email {
    background: linear-gradient(135deg, #3b82f6, #1d4ed8);
    color: white;
    box-shadow: 0 4px 16px rgba(59,130,246,0.3);
}

.btn-email:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(59,130,246,0.4);
}

.btn-lg {
    padding: 16px 32px;
    font-size: 16px;
    border-radius: var(--radius-md);
}

.btn-sm {
    padding: 8px 16px;
    font-size: 12px;
}

.btn-icon { font-size: 18px; }

/* ─── ACTION BAR ─── */
.action-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
    padding: 28px;
    background: var(--bg-card);
    backdrop-filter: blur(12px);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-card);
    justify-content: center;
}

/* ─── FARE DISPLAY ─── */
.fare-summary {
    background: linear-gradient(135deg, rgba(208,2,27,0.06), rgba(59,130,246,0.04));
    border: 1px solid rgba(208,2,27,0.15);
    border-radius: var(--radius-md);
    padding: 20px;
    margin-top: 8px;
}

.fare-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 0;
    font-size: 14px;
    color: var(--text-secondary);
}

.fare-row.total {
    border-top: 2px solid rgba(208,2,27,0.3);
    margin-top: 8px;
    padding-top: 12px;
    font-size: 18px;
    font-weight: 900;
    color: var(--text-primary);
    font-family: 'Space Grotesk', sans-serif;
}

.fare-row .amount {
    font-family: 'JetBrains Mono', monospace;
    font-weight: 700;
}

.fare-row.total .amount {
    color: var(--accent-light);
    font-size: 22px;
}

/* ─── TOAST / NOTIFICATIONS ─── */
.toast {
    position: fixed;
    bottom: 24px;
    right: 24px;
    background: var(--bg-secondary);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-md);
    padding: 16px 24px;
    display: flex;
    align-items: center;
    gap: 12px;
    box-shadow: 0 12px 40px rgba(0,0,0,0.5);
    z-index: 1000;
    transform: translateX(120%);
    transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
    max-width: 400px;
}

.toast.show { transform: translateX(0); }

.toast.success { border-color: var(--success); }
.toast.error { border-color: var(--accent); }

.toast-icon { font-size: 22px; }
.toast-text { font-size: 14px; font-weight: 600; color: var(--text-primary); }

/* ─── STATUS BADGE ─── */
.status-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 5px 12px;
    border-radius: 100px;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.3px;
}

.status-confirmed {
    background: rgba(16,185,129,0.15);
    color: #34d399;
    border: 1px solid rgba(16,185,129,0.3);
}

/* ─── LOADING OVERLAY ─── */
.loading-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.6);
    backdrop-filter: blur(8px);
    z-index: 9999;
    display: none;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 20px;
}

.loading-overlay.active { display: flex; }

.spinner {
    width: 48px;
    height: 48px;
    border: 4px solid var(--glass-border);
    border-top-color: var(--accent);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin { to { transform: rotate(360deg); } }

.loading-text {
    font-size: 16px;
    font-weight: 700;
    color: var(--text-primary);
}

/* ─── RESPONSIVE ─── */
@media (max-width: 768px) {
    .form-grid,
    .form-grid-4 {
        grid-template-columns: 1fr;
    }

    .form-grid-2 { grid-template-columns: 1fr; }

    .form-group.span-2 { grid-column: span 1; }

    .page-title h1 { font-size: 26px; }

    .form-section { padding: 20px; }

    .action-bar {
        flex-direction: column;
    }

    .action-bar .btn {
        width: 100%;
    }

    .route-visual {
        flex-direction: column;
        gap: 8px;
    }

    .route-line { display: none; }

    .header-inner {
        flex-direction: column;
        gap: 12px;
    }
}

/* ─── PASTE ZONE ─── */
.paste-zone {
    border: 2px dashed rgba(59,130,246,0.35);
    border-radius: var(--radius-lg);
    padding: 32px 24px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    background: rgba(59,130,246,0.03);
    outline: none;
}

.paste-zone:hover,
.paste-zone:focus {
    border-color: rgba(59,130,246,0.6);
    background: rgba(59,130,246,0.06);
}

.paste-zone.drag-over {
    border-color: var(--info);
    background: rgba(59,130,246,0.12);
    box-shadow: 0 0 30px rgba(59,130,246,0.15);
    transform: scale(1.01);
}

.paste-zone.scanning {
    border-color: var(--accent);
    background: rgba(208,2,27,0.05);
    animation: pulse-border 1.5s ease-in-out infinite;
}

@keyframes pulse-border {
    0%, 100% { border-color: rgba(208,2,27,0.3); }
    50% { border-color: rgba(208,2,27,0.7); }
}

.paste-zone-icon {
    font-size: 42px;
    margin-bottom: 8px;
    opacity: 0.8;
}

.paste-zone-title {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 20px;
    font-weight: 800;
    color: var(--text-primary);
    margin-bottom: 6px;
}

.paste-zone-hint {
    font-size: 14px;
    color: var(--text-muted);
    font-weight: 500;
}

.paste-zone-hint kbd {
    display: inline-block;
    padding: 2px 8px;
    background: rgba(255,255,255,0.08);
    border: 1px solid rgba(255,255,255,0.15);
    border-radius: 4px;
    font-family: 'JetBrains Mono', monospace;
    font-size: 12px;
    font-weight: 700;
    color: var(--text-secondary);
    box-shadow: 0 1px 2px rgba(0,0,0,0.2);
}

.paste-zone-preview {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
}

.paste-zone-preview img {
    max-width: 100%;
    max-height: 280px;
    border-radius: var(--radius-md);
    border: 1px solid var(--glass-border);
    object-fit: contain;
}

.paste-zone-preview-actions {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
    justify-content: center;
}

/* ─── SCROLLBAR ─── */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--border); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--text-muted); }
