/* Force fonts for iOS */
body {
    font-family: 'Familjen Grotesk', -apple-system, BlinkMacSystemFont, sans-serif !important;
}
h1, h2, h3, .page-title, .card-title, .stat-value {
    font-family: 'Staatliches', sans-serif !important;
}

/* 3D Motorcycle Loader */
.bike-loader {
    position: fixed;
    inset: 0;
    background: linear-gradient(135deg, #0a0a0c 0%, #141418 100%);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    transition: opacity 0.6s ease, visibility 0.6s ease;
}
.bike-loader.hidden {
    opacity: 0;
    visibility: hidden;
}
#bikeCanvas {
    width: 100%;
    max-width: 450px;
    height: 280px;
}
@media (max-width: 600px) {
    #bikeCanvas {
        max-width: 95vw;
        height: 220px;
    }
}
/* Page-specific: Admin dashboard with Apple styling */
:root {
    --sidebar-bg: #f5f5f7;
    --sidebar-text: #1d1d1f;
    --sidebar-text-muted: rgba(0,0,0,0.5);
    --sidebar-border: rgba(0,0,0,0.1);
    --sidebar-hover: rgba(0,0,0,0.05);
    --sidebar-active: rgba(10, 132, 255, 0.15);
    --radius: 12px;
}
[data-theme="dark"] {
    --sidebar-bg: #000000;
    --sidebar-text: #ffffff;
    --sidebar-text-muted: rgba(255,255,255,0.6);
    --sidebar-border: rgba(255,255,255,0.1);
    --sidebar-hover: rgba(255,255,255,0.08);
    --sidebar-active: rgba(10, 132, 255, 0.3);
}

/* Layout */
.app { display: flex; min-height: 100vh; }

.sidebar {
    width: 280px;
    max-width: 85vw;
    background: var(--sidebar-bg);
    color: var(--sidebar-text);
    display: flex;
    flex-direction: column;
    position: fixed;
    height: 100vh;
    z-index: 100;
    transform: translateX(-100%);
    transition: transform 0.25s ease;
    padding-left: env(safe-area-inset-left);
}
.sidebar.open { transform: translateX(0); }

.sidebar-header {
    padding: 12px 20px;
    padding-top: max(12px, env(safe-area-inset-top));
    border-bottom: 1px solid var(--sidebar-border);
    display: flex;
    align-items: center;
    justify-content: flex-start;
}
.logo {
    font-family: 'Racing Sans One', cursive;
    font-size: 22px;
    font-weight: 400;
    color: var(--text);
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 10px;
    text-transform: uppercase;
    cursor: pointer;
}
.logo-icon {
    width: 32px;
    height: 32px;
    background-image: url('/static/favicon.png');
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
}
.mobile-header .logo {
    font-size: 18px;
}
.mobile-header .logo-icon {
    width: 28px;
    height: 28px;
}

.nav-item {
    padding: 12px 16px;
    margin: 2px 8px;
    min-height: 44px;
    color: var(--sidebar-text-muted);
    cursor: pointer;
    font-size: 15px;
    transition: all 0.15s;
    display: flex;
    align-items: center;
    gap: 12px;
    border-radius: 10px;
    -webkit-tap-highlight-color: transparent;
}
.nav-item:hover { color: var(--sidebar-text); background: var(--sidebar-hover); }
.nav-item.active { color: var(--accent); background: var(--sidebar-active); }
.nav-item svg { width: 20px; height: 20px; opacity: 0.8; flex-shrink: 0; }
.nav-item.active svg { opacity: 1; }

.sidebar-footer {
    margin-top: auto;
    padding: 16px 20px;
    padding-bottom: max(16px, env(safe-area-inset-bottom));
    border-top: 1px solid var(--sidebar-border);
    font-size: 13px;
    color: rgba(255,255,255,0.4);
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
}
.sidebar-footer:hover { color: var(--sidebar-text-muted); }
.sidebar-user { border-radius: 10px; margin: 0 8px; padding: 12px !important; }
.sidebar-user:hover { background: var(--sidebar-hover); }
.sidebar-user.active { background: var(--sidebar-active); }

.main {
    flex: 1;
    padding: 16px;
    padding-top: 72px; /* Space for fixed mobile header */
    padding-bottom: max(16px, env(safe-area-inset-bottom));
    margin-left: 0;
    min-height: 100vh;
    width: 100%;
}

/* Mobile header - Apple style frosted glass */
.mobile-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px;
    padding-top: max(12px, env(safe-area-inset-top));
    background: rgba(255,255,255,0.8);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(0,0,0,0.1);
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 50;
}
[data-theme="dark"] .mobile-header {
    background: rgba(28,28,30,0.8);
    border-bottom-color: rgba(255,255,255,0.1);
}

.mobile-header-title { font-weight: 600; font-size: 17px; flex: 1; letter-spacing: -0.02em; }
.mobile-header-right { display: flex; align-items: center; gap: 8px; }
.menu-btn {
    width: 44px;
    height: 44px;
    border: none;
    background: transparent;
    border-radius: 10px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    -webkit-tap-highlight-color: transparent;
    margin-right: -10px;
    transition: background 0.15s;
}
.menu-btn:active { background: rgba(0,0,0,0.06); }
[data-theme="dark"] .menu-btn:active { background: rgba(255,255,255,0.1); }
.menu-btn svg { width: 24px; height: 24px; color: var(--text); }
#mobileThemeToggle { width: 38px; height: 38px; }
#mobileThemeToggle svg { width: 20px; height: 20px; }

.overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.5);
    z-index: 99;
    opacity: 0;
    visibility: hidden;
    transition: all 0.2s;
}
.overlay.active { opacity: 1; visibility: visible; }

/* Desktop */
@media (min-width: 768px) {
    .mobile-header { display: none; }
    .sidebar { width: 240px; transform: translateX(0); }
    .main { margin-left: 240px; padding: 32px; padding-top: 32px; }
    .overlay { display: none; }
}

/* Components */
.page { display: none; }
.page.active { display: block; animation: fadeIn 0.2s ease; }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }

.page-title {
    font-family: var(--font-heading);
    font-size: 22px;
    font-weight: 400;
    margin-top: 16px;
    margin-bottom: 16px;
    letter-spacing: 0.02em;
    text-transform: uppercase;
    color: var(--text);
}
@media (min-width: 768px) {
    .page-title { font-size: 20px; margin-top: 20px; margin-bottom: 20px; }
}

.card {
    background: var(--surface);
    border-radius: var(--radius);
    padding: 20px;
    margin-bottom: 16px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.04), 0 1px 2px rgba(0,0,0,0.06);
}
[data-theme="dark"] .card { box-shadow: none; }

.card-title {
    font-family: var(--font-heading);
    font-size: 16px;
    font-weight: 400;
    letter-spacing: 0.02em;
    text-transform: uppercase;
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    letter-spacing: -0.01em;
}
.info-icon {
    cursor: pointer;
    display: inline-flex;
    opacity: 0.6;
    position: relative;
}
.info-icon:hover { opacity: 1; }

/* Settings Tab Bar */
.settings-tab-bar {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: var(--surface);
    border-top: 1px solid var(--border);
    display: flex;
    justify-content: space-around;
    padding: 8px 0;
    padding-bottom: calc(8px + env(safe-area-inset-bottom));
    z-index: 100;
}
.settings-tab {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 10px;
    font-weight: 500;
    padding: 4px 16px;
    cursor: pointer;
    transition: color 0.15s;
}
.settings-tab svg { stroke: var(--text-muted); transition: stroke 0.15s; }
.settings-tab.active { color: var(--accent); }
.settings-tab.active svg { stroke: var(--accent); }
.settings-tab:hover { color: var(--text); }
.settings-tab:hover svg { stroke: var(--text); }
@media (min-width: 768px) {
    .settings-tab-bar { display: none; }
    .settings-tab-content { display: block !important; }
    #page-settings { padding-bottom: 20px !important; }
}

/* Bikes Tab Bar */
.bikes-tab-bar {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: var(--surface);
    border-top: 1px solid var(--border);
    display: flex;
    justify-content: space-around;
    padding: 8px 0;
    padding-bottom: calc(8px + env(safe-area-inset-bottom));
    z-index: 100;
}
.bikes-tab {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 10px;
    font-weight: 500;
    padding: 4px 16px;
    cursor: pointer;
    transition: color 0.15s;
}
.bikes-tab svg { stroke: var(--text-muted); transition: stroke 0.15s; }
.bikes-tab.active { color: var(--accent); }
.bikes-tab.active svg { stroke: var(--accent); }
.bikes-tab:hover { color: var(--text); }
.bikes-tab:hover svg { stroke: var(--text); }
@media (min-width: 768px) {
    .bikes-tab-bar { display: none; }
    .bikes-tab-content { display: block !important; }
    #page-bikes { padding-bottom: 20px !important; }
}

/* Dashboard Tab Bar */
.dashboard-tab-bar {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: var(--surface);
    border-top: 1px solid var(--border);
    display: flex;
    justify-content: space-around;
    padding: 8px 0;
    padding-bottom: calc(8px + env(safe-area-inset-bottom));
    z-index: 100;
}
.dashboard-tab {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 10px;
    font-weight: 500;
    padding: 4px 16px;
    cursor: pointer;
    transition: color 0.15s;
}
.dashboard-tab svg { stroke: var(--text-muted); transition: stroke 0.15s; }
.dashboard-tab.active { color: var(--accent); }
.dashboard-tab.active svg { stroke: var(--accent); }
.dashboard-tab:hover { color: var(--text); }
.dashboard-tab:hover svg { stroke: var(--text); }
@media (min-width: 768px) {
    .dashboard-tab-bar { display: none; }
    .dashboard-tab-content { display: block !important; }
    #page-dashboard { padding-bottom: 20px !important; }
}

.info-icon .tooltip {
    display: none;
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    margin-top: 8px;
    padding: 8px 12px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 8px;
    font-size: 12px;
    font-weight: 400;
    color: var(--text-muted);
    white-space: nowrap;
    z-index: 100;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}
.info-icon:hover .tooltip { display: block; }

/* Stats - Apple style */
.stats {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
    margin-bottom: 20px;
}
@media (min-width: 768px) {
    .stats { grid-template-columns: repeat(4, 1fr); gap: 16px; margin-bottom: 24px; }
}
.stat {
    background: var(--surface);
    border-radius: var(--radius);
    padding: 16px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.04), 0 1px 2px rgba(0,0,0,0.06);
    transition: transform 0.2s, box-shadow 0.2s;
}
.stat:hover { transform: translateY(-2px); box-shadow: 0 4px 12px rgba(0,0,0,0.08); }
[data-theme="dark"] .stat { box-shadow: none; }
[data-theme="dark"] .stat:hover { box-shadow: 0 4px 12px rgba(0,0,0,0.3); }
@media (min-width: 768px) {
    .stat { padding: 20px; }
}
.stat-label { font-size: 13px; color: var(--text-muted); margin-bottom: 6px; font-weight: 500; }
.stat-value { font-size: 24px; font-weight: 600; letter-spacing: -0.02em; }
@media (min-width: 768px) {
    .stat-value { font-size: 32px; }
}

/* Forms - Apple style */
.form-group { margin-bottom: 20px; }
.form-label {
    display: block;
    font-size: 12px;
    font-weight: 400;
    margin-bottom: 6px;
    color: var(--text-muted);
}
.form-input, select.form-input {
    width: 100%;
    padding: 14px 16px;
    min-height: 50px;
    font-size: 17px;
    font-family: inherit;
    border: 1px solid var(--border);
    border-radius: 12px;
    background: var(--surface);
    color: var(--text);
    transition: box-shadow 0.2s, background 0.2s, border-color 0.2s;
}
/* Compact select/input for filters/pickers */
select.form-select-compact,
input.form-select-compact {
    padding: 8px 12px;
    min-height: 36px;
    font-size: 13px;
    font-weight: 400;
    font-family: inherit;
    border: 1px solid rgba(0, 0, 0, 0.15);
    border-radius: 8px;
    background: var(--surface);
    color: var(--text-muted);
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    cursor: pointer;
}
[data-theme="dark"] select.form-select-compact,
[data-theme="dark"] input.form-select-compact { background: rgba(255,255,255,0.08); border-color: transparent; }
select.form-select-compact:focus,
input.form-select-compact:focus {
    outline: none;
    box-shadow: 0 0 0 2px rgba(0, 113, 227, 0.2);
}
[data-theme="dark"] .form-input,
[data-theme="dark"] select.form-input { background: rgba(255,255,255,0.08); }
.form-input:focus, select.form-input:focus {
    outline: none;
    box-shadow: 0 0 0 4px rgba(0, 113, 227, 0.2);
    background: var(--surface);
}
[data-theme="dark"] .form-input:focus { background: rgba(255,255,255,0.12); }
.form-input::placeholder { color: var(--text-muted); }

/* Super admin business banner */
.viewing-banner {
    display: none;
    background: linear-gradient(135deg, #7c3aed 0%, #5b21b6 100%);
    color: white;
    padding: 10px 16px;
    font-size: 14px;
    font-weight: 500;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    position: sticky;
    top: 0;
    z-index: 50;
}
.viewing-banner.active { display: flex; }
.viewing-banner-info { display: flex; align-items: center; gap: 8px; }
.viewing-banner .btn {
    padding: 6px 12px;
    min-height: auto;
    font-size: 13px;
    background: rgba(255,255,255,0.2);
    color: white;
}
.viewing-banner .btn:hover { background: rgba(255,255,255,0.3); }
@media (max-width: 768px) {
    .viewing-banner { padding: 8px 12px; font-size: 13px; flex-wrap: wrap; }
}

.form-grid {
    display: grid;
    gap: 16px;
}
@media (min-width: 768px) {
    .form-grid { grid-template-columns: repeat(2, 1fr); }
    .form-grid-3 { grid-template-columns: repeat(3, 1fr); }
}

/* Buttons - Apple style */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 20px;
    font-size: 15px;
    min-height: 44px;
    font-weight: 500;
    font-family: inherit;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.2s ease;
}
.btn svg { width: 16px; height: 16px; }
.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover { background: var(--accent-hover); transform: scale(1.02); }
.btn-primary:active { transform: scale(0.98); }
.btn-danger { background: var(--danger); color: #fff; }
.btn-danger:hover { opacity: 0.9; }
.btn-success { background: var(--success); color: #fff; }
.btn-ghost { background: rgba(0,0,0,0.04); color: var(--text); }
.btn-ghost:hover { background: rgba(0,0,0,0.08); }
[data-theme="dark"] .btn-ghost { background: rgba(255,255,255,0.08); }
[data-theme="dark"] .btn-ghost:hover { background: rgba(255,255,255,0.12); }
.btn-sm { padding: 8px 14px; font-size: 13px; min-height: 36px; }
.tab-group { display: inline-flex; background: var(--bg); border-radius: 10px; padding: 3px; }
.tab-group button { background: transparent; color: var(--text-muted); border: none; border-radius: 8px; padding: 8px 16px; }
.tab-group button.active { background: var(--surface); color: var(--text); box-shadow: 0 1px 3px rgba(0,0,0,0.1); }
.btn-icon { padding: 8px; min-height: 36px; width: 36px; border-radius: 10px; }
.btn-icon svg { width: 18px; height: 18px; }

/* Badges - Apple system colors */
.badge {
    display: inline-flex;
    align-items: center;
    padding: 4px 10px;
    font-size: 12px;
    font-weight: 600;
    border-radius: 20px;
    letter-spacing: 0.01em;
}
.badge-success { background: rgba(52, 199, 89, 0.15); color: #34c759; }
.badge-warning { background: rgba(255, 159, 10, 0.15); color: #ff9f0a; }
.badge-danger { background: rgba(255, 59, 48, 0.15); color: #ff3b30; }
.badge-info { background: rgba(0, 113, 227, 0.12); color: #0071e3; }
.badge-purple { background: rgba(175, 82, 222, 0.15); color: #af52de; }
[data-theme="dark"] .badge-success { background: rgba(52, 199, 89, 0.2); color: #30d158; }
[data-theme="dark"] .badge-warning { background: rgba(255, 159, 10, 0.2); color: #ffd60a; }
[data-theme="dark"] .badge-danger { background: rgba(255, 59, 48, 0.2); color: #ff453a; }
[data-theme="dark"] .badge-info { background: rgba(10, 132, 255, 0.2); color: #0a84ff; }
[data-theme="dark"] .badge-purple { background: rgba(191, 90, 242, 0.2); color: #bf5af2; }
.badge-sm { font-size: 10px; padding: 3px 8px; }

/* Tables - Apple style */
.table-wrap { overflow-x: auto; margin: -20px; padding: 20px; }
table { width: 100%; border-collapse: collapse; font-size: 15px; }
th, td { padding: 14px 16px; text-align: left; border-bottom: 1px solid var(--border); }
th {
    font-weight: 600;
    color: var(--text-muted);
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}
tr { transition: background 0.15s; }
tr:hover { background: rgba(0,0,0,0.02); }
[data-theme="dark"] tr:hover { background: rgba(255,255,255,0.04); }
tr:last-child td { border-bottom: none; }
th.sortable { cursor: pointer; user-select: none; white-space: nowrap; }
th.sortable:hover { color: var(--text); }
th.sortable .sort-icon::after { content: ''; margin-left: 4px; opacity: 0.3; }
th.sortable.asc .sort-icon::after { content: '▲'; opacity: 1; color: var(--accent); }
th.sortable.desc .sort-icon::after { content: '▼'; opacity: 1; color: var(--accent); }
td.editable { cursor: pointer; }
td.editable:hover { background: rgba(0,113,227,0.06); }
td.editable input, td.editable select { width: 100%; padding: 8px 12px; border: 2px solid var(--accent); border-radius: 8px; background: var(--surface); color: var(--text); font-size: 15px; }
td.editable input:focus, td.editable select:focus { outline: none; box-shadow: 0 0 0 3px rgba(0,113,227,0.2); }

/* Data list (mobile cards) - Design System */
.data-list { display: flex; flex-direction: column; gap: 12px; }
.data-item {
    background: var(--surface);
    border-radius: 12px;
    padding: 14px 16px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}
[data-theme="dark"] .data-item { box-shadow: none; }
.data-item-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 8px;
    margin-bottom: 8px;
}
.data-item-title { font-weight: 600; font-size: 15px; line-height: 1.3; flex: 1; }
.data-item-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 13px;
    color: var(--text-muted);
}
.data-item-row .value { color: var(--text); font-weight: 500; }
/* Ensure no dividers inside data-item cards */
.data-item-header, .data-item-row { border: none; }

/* Compact list rows */
.list-row {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    background: var(--surface);
    border-radius: 8px;
    margin-bottom: 4px;
}
[data-theme="dark"] .list-row { background: rgba(255,255,255,0.05); }
.list-row-title { font-weight: 600; font-size: 14px; min-width: 65px; }
.list-row-value { flex: 1; font-size: 14px; color: var(--text-muted); }
.list-row-actions { display: flex; gap: 2px; }
.list-row-actions .btn-icon {
    width: 32px; height: 32px; padding: 0;
    display: flex; align-items: center; justify-content: center;
    background: transparent;
}
.list-row-actions .btn-icon svg { width: 16px; height: 16px; }

.data-item-actions {
    display: flex;
    gap: 4px;
    flex-shrink: 0;
}
.data-item-actions .btn-icon {
    width: 32px;
    height: 32px;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    border-radius: 8px;
}
.data-item-actions .btn-icon:hover { background: rgba(0,0,0,0.05); }
[data-theme="dark"] .data-item-actions .btn-icon:hover { background: rgba(255,255,255,0.1); }
.data-item-actions .btn-icon svg { width: 16px; height: 16px; stroke: var(--text-muted); }
.data-item-actions .btn-icon:hover svg { stroke: var(--text); }
.data-item-actions .btn-icon.btn-danger:hover svg { stroke: var(--danger); }

@media (min-width: 768px) {
    .data-list { display: none; }
    .table-wrap { display: block; }
}
@media (max-width: 767px) {
    .table-wrap { display: none; }
}

/* Modal - Apple sheet style */
.modal {
    position: fixed;
    inset: 0;
    z-index: 200;
    display: none;
    align-items: flex-end;
    justify-content: center;
}
.modal.active { display: flex; }
.modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,0.4);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
}
.modal-content {
    position: relative;
    background: var(--surface);
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    border-radius: 16px 16px 0 0;
    padding: 24px;
    padding-bottom: max(24px, env(safe-area-inset-bottom));
    box-shadow: 0 -4px 32px rgba(0,0,0,0.15);
}
@media (min-width: 768px) {
    .modal { align-items: center; }
    .modal-content {
        max-width: 480px;
        border-radius: 16px;
        padding: 28px;
        box-shadow: 0 20px 60px rgba(0,0,0,0.2);
    }
}
.modal-title {
    font-size: 20px;
    font-weight: 600;
    margin-bottom: 24px;
    letter-spacing: -0.02em;
}
.modal-actions {
    display: flex;
    gap: 12px;
    margin-top: 24px;
}
.modal-actions .btn { flex: 1; }

/* Booking detail modal - compact design */
.booking-card {
    background: var(--surface);
    border: 1px solid rgba(0, 0, 0, 0.1);
    border-radius: var(--radius);
    padding: 12px;
    margin-bottom: 12px;
}
[data-theme="dark"] .booking-card {
    background: var(--bg);
    border-color: transparent;
}
.booking-compact {
    display: flex;
    flex-direction: column;
    gap: 6px;
}
.booking-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 13px;
    color: var(--text-muted);
}
.booking-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
    padding-bottom: 8px;
    border-bottom: 1px solid var(--border);
}
.booking-id {
    font-size: 12px;
    color: var(--text-muted);
    margin-bottom: 2px;
}
.booking-link {
    color: var(--text-muted);
    text-decoration: none;
    padding: 2px 6px;
    margin: -2px -6px;
    border-radius: 4px;
    background: rgba(255,255,255,0.05);
    transition: background 0.15s, color 0.15s;
}
.booking-link:hover {
    background: rgba(255,255,255,0.1);
    color: var(--text);
}
.booking-location {
    cursor: pointer;
    padding: 4px;
    margin: -4px;
    border-radius: 4px;
    opacity: 0.6;
    transition: opacity 0.15s, background 0.15s;
}
.booking-location:hover {
    opacity: 1;
    background: rgba(255,255,255,0.1);
}
.booking-icons {
    display: flex;
    align-items: center;
    gap: 8px;
}
.booking-icons .badge {
    cursor: pointer;
    font-size: 11px;
}
.booking-head {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 10px;
}
.booking-head-right {
    display: flex;
    align-items: center;
    gap: 8px;
}
.booking-model {
    font-size: 16px;
    font-weight: 600;
    color: var(--text);
}
.booking-price {
    font-size: 14px;
    color: var(--primary);
    font-weight: 500;
}
.booking-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 10px;
}
.badge-uni {
    font-size: 11px !important;
    padding: 4px 8px !important;
}
.badge-link {
    background: rgba(59, 130, 246, 0.15);
    border: 1px solid rgba(59, 130, 246, 0.3);
    color: #60a5fa;
    text-decoration: none;
    cursor: pointer;
}
.badge-link:hover {
    background: rgba(59, 130, 246, 0.25);
}
.booking-details {
    display: flex;
    flex-direction: column;
    gap: 6px;
}
.booking-detail-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 13px;
    color: var(--text-muted);
}
.booking-loc {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    cursor: pointer;
    opacity: 0.7;
    transition: opacity 0.15s;
}
.booking-loc:hover {
    opacity: 1;
}
.badge-ghost {
    background: transparent;
    border: 1px solid var(--border);
    color: var(--text-muted);
    font-size: 11px;
}
.timeline-card {
    max-height: 80px;
    overflow-y: auto;
}
.timeline-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 4px 0;
    font-size: 11px;
    color: var(--text-muted);
}
.timeline-label {
}
.timeline-time {
    font-size: 11px;
}

/* Booking preview cards (list view) */
.booking-preview {
    background: var(--surface);
    border-radius: var(--radius);
    padding: 12px;
    margin-bottom: 8px;
    cursor: pointer;
    transition: background 0.15s;
}
.booking-preview:hover {
    background: rgba(255,255,255,0.08);
}
.booking-preview-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
    font-weight: 500;
}
.booking-preview-info {
    display: flex;
    justify-content: space-between;
    font-size: 13px;
    color: var(--text-muted);
}

.chat { max-height: 300px; overflow-y: auto; }
.chat-msg {
    padding: 10px 14px;
    border-radius: var(--radius);
    word-break: break-word;
    overflow-wrap: break-word;
    margin-bottom: 8px;
    max-width: 85%;
    font-size: 13px;
}
.chat-msg.user {
    background: var(--accent);
    color: #fff;
    margin-left: auto;
}
.chat-msg.assistant {
    background: var(--bg);
}
.chat-meta {
    font-size: 11px;
    color: var(--text-muted);
    margin-top: 4px;
}

/* Toast */
.toast {
    position: fixed;
    bottom: 20px;
    left: 20px;
    right: 20px;
    background: var(--text);
    color: var(--bg);
    padding: 14px 20px;
    border-radius: var(--radius);
    font-size: 14px;
    z-index: 300;
    transform: translateY(100px);
    opacity: 0;
    transition: all 0.3s;
}
.toast.show { transform: translateY(0); opacity: 1; }
@media (min-width: 768px) {
    .toast { left: auto; right: 20px; max-width: 360px; }
}

/* Login */
.login {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}
.login-box {
    width: 100%;
    max-width: 320px;
}
.login-title {
    font-family: var(--font-heading);
    font-size: 28px;
    font-weight: 400;
    letter-spacing: 0.02em;
    text-transform: uppercase;
    text-align: center;
    margin-bottom: 8px;
}
.login-title span { color: var(--accent); }
.login-sub {
    text-align: center;
    color: var(--text-muted);
    margin-bottom: 32px;
}

/* Filter row - Apple segmented control style */
.filter-row {
    display: flex;
    gap: 10px;
    margin-bottom: 16px;
    flex-wrap: wrap;
    align-items: center;
}
.filter-row select {
    flex: 0;
    min-width: 120px;
    max-width: 180px;
    padding: 8px 12px;
    min-height: 36px;
    border: none;
    border-radius: 8px;
    background: var(--bg);
    color: var(--text-muted);
    font-size: 13px;
    font-weight: 400;
    cursor: pointer;
    transition: background 0.15s;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
}
.filter-row select:hover { background: rgba(0,0,0,0.06); }
[data-theme="dark"] .filter-row select { background: rgba(255,255,255,0.08); }
[data-theme="dark"] .filter-row select:hover { background: rgba(255,255,255,0.12); }

/* Utils */
.text-muted { color: var(--text-muted); }
.text-sm { font-size: 13px; }
.mt-4 { margin-top: 16px; }
.mb-4 { margin-bottom: 16px; }

/* Onboarding - Progress Pill (Mobile Header) */
.onboarding-pill {
    display: none;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    background: var(--accent);
    color: white;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.15s;
}
.onboarding-pill:active {
    transform: scale(0.95);
}
.onboarding-pill svg {
    width: 14px;
    height: 14px;
}
@media (max-width: 767px) {
    .onboarding-pill.visible {
        display: flex;
    }
}

/* Onboarding - Bottom Sheet (Mobile) */
.bottom-sheet-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.4);
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.2s;
}
.bottom-sheet-overlay.active {
    opacity: 1;
    visibility: visible;
}

.bottom-sheet {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: var(--surface);
    border-radius: 16px 16px 0 0;
    z-index: 1001;
    transform: translateY(100%);
    transition: transform 0.3s cubic-bezier(0.32, 0.72, 0, 1);
    max-height: 85vh;
    overflow: hidden;
    padding-bottom: env(safe-area-inset-bottom);
}
.bottom-sheet.active {
    transform: translateY(0);
}

.bottom-sheet-handle {
    width: 36px;
    height: 4px;
    background: var(--border);
    border-radius: 2px;
    margin: 12px auto;
}

.bottom-sheet-header {
    padding: 0 20px 16px;
    border-bottom: 1px solid var(--border);
}
.bottom-sheet-title {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 4px;
}
.bottom-sheet-subtitle {
    font-size: 13px;
    color: var(--text-muted);
}

.bottom-sheet-body {
    padding: 8px 20px 20px;
    overflow-y: auto;
    max-height: calc(85vh - 120px);
}

.bottom-sheet-step {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    padding: 16px 0;
    border-bottom: 1px solid var(--border);
}
.bottom-sheet-step:last-child {
    border-bottom: none;
}

.bottom-sheet-check {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    border: 2px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    color: transparent;
    transition: all 0.15s;
}
.bottom-sheet-step.done .bottom-sheet-check {
    background: var(--success);
    border-color: var(--success);
    color: white;
}

.bottom-sheet-step-content {
    flex: 1;
}
.bottom-sheet-step-title {
    font-weight: 500;
    font-size: 15px;
    margin-bottom: 4px;
}
.bottom-sheet-step.done .bottom-sheet-step-title {
    color: var(--text-muted);
}
.bottom-sheet-step-desc {
    font-size: 13px;
    color: var(--text-muted);
    line-height: 1.4;
}
.bottom-sheet-step-action {
    margin-top: 10px;
}

/* Onboarding - Desktop Card */
.onboarding-widget {
    position: fixed;
    bottom: 24px;
    right: 24px;
    z-index: 1000;
}
.onboarding-widget.dragging {
    user-select: none;
}
.onboarding-drag-handle {
    position: absolute;
    top: 0;
    left: 0;
    right: 40px;
    height: 46px;
    cursor: move;
    z-index: 1;
}
@media (max-width: 767px) {
    .onboarding-widget {
        display: none;
    }
}

.onboarding-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 12px;
    box-shadow: 0 4px 24px rgba(0,0,0,0.12);
    width: 300px;
    overflow: hidden;
}

.onboarding-header {
    padding: 14px 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid var(--border);
}

.onboarding-title {
    font-weight: 600;
    font-size: 13px;
    display: flex;
    align-items: center;
    gap: 8px;
}
.onboarding-progress {
    font-size: 11px;
    color: var(--text-muted);
    background: var(--bg);
    padding: 3px 8px;
    border-radius: 10px;
}

.onboarding-body {
    padding: 8px 16px 12px;
}

.onboarding-step {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 0;
    border-bottom: 1px solid var(--border);
    cursor: pointer;
    transition: background 0.1s;
    margin: 0 -16px;
    padding-left: 16px;
    padding-right: 16px;
}
.onboarding-step:last-child {
    border-bottom: none;
}
.onboarding-step:hover {
    background: var(--bg);
}
.onboarding-step.done {
    opacity: 0.6;
}

.onboarding-check {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    border: 2px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    color: transparent;
    transition: all 0.15s;
}
.onboarding-step.done .onboarding-check {
    background: var(--success);
    border-color: var(--success);
    color: white;
}

.onboarding-step-title {
    font-size: 13px;
    font-weight: 500;
}

.onboarding-close {
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: none;
    border: none;
    cursor: pointer;
    color: var(--text-muted);
    border-radius: 4px;
    transition: all 0.2s;
}
.onboarding-close:hover {
    background: rgba(0,0,0,0.1);
    color: var(--text);
}
[data-theme="dark"] .onboarding-close:hover {
    background: rgba(255,255,255,0.1);
}

/* Empty States */
.empty-state {
    text-align: center;
    padding: 48px 24px;
    color: var(--text-muted);
}
.empty-state-icon {
    width: 64px;
    height: 64px;
    margin: 0 auto 16px;
    opacity: 0.4;
}
.empty-state-title {
    font-size: 16px;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 8px;
}
.empty-state-desc {
    font-size: 14px;
    margin-bottom: 20px;
    max-width: 280px;
    margin-left: auto;
    margin-right: auto;
}
.empty-state .btn {
    display: inline-flex;
}

/* Template Picker Cards */
.template-card {
    background: var(--surface);
    border-radius: 12px;
    padding: 12px;
    cursor: pointer;
    transition: transform 0.15s, box-shadow 0.15s;
    text-align: center;
}
.template-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}
.template-card img {
    width: 100%;
    height: 100px;
    object-fit: cover;
    border-radius: 8px;
    margin-bottom: 8px;
    background: var(--bg);
}
.template-card-placeholder {
    width: 100%;
    height: 100px;
    background: var(--bg);
    border-radius: 8px;
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 32px;
}
.template-name {
    font-weight: 600;
    font-size: 13px;
    margin-bottom: 4px;
    color: var(--text);
}
.template-meta {
    font-size: 11px;
    color: var(--text-muted);
}

/* Calendar legend base styles */
.calendar-legend {
    gap: 16px;
    margin-top: 16px;
    padding-top: 12px;
    border-top: 1px solid var(--border);
    font-size: 13px;
}
.calendar-legend > div {
    display: flex;
    align-items: center;
    gap: 8px;
}
.calendar-legend span {
    width: 12px;
    height: 12px;
    border-radius: 3px;
    flex-shrink: 0;
}

/* ===========================================
   MOBILE COMPACTION OVERRIDES
   =========================================== */
@media (max-width: 767px) {
    /* Page structure */
    .main { padding: 12px; padding-top: 60px; }
    .page-title { font-size: 24px; margin-bottom: 16px; }

    /* Cards - tighter padding */
    .card { padding: 14px; margin-bottom: 10px; }
    .card-title { margin-bottom: 10px; font-size: 14px; }

    /* Flat cards on mobile - remove outer wrapper styling */
    .card-flat-mobile {
        background: transparent !important;
        box-shadow: none !important;
        border: none !important;
        padding: 0 !important;
        margin-bottom: 16px !important;
    }
    .card-flat-mobile .card-title {
        margin-bottom: 16px;
    }

    /* Stats - more compact */
    .stats { gap: 8px; margin-bottom: 12px; }
    .stat { padding: 12px; }
    .stat-label { font-size: 11px; margin-bottom: 2px; }
    .stat-value { font-size: 20px; }

    /* Data items (mobile cards) - tighter */
    .data-list { gap: 8px; }
    .data-item { padding: 12px; border-radius: 10px; }
    .data-item-header { margin-bottom: 6px; }
    .data-item-title { font-size: 14px; }
    .data-item-row { font-size: 12px; }
    .data-item-actions .btn-icon { width: 28px; height: 28px; }
    .data-item-actions .btn-icon svg { width: 14px; height: 14px; }

    /* Buttons - slightly smaller */
    .btn { padding: 10px 14px; min-height: 40px; font-size: 14px; }
    .btn-sm { padding: 6px 10px; min-height: 32px; font-size: 12px; }

    /* Forms - tighter */
    .form-group { margin-bottom: 12px; }
    .form-label { margin-bottom: 4px; font-size: 13px; }
    .form-input, select.form-input { padding: 10px 12px; min-height: 44px; font-size: 16px; }

    /* Filter row */
    .filter-row { margin-bottom: 12px; gap: 8px; }
    .filter-row select { min-height: 40px; padding: 8px 12px; }

    /* Calendar legend - compact */
    .calendar-legend { margin-top: 12px; padding-top: 10px; gap: 10px; font-size: 11px; border-top: none; }
    .calendar-legend > div { gap: 6px; }
    .calendar-legend span { width: 10px; height: 10px; border-radius: 3px; }

    /* Modals - tighter */
    .modal-content { padding: 16px; }
    .modal-title { font-size: 18px; margin-bottom: 16px; }
    .modal-actions { margin-top: 16px; gap: 8px; }

    /* Bottom sheet - compact */
    .bottom-sheet-handle { margin: 6px auto; }
    .bottom-sheet-header { padding: 0 14px 10px; }
    .bottom-sheet-title { font-size: 16px; }
    .bottom-sheet-body { padding: 4px 14px 14px; }
    .bottom-sheet-step { padding: 10px 0; gap: 10px; border-bottom: none; }
    .bottom-sheet-check { width: 20px; height: 20px; font-size: 10px; }
    .bottom-sheet-step-content h4 { font-size: 14px; }
    .bottom-sheet-step-content p { font-size: 12px; }

    /* Tables - denser */
    th, td { padding: 10px 12px; font-size: 13px; }
    th { font-size: 10px; }

    /* Mobile header - slightly smaller */
    .mobile-header { padding: 10px 14px; }
    .mobile-header-title { font-size: 16px; }

    /* Settings cards - compact icons */
    .card-title span[style*="width:36px"] { width: 28px !important; height: 28px !important; border-radius: 8px !important; }
    .card-title span[style*="width:36px"] svg { width: 16px !important; height: 16px !important; }

    /* Quick actions - stack on small screens */
    #page-dashboard .card:last-child > div { gap: 8px; }
    #page-dashboard .card:last-child .btn { min-width: 0; flex: 1; }
}
