/* ── Palouse Air App Styles ───────────────────────────────────────────── */
:root {
    --navy:    #0B1929;
    --navy2:   #0F2235;
    --navy3:   #1C3250;
    --gold:    #C9A05A;
    --gold-lt: #D4B472;
    --cream:   #F5F0E8;
    --white:   #FFFFFF;
    --mid:     #445566;
    --light:   #8899AA;
    --border:  #E5E0D8;
    --success: #2E7D52;
    --danger:  #C0392B;
    --warn:    #B7791F;
    --radius:  8px;
    --sidebar: 220px;
    font-family: 'Inter', system-ui, sans-serif;
    font-size: 14px;
    color: var(--navy);
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
body { background: #F0EDE8; }

/* ── Auth page ────────────────────────────────────────────────────────── */
.auth-body { display: flex; align-items: center; justify-content: center;
    min-height: 100vh; background: var(--navy); }
.auth-wrap { width: 100%; max-width: 420px; padding: 1rem; }
.auth-card { background: var(--white); border-radius: var(--radius);
    padding: 2.5rem; box-shadow: 0 24px 64px rgba(0,0,0,0.25); }
.auth-logo { display: flex; align-items: center; gap: 0.6rem;
    font-weight: 700; font-size: 1rem; color: var(--navy); margin-bottom: 1.75rem; }
.auth-card h1 { font-family: 'Playfair Display', serif; font-size: 1.7rem;
    color: var(--navy); margin-bottom: 0.4rem; }
.auth-sub { font-size: 0.85rem; color: var(--light); margin-bottom: 1.75rem; line-height: 1.5; }
.auth-error  { background: #FEF2F2; color: var(--danger); border: 1px solid #FCA5A5;
    border-radius: var(--radius); padding: 0.6rem 0.85rem; font-size: 0.84rem; margin-bottom: 1rem; }
.auth-success{ background: #F0FDF4; color: var(--success); border: 1px solid #86EFAC;
    border-radius: var(--radius); padding: 0.6rem 0.85rem; font-size: 0.84rem; margin-bottom: 1rem; }
.auth-footer { font-size: 0.8rem; color: var(--light); margin-top: 1.25rem; text-align: center; }
.auth-footer a { color: var(--gold); text-decoration: none; }

/* ── Forms ────────────────────────────────────────────────────────────── */
.form-group { margin-bottom: 1rem; }
.form-group label { display: block; font-size: 0.75rem; font-weight: 600;
    color: var(--mid); margin-bottom: 0.35rem; letter-spacing: 0.04em; text-transform: uppercase; }
.form-group input, .form-group select, .form-group textarea {
    width: 100%; padding: 0.6rem 0.85rem;
    border: 1px solid var(--border); border-radius: var(--radius);
    font-size: 0.9rem; color: var(--navy);
    background: var(--white); outline: none;
    transition: border-color 0.2s;
}
.form-group input:focus, .form-group select:focus, .form-group textarea:focus {
    border-color: var(--gold); box-shadow: 0 0 0 3px rgba(201,160,90,0.12); }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
@media (max-width: 600px) { .form-row { grid-template-columns: 1fr; } }

/* ── Buttons ──────────────────────────────────────────────────────────── */
.btn-primary { width: 100%; padding: 0.7rem; background: var(--navy);
    color: var(--white); border: none; border-radius: var(--radius);
    font-size: 0.9rem; font-weight: 600; cursor: pointer;
    transition: background 0.2s; display: flex; align-items: center; justify-content: center; gap: 0.5rem; }
.btn-primary:hover { background: var(--navy3); }
.btn-primary-sm { padding: 0.45rem 1rem; background: var(--navy);
    color: var(--white); border: none; border-radius: var(--radius);
    font-size: 0.8rem; font-weight: 600; cursor: pointer; text-decoration: none; display: inline-block; }
.btn-primary-sm:hover { background: var(--navy3); }
.btn-signout { width: 100%; padding: 0.5rem;
    background: rgba(255,255,255,0.06); color: rgba(255,255,255,0.5);
    border: 1px solid rgba(255,255,255,0.1); border-radius: var(--radius);
    font-size: 0.78rem; cursor: pointer; transition: all 0.2s; }
.btn-signout:hover { background: rgba(255,255,255,0.1); color: var(--white); }
.action-btn { padding: 0.3rem 0.65rem; background: var(--navy);
    color: var(--white); border: none; border-radius: 6px;
    font-size: 0.72rem; cursor: pointer; margin-right: 4px; }
.action-btn--cancel { background: rgba(192,57,43,0.12); color: var(--danger); }
.spinner { width: 14px; height: 14px; border: 2px solid rgba(255,255,255,0.3);
    border-top-color: white; border-radius: 50%; animation: spin 0.7s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ── App layout ───────────────────────────────────────────────────────── */
.app-body { display: flex; min-height: 100vh; }

.sidebar { width: var(--sidebar); background: var(--navy);
    display: flex; flex-direction: column; flex-shrink: 0;
    position: fixed; top: 0; left: 0; height: 100vh; overflow-y: auto; z-index: 100; }
.sidebar--admin .sidebar-logo em { font-style: normal; font-size: 0.65rem;
    color: var(--gold); letter-spacing: 0.1em; text-transform: uppercase;
    display: block; margin-top: -2px; }
.sidebar-logo { display: flex; flex-direction: row; align-items: center; gap: 0.6rem;
    height: 64px; padding: 0 1.25rem;
    border-bottom: 1px solid rgba(255,255,255,0.06);
    font-weight: 700; font-size: 0.9rem; color: var(--white); flex-shrink: 0; }
.sidebar-nav { flex: 1; padding: 1rem 0; }
.nav-item { display: flex; align-items: center; gap: 0.6rem;
    padding: 0.65rem 1.25rem; font-size: 0.84rem; color: rgba(255,255,255,0.5);
    text-decoration: none; cursor: pointer; transition: all 0.15s;
    border-left: 3px solid transparent; }
.nav-item svg { width: 16px; height: 16px; flex-shrink: 0; }
.nav-item:hover { color: rgba(255,255,255,0.85); background: rgba(255,255,255,0.04); }
.nav-item.active { color: var(--white); border-left-color: var(--gold);
    background: rgba(201,160,90,0.08); }
.sidebar-footer { padding: 1rem 1.25rem 1.5rem; border-top: 1px solid rgba(255,255,255,0.06); }

.app-main { margin-left: var(--sidebar); flex: 1; display: flex; flex-direction: column; min-height: 100vh; }

.app-topbar { display: flex; justify-content: space-between; align-items: center;
    padding: 0 2rem; height: 64px; background: var(--white);
    border-bottom: 1px solid var(--border); position: sticky; top: 0; z-index: 50;
    flex-shrink: 0; position: sticky; }
.topbar-title { font-family: 'Playfair Display', serif; font-size: 1.3rem; color: var(--navy); }
.topbar-right { display: flex; align-items: center; gap: 0.75rem; }
.topbar-user { font-size: 0.85rem; color: var(--mid); }

/* ── Sections ─────────────────────────────────────────────────────────── */
.app-section { display: none; padding: 2rem; }
.app-section.active { display: block; }
.section-toolbar { display: flex; justify-content: space-between; align-items: center; margin-bottom: 1.25rem; }
.section-desc { font-size: 0.85rem; color: var(--light); margin-bottom: 1.5rem; }

/* ── Tier chips ───────────────────────────────────────────────────────── */
.tier-chip { display: inline-block; padding: 2px 10px; border-radius: 20px;
    font-size: 0.72rem; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; }
.tier-platinum  { background: #E8E8F0; color: #445; }
.tier-elite     { background: #E8F0F8; color: #234; }
.tier-premier   { background: rgba(201,160,90,0.15); color: #7A5C20; }
.tier-signature { background: #F0E8F8; color: #524; }
.tier-medallion { background: var(--navy); color: var(--gold); }
.tier-chip--admin { background: var(--gold); color: var(--navy); }

/* ── Stat grid ────────────────────────────────────────────────────────── */
.stat-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1rem; margin-bottom: 1.5rem; }
@media (max-width: 900px) { .stat-grid { grid-template-columns: 1fr 1fr; } }
.stat-card { background: var(--white); border-radius: var(--radius);
    padding: 1.25rem 1.5rem; border: 1px solid var(--border);
    border-left: 4px solid var(--border);
    cursor: pointer; transition: box-shadow 0.15s, transform 0.1s; }
.stat-card:hover { box-shadow: 0 4px 16px rgba(0,0,0,0.08); transform: translateY(-1px); }
.stat-card--1 { border-left-color: #4A7898; }
.stat-card--2 { border-left-color: #3A7858; }
.stat-card--3 { border-left-color: #2E7D52; }
.stat-card--4 { border-left-color: #C9A040; }
.stat-card--5 { border-left-color: #7A5840; }
.stat-card--gold { border-left-color: var(--gold); }
.stat-label { display: block; font-size: 0.72rem; font-weight: 600;
    color: var(--light); letter-spacing: 0.08em; text-transform: uppercase; margin-bottom: 0.4rem; }
.stat-val { display: block; font-size: 1.6rem; font-weight: 700; color: var(--navy); margin-bottom: 0.2rem; }
.stat-sub { display: block; font-size: 0.75rem; color: var(--light); }

/* ── Dashboard cards ──────────────────────────────────────────────────── */
.dash-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; margin-bottom: 1rem; }
@media (max-width: 900px) { .dash-grid { grid-template-columns: 1fr; } }
.dash-card { background: var(--white); border-radius: var(--radius);
    border: 1px solid var(--border); padding: 1.25rem; }
.dash-card-hdr { display: flex; justify-content: space-between; align-items: center; margin-bottom: 1rem; }
.dash-card-hdr h3 { font-size: 0.85rem; font-weight: 600; color: var(--navy); }
.link-btn { font-size: 0.78rem; color: var(--gold); text-decoration: none; font-weight: 600; cursor: pointer; }
.link-btn:hover { text-decoration: underline; }
.ownership-card { margin-top: 1rem; }
.ownership-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1rem; }
@media (max-width: 900px) { .ownership-grid { grid-template-columns: 1fr 1fr; } }
.own-item { }
.own-label { display: block; font-size: 0.68rem; font-weight: 600;
    color: var(--light); letter-spacing: 0.07em; text-transform: uppercase; margin-bottom: 0.2rem; }
.own-val { display: block; font-size: 0.9rem; font-weight: 600; color: var(--navy); }

/* ── Flight list ──────────────────────────────────────────────────────── */
.flight-item { padding: 0.75rem 0; border-bottom: 1px solid var(--border); }
.flight-item:last-child { border-bottom: none; }
.flight-route { display: flex; align-items: center; gap: 0.6rem; margin-bottom: 0.3rem; }
.flight-route strong { font-size: 0.88rem; }
.flight-meta { display: flex; gap: 1rem; font-size: 0.75rem; color: var(--light); flex-wrap: wrap; }

/* ── Invoice list ─────────────────────────────────────────────────────── */
.invoice-item { display: flex; justify-content: space-between; align-items: center;
    padding: 0.65rem 0; border-bottom: 1px solid var(--border); gap: 1rem; }
.invoice-item:last-child { border-bottom: none; }
.invoice-item strong { font-size: 0.88rem; display: block; }
.inv-date { font-size: 0.75rem; color: var(--light); }
.inv-amount { font-weight: 700; color: var(--navy); display: block; text-align: right; }

/* ── Status badges ────────────────────────────────────────────────────── */
.status-badge { display: inline-block; padding: 2px 8px; border-radius: 20px;
    font-size: 0.68rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.05em; }
.status-confirmed  { background: #DBEAFE; color: #1E40AF; }
.status-pending    { background: #FEF9C3; color: #92400E; }
.status-completed  { background: #D1FAE5; color: #065F46; }
.status-cancelled  { background: #FEE2E2; color: #991B1B; }
.status-paid       { background: #D1FAE5; color: #065F46; }
.status-void       { background: #F3F4F6; color: #6B7280; }

/* ── Data tables ──────────────────────────────────────────────────────── */
.data-table-wrap { background: var(--white); border-radius: var(--radius);
    border: 1px solid var(--border); overflow-x: auto; }
.data-table { width: 100%; border-collapse: collapse; font-size: 0.84rem; }
.data-table thead tr { background: var(--navy); }
.data-table thead th { padding: 0.7rem 1rem; text-align: left;
    font-size: 0.72rem; font-weight: 600; letter-spacing: 0.07em;
    text-transform: uppercase; color: rgba(255,255,255,0.6); white-space: nowrap; }
.data-table tbody tr { border-bottom: 1px solid var(--border); }
.data-table tbody tr:last-child { border-bottom: none; }
.data-table tbody tr:hover { background: #FAFAF8; }
.data-table tbody td { padding: 0.7rem 1rem; color: var(--mid); vertical-align: middle; }

/* ── Filter pills ─────────────────────────────────────────────────────── */
.filter-pills { display: flex; gap: 0.4rem; flex-wrap: wrap; }
.filter-pill { padding: 0.3rem 0.85rem; border-radius: 20px;
    border: 1px solid var(--border); background: var(--white);
    font-size: 0.75rem; font-weight: 500; color: var(--mid); cursor: pointer; transition: all 0.15s; }
.filter-pill:hover { border-color: var(--gold); color: var(--gold); }
.filter-pill.active { background: var(--navy); border-color: var(--navy); color: var(--white); }

/* ── Topbar clock ─────────────────────────────────────────────────────── */
.topbar-clock { position: absolute; left: 50%; transform: translateX(-50%);
    display: flex; flex-direction: column; align-items: center; gap: 1px;
    white-space: nowrap; }
.clock-label { font-size: 0.58rem; font-weight: 700; letter-spacing: 0.18em;
    text-transform: uppercase; color: var(--light); }
.clock-time-row { display: flex; align-items: center; gap: 0.4rem; }
.clock-time { font-size: 0.88rem; font-weight: 600; color: var(--mid); letter-spacing: 0.02em; }
.tz-select-btn { background: var(--navy); color: var(--gold); border: none;
    font-size: 0.7rem; font-weight: 700; letter-spacing: 0.08em;
    padding: 2px 7px; border-radius: 4px; cursor: pointer; transition: background .15s;
    display: flex; align-items: center; gap: 3px; }
.tz-select-btn:hover { background: #2A4060; }
.tz-select-btn svg { flex-shrink: 0; }
.tz-dropdown-wrap { position: relative; }
.tz-dropdown { position: absolute; top: calc(100% + 4px); left: 50%; transform: translateX(-50%);
    background: var(--white); border: 1px solid var(--border); border-radius: var(--radius);
    box-shadow: 0 8px 24px rgba(0,0,0,.12); z-index: 200; overflow: hidden; min-width: 180px; }
.tz-dropdown button { display: block; width: 100%; text-align: left;
    padding: 0.55rem 1rem; font-size: 0.82rem; color: var(--mid);
    background: none; border: none; cursor: pointer; border-bottom: 1px solid var(--border);
    transition: background .12s; }
.tz-dropdown button:last-child { border-bottom: none; }
.tz-dropdown button:hover { background: var(--border); color: var(--navy); }
.tz-dropdown button.tz-active { color: var(--navy); font-weight: 600; background: #F5F2EC; }

/* ── Timezone labels ──────────────────────────────────────────────────── */
.tz-label-row { display: flex; align-items: center; justify-content: space-between; margin-bottom: 0.35rem; }
.tz-label-row label { margin-bottom: 0 !important; }
.tz-badge { font-size: 0.68rem; font-weight: 700; letter-spacing: 0.08em;
    background: var(--navy); color: var(--gold); padding: 2px 7px;
    border-radius: 4px; text-transform: uppercase; }
.tz-note { font-size: 0.72rem; color: var(--light); margin-top: 0.3rem;
    font-style: italic; line-height: 1.4; }
.booking-window-note { font-size: 0.72rem; color: var(--light); margin-top: -0.5rem;
    margin-bottom: 0.75rem; font-style: italic; }

/* Flatpickr — match custom calendar style exactly */
.flatpickr-calendar { border: 1px solid var(--border) !important;
    border-radius: var(--radius) !important; box-shadow: 0 8px 24px rgba(0,0,0,.12) !important; }
.flatpickr-months .flatpickr-month { background: var(--navy) !important; color: white !important;
    border-radius: var(--radius) var(--radius) 0 0 !important; }
.flatpickr-current-month { color: white !important; }
.flatpickr-current-month .flatpickr-monthDropdown-months { color: white !important; background: var(--navy) !important; }
.flatpickr-weekday { color: rgba(201,160,90,0.9) !important; font-weight: 700 !important; font-size: 0.72rem !important; letter-spacing: .06em !important; }

/* Day cells — square rounded corners to match custom calendar */
.flatpickr-day { border-radius: 6px !important; border: none !important; position: relative; }
.flatpickr-day:hover:not(.selected):not(.fp-booked-dep):not(.fp-booked) { background: var(--border) !important; border-radius: 6px !important; }

/* Today — gold border matching custom calendar */
.flatpickr-day.today { border: 3px solid var(--gold) !important;
    box-shadow: 0 0 0 1px var(--gold) !important; font-weight: 700 !important;
    background: transparent !important; }
.flatpickr-day.today:hover { background: rgba(201,160,90,0.08) !important; }

/* Selected date — navy fill */
.flatpickr-day.selected, .flatpickr-day.selected:hover { background: var(--navy) !important;
    border: none !important; border-radius: 6px !important; color: white !important; font-weight: 700 !important; }

/* Booked span days — match .cal-day--span */
.flatpickr-day.fp-booked { background: rgba(11,25,41,0.08) !important;
    color: var(--navy) !important; border-radius: 6px !important; }
.flatpickr-day.fp-booked:hover { background: rgba(11,25,41,0.15) !important; }

/* Departure / return days — match .cal-day--dep/.cal-day--ret (full navy fill) */
.flatpickr-day.fp-booked-dep { background: var(--navy) !important;
    color: white !important; font-weight: 700 !important; border-radius: 6px !important; }
.flatpickr-day.fp-booked-dep:hover { background: #2A4060 !important; }

/* Span days between departure and return */
.flatpickr-day.fp-span-day { background: rgba(11,25,41,0.08) !important;
    color: var(--navy) !important; border-radius: 0 !important; }
.flatpickr-day.fp-span-day:hover { background: rgba(11,25,41,0.15) !important; }

/* Departure date indicator shown in return picker */
.flatpickr-day.fp-dep-day { border: 2px solid var(--gold) !important;
    font-weight: 700 !important; color: var(--navy) !important; }
.flatpickr-day.fp-dep-day::before { content: 'DEP'; position: absolute; top: 1px; left: 50%;
    transform: translateX(-50%); font-size: 6px; font-weight: 700;
    color: var(--gold); letter-spacing: 0.04em; line-height: 1; }

.flatpickr-time input { font-size: 1rem !important; font-weight: 600 !important; color: var(--navy) !important; }

/* ── Book page two-column layout ──────────────────────────────────────── */
.book-section-layout { display: grid; grid-template-columns: minmax(0,1fr) minmax(0,420px); gap: 2rem; align-items: start; }
.book-section-layout .book-card { max-width: 100%; }
@media (max-width: 1100px) { .book-section-layout { grid-template-columns: 1fr; } }

/* ── Flight Calendar ──────────────────────────────────────────────────── */
.flight-calendar { background: var(--white); border-radius: var(--radius); border: 1px solid var(--border); padding: 1.25rem; position: sticky; top: 80px; }

.cal-header { display: flex; align-items: center; gap: 0.5rem; margin-bottom: 1rem; }
.cal-nav-btn { background: none; border: 1px solid var(--border); border-radius: 6px;
    width: 30px; height: 30px; font-size: 1.1rem; cursor: pointer; color: var(--mid);
    display: flex; align-items: center; justify-content: center; flex-shrink: 0; transition: all .15s; }
.cal-nav-btn:hover { border-color: var(--navy); color: var(--navy); }
.cal-title-group { flex: 1; display: flex; justify-content: center; }
.cal-title-btn { background: none; border: none; cursor: pointer; display: flex; align-items: center;
    gap: 0.3rem; font-size: 0.95rem; font-weight: 600; color: var(--navy); padding: 0.2rem 0.5rem;
    border-radius: 6px; transition: background .15s; }
.cal-title-btn:hover { background: var(--border); }
.cal-view-toggle { display: flex; background: var(--border); border-radius: 6px; padding: 2px; }
.cal-view-btn { background: none; border: none; padding: 0.25rem 0.6rem; font-size: 0.75rem;
    font-weight: 500; color: var(--mid); border-radius: 4px; cursor: pointer; transition: all .15s; }
.cal-view-btn.active { background: var(--white); color: var(--navy); font-weight: 600; box-shadow: 0 1px 3px rgba(0,0,0,.1); }

/* Month grid */
.cal-grid { width: 100%; }
.cal-weekdays { display: grid; grid-template-columns: repeat(7,1fr); margin-bottom: 2px; }
.cal-wd { text-align: center; font-size: 0.65rem; font-weight: 700; letter-spacing: .08em;
    text-transform: uppercase; color: var(--light); padding: 0.2rem 0; }
.cal-days { display: grid; grid-template-columns: repeat(7,1fr); gap: 2px; }
.cal-day { position: relative; aspect-ratio: 1; display: flex; align-items: center;
    justify-content: center; border-radius: 6px; font-size: 0.8rem; color: var(--mid);
    cursor: default; transition: background .1s; }
.cal-day--other { color: var(--border); }
.cal-day--today { font-weight: 700; color: var(--navy); border: 3px solid var(--gold); box-shadow: 0 0 0 1px var(--gold); }
.cal-day--dep   { background: var(--navy); color: var(--white) !important; font-weight: 700; cursor: pointer; }
.cal-day--span  { background: rgba(11,25,41,.08); color: var(--navy); cursor: pointer; }
.cal-day--ret   { background: var(--navy); color: var(--white) !important; font-weight: 700; cursor: pointer; }
.cal-day--booked { cursor: pointer; }
.cal-day--dep:hover, .cal-day--ret:hover { background: #2A4060; }
.cal-day--span:hover { background: rgba(11,25,41,.15); }
.cal-day--downtime { background: repeating-linear-gradient(45deg,rgba(192,57,43,.07) 0px,rgba(192,57,43,.07) 3px,transparent 3px,transparent 8px); color: #c0392b; }
/* Other owner bookings — muted steel blue */
.cal-day--dep-other  { background: #4A6FA5; color: var(--white) !important; font-weight: 700; cursor: pointer; }
.cal-day--ret-other  { background: #4A6FA5; color: var(--white) !important; font-weight: 700; cursor: pointer; }
.cal-day--span-other { background: rgba(74,111,165,.18); color: #2A4A7A; cursor: pointer; }
.cal-day--dep-other:hover, .cal-day--ret-other:hover { background: #3A5A90; }
.cal-day--span-other:hover { background: rgba(74,111,165,.28); }

/* Year grid */
.cal-year-grid { display: grid; grid-template-columns: repeat(3,1fr); gap: 1rem; }
@media (max-width: 900px) { .cal-year-grid { grid-template-columns: repeat(2,1fr); } }
.cal-mini-month { }
.cal-mini-title { font-size: 0.72rem; font-weight: 700; color: var(--navy); text-align: center; margin-bottom: 4px; letter-spacing:.04em; }
.cal-mini-days { display: grid; grid-template-columns: repeat(7,1fr); gap: 1px; }
.cal-mini-day { aspect-ratio: 1; border-radius: 3px; font-size: 0.55rem; display: flex;
    align-items: center; justify-content: center; color: var(--light); }
.cal-mini-day--dep,.cal-mini-day--ret { background: var(--navy); color: var(--white); border-radius: 3px; }
.cal-mini-day--span { background: rgba(11,25,41,.12); color: var(--navy); }
.cal-mini-day--today { font-weight: 700; color: var(--navy); }
.cal-mini-day--other { color: var(--border); }
.cal-mini-day--booked { cursor: pointer; }

/* Tooltip */
.cal-tooltip { position: fixed; z-index: 1000; background: var(--navy); color: var(--white);
    border-radius: var(--radius); padding: 0.75rem 1rem; font-size: 0.78rem; line-height: 1.5;
    pointer-events: none; box-shadow: 0 8px 24px rgba(0,0,0,.25); max-width: 240px;
    border: 1px solid rgba(201,160,90,.3); }
.cal-tooltip-route { font-weight: 700; font-size: 0.85rem; color: var(--gold); margin-bottom: 0.35rem; }
.cal-tooltip-row { display: flex; gap: 0.4rem; color: rgba(255,255,255,.7); }
.cal-tooltip-row strong { color: var(--white); }

/* Legend */
.cal-legend { display: flex; gap: 1rem; margin-top: 0.85rem; padding-top: 0.75rem; border-top: 1px solid var(--border); }
.cal-legend-item { display: flex; align-items: center; gap: 0.3rem; font-size: 0.7rem; color: var(--light); }
.cal-dot { width: 10px; height: 10px; border-radius: 3px; flex-shrink: 0; }
.cal-dot--dep  { background: var(--navy); }
.cal-dot--span { background: rgba(11,25,41,.15); border: 1px solid rgba(11,25,41,.2); }
.cal-dot--today { background: transparent; border: 2px solid var(--gold); border-radius: 3px; }

/* Conflict warning */
.date-conflict-warning { background: #FFFBEB; border: 1px solid #FCD34D; border-radius: var(--radius);
    padding: 0.6rem 0.85rem; margin-top: 0.5rem; font-size: 0.8rem; color: #92400E; }

/* ── Book form ────────────────────────────────────────────────────────── */
.book-card { background: var(--white); border-radius: var(--radius);
    border: 1px solid var(--border); padding: 2rem; max-width: 720px; }
.book-card h2 { font-family: 'Playfair Display', serif; font-size: 1.4rem;
    color: var(--navy); margin-bottom: 0.35rem; }
.repo-warning { background: #FFFBEB; border: 1px solid #FCD34D; border-radius: var(--radius);
    padding: 0.75rem 1rem; margin-bottom: 1rem; font-size: 0.85rem; color: var(--warn); }
.repo-warning strong { display: block; margin-bottom: 0.2rem; }
.book-cost-preview { background: var(--cream); border-radius: var(--radius);
    padding: 1rem 1.25rem; margin-bottom: 1rem; }
.cost-row { display: flex; justify-content: space-between;
    font-size: 0.85rem; color: var(--mid); padding: 0.25rem 0; }
.cost-row--total { font-weight: 700; color: var(--navy);
    border-top: 1px solid var(--border); padding-top: 0.5rem; margin-top: 0.25rem; }
.cost-note { font-size: 0.72rem; color: var(--light); margin-top: 0.5rem; }

/* ── Admin specific ───────────────────────────────────────────────────── */
.tier-summary { }
.tier-row { display: flex; align-items: center; gap: 0.75rem;
    padding: 0.6rem 0; border-bottom: 1px solid var(--border); }
.tier-row:last-child { border-bottom: none; }
.tier-count { font-size: 0.84rem; color: var(--navy); font-weight: 600; flex: 1; }
.tier-mmf { font-size: 0.78rem; color: var(--light); }

/* ── Ownership Banner ─────────────────────────────────────────────────── */
.ownership-banner {
    margin: -2rem -2rem 2rem;
    padding: 2.5rem 2.5rem 2rem;
    background: var(--navy);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 2rem;
    flex-wrap: wrap;
}
.ownership-banner-eyebrow {
    font-size: 0.7rem;
    font-weight: 600;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--gold);
    margin-bottom: 0.4rem;
}
.ownership-banner-tier {
    font-family: 'Playfair Display', serif;
    font-size: 2.8rem;
    font-weight: 700;
    color: var(--white);
    margin: 0 0 0.4rem;
    line-height: 1;
}
.ownership-banner-share {
    font-size: 0.85rem;
    color: rgba(255,255,255,0.45);
    letter-spacing: 0.04em;
}

.ownership-banner-stats {
    display: flex;
    align-items: center;
    gap: 0;
    flex-wrap: wrap;
}
.ob-stat {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    padding: 0 2rem;
    text-align: right;
}
.ob-stat:first-child { padding-left: 0; }
.ob-stat-label {
    font-size: 0.65rem;
    font-weight: 600;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: rgba(255,255,255,0.35);
    margin-bottom: 0.3rem;
}
.ob-stat-val {
    font-size: 1.05rem;
    font-weight: 500;
    color: var(--white);
}
.ob-divider {
    width: 1px;
    height: 2.5rem;
    background: rgba(255,255,255,0.1);
    flex-shrink: 0;
}

@media (max-width: 900px) {
    .ownership-banner { flex-direction: column; align-items: flex-start; }
    .ownership-banner-stats { width: 100%; justify-content: flex-start; }
    .ob-stat { align-items: flex-start; text-align: left; padding: 0 1.25rem; }
}

/* ── Empty state ──────────────────────────────────────────────────────── */
.empty-state { padding: 2rem; text-align: center; color: var(--light);
    font-size: 0.85rem; font-style: italic; }

/* ── 5-column stat grid ───────────────────────────────────────────────── */
.stat-grid--5 { grid-template-columns: repeat(5, 1fr); }
@media (max-width: 1100px) { .stat-grid--5 { grid-template-columns: repeat(3,1fr); } }
@media (max-width: 700px)  { .stat-grid--5 { grid-template-columns: 1fr 1fr; } }
.stat-card--green { border-left: 3px solid #2E7D52; }
.stat-card--green .stat-val { color: #2E7D52; }

/* ── Analytics ─────────────────────────────────────────────────────────── */
.analytics-range-btn {
    padding: .3rem .75rem;
    font-size: .8rem;
    font-weight: 600;
    border: 1px solid var(--border);
    border-radius: 6px;
    background: var(--white);
    color: var(--light);
    cursor: pointer;
    transition: all .15s;
}
.analytics-range-btn:hover { border-color: var(--navy); color: var(--navy); }
.analytics-range-btn.active { background: var(--navy); color: var(--white); border-color: var(--navy); }
.analytics-bar-row {
    display: flex;
    align-items: center;
    gap: .6rem;
    margin-bottom: .6rem;
    font-size: .82rem;
}
.analytics-bar-label { flex: 0 0 130px; color: var(--navy); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.analytics-bar-track { flex: 1; height: 6px; background: var(--border); border-radius: 3px; }
.analytics-bar-fill  { height: 100%; background: var(--navy); border-radius: 3px; transition: width .4s; }
.analytics-bar-val   { flex: 0 0 40px; text-align: right; color: var(--light); }

/* ── Clickable flight items ───────────────────────────────────────────── */
.flight-item--clickable { cursor: pointer; position: relative;
    transition: background 0.15s; border-radius: var(--radius); padding: 0.75rem 0.5rem; margin: 0 -0.5rem; }
.flight-item--clickable:hover { background: #F5F2EC; }
.flight-chevron { position: absolute; right: 0.5rem; top: 50%;
    transform: translateY(-50%); font-size: 1.2rem; color: var(--gold); }
.flight-cost-preview { font-size: 0.78rem; }
.flight-row:hover td { background: #FAFAF8; }

/* ── Free hours card ──────────────────────────────────────────────────── */
.free-hours-card { background: rgba(46,125,82,0.06); border: 1px solid rgba(46,125,82,0.25);
    border-radius: var(--radius); padding: 1rem 1.1rem; margin-bottom: 1rem; }
.free-card-top { display: flex; align-items: flex-start; gap: 0.75rem; margin-bottom: 0.85rem; }
.free-card-icon { font-size: 1rem; color: #2E7D52; margin-top: 2px; flex-shrink: 0; }
.free-card-top div strong { display: block; font-size: 0.88rem; color: #2E7D52; margin-bottom: 0.2rem; }
.free-card-top div span { font-size: 0.8rem; color: var(--mid); }
.free-card-actions { display: flex; gap: 0.5rem; }
.btn-apply-free { padding: 0.4rem 1rem; background: #2E7D52; color: white;
    border: none; border-radius: var(--radius); font-size: 0.8rem; font-weight: 600; cursor: pointer;
    transition: background 0.15s; }
.btn-apply-free:hover { background: #1F5C3A; }
.btn-save-free { padding: 0.4rem 0.85rem; background: transparent; color: var(--mid);
    border: 1px solid var(--border); border-radius: var(--radius); font-size: 0.8rem;
    cursor: pointer; transition: all 0.15s; }
.btn-save-free:hover { border-color: var(--mid); }
.free-card-applied { display: flex; align-items: center; gap: 0.6rem;
    font-size: 0.85rem; color: #2E7D52; font-weight: 500; }
.free-card-applied .free-card-icon { margin: 0; }
.btn-undo-free { margin-left: auto; padding: 0.3rem 0.75rem; background: transparent;
    color: var(--light); border: 1px solid var(--border); border-radius: 6px;
    font-size: 0.75rem; cursor: pointer; }
.btn-undo-free:hover { color: var(--mid); }
.auto-est-tag { display: inline-block; font-size: 0.65rem; font-weight: 600;
    letter-spacing: 0.06em; color: #2E7D52; background: rgba(46,125,82,0.1);
    padding: 1px 6px; border-radius: 20px; margin-left: 0.4rem; text-transform: uppercase; vertical-align: middle; }

/* ── Destination autocomplete ─────────────────────────────────────────── */
.dest-outer-wrap { display: flex; gap: 0.5rem; align-items: flex-start; }
.dest-field-area { flex: 1; position: relative; min-width: 0; }
.dest-field-area input { width: 100%; }
.dest-outer-wrap .map-btn { flex-shrink: 0; margin-top: 0; height: 38px; }
/* Keep chip same height as input so layout doesn't shift */
.dest-chip { min-height: 38px; }
/* Legacy — keep for edit modal */
.dest-input-wrap { display: flex; gap: 0.5rem; align-items: center; }
.dest-input-wrap input { flex: 1; }
.map-btn { display: flex; align-items: center; gap: 0.35rem; padding: 0.6rem 0.85rem;
    background: var(--navy); color: white; border: none; border-radius: var(--radius);
    font-size: 0.78rem; font-weight: 600; cursor: pointer; white-space: nowrap;
    transition: background 0.15s; flex-shrink: 0; }
.map-btn:hover { background: var(--navy3); }

.dest-dropdown { position: absolute; top: 100%; left: 0; right: 0; background: white;
    border: 1px solid var(--border); border-radius: var(--radius); box-shadow: 0 8px 24px rgba(0,0,0,0.12);
    z-index: 200; display: none; max-height: 280px; overflow-y: auto; }
.dest-option { padding: 0.65rem 1rem; cursor: pointer; border-bottom: 1px solid var(--border); }
.dest-option:last-child { border-bottom: none; }
.dest-option:hover { background: #F5F2EC; }
.dest-opt-main { display: flex; align-items: baseline; gap: 0.6rem; margin-bottom: 0.15rem; }
.dest-opt-code { font-weight: 700; color: var(--navy); font-size: 0.9rem; min-width: 52px; }
.dest-opt-name { font-size: 0.85rem; color: var(--mid); }
.dest-opt-sub { display: flex; justify-content: space-between; font-size: 0.75rem; color: var(--light); }
.dest-opt-time { color: var(--gold); font-weight: 600; }

.dest-chip { display: flex; align-items: center; gap: 0.6rem;
    padding: 0.55rem 0.85rem; min-height: 38px;
    background: var(--white); border: 1px solid var(--border); border-radius: var(--radius);
    font-size: 0.9rem; }
.chip-code { font-weight: 700; color: var(--navy); font-size: 0.92rem; flex-shrink: 0; }
.chip-city { color: var(--mid); flex: 1; font-size: 0.88rem; }
.chip-clear { margin-left: auto; background: none; border: none; color: var(--light);
    cursor: pointer; font-size: 0.9rem; padding: 0 0.2rem; line-height: 1; }
.chip-clear:hover { color: var(--danger); }

/* ── Map modal ────────────────────────────────────────────────────────── */
.map-modal-panel { width: 800px; max-width: 96vw; height: 90vh; background: white;
    border-radius: var(--radius); overflow: hidden; display: flex; flex-direction: column;
    box-shadow: 0 24px 64px rgba(0,0,0,0.25); }
.map-modal-body { flex: 1; display: flex; flex-direction: column; }
.map-search-bar { padding: 0.75rem 1rem; background: white;
    border-bottom: 1px solid var(--border); }
.map-search-bar input { width: 100%; padding: 0.5rem 0.85rem;
    border: 1px solid var(--border); border-radius: var(--radius); font-size: 0.9rem; outline: none; }
.map-search-bar input:focus { border-color: var(--gold); }
/* Map search results render as inline list (avoids overflow:hidden clipping) */
#mapSearchResults { display: none; background: white;
    border-bottom: 1px solid var(--border); max-height: 220px; overflow-y: auto; }
#mapSearchResults .dest-option { border-bottom: 1px solid var(--border); cursor: pointer; padding: 0.6rem 1rem; }
#mapSearchResults .dest-option:last-child { border-bottom: none; }
#mapSearchResults .dest-option:hover { background: #F5F2EC; }
#leafletMap { flex: 1; min-height: 200px; overflow: hidden; }
.map-selected-info { display: flex; align-items: center; justify-content: space-between;
    padding: 0.75rem 1rem; background: white; border-top: 1px solid var(--border); gap: 1rem; }
.map-selected-info div { font-size: 0.88rem; color: var(--navy); }

/* ── Modal ────────────────────────────────────────────────────────────── */
.modal-overlay { position: fixed; inset: 0; background: rgba(11,25,41,0.55);
    z-index: 500; display: none; align-items: flex-start; justify-content: flex-end; }
.modal-overlay.open { display: flex; }

/* Map modal — centered, not right-anchored */
#mapModalOverlay { justify-content: center; align-items: center; }
#mapModalOverlay.open { display: flex; }
.modal-panel { width: 480px; max-width: 100%; height: 100vh; background: var(--white);
    overflow-y: auto; box-shadow: -8px 0 32px rgba(0,0,0,0.18);
    display: flex; flex-direction: column; animation: slideIn 0.22s ease; }
@keyframes slideIn { from { transform: translateX(40px); opacity: 0; } to { transform: translateX(0); opacity: 1; } }

.modal-header { display: flex; justify-content: space-between; align-items: center;
    padding: 1.25rem 1.5rem; border-bottom: 1px solid var(--border);
    position: sticky; top: 0; background: var(--white); z-index: 10; }
.modal-header h2 { font-family: 'Playfair Display', serif; font-size: 1.2rem; color: var(--navy); }
.modal-close { background: none; border: none; font-size: 1.1rem; cursor: pointer;
    color: var(--light); width: 28px; height: 28px; border-radius: 50%;
    display: flex; align-items: center; justify-content: center; transition: all 0.15s; }
.modal-close:hover { background: var(--border); color: var(--navy); }

.modal-body { flex: 1; padding: 0 1.5rem; }
.modal-section { padding: 1.25rem 0; border-bottom: 1px solid var(--border); }
.modal-section:last-child { border-bottom: none; }
.modal-status-row { display: flex; align-items: center; gap: 0.75rem; }
.btn-edit-booking { padding: 0.5rem 2rem; background: transparent;
    border: 1.5px solid var(--navy); border-radius: var(--radius);
    font-size: 0.75rem; font-weight: 700; letter-spacing: 0.1em;
    text-transform: uppercase; color: var(--navy); cursor: pointer;
    transition: all 0.15s; }
.btn-edit-booking:hover { background: var(--navy); color: var(--white); }
.modal-booking-id { font-size: 0.75rem; color: var(--light); font-family: monospace; }
.modal-section-title { font-size: 0.78rem; font-weight: 700; letter-spacing: 0.08em;
    text-transform: uppercase; color: var(--light); margin-bottom: 0.85rem; }
.modal-details-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.modal-detail { }
.modal-detail--full { grid-column: 1 / -1; }
.modal-detail-label { display: block; font-size: 0.68rem; font-weight: 600;
    letter-spacing: 0.08em; text-transform: uppercase; color: var(--light); margin-bottom: 0.2rem; }
.modal-detail-val { font-size: 0.92rem; font-weight: 500; color: var(--navy); }

/* Cost breakdown in modal */
.cost-breakdown { }
.cost-line { display: flex; justify-content: space-between; align-items: center;
    font-size: 0.86rem; color: var(--mid); padding: 0.35rem 0;
    border-bottom: 1px solid rgba(0,0,0,0.04); }
.cost-line:last-of-type { border-bottom: none; }
.cost-line--credit { color: #2E7D52; font-weight: 500; }
.cost-line--total { font-size: 0.95rem; font-weight: 700; color: var(--navy);
    border-top: 1px solid var(--border); padding-top: 0.5rem; margin-top: 0.25rem; }
.cost-line--total span:last-child { color: var(--gold); font-size: 1rem; }
.cost-line-note { font-size: 0.72rem; color: var(--light); margin-top: 0.5rem; font-style: italic; }

.modal-edit-form .btn-primary-sm { margin-top: 0.5rem; }
.modal-action-row { display: flex; gap: 0.75rem; align-items: center;
    border-top: 1px solid var(--border) !important; }
.btn-cancel-flight { background: none; border: 1px solid var(--danger); color: var(--danger);
    padding: 0.5rem 1.25rem; border-radius: var(--radius); font-size: 0.78rem;
    font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase;
    cursor: pointer; transition: all 0.15s; margin-left: auto; }
.btn-cancel-flight:hover { background: #FEF2F2; }

/* ── Pilot Schedule ───────────────────────────────────────────────────────── */
.sched-mode-btn { padding:.3rem .6rem;border:none;border-radius:6px;font-size:.75rem;font-weight:600;cursor:pointer;background:transparent;color:var(--text-mid);display:flex;align-items:center;gap:3px; }
.sched-mode-btn.active { background:var(--white);color:var(--navy);box-shadow:0 1px 3px rgba(0,0,0,.1); }
.sched-brush-btn { padding:.3rem .7rem;border:none;border-radius:6px;font-size:.75rem;font-weight:700;cursor:pointer;background:transparent;color:var(--text-mid); }
.sched-brush-btn.active { color:white; }
#brushWorking.active { background:#2E7D52; }
#brushOff.active { background:#888; }

/* Day-mode grid */
.sched-grid { display:grid;grid-template-columns:repeat(7,1fr);gap:3px; }
.sched-weekday { text-align:center;font-size:.7rem;font-weight:700;color:var(--text-light);text-transform:uppercase;padding:.3rem 0; }
.sched-day { position:relative;border-radius:8px;min-height:64px;cursor:pointer;padding:4px 5px;font-size:.75rem;font-weight:600;color:var(--text-light);background:var(--cream);border:2px solid transparent;transition:border-color .1s;overflow:hidden; }
.sched-day:hover { border-color:var(--gold); }
.sched-day.today { border-color:var(--gold) !important; }
.sched-day.other-month { opacity:.35; }
.sched-day.painting { border-color:var(--gold);opacity:.75; }
.sched-day-num { font-size:.8rem;font-weight:700;color:var(--navy); }
.sched-block { font-size:.65rem;font-weight:700;border-radius:3px;padding:1px 4px;margin-top:2px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis; }
.sched-block-working { background:#2E7D5222;color:#2E7D52; }
.sched-block-off     { background:#88888822;color:#666; }

/* Hour-mode grid */
.sched-hour-grid { display:grid;grid-template-columns:40px repeat(24,1fr);gap:1px;font-size:.68rem; }
.sched-hour-label { text-align:right;padding-right:4px;color:var(--text-light);line-height:24px; }
.sched-hour-cell { height:24px;border-radius:2px;cursor:pointer;background:var(--cream); }
.sched-hour-cell.working { background:#2E7D52; }
.sched-hour-cell.off { background:#ddd; }
.sched-hour-cell:hover { opacity:.7; }

/* ── Aircraft page tabs ──────────────────────────────────────────────────── */
.aircraft-tab { display:flex;align-items:center;gap:.4rem;padding:.75rem 1.25rem;background:none;border:none;border-bottom:3px solid transparent;font-size:.85rem;font-weight:600;color:var(--text-light);cursor:pointer;white-space:nowrap;transition:all .15s; }
.aircraft-tab:hover { color:var(--navy); }
.aircraft-tab.active { color:var(--navy);border-bottom-color:var(--gold); }

/* ── Users split-pane ───────────────────────────────────────────────────── */
.users-split { display:flex;gap:0;border-radius:var(--radius);overflow:hidden;border:1px solid var(--border);background:var(--white); }
.users-sidebar { width:230px;min-width:230px;border-right:1px solid var(--border);overflow-y:auto;max-height:calc(100vh - 200px); }
.usr-back-btn { padding:.65rem 1rem;font-size:.75rem;font-weight:700;color:var(--navy);cursor:pointer;border-bottom:1px solid var(--border);letter-spacing:.02em;display:flex;align-items:center;gap:.3rem;transition:background .12s; }
.usr-back-btn:hover { background:var(--cream); }
.usr-sidebar-item { display:flex;align-items:center;gap:.6rem;padding:.65rem .9rem;cursor:pointer;border-bottom:1px solid var(--border);transition:background .12s; }
.usr-sidebar-item:last-child { border-bottom:none; }
.usr-sidebar-item:hover { background:var(--cream); }
.usr-sidebar-item.active { background:var(--navy); }
.usr-sidebar-item.active .usr-sname { color:var(--white); }
.usr-sidebar-item.active .usr-srole { color:rgba(255,255,255,.55); }
.usr-avatar { width:32px;height:32px;border-radius:50%;background:var(--gold);color:var(--navy);font-weight:700;font-size:.78rem;display:flex;align-items:center;justify-content:center;flex-shrink:0; }
.usr-avatar.admin-av { background:var(--navy);color:var(--gold); }
.usr-sname { font-weight:600;font-size:.83rem;color:var(--navy);line-height:1.2; }
.usr-srole { font-size:.7rem;color:var(--text-light);margin-top:1px; }
.users-profile { flex:1;display:flex;flex-direction:column;min-width:0; }

/* Profile header */
.profile-hdr { padding:1.1rem 1.4rem;border-bottom:1px solid var(--border);display:flex;align-items:flex-start;gap:.9rem; }
.profile-avatar-lg { width:48px;height:48px;border-radius:50%;background:var(--gold);color:var(--navy);font-weight:700;font-size:1rem;display:flex;align-items:center;justify-content:center;flex-shrink:0;margin-top:2px; }
.profile-avatar-lg.admin-av { background:var(--navy);color:var(--gold); }
.profile-bio { flex:1;min-width:0; }
.bio-name { font-size:1rem;font-weight:700;color:var(--navy);border:none;background:transparent;padding:2px 5px;border-radius:5px;width:100%;font-family:inherit;display:block;margin-bottom:2px; }
.bio-name:hover { background:var(--cream); }
.bio-name:focus { outline:none;border:1.5px solid var(--gold);background:var(--cream); }
.bio-meta-row { font-size:.76rem;color:var(--text-light);padding:0 5px;margin-bottom:4px;display:flex;align-items:center;gap:0;flex-wrap:wrap; }
.bio-contact-row { display:flex;align-items:center;flex-wrap:wrap;gap:0; }
.bio-sep { color:var(--border);padding:0 5px;font-size:.8rem;flex-shrink:0; }
.bio-field-sm { font-size:.76rem;color:var(--text-light);border:none;background:transparent;padding:2px 4px;border-radius:4px;min-width:30px;max-width:200px;font-family:inherit; }
.bio-field-sm:hover { background:var(--cream); }
.bio-field-sm:focus { outline:none;border:1px solid var(--border);background:var(--cream);color:var(--navy); }

/* Top-right: home airport block */
.profile-hdr-right { display:flex;flex-direction:column;align-items:flex-end;gap:.4rem;flex-shrink:0; }
.bio-home-airport { display:flex;flex-direction:column;align-items:flex-end;gap:.3rem; }
.bio-home-label { font-size:.65rem;font-weight:700;text-transform:uppercase;letter-spacing:.08em;color:var(--text-light); }
.bio-airport-select { font-size:.82rem;font-weight:700;color:var(--navy);border:1.5px solid var(--border);border-radius:8px;padding:4px 10px;background:var(--cream);cursor:pointer;appearance:none;-webkit-appearance:none;text-align:center; }
.bio-airport-select:focus { outline:none;border-color:var(--gold); }

/* Tabs bar */
.profile-tabs-bar { display:flex;align-items:center;border-bottom:1px solid var(--border); }
.profile-tabs { display:flex;flex:1;padding:0 1.25rem;overflow-x:auto;gap:0; }
.profile-tab { padding:.55rem .9rem;font-size:.8rem;font-weight:600;color:var(--text-light);cursor:pointer;border-bottom:2px solid transparent;white-space:nowrap;transition:.15s;background:none;border-top:none;border-left:none;border-right:none; }
.profile-tab:hover { color:var(--navy); }
.profile-tab.active { color:var(--navy);border-bottom-color:var(--gold); }

/* Delete user — inline with Save Changes row */
.bio-delete-wrap { }
.bio-delete-btn { font-size:.72rem;font-weight:600;color:#c0392b;background:none;border:1px solid #c0392b33;border-radius:6px;padding:4px 12px;cursor:pointer;white-space:nowrap;transition:.15s; }
.bio-delete-btn:hover { background:#FFF0EE;border-color:#c0392b; }
.bio-delete-confirm { display:flex;gap:.5rem;align-items:center;font-size:.75rem;color:#c0392b;font-weight:600; }

/* Profile body */
.profile-body { padding:1.25rem 1.5rem;overflow-y:auto;max-height:calc(100vh - 295px); }
.profile-field-grid { display:grid;grid-template-columns:1fr 1fr;gap:.75rem 1.25rem;margin-bottom:1rem; }
@media(max-width:640px){ .profile-field-grid { grid-template-columns:1fr; } }
.field-label { font-size:.72rem;font-weight:700;text-transform:uppercase;letter-spacing:.05em;color:var(--text-light);display:block;margin-bottom:.3rem; }

/* Messaging */
.msg-thread { display:flex;flex-direction:column;gap:.55rem;max-height:320px;overflow-y:auto;padding:.5rem;margin-bottom:.75rem;background:var(--cream);border-radius:10px; }
.msg-bubble { max-width:76%;padding:.55rem .85rem;border-radius:12px;font-size:.84rem;line-height:1.45; }
.msg-bubble.from-admin { align-self:flex-end;background:var(--navy);color:var(--white);border-radius:12px 12px 2px 12px; }
.msg-bubble.from-owner { align-self:flex-start;background:var(--white);color:var(--navy);border-radius:12px 12px 12px 2px;border:1px solid var(--border); }
.msg-meta { font-size:.68rem;opacity:.55;margin-top:.2rem;text-align:right; }
.msg-bubble.from-owner .msg-meta { text-align:left; }
.msg-input-row { display:flex;gap:.5rem; }
.msg-input-row textarea { flex:1;border:1px solid var(--border);border-radius:8px;padding:.55rem .75rem;font-size:.84rem;resize:none;font-family:inherit; }
.msg-input-row textarea:focus { outline:none;border-color:var(--navy); }

/* Owner-facing message center (dashboard.html) */
.owner-msg-thread { display:flex;flex-direction:column;gap:.75rem;max-height:420px;overflow-y:auto;padding:.75rem;margin-bottom:1rem;background:var(--cream);border-radius:12px;border:1px solid var(--border); }
.owner-msg-bubble { display:flex;flex-direction:column;gap:.2rem;max-width:80%; }
.owner-msg-bubble--admin { align-self:flex-start; }
.owner-msg-bubble--owner { align-self:flex-end; }
.owner-msg-meta { display:flex;gap:.6rem;align-items:baseline;font-size:.72rem;color:var(--text-light); }
.owner-msg-bubble--owner .owner-msg-meta { flex-direction:row-reverse; }
.owner-msg-name { font-weight:600;color:var(--navy); }
.owner-msg-time { }
.owner-msg-body { padding:.6rem .9rem;border-radius:12px;font-size:.88rem;line-height:1.5; }
.owner-msg-bubble--admin .owner-msg-body { background:var(--white);color:var(--navy);border:1px solid var(--border);border-radius:12px 12px 12px 2px; }
.owner-msg-bubble--owner .owner-msg-body { background:var(--navy);color:var(--white);border-radius:12px 12px 2px 12px; }
.owner-msg-compose { margin-top:.5rem; }
.owner-msg-compose textarea { width:100%;border:1px solid var(--border);border-radius:10px;padding:.65rem .85rem;font-size:.88rem;resize:vertical;font-family:inherit;box-sizing:border-box; }
.owner-msg-compose textarea:focus { outline:none;border-color:var(--navy); }

