/* --- TEMA "GLASSMORPHISM 2.0" - PREMIUM DASHBOARD --- */
:root {
    /* Palette - Deep Space & Vibrant Teal */
    --bg-dark: #0f172a;
    --bg-secondary: #1e293b;
    --bg-card: rgba(30, 41, 59, 0.7);

    --text-primary: #f8fafc;
    --text-secondary: #94a3b8;
    --text-muted: #64748b;

    --accent-primary: #06b6d4;
    --accent-hover: #22d3ee;
    --accent-glow: rgba(6, 182, 212, 0.3);

    --success-color: #10b981;
    --warning-color: #f59e0b;
    --danger-color: #ef4444;
    --info-color: #3b82f6;

    /* Glass Effects */
    --glass-bg: rgba(30, 41, 59, 0.65);
    --glass-border: rgba(255, 255, 255, 0.08);
    --glass-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.3);
    --glass-radius: 16px;

    /* Transitions */
    --transition-fast: 0.2s ease;
    --transition-smooth: 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

body {
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    margin: 0;
    padding: 0;
    background-color: var(--bg-dark);
    background-image:
        radial-gradient(circle at 0% 0%, rgba(6, 182, 212, 0.15), transparent 40%),
        radial-gradient(circle at 100% 100%, rgba(59, 130, 246, 0.1), transparent 40%);
    background-attachment: fixed;
    color: var(--text-primary);
    min-height: 100vh;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

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

/* --- UTILITIES --- */
.hidden {
    display: none !important;
}

.fade-in {
    animation: fadeIn 0.5s ease-out forwards;
}

/* --- HEADER & HERO --- */
.page-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 0;
    margin-bottom: 40px;
    gap: 20px;
}

.page-header>* {
    flex: 1;
}

.logo-container {
    text-align: center;
}

.logo-container img {
    height: 50px;
    width: auto;
    filter: drop-shadow(0 0 10px rgba(255, 255, 255, 0.1));
}

.back-button {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-secondary);
    text-decoration: none;
    border-radius: 50px;
    font-size: 0.9em;
    font-weight: 500;
    border: 1px solid var(--glass-border);
    transition: var(--transition-fast);
    white-space: nowrap;
}

.back-button:hover {
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-primary);
    border-color: rgba(255, 255, 255, 0.2);
}

.new-search-button {
    display: inline-flex;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
    padding: 10px 20px;
    background: linear-gradient(135deg, var(--accent-primary), var(--info-color));
    color: white;
    border: none;
    border-radius: 50px;
    font-size: 0.9em;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition-smooth);
    white-space: nowrap;
    box-shadow: 0 4px 15px rgba(6, 182, 212, 0.3);
}

.new-search-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(6, 182, 212, 0.4);
}

.header-spacer {
    /* Empty div to maintain layout */
}

/* --- SEARCH HERO --- */
.search-hero {
    text-align: center;
    padding: 60px 20px;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 24px;
    box-shadow: var(--glass-shadow);
    backdrop-filter: blur(12px);
    max-width: 800px;
    margin: 0 auto 40px auto;
    position: relative;
    overflow: hidden;
}

.search-hero::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(6, 182, 212, 0.05) 0%, transparent 70%);
    pointer-events: none;
}

.search-hero h1 {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 10px;
    background: linear-gradient(135deg, #fff 0%, #cbd5e1 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.search-hero p {
    color: var(--text-secondary);
    margin-bottom: 30px;
    font-size: 1.1rem;
}

.search-form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr auto;
    gap: 15px;
    max-width: 700px;
    margin: 0 auto;
}

.input-group {
    position: relative;
}

.input-group i {
    position: absolute;
    left: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    pointer-events: none;
    transition: var(--transition-fast);
}

.input-group input {
    width: 100%;
    padding: 16px 16px 16px 45px;
    background: rgba(15, 23, 42, 0.6);
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    color: var(--text-primary);
    font-size: 1rem;
    transition: var(--transition-fast);
    box-sizing: border-box;
}

.input-group input:focus {
    outline: none;
    border-color: var(--accent-primary);
    background: rgba(15, 23, 42, 0.8);
    box-shadow: 0 0 0 4px rgba(6, 182, 212, 0.15);
}

.input-group input:focus+i {
    color: var(--accent-primary);
}

.btn-search {
    padding: 0 30px;
    background: linear-gradient(135deg, var(--accent-primary), var(--info-color));
    color: white;
    border: none;
    border-radius: 12px;
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    transition: var(--transition-smooth);
    display: flex;
    align-items: center;
    gap: 8px;
    box-shadow: 0 4px 15px rgba(6, 182, 212, 0.3);
}

.btn-search:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(6, 182, 212, 0.4);
}

.btn-search:disabled {
    opacity: 0.7;
    cursor: wait;
}

/* --- DASHBOARD GRID --- */
.dashboard-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 25px;
    margin-top: 40px;
}

/* --- CARDS --- */
.card {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: var(--glass-radius);
    padding: 25px;
    backdrop-filter: blur(12px);
    box-shadow: var(--glass-shadow);
    margin-bottom: 25px;
    position: relative;
    overflow: hidden;
}

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 1px solid var(--glass-border);
}

.card-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 10px;
}

.card-title i {
    color: var(--accent-primary);
}

/* --- TRIP SUMMARY LIST --- */
.summary-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.summary-item {
    display: flex;
    justify-content: space-between;
    padding: 12px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.03);
}

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

.summary-label {
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.95rem;
}

.summary-value {
    font-weight: 500;
    color: var(--text-primary);
    text-align: right;
}

/* --- COUNTDOWN --- */
.countdown-box {
    text-align: center;
    padding: 20px;
    background: linear-gradient(135deg, rgba(6, 182, 212, 0.1), rgba(59, 130, 246, 0.1));
    border-radius: 12px;
    border: 1px solid rgba(6, 182, 212, 0.2);
    margin-bottom: 20px;
}

.countdown-timer {
    font-size: 2rem;
    font-weight: 700;
    color: var(--accent-primary);
    font-variant-numeric: tabular-nums;
}

.countdown-label {
    font-size: 0.85rem;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* --- PASSENGER CARDS --- */
.passenger-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
}

.passenger-card {
    background: rgba(15, 23, 42, 0.4);
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    padding: 20px;
    transition: var(--transition-fast);
    position: relative;
}

.passenger-card:hover {
    border-color: var(--accent-primary);
    transform: translateY(-2px);
}

.pax-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 15px;
}

.pax-name {
    font-weight: 600;
    font-size: 1.1rem;
    color: var(--text-primary);
    display: block;
}

.pax-type {
    font-size: 0.8rem;
    color: var(--text-muted);
    text-transform: uppercase;
}

.pax-status {
    font-size: 0.75rem;
    padding: 4px 8px;
    border-radius: 4px;
    font-weight: 600;
    text-transform: uppercase;
}

.status-ok {
    background: rgba(16, 185, 129, 0.2);
    color: #34d399;
}

.status-pending {
    background: rgba(245, 158, 11, 0.2);
    color: #fbbf24;
    cursor: pointer;
}

.pax-details {
    font-size: 0.9rem;
    color: var(--text-secondary);
    margin-bottom: 15px;
}

.pax-detail-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 5px;
}

.btn-action {
    width: 100%;
    padding: 10px;
    border-radius: 8px;
    border: none;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition-fast);
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
}

.btn-edit {
    background: rgba(59, 130, 246, 0.15);
    color: #60a5fa;
}

.btn-edit:hover {
    background: rgba(59, 130, 246, 0.25);
}

.btn-complete {
    background: rgba(245, 158, 11, 0.15);
    color: #fbbf24;
}

.btn-complete:hover {
    background: rgba(245, 158, 11, 0.25);
}

/* --- MODAL --- */
#modal-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    z-index: 1000;
    backdrop-filter: blur(5px);
}

#modal-container {
    display: none;
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 1001;
    width: 90%;
    max-width: 600px;
    max-height: 90vh;
    background: #1e293b;
    border: 1px solid var(--glass-border);
    border-radius: 16px;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
    flex-direction: column;
}

.modal-header {
    flex-shrink: 0;
    padding: 15px 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-body {
    flex-grow: 1;
    overflow-y: auto;
    padding: 20px;
}

.modal-footer {
    flex-shrink: 0;
    padding: 15px 20px;
    background: rgba(15, 23, 42, 0.95);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    z-index: 10;
}

/* --- RESPONSIVE --- */
@media (max-width: 768px) {
    .page-header {
        flex-wrap: wrap;
        gap: 15px;
    }

    .page-header>* {
        flex: 0 1 auto;
    }

    .back-button {
        order: 1;
        font-size: 0.8em;
        padding: 8px 15px;
    }

    .back-button span {
        display: none;
    }

    .logo-container {
        order: 2;
        flex: 1 1 100%;
    }

    .new-search-button {
        order: 3;
        font-size: 0.8em;
        padding: 8px 15px;
    }

    .header-spacer {
        order: 3;
    }

    .search-form-grid {
        grid-template-columns: 1fr;
    }

    .dashboard-grid {
        grid-template-columns: 1fr;
    }

    .search-hero h1 {
        font-size: 1.8rem;
    }

    .search-hero {
        padding: 40px 20px;
    }

    #modal-container {
        width: 95%;
        max-height: 95vh;
    }

    .modal-body {
        padding: 15px;
    }

    .modal-body input,
    .modal-body select {
        font-size: 16px !important;
        padding: 14px !important;
        min-height: 48px;
    }

    .modal-body label {
        font-size: 1rem;
        font-weight: 600;
    }

    .modal-footer button {
        font-size: 1rem;
        padding: 14px 20px;
        min-height: 48px;
    }
}

/* --- ANIMATIONS --- */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}