/* =====================================================================
   JourneyDesk — Design System
   Brand: TN Navy #0A1F44 · Royal Blue #007BFF · Sky Blue #00C6FF
          Success Green #00D084 · Light Gray #E8F0FF · Charcoal #1F2937
   ===================================================================== */

:root {
    /* ---- Brand palette ---- */
    --navy: #0A1F44;
    --navy-soft: #142C57;
    --royal: #007BFF;
    --royal-dark: #0065CC;
    --sky: #00C6FF;
    --green: #00D084;
    --green-dark: #009E67;   /* indistinguishable-from-#00D084 family, text-safe contrast */
    --gray-light: #E8F0FF;
    --charcoal: #1F2937;

    /* ---- Semantic aliases (kept so every existing page keeps working) ---- */
    --primary: var(--navy);
    --accent: var(--royal);
    --success: var(--green-dark);
    --sidebar-bg: var(--navy);
    --sidebar-active: rgba(0, 123, 255, 0.18);
    --sidebar-text: #9FB0CC;
    --sidebar-text-active: #ffffff;
    --bg: #F5F7FC;
    --card-bg: #ffffff;
    --border: #E2E7F2;
    --border-soft: #EEF1F8;
    --text-main: var(--charcoal);
    --text-muted: #5B6478;
    --text-faint: #8A93A6;

    --teal: var(--green);
    --teal-dark: var(--green-dark);
    --blue: var(--royal);
    --purple: #6D5BD0;
    --orange: #F59E0B;
    --red: #E23C3C;
    --yellow: #B45309;
    --gray: var(--text-muted);

    /* ---- Spacing scale (4px base) ---- */
    --sp-1: 4px;
    --sp-2: 8px;
    --sp-3: 12px;
    --sp-4: 16px;
    --sp-5: 24px;
    --sp-6: 32px;
    --sp-7: 48px;
    --sp-8: 64px;

    /* ---- Radii & depth ---- */
    --radius-sm: 8px;
    --radius: 12px;
    --radius-lg: 16px;
    --shadow-sm: 0 1px 2px rgba(10, 31, 68, 0.05);
    --shadow: 0 1px 3px rgba(10, 31, 68, 0.07), 0 1px 2px rgba(10, 31, 68, 0.05);
    --shadow-md: 0 6px 20px rgba(10, 31, 68, 0.10);

    /* ---- Typography ---- */
    --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    --text-xs: 11px;
    --text-sm: 12.5px;
    --text-base: 13.5px;
    --text-md: 15px;
    --text-lg: 18px;
    --text-xl: 23px;
}

* { box-sizing: border-box; }

@media (prefers-reduced-motion: reduce) {
    * { animation: none !important; transition: none !important; }
}

body {
    margin: 0;
    font-family: var(--font-sans);
    background: var(--bg);
    color: var(--text-main);
    font-size: var(--text-base);
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
}

h1, h2, h3 { color: var(--navy); }
a { text-decoration: none; color: inherit; }

:focus-visible {
    outline: 2px solid var(--royal);
    outline-offset: 2px;
    border-radius: 4px;
}

.app-shell {
    display: flex;
    min-height: 100vh;
}

/* ---------- Sidebar ---------- */
.sidebar {
    width: 240px;
    background: var(--sidebar-bg);
    color: var(--sidebar-text);
    display: flex;
    flex-direction: column;
    flex-shrink: 0;
    position: sticky;
    top: 0;
    height: 100vh;
}

.sidebar-brand {
    display: flex;
    align-items: center;
    gap: 11px;
    padding: 22px 20px;
    border-bottom: 1px solid rgba(255,255,255,0.07);
}

.sidebar-brand .icon {
    width: 36px; height: 36px;
    background: linear-gradient(135deg, var(--royal) 0%, var(--sky) 100%);
    border-radius: 9px;
    display: flex; align-items: center; justify-content: center;
    color: white; font-weight: 700;
    font-size: 13px;
    letter-spacing: 0.02em;
    box-shadow: 0 2px 8px rgba(0, 123, 255, 0.35);
}

.sidebar-brand .name { font-weight: 700; color: white; font-size: 15px; letter-spacing: -0.01em; }
.sidebar-brand .sub { font-size: 11px; color: var(--sidebar-text); margin-top: 1px; }

.sidebar-nav { flex: 1; overflow-y: auto; padding: 16px 12px; }
.sidebar-section-label {
    font-size: 10.5px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.08em;
    color: #5E7096; margin: 20px 10px 8px;
}
.sidebar-section-label:first-child { margin-top: 4px; }

.sidebar-nav a {
    display: flex; align-items: center; gap: 11px;
    padding: 9px 12px; border-radius: var(--radius-sm); font-size: 13.5px; font-weight: 500;
    color: var(--sidebar-text); margin-bottom: 2px;
    position: relative;
    transition: background 0.15s ease, color 0.15s ease;
}
.sidebar-nav a:hover { background: rgba(255,255,255,0.06); color: white; }
.sidebar-nav a.active {
    background: var(--sidebar-active); color: white; font-weight: 600;
}
.sidebar-nav a.active::before {
    content: '';
    position: absolute; left: -12px; top: 20%; bottom: 20%;
    width: 3px; border-radius: 3px;
    background: var(--green);
}
.sidebar-nav a i { width: 17px; height: 17px; stroke-width: 2; flex-shrink: 0; opacity: 0.9; }

.nav-badge {
    margin-left: auto;
    background: var(--red);
    color: white;
    font-size: 10.5px;
    font-weight: 700;
    border-radius: 999px;
    padding: 1px 7px;
    line-height: 1.5;
}

.sidebar-footer {
    padding: 16px 18px; border-top: 1px solid rgba(255,255,255,0.07);
    display: flex; align-items: center; gap: 10px;
}
.sidebar-footer .avatar {
    width: 32px; height: 32px; border-radius: 50%;
    background: linear-gradient(135deg, var(--royal), var(--sky));
    color: white; display: flex; align-items: center; justify-content: center;
    font-weight: 600; font-size: 13px; flex-shrink: 0;
}
.sidebar-footer .name { color: white; font-size: 13px; font-weight: 600; }
.sidebar-footer .role { font-size: 11px; color: var(--sidebar-text); text-transform: capitalize; }
.sidebar-footer .logout {
    margin-left: auto; color: var(--sidebar-text); display: flex; align-items: center;
    padding: 6px; border-radius: 6px; transition: background 0.15s ease, color 0.15s ease;
}
.sidebar-footer .logout:hover { background: rgba(255,255,255,0.08); color: white; }
.sidebar-footer .logout i { width: 16px; height: 16px; }

/* ---------- Main content ---------- */
.main {
    flex: 1;
    padding: var(--sp-6) var(--sp-7) var(--sp-8);
    max-width: 1440px;
}

.page-header { margin-bottom: var(--sp-5); }
.page-header h1 { margin: 0 0 5px; font-size: var(--text-xl); font-weight: 750; letter-spacing: -0.015em; }
.page-header p { margin: 0; color: var(--text-muted); font-size: var(--text-base); }

.page-header-row {
    display: flex; align-items: flex-start; justify-content: space-between; margin-bottom: var(--sp-5); flex-wrap: wrap; gap: 12px;
}

.section-label {
    font-size: var(--text-xs); font-weight: 700; text-transform: uppercase; letter-spacing: 0.08em;
    color: var(--text-faint); margin: var(--sp-5) 0 var(--sp-3);
}
.section-label:first-of-type { margin-top: 0; }
.section-label .count { color: var(--royal-dark); }

/* ---------- Cards / grids ---------- */
.stat-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: var(--sp-4);
    margin-bottom: var(--sp-5);
}
.stat-grid.cols-3 { grid-template-columns: repeat(3, 1fr); }
@media (max-width: 1100px) { .stat-grid, .stat-grid.cols-3 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px)  { .stat-grid, .stat-grid.cols-3 { grid-template-columns: 1fr; } }

.card {
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
    padding: 22px;
}

.stat-card {
    display: flex; flex-direction: column; gap: 10px;
    color: inherit;
    transition: border-color 0.15s ease, box-shadow 0.15s ease, transform 0.1s ease;
}
a.stat-card:hover, a.stat-card:focus-visible {
    border-color: var(--royal);
    box-shadow: var(--shadow-md);
    transform: translateY(-1px);
}
.stat-card .top-row { display: flex; align-items: flex-start; justify-content: space-between; }
.stat-card .label { color: var(--text-muted); font-size: var(--text-sm); font-weight: 500; }
.stat-card .value { font-size: 26px; font-weight: 750; letter-spacing: -0.02em; line-height: 1.1; color: var(--navy); }
.stat-card .sub { font-size: var(--text-sm); color: var(--text-faint); }
.stat-card.is-alert { border-color: #FBD5D5; }
.stat-card.is-alert .value { color: var(--red); }
.stat-card.is-money .value { color: var(--green-dark); }
.stat-card.is-neutral .value { color: var(--navy); }

.stat-icon {
    width: 36px; height: 36px; border-radius: 10px;
    display: flex; align-items: center; justify-content: center; font-size: 15px;
    flex-shrink: 0;
}
.stat-icon i { width: 17px; height: 17px; stroke-width: 2.25; }
.bg-teal   { background: rgba(0, 208, 132, 0.14); color: var(--green-dark); }
.bg-blue   { background: rgba(0, 123, 255, 0.12); color: var(--royal-dark); }
.bg-purple { background: rgba(109, 91, 208, 0.12); color: #5646b8; }
.bg-orange { background: rgba(245, 158, 11, 0.15); color: #B45309; }
.bg-red    { background: rgba(226, 60, 60, 0.12); color: #C22B2B; }
.bg-navy   { background: rgba(10, 31, 68, 0.08); color: var(--navy); }

.two-col { display: grid; grid-template-columns: 2fr 1fr; gap: var(--sp-4); }
@media (max-width: 1000px) { .two-col { grid-template-columns: 1fr; } }

.card-header {
    display: flex; align-items: center; justify-content: space-between;
    margin-bottom: var(--sp-4);
}
.card-header h3 { margin: 0; font-size: var(--text-md); font-weight: 650; display: flex; align-items: center; gap: 8px; }
.card-header h3 i { width: 17px; height: 17px; stroke-width: 2.25; color: var(--text-muted); }
.card-header .view-all { color: var(--royal-dark); font-size: var(--text-sm); font-weight: 600; }
.card-header .view-all:hover { text-decoration: underline; }

/* ---------- Filter chips (reusable) ---------- */
.filter-bar {
    display: flex; gap: 8px; flex-wrap: wrap; align-items: center;
    margin-bottom: var(--sp-4);
}
.filter-chip {
    display: inline-flex; align-items: center; gap: 6px;
    padding: 6px 13px; border-radius: 999px;
    border: 1px solid var(--border);
    background: white; color: var(--text-muted);
    font-size: var(--text-sm); font-weight: 600;
    line-height: 1.2;
    transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}
.filter-chip:hover { border-color: var(--royal); color: var(--royal-dark); }
.filter-chip.is-active { background: var(--navy); border-color: var(--navy); color: white; }
.filter-chip .num {
    background: rgba(0,123,255,0.12); color: var(--royal-dark);
    border-radius: 999px; font-size: 10.5px; padding: 1px 7px; font-weight: 700;
}
.filter-chip.is-active .num { background: rgba(255,255,255,0.22); color: white; }

/* ---------- Tables ---------- */
table { width: 100%; border-collapse: collapse; }
th {
    text-align: left; font-size: var(--text-xs); font-weight: 600; text-transform: uppercase; letter-spacing: 0.05em;
    color: var(--text-faint); border-bottom: 1px solid var(--border); padding: 0 10px 10px;
}
td { padding: 13px 10px; border-bottom: 1px solid var(--border-soft); font-size: var(--text-base); vertical-align: middle; }
tr:last-child td { border-bottom: none; }
tbody tr { transition: background 0.12s ease; }
tbody tr:hover { background: #F8FAFE; }
.row-title { font-weight: 600; }
.row-sub { color: var(--text-faint); font-size: var(--text-sm); margin-top: 2px; display: flex; align-items: center; gap: 4px; }
.row-sub i { width: 12px; height: 12px; }

/* Stacked-card mode for phones: wrap tables that get a `responsive-table`
   class, give each td a data-label, and each row becomes a card below 720px. */
@media (max-width: 720px) {
    .responsive-table thead { display: none; }
    .responsive-table, .responsive-table tbody, .responsive-table tr, .responsive-table td {
        display: block; width: 100%;
    }
    .responsive-table tr {
        border: 1px solid var(--border);
        border-radius: var(--radius-sm);
        margin-bottom: 10px;
        padding: 4px 0;
        background: white;
    }
    .responsive-table tr:hover { background: white; }
    .responsive-table td {
        border-bottom: none;
        padding: 7px 14px;
        display: flex; align-items: center; justify-content: space-between; gap: 12px;
    }
    .responsive-table td[data-label]::before {
        content: attr(data-label);
        color: var(--text-faint);
        font-size: var(--text-xs);
        font-weight: 600;
        text-transform: uppercase;
        letter-spacing: 0.04em;
        flex-shrink: 0;
    }
}

/* ---------- Badges/pills ---------- */
.badge {
    display: inline-block; padding: 4px 11px; border-radius: 999px;
    font-size: var(--text-xs); font-weight: 600; white-space: nowrap; letter-spacing: 0.01em;
}
.badge-gray   { background: #F1F2F6; color: #4B5563; }
.badge-yellow { background: #FDF0D5; color: #96570A; }
.badge-blue   { background: rgba(0, 123, 255, 0.12); color: var(--royal-dark); }
.badge-purple { background: rgba(109, 91, 208, 0.12); color: #5646B8; }
.badge-teal   { background: rgba(0, 198, 255, 0.12); color: #006C8C; }
.badge-green  { background: rgba(0, 208, 132, 0.14); color: var(--green-dark); }
.badge-red    { background: rgba(226, 60, 60, 0.12); color: #B92525; }

/* ---------- Buttons ---------- */
.btn {
    display: inline-flex; align-items: center; gap: 7px;
    border: none; border-radius: var(--radius-sm); padding: 10px 16px;
    font-size: var(--text-base); font-weight: 600; cursor: pointer; font-family: inherit;
    line-height: 1.2;
    transition: background 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease, transform 0.05s ease;
}
.btn:active { transform: scale(0.98); }
.btn i { width: 15px; height: 15px; stroke-width: 2.25; }
.btn-primary {
    background: var(--navy); color: white;
    box-shadow: var(--shadow-sm);
}
.btn-primary:hover { background: var(--navy-soft); }
.btn-accent { background: var(--royal); color: white; }
.btn-accent:hover { background: var(--royal-dark); }
.btn-success { background: var(--green-dark); color: white; }
.btn-success:hover { background: #00804F; }
.btn-secondary { background: white; border: 1px solid var(--border); color: var(--text-main); }
.btn-secondary:hover { background: var(--bg); border-color: #CBD3E4; }
.btn-danger { background: rgba(226,60,60,0.1); color: #B92525; }
.btn-danger:hover { background: rgba(226,60,60,0.18); }
.btn-sm { padding: 6px 12px; font-size: var(--text-sm); }
.btn-sm i { width: 13px; height: 13px; }
.btn-lg { padding: 13px 22px; font-size: var(--text-md); }

/* ---------- Forms ---------- */
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: var(--sp-4) var(--sp-5); }
@media (max-width: 700px) { .form-grid { grid-template-columns: 1fr; } }
.form-group { display: flex; flex-direction: column; gap: 6px; margin-bottom: var(--sp-4); }
.form-group label { font-size: var(--text-sm); font-weight: 600; color: var(--text-main); }
.form-group input, .form-group select, .form-group textarea {
    padding: 10px 12px; border: 1px solid var(--border); border-radius: var(--radius-sm); font-size: var(--text-base);
    font-family: inherit; background: white; color: var(--text-main);
    width: 100%;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.form-group input:focus, .form-group select:focus, .form-group textarea:focus {
    outline: none; border-color: var(--royal);
    box-shadow: 0 0 0 3px rgba(0, 123, 255, 0.14);
}
.form-group input:disabled { background: var(--bg); color: var(--text-faint); }
.form-group textarea { resize: vertical; min-height: 76px; }
.field-hint { font-size: var(--text-xs); color: var(--text-faint); }

fieldset.form-section {
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: var(--sp-4) var(--sp-5);
    margin: 0 0 var(--sp-4);
    min-width: 0;
}
fieldset.form-section legend {
    font-size: var(--text-sm); font-weight: 700; color: var(--navy);
    padding: 0 8px; letter-spacing: 0.01em;
}

/* ---------- States: alerts, empty, loading, skeleton ---------- */
.alert { padding: 12px 15px; border-radius: var(--radius-sm); font-size: var(--text-base); margin-bottom: var(--sp-4); font-weight: 500; }
.alert-error   { background: #FDF1F1; color: #B92525; border: 1px solid #F8D4D4; }
.alert-success { background: rgba(0, 208, 132, 0.1); color: var(--green-dark); border: 1px solid rgba(0, 208, 132, 0.35); }
.alert-info    { background: var(--gray-light); color: var(--navy); border: 1px solid #D7E3FA; }
.alert-warn    { background: #FDF0D5; color: #96570A; border: 1px solid #F5DFB2; }

.empty-state { text-align: center; padding: 48px 20px; color: var(--text-faint); font-size: var(--text-base); }
.empty-state i { width: 28px; height: 28px; display: block; margin: 0 auto 10px; opacity: 0.6; }

.skeleton {
    border-radius: var(--radius-sm);
    background: linear-gradient(90deg, #EDF0F7 25%, #F6F8FC 50%, #EDF0F7 75%);
    background-size: 200% 100%;
    animation: skeleton-shimmer 1.4s ease infinite;
}
@keyframes skeleton-shimmer { from { background-position: 200% 0; } to { background-position: -200% 0; } }
.skeleton-line { height: 12px; margin: 10px 0; }
.skeleton-block { height: 90px; }
.loading-note {
    display: flex; align-items: center; gap: 10px;
    color: var(--text-faint); font-size: var(--text-sm); padding: var(--sp-4);
}
.loading-note .spinner {
    width: 16px; height: 16px; flex-shrink: 0;
    border: 2px solid rgba(0,123,255,0.25); border-top-color: var(--royal);
    border-radius: 50%; animation: spin 0.8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- Modal (calendar trip panel, quick actions) ---------- */
.modal-overlay {
    display: none;
    position: fixed; inset: 0;
    background: rgba(10, 31, 68, 0.55);
    z-index: 200;
    align-items: flex-start; justify-content: center;
    padding: 40px 16px;
    overflow-y: auto;
}
.modal-overlay.open { display: flex; }
.modal {
    background: white; border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    width: 100%; max-width: 460px;
    padding: 0;
    animation: modal-pop 0.18s ease;
}
@keyframes modal-pop { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
.modal-header {
    display: flex; align-items: center; justify-content: space-between; gap: 12px;
    padding: 16px 20px;
    border-bottom: 1px solid var(--border-soft);
}
.modal-header h3 { margin: 0; font-size: var(--text-md); font-weight: 700; }
.modal-close {
    background: none; border: none; cursor: pointer; color: var(--text-faint);
    display: flex; align-items: center; justify-content: center;
    padding: 6px; border-radius: 8px;
}
.modal-close:hover { background: var(--bg); color: var(--text-main); }
.modal-close i { width: 18px; height: 18px; }
.modal-body { padding: 20px; }
.modal-footer {
    display: flex; gap: 8px; flex-wrap: wrap;
    padding: 14px 20px; border-top: 1px solid var(--border-soft);
}
.detail-list { display: flex; flex-direction: column; gap: 0; }
.detail-list .detail-row {
    display: flex; justify-content: space-between; align-items: flex-start; gap: 14px;
    padding: 9px 0; border-bottom: 1px solid var(--border-soft);
    font-size: var(--text-base);
}
.detail-list .detail-row:last-child { border-bottom: none; }
.detail-list .detail-label { color: var(--text-faint); font-size: var(--text-sm); font-weight: 600; flex-shrink: 0; }
.detail-list .detail-value { text-align: right; font-weight: 500; }

/* ---------- Booking summary (live review panel) ---------- */
.summary-panel {
    background: linear-gradient(180deg, rgba(0, 198, 255, 0.05), rgba(0, 208, 132, 0.04)), white;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 20px;
}
.summary-panel .summary-title {
    display: flex; align-items: center; gap: 8px;
    font-size: var(--text-sm); font-weight: 700; color: var(--navy);
    text-transform: uppercase; letter-spacing: 0.06em;
    margin-bottom: 12px;
}
.summary-panel .summary-title i { width: 15px; height: 15px; color: var(--royal); }
.summary-row {
    display: flex; justify-content: space-between; gap: 14px; align-items: flex-start;
    padding: 8px 0; border-bottom: 1px solid var(--border-soft);
    font-size: var(--text-base);
}
.summary-row .k { color: var(--text-faint); font-size: var(--text-sm); font-weight: 500; flex-shrink: 0; }
.summary-row .v { text-align: right; font-weight: 600; color: var(--charcoal); overflow-wrap: anywhere; }
.summary-total {
    display: flex; justify-content: space-between; align-items: center;
    padding: 14px 0 4px; font-weight: 750; font-size: var(--text-md);
}
.summary-total .amount { color: var(--green-dark); font-size: var(--text-lg); }
.summary-empty { color: var(--text-faint); font-size: var(--text-sm); text-align: center; padding: 18px 0; }

/* ---------- Change-history timeline ---------- */
.timeline { display: flex; flex-direction: column; }
.timeline-item {
    position: relative;
    padding: 0 0 16px 22px;
    border-left: 2px solid var(--border-soft);
    margin-left: 6px;
}
.timeline-item:last-child { padding-bottom: 2px; }
.timeline-item::before {
    content: '';
    position: absolute; left: -6px; top: 3px;
    width: 10px; height: 10px; border-radius: 50%;
    background: var(--royal);
    box-shadow: 0 0 0 3px rgba(0, 123, 255, 0.15);
}
.timeline-item:first-child::before { background: var(--green); box-shadow: 0 0 0 3px rgba(0, 208, 132, 0.2); }
.timeline-item .when { color: var(--text-faint); font-size: var(--text-xs); margin-bottom: 2px; }
.timeline-item .who { font-weight: 600; font-size: var(--text-base); }
.timeline-item .change { color: var(--text-muted); font-size: var(--text-sm); margin-top: 2px; }

/* ---------- Conflict warning ---------- */
.conflict-banner {
    display: none;
    border: 1px solid #F5DFB2;
    background: #FDF0D5;
    color: #96570A;
    border-radius: var(--radius-sm);
    padding: 12px 15px;
    font-size: var(--text-base);
    margin-top: var(--sp-2);
}
.conflict-banner.visible { display: block; }
.conflict-banner strong { color: #7A4407; }

/* ---------- Login / invite pages ---------- */
.login-shell {
    min-height: 100vh; display: flex; align-items: center; justify-content: center;
    background:
        radial-gradient(circle at 80% 15%, rgba(0, 198, 255, 0.25) 0%, transparent 45%),
        radial-gradient(circle at 20% 85%, rgba(0, 208, 132, 0.18) 0%, transparent 40%),
        linear-gradient(160deg, var(--navy) 0%, #071634 100%);
    padding: 20px;
}
.login-card {
    background: white; border-radius: var(--radius-lg); padding: 40px 36px;
    width: 100%; max-width: 380px; box-shadow: var(--shadow-md);
}
.login-card .brand { text-align: center; margin-bottom: 26px; }
.login-card .brand .icon {
    width: 48px; height: 48px; border-radius: 12px;
    background: linear-gradient(135deg, var(--royal) 0%, var(--sky) 100%);
    color: white; display: flex; align-items: center; justify-content: center; font-weight: 750; font-size: 17px;
    margin: 0 auto 12px;
    box-shadow: 0 4px 14px rgba(0, 123, 255, 0.35);
}

/* ---------- Utilities ---------- */
.text-right { text-align: right; }
.mt-16 { margin-top: var(--sp-4); }
.mb-0 { margin-bottom: 0; }
.flex-between { display: flex; align-items: center; justify-content: space-between; gap: var(--sp-3); flex-wrap: wrap; }

/* ---------- Mobile topbar + off-canvas sidebar ---------- */
.mobile-topbar {
    display: none;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    background: var(--sidebar-bg);
    position: sticky;
    top: 0;
    z-index: 60;
}
.mobile-topbar .menu-btn {
    background: none; border: none; color: white; padding: 6px;
    display: flex; align-items: center; justify-content: center;
    border-radius: 8px;
}
.mobile-topbar .menu-btn:active { background: rgba(255,255,255,0.1); }
.mobile-topbar .menu-btn i { width: 22px; height: 22px; }
.mobile-topbar .brand-mini { color: white; font-weight: 700; font-size: 15px; }

.sidebar-overlay {
    display: none;
    position: fixed; inset: 0;
    background: rgba(10, 31, 68, 0.55);
    z-index: 70;
}
.sidebar-overlay.active { display: block; }

.actions-row { display: flex; gap: 8px; flex-wrap: wrap; }

@media (max-width: 880px) {
    .app-shell { flex-direction: column; }
    .mobile-topbar { display: flex; }

    .sidebar {
        position: fixed;
        top: 0; left: 0;
        height: 100vh;
        width: 260px;
        transform: translateX(-100%);
        transition: transform 0.25s ease;
        z-index: 80;
    }
    .sidebar.mobile-open { transform: translateX(0); }

    .main { padding: 20px 16px 48px; max-width: 100%; }

    .page-header h1 { font-size: 19px; }
    .page-header-row { flex-direction: column; align-items: stretch; }
    .page-header-row .btn { width: 100%; justify-content: center; }

    .card { padding: var(--sp-4); overflow-x: visible; }
    .two-col, .stat-grid { grid-template-columns: 1fr; }

    .btn { min-height: 40px; }

    [style*="display:flex"] { flex-wrap: wrap; }
}

@media (max-width: 480px) {
    .main { padding: var(--sp-4) var(--sp-3) 40px; }
    .card { padding: 14px; }
    .stat-card .value { font-size: 22px; }
    .login-card { padding: 28px 22px; }
}

/* ---------- Business Settings (vertical picker) ---------- */
.vertical-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: var(--space-4); }
.vertical-card {
    display: flex; flex-direction: column; gap: 8px;
    padding: var(--space-4);
    background: var(--surface, #fff);
    border: 2px solid var(--border-soft, #e5e9f0);
    border-radius: 12px;
    cursor: pointer;
    transition: border-color .15s ease, box-shadow .15s ease;
}
.vertical-card:hover { border-color: var(--brand, #007BFF); }
.vertical-card.selected { border-color: var(--brand, #007BFF); box-shadow: 0 0 0 3px rgba(0,123,255,.15); }
.vertical-card input { accent-color: var(--brand, #007BFF); }
.vertical-card span { font-size: var(--text-sm, 13px); color: var(--text-muted, #64748b); line-height: 1.5; }
