/* =====================================================
   HELI BOOKING ADMIN - STYLESHEET
   Palette: Deep navy sky + helipad teal + warning saffron
   ===================================================== */

:root {
    --hb-navy:        #0f2540;
    --hb-navy-dark:   #0a1a2e;
    --hb-teal:        #0f8b8d;
    --hb-teal-light:  #14b8bb;
    --hb-saffron:     #e8943a;
    --hb-bg:          #f4f6f8;
    --hb-card:        #ffffff;
    --hb-border:      #e2e8f0;
    --hb-text:        #1c2733;
    --hb-text-mute:   #64748b;
    --hb-success:     #1a9e6b;
    --hb-success-bg:  #e6f6ef;
    --hb-pending:     #b8860b;
    --hb-pending-bg:  #fdf3e0;
    --hb-cancel:      #c23b3b;
    --hb-cancel-bg:   #fbe9e9;
    --hb-radius:      10px;
    --hb-shadow:      0 1px 3px rgba(15, 37, 64, 0.08), 0 1px 2px rgba(15, 37, 64, 0.06);
    --hb-shadow-md:   0 4px 12px rgba(15, 37, 64, 0.10);
    --font-display:   'Sora', 'Segoe UI', sans-serif;
    --font-body:      'Inter', 'Segoe UI', sans-serif;
}

* { box-sizing: border-box; }

body {
    margin: 0;
    font-family: var(--font-body);
    background: var(--hb-bg);
    color: var(--hb-text);
    font-size: 14.5px;
    line-height: 1.5;
}

a { text-decoration: none; color: inherit; }

/* ---------- SHELL LAYOUT ---------- */
.hb-shell {
    display: flex;
    min-height: 100vh;
}

.hb-sidebar {
    width: 230px;
    background: linear-gradient(180deg, var(--hb-navy) 0%, var(--hb-navy-dark) 100%);
    color: #fff;
    display: flex;
    flex-direction: column;
    position: fixed;
    top: 0; left: 0; bottom: 0;
    z-index: 10;
}

.hb-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 22px 20px;
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 18px;
    border-bottom: 1px solid rgba(255,255,255,0.08);
}

.hb-brand-icon { font-size: 22px; }

.hb-nav {
    flex: 1;
    padding: 16px 12px;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.hb-nav a {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 11px 14px;
    border-radius: 8px;
    color: rgba(255,255,255,0.78);
    font-weight: 500;
    font-size: 14px;
    transition: background 0.15s, color 0.15s;
}

.hb-nav a:hover {
    background: rgba(255,255,255,0.07);
    color: #fff;
}

.hb-nav a.active {
    background: var(--hb-teal);
    color: #fff;
    font-weight: 600;
}

.hb-sidebar-footer {
    padding: 16px 20px;
    font-size: 11px;
    letter-spacing: 0.05em;
    color: rgba(255,255,255,0.4);
    border-top: 1px solid rgba(255,255,255,0.08);
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.hb-sidebar-footer .hb-logout-link {
    color: rgba(255,255,255,0.75);
    text-decoration: none;
    font-weight: 600;
    letter-spacing: 0.02em;
    transition: color 0.15s ease;
}

.hb-sidebar-footer .hb-logout-link:hover {
    color: #ff8a8a;
}

/* ---------- LOGIN PAGE ---------- */
.hb-login-wrap {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.hb-login-box {
    width: 100%;
    max-width: 380px;
    background: #fff;
    border-radius: 14px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.12);
    padding: 36px 32px;
}

.hb-login-box h1 {
    font-size: 22px;
    margin: 0 0 4px;
    text-align: center;
}

.hb-login-box .hb-login-sub {
    text-align: center;
    color: var(--hb-text-mute);
    font-size: 13px;
    margin-bottom: 24px;
}

.hb-login-icon {
    text-align: center;
    font-size: 38px;
    margin-bottom: 6px;
}

.hb-main {
    margin-left: 230px;
    flex: 1;
    padding: 28px 36px 60px;
    max-width: 1200px;
}

/* ---------- TOP BAR / PAGE HEAD ---------- */
.hb-pagehead {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    margin-bottom: 24px;
    flex-wrap: wrap;
    gap: 14px;
}

.hb-pagehead h1 {
    font-family: var(--font-display);
    font-size: 24px;
    font-weight: 700;
    margin: 0 0 4px;
    color: var(--hb-navy);
}

.hb-pagehead p {
    margin: 0;
    color: var(--hb-text-mute);
    font-size: 13.5px;
}

/* ---------- BUTTONS ---------- */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 10px 18px;
    border-radius: 8px;
    border: none;
    font-weight: 600;
    font-size: 13.5px;
    cursor: pointer;
    transition: filter 0.15s, transform 0.1s;
    font-family: var(--font-body);
}

.btn:active { transform: translateY(1px); }

.btn-primary { background: var(--hb-teal); color: #fff; }
.btn-primary:hover { filter: brightness(1.08); }

.btn-secondary { background: #fff; color: var(--hb-navy); border: 1px solid var(--hb-border); }
.btn-secondary:hover { background: #f1f3f5; }

.btn-danger { background: var(--hb-cancel-bg); color: var(--hb-cancel); }
.btn-danger:hover { filter: brightness(0.97); }

.btn-bp { background: #eef9f9; color: #0f2540; border: 1.5px solid #0f8b8d; font-weight: 700; }
.btn-bp:hover { background: #d6f2f2; }

.btn-irctc { background: #fff4e6; color: #8b3a00; border: 1.5px solid #c0622a; font-weight: 700; }
.btn-irctc:hover { background: #ffe5cc; }

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

/* ---------- CARDS ---------- */
.hb-card {
    background: var(--hb-card);
    border-radius: var(--hb-radius);
    border: 1px solid var(--hb-border);
    box-shadow: var(--hb-shadow);
    padding: 22px 24px;
    margin-bottom: 22px;
}

.hb-card h2 {
    font-family: var(--font-display);
    font-size: 16px;
    font-weight: 700;
    margin: 0 0 16px;
    color: var(--hb-navy);
}

/* ---------- STAT CARDS ---------- */
.hb-stats {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
    margin-bottom: 26px;
}

.hb-stat {
    background: var(--hb-card);
    border: 1px solid var(--hb-border);
    border-radius: var(--hb-radius);
    padding: 18px 20px;
    box-shadow: var(--hb-shadow);
    position: relative;
    overflow: hidden;
}

.hb-stat::before {
    content: '';
    position: absolute;
    top: 0; left: 0;
    width: 4px; height: 100%;
    background: var(--hb-teal);
}

.hb-stat.stat-pending::before { background: var(--hb-pending); }
.hb-stat.stat-cancel::before { background: var(--hb-cancel); }
.hb-stat.stat-revenue::before { background: var(--hb-saffron); }

.hb-stat-label {
    font-size: 12px;
    color: var(--hb-text-mute);
    text-transform: uppercase;
    letter-spacing: 0.04em;
    margin-bottom: 6px;
    font-weight: 600;
}

.hb-stat-value {
    font-family: var(--font-display);
    font-size: 26px;
    font-weight: 700;
    color: var(--hb-navy);
}

/* ---------- TABLE ---------- */
.hb-table-wrap { overflow-x: auto; }

table.hb-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13.5px;
}

table.hb-table th {
    text-align: left;
    padding: 11px 14px;
    background: #f8fafb;
    color: var(--hb-text-mute);
    font-weight: 600;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    border-bottom: 1px solid var(--hb-border);
    white-space: nowrap;
}

table.hb-table td {
    padding: 13px 14px;
    border-bottom: 1px solid var(--hb-border);
    vertical-align: middle;
}

table.hb-table tbody tr:hover { background: #fafcfd; }

.hb-mono { font-family: 'SF Mono', Consolas, monospace; font-size: 12.5px; color: var(--hb-text-mute); }

/* ---------- BADGES ---------- */
.badge {
    display: inline-flex;
    align-items: center;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 11.5px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.badge-confirmed { background: var(--hb-success-bg); color: var(--hb-success); }
.badge-pending   { background: var(--hb-pending-bg); color: var(--hb-pending); }
.badge-cancelled { background: var(--hb-cancel-bg); color: var(--hb-cancel); }

/* ---------- FORMS ---------- */
.hb-form-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px;
    margin-bottom: 16px;
}

.hb-field label {
    display: block;
    font-size: 12.5px;
    font-weight: 600;
    color: var(--hb-text);
    margin-bottom: 6px;
}

.hb-field input,
.hb-field select {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid var(--hb-border);
    border-radius: 8px;
    font-size: 13.5px;
    font-family: var(--font-body);
    background: #fff;
    color: var(--hb-text);
    transition: border-color 0.15s, box-shadow 0.15s;
}

.hb-field input:focus,
.hb-field select:focus {
    outline: none;
    border-color: var(--hb-teal);
    box-shadow: 0 0 0 3px rgba(15, 139, 141, 0.12);
}

.hb-field-hint { font-size: 11.5px; color: var(--hb-text-mute); margin-top: 4px; }

/* ---------- PASSENGER ROWS ---------- */
#passengerList { display: flex; flex-direction: column; gap: 14px; margin-bottom: 14px; }

.passenger-row {
    border: 1px solid var(--hb-border);
    border-radius: 8px;
    padding: 16px;
    background: #fafcfd;
    position: relative;
}

.passenger-row-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.passenger-row-head span {
    font-weight: 700;
    font-size: 13px;
    color: var(--hb-navy);
}

.passenger-remove-btn {
    background: none;
    border: none;
    color: var(--hb-cancel);
    font-size: 13px;
    cursor: pointer;
    font-weight: 600;
    padding: 4px 8px;
}

.passenger-remove-btn:hover { text-decoration: underline; }

/* ---------- FARE SUMMARY ---------- */
.hb-fare-summary {
    background: var(--hb-navy);
    color: #fff;
    border-radius: var(--hb-radius);
    padding: 20px 24px;
}

.hb-fare-summary h2 { color: #fff; }

.hb-fare-line {
    display: flex;
    justify-content: space-between;
    padding: 7px 0;
    font-size: 13.5px;
    color: rgba(255,255,255,0.8);
    border-bottom: 1px solid rgba(255,255,255,0.08);
}

.hb-fare-line:last-of-type { border-bottom: none; }

.hb-fare-line.total {
    margin-top: 8px;
    padding-top: 14px;
    border-top: 1px solid rgba(255,255,255,0.2);
    font-size: 18px;
    font-weight: 700;
    color: #fff;
}

.hb-fare-line .amt { font-weight: 600; color: #fff; }

/* ---------- ALERTS / FLASH ---------- */
.alert {
    padding: 13px 18px;
    border-radius: 8px;
    margin-bottom: 20px;
    font-size: 13.5px;
    font-weight: 500;
}

.alert-success { background: var(--hb-success-bg); color: var(--hb-success); border: 1px solid #b7e4cf; }
.alert-error   { background: var(--hb-cancel-bg); color: var(--hb-cancel); border: 1px solid #f0bcbc; }

/* ---------- ACTION BUTTONS IN TABLE ---------- */
.action-cell {
    min-width: 200px;
    vertical-align: middle;
}

.action-btn-group {
    display: flex;
    flex-direction: column;
    gap: 5px;
    align-items: flex-start;
}

.action-btn-group .view-toggle,
.action-btn-group .btn {
    width: 100%;
    justify-content: center;
    text-align: center;
}

/* ---------- VIEW BOOKING MODAL / DETAIL ---------- */
.hb-detail-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 16px;
    margin-bottom: 20px;
}

.hb-detail-item label {
    display: block;
    font-size: 11.5px;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    color: var(--hb-text-mute);
    font-weight: 600;
    margin-bottom: 4px;
}

.hb-detail-item div { font-size: 14.5px; font-weight: 600; color: var(--hb-navy); }

.hb-route-pill {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: #eef9f9;
    color: var(--hb-teal);
    padding: 6px 14px;
    border-radius: 20px;
    font-weight: 600;
    font-size: 13px;
}

/* ---------- EXPANDABLE PASSENGER VIEW ---------- */
.view-toggle {
    background: none;
    border: 1px solid var(--hb-teal);
    color: var(--hb-teal);
    border-radius: 6px;
    padding: 5px 12px;
    font-size: 12.5px;
    font-weight: 600;
    cursor: pointer;
}

.view-toggle:hover { background: #eef9f9; }

.passenger-detail-row { display: none; background: #fafcfd; }
.passenger-detail-row.open { display: table-row; }

.passenger-detail-row td { padding: 0; }

.passenger-mini-table {
    width: 100%;
    border-collapse: collapse;
    margin: 4px 0 10px;
}

.passenger-mini-table th {
    text-align: left;
    font-size: 11px;
    text-transform: uppercase;
    color: var(--hb-text-mute);
    padding: 8px 14px;
    background: #f1f5f7;
}

.passenger-mini-table td {
    padding: 9px 14px;
    font-size: 13px;
    border-bottom: 1px solid #edf1f3;
}

/* ---------- EMPTY STATE ---------- */
.hb-empty {
    text-align: center;
    padding: 50px 20px;
    color: var(--hb-text-mute);
}

.hb-empty-icon { font-size: 38px; margin-bottom: 10px; }

/* ---------- RESPONSIVE ---------- */
@media (max-width: 900px) {
    .hb-sidebar { width: 70px; }
    .hb-brand-text, .hb-nav a span + br, .hb-nav a { font-size: 0; }
    .hb-nav a span:first-child { font-size: 18px; }
    .hb-main { margin-left: 70px; padding: 20px; }
    .hb-stats { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 600px) {
    .hb-stats { grid-template-columns: 1fr; }
}
