/*
  Developed by Rameez Scripts
  WhatsApp: https://wa.me/923435347417 (For Custom Projects)
  YouTube: https://www.youtube.com/@rameezimdad (Subscribe for more!)
  TikTok: https://www.tiktok.com/@aiwithrameez (Follow for more!)
*/

/* ===== Color Scheme - Light Theme (Default) ===== */
:root {
    --navy-primary: #001f3f;
    --navy-dark: #001529;
    --navy-light: #003366;
    --navy-accent: #0074D9;
    --navy-hover: #002a52;

    /* rgb triplets — fallbacks; config.php overwrites these per user theme */
    --navy-primary-rgb: 0, 31, 63;
    --navy-light-rgb: 0, 51, 102;
    --navy-accent-rgb: 0, 116, 217;
    --success: #34a853;
    --warning: #fbbc04;
    --danger: #ea4335;

    /* Light Theme Colors */
    --bg-primary: #f5f5f5;
    --bg-secondary: #ffffff;
    --bg-card: #ffffff;
    --text-primary: #333333;
    --text-secondary: #555555;
    --text-muted: #666666;
    --border-color: #e0e0e0;
    --border-light: #f0f0f0;
    --shadow-color: rgba(0, 0, 0, 0.1);
    --shadow-hover: rgba(0, 0, 0, 0.15);
    --input-bg: #ffffff;
    --input-border: #d0d0d0;
    --table-hover: #f9f9f9;
    --skeleton-base: #f0f0f0;
    --skeleton-shine: #e0e0e0;
}

/* ===== Dark Theme ===== */
body.dark-mode {
    --bg-primary: #1a1a2e;
    --bg-secondary: #16213e;
    --bg-card: #1e1e3f;
    --text-primary: #e8eaf6;
    --text-secondary: #b0b3c5;
    --text-muted: #8a8d9f;
    --border-color: #2d2d5a;
    --border-light: #252550;
    --shadow-color: rgba(0, 0, 0, 0.3);
    --shadow-hover: rgba(0, 0, 0, 0.4);
    --input-bg: #252550;
    --input-border: #3d3d7a;
    --table-hover: #252550;
    --skeleton-base: #252550;
    --skeleton-shine: #2d2d5a;

    --navy-primary: #0a1628;
    --navy-dark: #060d16;
    --navy-light: #1a3a5c;
    --navy-primary-rgb: 10, 22, 40;
    --navy-light-rgb: 26, 58, 92;
}

/* ===== Global Styles ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    -webkit-text-size-adjust: 100%;
    -moz-text-size-adjust: 100%;
    -ms-text-size-adjust: 100%;
    text-size-adjust: 100%;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: var(--bg-primary);
    color: var(--text-primary);
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
    transition: background-color 0.3s ease, color 0.3s ease;
}

input, select, textarea {
    font-size: 16px !important;
    touch-action: manipulation;
}

/* ===== App Container ===== */
.app-container {
    display: flex;
    height: 100vh;
}
/* shell = one screen, page never scrolls behind it */
body:has(> .app-container) { overflow: hidden; }

/* ===== Sidebar ===== */
/* icon rail (logo · shortcuts · preferences · account) + panel (name · search · folding sections).
   desktop folds the panel to icons, phones get both as a drawer */
:root {
    --sb-rail-w: 52px;
    --sb-w: 292px;      /* rail + panel */
    --sb-mini: 108px;   /* rail + icon column */
    --sb-r: 4px;
}

.sidebar {
    --sb-bg: var(--bg-secondary);
    --sb-rail: color-mix(in srgb, var(--text-primary) 3.5%, transparent);
    --sb-hover: color-mix(in srgb, var(--text-primary) 5%, transparent);
    --sb-active: color-mix(in srgb, var(--text-primary) 8%, transparent);
    --sb-ring: var(--bg-secondary);
    width: var(--sb-w);
    height: 100vh;
    height: 100dvh;
    flex-shrink: 0;
    display: flex;
    position: relative;
    z-index: 950; /* tooltips + account menu paint over the page */
    background: var(--sb-bg);
    border-right: 1px solid var(--border-color);
    color: var(--text-secondary);
    font-size: 14px;
    transition: width 0.25s ease, background-color 0.3s ease;
}
.sb-off { display: none !important; }

/* rail */
.sb-rail {
    width: var(--sb-rail-w);
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding-bottom: 12px;
    background: var(--sb-rail);
    border-right: 1px solid var(--border-color);   /* no overflow clip — the account + theme menus open beside it */
}
.sb-rail-logo {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 56px;
}
.sb-logo {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    object-fit: cover;
}
.sb-rail-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 4px;
}
.sb-rail-foot {
    margin-top: auto;
    padding-top: 12px;
}
.sb-rail-list li { position: relative; }
.sb-rail-list > li > a,
.sb-rail-list > li > button {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    padding: 0;
    background: transparent;
    border: 0;
    border-radius: var(--sb-r);
    color: var(--text-muted);
    font-size: 15px;
    text-decoration: none;
    cursor: pointer;
    transition: background-color 0.2s, color 0.2s;
}
.sb-rail-list > li > a:hover,
.sb-rail-list > li > button:hover,
.sb-user-btn[aria-expanded="true"] {
    background: var(--sb-hover);
    color: var(--text-primary);
}
.sb-rail-list > li > a.active {
    background: var(--sb-active);
    color: var(--text-primary);
}
/* header theme menu while borrowed by the rail — opens to the right, bottom-aligned */
.sb-theme > .theme-quick-menu {
    top: auto;
    right: auto;
    bottom: 0;
    left: calc(100% + 8px);
}
#sbMode .fa-sun,
#sbMode[aria-checked="true"] .fa-moon { display: none; }
#sbMode[aria-checked="true"] .fa-sun { display: inline-block; }

/* panel */
.sb-panel {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
}
.sb-brand {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    gap: 10px;
    height: 56px;
    padding: 0 10px 0 16px;
    border-bottom: 1px solid var(--border-color);
}
.sb-name {
    flex: 1;
    min-width: 0;
    font-size: 15px;
    font-weight: 700;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.sb-icon-btn {
    width: 32px;
    height: 32px;
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: 0;
    border-radius: var(--sb-r);
    color: var(--text-muted);
    font-size: 15px;
    cursor: pointer;
    transition: background-color 0.2s, color 0.2s;
}
.sb-icon-btn:hover {
    background: var(--sb-hover);
    color: var(--text-primary);
}

/* search box — "/" jumps here */
.sb-search {
    flex-shrink: 0;
    padding: 12px 12px 4px;
}
.sb-find {
    display: flex;
    align-items: center;
    gap: 8px;
    height: 34px;
    padding: 0 8px 0 10px;
    border: 1px solid var(--border-color);
    border-radius: var(--sb-r);
    cursor: text;
    transition: border-color 0.2s, background-color 0.2s;
}
.sb-find:hover { border-color: var(--input-border); }
.sb-find i {
    width: 16px;
    flex-shrink: 0;
    text-align: center;
    font-size: 13px;
    color: var(--text-muted);
}
.sidebar .sb-find input {
    flex: 1;
    min-width: 0;
    height: 100%;
    padding: 0;
    background: transparent;
    border: 0;
    outline: 0;
    color: var(--text-primary);
    font-family: inherit;
}
.sb-find input::placeholder {
    color: var(--text-muted);
    opacity: 1;
}
.sb-find input::-webkit-search-cancel-button { -webkit-appearance: none; }
.sb-find kbd {
    flex-shrink: 0;
    font: 500 12px/1 inherit;
    color: var(--text-muted);
}
.sb-find:focus-within kbd { display: none; }
/* 16px stays on touch screens (stops iOS zoom); mouse users get the row size */
@media (hover: hover) and (pointer: fine) {
    .sb-find input { font-size: 14px !important; }
}
@media (hover: none) {
    .sb-find kbd { display: none; }
}

/* scrolling middle */
.sb-scroll {
    flex: 1;
    min-height: 0;
    overflow-y: auto;
    overflow-x: hidden;
    scrollbar-width: none;   /* still scrolls, bar stays hidden */
}
.sb-scroll::-webkit-scrollbar { display: none; }
.sb-sec { padding: 8px 12px; }
.sb-sec + .sb-sec { border-top: 1px solid var(--border-color); }

/* section title — chevron · NAME · summed count while folded */
.sb-head {
    display: flex;
    align-items: center;
    gap: 8px;
    width: 100%;
    height: 32px;
    padding: 0 10px;
    background: none;
    border: 0;
    border-radius: var(--sb-r);
    font: inherit;
    font-size: 11.5px;
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--text-muted);
    text-align: left;
    cursor: pointer;
    transition: color 0.2s;
}
.sb-head:hover { color: var(--text-primary); }
.submenu-arrow {
    width: 12px;
    font-size: 10px;
    transform: rotate(-90deg);
    transition: transform 0.2s ease;
}
.submenu-toggle.open .submenu-arrow { transform: none; }
.sb-head .nav-pill-group {
    position: static;
    margin-left: auto;
    transform: none;
}
.sb-head.open .nav-pill-group { display: none; }   /* open: each row shows its own */
.sidebar-submenu {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
}
.sidebar-submenu.open,
.sidebar.sb-filtering .sidebar-submenu { max-height: 1600px; }   /* room for a long project menu */

/* rows */
.sidebar-menu {
    list-style: none;
    margin: 0;
    padding: 0;
}
.sidebar-menu li { position: relative; }
.sidebar-menu li + li { margin-top: 1px; }
.sidebar-menu a,
.sidebar-menu button {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    height: 36px;
    padding: 0 10px;
    background: transparent;
    border: 0;
    border-radius: var(--sb-r);
    color: inherit;
    font: inherit;
    font-weight: 500;
    text-align: left;
    text-decoration: none;
    white-space: nowrap;
    overflow: hidden;
    cursor: pointer;
    transition: background-color 0.2s, color 0.2s;
}
.sidebar-menu a > i:first-child,
.sidebar-menu button > i:first-child {
    width: 18px;
    flex-shrink: 0;
    text-align: center;
    font-size: 15px;
    color: var(--text-muted);
    transition: color 0.2s;
}
.sidebar-menu a span,
.sidebar-menu button span {
    flex: 1;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
}
.sidebar-menu li[data-pill] > a,
.sidebar-menu li[data-pill] > button { padding-right: 44px; }
.sidebar-menu a:hover,
.sidebar-menu button:hover {
    background: var(--sb-hover);
    color: var(--text-primary);
}
.sidebar-menu a:hover > i:first-child,
.sidebar-menu button:hover > i:first-child { color: var(--text-primary); }
.sidebar-menu a.active {
    background: var(--sb-active);
    color: var(--text-primary);
    font-weight: 600;
}
.sidebar-menu a.active > i:first-child { color: var(--text-primary); }

.sidebar a:focus-visible,
.sidebar button:focus-visible,
.sb-find:focus-within {
    outline: 2px solid rgba(var(--navy-accent-rgb), 0.55);
    outline-offset: -2px;
}

/* waiting counts — plain number in the panel, a dot on the rail / folded panel */
.nav-pill {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    pointer-events: none;
    font-size: 12px;
    font-style: normal;
    font-weight: 600;
    line-height: 1;
    color: var(--text-secondary);
    font-variant-numeric: tabular-nums;
}
.sb-rail .nav-pill {
    top: 5px;
    right: 5px;
    transform: none;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--danger);
    box-shadow: 0 0 0 2px var(--sb-ring);
    font-size: 0;
}

.sb-nohit {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 22px;
    font-size: 13px;
    color: var(--text-muted);
}

/* account — avatar on the rail, menu opens beside it */
.sb-user-btn img.sb-avatar {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    object-fit: cover;
    border: 1px solid var(--border-color);
}
.sb-user-menu {
    position: absolute;
    left: calc(100% + 8px);
    bottom: 0;
    z-index: 5;
    width: 220px;
    padding: 6px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--sb-r);
    box-shadow: 0 10px 28px var(--shadow-hover);
    opacity: 0;
    visibility: hidden;
    transform: translateX(-4px);
    transition: opacity 0.15s, transform 0.15s, visibility 0s 0.15s;
}
.sb-user-menu.open {
    opacity: 1;
    visibility: visible;
    transform: none;
    transition-delay: 0s;
}
.sb-user-txt {
    display: flex;
    flex-direction: column;
    gap: 2px;
    padding: 6px 10px 10px;
    margin-bottom: 6px;
    border-bottom: 1px solid var(--border-color);
    line-height: 1.3;
}
.sb-user-txt strong,
.sb-user-txt small {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.sb-user-txt strong {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
}
.sb-user-txt small {
    font-size: 12px;
    color: var(--text-muted);
}
.sb-user-menu a {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 10px;
    border-radius: var(--sb-r);
    color: var(--text-secondary);
    font-size: 14px;
    font-weight: 500;
    text-decoration: none;
}
.sb-user-menu a i {
    width: 16px;
    text-align: center;
    color: var(--text-muted);
}
.sb-user-menu a:hover {
    background: var(--sb-hover);
    color: var(--text-primary);
}
.sb-user-menu a.danger,
.sb-user-menu a.danger i { color: var(--danger); }
.sb-user-menu a.danger:hover { background: color-mix(in srgb, var(--danger) 9%, transparent); }

/* icon tooltip (lives on <body>) */
.sb-tip {
    position: fixed;
    z-index: 1100;
    transform: translateY(-50%);
    padding: 6px 10px;
    border-radius: var(--sb-r);
    background: var(--text-primary);
    color: var(--bg-card);
    font-size: 12.5px;
    font-weight: 500;
    white-space: nowrap;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.12s;
}
.sb-tip.on { opacity: 1; }

/* impersonation notice sits under the brand row */
.sidebar .impersonate-notice { flex-shrink: 0; margin: 8px 12px 0; }

/* folded panel — desktop only, phones always get the full drawer */
@media (min-width: 769px) {
    .sb-x { display: none; }
    .sidebar.collapsed { width: var(--sb-mini); }
    .sidebar.collapsed .sb-name,
    .sidebar.collapsed .sb-find input,
    .sidebar.collapsed .sb-find kbd,
    .sidebar.collapsed .sb-head,
    .sidebar.collapsed .sidebar-menu span,
    .sidebar.collapsed .impersonate-text { display: none; }
    .sidebar.collapsed .sb-brand {
        justify-content: center;
        padding: 0;
    }
    .sidebar.collapsed .sb-search { padding: 12px 0 4px; }
    .sidebar.collapsed .sb-sec { padding: 8px 0; }
    .sidebar.collapsed .sb-find,
    .sidebar.collapsed .sidebar-menu a,
    .sidebar.collapsed .sidebar-menu button {
        width: 36px;
        margin: 0 auto;
        padding: 0;
        gap: 0;
        justify-content: center;
        cursor: pointer;
    }
    .sidebar.collapsed .sidebar-submenu { max-height: none; }
    .sidebar.collapsed .sb-panel .nav-pill {
        top: 5px;
        right: calc(50% - 16px);
        transform: none;
        width: 8px;
        height: 8px;
        border-radius: 50%;
        background: var(--danger);
        box-shadow: 0 0 0 2px var(--sb-ring);
        font-size: 0;
    }
    .sidebar.collapsed .impersonate-notice {
        justify-content: center;
        margin: 8px 6px 0;
        padding: 8px 0;
    }
}

/* drawer overlay (phones) */
.sidebar-overlay {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 999;
    background: rgba(0, 0, 0, 0.5);
    opacity: 0;
    transition: opacity 0.3s ease;
}
.sidebar-overlay.active {
    display: block;
    opacity: 1;
}

/* phones: off-canvas drawer (rail + panel), above the bottom bar */
@media (max-width: 768px) {
    .sidebar {
        position: fixed;
        top: 0;
        left: 0;
        z-index: 1002;
        width: min(330px, 90vw);
        transform: translateX(-100%);
        visibility: hidden;
        transition: transform 0.28s ease, visibility 0s 0.28s;
    }
    .sidebar.mobile-open {
        transform: none;
        visibility: visible;
        transition-delay: 0s;
        box-shadow: 4px 0 24px rgba(0, 0, 0, 0.18);
    }
    .sb-rail { width: 58px; }
    .sb-rail-list > li > a,
    .sb-rail-list > li > button,
    .sidebar-menu a,
    .sidebar-menu button { height: 44px; }
    .sb-rail-list > li > a,
    .sb-rail-list > li > button { width: 44px; }
    .sb-find { height: 44px; }
    .sb-sec { padding: 8px 10px; }
    .sb-brand .sb-icon-btn .fa-table-columns { display: none; }
    .sb-brand .sb-icon-btn { width: 44px; height: 44px; }
    .sb-user-menu { width: min(220px, calc(90vw - 72px)); }
}

/* dark mode — the global span/div colour rule outranks plain classes */
body.dark-mode .sidebar-menu a.active span,
body.dark-mode .sidebar-menu a:hover span,
body.dark-mode .sidebar-menu button:hover span { color: var(--text-primary) !important; }

@media (prefers-reduced-motion: reduce) {
    .sidebar,
    .sidebar *,
    .sb-tip { transition: none !important; }
}

/* ===== Mobile Bottom Navigation Bar ===== */
.mobile-bottom-nav {
    display: none;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: 65px;
    background: var(--navy-primary);
    z-index: 1001;
    box-shadow: 0 -2px 10px rgba(0,0,0,0.2);
    justify-content: space-around;
    align-items: center;
    padding: 0 5px;
    padding-bottom: env(safe-area-inset-bottom, 0);
}

.mobile-nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 8px 12px;
    color: rgba(255,255,255,0.7);
    text-decoration: none;
    font-size: 10px;
    font-weight: 500;
    border-radius: 8px;
    transition: all 0.3s ease;
    background: none;
    border: none;
    cursor: pointer;
    min-width: 60px;
}

.mobile-nav-item i {
    font-size: 20px;
    margin-bottom: 4px;
}

.mobile-nav-item span {
    white-space: nowrap;
}

.mobile-nav-item:hover,
.mobile-nav-item:focus {
    color: white;
    background: rgba(255,255,255,0.1);
}

.mobile-nav-item.active {
    color: var(--on-accent);
    background: var(--navy-accent);
    box-shadow: 0 2px 8px rgba(0,116,217,0.4);
}

.mobile-nav-item.active i {
    transform: scale(1.1);
}

.mobile-nav-more {
    color: rgba(255,255,255,0.9);
}

/* Mobile layout */
@media (max-width: 768px) {
    /* Show bottom navigation */
    .mobile-bottom-nav {
        display: flex;
    }

    /* Add padding to main content for bottom nav */
    .main-content {
        margin-left: 0;
        width: 100%;
        padding-bottom: 80px;
    }

    .app-container {
        flex-direction: column;
    }

    /* Adjust header for mobile */
    .header {
        padding: 15px;
    }

    .header h1 {
        font-size: 18px;
    }

    /* Data section padding adjustment */
    .data-section {
        padding: 15px;
    }

    .section-header {
        flex-direction: column;
        gap: 15px;
        align-items: flex-start;
    }

    .section-header > div {
        width: 100%;
        display: flex;
        gap: 10px;
    }

    .section-header .btn {
        flex: 1;
    }
}

/* Extra small devices */
@media (max-width: 400px) {
    .mobile-nav-item {
        padding: 8px 8px;
        min-width: 50px;
    }

    .mobile-nav-item i {
        font-size: 18px;
    }

    .mobile-nav-item span {
        font-size: 9px;
    }
}

/* Dark mode for mobile navigation */
body.dark-mode .mobile-bottom-nav {
    background: var(--bg-card);
    border-top: 1px solid var(--border-color);
}

body.dark-mode .mobile-nav-item {
    color: var(--text-muted);
}

body.dark-mode .mobile-nav-item:hover,
body.dark-mode .mobile-nav-item:focus {
    color: var(--text-primary);
    background: rgba(255,255,255,0.05);
}

body.dark-mode .mobile-nav-item.active {
    color: var(--on-accent);
    background: var(--navy-accent);
}

/* ===== Main Content ===== */
.main-content {
    flex: 1;
    padding: 20px;
    overflow-y: auto;
    background: var(--bg-primary);
    transition: background-color 0.3s ease, margin-left 0.3s ease;
}

.header {
    background: var(--bg-card);
    padding: 20px;
    border-radius: 3px;
    margin-bottom: 20px;
    box-shadow: 0 2px 4px var(--shadow-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: var(--text-primary);
    transition: background-color 0.3s ease, box-shadow 0.3s ease;
}

.header h1 {
    font-size: 24px;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 10px;
}

.data-section {
    background: var(--bg-card);
    padding: 20px;
    border-radius: 3px;
    box-shadow: 0 2px 4px var(--shadow-color);
    transition: background-color 0.3s ease, box-shadow 0.3s ease;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.section-header h2 {
    font-size: 20px;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 10px;
}

/* ===== Skeleton Loaders ===== */
.skeleton {
    background: linear-gradient(90deg, var(--skeleton-base) 25%, var(--skeleton-shine) 50%, var(--skeleton-base) 75%);
    background-size: 200% 100%;
    animation: skeleton-loading 1.5s ease-in-out infinite;
    border-radius: 3px;
}

@keyframes skeleton-loading {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

.skeleton-table {
    width: 100%;
    background: var(--bg-card);
    padding: 20px;
    border-radius: 3px;
    transition: background-color 0.3s ease;
}

.skeleton-table-row {
    display: flex;
    gap: 15px;
    padding: 15px 0;
    border-bottom: 1px solid var(--border-light);
}

.skeleton-table-cell {
    height: 20px;
    border-radius: 3px;
}

.skeleton-card {
    background: var(--bg-card);
    padding: 24px;
    border-radius: 4px;
    box-shadow: 0 2px 8px var(--shadow-color);
    border: 1px solid var(--border-color);
    border-left: 4px solid var(--navy-primary);
    transition: background-color 0.3s ease, box-shadow 0.3s ease;
}

.skeleton-icon {
    width: 60px;
    height: 60px;
    border-radius: 4px;
    margin-bottom: 16px;
}

.skeleton-text {
    height: 16px;
    margin-bottom: 12px;
    border-radius: 3px;
}

.skeleton-text-large {
    height: 32px;
    margin-bottom: 8px;
    border-radius: 3px;
}

/* ===== Buttons ===== */
.btn {
    padding: 10px 20px;
    border: none;
    border-radius: 2px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
}

.btn-primary {
    background: var(--navy-primary);
    color: var(--on-primary);
}

.btn-primary:hover {
    background: var(--navy-hover);
    transform: translateY(-2px);
}

.btn-danger {
    background: var(--danger);
    color: white;
}

.btn-danger:hover {
    background: #c8392b;
    transform: translateY(-2px);
}

.btn-secondary {
    background: #6c757d;
    color: white;
}

.btn-secondary:hover {
    background: #5a6268;
    transform: translateY(-2px);
}

.btn-sm {
    padding: 8px 16px;
    font-size: 13px;
    font-weight: 600;
}

.btn:disabled {
    background: #ccc;
    cursor: not-allowed;
    transform: none;
}

/* DataTable responsive hint for mobile */
.table-scroll-hint {
    display: none;
    text-align: center;
    padding: 10px;
    background: rgba(0, 116, 217, 0.1);
    border-radius: 4px;
    margin-bottom: 10px;
    font-size: 13px;
    color: var(--accent-ink);
}

.table-scroll-hint i {
    margin-right: 6px;
}

@media (max-width: 768px) {
    .table-scroll-hint {
        display: block;
    }
}

/* ===== Status Badges ===== */
.status-badge {
    padding: 6px 14px;
    border-radius: 3px;
    font-size: 13px;
    font-weight: 600;
    display: inline-block;
}

.status-admin {
    background: #d4edda;
    color: #155724;
}

.status-user {
    background: #cce5ff;
    color: #004085;
}

/* ===== Forms ===== */
.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    color: var(--text-secondary);
    font-weight: 500;
    font-size: 14px;
}

.form-group label i {
    margin-right: 8px;
    color: var(--accent-ink);
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 14px 16px;
    border: 1px solid var(--input-border);
    border-radius: 2px;
    font-size: 16px;
    transition: all 0.3s;
    font-family: inherit;
    background: var(--input-bg);
    color: var(--text-primary);
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--navy-accent);
    box-shadow: 0 0 0 2px rgba(0,116,217,0.2);
}

.form-group input::placeholder,
.form-group textarea::placeholder {
    color: var(--text-muted);
}

.form-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
}

.form-actions {
    display: flex;
    gap: 10px;
    margin-top: 30px;
}

.error {
    margin-top: 15px;
    margin-bottom: 15px;
    color: var(--danger);
    font-size: 14px;
    background: #fef2f2;
    padding: 12px;
    border-radius: 4px;
    border: 1px solid #fecaca;
}

/* ===== Modal ===== */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.6);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    padding: 20px;
}

body.dark-mode .modal-overlay {
    background: rgba(0,0,0,0.8);
}

.modal-overlay.active {
    display: flex;
}

.modal {
    background: var(--bg-card);
    border-radius: 4px;
    width: 90%;
    max-width: 800px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 4px 24px var(--shadow-hover);
    transition: background-color 0.3s ease;
}

.modal-header {
    padding: 24px 30px;
    background: var(--navy-primary);
    color: white;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-radius: 4px 4px 0 0;
}

body.dark-mode .modal-header {
    background: var(--navy-light);
}

.modal-header h3 {
    font-size: 20px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 0;
}

.close-btn {
    background: transparent;
    border: none;
    color: white;
    font-size: 28px;
    cursor: pointer;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s;
}

.close-btn:hover {
    background: rgba(255,255,255,0.2);
    transform: rotate(90deg);
}

.modal-body {
    padding: 30px;
    color: var(--text-primary);
}

/* ===== Mobile Responsive ===== */
@media (max-width: 768px) {
    .form-grid {
        grid-template-columns: 1fr;
    }

    .modal {
        width: 95%;
    }

    input, select, textarea {
        font-size: 16px !important;
    }
}

/* ===== Settings Page - 2x2 Grid Layout ===== */

/* Main Grid */
.settings-grid-2x2 {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 24px;
    margin-bottom: 30px;
}

/* Mega Cards */
.settings-mega-card {
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    overflow: hidden;
    border: 2px solid #e9ecef;
    transition: all 0.3s;
}

.settings-mega-card:hover {
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
    transform: translateY(-4px);
    border-color: var(--navy-accent);
}

/* Card Header */
.settings-card-header {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    padding: 24px;
    border-bottom: 2px solid #dee2e6;
    display: flex;
    align-items: center;
    gap: 16px;
}

.settings-card-icon {
    width: 56px;
    height: 56px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    color: white;
    flex-shrink: 0;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.settings-card-title {
    font-size: 20px;
    font-weight: 700;
    color: var(--navy-primary);
    margin: 0 0 4px 0;
}

.settings-card-subtitle {
    font-size: 13px;
    color: #666;
    margin: 0;
    font-weight: 500;
}

/* Card Body */
.settings-card-body {
    padding: 24px;
}

/* Stat Items (inline) */
.stat-item-inline {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 16px;
    background: #f8f9fa;
    border-radius: 8px;
    margin-bottom: 12px;
    border: 1px solid #e9ecef;
    transition: all 0.3s;
}

.stat-item-inline:last-child {
    margin-bottom: 0;
}

.stat-item-inline:hover {
    background: #fff;
    border-color: var(--navy-accent);
    box-shadow: 0 2px 8px rgba(0, 116, 217, 0.1);
}

.stat-item-icon {
    width: 48px;
    height: 48px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    flex-shrink: 0;
}

.stat-item-content {
    flex: 1;
}

.stat-item-label {
    font-size: 13px;
    color: #666;
    font-weight: 600;
    margin-bottom: 4px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.stat-item-value {
    font-size: 16px;
    color: var(--navy-primary);
    font-weight: 700;
}

/* Control Group */
.control-group {
    background: linear-gradient(135deg, #f8f9fa 0%, #ffffff 100%);
    border: 2px solid #e9ecef;
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 16px;
}

.control-group-header {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 20px;
}

.control-icon {
    width: 50px;
    height: 50px;
    border-radius: 10px;
    background: linear-gradient(135deg, var(--navy-primary) 0%, var(--navy-light) 100%);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    flex-shrink: 0;
    box-shadow: 0 4px 12px rgba(0, 31, 63, 0.2);
}

.control-info {
    flex: 1;
}

.control-title {
    font-size: 17px;
    font-weight: 700;
    color: var(--navy-primary);
    margin-bottom: 4px;
}

.control-desc {
    font-size: 13px;
    color: #666;
    font-weight: 500;
}

.control-toggle-wrapper {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    background: white;
    border-radius: 8px;
    border: 2px solid #e9ecef;
}

/* Large Toggle Switch */
.toggle-switch-large {
    position: relative;
    display: inline-block;
    flex-shrink: 0;
}

.toggle-input-large {
    display: none;
}

.toggle-label-large {
    display: block;
    width: 80px;
    height: 40px;
    background: #ccc;
    border-radius: 20px;
    cursor: pointer;
    position: relative;
    transition: background-color 0.3s;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.1);
}

.toggle-slider-large {
    position: absolute;
    top: 4px;
    left: 4px;
    width: 32px;
    height: 32px;
    background: white;
    border-radius: 50%;
    transition: transform 0.3s;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
}

.toggle-input-large:checked + .toggle-label-large {
    background: var(--success);
}

.toggle-input-large:checked + .toggle-label-large .toggle-slider-large {
    transform: translateX(40px);
}

.toggle-label-large:hover {
    opacity: 0.9;
}

/* Toggle Status */
.toggle-status {
    display: flex;
    align-items: center;
    gap: 8px;
}

.status-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    animation: pulse 2s infinite;
}

.status-enabled {
    background: var(--success);
    box-shadow: 0 0 0 3px rgba(52, 168, 83, 0.2);
}

.status-disabled {
    background: #ccc;
    box-shadow: none;
    animation: none;
}

@keyframes pulse {
    0%, 100% {
        box-shadow: 0 0 0 3px rgba(52, 168, 83, 0.2);
    }
    50% {
        box-shadow: 0 0 0 6px rgba(52, 168, 83, 0.1);
    }
}

.status-text {
    font-size: 14px;
    font-weight: 600;
}

/* Info Banner */
.info-banner {
    display: flex;
    align-items: center;
    gap: 12px;
    background: rgba(0, 116, 217, 0.05);
    border: 1px solid rgba(0, 116, 217, 0.2);
    border-left: 4px solid var(--navy-accent);
    padding: 14px 16px;
    border-radius: 6px;
    font-size: 13px;
    color: #555;
    line-height: 1.5;
}

.info-banner i {
    color: var(--accent-ink);
    font-size: 18px;
    flex-shrink: 0;
}

/* Security Features */
.security-feature {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 16px;
    background: #f8f9fa;
    border-radius: 8px;
    margin-bottom: 12px;
    border: 1px solid #e9ecef;
    transition: all 0.3s;
}

.security-feature:last-child {
    margin-bottom: 0;
}

.security-feature:hover {
    background: white;
    border-color: var(--success);
    box-shadow: 0 2px 8px rgba(52, 168, 83, 0.1);
}

.security-feature-icon {
    width: 44px;
    height: 44px;
    border-radius: 10px;
    background: linear-gradient(135deg, var(--success) 0%, #2d9148 100%);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    flex-shrink: 0;
    box-shadow: 0 4px 12px rgba(52, 168, 83, 0.2);
}

.security-feature-content {
    flex: 1;
}

.security-feature-name {
    font-size: 15px;
    font-weight: 700;
    color: var(--navy-primary);
    margin-bottom: 4px;
}

.security-feature-desc {
    font-size: 12px;
    color: #666;
    font-weight: 500;
}

.security-feature-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 700;
    flex-shrink: 0;
}

.security-feature-badge.active {
    background: rgba(52, 168, 83, 0.1);
    color: var(--success);
    border: 2px solid rgba(52, 168, 83, 0.3);
}

/* Server Info Items */
.server-info-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 14px 0;
    border-bottom: 1px solid #f1f3f5;
}

.server-info-item:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.server-info-label {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 14px;
    color: #666;
    font-weight: 600;
}

.server-info-label i {
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--accent-ink);
    font-size: 16px;
}

.server-info-value {
    font-size: 14px;
    color: var(--navy-primary);
    font-weight: 700;
}

.version-badge,
.upload-badge {
    background: linear-gradient(135deg, var(--navy-primary) 0%, var(--navy-light) 100%);
    color: white;
    padding: 6px 14px;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 700;
    box-shadow: 0 2px 6px rgba(0, 31, 63, 0.2);
}

.upload-badge {
    background: linear-gradient(135deg, var(--success) 0%, #2d9148 100%);
}

.time-value {
    font-family: 'Courier New', monospace;
    background: rgba(0, 116, 217, 0.05);
    padding: 6px 12px;
    border-radius: 6px;
    color: var(--accent-ink);
    font-size: 13px;
}

/* Dashboard Grid 4 */
.dashboard-grid-4 {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    margin-bottom: 20px;
}

/* Mobile Responsive */
@media (max-width: 968px) {
    .settings-grid-2x2 {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .settings-card-header {
        padding: 20px;
    }

    .settings-card-icon {
        width: 48px;
        height: 48px;
        font-size: 24px;
    }

    .settings-card-title {
        font-size: 18px;
    }

    .settings-card-body {
        padding: 20px;
    }

    .control-group-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }

    .control-toggle-wrapper {
        flex-direction: column;
        gap: 16px;
        align-items: flex-start;
    }

    .toggle-status {
        width: 100%;
    }
}

@media (max-width: 768px) {

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

    .server-info-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }

    .server-info-value {
        width: 100%;
    }
}

/* ===== Setup Page Styles ===== */
.setup-wrapper {
    min-height: 100vh;
    padding: 40px 20px;
    background: linear-gradient(135deg, var(--navy-primary) 0%, var(--navy-light) 100%);
}

.setup-container {
    max-width: 800px;
    margin: 0 auto;
    background: white;
    padding: 40px;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.2);
}

.setup-container h2 {
    color: var(--navy-primary);
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.setup-container .subtitle {
    color: #666;
    margin-bottom: 30px;
    font-size: 14px;
}

.setup-container hr {
    border: none;
    border-top: 2px solid var(--navy-primary);
    margin-bottom: 30px;
}

.log-item {
    padding: 12px 16px;
    margin-bottom: 10px;
    border-radius: 4px;
    border-left: 4px solid;
    display: flex;
    align-items: center;
    gap: 10px;
}

.log-success {
    background: #d4edda;
    border-left-color: var(--success);
    color: #155724;
}

.log-error {
    background: #f8d7da;
    border-left-color: var(--danger);
    color: #721c24;
}

.log-info {
    background: #d1ecf1;
    border-left-color: var(--navy-accent);
    color: #0c5460;
}

.credentials-box {
    background: #fff3cd;
    padding: 20px;
    border-radius: 4px;
    margin: 20px 0;
    border-left: 4px solid #ffc107;
}

.credentials-box strong {
    color: var(--navy-primary);
}

/* ===== Google Translate Widget ===== */
/* Hide Google Translate top bar */
.goog-te-banner-frame.skiptranslate {
    display: none !important;
}

body {
    top: 0 !important;
}

.VIpgJd-ZVi9od-ORHb-OEVmcd {
    display: none !important;
}

/* Login Page Theme Toggle */
.login-theme-toggle {
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: var(--bg-card);
    border: 2px solid var(--border-color);
    color: var(--text-primary);
    font-size: 20px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 12px var(--shadow-color);
    transition: all 0.3s ease;
    z-index: 1000;
}

.login-theme-toggle:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 16px var(--shadow-hover);
}

body.dark-mode .login-theme-toggle {
    background: var(--bg-card);
    border-color: var(--navy-accent);
    color: #ffd700;
}

body.dark-mode .setup-wrapper {
    background: linear-gradient(135deg, var(--bg-primary) 0%, var(--bg-secondary) 100%);
}

body.dark-mode .setup-container {
    background: var(--bg-card);
    box-shadow: 0 4px 20px var(--shadow-hover);
}

body.dark-mode .setup-container h2 {
    color: var(--text-primary);
}

body.dark-mode .setup-container .subtitle {
    color: var(--text-muted);
}

body.dark-mode .setup-container hr {
    border-top-color: var(--border-color);
}

body.dark-mode .log-item {
    border-left-width: 4px;
}

body.dark-mode .log-success {
    background: rgba(52, 168, 83, 0.15);
    color: #6fcf97;
}

body.dark-mode .log-error {
    background: rgba(234, 67, 53, 0.15);
    color: #f5857a;
}

body.dark-mode .log-info {
    background: rgba(0, 116, 217, 0.15);
    color: #5dade2;
}

body.dark-mode .credentials-box {
    background: rgba(251, 188, 4, 0.1);
    border-color: rgba(251, 188, 4, 0.4);
    color: var(--text-secondary);
}

body.dark-mode .credentials-box strong {
    color: var(--text-primary);
}

/* Settings Page Dark Mode */
body.dark-mode .settings-mega-card {
    background: var(--bg-card);
    border-color: var(--border-color);
}

body.dark-mode .settings-card-header {
    background: linear-gradient(135deg, var(--bg-secondary) 0%, var(--bg-primary) 100%);
    border-bottom-color: var(--border-color);
}

body.dark-mode .settings-card-title {
    color: var(--text-primary);
}

body.dark-mode .settings-card-subtitle {
    color: var(--text-muted);
}

body.dark-mode .stat-item-inline {
    background: var(--bg-secondary);
    border-color: var(--border-color);
}

body.dark-mode .stat-item-label {
    color: var(--text-muted);
}

body.dark-mode .stat-item-value {
    color: var(--text-primary);
}

body.dark-mode .control-group {
    background: linear-gradient(135deg, var(--bg-secondary) 0%, var(--bg-card) 100%);
    border-color: var(--border-color);
}

body.dark-mode .control-title {
    color: var(--text-primary);
}

body.dark-mode .control-desc {
    color: var(--text-muted);
}

body.dark-mode .control-toggle-wrapper {
    background: var(--bg-card);
    border-color: var(--border-color);
}

body.dark-mode .info-banner {
    background: rgba(0, 116, 217, 0.1);
    border-color: rgba(0, 116, 217, 0.3);
    color: var(--text-secondary);
}

body.dark-mode .security-feature {
    background: var(--bg-secondary);
    border-color: var(--border-color);
}

body.dark-mode .security-feature-name {
    color: var(--text-primary);
}

body.dark-mode .security-feature-desc {
    color: var(--text-muted);
}

body.dark-mode .server-info-item {
    border-bottom-color: var(--border-light);
}

body.dark-mode .server-info-label {
    color: var(--text-muted);
}

body.dark-mode .server-info-value {
    color: var(--text-primary);
}

body.dark-mode .time-value {
    background: rgba(0, 116, 217, 0.1);
    color: var(--accent-ink);
}

/* Dashboard Page Dark Mode */
body.dark-mode .data-section p {
    color: var(--text-secondary);
}

body.dark-mode .data-section strong {
    color: var(--text-primary);
}

/* Logs Page Dark Mode - Empty Details */
body.dark-mode em.text-muted,
body.dark-mode .text-muted em {
    color: var(--text-muted) !important;
}

/* Version/Upload Badges in Dark Mode */
body.dark-mode .version-badge,
body.dark-mode .upload-badge {
    color: white !important;
}

/* Ensure form inputs text is visible in dark mode */
body.dark-mode input,
body.dark-mode select,
body.dark-mode textarea {
    background: var(--input-bg);
    border-color: var(--input-border);
    color: var(--text-primary);
}

body.dark-mode input::placeholder,
body.dark-mode textarea::placeholder {
    color: var(--text-muted);
}

/* Settings page stat items dark mode */
body.dark-mode .stat-item-inline:hover {
    background: var(--bg-card);
    border-color: var(--navy-accent);
}

body.dark-mode .security-feature:hover {
    background: var(--bg-card);
    border-color: var(--success);
}

/* Color picker styling */
input[type="color"] {
    -webkit-appearance: none;
    border: none;
    background: none;
}

input[type="color"]::-webkit-color-swatch-wrapper {
    padding: 0;
}

input[type="color"]::-webkit-color-swatch {
    border: none;
    border-radius: 4px;
}

/* Theme mode options */
.theme-mode-option {
    transition: all 0.3s ease;
}

.theme-mode-option:hover {
    border-color: var(--navy-accent) !important;
    background: var(--bg-secondary);
}

.theme-mode-option:has(input:checked) {
    border-color: var(--navy-accent) !important;
    background: rgba(0, 116, 217, 0.1);
}

body.dark-mode .theme-mode-option {
    border-color: var(--border-color) !important;
}

body.dark-mode .theme-mode-option:hover {
    border-color: var(--navy-accent) !important;
    background: var(--bg-secondary);
}

body.dark-mode .theme-mode-option:has(input:checked) {
    border-color: var(--navy-accent) !important;
    background: rgba(0, 116, 217, 0.2);
}

/* Responsive theme form */
@media (max-width: 768px) {

    .theme-mode-option {
        flex: 1;
        justify-content: center;
    }
}


/* ===== Text Utility Classes ===== */
.text-muted {
    color: var(--text-muted) !important;
}

/* ===== COMPREHENSIVE MOBILE RESPONSIVE STYLES ===== */

/* Smooth scrolling for better UX */
html {
    scroll-behavior: smooth;
}

/* Prevent horizontal overflow */
body {
    overflow-x: hidden;
}

/* Mobile-optimized scrollbar */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

::-webkit-scrollbar-track {
    background: var(--bg-secondary);
}

::-webkit-scrollbar-thumb {
    background: var(--navy-accent);
    border-radius: 3px;
}

/* Safe area padding for iOS devices with notch */
@supports (padding: max(0px)) {
    .mobile-bottom-nav {
        padding-bottom: max(env(safe-area-inset-bottom), 8px);
        height: calc(65px + env(safe-area-inset-bottom, 0px));
    }

    .main-content {
        padding-bottom: max(80px, calc(80px + env(safe-area-inset-bottom)));
    }
}

/* ===== Mobile Responsive (max-width: 768px) ===== */
@media (max-width: 768px) {
    /* Main content adjustments */
    .main-content {
        padding: 15px;
        padding-bottom: 90px;
    }

    /* Data section mobile */
    .data-section {
        padding: 15px;
        border-radius: 6px;
    }

    .section-header {
        flex-direction: column;
        gap: 12px;
        align-items: stretch;
    }

    .section-header h2 {
        font-size: 18px;
    }

    .section-header .btn {
        width: 100%;
        justify-content: center;
        padding: 14px 20px;
    }

    /* Buttons mobile - larger touch targets */
    .btn {
        padding: 14px 20px;
        font-size: 15px;
        min-height: 48px;
    }

    .btn-sm {
        padding: 12px 16px;
        min-height: 44px;
    }

    /* Form inputs mobile - larger touch targets */
    .form-group input,
    .form-group select,
    .form-group textarea {
        padding: 16px;
        font-size: 16px !important;
        min-height: 52px;
        border-radius: 6px;
    }

    .form-group label {
        font-size: 14px;
        margin-bottom: 10px;
    }

    .form-group {
        margin-bottom: 18px;
    }

    .form-actions {
        flex-direction: column;
        gap: 12px;
    }

    .form-actions .btn {
        width: 100%;
    }

    /* Modal mobile full screen */
    .modal-overlay {
        padding: 0;
        align-items: flex-end;
    }

    .modal {
        width: 100%;
        max-width: 100%;
        max-height: 95vh;
        border-radius: 16px 16px 0 0;
        margin: 0;
    }

    .modal-header {
        padding: 20px;
        border-radius: 16px 16px 0 0;
    }

    .modal-header h3 {
        font-size: 18px;
    }

    .close-btn {
        width: 40px;
        height: 40px;
        font-size: 24px;
    }

    .modal-body {
        padding: 20px;
        max-height: calc(95vh - 80px);
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
    }

    /* Settings page mobile */
    .settings-grid-2x2 {
        grid-template-columns: 1fr;
        gap: 15px;
    }

    .settings-mega-card {
        border-radius: 8px;
    }

    .settings-card-header {
        padding: 16px;
        flex-direction: column;
        text-align: center;
        gap: 12px;
    }

    .settings-card-icon {
        width: 48px;
        height: 48px;
        font-size: 22px;
    }

    .settings-card-title {
        font-size: 16px;
    }

    .settings-card-body {
        padding: 16px;
    }

    .control-group {
        padding: 15px;
        margin-bottom: 12px;
    }

    .control-group-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }

    .control-icon {
        width: 42px;
        height: 42px;
        font-size: 20px;
    }

    .control-title {
        font-size: 15px;
    }

    .control-toggle-wrapper {
        flex-direction: column;
        gap: 12px;
        padding: 14px;
    }

    /* Security features mobile */
    .security-feature {
        flex-direction: column;
        text-align: center;
        gap: 12px;
        padding: 14px;
    }

    .security-feature-icon {
        width: 40px;
        height: 40px;
        font-size: 18px;
    }

    /* Server info mobile */
    .server-info-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
        padding: 12px 0;
    }

    /* Stat items inline mobile */
    .stat-item-inline {
        flex-direction: column;
        text-align: center;
        gap: 10px;
        padding: 14px;
    }

    .stat-item-icon {
        width: 42px;
        height: 42px;
        font-size: 20px;
    }

    /* Status badges mobile */
    .status-badge {
        padding: 8px 12px;
        font-size: 12px;
    }

    /* Theme customization mobile */

    .theme-mode-option {
        padding: 12px !important;
    }

}

/* ===== Extra Small Devices (max-width: 480px) ===== */
@media (max-width: 480px) {
    .main-content {
        padding: 10px;
        padding-bottom: 85px;
    }

    .header {
        padding: 12px;
    }

    .header h1 {
        font-size: 16px;
    }

    .data-section {
        padding: 12px;
    }

    .section-header h2 {
        font-size: 16px;
    }

    .modal-body {
        padding: 15px;
    }

    .form-group input,
    .form-group select,
    .form-group textarea {
        padding: 14px;
    }

    /* Mobile bottom nav extra small */
    .mobile-nav-item {
        padding: 6px 8px;
        min-width: 50px;
    }

    .mobile-nav-item i {
        font-size: 18px;
    }

    .mobile-nav-item span {
        font-size: 9px;
    }
}

/* ===== Landscape Mobile Orientation ===== */
@media (max-height: 500px) and (orientation: landscape) {
    .mobile-bottom-nav {
        height: 55px;
    }

    .mobile-nav-item {
        padding: 5px 10px;
    }

    .mobile-nav-item i {
        font-size: 18px;
        margin-bottom: 2px;
    }

    .mobile-nav-item span {
        font-size: 9px;
    }

    .main-content {
        padding-bottom: 70px;
    }

    .modal {
        max-height: 100vh;
        border-radius: 0;
    }

    .modal-body {
        max-height: calc(100vh - 70px);
    }
}

/* ===== Touch Device Optimizations ===== */
@media (hover: none) and (pointer: coarse) {
    /* Larger touch targets for touch devices */
    .btn {
        min-height: 48px;
    }

    .mobile-nav-item {
        min-height: 56px;
    }

    /* Remove hover effects on touch devices */
    .btn:hover {
        transform: none;
    }

    /* Add active states for touch feedback */
    .btn:active {
        transform: scale(0.98);
        opacity: 0.9;
    }

    .mobile-nav-item:active {
        transform: scale(0.95);
        opacity: 0.9;
    }
}

/* ===== iOS Specific Fixes ===== */
@supports (-webkit-touch-callout: none) {
    /* Fix for iOS 100vh issue */

    .app-container {
        min-height: -webkit-fill-available;
    }

    /* Fix for iOS input zoom */
    input[type="text"],
    input[type="email"],
    input[type="password"],
    input[type="number"],
    input[type="tel"],
    select,
    textarea {
        font-size: 16px !important;
    }

    /* Fix for iOS momentum scrolling */
    .modal-body,
    .main-content,
    .sidebar {
        -webkit-overflow-scrolling: touch;
    }
}

/* ===== Pull to Refresh Prevention ===== */
body {
    overscroll-behavior-y: contain;
}

/* ===== Tablet Responsive (768px - 1024px) ===== */
@media (min-width: 769px) and (max-width: 1024px) {

    .settings-grid-2x2 {
        grid-template-columns: repeat(2, 1fr);
        gap: 15px;
    }

    .form-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .modal {
        width: 85%;
        max-width: 700px;
    }
}

/* ===== Print Styles ===== */
@media print {
    .sidebar,
.mobile-bottom-nav,
.sidebar-overlay,
.btn {
        display: none !important;
    }

    .main-content {
        margin: 0;
        padding: 20px;
    }

    .app-container {
        display: block;
    }
}

/* ===== Dark Mode Global Text Colors ===== */
body.dark-mode {
    color: var(--text-primary);
}

body.dark-mode h1,
body.dark-mode h2,
body.dark-mode h3,
body.dark-mode h4,
body.dark-mode h5,
body.dark-mode h6 {
    color: var(--text-primary) !important;
}

body.dark-mode p:not(:where(button, .btn, [role="button"], [role="tab"], [class*="-btn"], .tabulator-page, .rbac-rolehead, .uip-kpis), :where(button, .btn, [role="button"], [role="tab"], [class*="-btn"], .tabulator-page, .rbac-rolehead, .uip-kpis) *),
body.dark-mode span:not(.status-badge):not(.role-badge):not(.version-badge):not(.upload-badge):not(.chip):not(.val):not(:where(button, .btn, [role="button"], [role="tab"], [class*="-btn"], .tabulator-page, .rbac-rolehead, .uip-kpis), :where(button, .btn, [role="button"], [role="tab"], [class*="-btn"], .tabulator-page, .rbac-rolehead, .uip-kpis) *),
body.dark-mode div:not(.sidebar):not(.modal-header):not(.stat-card-icon):not(.settings-card-icon):not(:where(button, .btn, [role="button"], [role="tab"], [class*="-btn"], .tabulator-page, .rbac-rolehead, .uip-kpis), :where(button, .btn, [role="button"], [role="tab"], [class*="-btn"], .tabulator-page, .rbac-rolehead, .uip-kpis) *),
body.dark-mode label:not(:where(button, .btn, [role="button"], [role="tab"], [class*="-btn"], .tabulator-page, .rbac-rolehead, .uip-kpis), :where(button, .btn, [role="button"], [role="tab"], [class*="-btn"], .tabulator-page, .rbac-rolehead, .uip-kpis) *) {
    color: var(--text-secondary);
}

body.dark-mode .text-muted,
body.dark-mode em.text-muted {
    color: var(--text-muted) !important;
}

/* Profile Image Section Dark Mode */

body.dark-mode #defaultProfileIcon {
    color: var(--accent-ink) !important;
}

/* Form Labels and Text Dark Mode */
body.dark-mode .form-group label {
    color: var(--text-secondary);
}

body.dark-mode .form-group label i {
    color: var(--accent-ink);
}

/* Section Headers Dark Mode */
body.dark-mode .section-header h2 {
    color: var(--text-primary);
}

body.dark-mode .data-section {
    background: var(--bg-card);
}

/* Info/Help Text Dark Mode */
body.dark-mode [style*="color: #666"],
body.dark-mode [style*="color:#666"] {
    color: var(--text-muted) !important;
}

/* Warning/Disabled Messages Dark Mode */
body.dark-mode #uploadDisabledMessage {
    background: rgba(251, 188, 4, 0.1) !important;
    border-color: rgba(251, 188, 4, 0.4) !important;
    color: #ffd54f !important;
}

/* File Input Dark Mode */
body.dark-mode input[type="file"] {
    background: var(--bg-secondary) !important;
    border-color: var(--navy-accent) !important;
    color: var(--text-primary) !important;
}

/* Header Welcome Text Dark Mode */
body.dark-mode .header {
    background: var(--bg-card);
    color: var(--text-primary);
}

/* ===== Profile Image Section ===== */

.warning-message {
    padding: 15px;
    background: rgba(251, 188, 4, 0.15);
    border: 1px solid rgba(251, 188, 4, 0.5);
    border-radius: 6px;
    color: var(--warning);
    margin-top: 15px;
    font-size: 14px;
}

/* ===== Theme Customization Section Mobile ===== */
@media (max-width: 768px) {

    .theme-mode-option {
        flex: 1;
        justify-content: center;
        padding: 14px 16px !important;
    }
}

/* ===== Success Message ===== */
.success {
    margin-top: 15px;
    margin-bottom: 15px;
    color: var(--success);
    font-size: 14px;
    background: #f0fdf4;
    padding: 12px 16px;
    border-radius: 4px;
    border: 1px solid #bbf7d0;
}

body.dark-mode .success {
    background: rgba(52, 168, 83, 0.1);
    border-color: rgba(52, 168, 83, 0.3);
}

/* ===== Login Page Utilities ===== */

.login-link {
    color: var(--accent-ink);
    text-decoration: none;
    font-weight: 500;
}

.login-link:hover {
    text-decoration: none;
}

/* ===== OTP Input ===== */
.otp-input {
    text-align: center;
    font-size: 24px;
    letter-spacing: 8px;
    font-weight: bold;
}

/* ===== Full Width Button ===== */
.btn-block {
    width: 100%;
}

/* ===== Resend OTP Section ===== */
.resend-section {
    margin-top: 20px;
    text-align: center;
}

.resend-countdown {
    color: var(--text-muted);
    font-size: 13px;
    margin-bottom: 10px;
}

.resend-countdown .timer {
    font-weight: bold;
    color: var(--accent-ink);
}

/* ===== Card Icon Gradient Variants ===== */
.icon-gradient-navy {
    background: linear-gradient(135deg, var(--navy-primary) 0%, var(--navy-light) 100%);
}
.icon-gradient-success {
    background: linear-gradient(135deg, #34a853 0%, #2d9148 100%);
}
.icon-gradient-blue {
    background: linear-gradient(135deg, #0074D9 0%, #0056a8 100%);
}
.icon-gradient-warning {
    background: linear-gradient(135deg, #fbbc04 0%, #e0a800 100%);
}

/* ===== Stat Icon Color Variants ===== */
.stat-icon-success {
    background: rgba(52, 168, 83, 0.1);
    color: var(--success);
}
.stat-icon-accent {
    background: rgba(0, 116, 217, 0.1);
    color: var(--accent-ink);
}
.stat-icon-warning {
    background: rgba(251, 188, 4, 0.1);
    color: var(--warning);
}
.stat-icon-danger {
    background: rgba(234, 67, 53, 0.1);
    color: var(--danger);
}

/* ===== Layout Utilities ===== */
.mb-24 { margin-bottom: 24px; }
.mt-20 { margin-top: 20px; }

/* ===== Skeleton Helpers ===== */
.skeleton-card-mb { margin-bottom: 20px; }
.skeleton-grid-mb { margin-bottom: 30px; }
.skeleton-w-50 { width: 50%; }
.skeleton-w-60 { width: 60%; }
.skeleton-w-70 { width: 70%; }
.skeleton-w-80 { width: 80%; }
.skeleton-mb-sm { margin-bottom: 12px; }
.skeleton-mb-md { margin-bottom: 16px; }
.skeleton-flex-1 { flex: 1; }
.skeleton-flex-2 { flex: 2; }

/* ===== Dashboard Activity Table Cells ===== */

.ip-mask-wrap {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.ip-mask-wrap code {
    font-size: 12px;
    background: var(--bg-secondary);
    padding: 2px 8px;
    border-radius: 3px;
}

.ip-toggle-btn {
    background: none;
    border: none;
    cursor: pointer;
    color: var(--text-muted);
    font-size: 13px;
    padding: 2px 4px;
    transition: color 0.2s;
}

.ip-toggle-btn:hover {
    color: var(--text-primary);
}

/* ===== Status Text Helpers ===== */
.text-success { color: var(--success); }
.text-danger { color: var(--danger); }
.text-warning { color: var(--warning); }
.text-info { color: #0074D9; }
.text-muted { color: var(--text-muted); }

/* ===== Logo Upload Section (settings.php) ===== */
.logo-upload-row {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-top: 8px;
}
.logo-preview-img {
    width: 70px;
    height: 70px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid #e9ecef;
}
body.dark-mode .logo-preview-img {
    border-color: var(--border-color);
}
.logo-upload-controls {
    flex: 1;
}

/* ===== Form Grid Variants ===== */
.form-grid-2col {
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

/* ===== Theme Customization (account.php) ===== */
.hex-input {
    flex: 1;
    text-transform: uppercase;
}
.theme-mode-options {
    display: flex;
    gap: 20px;
    margin-top: 10px;
}
.theme-mode-option {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    padding: 12px 20px;
    border: 2px solid var(--border-color);
    border-radius: 4px;
    transition: all 0.3s;
}
.theme-mode-option input[type="radio"] {
    width: 18px;
    height: 18px;
}

/* ===== Profile Image Cover ===== */
.profile-img-cover {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* ===== Palette Gallery (UI Customization) ===== */
.palette-gallery {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(165px, 1fr));
    gap: 14px;
    margin-top: 10px;
}
.palette-card {
    position: relative;
    text-align: left;
    padding: 0;
    background: var(--bg-card);
    border: 2px solid var(--border-color);
    border-radius: 6px;
    cursor: pointer;
    overflow: hidden;
    transition: transform 0.15s, box-shadow 0.15s, border-color 0.15s;
}
.palette-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 18px var(--shadow-hover);
    border-color: var(--navy-accent);
}
.palette-card.active {
    border-color: var(--navy-accent);
    box-shadow: 0 0 0 2px var(--navy-accent) inset;
}
.palette-swatch {
    display: flex;
    height: 54px;
    width: 100%;
}
.palette-swatch span { flex: 1; }
.palette-meta { padding: 10px 12px; }
.palette-name {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: var(--text-primary);
    line-height: 1.2;
}
.palette-id {
    display: block;
    font-size: 11px;
    color: var(--text-muted);
    margin-top: 2px;
}
.palette-check {
    position: absolute;
    top: 8px;
    right: 8px;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: var(--navy-accent);
    color: var(--on-accent);
    display: none;
    align-items: center;
    justify-content: center;
    font-size: 11px;
}
.palette-card.active .palette-check { display: flex; }

/* ===== AdminLTE-style collapsible card (theme-aware) ===== */
.lte-card {
    background: var(--bg-card);
    border-radius: 6px;
    box-shadow: 0 2px 6px var(--shadow-color);
    margin-bottom: 22px;
    border-top: 1px solid var(--border-color);
    overflow: hidden;
}
.lte-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 14px 18px;
    border-bottom: 1px solid var(--border-color);
}
.lte-card-title {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0;
    display: flex;
    align-items: center;
    gap: 8px;
}
.lte-card-title i { color: var(--accent-ink); }
.lte-card-body { padding: 18px; }
.lte-card.collapsed .lte-card-body { display: none; }
.lte-card.collapsed { border-top-color: var(--border-color); }

/* current theme summary strip */
.theme-action-row {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    margin-top: 18px;
    padding-top: 16px;
    border-top: 1px solid var(--border-color);
}

/* ===== AdminLTE small-box KPI (dashboard) ===== */
.lte-kpi-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    margin-bottom: 20px;
}
@media (max-width: 1200px) { .lte-kpi-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 576px)  { .lte-kpi-grid { grid-template-columns: 1fr; } }

.small-box {
    position: relative;
    display: block;
    border-radius: 6px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
    color: #fff;
    overflow: hidden;
    transition: transform 0.25s;
}
.small-box:hover { transform: translateY(-3px); box-shadow: 0 4px 14px rgba(0, 0, 0, 0.2); }
.small-box .inner { padding: 18px 20px 12px; position: relative; z-index: 2; }
.small-box .inner h3 { font-size: clamp(24px, 4.5vw, 32px); font-weight: 700; margin: 0 0 6px; white-space: nowrap; }
.small-box .inner p { font-size: 14px; margin: 0; opacity: 0.95; }
.small-box .icon { position: absolute; top: 12px; right: 16px; z-index: 1; font-size: 64px; color: rgba(0, 0, 0, 0.15); transition: font-size 0.3s; }
.small-box:hover .icon { font-size: 70px; }
.small-box-footer {
    position: relative;
    display: block;
    width: 100%;
    padding: 8px 0;
    text-align: center;
    background: rgba(0, 0, 0, 0.12);
    color: rgba(255, 255, 255, 0.9);
    font-size: 13px;
    text-decoration: none;
    z-index: 3;
}
.small-box-footer:hover { background: rgba(0, 0, 0, 0.22); color: #fff; }

/* ===== Header tools: quick theme + language switcher ===== */
.header-tool-wrapper { position: relative; }
.header-tool-btn {
    background: transparent;
    border: none;
    cursor: pointer;
    font-size: 20px;
    color: #555;
    padding: 8px 10px;
    border-radius: 10px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    line-height: 1;
    transition: all 0.25s;
}
.header-tool-btn:hover { background: #f0f0f0; color: var(--navy-primary); }
.header-tool-btn .lang-current { font-size: 12px; font-weight: 700; }
body.dark-mode .header-tool-btn { color: var(--text-secondary); }
body.dark-mode .header-tool-btn:hover { background: var(--bg-primary); color: var(--text-primary); }

.header-tool-dropdown {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    box-shadow: 0 12px 34px var(--shadow-hover);
    z-index: 1200;
    display: none;
    overflow: hidden;
}
.header-tool-dropdown.open { display: block; }
.header-tool-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 14px;
    border-bottom: 1px solid var(--border-color);
}
.header-tool-header strong { color: var(--text-primary); font-size: 14px; display: flex; align-items: center; gap: 7px; }
.tq-head-btns { display: inline-flex; gap: 6px; }
.mode-toggle-btn {
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
    border-radius: 20px;
    padding: 5px 12px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    display: inline-flex;
    gap: 6px;
    align-items: center;
    transition: all 0.2s;
}
.mode-toggle-btn:hover { color: var(--accent-ink); border-color: var(--navy-accent); }

.theme-quick-menu { width: 296px; max-width: calc(100vw - 24px); }
.theme-quick-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 8px; padding: 14px; }
.theme-quick-swatch {
    padding: 0;
    border: 2px solid var(--border-color);
    border-radius: 8px;
    height: 34px;
    cursor: pointer;
    overflow: hidden;
    background: none;
    transition: transform 0.15s, border-color 0.15s, box-shadow 0.15s;
}
.theme-quick-swatch span { display: block; width: 100%; height: 100%; }
.theme-quick-swatch:hover { transform: translateY(-2px); border-color: var(--navy-accent); }
.theme-quick-swatch.active { border-color: var(--navy-accent); box-shadow: 0 0 0 2px var(--navy-accent) inset; }
.header-tool-footer {
    display: block;
    text-align: center;
    padding: 11px;
    font-size: 13px;
    font-weight: 600;
    color: var(--accent-ink);
    text-decoration: none;
    border-top: 1px solid var(--border-color);
}
.header-tool-footer:hover { background: var(--bg-primary); }

.lang-menu { min-width: 214px; max-height: 340px; overflow-y: auto; padding: 6px; }
.lang-item {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    background: none;
    border: none;
    padding: 9px 11px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 13.5px;
    color: var(--text-primary);
    text-align: left;
}
.lang-item:hover { background: var(--bg-primary); }
.lang-item.active { background: rgba(0, 116, 217, 0.12); color: var(--accent-ink); font-weight: 700; }
.lang-item .lang-check { margin-left: auto; color: var(--accent-ink); font-size: 12px; }
[dir="rtl"] .header-tool-dropdown { right: auto; left: 0; }
[dir="rtl"] .lang-item { text-align: right; }

/* ===== Header: search + account menu ===== */
.hdr-search-wrap { flex: 0 1 300px; min-width: 0; }
.hdr-search {
    display: flex; align-items: center; gap: 9px;
    height: 40px; padding: 0 14px;
    border: 1px solid var(--border-color);
    border-radius: 10px;
    background: var(--bg-primary);
    transition: border-color 0.2s, box-shadow 0.2s;
}
.hdr-search:focus-within { border-color: var(--navy-accent); box-shadow: 0 0 0 3px rgba(var(--navy-accent-rgb), 0.14); }
.hdr-search i { color: var(--text-muted); font-size: 14px; flex-shrink: 0; }
.hdr-search input {
    flex: 1; min-width: 0;
    border: 0; outline: 0; background: none;
    color: var(--text-primary); font-family: inherit; font-size: 14px;
}
.hdr-search input::-webkit-search-cancel-button { -webkit-appearance: none; }

.search-menu { width: 340px; max-width: calc(100vw - 24px); padding: 6px; }
.search-hit {
    display: flex; align-items: center; gap: 11px;
    padding: 9px 11px;
    border-radius: 9px;
    color: var(--text-primary); text-decoration: none; font-size: 13.5px;
}
.search-hit i { color: var(--accent-ink); width: 17px; text-align: center; flex-shrink: 0; }
.search-hit span { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.search-hit em {
    display: none;
    font-style: normal; font-size: 11px; color: var(--text-muted); white-space: nowrap;
}
.search-hit.on, .search-hit:hover { background: var(--bg-primary); }
.search-hit.on em { display: inline; }

.moon-btn { position: relative; }
.hdr-user {
    display: inline-flex; align-items: center; gap: 9px;
    max-width: 190px; padding: 5px 12px 5px 5px;
    border: 1px solid var(--border-color); border-radius: 999px;
    background: var(--bg-card);
    color: var(--text-primary); font-family: inherit; font-size: 14px; font-weight: 600;
    cursor: pointer;
    transition: border-color 0.2s;
}
.hdr-user:hover { border-color: var(--navy-accent); }
.hdr-user-av { width: 32px; height: 32px; border-radius: 50%; object-fit: cover; flex-shrink: 0; }
.hdr-user-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hdr-user-caret { font-size: 11px; color: var(--text-muted); transition: transform 0.2s; }
.hdr-user-wrap:has(.header-tool-dropdown.open) .hdr-user-caret { transform: rotate(180deg); }

.user-menu { width: 268px; padding: 6px; }
.user-card {
    display: flex; align-items: center; gap: 12px;
    padding: 12px 12px 14px;
    border-bottom: 1px solid var(--border-color);
    margin-bottom: 6px;
}
.user-card img { width: 44px; height: 44px; border-radius: 50%; object-fit: cover; flex-shrink: 0; }
.user-card-txt { min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.user-card-txt strong { font-size: 14.5px; color: var(--text-primary); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.user-card-txt small { font-size: 12.5px; color: var(--text-muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.user-link {
    display: flex; align-items: center; gap: 12px;
    padding: 11px 12px;
    border-radius: 9px;
    color: var(--text-primary); text-decoration: none; font-size: 14px; font-weight: 500;
}
.user-link i { width: 17px; text-align: center; color: var(--accent-ink); font-size: 15px; }
.user-link:hover { background: var(--bg-primary); }
.user-link.danger, .user-link.danger i { color: var(--danger); }

@media (max-width: 1100px) { .hdr-search-wrap { display: none; } }
@media (max-width: 640px) { .hdr-user-name, .hdr-user-caret { display: none; } .hdr-user { padding: 4px; border: 0; } }

/* dark mode — span/div blanket at 3692 is (0,5,2) */
body.dark-mode .hdr-search { background: var(--bg-secondary); }
body.dark-mode .hdr-user-name,
body.dark-mode .user-card-txt strong { color: var(--text-primary) !important; }
body.dark-mode .user-card-txt small,
body.dark-mode .search-hit em { color: var(--text-muted) !important; }
body.dark-mode .search-hit span,
body.dark-mode .user-link { color: var(--text-primary) !important; }
body.dark-mode .user-link.danger { color: var(--danger) !important; }
body.dark-mode .search-hit.on, body.dark-mode .search-hit:hover,
body.dark-mode .user-link:hover { background: var(--bg-secondary); }
/* ===== Header messages dropdown ===== */
.msg-btn { position: relative; }
.msg-dot {
    position: absolute; top: 5px; right: 7px;
    width: 9px; height: 9px;
    border-radius: 50%;
    background: var(--danger);
    border: 2px solid var(--bg-card);
}
.msg-menu { width: 340px; max-width: calc(100vw - 24px); }
.msg-head {
    display: flex; align-items: center; justify-content: space-between; gap: 12px;
    padding: 15px 18px 11px;
}
.msg-head strong { font-size: 15px; font-weight: 700; color: var(--text-primary); }
.msg-head a { font-size: 12.5px; font-weight: 600; color: var(--accent-ink); text-decoration: none; }
.msg-body { max-height: 392px; overflow-y: auto; padding-bottom: 6px; }
.msg-item {
    display: flex; align-items: center; gap: 12px;
    padding: 10px 18px;
    text-decoration: none;
    transition: background 0.15s;
}
.msg-item:hover { background: var(--bg-primary); }
.msg-av { width: 42px; height: 42px; border-radius: 50%; object-fit: cover; flex-shrink: 0; }
.msg-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.msg-top { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; }
.msg-top strong { font-size: 14px; font-weight: 700; color: var(--text-primary); }
.msg-time { font-size: 12px; color: var(--text-muted); flex-shrink: 0; white-space: nowrap; }
.msg-bot { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.msg-prev {
    font-size: 12.5px; color: var(--text-muted);
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0;
}
.msg-item.unread .msg-prev { color: var(--text-primary); font-weight: 600; }
.msg-pill {
    flex-shrink: 0;
    min-width: 20px; height: 20px;
    padding: 0 6px;
    display: inline-flex; align-items: center; justify-content: center;
    border-radius: 10px;
    background: var(--danger);
    color: #fff; font-size: 11px; font-weight: 700; font-style: normal;
}
.msg-none {
    display: flex; flex-direction: column; align-items: center; gap: 9px;
    padding: 34px 18px;
    color: var(--text-muted); font-size: 13px;
}
.msg-none i { font-size: 26px; opacity: 0.45; }

/* dark mode — the span blanket at 3692 is (0,5,2), so these need !important */
body.dark-mode .msg-prev,
body.dark-mode .msg-time,
body.dark-mode .msg-none span { color: var(--text-muted) !important; }
body.dark-mode .msg-item.unread .msg-prev { color: var(--text-primary) !important; }
body.dark-mode .msg-item:hover { background: var(--bg-secondary); }
body.dark-mode .msg-dot { border-color: var(--bg-card); }

/* keep the GT widget rendered (so the combo builds) but off-screen — NOT display:none */
.gt-offscreen {
    position: absolute !important;
    left: -9999px !important;
    top: -9999px !important;
    width: 1px;
    height: 1px;
    overflow: hidden;
}

/* extra google-translate chrome hiding */
.goog-te-gadget { font-size: 0 !important; }
.goog-te-gadget span, .goog-logo-link { display: none !important; }
.goog-tooltip, .goog-tooltip:hover, #goog-gt-tt, .goog-te-balloon-frame { display: none !important; }
.goog-text-highlight { background: none !important; box-shadow: none !important; }

/* ===== New Classes Mobile Responsive ===== */
@media (max-width: 768px) {

    .form-grid-2col { grid-template-columns: 1fr; }
    .palette-gallery { grid-template-columns: repeat(auto-fill, minmax(135px, 1fr)); gap: 10px; }
    .theme-action-row .btn { flex: 1; justify-content: center; }
    .theme-mode-options { flex-direction: column; gap: 10px; }
    .logo-upload-row { flex-direction: column; align-items: flex-start; }

}

/* ===== Utility Classes ===== */
.initially-hidden {
    display: none;
}

/* ===== Select2 Theme Integration ===== */
.select2-container {
    width: 100% !important;
}

.select2-container--default .select2-selection--single {
    height: 42px;
    border: 1px solid var(--input-border);
    border-radius: 6px;
    background: var(--input-bg);
}

.select2-container--default .select2-selection--single .select2-selection__rendered {
    line-height: 40px;
    color: var(--text-primary);
    padding-left: 12px;
}

.select2-container--default .select2-selection--single .select2-selection__arrow {
    height: 40px;
}

.select2-container--default .select2-selection--single .select2-selection__placeholder {
    color: var(--text-muted);
}

.select2-dropdown {
    background: var(--bg-secondary);
    border: 1px solid var(--input-border);
    border-radius: 6px;
    z-index: 10060;
}

.select2-container--default .select2-search--dropdown .select2-search__field {
    border: 1px solid var(--input-border);
    border-radius: 4px;
    padding: 6px 10px;
    background: var(--input-bg);
    color: var(--text-primary);
}

.select2-container--default .select2-results__option {
    padding: 8px 12px;
    color: var(--text-primary);
}

.select2-container--default .select2-results__option--highlighted[aria-selected] {
    background-color: var(--navy-accent);
    color: var(--on-accent);
}

.select2-container--default .select2-results__option[aria-selected=true] {
    background-color: var(--bg-primary);
}

body.dark-mode .select2-container--default .select2-selection--single {
    background: var(--input-bg);
    border-color: var(--input-border);
}

body.dark-mode .select2-dropdown {
    background: var(--bg-secondary);
    border-color: var(--input-border);
}

body.dark-mode .select2-container--default .select2-search--dropdown .select2-search__field {
    background: var(--input-bg);
    border-color: var(--input-border);
    color: var(--text-primary);
}

body.dark-mode .select2-container--default .select2-results__option {
    color: var(--text-primary);
}

body.dark-mode .select2-container--default .select2-results__option[aria-selected=true] {
    background-color: var(--bg-primary);
}

/* ===== Breadcrumbs ===== */
.breadcrumb {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 0 12px 0;
    font-size: 13px;
    color: var(--text-muted);
}

.breadcrumb a {
    color: var(--accent-ink);
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 4px;
    transition: color 0.2s;
}

.breadcrumb a:hover {
    color: var(--navy-primary);
    text-decoration: none;
}

.breadcrumb a i {
    font-size: 12px;
}

body.dark-mode .breadcrumb a:hover {
    color: #fff;
}

/* ===== Maintenance Card Warning (Settings) ===== */
.maintenance-card-warning {
    border-color: #ffc107;
}

.maintenance-card-warning:hover {
    border-color: #ff9800;
}

.icon-gradient-danger {
    background: linear-gradient(135deg, #ea4335, #ff6b6b);
}

.info-banner-warning {
    background: #fff3cd;
    border-left: 4px solid #ffc107;
    color: #856404;
}

body.dark-mode .info-banner-warning {
    background: rgba(255, 193, 7, 0.1);
    border-left-color: #ffc107;
    color: #ffc107;
}

.text-danger {
    color: #ea4335 !important;
}

/* ===== Notification Bell ===== */
/* view-transition-name (bottom of this file) turns .header-right into its own
   stacking context, so the panels inside it can't out-paint later content on
   z-index alone. Lift the whole context: above page content, still under the
   sidebar (999/1001) and modal overlays (1000). */
.header-right {
    display: flex;
    align-items: center;
    gap: 16px;
    position: relative;
    z-index: 900;
}

.notification-bell-wrapper {
    position: relative;
}

.notification-bell-btn {
    background: transparent;
    border: none;
    cursor: pointer;
    font-size: 20px;
    color: #555;
    position: relative;
    padding: 8px;
    border-radius: 50%;
    transition: all 0.3s;
}

.notification-bell-btn:hover {
    background: #f0f0f0;
    color: var(--navy-primary);
}

.notification-badge {
    position: absolute;
    top: 2px;
    right: 2px;
    background: #ea4335;
    color: white;
    font-size: 10px;
    font-weight: 700;
    min-width: 18px;
    height: 18px;
    border-radius: 9px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 4px;
    line-height: 1;
}

.notification-dropdown {
    position: absolute;
    top: 100%;
    right: 0;
    width: 360px;
    max-height: 420px;
    background: white;
    border-radius: 4px;
    box-shadow: 0 4px 24px rgba(0,0,0,0.15);
    border: 1px solid #e0e0e0;
    z-index: 1000;
    display: none;
    overflow: hidden;
}

.notification-dropdown.open {
    display: block;
}

.notification-dropdown-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 14px 16px;
    border-bottom: 1px solid #eee;
    background: #f8f9fa;
}

.notification-dropdown-header strong {
    font-size: 15px;
    color: var(--navy-primary);
}

.notification-dropdown-header button {
    background: transparent;
    border: none;
    color: var(--accent-ink);
    font-size: 12px;
    cursor: pointer;
    font-weight: 600;
}

.notification-dropdown-header button:hover {
    text-decoration: none;
}

.notification-dropdown-body {
    max-height: 340px;
    overflow-y: auto;
}

.notification-empty {
    text-align: center;
    padding: 40px 20px;
    color: #999;
    font-size: 14px;
}

.notification-empty i {
    font-size: 32px;
    margin-bottom: 8px;
    display: block;
}

.notification-item {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 12px 16px;
    border-bottom: 1px solid #f5f5f5;
    cursor: pointer;
    transition: background 0.2s;
}

.notification-item:hover {
    background: #f8f9fa;
}

.notification-item.unread {
    background: #e8f4fd;
    border-left: 3px solid var(--navy-accent);
}

.notification-item.unread:hover {
    background: #d6ecfb;
}

.notification-item-icon {
    font-size: 18px;
    margin-top: 2px;
    flex-shrink: 0;
}

.notification-item-content {
    flex: 1;
    min-width: 0;
}

.notification-item-title {
    font-weight: 600;
    font-size: 13px;
    color: #333;
    margin-bottom: 2px;
}

.notification-item-message {
    font-size: 12px;
    color: #666;
    line-height: 1.4;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.notification-item-time {
    font-size: 11px;
    color: #999;
    margin-top: 4px;
}

.notification-item-mark {
    background: transparent;
    border: none;
    color: #999;
    cursor: pointer;
    padding: 4px;
    font-size: 12px;
    flex-shrink: 0;
    margin-top: 2px;
}

.notification-item-mark:hover {
    color: #34a853;
}

/* Dark Mode — Notification Bell */
body.dark-mode .notification-bell-btn {
    color: var(--text-secondary);
}

body.dark-mode .notification-bell-btn:hover {
    background: rgba(255,255,255,0.1);
    color: white;
}

body.dark-mode .notification-dropdown {
    background: var(--bg-secondary);
    border-color: var(--border-color);
}

body.dark-mode .notification-dropdown-header {
    background: var(--bg-primary);
    border-bottom-color: var(--border-color);
}

body.dark-mode .notification-dropdown-header strong {
    color: var(--text-primary);
}

body.dark-mode .notification-item {
    border-bottom-color: var(--border-color);
}

body.dark-mode .notification-item:hover {
    background: var(--bg-primary);
}

body.dark-mode .notification-item.unread {
    background: rgba(0, 116, 217, 0.1);
    border-left-color: var(--navy-accent);
}

body.dark-mode .notification-item.unread:hover {
    background: rgba(0, 116, 217, 0.15);
}

body.dark-mode .notification-item-title {
    color: var(--text-primary);
}

body.dark-mode .notification-item-message {
    color: var(--text-secondary);
}

body.dark-mode .notification-item-time {
    color: var(--text-muted);
}

/* ===== About Section Styles ===== */

.about-table-wrapper {
    overflow-x: auto;
    margin: 15px 0;
}

.about-roles-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}

.about-roles-table th,
.about-roles-table td {
    padding: 12px 15px;
    text-align: center;
    border: 1px solid #e0e0e0;
}

.about-roles-table th {
    background: var(--navy-primary);
    color: white;
    font-weight: 600;
}

.about-roles-table th:first-child {
    text-align: left;
}

.about-roles-table td:first-child {
    text-align: left;
    font-weight: 500;
    background: #f8f9fa;
}

.role-badge {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 3px;
    font-size: 12px;
    font-weight: 600;
}

.role-admin {
    background: #d4edda;
    color: #155724;
}

.role-sf {
    background: #cce5ff;
    color: #004085;
}

.text-success {
    color: var(--success) !important;
}

/* login footer contact block */
.auth-contact { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 16px; font-size: 13px; }
.auth-contact-title { font-weight: 700; color: var(--text-primary); }
.auth-contact-links { display: inline-flex; flex-wrap: wrap; gap: 16px; }
.auth-contact-links a { display: inline-flex; align-items: center; gap: 6px; min-height: 32px; color: var(--auth-link, var(--navy-accent)); font-weight: 600; text-decoration: none; }
.auth-contact-links a:hover { text-decoration: none; }
/* the span blanket is (0,7,2) — a plain class rule loses to it */
body.dark-mode .auth-contact-title { color: var(--text-primary) !important; }

/* Dark Mode — About Section */

body.dark-mode .about-roles-table th {
    background: var(--navy-primary);
}

body.dark-mode .about-roles-table td {
    border-color: var(--border-color);
    color: var(--text-secondary);
}

body.dark-mode .about-roles-table td:first-child {
    background: var(--bg-primary);
}

/* Mobile — Notification Dropdown */
@media (max-width: 768px) {
    .notification-dropdown {
        width: 300px;
        right: -40px;
    }

    .header-right {
        gap: 10px;
        font-size: 13px;
    }

}

/* RBAC matrix — sticky grid (roles.php) */
.rbac-wrap {
    overflow: auto;
    border: 1px solid var(--border-color);
    max-height: 72vh;
    margin: 15px 0;
}

.rbac-table {
    border-collapse: separate;
    border-spacing: 0;
    font-size: 12px;
    width: 100%;
    table-layout: fixed; /* role cols split equally, fills 100% */
}

.rbac-table th,
.rbac-table td {
    border-bottom: 1px solid var(--border-color);
    border-right: 1px solid var(--border-light);
    padding: 6px 8px;
    text-align: center;
    white-space: nowrap;
    background: var(--bg-card);
}

.rbac-table thead th {
    position: sticky;
    top: 0;
    z-index: 3;
    background: #f5f8fc;
}

.rbac-rolehead {
    color: #fff;
    padding: 5px 9px;
    font-weight: 700;
    font-size: 11px;
    display: inline-block;
    min-width: 74px;
    border-radius: 3px;
}

.rbac-perm-legend {
    font-size: 10px;
    color: var(--text-muted);
    margin-top: 3px;
    letter-spacing: 1px;
}

.rbac-table th.rbac-pagecol,
.rbac-table td.rbac-pagecol {
    position: sticky;
    left: 0;
    z-index: 2;
    text-align: left;
    font-weight: 600;
    color: var(--navy-primary);
    background: var(--bg-card);
    width: 200px; /* fixed; rest splits equally among roles */
    box-shadow: 1px 0 0 var(--border-color);
}

.rbac-table thead th.rbac-pagecol {
    z-index: 4;
    background: #f5f8fc;
}

.rbac-grouprow td {
    background: #eef2f7 !important;
    color: #5a6b7b;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-size: 10px;
    text-align: left;
}

.rbac-cell {
    display: flex;
    gap: 4px;
    justify-content: center;
    flex-wrap: wrap; /* wrap V·A·E·D when many roles shrink cols */
}

/* impersonation — "login as this user" */
.impersonate-notice {
    margin: 10px;
    padding: 10px 12px;
    background: #fff3cd;
    border: 1px solid #ffe69c;
    border-radius: 6px;
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 12px;
    color: #664d03;
}
.impersonate-notice > i { font-size: 18px; color: #997404; flex-shrink: 0; }
.impersonate-text { display: flex; flex-direction: column; gap: 2px; line-height: 1.3; }
.impersonate-text span { font-weight: 600; }
.impersonate-text a { color: #0074D9; font-weight: 700; text-decoration: none; }
.impersonate-text a:hover { text-decoration: none; }
body.dark-mode .impersonate-notice { background: #3a2f00; border-color: #5c4a00; color: #ffe69c; }
body.dark-mode .impersonate-text a { color: #4aa3ff; }

.rbac-dot {
    width: 24px;
    height: 24px;
    border: 1px solid #d4d4d4;
    background: #fff;
    color: var(--text-muted);
    font-size: 10px;
    font-weight: 800;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.12s;
    border-radius: 0;
}

.rbac-dot:hover {
    border-color: var(--navy-accent);
}

.rbac-dot.on {
    background: var(--success);
    border-color: var(--success);
    color: #fff;
}

.rbac-dot.locked {
    opacity: 0.45;
    cursor: not-allowed;
}

.rbac-dot.on.locked {
    background: #9bbf9e;
    border-color: #9bbf9e;
}

/* perm letters in About roles table */
.perm-on {
    display: inline-block;
    min-width: 16px;
    font-weight: 800;
    font-size: 12px;
    color: var(--success);
    letter-spacing: 1px;
}

.perm-off {
    display: inline-block;
    min-width: 16px;
    font-weight: 600;
    font-size: 12px;
    color: var(--text-muted);
    letter-spacing: 1px;
}

/* User role badge (Admin badge already defined above) */
.role-user {
    background: #cce5ff;
    color: #004085;
}

/* Per-user access (roles.php User Access tab) */
.rbac-tabs {
    display: flex;
    gap: 6px;
    margin: 0 0 16px;
    border-bottom: 2px solid var(--border-color);
}

.rbac-tab {
    background: transparent;
    border: none;
    border-radius: var(--r-ctrl, 6px);
    margin-bottom: 0;
    padding: 10px 18px;
    font-size: 13px;
    font-weight: 700;
    color: var(--text-muted);
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 7px;
    transition: all 0.15s;
}

.rbac-tab:hover { color: var(--accent-ink); }

.rbac-tab.active {
    color: var(--navy-primary);
    background: rgba(var(--navy-accent-rgb), .1);
}

.rbac-userpick { max-width: 420px; margin-bottom: 16px; }

.rbac-userbar {
    display: flex;
    align-items: center;
    gap: 14px;
    flex-wrap: wrap;
    padding: 12px 14px;
    margin-bottom: 12px;
    background: var(--bg-body);
    border: 1px solid var(--border-color);
    border-left: 3px solid var(--navy-accent);
}

.rbac-userbar-main {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 13px;
    color: var(--navy-primary);
}

.rbac-userbar-main > i { font-size: 18px; color: var(--accent-ink); }

.rbac-userbar-sub {
    display: block;
    font-size: 11px;
    font-weight: 500;
    color: var(--text-muted);
}

.rbac-ovr-chip {
    padding: 4px 10px;
    font-size: 11px;
    font-weight: 700;
    background: #fdecd6;
    color: #c4701a;
    border: 1px solid #f8dab4;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.rbac-ovr-chip.off {
    background: #e2f6ea;
    color: #1f8b4c;
    border-color: #c7eed6;
}

.rbac-selfnote {
    font-size: 11px;
    font-weight: 600;
    color: var(--text-muted);
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

/* the exception marker — this cell no longer follows the role */
.rbac-dot.ovr {
    box-shadow: 0 0 0 2px #e8a200;
    border-color: #e8a200;
}

.rbac-ovr-key {
    display: inline-block;
    width: 11px;
    height: 11px;
    vertical-align: -1px;
    background: var(--success);
    box-shadow: 0 0 0 2px #e8a200;
}

.rbac-utable { table-layout: auto; }
.rbac-utable td, .rbac-utable th { text-align: center; }

.rbac-hardnote {
    font-size: 11px;
    color: var(--text-muted);
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

.rbac-empty {
    padding: 40px 20px;
    text-align: center;
    color: var(--text-muted);
}

.rbac-empty > i { font-size: 34px; opacity: 0.4; display: block; margin-bottom: 10px; }
.rbac-empty p { font-size: 13px; margin: 0; }

/* users.php per-user access shortcut */
.act-perm { color: var(--navy-light); font-size: 15px; }
body.dark-mode .act-perm { color: color-mix(in srgb, var(--navy-light) 45%, #fff); }
.act-perm:hover { transform: scale(1.18); }

/* Dark Mode — RBAC matrix */
body.dark-mode .rbac-wrap {
    border-color: var(--border-color);
}

body.dark-mode .rbac-table th,
body.dark-mode .rbac-table td {
    border-bottom-color: var(--border-color);
    border-right-color: var(--border-light);
    background: var(--bg-card);
    color: var(--text-secondary);
}

body.dark-mode .rbac-table thead th,
body.dark-mode .rbac-table thead th.rbac-pagecol {
    background: var(--navy-dark);
}

body.dark-mode .rbac-table td.rbac-pagecol {
    color: var(--text-primary);
    background: var(--bg-card);
    box-shadow: 1px 0 0 var(--border-color);
}

body.dark-mode .rbac-grouprow td {
    background: var(--bg-primary) !important;
    color: var(--text-muted);
}

body.dark-mode .rbac-dot {
    background: var(--bg-secondary);
    border-color: var(--border-color);
    color: var(--text-muted);
}

body.dark-mode .rbac-dot.on {
    background: var(--success);
    border-color: var(--success);
    color: #fff;
}

body.dark-mode .perm-off {
    color: #5a5a78;
}

/* ===== Slight curved feel — global rounding polish (subtle, dashboard-wide) ===== */
/* larger surfaces / cards */
.data-section,
.lte-card,
.settings-mega-card,
.notification-dropdown,
.header-tool-dropdown,
.about-table-wrapper,
.small-box,
.info-box { border-radius: 14px !important; }

/* controls / chips / smaller elements */
.palette-card,
.notification-item,
.btn,
.mode-toggle-btn,
.lang-item,
.theme-quick-swatch,
.hex-input,
.data-section input:not([type="file"]),
.data-section select,
.data-section textarea,
input[type="text"],
input[type="email"],
input[type="password"],
input[type="number"],
input[type="search"],
input[type="tel"],
input[type="url"],
input[type="date"],
select,
textarea { border-radius: 10px !important; }
/* file input stays squared per DaisyUI standard — do not round */

/* ===== Smooth SPA-like navigation (View Transitions) ===== */
/* opt every page into cross-document transitions — clicking the sidebar crossfades
   the content while the sidebar / bottom-nav / header tools stay put (no white flash).
   Unsupported browsers just navigate normally (graceful fallback). */
@view-transition { navigation: auto; }

.sidebar           { view-transition-name: app-sidebar; }
.mobile-bottom-nav { view-transition-name: app-mobilenav; }
.header-right      { view-transition-name: app-headertools; }

/* persistent chrome — snap instantly, don't crossfade */
::view-transition-group(app-sidebar),
::view-transition-group(app-mobilenav),
::view-transition-group(app-headertools) { animation-duration: 0s; }

/* content area — gentle crossfade + rise */
::view-transition-old(root) { animation: rsPageOut 0.16s ease both; }
::view-transition-new(root) { animation: rsPageIn 0.30s ease both; }
@keyframes rsPageOut { to { opacity: 0; } }
@keyframes rsPageIn { from { opacity: 0; transform: translateY(8px); } }

@media (prefers-reduced-motion: reduce) {
    ::view-transition-old(root), ::view-transition-new(root) { animation: none; }
}

/* ===== DaisyUI-style file input — squared button, follows the user's palette ===== */
.file-input {
    display: block;
    width: 100%;
    height: 48px;
    line-height: 46px;
    padding: 0;
    font-size: 16px;
    color: var(--text-secondary);
    background: var(--input-bg);
    border: 1px solid var(--input-border);
    border-radius: 10px;
    cursor: pointer;
    overflow: hidden;
    transition: border-color 0.25s, box-shadow 0.25s;
}
.file-input:hover  { border-color: var(--navy-accent); }
.file-input:focus  { outline: none; border-color: var(--navy-accent); box-shadow: 0 0 0 3px rgba(var(--navy-accent-rgb), 0.18); }
.file-input:disabled { opacity: 0.55; cursor: not-allowed; }
.file-input::file-selector-button {
    height: 46px;
    margin: 0 14px 0 0;
    padding: 0 20px;
    border: 0;
    border-right: 1px solid var(--input-border);
    border-radius: 0;
    background: rgba(var(--navy-accent-rgb), 0.14);
    color: var(--accent-ink);
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    transition: background 0.25s, color 0.25s;
}
.file-input::file-selector-button:hover { background: var(--navy-accent); color: var(--on-accent); }

/* ===== Upload drop zone (sidebar.php upgrades every .file-input) — dashed zone, picked file card, inline error ===== */
.rs-drop { position: relative; display: block; min-height: 76px; padding: 14px 16px; border: 1.5px dashed color-mix(in srgb, var(--navy-accent) 45%, var(--border-color));
    border-radius: var(--r-ctrl, 4px); background: rgba(var(--navy-accent-rgb), .04); transition: border-color .2s, background .2s, box-shadow .2s; }
.rs-drop .rs-drop-input { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; padding: 0; opacity: 0; cursor: pointer; z-index: 1; font-size: 16px; border: 0; }
.rs-drop:hover, .rs-drop.is-over { border-color: var(--navy-accent); background: rgba(var(--navy-accent-rgb), .08); }
.rs-drop.is-over { box-shadow: 0 0 0 4px rgba(var(--navy-accent-rgb), .14); }
.rs-drop:focus-within { border-color: var(--navy-accent); box-shadow: 0 0 0 3px rgba(var(--navy-accent-rgb), .18); }
.rs-drop:has(.rs-drop-input:disabled) { opacity: .55; }
.rs-drop:has(.rs-drop-input:disabled) .rs-drop-input { cursor: not-allowed; }
.rs-drop-empty, .rs-drop-file { display: flex; align-items: center; gap: 14px; min-width: 0; }
.rs-drop-file, .rs-drop-err { display: none; }
.rs-drop[data-state="ready"] .rs-drop-empty { display: none; }
.rs-drop[data-state="ready"] .rs-drop-file { display: flex; }
.rs-drop[data-state="error"] { border-color: var(--danger); background: color-mix(in srgb, var(--danger) 6%, transparent); }
.rs-drop[data-state="error"] .rs-drop-err { display: block; margin-top: 8px; font-size: 12.5px; font-weight: 600; color: var(--danger); }
.rs-drop-ico { flex: 0 0 44px; height: 44px; display: inline-flex; align-items: center; justify-content: center; border-radius: var(--r-ctrl, 4px);
    background: rgba(var(--navy-accent-rgb), .12); color: var(--accent-ink); font-size: 19px; }
.rs-drop-txt { min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.rs-drop-txt strong { font-size: 14px; font-weight: 600; color: var(--text-primary); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rs-drop-txt strong u { color: var(--accent-ink); text-decoration-thickness: 1.5px; }
.rs-drop-txt small { font-size: 12px; color: var(--text-muted); }
.rs-drop-thumb { flex: 0 0 44px; height: 44px; display: inline-flex; align-items: center; justify-content: center; overflow: hidden; border-radius: var(--r-ctrl, 4px);
    background: rgba(var(--navy-accent-rgb), .12); color: var(--accent-ink); font-size: 20px; border: 1px solid var(--border-color); }
.rs-drop-thumb img { width: 100%; height: 100%; object-fit: cover; }
.rs-drop-file .rs-drop-txt { flex: 1; }
.rs-drop-x { position: relative; z-index: 2; flex: 0 0 34px; height: 34px; border: 1px solid var(--border-color); border-radius: var(--r-chip, 3px);
    background: var(--bg-card); color: var(--text-muted); cursor: pointer; }
.rs-drop-x:hover { color: var(--danger); border-color: var(--danger); }
@media (max-width: 600px) { .rs-drop { padding: 12px; } .rs-drop-ico, .rs-drop-thumb { flex-basis: 38px; height: 38px; } }

/* ===== My Account — themed cards (every colour here rides the theme vars) ===== */
.acct-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 14px;
    box-shadow: 0 2px 10px var(--shadow-color);
    padding: 22px 24px 24px;
    margin-bottom: 20px;
    transition: background-color 0.3s ease, border-color 0.3s ease;
}
.acct-head { display: flex; align-items: center; gap: 12px; margin-bottom: 20px; }
.acct-head-txt h2 { font-size: 17px; font-weight: 700; color: var(--text-primary); margin: 0; }
.acct-head-txt p  { font-size: 13px; color: var(--text-muted); margin: 3px 0 0; }
.acct-chip {
    flex: 0 0 38px; width: 38px; height: 38px;
    display: inline-flex; align-items: center; justify-content: center;
    border-radius: 11px;
    background: rgba(var(--navy-accent-rgb), 0.13);
    font-size: 16px;
}
.acct-chip i { color: var(--accent-ink); }

/* profile photo + upload */
.acct-photo { display: flex; align-items: flex-start; gap: 26px; flex-wrap: wrap; }
.acct-avatar-col { flex: 0 0 auto; text-align: center; }
.acct-avatar {
    position: relative;
    width: 116px; height: 116px;
    display: flex; align-items: center; justify-content: center;
    border-radius: 50%;
    background: rgba(var(--navy-accent-rgb), 0.12);
    border: 1px solid rgba(var(--navy-accent-rgb), 0.28);
}
.acct-avatar img { width: 100%; height: 100%; border-radius: 50%; object-fit: cover; }
.acct-avatar #defaultProfileIcon { font-size: 52px; color: rgba(var(--navy-accent-rgb), 0.75); }
.acct-avatar-cam {
    position: absolute; right: 2px; bottom: 4px;
    width: 30px; height: 30px;
    display: flex; align-items: center; justify-content: center;
    border-radius: 50%;
    background: var(--navy-primary);
    border: 2px solid var(--bg-card);
}
.acct-avatar-cam i { color: #fff; font-size: 12px; }
.acct-avatar-label { margin-top: 12px; font-size: 12.5px; color: var(--text-muted); }

.acct-upload { flex: 1 1 320px; min-width: 260px; }
.acct-upload-label { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; font-size: 13.5px; font-weight: 600; color: var(--text-primary); }
.acct-upload-label i { color: var(--accent-ink); }
.acct-upload .form-actions { margin-top: 12px; }

/* account info tiles */
.acct-info-grid { display: grid; grid-template-columns: repeat(4, 1fr); }
.acct-info {
    display: flex; align-items: center; gap: 13px;
    padding: 4px 20px;
    border-left: 1px solid var(--border-light);
}
.acct-info:first-child { border-left: 0; padding-left: 0; }
.acct-info-icon {
    flex: 0 0 44px; width: 44px; height: 44px;
    display: inline-flex; align-items: center; justify-content: center;
    border-radius: 12px;
    background: rgba(var(--navy-accent-rgb), 0.13);
    font-size: 17px;
}
.acct-info-icon i { color: var(--accent-ink); }
.acct-info-txt { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.acct-info-label { font-size: 12.5px; color: var(--text-muted); }
.acct-info-value { font-size: 15px; font-weight: 700; color: var(--text-primary); word-break: break-word; }

/* forms inside account cards */
.acct-grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 18px 22px; }
.acct-grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px 22px; }
.acct-card .form-group { margin-bottom: 0; }
.acct-card .form-group label {
    display: flex; align-items: center; gap: 8px;
    margin-bottom: 8px;
    font-size: 13.5px; font-weight: 600; color: var(--text-secondary);
}
.acct-card .form-group label i { color: var(--accent-ink); }
.acct-req::after { content: ' *'; color: var(--danger); font-weight: 700; }
.acct-card input[type="text"],
.acct-card input[type="email"],
.acct-card input[type="password"] {
    width: 100%;
    padding: 12px 14px;
    border: 1px solid var(--input-border);
    background: var(--input-bg);
    color: var(--text-primary);
    font-size: 16px;
    transition: border-color 0.25s, box-shadow 0.25s;
}
.acct-card input:focus {
    outline: none;
    border-color: var(--navy-accent);
    box-shadow: 0 0 0 3px rgba(var(--navy-accent-rgb), 0.18);
}
.acct-pw { position: relative; }
.acct-pw input { padding-right: 46px !important; }
.acct-eye {
    position: absolute; right: 6px; top: 50%;
    transform: translateY(-50%);
    padding: 8px;
    background: none; border: 0; border-radius: 8px;
    color: var(--text-muted); font-size: 15px; line-height: 1;
    cursor: pointer; transition: all 0.2s;
}
.acct-eye:hover { color: var(--accent-ink); background: rgba(var(--navy-accent-rgb), 0.1); }

.acct-card .form-actions { display: flex; gap: 12px; margin-top: 22px; }
.acct-pw-actions { display: flex; align-items: center; gap: 16px; margin-top: 22px; flex-wrap: wrap; }
.acct-note {
    flex: 1; min-width: 240px;
    display: flex; align-items: center; gap: 9px;
    padding: 11px 15px;
    border-radius: 10px;
    background: rgba(var(--navy-accent-rgb), 0.08);
    border: 1px solid rgba(var(--navy-accent-rgb), 0.18);
    font-size: 13px; color: var(--text-secondary);
}
.acct-note i { color: var(--accent-ink); }
.acct-card .btn-primary {
    padding: 12px 22px;
    background: linear-gradient(135deg, var(--navy-accent) 0%, rgba(var(--navy-accent-rgb), 0.82) 100%);
    color: var(--on-accent);
}
.acct-card .btn-primary:hover { background: var(--navy-accent); filter: brightness(1.08); transform: translateY(-2px); }

/* dark mode — beat the blanket div/span colour rule */
body.dark-mode .acct-info-label,
body.dark-mode .acct-avatar-label,
body.dark-mode .acct-head-txt p { color: var(--text-muted) !important; }

@media (max-width: 1100px) {
    .acct-info-grid { grid-template-columns: repeat(2, 1fr); row-gap: 18px; }
    .acct-info:nth-child(odd) { border-left: 0; padding-left: 0; }
    .acct-grid-3 { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 768px) {
    .acct-card { padding: 18px 16px 20px; }
    .acct-photo { flex-direction: column; align-items: center; }
    .acct-upload { width: 100%; min-width: 0; }
    .acct-info-grid { grid-template-columns: 1fr; }
    .acct-info { border-left: 0; padding: 0; }
    .acct-grid-2, .acct-grid-3 { grid-template-columns: 1fr; }
    .acct-pw-actions { flex-direction: column; align-items: stretch; }
    .acct-note { min-width: 0; }
}

/* ===== Auth — centred card on a quiet page; signup = wide card with fields two by two ===== */
.auth-body {
    --auth-paper: var(--bg-card);
    --auth-page: color-mix(in srgb, var(--navy-accent) 4%, var(--bg-primary));
    --auth-link: color-mix(in srgb, var(--navy-accent) 45%, var(--navy-primary)); /* accent, dark enough for text on white */
    --auth-ink: var(--navy-primary); --auth-on-ink: #fff; --auth-bolt: color-mix(in srgb, var(--navy-accent) 70%, white); --auth-tick: #fff;
    min-height: 100dvh;
    font-family: 'Montserrat', system-ui, -apple-system, 'Segoe UI', sans-serif;
}
body.auth-body { background: var(--auth-page); }
body.dark-mode.auth-body {
    --auth-paper: var(--bg-secondary); --auth-page: var(--navy-primary); --auth-link: color-mix(in srgb, var(--navy-accent) 65%, white); /* lifted so a deep accent still reads on dark */
    --input-bg: color-mix(in srgb, white 5%, var(--bg-secondary)); --input-border: rgba(255, 255, 255, 0.16); /* neutral solid fields, not the indigo template tint */
}
.auth-body :is(input, button, select) { font-family: inherit; }
.auth-wrap {
    min-height: 100dvh;
    display: flex; flex-direction: column;
    padding: 18px clamp(16px, 4vw, 32px) calc(18px + env(safe-area-inset-bottom));
}
/* page bar: back to the storefront left, theme switch right */
.auth-topbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; width: 100%; max-width: 1180px; margin: 0 auto; }
.auth-back {
    display: inline-flex; align-items: center; gap: 9px;
    min-height: 42px; padding: 0 16px;
    border: 1px solid var(--border-color); border-radius: var(--r-ctrl, 3px);
    background: var(--auth-paper); color: var(--text-primary);
    font-size: 14px; font-weight: 600; text-decoration: none;
    box-shadow: 0 1px 2px rgba(var(--navy-primary-rgb), 0.06);
    transition: border-color 0.2s, color 0.2s;
}
.auth-back i { font-size: 13px; color: var(--auth-link); transition: transform 0.2s ease; }
.auth-back:focus-visible { outline: 2px solid var(--navy-accent); outline-offset: 2px; }
.auth-main { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 20px; padding: 22px 0 4px; }
.auth-card {
    width: 100%; max-width: 456px;
    padding: 36px 40px 34px;
    background: var(--auth-paper);
    border: 1px solid var(--border-color); border-radius: var(--r-panel, 4px);
    box-shadow: 0 1px 2px rgba(var(--navy-primary-rgb), 0.04), 0 28px 56px -28px rgba(var(--navy-primary-rgb), 0.28);
}
.auth-card-wide { max-width: 780px; }
.auth-brandmark {
    display: flex; align-items: center; justify-content: center; gap: 10px;
    width: fit-content; margin: 0 auto 24px;
    color: var(--navy-primary); font-size: 15px; font-weight: 700; letter-spacing: 0.04em;
    text-decoration: none;
}
.auth-brandmark img { width: 40px; height: 40px; border-radius: 50%; object-fit: cover; }
.auth-toggle {
    display: inline-flex; align-items: center; justify-content: center;
    width: 42px; height: 42px;
    border: 1px solid var(--border-color); border-radius: var(--r-ctrl, 3px);
    background: var(--auth-paper); color: var(--text-secondary);
    font-size: 15px; cursor: pointer;
    box-shadow: 0 1px 2px rgba(var(--navy-primary-rgb), 0.06);
    transition: color 0.2s, border-color 0.2s, background-color 0.2s;
}
.auth-toggle:focus-visible { outline: 2px solid var(--navy-accent); outline-offset: 2px; }

.auth-form-inner { width: 100%; }
.auth-form-inner h1 { margin: 0 0 8px; font-size: 28px; line-height: 1.2; font-weight: 700; letter-spacing: -0.02em; text-align: center; text-wrap: balance; color: var(--navy-primary); }
.auth-sub { margin: 0 auto 28px; max-width: 40ch; font-size: 15px; line-height: 1.55; text-align: center; text-wrap: balance; color: var(--text-muted); }
.auth-sub .highlight { color: var(--text-primary); font-weight: 600; }
.auth-form-inner .error,
.auth-form-inner .success {
    display: flex; align-items: flex-start; gap: 10px;
    margin: 0 0 18px; padding: 12px 14px;
    border-radius: var(--r-ctrl, 3px); font-size: 14px; line-height: 1.45;
}
.auth-form-inner .error i,
.auth-form-inner .success i { margin-top: 2px; }

.auth-group { margin-bottom: 18px; }
.auth-group label { display: block; margin-bottom: 8px; font-size: 13px; font-weight: 600; color: var(--text-primary); }
.auth-field { position: relative; }
.auth-field-icon {
    position: absolute; left: 16px; top: 50%; transform: translateY(-50%);
    color: var(--text-muted); font-size: 15px; pointer-events: none; transition: color 0.2s;
}
.auth-field:focus-within .auth-field-icon { color: var(--auth-link); }
.auth-field input {
    width: 100%; height: 52px;
    padding: 0 16px;
    border: 1px solid var(--input-border); border-radius: var(--r-ctrl, 3px);
    background: var(--input-bg); color: var(--text-primary);
    font-size: 16px; font-weight: 500;
    box-shadow: 0 1px 2px rgba(var(--navy-primary-rgb), 0.04);
    transition: border-color 0.2s, box-shadow 0.2s;
}
.auth-field input::placeholder { color: var(--text-muted); font-weight: 400; opacity: 0.8; }
.auth-field-icon ~ input { padding-left: 46px; }
.auth-field input:has(~ .auth-eye) { padding-right: 52px; }
.auth-field input:focus { outline: none; border-color: var(--navy-accent); box-shadow: 0 0 0 4px rgba(var(--navy-accent-rgb), 0.18); }
/* browser autofill paints its own blue fill — repaint it with ours */
.auth-field input:-webkit-autofill,
.auth-field input:-webkit-autofill:hover {
    -webkit-text-fill-color: var(--text-primary); caret-color: var(--text-primary);
    box-shadow: 0 0 0 100px var(--input-bg) inset, 0 1px 2px rgba(var(--navy-primary-rgb), 0.04);
    transition: background-color 600000s 0s;
}
.auth-field input:-webkit-autofill:focus { box-shadow: 0 0 0 100px var(--input-bg) inset, 0 0 0 4px rgba(var(--navy-accent-rgb), 0.18); }
.auth-eye {
    position: absolute; right: 6px; top: 50%; transform: translateY(-50%);
    width: 40px; height: 40px;
    display: inline-flex; align-items: center; justify-content: center;
    background: none; border: 0; border-radius: var(--r-ctrl, 3px);
    color: var(--text-muted); font-size: 16px; cursor: pointer;
    transition: color 0.2s, background-color 0.2s;
}
.auth-eye:focus-visible { outline: 2px solid var(--navy-accent); outline-offset: -2px; }
.auth-group .sd-trigger { min-height: 52px; padding: 0 16px; border-radius: var(--r-ctrl, 3px); font-size: 16px; }
.auth-field-icon ~ .sd-wrap .sd-trigger { padding-left: 46px; }
.auth-field:has(.sd-wrap) .auth-field-icon { z-index: 1; }   /* the dropdown wrap is positioned and would paint over it */

.auth-row { display: flex; align-items: center; justify-content: space-between; gap: 6px 14px; flex-wrap: wrap; margin: 0 0 20px; }
.auth-check { display: inline-flex; align-items: center; gap: 10px; min-height: 44px; font-size: 14px; color: var(--text-secondary); cursor: pointer; }
/* signup: fields two by two */
.auth-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 20px; }

/* drawn checkbox — the native one never matches the fields */
.auth-check input {
    -webkit-appearance: none; appearance: none;
    flex: none; display: inline-grid; place-content: center;
    width: 20px; height: 20px; margin: 0;
    border: 1.5px solid var(--input-border); border-radius: min(var(--r-ctrl, 3px), 6px);
    background: var(--input-bg); cursor: pointer;
    transition: background-color 0.15s, border-color 0.15s;
}
.auth-check input::after {
    content: ''; width: 10px; height: 5px;
    border: solid var(--auth-tick); border-width: 0 0 2px 2px;
    transform: translateY(-1px) rotate(-45deg) scale(0);
    transition: transform 0.15s ease;
}
.auth-check input:checked { background: var(--auth-ink); border-color: var(--auth-ink); }
.auth-check input:checked::after { transform: translateY(-1px) rotate(-45deg) scale(1); }
.auth-check input:focus-visible { outline: 2px solid var(--navy-accent); outline-offset: 2px; }
.auth-consent { align-items: flex-start; margin: 0 0 22px; font-size: 13.5px; line-height: 1.55; }
.auth-consent input { margin-top: 1px; }
.auth-link,
.auth-consent a {
    color: var(--auth-link); font-size: 14px; font-weight: 600; text-decoration: none;
    text-decoration-thickness: 1.5px; text-underline-offset: 4px; border-radius: 2px;
}
.auth-consent a { font-size: inherit; }
.auth-link i { font-size: 12px; transition: transform 0.2s ease; }
.auth-link:focus-visible,
.auth-consent a:focus-visible { outline: 2px solid var(--navy-accent); outline-offset: 3px; }
.auth-row .auth-link { padding: 10px 0; }   /* bigger tap target, same line */

/* main button — solid ink, accent bolt; while the form posts a charge sweeps across it */
.auth-submit {
    position: relative; isolation: isolate; overflow: hidden;
    width: 100%; height: 54px;
    display: flex; align-items: center; justify-content: center; gap: 10px;
    border: 0; border-radius: var(--r-ctrl, 3px);
    background: var(--auth-ink); color: var(--auth-on-ink);
    font-size: 16px; font-weight: 600; letter-spacing: 0.01em;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08), 0 1px 2px rgba(var(--navy-primary-rgb), 0.18), 0 10px 22px -10px rgba(var(--navy-primary-rgb), 0.6);
    cursor: pointer; touch-action: manipulation;
    transition: transform 0.15s ease, box-shadow 0.2s ease, background-color 0.2s ease;
}
.auth-submit i { font-size: 15px; color: var(--auth-bolt); }
.auth-submit::before {
    content: '';
    position: absolute; inset: 0 auto 0 0; z-index: -1; width: 0;
    background: rgba(var(--navy-accent-rgb), 0.42);
    border-right: 2px solid var(--navy-accent);   /* the charging edge */
    opacity: 0;
}
.auth-submit:active { transform: translateY(1px); box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08), 0 1px 2px rgba(var(--navy-primary-rgb), 0.18); }
.auth-submit:focus-visible { outline: 2px solid var(--navy-accent); outline-offset: 3px; }
.auth-submit:disabled { cursor: progress; transform: none; }
.auth-submit.is-charging::before { opacity: 1; animation: authCharge 2.4s cubic-bezier(.25, .8, .3, 1) forwards; }
@keyframes authCharge { to { width: 100%; } }

.auth-or { display: flex; align-items: center; gap: 14px; margin: 24px 0 16px; }
.auth-or::before, .auth-or::after { content: ''; flex: 1; height: 1px; background: var(--border-color); }
.auth-or span { color: var(--text-muted); font-size: 13px; }

.auth-google {
    width: 100%; height: 52px;
    display: inline-flex; align-items: center; justify-content: center; gap: 12px;
    border: 1px solid var(--input-border); border-radius: var(--r-ctrl, 3px);
    background: var(--input-bg); color: var(--text-primary);
    font-size: 15px; font-weight: 600;
    text-decoration: none; cursor: pointer;
    box-shadow: 0 1px 2px rgba(var(--navy-primary-rgb), 0.05);
    transition: border-color 0.2s, background-color 0.2s, transform 0.15s ease;
}
.auth-google:active { transform: translateY(1px); }
.auth-google:focus-visible { outline: 2px solid var(--navy-accent); outline-offset: 3px; }
.auth-alt { margin: 22px 0 0; font-size: 14px; text-align: center; color: var(--text-secondary); }
.auth-alt .auth-link + .auth-link { margin-left: 20px; }
.auth-maint { margin-top: 16px; text-align: left; }
.auth-form-inner .resend-section { text-align: center; }

/* contact + copyright under the card */
.auth-foot { display: flex; flex-direction: column; align-items: center; gap: 8px; width: 100%; max-width: 456px; text-align: center; }
.auth-card-wide + .auth-foot { max-width: 780px; }
.auth-foot .auth-contact { justify-content: center; }
.auth-copy { display: flex; align-items: center; justify-content: center; gap: 8px; font-size: 12.5px; color: var(--text-muted); }

/* ---------- dark mode — beat the blanket h/p/span/label colour rules ---------- */
body.dark-mode .auth-brandmark,
body.dark-mode .auth-brandmark span,
body.dark-mode .auth-form-inner h1 { color: var(--text-primary) !important; }
body.dark-mode .auth-group label { color: var(--text-primary); }
body.dark-mode .auth-sub,
body.dark-mode .auth-copy,
body.dark-mode .auth-copy span,
body.dark-mode .auth-or span,
body.dark-mode .auth-alt,
body.dark-mode .auth-check span { color: var(--text-muted) !important; }
body.dark-mode .auth-sub .highlight { color: var(--text-primary) !important; }
body.dark-mode.auth-body { --auth-ink: #fff; --auth-on-ink: var(--navy-primary); --auth-bolt: var(--navy-primary); --auth-tick: var(--navy-primary); }
body.dark-mode .auth-check input:checked { background: var(--navy-accent); border-color: var(--navy-accent); }
body.dark-mode .auth-submit { box-shadow: 0 10px 24px -12px rgba(0, 0, 0, 0.7); }
body.dark-mode .auth-submit::before { background: rgba(var(--navy-accent-rgb), 0.5); }
body.dark-mode .auth-back { color: var(--text-primary); }
body.dark-mode .auth-card { border-color: rgba(255, 255, 255, 0.08); box-shadow: 0 28px 56px -28px rgba(0, 0, 0, 0.7); }
body.dark-mode .error { background: rgba(234, 67, 53, 0.10); border-color: rgba(234, 67, 53, 0.30); }

@media (hover: hover) {
    .auth-toggle:hover { color: var(--text-primary); border-color: var(--text-muted); }
    .auth-back:hover { border-color: var(--text-muted); }
    .auth-back:hover i { transform: translateX(-3px); }
    .auth-eye:hover { color: var(--text-primary); background: rgba(var(--navy-primary-rgb), 0.06); }
    .auth-field input:hover:not(:focus) { border-color: var(--text-muted); }
    .auth-check input:hover:not(:checked) { border-color: var(--text-muted); }
    .auth-link:hover,
    .auth-consent a:hover { text-decoration-line: underline; }
    .auth-link:hover .fa-arrow-left { transform: translateX(-3px); }
    .auth-submit:hover:not(:disabled) { background: color-mix(in srgb, var(--auth-ink) 86%, var(--navy-accent)); transform: translateY(-1px); box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08), 0 2px 4px rgba(var(--navy-primary-rgb), 0.18), 0 16px 28px -12px rgba(var(--navy-primary-rgb), 0.65); }
    .auth-google:hover { border-color: var(--text-muted); background: color-mix(in srgb, var(--input-bg) 96%, var(--text-primary)); }
    body.dark-mode .auth-eye:hover { background: rgba(255, 255, 255, 0.08); }
}

/* ---------- phones: single column, slimmer card ---------- */
@media (max-width: 680px) {
    .auth-grid { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 520px) {
    .auth-wrap { padding: 14px 16px calc(16px + env(safe-area-inset-bottom)); }
    .auth-main { justify-content: flex-start; padding-top: 20px; }
    .auth-card { padding: 28px 20px 26px; }
    .auth-brandmark { margin-bottom: 20px; }
    .auth-form-inner h1 { font-size: 25px; }
    .auth-sub { margin-bottom: 24px; }
}

/* ===== Auth transitions — login <-> signup: the form slides, the page bar stays put =====
   Cross-document view transitions (opted in globally above). */
.auth-form-inner { view-transition-name: auth-form; }

/* default pair — forgot/reset/verify carry no html.auth-* class, so without this
   they fall back to the unstyled group animation instead of a clean fade */
::view-transition-old(auth-form) { animation: authFadeOut 0.18s ease both; }
::view-transition-new(auth-form) { animation: authFadeIn 0.34s cubic-bezier(.16, 1, .3, 1) both; }

/* form slides in the direction you travelled — class sits on <html> per page */
.auth-signup::view-transition-old(auth-form) { animation: authOutLeft 0.20s ease both; }
.auth-signup::view-transition-new(auth-form) { animation: authInRight 0.40s cubic-bezier(.16, 1, .3, 1) both; }
.auth-login::view-transition-old(auth-form)  { animation: authOutRight 0.20s ease both; }
.auth-login::view-transition-new(auth-form)  { animation: authInLeft 0.40s cubic-bezier(.16, 1, .3, 1) both; }

@keyframes authFadeOut { to   { opacity: 0; transform: translateY(-8px); } }
@keyframes authFadeIn  { from { opacity: 0; transform: translateY(10px); } }
@keyframes authOutLeft  { to   { opacity: 0; transform: translateX(-38px); } }
@keyframes authInRight  { from { opacity: 0; transform: translateX(38px); } }
@keyframes authOutRight { to   { opacity: 0; transform: translateX(38px); } }
@keyframes authInLeft   { from { opacity: 0; transform: translateX(-38px); } }

/* no view transitions (older Safari/Firefox) -> plain entrance so it still feels alive */
@supports not (view-transition-name: none) {
    .auth-form-inner { animation: authFadeIn 0.45s cubic-bezier(.16, 1, .3, 1) 0.05s both; }
}

@media (prefers-reduced-motion: reduce) {
    ::view-transition-old(auth-form), ::view-transition-new(auth-form) { animation: none; }
    .auth-form-inner { animation: none; }
    .auth-submit.is-charging::before { animation: none; width: 100%; }
}

/* bottom bar now carries up to 5 entries — tighten so nothing wraps on small phones */
.mobile-bottom-nav .mobile-nav-item { position: relative; padding: 8px 6px; min-width: 0; flex: 1; }
.mobile-nav-pill {
    position: absolute; top: 3px; right: 50%; margin-right: -20px;
    background: var(--danger); color: #fff; font-style: normal; font-weight: 700;
    font-size: 9px; min-width: 15px; height: 15px; padding: 0 4px; border-radius: 8px;
    display: inline-flex; align-items: center; justify-content: center;
}
@media (max-width: 360px) {
    .mobile-bottom-nav .mobile-nav-item { font-size: 9px; padding: 8px 3px; }
}

/* chat scope segmented control — same visual language as the V/A/E/D dots */
.rbac-scope { display: flex; gap: 3px; justify-content: center; flex-wrap: wrap; }
.rbac-scope-btn {
    padding: 4px 8px; border: 1px solid #d4d4d4; background: #fff; color: #999;
    font-size: 10px; font-weight: 700; cursor: pointer; border-radius: 0;
    transition: all .12s; white-space: nowrap;
}
.rbac-scope-btn:hover:not(:disabled) { border-color: var(--navy-accent); }
.rbac-scope-btn.on { background: var(--navy-accent); border-color: var(--navy-accent); color: var(--on-accent); }
.rbac-scope-btn.locked { opacity: .45; cursor: not-allowed; }
body.dark-mode .rbac-scope-btn { background: var(--input-bg); border-color: var(--input-border); color: var(--text-muted); }
body.dark-mode .rbac-scope-btn.on { background: var(--navy-accent); border-color: var(--navy-accent); color: var(--on-accent); }

/* ===== Chat — same language as the sidebar =====
   tinted contact list with sidebar-style rows, white thread panel, squared bubbles in the palette colour.
   Page-scoped: everything sits under .page-chat / .chat-*; colours come from the theme tokens. */

body.page-chat {
    --wa-teal:  var(--navy-accent);
    --wa-green: var(--navy-accent);
    --wa-out:   color-mix(in srgb, var(--navy-accent) 13%, var(--bg-card));   /* my bubble */
    --wa-in:    var(--bg-card);                                               /* their bubble */
    --wa-bg:    color-mix(in srgb, var(--navy-accent) 3%, var(--bg-secondary)); /* thread ground */
    --wa-panel: var(--bg-card);
    --wa-head:  color-mix(in srgb, var(--navy-accent) 4%, var(--bg-secondary)); /* = sidebar panel */
    --wa-hover: rgba(var(--navy-accent-rgb), 0.07);
    --wa-line:  var(--border-color);
    --wa-txt:   var(--text-primary);
    --wa-mut:   var(--text-muted);
    --wa-tick:  var(--navy-accent);
    --wa-r:     var(--sb-r, 4px);
}

.chat-banner {
    display: flex; align-items: center; gap: 10px;
    background: #fff3cd; color: #664d03;
    border-bottom: 1px solid #ffe69c;
    padding: 10px 16px; font-size: 13px;
}
body.page-chat.dark-mode .chat-banner { background: #332701; color: #ffda6a; border-bottom-color: #4a3800; }

/* thin indeterminate bar — reads and writes both drive it, never a blocking popup */
.chat-bar { height: 3px; background: transparent; overflow: hidden; }
.chat-bar.on::after {
    content: ''; display: block; height: 100%; width: 40%;
    background: var(--wa-green);
    animation: chat-bar-slide 1s linear infinite;
}
@keyframes chat-bar-slide {
    0%   { transform: translateX(-100%); }
    100% { transform: translateX(350%); }
}

.chat-wrap {
    display: grid; grid-template-columns: 380px 1fr;
    height: calc(100vh - 220px); min-height: 460px;
    background: var(--wa-panel);
    border: 1px solid var(--wa-line); border-radius: var(--wa-r);
    box-shadow: 0 1px 3px var(--shadow-color); overflow: hidden;
}

/* ---------- left panel ---------- */
.chat-side { display: flex; flex-direction: column; overflow: hidden; background: var(--wa-head); }
.chat-side-head {
    display: flex; gap: 8px; align-items: center;
    padding: 8px; background: transparent; border-bottom: 1px solid var(--wa-line);
}
.chat-search { position: relative; flex: 1; }
.chat-search i { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); color: var(--wa-mut); font-size: 13px; }
.chat-search input {
    width: 100%; padding: 9px 14px 9px 40px; font-size: 16px;
    background: var(--wa-panel); color: var(--wa-txt);
    border: 1px solid var(--wa-line); border-radius: var(--wa-r) !important;
}
.chat-search input::placeholder { color: var(--wa-mut); }
.chat-search input:focus { outline: none; border-color: var(--wa-teal); box-shadow: 0 0 0 3px rgba(var(--navy-accent-rgb), .15); }

.chat-contacts { flex: 1; overflow-y: auto; padding: 8px; background: transparent; }
/* rows = sidebar rows: hover tint, active = white card with a hairline */
.chat-contact {
    display: flex; align-items: center; gap: 12px; width: 100%;
    padding: 9px 10px; background: none; border: 1px solid transparent; border-radius: var(--wa-r);
    text-align: left; cursor: pointer; color: var(--wa-txt);
    transition: background-color .2s, border-color .2s;
}
.chat-contact + .chat-contact { margin-top: 2px; }
.chat-contact:hover  { background: var(--wa-hover); }
.chat-contact.active { background: var(--bg-card); border-color: var(--wa-line); box-shadow: 0 1px 3px var(--shadow-color); }
.chat-contact:focus-visible { outline: 2px solid var(--wa-teal); outline-offset: -3px; }
.chat-contact.has-unread .chat-contact-top strong { font-weight: 700; }
.chat-contact.has-unread .chat-contact-sub span { color: var(--wa-txt); }
.chat-contact { position: relative; }
.chat-contact img { width: 40px; height: 40px; border-radius: 50%; object-fit: cover; flex-shrink: 0; background: var(--wa-head); }
.chat-contact-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.chat-contact-top  { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; }
.chat-contact-top strong { font-size: 15px; font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.chat-contact-time { font-size: 12px; color: var(--wa-mut); flex-shrink: 0; }
.chat-contact.has-unread .chat-contact-time { color: var(--wa-green); }
.chat-contact-sub {
    display: flex; align-items: center; justify-content: space-between; gap: 8px;
    font-size: 13px; color: var(--wa-mut);
}
.chat-contact-sub span {
    overflow: hidden; text-overflow: ellipsis; white-space: nowrap; flex: 1; min-width: 0;
}
.chat-pill {
    background: var(--wa-green); color: #fff; font-size: 12px; font-style: normal; font-weight: 600;
    min-width: 20px; height: 20px; padding: 0 6px; border-radius: 3px;
    display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0;
}

/* ---------- thread ---------- */
.chat-pane { position: relative; display: flex; flex-direction: column; overflow: hidden; background: var(--wa-bg); }
.chat-thread, .chat-blank { position: relative; z-index: 1; }
.chat-head, .chat-composer { position: relative; z-index: 1; }
.chat-thread[hidden], .chat-blank[hidden] { display: none; }
.chat-thread { display: flex; flex-direction: column; height: 100%; min-height: 0; }

.chat-blank, .chat-none {
    flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center;
    gap: 10px; padding: 40px 20px; text-align: center; color: var(--wa-mut);
    background: var(--wa-bg);
}
.chat-blank i {
    width: 84px; height: 84px; border-radius: var(--wa-r);
    display: inline-flex; align-items: center; justify-content: center;
    font-size: 34px; color: var(--wa-teal); background: rgba(var(--navy-accent-rgb), .12);
}
.chat-blank h3 { color: var(--wa-txt); font-size: 20px; font-weight: 600; }
.chat-none i { font-size: 26px; opacity: .5; }
.chat-none-lg { height: 100%; background: transparent; }

.chat-head {
    display: flex; align-items: center; gap: 13px; flex-shrink: 0;
    padding: 10px 16px; background: var(--wa-panel); border-bottom: 1px solid var(--wa-line);
}
.chat-head-img { width: 40px; height: 40px; border-radius: 50%; object-fit: cover; }
.chat-head-info { display: flex; flex-direction: column; }
.chat-head-info strong { font-size: 15px; font-weight: 600; color: var(--wa-txt); }
.chat-head-info span  { font-size: 13px; color: var(--wa-mut); }
.chat-back { display: none; background: none; border: none; color: var(--wa-txt); font-size: 18px; cursor: pointer; padding: 4px 6px; }

/* ---------- messages + wallpaper ---------- */
.chat-msgs {
    flex: 1; overflow-y: auto; padding: 14px 6%;
    display: flex; flex-direction: column; gap: 2px;
    background: transparent;
}

.chat-day { text-align: center; margin: 12px 0; }
.chat-day span {
    display: inline-block; padding: 4px 10px; font-size: 11.5px; font-weight: 600; letter-spacing: .3px;
    text-transform: uppercase; color: var(--wa-mut);
    background: var(--wa-in); border: 1px solid var(--wa-line); border-radius: 3px;
}

.chat-msg { display: flex; max-width: 65%; }
.chat-msg.mine { align-self: flex-end; justify-content: flex-end; }
.chat-msg + .chat-msg { margin-top: 2px; }
.chat-msg.starts-run { margin-top: 12px; }

.chat-bub {
    position: relative; padding: 6px 9px 8px; font-size: 14.2px; line-height: 19px;
    background: var(--wa-in); color: var(--wa-txt);
    border: 1px solid var(--wa-line); border-radius: var(--wa-r);
    word-break: break-word; max-width: 100%;
}
.chat-msg.mine .chat-bub { background: var(--wa-out); border-color: rgba(var(--navy-accent-rgb), .28); }

.chat-bub.gone { font-style: italic; color: var(--wa-mut); }
.chat-bub .chat-text { white-space: pre-wrap; }

.chat-tag {
    display: block; margin-bottom: 3px;
    font-size: 12.5px; font-weight: 600; color: var(--wa-teal);
}
.chat-msg.bcast .chat-bub { border-color: rgba(var(--navy-accent-rgb), .45); }

/* time + ticks tuck into the last line of text, dropping to their own line when it's tight */
.chat-meta {
    float: right; position: relative; top: 4px;
    margin: 0 -3px -4px 11px;
    font-size: 11px; color: var(--wa-mut); line-height: 15px; white-space: nowrap;
}
.chat-meta i { font-size: 12px; margin-left: 2px; vertical-align: -1px; }
.chat-meta i.read { color: var(--wa-tick); }
.chat-meta i.failed { color: #ea4335; }
/* optimistic bubble — on screen before the server has confirmed it */
.chat-msg.pending .chat-bub { opacity: .72; }

.chat-img { display: block; margin: -2px -5px 5px; cursor: zoom-in; }
.chat-img img { display: block; max-width: 320px; width: 100%; border-radius: 3px; }
.chat-doc {
    display: flex; align-items: center; gap: 11px; margin-bottom: 3px; padding: 9px 12px;
    background: rgba(var(--navy-accent-rgb), .06); border: 1px solid var(--wa-line); border-radius: var(--wa-r); color: inherit; text-decoration: none;
    transition: background 0.2s;
}
.chat-doc:hover { background: rgba(var(--navy-accent-rgb), .12); }
.chat-doc i {
    flex-shrink: 0; width: 36px; height: 36px; border-radius: var(--wa-r);
    display: inline-flex; align-items: center; justify-content: center;
    font-size: 15px; color: var(--wa-teal); background: rgba(var(--navy-accent-rgb), .14);
}
.chat-doc span { display: flex; flex-direction: column; min-width: 0; }
.chat-doc strong { font-size: 13.5px; font-weight: 400; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 200px; }
.chat-doc em { font-size: 11.5px; font-style: normal; color: var(--wa-mut); text-transform: uppercase; }

/* hover tools stay out of the way until you point at a bubble */
.chat-tools {
    position: absolute; top: 50%; transform: translateY(-50%); display: none; gap: 1px;
    background: var(--wa-panel); border: 1px solid var(--wa-line); border-radius: var(--wa-r); padding: 3px;
    box-shadow: 0 2px 8px var(--shadow-color);
}
.chat-msg:not(.mine) .chat-tools { right: -70px; }
.chat-msg.mine .chat-tools      { left: -70px; }
.chat-msg:hover .chat-tools { display: flex; }
.chat-tools button {
    background: none; border: none; cursor: pointer; font-size: 12px; color: var(--wa-mut);
    width: 26px; height: 26px; border-radius: var(--r-ctrl, 6px); display: inline-flex; align-items: center; justify-content: center;
}
.chat-tools button:hover { color: #ea4335; background: rgba(234,67,53,.1); }

/* ---------- composer ---------- */
.chat-composer {
    display: flex; align-items: flex-end; gap: 8px; flex-shrink: 0;
    padding: 10px 16px; background: var(--wa-panel); border-top: 1px solid var(--wa-line);
}
.chat-composer textarea {
    flex: 1; resize: none; max-height: 140px; padding: 10px 14px;
    font-size: 16px; font-family: inherit; line-height: 20px;
    background: var(--input-bg); color: var(--wa-txt);
    border: 1px solid var(--input-border); border-radius: var(--wa-r) !important;
}
.chat-composer textarea::placeholder { color: var(--wa-mut); }
.chat-composer textarea:focus { outline: none; border-color: var(--wa-teal); box-shadow: 0 0 0 3px rgba(var(--navy-accent-rgb), .15); }
.chat-file-hidden { display: none; }
.chat-attach, .chat-send {
    flex-shrink: 0; width: 42px; height: 42px; border: none; cursor: pointer;
    display: inline-flex; align-items: center; justify-content: center;
    border-radius: var(--wa-r); touch-action: manipulation;
}
.chat-attach { background: none; color: var(--wa-mut); font-size: 18px; transition: background-color .2s, color .2s; }
.chat-attach:hover { color: var(--wa-txt); background: var(--wa-hover); }
.chat-send { background: var(--wa-teal); color: var(--on-accent); font-size: 17px; }
.chat-send { transition: filter 0.2s, transform 0.2s; }
.chat-send:hover:not(:disabled) { filter: brightness(1.08); }
.chat-send:active:not(:disabled) { transform: scale(0.96); }
.chat-send:disabled { opacity: .6; cursor: not-allowed; }
.chat-composer-off {
    justify-content: center; gap: 8px; color: var(--wa-mut); font-size: 13px; padding: 16px;
}

/* ---------- broadcast modal ---------- */
.chat-bcast-note { font-size: 13px; color: var(--text-muted); margin-bottom: 12px; }
.chat-bcast-input {
    width: 100%; resize: vertical; padding: 11px 12px; font-size: 16px; font-family: inherit;
    background: var(--input-bg); border: 1px solid var(--input-border); color: var(--text-primary);
    border-radius: var(--wa-r) !important;
}
.chat-bcast-input:focus { outline: none; border-color: var(--navy-accent); }

/* ---------- skeletons ---------- */
.chat-skel {
    height: 58px; margin: 0 0 6px; border-radius: var(--wa-r);
    background: linear-gradient(90deg, var(--skeleton-base) 25%, var(--skeleton-shine) 50%, var(--skeleton-base) 75%);
    background-size: 200% 100%;
    animation: skeleton-loading 1.5s ease-in-out infinite;
}

/* ---- full screen: the shell stops scrolling, the thread owns the viewport ---- */
/* the page stops scrolling; header card on top, the chat card fills the rest */
body.page-chat .main-content { overflow: hidden; display: flex; flex-direction: column; }
body.page-chat .header { flex-shrink: 0; margin-bottom: 16px; }
/* one lone button — keep it in tier 1 so the thread gets the height */
@media (min-width: 769px) {
    body.page-chat .header::after { display: none; }
    body.page-chat .header .head-btns { order: 2; align-self: center; margin-left: auto; }
    body.page-chat .header .header-right { order: 3; margin-left: 16px; }
    body.page-chat .main-content { padding-bottom: 20px !important; }
}
body.page-chat .chat-wrap { flex: 1; height: auto; min-height: 0; }
body.page-chat .chat-bar { flex-shrink: 0; margin: -13px 0 10px; }
body.page-chat .chat-side { border-right: 1px solid var(--wa-line); }

/* ---- mobile: one pane at a time ---- */
@media (max-width: 900px) {
    .chat-wrap { grid-template-columns: 1fr; }
    .chat-pane { display: none; }
    .chat-wrap.thread-open .chat-side { display: none; }
    .chat-wrap.thread-open .chat-pane { display: flex; }
    .chat-back { display: inline-block; }
    .chat-msg { max-width: 82%; }
    .chat-msgs { padding: 12px 4%; }
    .chat-img img { max-width: 240px; }
    .chat-msg:not(.mine) .chat-tools, .chat-msg.mine .chat-tools {
        top: -13px; right: 2px; left: auto; transform: none;
    }
    .chat-jump { right: 14px; bottom: 72px; }
}
@media (max-width: 768px) {
    body.page-chat .main-content { padding-bottom: max(65px, calc(65px + env(safe-area-inset-bottom))); }
    body.page-chat .main-content { padding-left: 10px; padding-right: 10px; }
    body.page-chat .header { margin-bottom: 10px; }
}

/* ---------- jump to latest ---------- */
.chat-jump {
    position: absolute; right: 22px; bottom: 76px; z-index: 3;
    width: 42px; height: 42px; border: none; border-radius: 50%;
    display: inline-flex; align-items: center; justify-content: center;
    background: var(--wa-panel); color: var(--wa-mut); font-size: 15px;
    border: 1px solid var(--wa-line); box-shadow: 0 2px 8px var(--shadow-color);
    opacity: 0; visibility: hidden; transform: translateY(10px);
    transition: opacity .2s ease, transform .2s ease, visibility .2s;
    cursor: pointer;
}
.chat-jump.on { opacity: 1; visibility: visible; transform: none; }
.chat-jump:hover { color: var(--accent-ink); }

/* ---------- thin themed scrollbars in both panes ---------- */
.chat-contacts, .chat-msgs { scrollbar-width: thin; scrollbar-color: rgba(11,20,26,.22) transparent; }
.chat-contacts::-webkit-scrollbar, .chat-msgs::-webkit-scrollbar { width: 7px; }
.chat-contacts::-webkit-scrollbar-track, .chat-msgs::-webkit-scrollbar-track { background: transparent; }
.chat-contacts::-webkit-scrollbar-thumb, .chat-msgs::-webkit-scrollbar-thumb {
    background: rgba(11,20,26,.2); border-radius: 4px;
}
.chat-contacts::-webkit-scrollbar-thumb:hover, .chat-msgs::-webkit-scrollbar-thumb:hover { background: rgba(11,20,26,.34); }
body.page-chat.dark-mode .chat-contacts, body.page-chat.dark-mode .chat-msgs { scrollbar-color: rgba(255,255,255,.2) transparent; }
body.page-chat.dark-mode .chat-contacts::-webkit-scrollbar-thumb,
body.page-chat.dark-mode .chat-msgs::-webkit-scrollbar-thumb { background: rgba(255,255,255,.18); }

@media (prefers-reduced-motion: reduce) {
    .chat-jump, .chat-send, .chat-doc { transition: none; }
    .chat-send:hover:not(:disabled), .chat-send:active:not(:disabled) { transform: none; }
}

/* ===== Users — profile photo (same column the sidebar + chat avatars read) ===== */
.form-group-full { grid-column: 1 / -1; }

.user-photo-note { font-size: 12px; font-weight: 500; color: var(--text-muted); }
.user-photo-row { display: flex; align-items: center; gap: 16px; }
.user-photo-preview {
    width: 74px; height: 74px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid var(--border-color);
    background: var(--bg-secondary);
    flex-shrink: 0;
}
.user-photo-fields { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 9px; }
.user-photo-remove {
    display: inline-flex; align-items: center; gap: 8px;
    font-size: 13.5px; font-weight: 600; color: var(--danger);
    cursor: pointer;
}
/* beat .form-group input { width:100% } — a checkbox must stay a checkbox */
.user-photo-fields .user-photo-remove input {
    width: 16px; min-width: 16px; height: 16px;
    accent-color: var(--danger);
    cursor: pointer;
}

body.dark-mode .user-photo-preview { border-color: var(--input-border); }

@media (max-width: 560px) {
    .user-photo-row { flex-direction: column; align-items: flex-start; }
    .user-photo-fields { width: 100%; }
}

/* ===== Page head — one card, two tiers =====
   tier 1: title + breadcrumb | search · tools · account
   tier 2 (under a hairline, only when used): filters left | page buttons right */
.header { flex-wrap: wrap; justify-content: flex-start; column-gap: 16px; row-gap: 0; padding: 14px 18px; }
.header > .head-title { order: 1; flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; gap: 5px; }
.header .head-title h1 { margin: 0; font-size: 22px; line-height: 1.2; }
.header .head-actions { display: contents; }
.header .header-right { order: 2; margin-left: auto; }
.header::after { content: ''; order: 3; flex: 0 0 100%; height: 0; }
.header:has(.head-filters:not([hidden]), .head-btns .head-btn)::after { height: 1px; margin: 12px 0; background: var(--border-light); }
.header .head-filters { order: 4; flex: 1 1 0; min-width: 0; }
.header .head-btns { order: 5; align-self: flex-start; display: flex; align-items: center; justify-content: flex-end; flex-wrap: wrap; gap: 6px; margin-left: auto; }
.header .head-btns:empty { display: none; }
.header:has(.head-filters:not([hidden])) .head-btns { padding-left: 8px; }

.head-crumbs { display: flex; align-items: center; flex-wrap: wrap; gap: 6px; font-size: 12.5px; line-height: 1.2; color: var(--text-muted); }
.head-crumbs a, .head-crumbs .crumb-group { display: inline-flex; align-items: center; gap: 5px; }
.head-crumbs a { color: var(--accent-ink); font-weight: 600; text-decoration: none; }
.head-crumbs a:hover { text-decoration: none; }
.head-crumbs .crumb-now { color: var(--text-secondary); font-weight: 600; }
.head-crumbs .crumb-sep { font-size: 8px; opacity: 0.6; }

/* page buttons: icon + tooltip, the primary one keeps its label */
.head-btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 7px;
    width: 38px; height: 38px; padding: 0;
    border: 1px solid rgba(var(--navy-accent-rgb), 0.28); border-radius: 3px;
    background: rgba(var(--navy-accent-rgb), 0.10);
    color: var(--accent-ink);
    font-family: inherit; font-size: 13.5px; font-weight: 600;
    white-space: nowrap; cursor: pointer;
    transition: background 0.2s, border-color 0.2s, transform 0.15s;
}
.head-btn i { font-size: 14px; }
.head-btn span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.head-btn:hover { background: rgba(var(--navy-accent-rgb), 0.2); border-color: var(--navy-accent); }
.head-btn:active { transform: translateY(1px); }
.head-btn:focus-visible { outline: 2px solid var(--navy-accent); outline-offset: 2px; }
.head-btn.primary { width: auto; padding: 0 14px; background: var(--navy-accent); border-color: var(--navy-accent); color: var(--on-accent); }
.head-btn.primary span { position: static; width: auto; height: auto; overflow: visible; clip: auto; }
.head-btn.primary:hover { filter: brightness(1.08); }
.head-btn[disabled] { opacity: 0.5; cursor: not-allowed; }

/* filter strip: one bordered 38px control per filter, icon inside; date pairs share one field */
.head-filters { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; min-width: 0; }
.head-filters[hidden] { display: none; }
.hf-strip { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; margin: 0; padding: 0; }
.hf-strip[hidden] { display: none; }
.hf-field {
    display: flex; align-items: center; height: 38px; min-width: 0;
    background: var(--input-bg); border: 1px solid var(--border-color); border-radius: var(--sb-r, 4px);
    transition: border-color .2s, box-shadow .2s;
}
.hf-field:hover { border-color: rgba(var(--navy-accent-rgb), .45); }
.hf-field:focus-within, .hf-field:has(.sd-wrap.open) { border-color: var(--navy-accent); box-shadow: 0 0 0 3px rgba(var(--navy-accent-rgb), .14); }
.hf-field > label {
    display: inline-flex; align-items: center; justify-content: center; flex: none;
    width: 34px; height: 100%; margin: 0; padding-left: 2px; border: 0; background: none;
    color: var(--text-muted); font-size: 13px; cursor: pointer; transition: color .2s;
}
.hf-field:focus-within > label { color: var(--accent-ink); }
.hf-field > input, .hf-field > .rs-dtf > input, .hf-field > select {
    height: 100%; min-width: 0; margin: 0; padding: 0 10px 0 0; border: 0 !important; border-radius: 0 !important;
    background: transparent !important; box-shadow: none !important; outline: none;
    color: var(--text-primary); font-family: inherit; font-size: 14px !important;
}
.hf-field > input[type="search"] { width: 180px; }
.hf-field > .rs-dtf:has(input[type="date"]) { flex: none; width: 128px; }
.hf-field > .rs-dtf > input[type="date"] { padding-right: 4px; }
.hf-range > .rs-dtf + .hf-sep + .rs-dtf > input { padding-left: 4px; }
.hf-sep { flex: none; padding: 0 6px; color: var(--text-muted); font-size: 11px; }
.hf-field > .sd-wrap { height: 100%; width: 170px; }
.hf-field .sd-trigger { min-height: 0; height: 100%; padding: 0 10px 0 0; border: 0 !important; background: transparent; box-shadow: none !important; font-size: 14px; }

/* quick ranges = one segmented switch */
.hf-seg { display: inline-flex; height: 38px; padding: 3px; gap: 2px; background: color-mix(in srgb, var(--navy-accent) 4%, var(--bg-secondary)); border: 1px solid var(--border-color); border-radius: var(--sb-r, 4px); }
.hf-seg button {
    padding: 0 11px; border: 0; border-radius: 3px; background: transparent; cursor: pointer;
    color: var(--text-secondary); font: 600 12.5px/1 inherit; white-space: nowrap; transition: background-color .2s, color .2s;
}
.hf-seg button:hover { color: var(--text-primary); background: rgba(var(--navy-accent-rgb), .08); }
.hf-seg button.is-on { background: var(--bg-card); color: var(--accent-ink); box-shadow: 0 1px 3px var(--shadow-color); }

/* plain strip buttons + the clear icon: quiet ghosts */
.hf-strip .btn {
    display: inline-flex; align-items: center; gap: 6px; height: 38px; padding: 0 12px; margin: 0;
    border: 1px solid var(--border-color); border-radius: var(--sb-r, 4px) !important; box-shadow: none;
    background: var(--bg-card); color: var(--text-secondary); font-size: 13px; font-weight: 600; transform: none;
}
.hf-strip .btn:hover { background: rgba(var(--navy-accent-rgb), .08); border-color: rgba(var(--navy-accent-rgb), .45); color: var(--accent-ink); transform: none; }
.hf-strip .btn-icon { width: 38px; padding: 0; justify-content: center; }
.hf-strip .btn-icon:hover { color: var(--danger); border-color: color-mix(in srgb, var(--danger) 45%, transparent); background: color-mix(in srgb, var(--danger) 8%, transparent); }

/* page buttons: primary filled, the rest quiet outline squares */
.head-btns .head-btn:not(.primary):not(.danger) { background: var(--bg-card); border-color: var(--border-color); color: var(--text-secondary); }
.head-btns .head-btn:not(.primary):not(.danger):hover { background: rgba(var(--navy-accent-rgb), .08); border-color: rgba(var(--navy-accent-rgb), .45); color: var(--accent-ink); }
.head-btns .head-btn.primary, .head-btns .head-btn.primary :is(i, span) { color: var(--on-accent) !important; }
.head-btns .head-btn.primary { box-shadow: 0 1px 3px rgba(var(--navy-accent-rgb), .35); }
.header .hdr-search input { background: transparent !important; border: 0 !important; box-shadow: none !important; }

/* searchable dropdown (upgrades a <select>, the select stays the value) */
.sd-wrap { position: relative; display: block; }
.sd-wrap > select { position: absolute; inset: 0; opacity: 0; pointer-events: none; }
.sd-trigger {
    display: flex; align-items: center; gap: 8px; width: 100%; height: 100%; min-height: 38px; padding: 0 10px;
    border: 1px solid var(--input-border); border-radius: 0 3px 3px 0; background: var(--input-bg); color: var(--text-primary);
    font-size: 15px; cursor: pointer; user-select: none;
}
.sd-wrap.open .sd-trigger, .sd-trigger:focus-visible { outline: none; border-color: var(--navy-accent); box-shadow: 0 0 0 3px rgba(var(--navy-accent-rgb), 0.15); }
.sd-label { flex: 1; min-width: 0; text-align: left; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sd-label.sd-ph { color: var(--text-muted); }
.sd-arrow { flex: none; font-size: 11px; color: var(--text-muted); transition: transform 0.2s; }
.sd-wrap.open .sd-arrow { transform: rotate(180deg); }
.sd-panel {
    position: fixed; z-index: 1900; display: flex; flex-direction: column; max-height: 300px;
    background: var(--bg-card); border: 1px solid var(--navy-accent); border-radius: 3px; box-shadow: 0 8px 24px var(--shadow-hover);
}
.sd-search { flex: none; width: 100%; height: 40px; padding: 0 12px; border: 0; border-bottom: 1px solid var(--border-color); outline: none; background: transparent; color: var(--text-primary); font-size: 16px !important; /* under 16px iOS zooms in */ }
@media (pointer: coarse) { .sd-item { padding: 12px 14px; font-size: 15px; } .sd-panel { max-height: min(340px, 60vh); } }
.sd-list { overflow-y: auto; overscroll-behavior: contain; }
.sd-item { padding: 9px 12px; font-size: 14px; color: var(--text-primary); cursor: pointer; }
.sd-item:hover, .sd-item.hl { background: rgba(var(--navy-accent-rgb), 0.1); }
.sd-item.sel { background: var(--navy-accent); color: var(--on-accent); }
.sd-empty { padding: 12px; text-align: center; font-size: 13px; color: var(--text-muted); }

/* tables: no controls on top — search lives in the header, length + info + paging sit underneath */
.dt-foot { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 10px 16px; padding-top: 12px; }

@media (max-width: 768px) {
    .header { padding: 12px 14px; flex-direction: row; align-items: center; gap: 0; } /* an older phone rule stacks it as a column */
    .header .head-title h1 { font-size: 18px; }
    .header .header-right { order: 2; flex: 1 1 100%; margin: 10px 0 0; justify-content: flex-end; }
    .header .head-filters { flex: 1 1 100%; margin: 0 0 10px; }
    .header .head-btns { align-self: auto; }
    .hf-strip, .hf-field { flex: 1 1 100%; }
    .hf-field > .rs-dtf:has(input[type="date"]), .hf-field > input[type="search"], .hf-field > .sd-wrap { flex: 1 1 auto; width: auto; font-size: 16px !important; }
    .hf-seg { flex: 1 1 100%; } .hf-seg button { flex: 1; }
    .hf-strip .btn { flex: 1 1 auto; justify-content: center; }
    .hf-strip .btn-icon { flex: none; }
    .hf-field:has(+ .btn-icon:last-child) { flex: 1 1 calc(100% - 46px); }
    .header .head-btns { flex: 1 1 100%; justify-content: flex-start; padding-left: 0 !important; }
}

/* stacked chip rows in a cell */
.cell-stack{ display:flex; flex-direction:column; gap:3px; }
.chip-row{ display:flex; align-items:center; justify-content:space-between; gap:14px; min-width:152px; white-space:nowrap; }

/* the chip (squared tag = icon + label) — uniform size so values align across rows */
.chip{ display:inline-flex; align-items:center; gap:5px; padding:0 8px; height:21px; min-width:82px; border-radius:3px; font-size:10.8px; font-weight:700; line-height:1; white-space:nowrap; border:1px solid transparent; flex:none; }
.chip i{ font-size:10px; width:11px; text-align:center; }
.chip.is-btn{ cursor:pointer; }
.chip.is-btn:hover{ filter:brightness(.95); }

/* palettes — named by COLOUR/ROLE, never by domain */
/* chip tones — one hue per group so columns read apart at a glance (owner 2026-10-13); --h = hue, --c = what is drawn */
.chip-navy   { background:var(--navy-primary); color:#fff; }
.chip-soft-navy  { --h:#2563eb; }   /* blue — booking / time */
:is(.chip-soft-green, .chip-teal) { --h:#0d9488; }   /* teal — people / usage */
.chip-soft-amber { --h:#d97706; }   /* amber — vehicle */
.chip-soft-tan   { --h:#16a34a; }   /* green — money */
.chip-soft-purple { --h:#0284c7; }  /* sky */
.chip-link { --h:var(--navy-accent); }
:is(.chip-soft-navy, .chip-soft-purple, .chip-link, .chip-teal, .chip-soft-green, .chip-soft-amber, .chip-soft-tan) {
    --c: var(--h);
    background: color-mix(in srgb, var(--c) 13%, var(--bg-card));
    color: color-mix(in srgb, var(--c) 88%, var(--text-primary));
    border-color: color-mix(in srgb, var(--c) 28%, var(--bg-card));
}
/* dark: lift each hue toward white so it stays readable on a dark card */
body.dark-mode :is(.chip-soft-navy, .chip-soft-purple, .chip-link, .chip-teal, .chip-soft-green, .chip-soft-amber, .chip-soft-tan) { --c: color-mix(in srgb, var(--h) 70%, #fff); }

/* values beside chips — pinned right */
.chip-row .val{ font-weight:800; font-size:12.5px; margin-left:auto; text-align:right; }
               /* bad / negative */
.val-navy{ color:var(--navy-primary); }
.val-accent{ color: var(--accent-ink); }
.val-muted{ color:#9aa6b2; font-weight:700; }
.val-box{ background:color-mix(in srgb, var(--navy-accent) 8%, var(--bg-card)); color:var(--text-secondary); padding:2px 7px; border-radius:3px; font-size:11px; font-weight:700; font-family:'Courier New',monospace; letter-spacing:.2px; }
.cell-title{ font-size:13px; font-weight:800; color:var(--navy-primary); margin-bottom:1px; }

/* squared action icons */
.actions-cell{ display:flex; align-items:center; justify-content:center; gap:6px; flex-wrap:nowrap; }
.act{ width:26px; height:26px; border:none; border-radius:3px; cursor:pointer; display:inline-flex; align-items:center; justify-content:center; font-size:12px; transition:all .2s; background:transparent; color:var(--text-primary); }
.act-info{ background:var(--navy-primary); color:var(--on-primary); }
.act-info:hover{ filter:brightness(1.25); transform:scale(1.1); }
.act-edit{ color: var(--accent-ink); font-size:15px; }
.act-del { color:#e23b2e; font-size:15px; }
.act-edit:hover,.act-del:hover{ transform:scale(1.18); }
.act[disabled]{ opacity:.32; cursor:not-allowed; }
.act[disabled]:hover{ transform:none; }

/* status-tinted rows — !important beats DataTables' own striping */

body.dark-mode .cell-title{ color:var(--text-primary); }
body.dark-mode .val-navy{ color:var(--text-primary); }

/* import result popup — long skip lists stay readable */
.import-errors {
    max-height: 190px; overflow-y: auto; text-align: left;
    font-size: 12.5px; line-height: 1.7; color: var(--text-secondary);
    background: var(--bg-secondary); border-radius: 3px; padding: 10px 12px;
}

/* ===== Tabulator — theme skin. tokens only, so the palette, dark mode and Soft/Classic all follow ===== */
.tb-table { margin-top: 2px; }
.tabulator { background: var(--bg-card); border: 1px solid var(--border-color); border-radius: 4px; font-size: 13px; }
.tabulator .tabulator-header { background: var(--navy-primary); color: #fff; border-bottom: 0; font-weight: 600; }
.tabulator .tabulator-header .tabulator-col { background: transparent; border-right: 1px solid rgba(255,255,255,.10); }
.tabulator .tabulator-header .tabulator-col .tabulator-col-content { padding: 10px 10px 8px; }
.tabulator .tabulator-header .tabulator-col div.tabulator-col-title { font-size: 12.5px; letter-spacing: .3px; color: inherit; }
.tabulator .tabulator-header .tabulator-col.tabulator-sortable.tabulator-col-sorter-element:hover { background: rgba(255,255,255,.08); }
.tabulator .tabulator-header .tabulator-col .tabulator-col-content .tabulator-col-sorter .tabulator-arrow { border-bottom-color: currentColor; opacity: .55; }
.tabulator .tabulator-header .tabulator-col[aria-sort="descending"] .tabulator-col-content .tabulator-col-sorter .tabulator-arrow { border-top-color: currentColor; opacity: 1; }
.tabulator .tabulator-header .tabulator-col[aria-sort="ascending"] .tabulator-col-content .tabulator-col-sorter .tabulator-arrow { opacity: 1; }
.tabulator .tabulator-tableholder .tabulator-table { background: transparent; color: var(--text-primary); }
.tabulator-row { background: var(--bg-card); border-bottom: 1px solid var(--border-light); min-height: 50px; }
.tabulator-row.tabulator-row-even { background: color-mix(in srgb, var(--navy-accent) 2%, var(--bg-card)); }
.tabulator-row.tabulator-selectable:hover { background: color-mix(in srgb, var(--navy-accent) 5%, var(--bg-card)); }
.tabulator-row.tabulator-selected, .tabulator-row.tabulator-selected:hover { background: color-mix(in srgb, var(--navy-accent) 13%, var(--bg-card)); }
.tabulator-row.row-good { background: color-mix(in srgb, var(--navy-accent) 8%, var(--bg-card)); }
.tabulator-row .tabulator-cell { border-right: 0; padding: 8px 10px; color: var(--text-primary); }
.tabulator-row .tabulator-cell.tabulator-frozen { background: inherit; }
.tabulator-row .tabulator-cell.tabulator-frozen.tabulator-frozen-left, .tabulator .tabulator-header .tabulator-col.tabulator-frozen-left { border-right: 1px solid var(--border-color); }
.tabulator .tabulator-header .tabulator-col.tabulator-frozen-left { background: var(--navy-primary); }
.tabulator .tabulator-footer { background: var(--bg-card); border-top: 1px solid var(--border-color); color: var(--text-secondary); padding: 8px 10px; font-weight: 500; }
.tabulator .tabulator-footer .tabulator-page { border: 1px solid var(--border-color); background: var(--bg-card); color: var(--text-primary); border-radius: 3px; padding: 5px 10px; margin: 0 2px; font-size: 12.5px; }
.tabulator .tabulator-footer .tabulator-page.active { background: var(--navy-accent); border-color: var(--navy-accent); color: var(--on-accent); }
.tabulator .tabulator-footer .tabulator-page:not(:disabled):not(.active):hover { border-color: var(--navy-accent); color: var(--accent-ink); background: var(--bg-card); }
.tabulator .tabulator-footer .tabulator-page:disabled { opacity: .45; }
.tabulator .tabulator-footer .tabulator-page-size { border: 1px solid var(--border-color); background: var(--input-bg); color: var(--text-primary); border-radius: 3px; padding: 4px 6px; }
.tabulator .tabulator-placeholder .tabulator-placeholder-contents { color: var(--text-muted); font-size: 13px; }
.tabulator-row .tabulator-responsive-collapse { border: 0; padding: 4px 14px 10px; }
.tabulator-row .tabulator-responsive-collapse table td { padding: 3px 10px 3px 0; color: var(--text-secondary); }
.tabulator-row .tabulator-cell .tabulator-responsive-collapse-toggle { background: var(--navy-accent); border-radius: 3px; }
.tabulator .tabulator-col-resize-handle:hover { background: rgba(var(--navy-accent-rgb), .25); }

/* header filters — light controls on the header. !important on padding: Tabulator writes inline padding:4px */
.tabulator .tabulator-header .tabulator-col .tabulator-header-filter { padding-top: 7px; }
.tabulator .tabulator-header-filter input:not([type="checkbox"]), .tabulator .tabulator-header-filter select {
    width: 100%; height: 30px; padding: 0 8px !important; border: 1px solid rgba(255,255,255,.22); background: var(--input-bg); color: var(--text-primary);
    font-family: inherit; font-size: 12.5px !important; font-weight: 500; border-radius: 3px; }
.tabulator .tabulator-header-filter input:focus { outline: none; border-color: var(--navy-accent); box-shadow: 0 0 0 2px rgba(var(--navy-accent-rgb), .35); }
.tabulator .tabulator-header-filter input[type="checkbox"] { width: 16px; height: 16px; accent-color: var(--navy-accent); cursor: pointer; }
.tb-range { display: flex; gap: 4px; }
.tb-range input, .tb-range .rs-dtf { flex: 1 1 0; min-width: 0; }
.tabulator .tb-range input[type="date"] { padding: 0 4px !important; }
.tabulator-edit-list { border: 1px solid var(--border-color) !important; background: var(--bg-card) !important; border-radius: 3px; box-shadow: 0 10px 24px var(--shadow-color, rgba(0,0,0,.15)); }
.tabulator-edit-list .tabulator-edit-list-item { color: var(--text-primary); padding: 7px 10px; }
.tabulator-edit-list .tabulator-edit-list-item.active, .tabulator-edit-list .tabulator-edit-list-item:hover { background: var(--navy-accent) !important; color: var(--on-accent) !important; }

/* tick bar — frozen rowHeader checkboxes */
.tabulator .tabulator-row-header input[type="checkbox"] { width: 16px; height: 16px; accent-color: var(--navy-accent); cursor: pointer; vertical-align: middle; }

/* progress bar (formatter colour = var(--navy-accent)) on a tinted track; empty stars dim in dark */
body.dark-mode .tabulator .tabulator-cell polygon[fill="#D2D2D2"] { fill: #3a3a5a; stroke: #55557a; }

/* inline editing — editable hint, editor fills the cell, per-cell save state */
.tabulator .tabulator-cell.tabulator-editable { cursor: cell; }
.tabulator .tabulator-cell.tabulator-editing { border: 1px solid var(--navy-accent); padding: 0; }
.tabulator .tabulator-cell.tabulator-editing :is(input, select) { width: 100%; height: 100%; padding: 0 8px !important; border: 0; font: inherit; background: var(--input-bg); color: var(--text-primary); }
.tb-saving { opacity: .55; pointer-events: none; background: linear-gradient(90deg, transparent, rgba(var(--navy-accent-rgb), .18), transparent) 0 0 / 200% 100%; animation: tbSave 1s linear infinite; }
.tb-saved { box-shadow: inset 0 0 0 2px color-mix(in srgb, var(--success) 65%, transparent); }
.tb-err { box-shadow: inset 0 0 0 2px color-mix(in srgb, var(--danger) 65%, transparent); }
@keyframes tbSave { to { background-position: -200% 0; } }
@media (prefers-reduced-motion: reduce) { .tb-saving { animation: none; } }

/* bulk bar — always visible, disabled at 0 ticked */
.tb-bar { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; padding: 8px 12px; margin-bottom: 10px;
          background: color-mix(in srgb, var(--navy-accent) 4%, var(--bg-card)); border: 1px solid var(--border-color); border-radius: 4px; }
.tb-bulk { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.tb-bulk-n { display: inline-flex; align-items: center; gap: 7px; font-size: 12.5px; font-weight: 700; color: var(--text-primary); margin-right: 4px; }
.tb-bulk-n i { color: var(--accent-ink); }
.tb-bulk-btn { display: inline-flex; align-items: center; gap: 7px; padding: 7px 12px; border: 1px solid var(--border-color); background: var(--bg-card);
               color: var(--text-primary); font-family: inherit; font-size: 12.5px; font-weight: 600; cursor: pointer; border-radius: 3px; transition: border-color .18s, color .18s; }
.tb-bulk-btn:hover:not(:disabled) { border-color: var(--navy-accent); color: var(--accent-ink); }
.tb-bulk-btn.danger { color: var(--danger); border-color: color-mix(in srgb, var(--danger) 35%, transparent); background: color-mix(in srgb, var(--danger) 7%, var(--bg-card)); }
.tb-bulk-btn.danger:hover:not(:disabled) { color: var(--danger); border-color: var(--danger); }
.tb-bulk-btn:disabled { opacity: .45; cursor: not-allowed; }
.tb-count { font-size: 12.5px; color: var(--text-muted); font-weight: 600; }
.tb-role { display: inline-flex; align-items: center; gap: 8px; white-space: nowrap; }
.tb-role .val { font-weight: 700; }
/* identity: photo or initials, "You" tag, name opens the edit form */
.tb-ava { width: 34px; height: 34px; border-radius: 50%; overflow: hidden; display: inline-flex; align-items: center; justify-content: center;
          background: rgba(var(--navy-accent-rgb), .14); color: var(--accent-ink); font-size: 12px; font-weight: 700; letter-spacing: .3px; }
.tb-ava img { width: 100%; height: 100%; object-fit: cover; }
.tb-you { display: inline-block; margin-left: 8px; padding: 1px 7px; border-radius: 3px; font-size: 10.5px; font-weight: 700;
          background: rgba(var(--navy-accent-rgb), .14); color: var(--accent-ink); vertical-align: middle; }
.tb-link { background: none; border: 0; padding: 0; font: inherit; font-weight: 700; color: var(--text-primary); cursor: pointer; text-align: left; }
.tb-link:hover, .tb-link:focus-visible { color: var(--accent-ink); text-decoration: none; outline: none; }
/* quick role change — pencil shows on row hover, always on touch */
.tb-cell-edit { width: 24px; height: 24px; border: 0; border-radius: 3px; background: transparent; color: var(--text-muted); cursor: pointer; opacity: 0; transition: opacity .15s, background .15s; }
.tabulator-row:hover .tb-cell-edit, .tb-cell-edit:focus-visible { opacity: 1; }
.tb-cell-edit:hover { background: rgba(var(--navy-accent-rgb), .12); color: var(--accent-ink); }
@media (hover: none) { .tb-cell-edit { opacity: .7; } }
.tb-empty { display: inline-flex; align-items: center; gap: 8px; color: var(--text-muted); font-size: 13px; }
.tb-empty .tb-link { color: var(--accent-ink); font-weight: 600; }

@media (max-width: 768px) {
    .tb-bar { gap: 8px; }
    .tabulator .tabulator-header-filter input, .tabulator .tabulator-cell.tabulator-editing :is(input, select) { font-size: 16px !important; } /* no iOS zoom */
    .tabulator .tabulator-footer .tabulator-paginator { font-size: 12px; }
}

/* ===== UI Customization studio (ui.php) — settings left, sticky live preview right ===== */
.ui-studio { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 20px; align-items: start; }
.ui-side { position: sticky; top: 16px; }
.ui-main, .ui-side { min-width: 0; }   /* grid columns may shrink below their content — wide tables scroll inside their own box */
.ui-panel { background: var(--bg-card); border: 1px solid var(--border-color); border-radius: 4px; padding: 18px 20px 20px; margin-bottom: 20px; }
.ui-panel-head { display: flex; align-items: center; gap: 12px; margin-bottom: 16px; }
.ui-panel-head h3 { margin: 0; font-size: 15px; font-weight: 700; color: var(--text-primary); }
.ui-panel-head p { margin: 2px 0 0; font-size: 12.5px; color: var(--text-muted); }
.ui-panel-ico { flex: 0 0 36px; height: 36px; display: inline-flex; align-items: center; justify-content: center; border-radius: 4px;
                background: rgba(var(--navy-accent-rgb), .12); color: var(--accent-ink); }

/* look tiles — style + mode, each with a tiny drawing of the result */
.ui-choice-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
@media (max-width: 1280px) { .ui-choice-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.ui-choice { position: relative; display: flex; flex-direction: column; gap: 10px; padding: 10px; border: 1px solid var(--border-color); border-radius: 4px;
             background: var(--bg-card); cursor: pointer; transition: border-color .15s, box-shadow .15s, transform .15s; }
.ui-choice input { position: absolute; opacity: 0; pointer-events: none; }
.ui-choice:hover { border-color: rgba(var(--navy-accent-rgb), .55); }
.ui-choice:has(input:checked) { border-color: var(--navy-accent); box-shadow: 0 0 0 2px rgba(var(--navy-accent-rgb), .22); }
.ui-choice:has(input:focus-visible) { outline: 2px solid var(--navy-accent); outline-offset: 2px; }
.ui-choice-txt strong { display: flex; align-items: center; gap: 7px; font-size: 13.5px; color: var(--text-primary); }
.ui-choice-txt strong i { color: var(--accent-ink); }
.ui-choice-txt small { display: block; margin-top: 2px; font-size: 12px; color: var(--text-muted); }
.ui-tick { position: absolute; top: 8px; right: 8px; width: 20px; height: 20px; border-radius: 50%; display: none; align-items: center; justify-content: center;
           background: var(--navy-accent); color: var(--on-accent); font-size: 10px; box-shadow: 0 1px 3px rgba(0,0,0,.2); }
.ui-choice:has(input:checked) .ui-tick, .ui-pal.active .ui-tick { display: inline-flex; }
.ui-thumb { display: grid; grid-template: 12px 1fr / 26% 1fr; gap: 0; height: 64px; border-radius: 3px; overflow: hidden; border: 1px solid var(--border-color); }
.ui-thumb i { grid-row: 1 / 3; }
.ui-thumb em { margin: 7px; border-radius: 2px; }
.ui-thumb-soft { background: color-mix(in srgb, var(--navy-accent) 4%, var(--bg-card)); }
.ui-thumb-soft i { background: color-mix(in srgb, var(--navy-accent) 7%, var(--bg-card)); border-right: 1px solid var(--border-color); }
.ui-thumb-soft b { background: var(--bg-card); border-bottom: 1px solid var(--border-color); }
.ui-thumb-soft em { background: var(--bg-card); border: 1px solid var(--border-color); }
.ui-thumb-classic { background: var(--bg-primary); }
.ui-thumb-classic i, .ui-thumb-classic b { background: var(--navy-primary); }
.ui-thumb-classic em { background: var(--bg-card); border-top: 3px solid var(--navy-accent); }
/* light / dark drawings show those modes whatever mode is on now — fixed values on purpose */
.ui-thumb-light { background: #f5f5f5; }
.ui-thumb-light i { background: #ffffff; border-right: 1px solid #e0e0e0; }
.ui-thumb-light b { background: #ffffff; border-bottom: 1px solid #e0e0e0; }
.ui-thumb-light em { background: #ffffff; border: 1px solid #e0e0e0; }
.ui-thumb-dark { background: #1a1a2e; }
.ui-thumb-dark i { background: #16213e; }
.ui-thumb-dark b { background: #1e1e3f; border-bottom: 1px solid #2d2d5a; }
.ui-thumb-dark em { background: #252550; }

/* palettes */
.ui-pal-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; }
.ui-pal { position: relative; display: flex; flex-direction: column; align-items: stretch; padding: 0; border: 1px solid var(--border-color); border-radius: 4px; overflow: hidden;
          background: var(--bg-card); text-align: left; cursor: pointer; font: inherit; transition: border-color .15s, box-shadow .15s, transform .15s; }
.ui-pal:hover { border-color: rgba(var(--navy-accent-rgb), .55); transform: translateY(-1px); }
.ui-pal:focus-visible { outline: 2px solid var(--navy-accent); outline-offset: 2px; }
.ui-pal.active { border-color: var(--navy-accent); box-shadow: 0 0 0 2px rgba(var(--navy-accent-rgb), .22); }
.ui-pal-sw { display: flex; width: 100%; height: 44px; }
.ui-pal-sw span { flex: 1; }
.ui-pal-meta { padding: 8px 10px 10px; display: flex; flex-direction: column; gap: 2px; }
.ui-pal-name { font-size: 13px; font-weight: 600; color: var(--text-primary); }
.ui-pal-id { font-size: 11.5px; color: var(--text-muted); }

/* custom colours */
.ui-colors { display: grid; gap: 10px; }
.ui-color { display: flex; align-items: center; gap: 14px; padding: 10px 12px; border: 1px solid var(--border-color); border-radius: 4px; }
.ui-color-sw { flex: 0 0 40px; height: 40px; border-radius: 4px; overflow: hidden; border: 1px solid var(--border-color); cursor: pointer; }
.ui-color-sw input { width: 64px; height: 64px; margin: -12px; border: 0; padding: 0; cursor: pointer; background: none; }
.ui-color-txt { flex: 1; min-width: 0; }
.ui-color-txt strong { display: block; font-size: 13.5px; color: var(--text-primary); }
.ui-color-txt small { font-size: 12px; color: var(--text-muted); }
.ui-color .hex-input { flex: 0 0 110px; width: 110px; height: 36px; padding: 0 10px; border: 1px solid var(--input-border); border-radius: 3px;
                       background: var(--input-bg); color: var(--text-primary); font: 600 13px 'Courier New', monospace; text-transform: uppercase; letter-spacing: .5px; }
.ui-color .hex-input:focus { outline: none; border-color: var(--navy-accent); box-shadow: 0 0 0 3px rgba(var(--navy-accent-rgb), .15); }

/* live preview — a tiny dashboard drawn only with theme tokens */
.uip { display: grid; grid-template-columns: 58px 1fr; height: 220px; border: 1px solid var(--border-color); border-radius: 4px; overflow: hidden; background: var(--bg-primary); }
.uip-side { background: var(--navy-primary); padding-top: 12px; }
.uip-side i { display: block; height: 8px; margin: 0 9px 9px; border-radius: 2px; background: rgba(255,255,255,.22); }
.uip-side i.on { background: var(--navy-accent); }
.uip-main { padding: 10px; display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.uip-head { height: 24px; display: flex; align-items: center; justify-content: space-between; padding: 0 8px; background: var(--bg-card); border: 1px solid var(--border-color); border-radius: 3px; }
.uip-head span { width: 64px; height: 6px; border-radius: 2px; background: color-mix(in srgb, var(--text-muted) 35%, transparent); }
.uip-head b { width: 14px; height: 14px; border-radius: 50%; background: var(--navy-accent); }
.uip-kpis { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.uip-kpis div { padding: 6px 8px; border-radius: 3px; background: var(--navy-primary); color: var(--on-primary); }
.uip-kpis div + div { background: var(--navy-accent); color: var(--on-accent); }
.uip-kpis b { display: block; font-size: 15px; line-height: 1.2; }
.uip-kpis span { font-size: 10px; opacity: .85; }
.uip-row { display: flex; align-items: center; gap: 6px; }
.uip-btn { padding: 4px 9px; border-radius: 3px; background: var(--navy-accent); color: var(--on-accent); font-size: 10.5px; font-weight: 600; }
.uip-chip { padding: 3px 7px; border-radius: 3px; background: rgba(var(--navy-accent-rgb), .14); color: var(--accent-ink); font-size: 10px; font-weight: 700; }
.uip-table { flex: 1; display: flex; flex-direction: column; background: var(--bg-card); border: 1px solid var(--border-color); border-radius: 3px; overflow: hidden; }
.uip-table::before { content: ''; height: 12px; background: var(--navy-primary); }
.uip-table i { flex: 1; border-bottom: 1px solid var(--border-light); }
.uip-table i.sel { background: rgba(var(--navy-accent-rgb), .13); }
.ui-swatches { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 14px; }
.ui-sw { display: flex; flex-direction: column; gap: 3px; padding: 8px; border: 1px solid var(--border-color); border-radius: 4px; min-width: 0; }
.ui-sw span { height: 26px; border-radius: 3px; border: 1px solid var(--border-color); }
.ui-sw small { font-size: 11px; color: var(--text-muted); }
.ui-sw code { font-size: 12px; font-weight: 700; color: var(--text-primary); background: none; padding: 0; }
.ui-badges { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 12px; }
.ui-badge { display: inline-flex; align-items: center; gap: 6px; padding: 4px 9px; border-radius: 3px; background: rgba(var(--navy-accent-rgb), .10); color: var(--text-primary); font-size: 12px; font-weight: 600; }
.ui-badge i { color: var(--accent-ink); }
.ui-badge-dirty { background: color-mix(in srgb, var(--warning) 18%, transparent); }
.ui-badge-dirty i { color: var(--warning); font-size: 7px; }
.ui-badge[hidden] { display: none; }

@media (max-width: 1100px) {
    .ui-studio { grid-template-columns: 1fr; }
    .ui-side { position: static; }
}
@media (max-width: 600px) {
    .ui-panel { padding: 14px; }
    .ui-choice-grid { grid-template-columns: 1fr 1fr; }
    .ui-pal-grid { grid-template-columns: 1fr 1fr; }
    .ui-color { flex-wrap: wrap; }
    .ui-color .hex-input { flex: 1 1 100%; width: 100%; font-size: 16px; }
}

/* ===== Chevron pipeline tabs — status filter above a table (chevron-pipeline.md), stage colours from the theme ===== */
.pipeline-stages { display: flex; width: 100%; margin-bottom: 14px; overflow-x: auto; -webkit-overflow-scrolling: touch; scrollbar-width: none; }
.pipeline-stages::-webkit-scrollbar { display: none; }
.pipeline-stage { flex: 1 1 0; min-width: 0; position: relative; display: flex; align-items: center; justify-content: center; gap: 8px;
    padding: 12px 20px 12px 28px; border: 0; cursor: pointer; font: inherit; color: #fff; background: var(--navy-primary);
    transition: filter .2s, opacity .2s;
    -webkit-clip-path: polygon(0 0, calc(100% - 18px) 0, 100% 50%, calc(100% - 18px) 100%, 0 100%, 18px 50%);
    clip-path: polygon(0 0, calc(100% - 18px) 0, 100% 50%, calc(100% - 18px) 100%, 0 100%, 18px 50%); }
.pipeline-stage + .pipeline-stage { margin-left: -12px; }
.pipeline-stage:first-child { -webkit-clip-path: polygon(0 0, calc(100% - 18px) 0, 100% 50%, calc(100% - 18px) 100%, 0 100%); clip-path: polygon(0 0, calc(100% - 18px) 0, 100% 50%, calc(100% - 18px) 100%, 0 100%); padding-left: 16px; }
.pipeline-stage:last-child { -webkit-clip-path: polygon(0 0, 100% 0, 100% 100%, 0 100%, 18px 50%); clip-path: polygon(0 0, 100% 0, 100% 100%, 0 100%, 18px 50%); }
.pipeline-stage.pipe-unread { --pc: var(--navy-accent); background: var(--pc); }
.pipeline-stage.pipe-read { --pc: var(--navy-light); background: var(--pc); }
.pipeline-stage:hover { filter: brightness(1.12); }
.pipeline-stage:not(.active):not(.pipe-active) { opacity: .8; }
.pipeline-stage:is(.active, .pipe-active) { opacity: 1; filter: brightness(1.06); }
.pipeline-stage:focus-visible { outline: 2px solid var(--navy-accent); outline-offset: 2px; }
.pipeline-stage-name { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .4px; white-space: nowrap; }
.pipeline-stage-count { font-size: 14px; font-weight: 800; }
@media (max-width: 768px) { .pipeline-stage { flex: 1 0 110px; padding: 10px 14px 10px 24px; } }

/* notifications page */
.n-type { width: 32px; height: 32px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; font-size: 14px; }
.n-info    { background: rgba(var(--navy-accent-rgb), .14); color: var(--accent-ink); }
.n-success { background: color-mix(in srgb, var(--success) 15%, transparent); color: var(--success); }
.n-warning { background: color-mix(in srgb, var(--warning) 20%, transparent); color: #b7791f; }
.n-danger  { background: color-mix(in srgb, var(--danger) 14%, transparent); color: var(--danger); }
.n-msg { display: flex; align-items: flex-start; gap: 8px; min-width: 0; white-space: normal; }
.n-msg > div { min-width: 0; }
.n-title { display: block; font-weight: 600; color: var(--text-primary); }
.n-msg.is-unread .n-title { font-weight: 800; }
.n-msg small { display: block; margin-top: 2px; font-size: 12.5px; color: var(--text-muted); line-height: 1.4; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.n-dot { flex: 0 0 8px; height: 8px; margin-top: 6px; border-radius: 50%; background: var(--navy-accent); }
.tabulator-row.n-row-unread { background: color-mix(in srgb, var(--navy-accent) 4.5%, var(--bg-card)); }
.n-state { display: inline-block; padding: 2px 9px; border-radius: var(--r-chip, 9999px); font-size: 11.5px; font-weight: 700; background: color-mix(in srgb, var(--text-muted) 14%, transparent); color: var(--text-muted); }
.n-state.is-new { background: rgba(var(--navy-accent-rgb), .14); color: var(--accent-ink); }
.notification-dropdown-foot { display: flex; align-items: center; justify-content: center; gap: 8px; padding: 10px; border-top: 1px solid var(--border-color);
    font-size: 13px; font-weight: 600; color: var(--accent-ink); text-decoration: none; }
.notification-dropdown-foot:hover { background: rgba(var(--navy-accent-rgb), .06); }

/* ===== DaisyUI-style toggle — theme accent. the width guard is load-bearing: `.form-group input` would stretch it ===== */
.toggle { appearance: none; -webkit-appearance: none; width: 44px; height: 24px; border-radius: 24px; background: color-mix(in srgb, var(--text-muted) 40%, transparent);
    position: relative; cursor: pointer; transition: background .25s; border: none; outline: none; vertical-align: middle; flex: 0 0 44px; margin: 0; }
.toggle:checked { background: var(--navy-accent); }
.toggle::before { content: ""; position: absolute; top: 2px; left: 2px; width: 20px; height: 20px; border-radius: 50%; background: #fff; transition: transform .25s; box-shadow: 0 1px 3px rgba(0,0,0,.2); }
.toggle:checked::before { transform: translateX(20px); }
.toggle:focus-visible { box-shadow: 0 0 0 3px rgba(var(--navy-accent-rgb), .3); }
.form-group .toggle, .toggle-row .toggle, .cfg-switch .toggle { width: 44px; min-width: 44px; max-width: 44px; height: 24px; flex: 0 0 44px; padding: 0; border-radius: 24px !important; }

/* ===== Setup pages (SMTP / OAuth) — switch list, presets, form grid, guides, readiness checklist ===== */
.cfg-switches { display: flex; flex-direction: column; border: 1px solid var(--border-color); border-radius: var(--r-ctrl, 4px); overflow: hidden; }
.cfg-switch { display: flex; align-items: center; gap: 14px; padding: 12px 14px; cursor: pointer; margin: 0; }
.cfg-switch + .cfg-switch { border-top: 1px solid var(--border-color); }
.cfg-switch:hover { background: rgba(var(--navy-accent-rgb), .04); }
.cfg-switch-ico { flex: 0 0 36px; height: 36px; display: inline-flex; align-items: center; justify-content: center; border-radius: var(--r-ctrl, 4px);
    background: rgba(var(--navy-accent-rgb), .12); color: var(--accent-ink); }
.cfg-switch-txt { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.cfg-switch-txt strong { font-size: 14px; color: var(--text-primary); }
.cfg-switch-txt small { font-size: 12.5px; color: var(--text-muted); }
.cfg-state { font-size: 12px; font-weight: 700; color: var(--text-muted); min-width: 26px; text-align: right; }
.cfg-state.is-on { color: var(--accent-ink); }
.cfg-presets { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 16px; }
.cfg-preset { display: inline-flex; align-items: center; gap: 7px; padding: 7px 12px; border: 1px solid var(--border-color); border-radius: var(--r-ctrl, 4px);
    background: var(--bg-card); color: var(--text-primary); font: inherit; font-size: 13px; font-weight: 600; cursor: pointer; }
.cfg-preset:hover { border-color: var(--navy-accent); color: var(--accent-ink); }
.cfg-preset.on { background: var(--navy-accent); border-color: var(--navy-accent); color: var(--on-accent); }
.cfg-form { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 16px; }
.cfg-form .form-group { margin-bottom: 14px; min-width: 0; }
.cfg-span-2 { grid-column: 1 / -1; }
.cfg-secret { position: relative; }
.cfg-secret input { padding-right: 44px !important; }
.cfg-eye { position: absolute; top: 50%; right: 6px; transform: translateY(-50%); width: 34px; height: 34px; border: 0; background: none; color: var(--text-muted); cursor: pointer; border-radius: var(--r-chip, 3px); }
.cfg-eye:hover { color: var(--accent-ink); background: rgba(var(--navy-accent-rgb), .08); }
.cfg-copy { display: flex; gap: 8px; }
.cfg-muted { font-weight: 400; color: var(--text-muted); font-size: 12px; }
.ui-panel-ico.ico-warn { background: color-mix(in srgb, var(--warning) 18%, transparent); color: #b7791f; }
.cfg-warn { display: flex; align-items: flex-start; gap: 8px; margin: 0 0 14px; padding: 10px 12px; border-radius: var(--r-ctrl, 4px);
    background: color-mix(in srgb, var(--warning) 12%, transparent); color: var(--text-primary); font-size: 13px; line-height: 1.45; }
.cfg-warn i { color: #b7791f; margin-top: 2px; }
.cfg-note { margin: 10px 0 0; font-size: 12.5px; color: var(--text-muted); text-align: center; }
.cfg-check.cfg-benefits { margin-bottom: 16px; }
.ui-panel a.btn { text-decoration: none; }
.cfg-account { display: flex; align-items: center; gap: 12px; padding: 12px 14px; margin-bottom: 14px; border: 1px solid var(--border-color); border-radius: var(--r-ctrl, 4px); }
.cfg-actions { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 10px; }
.cfg-actions .btn { justify-content: center; }
.cfg-danger-text { color: var(--danger) !important; }
.cfg-stats { list-style: none; margin: 0 0 16px; padding: 0; border: 1px solid var(--border-color); border-radius: var(--r-ctrl, 4px); }
.cfg-stats li { display: flex; align-items: center; gap: 10px; padding: 11px 14px; font-size: 13.5px; }
.cfg-stats li + li { border-top: 1px solid var(--border-color); }
.cfg-stats li i { width: 16px; text-align: center; color: var(--accent-ink); }
.cfg-stats li span { color: var(--text-muted); }
.cfg-stats li strong { margin-left: auto; color: var(--text-primary); overflow-wrap: anywhere; text-align: right; }
.cfg-table-wrap { border: 1px solid var(--border-color); border-radius: var(--r-ctrl, 4px); overflow: auto; }
.cfg-table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.cfg-table th { padding: 10px 12px; text-align: left; font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .4px; color: var(--text-muted);
    background: color-mix(in srgb, var(--navy-accent) 5%, var(--bg-card)); border-bottom: 1px solid var(--border-color); }
.cfg-table td { padding: 9px 12px; border-bottom: 1px solid var(--border-light); color: var(--text-primary); white-space: nowrap; }
.cfg-table td i { color: var(--accent-ink); margin-right: 6px; }
.cfg-table .r { text-align: right; } .cfg-table .n { color: var(--text-muted); width: 44px; }
.cfg-table tr.total td { border-bottom: 0; font-weight: 700; background: color-mix(in srgb, var(--navy-accent) 5%, var(--bg-card)); }
.cfg-copy input { flex: 1; min-width: 0; font-family: 'Courier New', monospace; font-size: 13px !important; }
.cfg-copy .btn { flex: none; }
.cfg-guide { border: 1px solid var(--border-color); border-radius: var(--r-ctrl, 4px); }
.cfg-guide + .cfg-guide { margin-top: 10px; }
.cfg-guide summary { display: flex; align-items: center; gap: 10px; padding: 12px 14px; cursor: pointer; font-size: 14px; font-weight: 600; color: var(--text-primary); list-style: none; }
.cfg-guide summary::-webkit-details-marker { display: none; }
.cfg-guide summary i { color: var(--accent-ink); width: 16px; text-align: center; }
.cfg-guide summary small { font-weight: 500; color: var(--text-muted); font-size: 12.5px; }
.cfg-guide summary::after { content: "\f078"; font: var(--fa-font-solid); margin-left: auto; color: var(--text-muted); font-size: 12px; transition: transform .2s; }
.cfg-guide[open] summary::after { transform: rotate(180deg); }
.cfg-steps { margin: 0; padding: 0 16px 14px 40px; color: var(--text-secondary); font-size: 13.5px; line-height: 1.6; }
.cfg-steps li + li { margin-top: 6px; }
.cfg-steps code { padding: 1px 6px; border-radius: 3px; background: rgba(var(--navy-accent-rgb), .1); color: var(--text-primary); font-size: 12.5px; word-break: break-all; }
.cfg-meter { height: 6px; border-radius: 6px; background: color-mix(in srgb, var(--text-muted) 18%, transparent); overflow: hidden; margin-bottom: 14px; }
.cfg-meter i { display: block; height: 100%; width: 0; background: var(--navy-accent); transition: width .3s; border-radius: inherit; }
.cfg-check { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.cfg-check li { display: flex; align-items: flex-start; gap: 10px; min-width: 0; }
.cfg-check li > i { flex: 0 0 22px; height: 22px; margin-top: 1px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; font-size: 11px;
    font-style: normal; background: color-mix(in srgb, var(--text-muted) 16%, transparent); color: var(--text-muted); }
.cfg-check li > i::before { content: "\f00d"; font: var(--fa-font-solid); }
.cfg-check li.ok > i { background: rgba(var(--navy-accent-rgb), .16); color: var(--accent-ink); }
.cfg-check li.ok > i::before { content: "\f00c"; }
.cfg-check span { min-width: 0; display: flex; flex-direction: column; }
.cfg-check strong { font-size: 13.5px; color: var(--text-primary); }
.cfg-check small { font-size: 12.5px; color: var(--text-muted); overflow-wrap: anywhere; }
.ui-side .ui-panel .form-group { margin-bottom: 12px; }
@media (max-width: 600px) {
    .cfg-form { grid-template-columns: 1fr; }
    .cfg-switch { padding: 12px; gap: 12px; }
    .cfg-switch-ico { display: none; }
    .cfg-copy { flex-direction: column; }
}

/* ===== About (admin only) — full width: identity strip, tabs, one pane at a time ===== */
.ab-hero { display: flex; align-items: center; gap: 16px; padding: 16px 20px; margin-bottom: 16px; background: var(--bg-card);
    border: 1px solid var(--border-color); border-radius: var(--r-panel, 4px); }
.ab-logo { width: 52px; height: 52px; border-radius: var(--r-ctrl, 4px); object-fit: cover; flex: none; border: 1px solid var(--border-color); }
.ab-id { min-width: 0; flex: 1; }
.ab-id h1 { margin: 0; font-size: 19px; font-weight: 700; color: var(--text-primary); display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.ab-id p { margin: 3px 0 0; font-size: 13px; color: var(--text-muted); }
.ab-id p strong { color: var(--text-secondary); }
.ab-ver { padding: 2px 8px; border-radius: var(--r-chip, 3px); background: rgba(var(--navy-accent-rgb), .12); color: var(--accent-ink); font-size: 12px; font-weight: 700; }
.ab-stats { display: flex; gap: 8px; list-style: none; margin: 0; padding: 0; }
.ab-stats li { min-width: 78px; padding: 8px 12px; text-align: center; border: 1px solid var(--border-color); border-radius: var(--r-ctrl, 4px); }
.ab-stats strong { display: block; font-size: 18px; color: var(--accent-ink); line-height: 1.1; }
.ab-stats span { font-size: 11.5px; color: var(--text-muted); text-transform: uppercase; letter-spacing: .4px; }
.ab-tabs { display: flex; gap: 4px; margin-bottom: 16px; border-bottom: 1px solid var(--border-color); overflow-x: auto; scrollbar-width: none; }
.ab-tabs::-webkit-scrollbar { display: none; }
.ab-tab { display: inline-flex; align-items: center; gap: 8px; padding: 10px 16px; border: 0; border-radius: var(--r-ctrl, 6px); margin-bottom: 0;
    background: none; color: var(--text-muted); font: inherit; font-size: 14px; font-weight: 600; cursor: pointer; white-space: nowrap; }
.ab-tab:hover { color: var(--text-primary); }
.ab-tab.on { color: var(--accent-ink); background: rgba(var(--navy-accent-rgb), .1); }
.ab-tab em { font-style: normal; font-size: 11.5px; padding: 1px 7px; border-radius: var(--r-chip, 3px); background: color-mix(in srgb, var(--text-muted) 14%, transparent); }
.ab-tab.on em { background: rgba(var(--navy-accent-rgb), .14); color: var(--accent-ink); }
.ab-pane > .about-table-wrapper + .about-table-wrapper { margin-top: 16px; }
.ab-pane .about-table-wrapper { width: 100%; }
.ab-pane .about-roles-table { width: 100%; }
.ab-legend { display: flex; align-items: center; flex-wrap: wrap; gap: 6px 10px; margin: 0 0 12px; font-size: 13px; color: var(--text-secondary); }
.ab-legend small { margin-left: auto; color: var(--text-muted); font-size: 12.5px; }
.ab-legend .perm-on { display: inline-flex; align-items: center; justify-content: center; width: 20px; height: 20px; border-radius: var(--r-chip, 3px);
    background: rgba(var(--navy-accent-rgb), .14); font-size: 11px; margin-left: 4px; }
.ab-legend .perm-on:first-child { margin-left: 0; }
.ab-pane .about-roles-table td:not(:first-child) { white-space: nowrap; }
.ab-legend a { color: var(--accent-ink); }
.ab-empty { color: var(--text-muted); }
.ab-dev { display: flex; align-items: center; gap: 20px; padding: 20px; background: var(--bg-card); border: 1px solid var(--border-color); border-radius: var(--r-panel, 4px); }
.ab-dev-img { width: 84px; height: 84px; border-radius: 50%; object-fit: cover; flex: none; border: 2px solid rgba(var(--navy-accent-rgb), .35); }
.ab-dev-txt h3 { margin: 0; font-size: 18px; color: var(--text-primary); }
.ab-dev-txt p { margin: 4px 0 0; font-size: 13.5px; color: var(--text-muted); }
.ab-work { font-weight: 700; color: var(--text-primary) !important; margin-top: 14px !important; }
.ab-work i { color: var(--accent-ink); }
.ab-links { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 10px; }
.ab-links .btn { text-decoration: none; }
.ab-wa { background: #25D366; color: #06281a; }
.ab-wa:hover { filter: brightness(1.05); color: #06281a; }
html[data-shape="glass"] :is(.ab-hero, .ab-dev) { background: var(--glass-bg) !important; -webkit-backdrop-filter: var(--glass-blur); backdrop-filter: var(--glass-blur); border-color: var(--glass-line) !important; }
@media (max-width: 768px) {
    .ab-hero { flex-wrap: wrap; padding: 14px; }
    .ab-stats { width: 100%; }
    .ab-stats li { flex: 1; min-width: 0; }
    .ab-legend small { margin-left: 0; width: 100%; }
    .ab-dev { flex-direction: column; text-align: center; }
    .ab-links { justify-content: center; }
}

/* ===== AI settings card ===== */
.ai-key-link { margin-left: auto; font-size: 12px; font-weight: 600; color: var(--accent-ink); text-decoration: none; }
.ai-key-link:hover { text-decoration: none; }
.ai-key-row label { display: flex; align-items: center; gap: 8px; }

/* ===== AI Assistant page ===== */
/* the borrowed .chat-skel / .chat-none / .chat-banner helpers read these — point them at the navy palette */
body.page-ai {
    --wa-mut: var(--text-muted);
    --wa-txt: var(--text-primary);
    --wa-head: var(--bg-secondary);
    --wa-panel: var(--bg-card);
    --wa-line: var(--border-color);
}

.ai-wrap {
    display: grid; grid-template-columns: 300px 1fr;
    height: calc(100vh - 250px); min-height: 430px;
    background: var(--bg-card); border: 1px solid var(--border-color); border-radius: 3px;
    box-shadow: 0 2px 4px var(--shadow-color); overflow: hidden;
}

.ai-side { display: flex; flex-direction: column; min-width: 0; min-height: 0; border-right: 1px solid var(--border-color); background: var(--bg-secondary); }
.ai-side-head { padding: 12px; border-bottom: 1px solid var(--border-color); }
.ai-convs { flex: 1; min-height: 0; overflow-y: auto; padding: 8px; scrollbar-width: thin; }
.ai-side-foot {
    display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
    padding: 10px 12px; border-top: 1px solid var(--border-color);
    font-size: 12px; color: var(--text-muted);
}
.ai-quota { margin-left: auto; font-weight: 700; color: var(--accent-ink); }

.ai-conv {
    position: relative; display: flex; align-items: center; gap: 10px; width: 100%;
    padding: 9px 10px; margin-bottom: 4px; border: none; border-radius: 3px;
    background: transparent; color: var(--text-primary); font-family: inherit; text-align: left; cursor: pointer;
    transition: background 0.15s;
}
.ai-conv:hover { background: rgba(var(--navy-accent-rgb), 0.08); }
.ai-conv.active { background: rgba(var(--navy-accent-rgb), 0.14); box-shadow: inset 3px 0 0 var(--navy-accent); }
.ai-conv > i { color: var(--accent-ink); font-size: 13px; flex-shrink: 0; }
.ai-conv-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.ai-conv-main strong { font-size: 13.2px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ai-conv-main em { font-style: normal; font-size: 11px; color: var(--text-muted); }
.ai-conv-del { flex-shrink: 0; padding: 4px 6px; border-radius: var(--r-ctrl, 6px); color: var(--text-muted); font-size: 12px; opacity: 0; transition: opacity 0.15s, color 0.15s; }
.ai-conv:hover .ai-conv-del { opacity: 1; }
.ai-conv-del:hover { color: var(--danger); background: rgba(234, 67, 53, 0.12); }

.ai-pane { display: flex; flex-direction: column; min-width: 0; min-height: 0; background: var(--bg-card); }
.ai-msgs { flex: 1; min-height: 0; overflow-y: auto; padding: 20px 22px; display: flex; flex-direction: column; gap: 16px; scrollbar-width: thin; }

.ai-blank { margin: auto; text-align: center; max-width: 460px; padding: 20px; }
.ai-blank i {
    width: 88px; height: 88px; border-radius: 50%; margin-bottom: 16px;
    display: inline-flex; align-items: center; justify-content: center;
    font-size: 34px; color: var(--accent-ink); background: rgba(var(--navy-accent-rgb), 0.12);
}
.ai-blank h3 { font-size: 21px; font-weight: 700; color: var(--text-primary); margin: 0 0 6px; }
.ai-blank p { font-size: 14px; color: var(--text-muted); margin: 0; }
.ai-tips { display: flex; flex-direction: column; gap: 8px; margin-top: 20px; }
.ai-tip {
    padding: 10px 14px; border: 1px solid var(--border-color); border-radius: 3px;
    background: var(--bg-secondary); color: var(--text-secondary);
    font-family: inherit; font-size: 13.2px; text-align: left; cursor: pointer;
    transition: border-color 0.2s, color 0.2s;
}
.ai-tip:hover { border-color: var(--navy-accent); color: var(--accent-ink); }

.ai-msg { display: flex; align-items: flex-start; gap: 11px; max-width: 84%; }
.ai-msg.mine { align-self: flex-end; flex-direction: row-reverse; }
.ai-avatar {
    flex-shrink: 0; width: 32px; height: 32px; border-radius: 50%;
    display: inline-flex; align-items: center; justify-content: center; font-size: 13px;
    background: rgba(var(--navy-accent-rgb), 0.14); color: var(--accent-ink);
}
.ai-msg.mine .ai-avatar { background: var(--navy-primary); color: #fff; }
.ai-avatar-bad { background: rgba(234, 67, 53, 0.14); color: var(--danger); }
.ai-bub {
    padding: 11px 14px; border-radius: 3px; font-size: 14px; line-height: 1.65;
    background: var(--bg-secondary); color: var(--text-primary);
    border: 1px solid var(--border-color); word-break: break-word; min-width: 0;
}
.ai-msg.mine .ai-bub { background: rgba(var(--navy-accent-rgb), 0.1); border-color: rgba(var(--navy-accent-rgb), 0.25); }
.ai-bub-bad { background: rgba(234, 67, 53, 0.08); border-color: rgba(234, 67, 53, 0.3); color: var(--danger); }
.ai-bub code { padding: 1px 5px; border-radius: 3px; background: rgba(var(--navy-primary-rgb), 0.09); font-family: 'Courier New', monospace; font-size: 12.5px; }
.ai-code {
    margin: 8px 0; padding: 11px 13px; border-radius: 3px; overflow-x: auto;
    background: var(--navy-primary); color: #e6edf6;
    font-family: 'Courier New', monospace; font-size: 12.5px; line-height: 1.55; white-space: pre;
}
.ai-meta { display: block; margin-top: 6px; font-size: 11px; color: var(--text-muted); }

/* thinking indicator — three dots while the model is composing */
.ai-dots { display: inline-flex; gap: 5px; padding: 3px 0; }
.ai-dots i { width: 7px; height: 7px; border-radius: 50%; background: var(--navy-accent); opacity: 0.4; animation: aiDot 1.2s infinite ease-in-out; }
.ai-dots i:nth-child(2) { animation-delay: 0.18s; }
.ai-dots i:nth-child(3) { animation-delay: 0.36s; }
@keyframes aiDot { 0%, 60%, 100% { opacity: 0.3; transform: translateY(0); } 30% { opacity: 1; transform: translateY(-4px); } }

.ai-composer {
    display: flex; align-items: flex-end; gap: 10px; flex-shrink: 0;
    padding: 12px 16px; border-top: 1px solid var(--border-color); background: var(--bg-secondary);
}
.ai-composer textarea {
    flex: 1; resize: none; max-height: 160px; padding: 11px 14px;
    font-family: inherit; font-size: 16px; line-height: 21px;
    background: var(--bg-card); color: var(--text-primary);
    border: 1px solid var(--input-border); border-radius: 3px;
}
.ai-composer textarea:focus { outline: none; border-color: var(--navy-accent); box-shadow: 0 0 0 3px rgba(var(--navy-accent-rgb), 0.15); }
.ai-send {
    flex-shrink: 0; width: 44px; height: 44px; border: none; border-radius: 3px; cursor: pointer;
    display: inline-flex; align-items: center; justify-content: center;
    background: var(--navy-accent); color: var(--on-accent); font-size: 16px;
    transition: filter 0.2s, transform 0.2s;
}
.ai-send:hover:not(:disabled) { filter: brightness(1.08); transform: scale(1.05); }
.ai-send:disabled { opacity: 0.6; cursor: not-allowed; }
.ai-composer-off { justify-content: center; gap: 8px; color: var(--text-muted); font-size: 13px; padding: 18px; }

@media (max-width: 900px) {
    .ai-wrap { grid-template-columns: 1fr; grid-template-rows: auto 1fr; height: calc(100vh - 230px); }
    .ai-side { border-right: none; border-bottom: 1px solid var(--border-color); max-height: 168px; }
    .ai-msg { max-width: 94%; }
}
@media (prefers-reduced-motion: reduce) {
    .ai-dots i { animation: none; }
    .ai-send:hover:not(:disabled) { transform: none; }
}

/* Dark Mode — per-user access */
body.dark-mode .rbac-tabs { border-bottom-color: var(--border-color); }
body.dark-mode .rbac-tab { color: var(--text-muted); }
body.dark-mode .rbac-tab.active { color: #fff; background: rgba(var(--navy-accent-rgb), .22); }
body.dark-mode .rbac-userbar { background: var(--bg-card); border-color: var(--border-color); }
body.dark-mode .rbac-userbar-main { color: var(--text-primary); }
body.dark-mode .rbac-ovr-chip { background: #3a2f00; color: #ffe69c; border-color: #5c4a00; }
body.dark-mode .rbac-ovr-chip.off { background: #10331f; color: #8fe0ac; border-color: #1d5836; }
body.dark-mode .rbac-empty { color: var(--text-muted); }

/* header danger button (e.g. Clear Credentials) */
.head-btn.danger { border-color: color-mix(in srgb, var(--danger) 35%, transparent); background: color-mix(in srgb, var(--danger) 10%, transparent); color: var(--danger); }
.head-btn.danger:hover { background: color-mix(in srgb, var(--danger) 18%, transparent); border-color: var(--danger); }

/* quick theme menu: soft / classic switch */
.theme-quick-style { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); gap: 6px; padding: 10px 12px 0; }
.theme-quick-style .mode-toggle-btn { min-width: 0; justify-content: center; padding: 6px 8px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.theme-quick-style .mode-toggle-btn i { flex: none; }
.theme-quick-style .mode-toggle-btn.active { background: var(--navy-accent); border-color: var(--navy-accent); color: var(--on-accent); }
.theme-mode-option small { display: block; font-size: 12px; font-weight: 400; color: var(--text-muted); }

/* =====================================================================
   SOFT UI — the sidebar look on every page (html[data-ui="soft"]).
   Sidebar recipe: tinted ground · white panels with a hairline border, 4px corners,
   1px shadow · light tinted heads instead of dark fills · accent only on icons + actions.
   Classic = everything above this block, untouched.
   ===================================================================== */
html[data-ui="soft"] body {
    --bg-primary: color-mix(in srgb, var(--navy-accent) 4%, var(--bg-secondary));
    --soft-head: color-mix(in srgb, var(--navy-accent) 6%, var(--bg-card));
    --soft-tint: rgba(var(--navy-accent-rgb), 0.10);
    --soft-r: var(--sb-r);
    --soft-shadow: 0 1px 3px var(--shadow-color);
}

/* panels */
html[data-ui="soft"] :is(.header, .data-section, .lte-card, .settings-mega-card, .stat-card, .acct-card,
    .about-table-wrapper, .skeleton-card, .info-box, .setup-guide-table, .control-group, .security-feature, .stat-item-inline, .palette-card) {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--soft-r) !important; /* beats the global rounding polish */
    box-shadow: var(--soft-shadow);
}
html[data-ui="soft"] :is(.small-box, .modal-content, .modal-box, .notification-dropdown, .header-tool-dropdown, .account-info-card) { border-radius: var(--soft-r) !important; }
html[data-ui="soft"] :is(.control-group, .security-feature, .stat-item-inline) { box-shadow: none; }
html[data-ui="soft"] .palette-card.active { border-color: var(--navy-accent); box-shadow: 0 0 0 2px rgba(var(--navy-accent-rgb), 0.35); }
html[data-ui="soft"] :is(.settings-card-header, .lte-card-header) { background: transparent; border-bottom: 1px solid var(--border-color); }
html[data-ui="soft"] body.dark-mode .settings-card-header { background: transparent; }
html[data-ui="soft"] .lte-card { border-top-width: 1px; border-left-width: 1px; border-top-color: var(--border-color); border-left-color: var(--border-color); }

/* icon tiles: tinted square, coloured glyph */
html[data-ui="soft"] :is(.settings-card-icon, .stat-card-icon, .control-icon, .security-feature-icon) {
    background: var(--soft-tint); color: var(--accent-ink); border-radius: var(--soft-r); box-shadow: none;
}
html[data-ui="soft"] :is(.settings-card-icon, .stat-card-icon, .control-icon, .security-feature-icon) i { color: inherit; }
html[data-ui="soft"] :is(.icon-gradient-danger, .stat-icon-danger) { background: color-mix(in srgb, var(--danger) 12%, transparent); color: var(--danger); }
html[data-ui="soft"] .icon-gradient-warning { background: color-mix(in srgb, var(--warning) 16%, transparent); color: #b7791f; }
html[data-ui="soft"] .icon-gradient-success { background: color-mix(in srgb, var(--success) 12%, transparent); color: var(--success); }

/* KPI tiles: white panel, colour lives in the glyph + footer */
html[data-ui="soft"] .small-box { --sbx: var(--navy-accent); background: var(--bg-card); color: var(--text-primary); border: 1px solid var(--border-color); border-radius: var(--soft-r); box-shadow: var(--soft-shadow); }
html[data-ui="soft"] .small-box:hover { box-shadow: 0 4px 12px var(--shadow-color); }
html[data-ui="soft"] .small-box .inner h3 { color: var(--text-primary); }
html[data-ui="soft"] .small-box .inner p { color: var(--text-muted); opacity: 1; }
html[data-ui="soft"] .small-box .icon { color: var(--sbx); opacity: 0.22; }
html[data-ui="soft"] .small-box-footer { background: color-mix(in srgb, var(--sbx) 7%, var(--bg-card)); color: var(--sbx); border-top: 1px solid var(--border-light); }
html[data-ui="soft"] .small-box-footer:hover { background: color-mix(in srgb, var(--sbx) 14%, var(--bg-card)); color: var(--sbx); }

/* table heads: light tint, not a dark bar */
html[data-ui="soft"] .main-content table thead :is(tr, th) {
    background: var(--soft-head) !important; color: var(--text-secondary) !important; border-color: var(--border-color) !important;
}
html[data-ui="soft"] .main-content table thead th { border-bottom: 1px solid var(--border-color) !important; }
html[data-ui="soft"] .main-content table thead th i { color: var(--accent-ink); }
html[data-ui="soft"] .chip-navy { background: var(--soft-tint); color: var(--text-primary); }
html[data-ui="soft"] .tabulator { border-radius: var(--soft-r); box-shadow: var(--soft-shadow); }
html[data-ui="soft"] .ui-panel { border-radius: var(--soft-r); box-shadow: var(--soft-shadow); }
html[data-ui="soft"] .uip-side { background: color-mix(in srgb, var(--navy-accent) 5%, var(--bg-card)); border-right: 1px solid var(--border-color); }
html[data-ui="soft"] .uip-side i { background: color-mix(in srgb, var(--text-muted) 25%, transparent); }
html[data-ui="soft"] .uip-side i.on { background: var(--navy-accent); }
html[data-ui="soft"] .uip-kpis div { background: var(--bg-card); color: var(--text-primary); border: 1px solid var(--border-color); }
html[data-ui="soft"] .uip-kpis div b { color: var(--accent-ink); }
html[data-ui="soft"] .uip-table::before { background: var(--soft-head); border-bottom: 1px solid var(--border-color); }
html[data-ui="soft"] .tabulator .tabulator-header, html[data-ui="soft"] .tabulator .tabulator-header .tabulator-col.tabulator-frozen-left { background: var(--soft-head); color: var(--text-secondary); border-bottom: 1px solid var(--border-color); }
html[data-ui="soft"] .tabulator .tabulator-header .tabulator-col { border-right-color: var(--border-color); }
html[data-ui="soft"] .tabulator .tabulator-header .tabulator-col.tabulator-sortable.tabulator-col-sorter-element:hover { background: rgba(var(--navy-accent-rgb), .06); }
html[data-ui="soft"] .tabulator .tabulator-header-filter input:not([type="checkbox"]), html[data-ui="soft"] .tabulator .tabulator-header-filter select { border-color: var(--border-color); }
html[data-ui="soft"] :is(.tabulator, .tb-bar, .tb-bulk-btn, .tabulator-page, .tabulator-page-size, .tabulator-header-filter input) { border-radius: var(--soft-r) !important; }

/* banners: hairline all round + tint, no accent stripe */
html[data-ui="soft"] .info-banner { border: 1px solid rgba(var(--navy-accent-rgb), 0.25); border-radius: var(--soft-r); background: rgba(var(--navy-accent-rgb), 0.06); color: var(--text-secondary); }
html[data-ui="soft"] .info-banner-warning { border-color: color-mix(in srgb, var(--warning) 45%, transparent); background: color-mix(in srgb, var(--warning) 9%, transparent); }

/* controls: same corners as the sidebar rows */
html[data-ui="soft"] :is(.btn, .mode-toggle-btn, .palette-card, .hex-input, .notification-item, .lang-item, .action-badge, input:not([type="checkbox"]):not([type="radio"]):not([type="color"]), select, textarea, .hdr-search, .header-tool-btn, .filters-section) { border-radius: var(--soft-r) !important; }
html[data-ui="soft"] .btn-primary { background: var(--navy-accent); border-color: var(--navy-accent); color: var(--on-accent); }
html[data-ui="soft"] .btn-primary:hover { filter: brightness(1.06); }
html[data-ui="soft"] .header-tool-btn:hover { background: var(--sb-hover, rgba(var(--navy-accent-rgb), 0.07)); color: var(--text-primary); }
html[data-ui="soft"] .hdr-search { background: var(--bg-primary); }

/* ===== Header tier 1 — sidebar language =====
   tinted icon tile + title/breadcrumb · tinted search with "/" hint · square tool buttons with the
   sidebar hover tint · hairline divider · account chip with name + role */
.header > .head-title { flex-direction: row; align-items: center; gap: 12px; }
.head-ico {
    flex: none; width: 42px; height: 42px; display: inline-flex; align-items: center; justify-content: center;
    border-radius: var(--sb-r, 4px); background: rgba(var(--navy-accent-rgb), 0.12); color: var(--accent-ink); font-size: 18px;
}
.head-txt { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.header .head-txt h1 { margin: 0; font-size: 20px; font-weight: 700; line-height: 1.2; color: var(--text-primary); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.header .header-right { gap: 4px; }
.header .hdr-search-wrap { flex: 0 1 290px; margin-right: 8px; }
.header .hdr-search {
    height: 38px; padding: 0 8px 0 12px; gap: 9px;
    background: color-mix(in srgb, var(--navy-accent) 4%, var(--bg-secondary));
    border: 1px solid var(--border-color); border-radius: var(--sb-r, 4px) !important;
}
.header .hdr-search:hover { border-color: rgba(var(--navy-accent-rgb), 0.45); }
.hdr-kbd {
    flex: none; min-width: 22px; height: 22px; padding: 0 6px; display: inline-flex; align-items: center; justify-content: center;
    font: 600 11px/1 inherit; color: var(--text-muted);
    background: var(--bg-card); border: 1px solid var(--border-color); border-radius: 3px;
}
.hdr-search:focus-within .hdr-kbd { opacity: 0; }

/* every tool = one 38px square, sidebar hover tint */
.header .header-right :is(.header-tool-btn, .notification-bell-btn) {
    position: relative; width: 38px; height: 38px; padding: 0; justify-content: center; display: inline-flex; align-items: center;
    font-size: 16px; color: var(--text-secondary); background: transparent; border: 0; border-radius: var(--sb-r, 4px) !important;
    transition: background-color .2s, color .2s;
}
.header .header-right :is(.header-tool-btn, .notification-bell-btn):hover,
.header .header-right .header-tool-wrapper:has(.header-tool-dropdown.open) > .header-tool-btn,
.header .header-right .notification-bell-wrapper:has(.notification-dropdown.show, .notification-dropdown.open) > .notification-bell-btn {
    background: rgba(var(--navy-accent-rgb), 0.09); color: var(--accent-ink);
}
.header .header-right .lang-switcher .header-tool-btn { width: auto; padding: 0 10px; gap: 6px; }
.header .header-right .lang-current { font-size: 12px; font-weight: 700; letter-spacing: .3px; }
.header .notification-badge { top: 3px; right: 2px; min-width: 17px; height: 17px; font-size: 10px; border-radius: 3px; border: 2px solid var(--bg-card); box-sizing: content-box; padding: 0 3px; }
.header .msg-dot { top: 8px; right: 8px; }

/* account chip behind a hairline */
.header .hdr-user-wrap { margin-left: 6px; padding-left: 10px; border-left: 1px solid var(--border-color); }
.header .hdr-user {
    max-width: 210px; gap: 10px; padding: 4px 8px 4px 4px; border: 1px solid transparent; border-radius: var(--sb-r, 4px);
    background: transparent; transition: background-color .2s, border-color .2s;
}
.header .hdr-user:hover, .header .hdr-user-wrap:has(.header-tool-dropdown.open) .hdr-user { background: rgba(var(--navy-accent-rgb), 0.07); border-color: var(--border-color); }
.header .hdr-user-av { width: 34px; height: 34px; }
.hdr-user-txt { display: flex; flex-direction: column; align-items: flex-start; min-width: 0; line-height: 1.2; }
.hdr-user-txt .hdr-user-name { font-size: 14px; font-weight: 600; color: var(--text-primary); max-width: 130px; }
.hdr-user-role { font-size: 11.5px; font-weight: 500; color: var(--text-muted); }

@media (max-width: 768px) {
    .head-ico { width: 36px; height: 36px; font-size: 15px; }
    .header .head-txt h1 { font-size: 18px; }
    .header .header-right { gap: 2px; justify-content: space-between; }
    .header .hdr-user-wrap { margin-left: 2px; padding-left: 6px; }
}
@media (max-width: 640px) { .hdr-user-txt { display: none; } }

/* processing overlay — writes only */
.rs-overlay { position: fixed; inset: 0; z-index: 20000; display: flex; align-items: center; justify-content: center; background: rgba(15, 23, 42, .35); backdrop-filter: blur(2px); opacity: 0; visibility: hidden; transition: opacity .15s, visibility 0s .15s; }
.rs-overlay.on { opacity: 1; visibility: visible; transition-delay: 0s; }
.rs-overlay-card { display: flex; flex-direction: column; align-items: center; gap: 12px; min-width: 220px; padding: 22px 26px; background: var(--bg-card); border: 1px solid var(--border-color); border-radius: var(--sb-r, 4px); box-shadow: 0 12px 32px rgba(0, 0, 0, .18); }
.rs-overlay-card img { border-radius: 50%; object-fit: cover; }
.rs-overlay-card span { font-size: 14px; font-weight: 600; color: var(--text-primary); }
.rs-overlay-bar { position: relative; width: 160px; height: 3px; overflow: hidden; border-radius: 3px; background: rgba(var(--navy-accent-rgb), .15); }
.rs-overlay-bar i { position: absolute; inset: 0 auto 0 0; width: 40%; background: var(--navy-accent); animation: rsOvBar 1s linear infinite; }
@keyframes rsOvBar { from { transform: translateX(-100%); } to { transform: translateX(260%); } }
@media (prefers-reduced-motion: reduce) { .rs-overlay-bar i { animation-duration: 2.5s; } }
.rs-swal-list { margin: 0; padding-left: 18px; text-align: left; font-size: 13px; }

/* ===== Settings app — section list left (sidebar language), one section right ===== */
.set-app { display: grid; grid-template-columns: 270px minmax(0, 1fr); gap: 16px; align-items: start; }
.set-nav {
    position: sticky; top: 0; display: flex; flex-direction: column; gap: 2px; padding: 8px;
    background: color-mix(in srgb, var(--navy-accent) 4%, var(--bg-secondary));
    border: 1px solid var(--border-color); border-radius: var(--sb-r, 4px);
}
.set-nav a {
    display: flex; align-items: center; gap: 12px; padding: 9px 10px;
    border: 1px solid transparent; border-radius: var(--sb-r, 4px);
    color: var(--text-secondary); text-decoration: none; transition: background-color .2s, border-color .2s, color .2s;
}
.set-nav a:hover { background: rgba(var(--navy-accent-rgb), .07); color: var(--text-primary); }
.set-nav a.active { background: var(--bg-card); border-color: var(--border-color); box-shadow: 0 1px 3px var(--shadow-color); color: var(--text-primary); }
.set-nav a:focus-visible { outline: 2px solid rgba(var(--navy-accent-rgb), .55); outline-offset: -2px; }
.set-nav-ico {
    flex: none; width: 34px; height: 34px; display: inline-flex; align-items: center; justify-content: center;
    border-radius: var(--sb-r, 4px); background: rgba(var(--navy-accent-rgb), .10); color: var(--text-muted); font-size: 14px; transition: color .2s, background-color .2s;
}
.set-nav a.active .set-nav-ico, .set-nav a:hover .set-nav-ico { color: var(--accent-ink); }
.set-nav a.active .set-nav-ico { background: rgba(var(--navy-accent-rgb), .16); }
.set-nav-txt { display: flex; flex-direction: column; gap: 2px; min-width: 0; flex: 1; }
.set-nav-txt strong { font-size: 14.5px; font-weight: 600; color: inherit; }
.set-nav-txt small { font-size: 12px; color: var(--text-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.set-nav-go { flex: none; font-size: 10px; color: var(--text-muted); opacity: 0; transition: opacity .2s; }
.set-nav a.active .set-nav-go, .set-nav a:hover .set-nav-go { opacity: 1; }

/* one section at a time; the old 2x2 grid just flows its cards */
.set-main { min-width: 0; }
.set-main [data-set]:not(.on) { display: none !important; }
.set-main .settings-grid-2x2 { display: contents; }
.set-main [data-set].on { margin: 0 0 16px !important; animation: setIn .18s ease-out; }
@keyframes setIn { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .set-main [data-set].on { animation: none; } }

/* phones: list becomes a scrolling chip row */
@media (max-width: 900px) {
    .set-app { grid-template-columns: 1fr; gap: 12px; }
    .set-nav { position: static; flex-direction: row; overflow-x: auto; scrollbar-width: none; padding: 6px; }
    .set-nav::-webkit-scrollbar { display: none; }
    .set-nav a { flex: none; padding: 7px 10px; gap: 8px; }
    .set-nav-ico { width: 28px; height: 28px; font-size: 12px; }
    .set-nav-txt small, .set-nav-go { display: none; }
}

/* =====================================================================
   PHONE SHELL — app bar · ⋮ sheet · float dock · bottom bar (pattern from the NFC build)
   desktop: the sheet is display:contents (buttons stay in tier 2), tools stay in the header
   ===================================================================== */
.hdr-sheet, .hdr-sheet-page { display: contents; }
.hdr-sheet-app, .hdr-more-btn, .hdr-tool-lbl { display: none; }
.hf-bar:not(:has(.head-filters:not([hidden]))) { display: none; }

/* alerts / install — one dock: sidebar foot on desktop, ⋮ sheet on phones */
.rs-float-dock { display: flex; flex-direction: column; gap: 8px; }
.rs-float-dock:empty { display: none; }
.rs-float-btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 40px; padding: 8px 14px;
    border: 1px solid transparent; border-radius: var(--sb-r, 4px); cursor: pointer;
    font: inherit; font-size: 13.5px; font-weight: 600; color: #fff; transition: filter .2s;
}
.rs-float-btn:hover { filter: brightness(1.08); }
.rs-float-btn:disabled { opacity: .7; cursor: default; }
.rs-float-btn.is-push { order: 1; background: var(--bg-card); color: var(--text-primary); border-color: var(--border-color); }
.rs-float-btn.is-push i { color: var(--accent-ink); }
.rs-float-btn.is-install { order: 2; background: var(--navy-accent); }
body.dark-mode .rs-float-btn :is(span, i) { color: inherit !important; }
body.dark-mode .rs-float-btn.is-push i { color: var(--accent-ink) !important; }
html:not([data-sb="light"]) .sidebar-dock .rs-float-btn.is-push i { color: inherit !important; }
.sidebar-dock { flex-shrink: 0; padding: 8px 12px 12px; }
.sidebar-dock:not(:has(.rs-float-btn)) { display: none; }
.sidebar-dock .rs-float-btn { width: 100%; }
@media (min-width: 769px) {
    .sidebar.collapsed .sidebar-dock { padding: 8px 10px; }
    .sidebar.collapsed .sidebar-dock .rs-float-btn { padding: 8px 0; }
    .sidebar.collapsed .sidebar-dock .rs-float-btn span { display: none; }
}

/* bottom bar — sidebar language: tinted panel, hairline, active = accent tint */
.mobile-bottom-nav {
    background: color-mix(in srgb, var(--navy-accent) 4%, var(--bg-secondary)) !important;
    border-top: 1px solid var(--border-color); box-shadow: 0 -2px 10px var(--shadow-color) !important; padding: 0 4px;
}
.mobile-bottom-nav .mobile-nav-item {
    position: relative; flex: 1; min-width: 0; padding: 7px 4px; gap: 3px; border-radius: var(--sb-r, 4px);
    color: var(--text-muted) !important; font-size: 10.5px; font-weight: 600; background: none !important; box-shadow: none !important;
}
.mobile-bottom-nav .mobile-nav-item i { font-size: 19px; margin: 0; transform: none !important; color: inherit !important; }
.mobile-bottom-nav .mobile-nav-item span { color: inherit !important; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
.mobile-bottom-nav .mobile-nav-item.active { color: var(--accent-ink) !important; background: rgba(var(--navy-accent-rgb), .10) !important; }
.mobile-bottom-nav .mobile-nav-item:active { background: rgba(var(--navy-accent-rgb), .08) !important; }
.mobile-nav-pill { top: 3px; right: 50%; margin-right: -22px; border-radius: 3px; border: 2px solid color-mix(in srgb, var(--navy-accent) 4%, var(--bg-secondary)); box-sizing: content-box; }
.mobile-nav-pill.is-dot { min-width: 8px; width: 8px; height: 8px; padding: 0; margin-right: -14px; top: 6px; border-radius: 50%; }

@media (max-width: 768px) {
    /* shell: page scrolls inside .main-content; bar sticks to its top */
    .app-container { height: 100dvh; }
    .main-content { padding: 0 12px calc(84px + env(safe-area-inset-bottom, 0px)) !important; }
    body:not(.page-chat):not(.page-ai) .main-content:has(.hdr-sheet .head-btn.primary) { padding-bottom: calc(150px + env(safe-area-inset-bottom, 0px)) !important; }

    /* app bar: title | bell · avatar · ⋮ */
    .main-content > .header {
        position: sticky; top: 0; z-index: 950; flex-wrap: nowrap; align-items: center; gap: 2px; min-height: 56px;
        margin: 0 -12px 12px; padding: 6px 4px 6px 14px; border: 0; border-bottom: 1px solid var(--border-color);
        border-radius: 0 !important; box-shadow: 0 2px 8px var(--shadow-color);
    }
    .main-content > .header::after { display: none !important; }
    .main-content > .header > .head-title { flex: 1 1 auto; min-width: 0; gap: 10px; }
    .main-content > .header .head-ico { width: 32px; height: 32px; font-size: 14px; }
    .main-content > .header .head-txt h1 { font-size: 17px; }
    .main-content > .header .head-crumbs { display: none; }
    .main-content > .header .header-right { order: 2; flex: none; margin: 0; padding: 0; gap: 0; position: static; justify-content: flex-end; }
    .main-content > .header .header-right :is(.notification-bell-btn, .hdr-user) { width: 42px; height: 42px; padding: 0; justify-content: center; border: 0; }
    .main-content > .header .hdr-user-wrap { margin: 0; padding: 0; border: 0; }
    .main-content > .header .hdr-user-caret, .main-content > .header .hdr-user-txt { display: none; }
    .hdr-more-btn {
        order: 3; position: relative; flex: none; display: inline-flex; align-items: center; justify-content: center;
        width: 42px; height: 42px; padding: 0; font-size: 18px; color: var(--text-secondary); background: transparent; border: 0;
        border-radius: var(--sb-r, 4px); cursor: pointer; touch-action: manipulation;
    }
    .hdr-more-btn:hover, .header.is-more .hdr-more-btn { color: var(--accent-ink); background: rgba(var(--navy-accent-rgb), .09); }
    .header:has(#rsFloatDock > .rs-float-btn) .hdr-more-btn::after { content: ''; position: absolute; top: 9px; right: 10px; width: 8px; height: 8px; background: var(--danger); border-radius: 50%; }

    /* bell + account menus: full-width panels under the bar */
    .main-content > .header .header-right :is(.notification-bell-wrapper, .hdr-user-wrap) { position: static; }
    .main-content > .header .header-right :is(.notification-dropdown, .user-menu) { position: absolute; top: 100%; left: 8px; right: 8px; width: auto; max-width: none; margin-top: 4px; }

    /* the ⋮ sheet — visibility only (no opacity / transform) so the fixed primary button inside stays put */
    .hdr-sheet {
        position: absolute; top: 100%; left: 0; right: 0; z-index: 2; display: flex; flex-direction: column; gap: 12px;
        max-height: calc(100dvh - 150px); overflow-y: auto; padding: 12px;
        background: var(--bg-card); border-bottom: 1px solid var(--border-color); box-shadow: 0 12px 24px var(--shadow-hover); visibility: hidden;
    }
    .header.is-more .hdr-sheet { visibility: visible; }
    .hdr-sheet-page { display: block; }
    .hdr-sheet .head-btns { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin: 0; padding: 0 !important; }
    .hdr-sheet .head-btn { width: auto; height: 44px; justify-content: flex-start; gap: 10px; padding: 0 12px; }
    .hdr-sheet .head-btn span { position: static; width: auto; height: auto; overflow: hidden; clip: auto; text-overflow: ellipsis; white-space: nowrap; }
    .hdr-sheet-page:has(.head-btn:not(.primary)) + .hdr-sheet-app { padding-top: 12px; border-top: 1px solid var(--border-color); }
    .hdr-sheet-app { display: flex; flex-wrap: wrap; gap: 8px; }
    .hdr-sheet-app > * { flex: 1 1 calc(33.33% - 6px); min-width: 84px; }
    .hdr-sheet-app .header-tool-btn {
        position: relative; width: 100% !important; height: auto !important; min-height: 62px; flex-direction: column; justify-content: center; gap: 6px;
        padding: 8px 4px !important; font-size: 18px !important; background: color-mix(in srgb, var(--navy-accent) 4%, var(--bg-secondary)) !important;
        border: 1px solid var(--border-color) !important;
    }
    .hdr-sheet-app .hdr-tool-lbl { display: block; font-size: 11.5px; font-weight: 600; line-height: 1.2; color: var(--text-secondary); white-space: nowrap; }
    .hdr-sheet-app .lang-current { position: absolute; top: 6px; right: 7px; font-size: 10px; }
    .hdr-sheet-app .msg-dot { top: 8px; right: 12px; }
    /* an open tool menu takes its own full-width row, inline (never off-screen) */
    .hdr-sheet-app .header-tool-wrapper:has(> .header-tool-dropdown.open) { flex-basis: 100%; order: 9; }
    .hdr-sheet-app .header-tool-dropdown { position: static; width: auto !important; min-width: 0; max-width: none; margin-top: 8px; box-shadow: none; }
    .hdr-sheet .rs-float-dock { flex-direction: row; flex-wrap: wrap; gap: 8px; }
    .hdr-sheet .rs-float-btn { flex: 1 1 140px; min-height: 44px; }

    /* primary page button = floating action button above the bottom bar */
    .hdr-sheet .head-btn.primary {
        position: fixed; right: 16px; bottom: calc(80px + env(safe-area-inset-bottom, 0px)); z-index: 960; visibility: visible;
        width: 56px; height: 56px; padding: 0; justify-content: center; font-size: 20px; border-radius: 6px;
        box-shadow: 0 6px 18px rgba(var(--navy-accent-rgb), .45);
    }
    .hdr-sheet .head-btn.primary i { font-size: 20px; }
    .hdr-sheet .head-btn.primary span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
    .hdr-sheet .head-btns:not(:has(.head-btn:not(.primary))) { display: contents; }
    body:has(.sidebar.mobile-open) .hdr-sheet .head-btn.primary, body:has(.modal-overlay.active, .modal-overlay.show) .hdr-sheet .head-btn.primary { visibility: hidden; }
    /* chat + ai: the composer owns the bottom, so their button stays in the sheet */
    /* refresh-type primaries don't deserve a FAB — they stay in the sheet like chat's */
    .hdr-sheet .head-btn.primary:has(.fa-sync, .fa-rotate, .fa-arrows-rotate) {
        position: static; visibility: inherit; width: auto; height: 44px; justify-content: flex-start; padding: 0 12px; font-size: 13.5px; box-shadow: none;
    }
    .hdr-sheet .head-btn.primary:has(.fa-sync, .fa-rotate, .fa-arrows-rotate) span { position: static; width: auto; height: auto; clip: auto; }
    body .main-content:has(.hdr-sheet .head-btn.primary:has(.fa-sync, .fa-rotate)) { padding-bottom: calc(84px + env(safe-area-inset-bottom, 0px)) !important; }
    :is(.page-chat, .page-ai) .hdr-sheet .head-btn.primary {
        position: static; visibility: inherit; width: auto; height: 44px; justify-content: flex-start; padding: 0 12px; font-size: 13.5px; box-shadow: none;
    }
    :is(.page-chat, .page-ai) .hdr-sheet .head-btn.primary span { position: static; width: auto; height: auto; clip: auto; }
    :is(.page-chat, .page-ai) .hdr-sheet .head-btns:not(:has(.head-btn:not(.primary))) { display: grid; }

    /* filter strips: their own card under the bar, scroll away with the page */
    .hf-bar { margin: 0 0 12px; padding: 10px; background: var(--bg-card); border: 1px solid var(--border-color); border-radius: var(--sb-r, 4px); box-shadow: 0 1px 3px var(--shadow-color); }
    .hf-bar .head-filters { margin: 0; width: 100%; }
    .hf-bar .hf-strip { width: 100%; display: flex; flex-wrap: wrap; gap: 8px; }
    .hf-bar .hf-strip > * { flex: 1 1 100%; min-width: 0; }
    .hf-bar .hf-strip > .hf-field:has(.sd-wrap) { flex: 1 1 calc(50% - 30px); }
    .hf-bar .hf-strip > .btn-icon { flex: 0 0 44px; width: 44px !important; height: 38px; }
    .hf-bar .hf-field > :is(input, .sd-wrap, .rs-dtf) { flex: 1 1 auto; width: auto !important; min-width: 0; font-size: 16px !important; }
    .hf-bar .hf-range > .rs-dtf { width: 0 !important; flex: 1 1 0; font-size: 15px !important; }
    .hf-bar .hf-seg button { flex: 1; }

    /* pop-ups sit above the bottom bar and the drawer */
    .modal-overlay { z-index: 1003 !important; }

    /* tables: tighter chip rows, info + pager stack */
    .dt-foot { justify-content: center; }

    /* roles matrix: scroll both ways, narrower sticky page column */
    .rbac-table { table-layout: auto !important; width: max-content !important; min-width: 100%; }
    .rbac-table :is(th, td):first-child { width: 128px !important; min-width: 128px; max-width: 128px; white-space: normal !important; }
    .rbac-tabs { overflow-x: auto; flex-wrap: nowrap; scrollbar-width: none; }
    .rbac-tabs::-webkit-scrollbar { display: none; }

    /* chat bar sits flush like every page now */
    body.page-chat .main-content > .header { margin-bottom: 10px; }
    body.page-chat .chat-bar { margin: -8px 0 8px; }
}
@media (max-width: 576px) {
    .lte-kpi-grid { grid-template-columns: 1fr 1fr !important; gap: 10px !important; }
    .lte-kpi-grid .small-box .inner { padding: 12px 12px 8px; }
    .lte-kpi-grid .small-box .inner h3 { font-size: 24px; }
    .lte-kpi-grid .small-box .inner p { font-size: 12.5px; }
    .lte-kpi-grid .small-box .icon { font-size: 34px !important; top: 10px; right: 10px; }
    .lte-kpi-grid .small-box-footer { font-size: 12px; padding: 5px 0; }
}

@media (max-width: 380px) {
    .hdr-sheet .head-btns { grid-template-columns: 1fr; }
    .palette-gallery { grid-template-columns: 1fr 1fr !important; }
}

/* AI assistant — same full-height shell as chat: header card on top, the panel fills the rest */
body.page-ai .main-content { overflow: hidden; display: flex; flex-direction: column; }
body.page-ai .main-content > .header { flex-shrink: 0; }
body.page-ai .ai-wrap { flex: 1 1 auto; height: auto; min-height: 0; }
@media (min-width: 769px) {
    body.page-ai .main-content { padding-bottom: 20px !important; }
    body.page-ai .header::after { display: none; }
    body.page-ai .header .head-btns { display: none; } /* the panel's own New Chat is right there */
}
@media (max-width: 900px) { body.page-ai .ai-wrap { height: auto; } }

/* language menu — search + 240-odd languages */
.lang-menu { width: 300px; max-height: 420px; padding: 0; display: none; flex-direction: column; overflow: hidden; }
.lang-menu.open { display: flex; }
.lang-search-wrap { position: relative; flex: none; padding: 8px; border-bottom: 1px solid var(--border-color); }
.lang-search-wrap i { position: absolute; left: 20px; top: 50%; transform: translateY(-50%); font-size: 13px; color: var(--text-muted); }
.lang-search { width: 100%; height: 38px; padding: 0 10px 0 34px; border: 1px solid var(--border-color); border-radius: var(--sb-r, 4px) !important; background: var(--input-bg); color: var(--text-primary); font-size: 14px !important; }
.lang-search:focus { outline: none; border-color: var(--navy-accent); box-shadow: 0 0 0 3px rgba(var(--navy-accent-rgb), .14); }
.lang-list { flex: 1; overflow-y: auto; padding: 6px; overscroll-behavior: contain; }
.lang-item { gap: 10px; }
.lang-code { flex: none; min-width: 34px; padding: 3px 0; text-align: center; font-size: 10.5px; font-weight: 700; letter-spacing: .3px; color: var(--text-secondary); background: rgba(var(--navy-accent-rgb), .08); border-radius: 3px; }
.lang-item.active .lang-code { background: var(--navy-accent); color: var(--on-accent); }
.lang-names { display: flex; flex-direction: column; min-width: 0; text-align: start; line-height: 1.25; }
.lang-names b { font-weight: 600; font-size: 14px; color: var(--text-primary); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lang-names small { font-size: 11.5px; color: var(--text-muted); }
.lang-item[dir="rtl"] .lang-names { text-align: right; }
.lang-none { padding: 16px; text-align: center; font-size: 13px; color: var(--text-muted); }
@media (max-width: 768px) {
    .hdr-sheet-app .lang-menu { width: auto; max-height: 360px; }
    .lang-search { font-size: 16px !important; }
}

/* ===== Split add / edit form — 90% wide: form left, live preview right, actions in a footer bar ===== */
.modal.modal-split {
    width: 90vw; max-width: 90vw; height: 90vh; max-height: 90vh; overflow: hidden;
    display: flex; flex-direction: column; border-radius: var(--sb-r, 4px) !important;
}
.modal-split .modal-header { flex: none; padding: 16px 22px; }
.modal-split .split-tabs { display: none; }
.split-body { flex: 1; min-height: 0; display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(320px, .75fr); }
.split-form { min-height: 0; overflow-y: auto; padding: 22px 24px; }
.split-form .form-grid { gap: 18px; }
.split-preview {
    min-height: 0; overflow-y: auto; padding: 20px 22px; display: flex; flex-direction: column; gap: 10px;
    background: color-mix(in srgb, var(--navy-accent) 4%, var(--bg-secondary)); border-left: 1px solid var(--border-color);
}
.modal-foot {
    flex: none; display: flex; justify-content: flex-end; gap: 10px; padding: 12px 22px;
    background: var(--bg-card); border-top: 1px solid var(--border-color);
}
.modal-foot .btn { min-width: 120px; justify-content: center; }

/* preview pieces */
.pv-label { display: flex; align-items: center; gap: 7px; margin-top: 6px; font-size: 11.5px; font-weight: 700; letter-spacing: .4px; text-transform: uppercase; color: var(--text-muted); }
.pv-label:first-child { margin-top: 0; }
.pv-card {
    display: flex; align-items: center; gap: 14px; padding: 16px; background: var(--bg-card);
    border: 1px solid var(--border-color); border-radius: var(--sb-r, 4px); box-shadow: 0 1px 3px var(--shadow-color);
}
.pv-avatar { width: 56px; height: 56px; border-radius: 50%; object-fit: cover; flex: none; border: 1px solid var(--border-color); }
.pv-who { display: flex; flex-direction: column; min-width: 0; flex: 1; }
.pv-who strong { font-size: 16px; color: var(--text-primary); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pv-who small { font-size: 13px; color: var(--text-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pv-badge { flex: none; padding: 4px 9px; font-size: 12px; font-weight: 700; color: var(--accent-ink); background: rgba(var(--navy-accent-rgb), .12); border-radius: 3px; }
.pv-sbrow {
    display: flex; align-items: center; gap: 10px; padding: 8px 10px; background: var(--bg-card);
    border: 1px solid var(--border-color); border-radius: var(--sb-r, 4px);
}
.pv-sbrow img { width: 34px; height: 34px; border-radius: 50%; object-fit: cover; }
.pv-sbrow span { display: flex; flex-direction: column; line-height: 1.25; min-width: 0; }
.pv-sbrow b { font-size: 14px; color: var(--text-primary); }
.pv-sbrow small { font-size: 12px; color: var(--text-muted); }
.pv-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.pv-list li {
    display: flex; align-items: flex-start; gap: 10px; padding: 9px 11px; font-size: 13.5px; line-height: 1.4; color: var(--text-secondary);
    background: var(--bg-card); border: 1px solid var(--border-color); border-radius: var(--sb-r, 4px);
}
.pv-list li i { flex: none; width: 16px; margin-top: 2px; text-align: center; color: var(--text-muted); }
.pv-list li.ok i { color: var(--accent-ink); }
.pv-list li.warn { border-color: color-mix(in srgb, var(--warning) 45%, transparent); background: color-mix(in srgb, var(--warning) 8%, var(--bg-card)); }
.pv-list li.warn i { color: #b7791f; }
.pv-list li.muted { color: var(--text-muted); }
.pv-list li s { color: var(--text-muted); }
.pv-list li b { color: var(--text-primary); }
.pv-count { display: block; margin-top: 6px; text-align: right; font-size: 12px; color: var(--text-muted); }
.pv-chat { padding: 16px; background: var(--wa-bg, var(--bg-primary)); border: 1px solid var(--border-color); border-radius: var(--sb-r, 4px); }
.pv-chat .chat-msg { max-width: 100%; }
.pv-ph { color: var(--text-muted); font-style: italic; }
body.dark-mode .split-preview :is(span, b, strong, small, li) { color: inherit; }

/* phones: full-screen sheet, one pane at a time */
@media (max-width: 900px) {
    .modal.modal-split { width: 100vw; height: 100dvh; max-width: none; border-radius: 0 !important; }
    .modal-split .split-tabs {
        display: flex; flex: none; gap: 4px; margin: 10px 14px 0; padding: 3px;
        background: color-mix(in srgb, var(--navy-accent) 4%, var(--bg-secondary)); border: 1px solid var(--border-color); border-radius: var(--sb-r, 4px);
    }
    .split-tabs button { flex: 1; height: 38px; border: 0; border-radius: var(--r-ctrl, 6px); background: none; color: var(--text-secondary); font: 600 14px/1 inherit; cursor: pointer; }
    .split-tabs button.on { background: var(--bg-card); color: var(--accent-ink); box-shadow: 0 1px 3px var(--shadow-color); }
    .split-body { grid-template-columns: 1fr; }
    .modal-split:not(.show-preview) .split-preview, .modal-split.show-preview .split-form { display: none; }
    .split-preview { border-left: 0; }
    .split-form, .split-preview { padding: 16px 14px; }
    .modal-foot { padding: 10px 14px calc(10px + env(safe-area-inset-bottom, 0px)); }
    .modal-foot .btn { flex: 1; min-width: 0; }
    .modal-overlay:has(.modal-split) { padding: 0 !important; align-items: stretch !important; }
}

/* soft look: pop-up head = light bar like the sidebar, accent icon, quiet close */
html[data-ui="soft"] .modal-header { background: var(--bg-card) !important; color: var(--text-primary); border-bottom: 1px solid var(--border-color); border-radius: 0 !important; }
html[data-ui="soft"] .modal-header h3 { color: var(--text-primary) !important; display: flex; align-items: center; gap: 10px; font-size: 18px; }
html[data-ui="soft"] .modal-header h3 i { width: 34px; height: 34px; display: inline-flex; align-items: center; justify-content: center; border-radius: var(--sb-r, 4px); background: rgba(var(--navy-accent-rgb), .12); color: var(--accent-ink) !important; font-size: 15px; }
html[data-ui="soft"] .modal-header .close-btn { color: var(--text-muted) !important; font-size: 20px; border-radius: var(--sb-r, 4px); }
html[data-ui="soft"] .modal-header .close-btn:hover { color: var(--text-primary) !important; background: rgba(var(--navy-accent-rgb), .08); }
/* searchable dropdown inside a normal form field */
.form-group .sd-wrap { width: 100%; }
.form-group .sd-trigger { min-height: 46px; padding: 0 12px; border-radius: var(--sb-r, 4px); font-size: 16px; }

/* ===== SHAPE — squared · rounded · glass. corners + surfaces for the whole app (<html data-shape>).
   LAST block on purpose: beats the Soft / Classic corner rules and the old rounding polish ===== */
:root, html[data-shape="squared"] { --r-panel: 4px;  --r-ctrl: 3px;  --r-chip: 3px; --sb-r: 4px; }
html[data-shape="rounded"]        { --r-panel: 14px; --r-ctrl: 10px; --r-chip: 7px; --sb-r: 10px; }
html[data-shape="glass"]          { --r-panel: 20px; --r-ctrl: 12px; --r-chip: 9px; --sb-r: 12px; }

/* panels */
html[data-shape] :is(.data-section, .lte-card, .settings-mega-card, .account-info-card, .acct-card, .about-table-wrapper,
    .setup-guide-table, .small-box, .stat-card, .info-box, .modal-content, .modal-box, .modal, .notification-dropdown, .header-tool-dropdown, .header,
    .ui-panel, .uip, .tabulator, .tb-bar, .skeleton-card, .filters-section, .control-group, .security-feature, .rs-overlay-card, .split-preview) {
    border-radius: var(--r-panel) !important;
}
/* controls */
html[data-shape] :is(.btn, .head-btn, .header-tool-btn, .mode-toggle-btn, .hdr-search, .hf-field, .hf-seg, .tb-bulk-btn, .tabulator-page, .tabulator-page-size,
    .lang-item, .notification-item, .action-badge, .sd-trigger, .ui-choice, .ui-pal, .ui-color, .ui-sw, .ui-color-sw, .theme-quick-swatch, .palette-card, .hex-input,
    .act, input:not([type="checkbox"]):not([type="radio"]):not([type="color"]):not([type="file"]), select, textarea) {
    border-radius: var(--r-ctrl) !important;
}
/* chips + small tags (avatars and dots stay round) */
html[data-shape] :is(.chip, .tb-pill, .role-badge, .status-badge, .val-box, .tb-you, .ui-badge, .tb-cell-edit, .uip-chip, .uip-btn, .uip-kpis div, .hf-seg button, .head-ico) {
    border-radius: var(--r-chip) !important;
}

/* glass — frosted surfaces over a soft palette-tinted backdrop (iOS-style). vars live on body so dark-mode tokens apply */
html[data-shape="glass"] body {
    --glass-bg: color-mix(in srgb, var(--bg-card) 56%, transparent);
    --glass-strong: color-mix(in srgb, var(--bg-card) 93%, transparent);   /* dropdowns + modals: text must win over what is behind */
    --glass-line: rgba(255, 255, 255, 0.6);
    --glass-blur: blur(22px) saturate(180%);
    --glass-shadow: 0 10px 30px rgba(15, 23, 42, 0.10), 0 1px 2px rgba(15, 23, 42, 0.06);
    --glass-hi: inset 0 1px 0 rgba(255, 255, 255, 0.7);
    background:
        radial-gradient(55vw 55vw at 0% 0%, rgba(var(--navy-accent-rgb), 0.24), transparent 62%),
        radial-gradient(45vw 45vw at 100% 8%, rgba(var(--navy-light-rgb), 0.22), transparent 62%),
        radial-gradient(60vw 45vw at 55% 100%, rgba(var(--navy-primary-rgb), 0.16), transparent 62%),
        var(--bg-primary) !important;
    background-attachment: fixed !important;
}
html[data-shape="glass"] body.dark-mode {
    --glass-line: rgba(255, 255, 255, 0.10);
    --glass-shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
    --glass-hi: inset 0 1px 0 rgba(255, 255, 255, 0.08);
}
html[data-shape="glass"] :is(.app-container, .main-content) { background: transparent !important; }
/* backdrop-filter makes every frosted box its own layer: lift the header (theme / bell / account dropdowns)
   above the page, and lift whichever panel holds the open control (searchable dropdown, date picker) */
html[data-shape="glass"] .header { position: relative; z-index: 60; }
html[data-shape="glass"] :is(.ui-panel, .data-section, .lte-card, .settings-mega-card, .acct-card, .tb-bar, .small-box, .info-box, .stat-card):focus-within { position: relative; z-index: 40; }
html[data-shape="glass"] :is(.data-section, .lte-card, .settings-mega-card, .acct-card, .about-table-wrapper, .ui-panel, .tb-bar, .header,
    .filters-section, .skeleton-card, .control-group, .security-feature, .info-box, .stat-card) {
    background: var(--glass-bg) !important;
    -webkit-backdrop-filter: var(--glass-blur); backdrop-filter: var(--glass-blur);
    border: 1px solid var(--glass-line) !important;
    box-shadow: var(--glass-shadow), var(--glass-hi) !important;
}
html[data-shape="glass"][data-ui="soft"] .small-box {
    background: var(--glass-bg) !important;
    -webkit-backdrop-filter: var(--glass-blur); backdrop-filter: var(--glass-blur);
    border: 1px solid var(--glass-line) !important; box-shadow: var(--glass-shadow), var(--glass-hi) !important;
}
/* floating layers read on top of anything -> stronger glass */
html[data-shape="glass"] :is(.notification-dropdown, .header-tool-dropdown, .modal-content, .modal-box, .modal, .tabulator-edit-list, .sd-menu) {
    background: var(--glass-strong) !important;
    -webkit-backdrop-filter: var(--glass-blur); backdrop-filter: var(--glass-blur);
    border: 1px solid var(--glass-line) !important; box-shadow: 0 18px 48px rgba(15, 23, 42, 0.22), var(--glass-hi) !important;
}
html[data-shape="glass"] .sidebar { --sb-bg: var(--glass-bg); -webkit-backdrop-filter: var(--glass-blur); backdrop-filter: var(--glass-blur); border-right: 1px solid var(--glass-line) !important; }
html[data-shape="glass"] .mobile-bottom-nav { background: var(--glass-strong) !important; -webkit-backdrop-filter: var(--glass-blur); backdrop-filter: var(--glass-blur); border-top: 1px solid var(--glass-line) !important; }
/* nested surfaces sit on the frosted panel instead of repainting it */
html[data-shape="glass"] .tabulator { background: transparent !important; border-color: var(--glass-line) !important; }
html[data-shape="glass"] .tabulator-row { background: transparent; }
html[data-shape="glass"] .tabulator-row.tabulator-row-even { background: color-mix(in srgb, var(--bg-card) 25%, transparent); }
html[data-shape="glass"][data-ui="soft"] .tabulator .tabulator-header,
html[data-shape="glass"][data-ui="soft"] .tabulator .tabulator-header .tabulator-col.tabulator-frozen-left { background: color-mix(in srgb, var(--soft-head) 60%, transparent); }
html[data-shape="glass"] .tabulator .tabulator-footer { background: transparent; }
html[data-shape="glass"] .main-content table:not(.rp-table) :is(tbody tr, tbody td) { background: transparent !important; }
html[data-shape="glass"] .main-content table:not(.rp-table) tbody tr:nth-child(even) { background: color-mix(in srgb, var(--bg-card) 25%, transparent) !important; }
html[data-shape="glass"][data-ui="soft"] .main-content table:not(.rp-table) thead :is(tr, th) { background: color-mix(in srgb, var(--soft-head, var(--bg-card)) 60%, transparent) !important; }
html[data-shape="glass"][data-ui="classic"] .main-content table:not(.rp-table) thead :is(tr, th) { background: rgba(var(--navy-primary-rgb), .88) !important; }   /* classic heads keep white text */
html[data-shape="glass"] :is(.ui-choice, .ui-pal, .ui-color, .ui-sw) { background: color-mix(in srgb, var(--bg-card) 50%, transparent); border-color: var(--glass-line); }
html[data-shape="glass"] :is(input:not([type="checkbox"]):not([type="radio"]):not([type="color"]):not([type="file"]), select, textarea, .hdr-search, .hf-field, .sd-trigger) {
    background: color-mix(in srgb, var(--input-bg) 62%, transparent) !important;
}
/* buttons: glossy highlight on the solid ones, frosted on the quiet ones */
html[data-shape="glass"] :is(.btn-primary, .head-btn.primary) { box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.35), 0 6px 18px rgba(var(--navy-accent-rgb), 0.32) !important; }
html[data-shape="glass"] :is(.head-btn:not(.primary), .header-tool-btn, .tb-bulk-btn:not(.danger), .tabulator-page:not(.active)) { background: color-mix(in srgb, var(--bg-card) 45%, transparent) !important; }
/* no frosting where it can't render or isn't wanted */
@media (prefers-reduced-transparency: reduce) {
    html[data-shape="glass"] body { --glass-bg: var(--bg-card); --glass-strong: var(--bg-card); --glass-blur: none; }
}
@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
    html[data-shape="glass"] body { --glass-bg: color-mix(in srgb, var(--bg-card) 94%, transparent); --glass-strong: var(--bg-card); }
}
@media (max-width: 768px) { html[data-shape="glass"] body { --glass-blur: blur(16px) saturate(170%); } }
/* print never frosts */
@media print { html[data-shape="glass"] body { background: #fff !important; } }

/* glass on the public pages (sign-in + storefront) — the same frosted surfaces as the panel */
html[data-shape="glass"] :is(.auth-card, .auth-back, .auth-toggle, .site-card, .search-card, .site-faq) {
    background: var(--glass-bg) !important;
    -webkit-backdrop-filter: var(--glass-blur); backdrop-filter: var(--glass-blur);
    border: 1px solid var(--glass-line) !important;
    box-shadow: var(--glass-shadow), var(--glass-hi) !important;
}
html[data-shape="glass"] body.dark-mode.auth-body { --glass-bg: color-mix(in srgb, var(--bg-secondary) 62%, transparent); --glass-strong: color-mix(in srgb, var(--bg-secondary) 94%, transparent); }
html[data-shape="glass"] :is(.site-user-menu, .site-menu) { background: var(--glass-strong) !important; -webkit-backdrop-filter: var(--glass-blur); backdrop-filter: var(--glass-blur); }
html[data-shape="glass"] .site-head { background: color-mix(in srgb, var(--bg-card) 72%, transparent); -webkit-backdrop-filter: var(--glass-blur); backdrop-filter: var(--glass-blur); }

/* ui.php shape tiles — each drawing shows its own corners + surface */
.ui-shape-grid { grid-template-columns: repeat(3, minmax(0, 1fr)) !important; }
.ui-thumb-shape { background: color-mix(in srgb, var(--navy-accent) 5%, var(--bg-card)); border-radius: 3px !important; }
.ui-thumb-shape i { background: color-mix(in srgb, var(--navy-accent) 9%, var(--bg-card)); border-right: 1px solid var(--border-color); }
.ui-thumb-shape b { margin: 4px 6px 0; background: var(--bg-card); border: 1px solid var(--border-color); }
.ui-thumb-shape em { background: var(--bg-card); border: 1px solid var(--border-color); }
.ui-thumb-squared b, .ui-thumb-squared em { border-radius: 2px; }
.ui-thumb-rounded b { border-radius: 5px; } .ui-thumb-rounded em { border-radius: 9px; }
.ui-thumb-glass { background: radial-gradient(circle at 15% 20%, rgba(var(--navy-accent-rgb), .55), transparent 55%), radial-gradient(circle at 90% 90%, rgba(var(--navy-light-rgb), .5), transparent 55%), var(--bg-card); }
.ui-thumb-glass i { background: rgba(255, 255, 255, .35); border-right-color: rgba(255, 255, 255, .5); }
.ui-thumb-glass b, .ui-thumb-glass em { background: rgba(255, 255, 255, .45); border-color: rgba(255, 255, 255, .7); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .8); }
.ui-thumb-glass b { border-radius: 6px; } .ui-thumb-glass em { border-radius: 11px; }
@media (max-width: 600px) { .ui-shape-grid { grid-template-columns: 1fr 1fr !important; } }


/* ===== Mobile bottom nav — floating bar, active item lifted into a bubble inside a notch.
   ring = page colour, so it reads as a bite out of the bar; two shoulders round the bar's edges into the bite ===== */
.mobile-bottom-nav {
    --mbn-h: 64px; --mbn-bub: 52px; --mbn-ring: 6px; --mbn-gap: 10px;
    left: var(--mbn-gap) !important; right: var(--mbn-gap) !important; bottom: calc(var(--mbn-gap) + env(safe-area-inset-bottom, 0px)) !important;
    height: var(--mbn-h) !important; padding: 0 6px !important; align-items: stretch !important;
    background: var(--bg-card) !important; border: 0 !important; border-radius: 18px;
    box-shadow: 0 10px 30px rgba(15, 23, 42, .16), 0 2px 6px rgba(15, 23, 42, .08) !important; overflow: visible !important;
}
.mobile-bottom-nav .mobile-nav-item {
    height: 100%; padding: 0 2px !important; justify-content: center; gap: 4px; border-radius: 0 !important;
    color: var(--text-muted) !important; font-size: 11px; font-weight: 600; background: none !important;
    -webkit-tap-highlight-color: transparent;
}
.mobile-bottom-nav .mobile-nav-item:active { background: none !important; }
.mobile-bottom-nav .mobile-nav-item i { font-size: 20px; }
.mobile-bottom-nav .mobile-nav-item.active { color: var(--text-primary) !important; background: none !important; justify-content: flex-end; padding-bottom: 11px !important; }
.mobile-bottom-nav .mobile-nav-item.active span { font-weight: 800; }
.mobile-bottom-nav .mobile-nav-item.active i {
    position: absolute; z-index: 2; top: calc(var(--mbn-bub) / -2); left: 50%;
    width: var(--mbn-bub); height: var(--mbn-bub); margin-left: calc(var(--mbn-bub) / -2 - var(--mbn-ring));
    display: flex; align-items: center; justify-content: center; box-sizing: content-box;
    border-radius: 50%; border: var(--mbn-ring) solid var(--bg-primary);
    background: color-mix(in srgb, var(--navy-accent) 16%, var(--bg-card)); color: var(--accent-ink) !important; font-size: 22px;   /* opaque: content scrolls behind */
    box-shadow: inset 0 0 0 2px var(--bg-card);
    animation: mbnPop .38s cubic-bezier(.3, 1.6, .5, 1) both;
}
/* shoulders: page-colour corners with a rounded cut, either side of the bite */
.mobile-bottom-nav .mobile-nav-item.active::before,
.mobile-bottom-nav .mobile-nav-item.active::after {
    content: ""; position: absolute; z-index: 1; top: 0; width: 12px; height: 12px; pointer-events: none;
}
.mobile-bottom-nav .mobile-nav-item.active::before {
    left: calc(50% - (var(--mbn-bub) / 2 + var(--mbn-ring)) - 11px);
    background: radial-gradient(circle at 0 100%, transparent 11.5px, var(--bg-primary) 12px);
}
.mobile-bottom-nav .mobile-nav-item.active::after {
    left: calc(50% + (var(--mbn-bub) / 2 + var(--mbn-ring)) - 1px);
    background: radial-gradient(circle at 100% 100%, transparent 11.5px, var(--bg-primary) 12px);
}
.mobile-bottom-nav .mobile-nav-item.active .mobile-nav-pill { top: calc(var(--mbn-bub) / -2 - 2px); z-index: 3; }
@keyframes mbnPop { from { transform: translateY(14px) scale(.6); opacity: 0; } to { transform: none; opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .mobile-bottom-nav .mobile-nav-item.active i { animation: none; } }
html[data-shape="glass"] .mobile-bottom-nav { background: color-mix(in srgb, var(--bg-card) 97%, transparent) !important; }   /* content scrolls under it — keep labels clean */
@media (max-width: 768px) {
    .main-content { padding-bottom: calc(110px + env(safe-area-inset-bottom, 0px)) !important; }
    .hdr-sheet .head-btn.primary { bottom: calc(96px + env(safe-area-inset-bottom, 0px)) !important; }   /* clears the floating bar + bubble */
}

/* ===== Phone filters: search + "Filters" toggle on one row, the rest folds into a panel ===== */
.hf-toggle { display: none; }
@media (max-width: 768px) {
    .hf-bar .hf-strip > .hf-toggle {
        display: inline-flex; align-items: center; justify-content: center; gap: 7px; flex: 0 0 auto; height: 42px; padding: 0 14px;
        border: 1px solid var(--border-color); border-radius: var(--r-ctrl, 4px); background: var(--bg-card); color: var(--text-primary);
        font: inherit; font-size: 14px; font-weight: 600; cursor: pointer;
    }
    .hf-bar .hf-strip > .hf-toggle i { color: var(--accent-ink); }
    .hf-bar .hf-strip > .hf-toggle em { font-style: normal; min-width: 20px; height: 20px; padding: 0 6px; border-radius: 10px; background: var(--navy-accent); color: var(--on-accent);
        font-size: 11.5px; font-weight: 700; display: inline-flex; align-items: center; justify-content: center; }
    .hf-bar .hf-strip > .hf-toggle em[hidden] { display: none; }
    .hf-bar .hf-strip > .hf-toggle.has-on, .hf-bar .hf-strip.hf-open > .hf-toggle { border-color: var(--navy-accent); }
    .hf-bar .hf-strip:has(> .hf-toggle) > :first-child { flex: 1 1 0; min-width: 0; }
    .hf-bar .hf-strip:has(> .hf-toggle) > :first-child > input { height: 40px; }
    .hf-bar .hf-strip:has(> .hf-toggle):not(.hf-open) > :nth-child(n+3) { display: none !important; }
    .hf-bar .hf-strip:has(> .hf-toggle) > :nth-child(n+3) { flex: 1 1 100% !important; }   /* panel rows full width; search + toggle keep row 1 */
    .hf-bar .hf-strip.hf-open > :nth-child(n+3) { animation: hfIn .18s ease-out both; }
    .hf-bar .hf-strip.hf-open > .btn-icon:last-child { flex: 1 1 100% !important; width: auto !important; }
    .hf-bar .hf-strip.hf-open > .btn-icon:last-child::after { content: "Clear filters"; margin-left: 8px; font-size: 14px; font-weight: 600; }
    .hf-bar { padding: 8px; }
}
@keyframes hfIn { from { opacity: 0; transform: translateY(-4px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .hf-bar .hf-strip.hf-open > * { animation: none !important; } }

/* ===== Tabulator on phones — row cards, folded columns as a label/value grid, footer that fits ===== */
@media (max-width: 768px) {
    .tabulator { border-radius: var(--r-panel, 4px); }
    .tabulator .tabulator-header .tabulator-col .tabulator-col-content { padding: 9px 8px; }
    .tabulator-row { border-bottom: 6px solid var(--bg-primary) !important; }
    .tabulator-row:last-child { border-bottom: 0 !important; }
    .tabulator-row .tabulator-cell { padding: 10px 8px; }
    /* folded columns: 2-column grid of small label over value */
    .tabulator-row .tabulator-responsive-collapse { padding: 2px 12px 12px 54px; border: 0; }
    .tabulator-row .tabulator-responsive-collapse table,
    .tabulator-row .tabulator-responsive-collapse tbody { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px 14px; width: 100%; }
    .tabulator-row .tabulator-responsive-collapse tr { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
    .tabulator-row .tabulator-responsive-collapse td { padding: 0 !important; display: block; min-width: 0; overflow-wrap: anywhere; }
    .tabulator-row .tabulator-responsive-collapse td:first-child { font-size: 11px; font-weight: 700; letter-spacing: .4px; text-transform: uppercase; color: var(--text-muted); }
    .tabulator-row .tabulator-responsive-collapse td:first-child strong { font-weight: 700; }
    .tabulator-row .tabulator-responsive-collapse td:last-child { font-size: 13.5px; color: var(--text-primary); }
    /* footer: count on top, then size + pages; first/last dropped */
    .tabulator .tabulator-footer .tabulator-footer-contents { flex-direction: column; align-items: stretch; gap: 8px; }
    .tabulator .tabulator-footer .tabulator-page-counter { text-align: center; }
    .tabulator .tabulator-footer .tabulator-paginator { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 4px; }
    .tabulator .tabulator-footer .tabulator-paginator > label { display: none; }   /* the size select explains itself */
    .tabulator .tabulator-footer .tabulator-page-size { width: 68px; min-height: 36px; margin: 0 6px 0 0; }
    .tabulator .tabulator-footer .tabulator-page[data-page="first"], .tabulator .tabulator-footer .tabulator-page[data-page="last"] { display: none; }
    .tabulator .tabulator-footer .tabulator-page { min-width: 36px; min-height: 36px; margin: 0; }
    .tabulator .tabulator-footer .tabulator-pages { display: inline-flex; gap: 4px; margin: 0 4px; }
}

/* settings: small text link under a field (e.g. Back to English) */
.set-link { display: inline-flex; align-items: center; gap: 6px; margin-top: 8px; padding: 4px 0; border: 0; background: none; color: var(--accent-ink);
    font: inherit; font-size: 13px; font-weight: 600; cursor: pointer; }
.set-link:hover { text-decoration: none; }
@media (max-width: 600px) { .logo-upload-row { flex-direction: column; align-items: stretch; gap: 12px; } .logo-upload-row .logo-preview-img { align-self: flex-start; } }

/* ===== Chat list — All / Unread chips, Recent + People groups, initials avatars, phone rows ===== */
.chat-filters { display: flex; gap: 6px; padding: 8px 8px 0; }
.chat-filters button { display: inline-flex; align-items: center; gap: 6px; padding: 5px 12px; border: 1px solid var(--wa-line); border-radius: var(--r-pill, 999px);
    background: var(--bg-card); color: var(--wa-txt); font: inherit; font-size: 13px; font-weight: 600; cursor: pointer; }
.chat-filters button.on { background: var(--navy-accent); border-color: var(--navy-accent); color: var(--on-accent); }
.chat-filters em { font-style: normal; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px; background: var(--navy-accent); color: var(--on-accent);
    font-size: 11px; display: inline-flex; align-items: center; justify-content: center; }
.chat-filters button.on em { background: #fff; color: var(--accent-ink); }
.chat-filters em[hidden] { display: none; }
.chat-group { display: flex; align-items: center; justify-content: space-between; padding: 10px 10px 4px; font-size: 11.5px; font-weight: 700;
    letter-spacing: .5px; text-transform: uppercase; color: var(--wa-mut); }
.chat-group em { font-style: normal; font-weight: 600; }
.chat-ava { width: 42px; height: 42px; flex: 0 0 42px; border-radius: 50%; overflow: hidden; display: inline-flex; align-items: center; justify-content: center;
    background: rgba(var(--navy-accent-rgb), .14); color: var(--accent-ink); font-size: 13px; font-weight: 700; letter-spacing: .3px; }
.chat-ava img { width: 100%; height: 100%; object-fit: cover; }
@media (max-width: 768px) {
    body.page-chat .chat-wrap { border-radius: var(--r-panel, 4px); }
    .chat-contacts { padding: 4px 0; }
    .chat-contact { border-radius: 0; padding: 11px 14px; border: 0; }
    .chat-contact + .chat-contact { margin-top: 0; }
    .chat-contact + .chat-contact::before { content: ""; position: absolute; top: 0; left: 70px; right: 0; border-top: 1px solid var(--wa-line); }
    .chat-contact .chat-ava { width: 48px; height: 48px; flex-basis: 48px; font-size: 15px; }
    .chat-contact-top strong { font-size: 16px; }
    .chat-group { padding: 12px 14px 4px; }
    .chat-filters { padding: 8px 10px 2px; }
}


/* ===== Sidebar colour — <html data-sb>: navy (default) · theme (palette primary) · light (base look above) =====
   dark panels redefine the text/line tokens INSIDE .sidebar so every child follows */
:root { --sb-navy-top: #071d3c; --sb-navy-bottom: #04152a; --sb-navy-active: #14376a; --sb-navy-card: #0b2447; }
html[data-sb="theme"] {
    --sb-navy-top: var(--navy-primary);
    --sb-navy-bottom: color-mix(in srgb, var(--navy-primary) 72%, #000);
    --sb-navy-active: color-mix(in srgb, var(--navy-accent) 30%, var(--navy-primary));
    --sb-navy-card: color-mix(in srgb, var(--navy-primary) 88%, #fff);
}
html:not([data-sb="light"]) .sidebar {
    --sb-bg: linear-gradient(180deg, var(--sb-navy-top), var(--sb-navy-bottom));
    --sb-hover: rgba(255, 255, 255, 0.07);
    --sb-active: var(--sb-navy-active);
    --sb-rail: rgba(0, 0, 0, 0.2);
    --sb-ring: var(--sb-navy-top);
    --text-primary: #ffffff;
    --text-secondary: rgba(255, 255, 255, 0.86);
    --text-muted: rgba(255, 255, 255, 0.55);
    --border-color: rgba(255, 255, 255, 0.08);
    --input-border: rgba(255, 255, 255, 0.25);
    --bg-card: var(--sb-navy-card);
    --shadow-hover: rgba(0, 0, 0, 0.45);
    color-scheme: dark;
    color: var(--text-secondary);
    background-color: var(--sb-navy-bottom);
}
@media (min-width: 769px) { html:not([data-sb="light"]) .sidebar { border-right-color: var(--sb-navy-bottom); } }
html[data-shape="glass"]:not([data-sb="light"]) .sidebar { --sb-bg: color-mix(in srgb, var(--sb-navy-top) 86%, transparent); border-right-color: rgba(255, 255, 255, 0.08) !important; }
/* quick search sits flat in the panel — the glass / rounded input rules must not frost or round it */
.sidebar #sbQ { background: transparent !important; border: 0 !important; border-radius: 0 !important; box-shadow: none !important; }

/* sidebar picker: header theme menu row + UI Customization thumbs */
.theme-quick-sb { grid-auto-flow: row; grid-template-columns: repeat(3, minmax(0, 1fr)); }
.theme-quick-sb .tq-label { grid-column: 1 / -1; display: flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 600; color: var(--text-muted); }
.ui-thumb-sb { background: var(--bg-primary); }
.ui-thumb-sb b { background: var(--bg-card); border-bottom: 1px solid var(--border-color); }
.ui-thumb-sb em { background: var(--bg-card); border: 1px solid var(--border-color); }
.ui-thumb-sb-navy i { background: linear-gradient(180deg, #071d3c, #04152a); }
.ui-thumb-sb-theme i { background: linear-gradient(180deg, var(--navy-primary), color-mix(in srgb, var(--navy-primary) 72%, #000)); }
.ui-thumb-sb-light i { background: color-mix(in srgb, var(--navy-accent) 7%, var(--bg-card)); border-right: 1px solid var(--border-color); }

/* ===== No accent stripes — cards, banners, list rows keep plain hairlines; unread = palette tint only ===== */
:is(.skeleton-card, .stat-card, .rbac-userbar) { border-left: 1px solid var(--border-color) !important; }
.info-banner { border-left: 1px solid rgba(var(--navy-accent-rgb), 0.2) !important; }
:is(.account-info-card, .log-item, .credentials-box, .maintenance-info, .info-banner-warning, .notification-item.unread) { border-left: 0 !important; }
.ai-conv.active { box-shadow: none; }
.notification-item.unread { background: rgba(var(--navy-accent-rgb), 0.08); }
.notification-item.unread:hover { background: rgba(var(--navy-accent-rgb), 0.13); }
body.dark-mode .notification-item.unread { background: rgba(var(--navy-accent-rgb), 0.12); }
body.dark-mode .notification-item.unread:hover { background: rgba(var(--navy-accent-rgb), 0.18); }

/* =====================================================================
   ELECTRAGO — app kit. tokens only (palette, dark mode, shape all follow)
   ===================================================================== */

/* tabulator loop guards — load-bearing. tall empty states re-measure forever without this,
   and a scrollbar that comes and goes re-wraps chip rows forever */
html { scrollbar-gutter: stable; }
.tabulator .tabulator-placeholder { position: absolute; inset: 0; min-height: 200px; display: flex; align-items: center; justify-content: center; pointer-events: none; }
.tabulator .tabulator-placeholder .tabulator-placeholder-contents { pointer-events: auto; }

/* reads: thin bar pinned to the top, content stays on screen */
.top-loadbar { position: fixed; top: 0; left: 0; right: 0; height: 3px; z-index: 10001; overflow: hidden; pointer-events: none; opacity: 0; transition: opacity .15s; }
.top-loadbar.on { opacity: 1; }
.top-loadbar > span { display: block; height: 100%; width: 38%; background: var(--navy-accent); animation: topLoadSlide 1.05s ease-in-out infinite; }
@keyframes topLoadSlide { 0% { transform: translateX(-105%); } 100% { transform: translateX(320%); } }
@media (prefers-reduced-motion: reduce) { .top-loadbar > span { animation-duration: 2.4s; } }

/* hidden print frame (A4 + thermal) */
.rs-print-frame { position: fixed; right: 0; bottom: 0; width: 0; height: 0; border: 0; }

/* status pills — colour = meaning only */
.st-pill { display: inline-flex; align-items: center; gap: 5px; padding: 2px 9px; border-radius: var(--r-chip); font-size: 11.5px; font-weight: 700; white-space: nowrap; line-height: 1.6; }
.st-pill i { font-size: 10px; }
.st-ok    { background: color-mix(in srgb, var(--success) 15%, transparent); color: var(--ok-ink); }
.st-warn  { background: color-mix(in srgb, var(--warning) 20%, transparent); color: color-mix(in srgb, var(--warning) 50%, #000); }
.st-bad   { background: color-mix(in srgb, var(--danger) 14%, transparent); color: var(--bad-ink); }
.st-info  { background: rgba(var(--navy-accent-rgb), .14); color: var(--accent-ink); }
.st-muted { background: color-mix(in srgb, var(--text-muted) 14%, transparent); color: var(--text-muted); }
body.dark-mode .st-warn { color: var(--warning); }

/* sectioned forms — titled groups in the order a person fills them */
.form-sec { margin: 0 0 16px; padding: 0 0 14px; border-bottom: 1px solid var(--border-color); }
.form-sec:last-of-type { border-bottom: 0; padding-bottom: 0; }
.form-sec-title { display: flex; align-items: center; gap: 8px; margin: 0 0 10px; font-size: 12px; font-weight: 800; letter-spacing: .5px; text-transform: uppercase; color: var(--text-secondary); }
.form-sec-title i { color: var(--accent-ink); }
.form-sec.is-more > summary { cursor: pointer; list-style: none; }
.form-sec.is-more > summary::-webkit-details-marker { display: none; }
.form-sec.is-more > summary::after { content: "\f067"; font-family: "Font Awesome 6 Free"; font-weight: 900; margin-left: auto; font-size: 11px; color: var(--text-muted); }
.form-sec.is-more[open] > summary::after { content: "\f068"; }
.form-hint { display: block; margin-top: 4px; font-size: 12px; color: var(--text-muted); }
.form-err { display: block; margin-top: 4px; font-size: 12px; color: var(--danger); font-weight: 600; }
.form-group input[readonly] { background: color-mix(in srgb, var(--text-muted) 8%, var(--input-bg)); }

/* modal header tools: demo fill + close */
.modal-head-tools { display: flex; align-items: center; gap: 2px; }
.demo-seed-btn { font-size: 17px; opacity: .7; }
.demo-seed-btn:hover, .demo-seed-btn:focus-visible { opacity: 1; color: var(--warning); }

/* welcome tour — plain, no gradients */
.tour-modal { max-width: 430px; }
.tour-body { text-align: center; padding: 28px 26px 16px; }
.tour-ico { width: 64px; height: 64px; margin: 0 auto; border-radius: var(--r-panel); display: flex; align-items: center; justify-content: center;
    font-size: 26px; color: var(--accent-ink); background: rgba(var(--navy-accent-rgb), .12); }
.tour-body h3 { margin: 14px 0 8px; color: var(--text-primary); }
.tour-body p { margin: 0; color: var(--text-secondary); font-size: 14px; line-height: 1.6; }
.tour-dots { display: flex; gap: 6px; justify-content: center; margin-top: 16px; }
.tour-dots button { width: 10px; height: 10px; padding: 0; border: 0; border-radius: 50%; background: var(--border-color); cursor: pointer; transition: width .2s; }
.tour-dots button.on { width: 22px; border-radius: 5px; background: var(--navy-accent); }
.tour-foot { display: flex; justify-content: space-between; gap: 10px; padding: 0 26px 22px; }
.tour-foot .btn { min-height: 44px; }

/* "coming in phase N" */
.soon-card { text-align: center; padding: 48px 20px; }
.soon-ico { width: 64px; height: 64px; margin: 0 auto 14px; border-radius: var(--r-panel); display: flex; align-items: center; justify-content: center;
    font-size: 26px; color: var(--accent-ink); background: rgba(var(--navy-accent-rgb), .12); }
.soon-card h2 { margin: 0 0 8px; font-size: 19px; color: var(--text-primary); }
.soon-card p { margin: 0 auto 18px; max-width: 520px; color: var(--text-secondary); line-height: 1.6; }

/* about: printer check */
.ab-printtest { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-top: 14px; }
.ab-printtest > span { font-weight: 700; color: var(--text-secondary); margin-right: 4px; }

/* table cells shared by the consultancy lists */
.cell-sub { display: block; font-size: 12px; color: var(--text-muted); line-height: 1.35; }
.cell-main { font-weight: 700; color: var(--text-primary); }
.tb-link { background: none; border: 0; padding: 0; font: inherit; font-weight: 700; color: var(--accent-ink); cursor: pointer; text-align: left; }
.tb-link:hover, .tb-link:focus-visible { text-decoration: none; }
.num { font-variant-numeric: tabular-nums; }
.tabulator-row.row-warn { background: color-mix(in srgb, var(--warning) 9%, var(--bg-card)); }
.tabulator-row.row-danger { background: color-mix(in srgb, var(--danger) 8%, var(--bg-card)); }
.tabulator-row.row-void { opacity: .6; }
.tabulator-row.row-void .tabulator-cell { text-decoration: line-through; }
.tabulator-row.row-void .tabulator-cell .act { text-decoration: none; }
@media (max-width: 768px) { .tabulator-row .tabulator-responsive-collapse td { white-space: normal; } }
.soon-card .btn { text-decoration: none; }

/* tier-2 filters: one line on desktop, overflow folds behind "More filters" (page_header.php measures) */
@media (min-width: 769px) {
    .head-filters { flex-wrap: nowrap; }
    .hf-strip { flex: 1 1 auto; min-width: 0; flex-wrap: nowrap; }
    .hf-strip > * { flex-shrink: 0; }
}
.hf-more-wrap { position: relative; }
.hf-more-wrap[hidden] { display: none; }
.hf-more { gap: 7px; white-space: nowrap; }
.hf-more em { min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px; font-style: normal; font-size: 11px; font-weight: 800; line-height: 18px; text-align: center; background: var(--navy-accent); color: var(--on-accent); }
.hf-pop { display: none; position: absolute; top: calc(100% + 6px); right: 0; z-index: 60; min-width: 260px; padding: 10px; flex-direction: column; gap: 8px;
    background: var(--bg-card); border: 1px solid var(--border-color); border-radius: var(--r-panel); box-shadow: 0 10px 28px var(--shadow-color); }
.hf-more-wrap.open .hf-pop { display: flex; }
.hf-pop > .hf-field, .hf-pop > .hf-seg { width: 100%; }
.hf-pop .hf-field > .sd-wrap, .hf-pop .hf-field > input[type="search"], .hf-pop .hf-field > .rs-dtf { flex: 1 1 auto; width: auto; }

/* header buttons that belong to another tab */
.head-btn[hidden] { display: none !important; }
.form-grid .form-full { grid-column: 1 / -1; }
label.toggle-row { display: flex; align-items: center; gap: 10px; min-height: 44px; margin: 0; cursor: pointer; font-weight: 600; color: var(--text-primary); }
.ab-tab em { font-style: normal; font-size: 11.5px; font-weight: 800; padding: 1px 7px; border-radius: var(--r-chip); background: color-mix(in srgb, var(--text-muted) 14%, transparent); }
.ab-tab.on em { background: rgba(var(--navy-accent-rgb), .14); color: var(--accent-ink); }
.ms-modal { max-width: 640px; }

/* dashboard */
.db-info { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 20px; margin-bottom: 20px; }
.db-info .info-box { display: flex; align-items: center; gap: 12px; padding: 14px; background: var(--bg-card); border: 1px solid var(--border-color); min-width: 0; }
.db-info .info-box-icon { width: 44px; height: 44px; flex: 0 0 44px; display: flex; align-items: center; justify-content: center; color: var(--accent-ink); background: var(--bg-tertiary, var(--bg-secondary)); font-size: 18px; border-radius: 4px; }
.db-info .info-box-content { display: flex; flex-direction: column; min-width: 0; }
.db-info .info-box-text { font-size: 12px; text-transform: uppercase; letter-spacing: .03em; color: var(--text-muted); font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.db-info .info-box-number { font-size: 20px; font-weight: 700; color: var(--text-primary); }
.db-info .cell-sub { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
@media (max-width: 1200px) {  .db-info { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 576px) { .db-info { grid-template-columns: 1fr; }   }

/* split modal built by rsSplitModal(): the form holds both panes + the footer, so its submit button stays inside */
form.split-host { flex: 1; min-height: 0; grid-template-rows: minmax(0, 1fr) auto; margin: 0; }
form.split-host > .modal-foot { grid-column: 1 / -1; }
.split-host .split-form > .form-sec:first-child { margin-top: 0; }
.pv-ini { width: 56px; height: 56px; flex: none; display: flex; align-items: center; justify-content: center; border-radius: 50%; font-size: 20px; font-weight: 700;
    color: var(--accent-ink); background: color-mix(in srgb, var(--navy-accent) 12%, var(--bg-card)); }
.pv-badges { display: flex; flex-wrap: wrap; gap: 6px; }
.pv-sec { background: var(--bg-card); border: 1px solid var(--border-color); border-radius: var(--sb-r, 4px); }
.pv-sec h5 { margin: 0; padding: 9px 12px; font-size: 12px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: var(--text-secondary); border-bottom: 1px solid var(--border-light); display: flex; align-items: center; gap: 7px; }
.pv-sec h5 i { color: var(--accent-ink); }
.pv-sec dl { margin: 0; }
.pv-sec dl > div { display: grid; grid-template-columns: minmax(0, 42%) minmax(0, 1fr); gap: 10px; padding: 7px 12px; font-size: 13.5px; border-bottom: 1px solid var(--border-light); }
.pv-sec dl > div:last-child { border-bottom: 0; }
.pv-sec dt { color: var(--text-muted); }
.pv-sec dd { margin: 0; color: var(--text-primary); font-weight: 600; overflow-wrap: anywhere; }
.pv-sec dd.pv-ph { font-weight: 400; }
.pv-money { background: var(--bg-card); border: 1px solid var(--border-color); border-radius: var(--sb-r, 4px); padding: 4px 12px; }
.pv-money div { display: flex; justify-content: space-between; gap: 10px; padding: 6px 0; font-size: 13.5px; color: var(--text-secondary); font-variant-numeric: tabular-nums; }
.pv-money div + div { border-top: 1px solid var(--border-light); }
.pv-money div.is-total { font-weight: 700; color: var(--text-primary); font-size: 15px; }

/* pinned columns: always opaque, so scrolled cells never show through (row tints are solid mixes above) */
.tabulator .tabulator-header .tabulator-col.tabulator-frozen { background: var(--navy-primary); }
.tabulator .tabulator-header .tabulator-col.tabulator-frozen-right { border-left: 1px solid var(--border-color); }
.tabulator-row .tabulator-cell.tabulator-frozen.tabulator-frozen-right { border-left: 1px solid var(--border-color); }
html[data-ui="soft"] .tabulator .tabulator-header .tabulator-col.tabulator-frozen { background: var(--soft-head); }
html[data-shape="glass"] .tabulator-row .tabulator-cell.tabulator-frozen { background: var(--bg-card); }
html[data-shape="glass"] .tabulator-row.tabulator-selectable:hover .tabulator-cell.tabulator-frozen { background: color-mix(in srgb, var(--navy-accent) 5%, var(--bg-card)); }
/* long stage names trim at the end ("BIOMETRICS / INT…"), never clip the start; full name in the tooltip */
.pipeline-stage { min-width: 0; }
.pipeline-stage-name { min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.pipeline-stage-count { flex: none; }

.mini-bar { display: inline-block; vertical-align: middle; width: 64px; height: 6px; border-radius: 3px; background: var(--border-light); overflow: hidden; margin-right: 8px; }
.mini-bar i { display: block; height: 100%; background: var(--navy-accent); }
.mini-bar.is-full i { background: var(--success); }
.mini-bar-n { font-size: 12.5px; font-weight: 700; color: var(--text-secondary); font-variant-numeric: tabular-nums; }
.form-note { display: flex; align-items: center; gap: 8px; margin: 0 0 14px; padding: 10px 12px; border-radius: var(--r-ctrl); font-size: 13px;
    background: rgba(var(--navy-accent-rgb), .08); color: var(--text-secondary); }
.form-note.is-bad { background: color-mix(in srgb, var(--danger) 10%, transparent); }
.form-note.is-warn { background: color-mix(in srgb, var(--warning) 14%, transparent); }

/* about: compliance notes */
.ab-notes { list-style: none; margin: 0; padding: 0; }
.ab-notes li { display: flex; gap: 10px; padding: 10px 2px; border-bottom: 1px solid var(--border-light); color: var(--text-secondary); line-height: 1.55; }
.ab-notes li:last-child { border-bottom: 0; }
.ab-notes li i { color: var(--accent-ink); margin-top: 3px; }

/* ===== Storefront (public site) — same tokens as the app ===== */
.site-body { margin: 0; background: var(--bg-primary); color: var(--text-primary); min-height: 100vh; display: flex; flex-direction: column; }
.site-wrap { width: 100%; max-width: 1200px; margin: 0 auto; padding: 0 16px; }
.site-head { position: sticky; top: 0; z-index: 50; background: var(--bg-card); border-bottom: 1px solid var(--border-color); }
.site-head .site-wrap { display: flex; align-items: center; gap: 18px; min-height: 64px; }
.site-logo { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--text-primary); font-weight: 800; font-size: 18px; letter-spacing: .4px; min-width: 0; }
.site-logo img { width: 34px; height: 34px; border-radius: var(--r-ctrl); object-fit: cover; }
.site-nav { display: flex; align-items: center; gap: 4px; margin-left: auto; }
.site-nav a, .site-nav button { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 12px; border: 0; border-radius: var(--r-ctrl); background: transparent;
    color: var(--text-secondary); font: inherit; font-weight: 600; font-size: 14.5px; text-decoration: none; cursor: pointer; white-space: nowrap; }
.site-nav a:hover, .site-nav button:hover, .site-nav a.on { color: var(--accent-ink); background: rgba(var(--navy-accent-rgb), .08); }
.site-nav .btn { color: #fff; }
.site-city { display: inline-flex; align-items: center; gap: 6px; min-height: 40px; padding: 0 12px; border: 1px solid var(--border-color); border-radius: var(--r-chip);
    background: var(--bg-card); color: var(--text-primary); font: inherit; font-size: 14px; font-weight: 600; cursor: pointer; }
.site-city i { color: var(--accent-ink); }
.site-user { position: relative; }
.site-user-menu { display: none; position: absolute; right: 0; top: calc(100% + 6px); min-width: 210px; padding: 6px; background: var(--bg-card); border: 1px solid var(--border-color);
    border-radius: var(--r-panel); box-shadow: 0 10px 28px var(--shadow-color); z-index: 60; }
.site-user.open .site-user-menu { display: block; }
.site-user-menu a { display: flex; align-items: center; gap: 10px; min-height: 44px; padding: 0 12px; color: var(--text-primary); text-decoration: none; border-radius: var(--r-ctrl); }
.site-user-menu a:hover { background: rgba(var(--navy-accent-rgb), .08); color: var(--accent-ink); }
.site-main { flex: 1; padding: 28px 0 40px; }
.site-foot { background: var(--bg-card); border-top: 1px solid var(--border-color); padding: 32px 0 calc(24px + env(safe-area-inset-bottom)); color: var(--text-secondary); font-size: 14px; }
.site-foot .site-wrap { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 28px; }
.site-foot h4 { margin: 0 0 10px; font-size: 13px; letter-spacing: .5px; text-transform: uppercase; color: var(--text-primary); }
.site-foot a { color: var(--text-secondary); text-decoration: none; display: inline-flex; align-items: center; gap: 8px; min-height: 32px; }
.site-foot a:hover { color: var(--accent-ink); }
.site-foot ul { list-style: none; margin: 0; padding: 0; }
.site-foot .site-copy { grid-column: 1 / -1; border-top: 1px solid var(--border-light); padding-top: 14px; font-size: 13px; color: var(--text-muted); }
.site-card { background: var(--bg-card); border: 1px solid var(--border-color); border-radius: var(--r-panel); padding: 24px; }
.site-page h1 { margin: 0 0 6px; font-size: 26px; color: var(--text-primary); }
.site-page .site-meta { margin: 0 0 18px; font-size: 13px; color: var(--text-muted); }
.site-page .cms-body { line-height: 1.75; color: var(--text-secondary); font-size: 15.5px; }
.site-page .cms-body h2, .site-page .cms-body h3 { color: var(--text-primary); margin: 22px 0 8px; }
.site-page .cms-body table { border-collapse: collapse; width: 100%; margin: 12px 0; font-size: 14px; }
.site-page .cms-body th, .site-page .cms-body td { border: 1px solid var(--border-color); padding: 8px 10px; text-align: left; }
.site-soon { text-align: center; padding: 40px 20px; }
/* customer bottom bar (phones, logged in) reuses the app's notch bar */
.site-mobile-nav { display: none; }
@media (max-width: 768px) {
    .site-nav .site-hide-m { display: none; }
    .site-head .site-wrap { gap: 10px; min-height: 56px; }
    .site-logo span { max-width: 120px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
    .site-foot .site-wrap { grid-template-columns: minmax(0, 1fr); gap: 18px; }
    .site-main { padding: 18px 0 calc(96px + env(safe-area-inset-bottom)); }
    .site-mobile-nav { display: flex; }
    .site-card { padding: 16px; }
}
.site-caret { font-size: 11px; }
.site-addr { margin: 0 0 10px; line-height: 1.6; }
/* storefront phone menu (☰) + dark footer */
.site-nav .site-burger { display: none; align-items: center; justify-content: center; width: 44px; min-height: 44px; padding: 0; border: 0; background: transparent; color: var(--text-primary); font-size: 20px; cursor: pointer; }
.site-menu { display: flex; flex-direction: column; padding: 4px 16px 16px; background: var(--bg-card); border-top: 1px solid var(--border-color); box-shadow: 0 14px 30px var(--shadow-color); }
.site-menu[hidden] { display: none; }
.site-menu a { display: flex; align-items: center; gap: 12px; min-height: 52px; border-bottom: 1px solid var(--border-light); color: var(--text-primary); font-size: 16px; font-weight: 500; text-decoration: none; }
.site-menu a i { width: 20px; color: var(--accent-ink); }
.site-menu a.btn { justify-content: center; margin-top: 14px; border-bottom: 0; color: #fff; }
@media (max-width: 1599px) { .site-nav .site-burger { display: inline-flex; } }
@media (min-width: 1600px) { .site-menu { display: none !important; } }
/* header links that don't fit move into the menu, so Book / language / dark mode never run off a laptop screen */
@media (min-width: 769px) and (max-width: 1599px) { .site-nav .site-l2 { display: none; } }
@media (min-width: 769px) and (max-width: 1359px) { .site-nav .site-l3 { display: none; } }
@media (min-width: 769px) and (max-width: 1099px) { .site-nav .site-links { display: none; } }
.site-foot { background: var(--navy-primary); border-top: 0; color: rgba(255, 255, 255, .7); padding-top: 56px; }
.site-foot h4 { color: #fff; font-size: 14px; font-weight: 600; letter-spacing: .02em; text-transform: none; }
.site-foot a { color: rgba(255, 255, 255, .72); }
.site-foot a:hover { color: var(--accent-ink); }
.site-foot .site-copy { border-top-color: rgba(255, 255, 255, .12); color: rgba(255, 255, 255, .55); }
.pv-msg { padding: 12px; font-size: 14px; line-height: 1.6; color: var(--text-primary); white-space: normal; overflow-wrap: anywhere; }
/* dashboard: flat KPI boxes, hero solid, the rest on the card surface */
.dash-kpis .small-box { background: var(--bg-card); color: var(--text-primary); border: 1px solid var(--border-color); box-shadow: none; text-decoration: none; min-width: 0; }
.dash-kpis .small-box:hover { transform: none; box-shadow: none; border-color: var(--navy-accent); }
.dash-kpis .small-box .icon { color: rgba(var(--navy-accent-rgb), .08); font-size: 54px; }
.dash-kpis .small-box:hover .icon { font-size: 54px; }
.dash-kpis .small-box .inner h3 { font-size: clamp(22px, 3.4vw, 28px); overflow: hidden; text-overflow: ellipsis; color: var(--text-primary); }
.dash-kpis .small-box .inner p { font-weight: 600; color: var(--text-secondary); }
.dash-kpis .small-box-footer { background: var(--bg-secondary); color: var(--text-secondary); border-top: 1px solid var(--border-color); }
.dash-kpis .small-box:hover .small-box-footer { color: var(--accent-ink); background: var(--bg-secondary); }
.dash-kpis .small-box.is-hero { background: var(--navy-primary); border-color: var(--navy-primary); color: #fff; }
.dash-kpis .small-box.is-hero .inner h3 { color: #fff; }
.dash-kpis .small-box.is-hero .inner p, .dash-kpis .small-box.is-hero .dash-sub { color: rgba(255, 255, 255, .82); }
.dash-kpis .small-box.is-hero .icon { color: rgba(255, 255, 255, .08); }
.dash-kpis .small-box.is-hero .small-box-footer { background: rgba(0, 0, 0, .18); color: rgba(255, 255, 255, .9); border-top-color: transparent; }
.dash-kpis .tb-empty { grid-column: 1 / -1; }
.dash-sub { display: block; margin-top: 6px; color: var(--text-muted); font-size: 12px; line-height: 1.4; }
.dash-d { font-weight: 700; } .dash-d.is-up { color: var(--success); } .dash-d.is-down { color: var(--danger); }
.small-box.is-hero .dash-d { color: #fff; }
.dash-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.6fr); gap: 20px; align-items: start; }
.dash-grid > .lte-card { margin-bottom: 0; min-width: 0; }
.dash-grid > .dash-attn { grid-row: span 2; }
.dash-grid > .dash-act { grid-column: 1 / -1; }
.dash-info { grid-column: 1 / -1; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; margin-bottom: 0; }
.dash-info .info-box { min-width: 0; }
.dash-info .info-box-text { white-space: normal; }
.dash-chart { height: 280px; position: relative; }
.dash-attn-list { list-style: none; margin: 0; padding: 0; }
.dash-attn-list a { display: flex; align-items: center; gap: 12px; min-height: 44px; padding: 8px 4px; border-bottom: 1px solid var(--border-light); color: var(--text-primary); text-decoration: none; font-size: 14px; }
.dash-attn-list li:last-child a { border-bottom: 0; }
.dash-attn-list a i { width: 18px; text-align: center; color: var(--accent-ink); }
.dash-attn-list a span { flex: 1; min-width: 0; }
.dash-attn-list a:hover span, .dash-attn-list a:focus-visible span { color: var(--accent-ink); }
.dash-attn-list .nav-pill { position: static; transform: none; }
@media (max-width: 1100px) { .dash-info { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 900px) { .dash-grid { grid-template-columns: minmax(0, 1fr); } .dash-grid > .dash-attn { grid-row: auto; } }
@media (max-width: 576px) {
    .lte-kpi-grid.dash-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
    .dash-kpis .small-box .inner { padding: 12px 12px 8px; }
    .dash-kpis .small-box .inner h3 { font-size: 20px; }
    .dash-kpis .small-box .inner p { font-size: 13px; }
    .dash-kpis .small-box .icon { font-size: 34px; top: 10px; right: 10px; }
    .dash-sub { font-size: 11.5px; }
    .dash-grid { gap: 14px; }
    .dash-info { gap: 10px; }
    .dash-chart { height: 240px; }
}
/* admin dashboard */
.ad-sec { margin-bottom: 24px; }
.ad-head { display: flex; align-items: center; gap: 8px; margin: 0 0 12px; font-size: 15px; font-weight: 700; letter-spacing: .02em; text-transform: uppercase; color: var(--text-secondary); }
.ad-head i { color: var(--accent-ink); }
.ad-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; align-items: start; }
.ad-grid > .lte-card { margin-bottom: 0; min-width: 0; }
.ad-grid > .ad-head { grid-column: 1 / -1; margin: 8px 0 -8px; }
.ad-wide { grid-column: 1 / -1; }
.ad-hint { margin-left: auto; color: var(--text-muted); font-size: 12px; font-weight: 400; text-transform: none; }
.ad-grid .lte-card-header { display: flex; align-items: center; gap: 10px; }
.ad-grid .lte-card-header .btn { margin-left: auto; }
.ad-tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 14px; margin-bottom: 0; }
.ad-tiles .info-box-number small { display: block; }
.ad-tile { min-width: 0; margin-bottom: 0; color: var(--text-primary); text-decoration: none; border: 1px solid var(--border-color); box-shadow: none; }
.ad-tile:hover, .ad-tile:focus-visible { border-color: var(--navy-accent); }
.ad-tiles .info-box-text { white-space: normal; }
.ad-tile .info-box-number small { font-size: 12px; font-weight: 500; color: var(--text-secondary); }
.ad-tile.is-ok .info-box-icon { background: rgba(var(--navy-accent-rgb), .1); color: var(--accent-ink); }
.ad-tile.is-warn .info-box-icon { background: var(--warning); color: #fff; }
.ad-tile.is-bad { border-color: var(--danger); }
.ad-tile.is-bad .info-box-icon { background: var(--danger); color: #fff; }
.ad-tile.is-bad .info-box-number small { color: var(--danger); }
.ad-rank { list-style: none; margin: 0; padding: 0; }
.ad-rank li { display: flex; align-items: center; gap: 12px; min-height: 44px; padding: 8px 0; border-bottom: 1px solid var(--border-light); }
.ad-rank li:last-child { border-bottom: 0; }
.ad-no { flex: none; display: inline-grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; background: rgba(var(--navy-accent-rgb), .1); color: var(--accent-ink); font-size: 13px; }
.ad-rank span { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.ad-rank span b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ad-rank small { color: var(--text-muted); font-size: 12px; }
.ad-rank em { font-style: normal; font-weight: 700; font-size: 18px; text-align: right; display: flex; flex-direction: column; }
.ad-rank em i { color: var(--warning); }
.ad-tg { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px 24px; }
.ad-tg-top { display: flex; justify-content: space-between; gap: 10px; margin-bottom: 6px; font-size: 14px; }
.ad-tg-top small { color: var(--text-muted); }
.ad-bar { height: 10px; border-radius: 9999px; background: var(--bg-secondary); overflow: hidden; }
.ad-bar i { display: block; height: 100%; background: var(--navy-accent); border-radius: inherit; transition: width .4s; }
.ad-bar.is-done i { background: var(--success); }
@media (max-width: 900px) { .ad-grid, .ad-tg { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 576px) {
    .ad-grid { gap: 14px; } .ad-sec { margin-bottom: 16px; } .ad-tg-top { flex-direction: column; gap: 2px; }
    .ad-tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; } .ad-tiles.ad-alerts { grid-template-columns: minmax(0, 1fr); }
    .ad-tiles .info-box { padding: 10px; gap: 10px; } .ad-tiles .info-box-icon { width: 36px; height: 36px; flex-basis: 36px; font-size: 16px; }
    .ad-tiles .info-box-text { letter-spacing: 0; overflow-wrap: anywhere; }
    .ad-hide-m { display: none; }
}
/* admin dashboard: kpi info + report link, money table, chart states */
.ad-box { display: flex; flex-direction: column; }
.ad-box .inner { flex: 1; }
.ad-box a.small-box-footer { text-decoration: none; }
.ad-info { display: inline-grid; place-items: center; width: 28px; height: 28px; margin: -6px 0 -6px 2px; padding: 0; border: 0; border-radius: 50%; background: transparent; color: var(--text-muted); cursor: pointer; position: relative; z-index: 1; }
.ad-info:hover, .ad-info:focus-visible, .ad-info[aria-expanded="true"] { color: var(--accent-ink); background: rgba(var(--navy-accent-rgb), .1); }
.ad-def { display: block; margin-top: 8px; padding: 8px 10px; border-radius: var(--r-ctrl, 6px); background: var(--bg-secondary); color: var(--text-secondary); font-size: 12px; line-height: 1.45; position: relative; z-index: 1; }
.ad-def[hidden] { display: none; }
.ad-fin td.num, .ad-fin th:nth-child(n+3) { text-align: right; white-space: nowrap; }
.ad-fin .ad-note { display: block; margin-top: 2px; color: var(--text-muted); font-size: 12px; font-weight: 400; }
.ad-fin td { vertical-align: top; }
.ad-fin tbody tr:nth-child(6) td { border-top: 2px solid var(--border-color); }
.ad-head-btn { margin-left: auto; text-transform: none; letter-spacing: 0; }
.ad-tile.is-off { opacity: .7; }
.ad-tile.is-off .info-box-icon { background: var(--bg-secondary); color: var(--text-muted); }
.ad-err { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; padding: 16px; border: 1px solid var(--danger); border-radius: var(--r-panel); color: var(--danger); }
.ad-grid .dash-chart[data-state="loading"] canvas, .ad-grid .dash-chart[data-state="empty"] canvas, .ad-grid .dash-chart[data-state="error"] canvas { visibility: hidden; }
.ad-grid .dash-chart[data-state="loading"]::after, .ad-grid .dash-chart[data-state="empty"]::after, .ad-grid .dash-chart[data-state="error"]::after { content: attr(data-msg); position: absolute; inset: 0; display: grid; place-items: center; color: var(--text-muted); font-size: 14px; border-radius: var(--r-ctrl); }
.ad-grid .dash-chart[data-state="loading"]::after { background: linear-gradient(90deg, var(--bg-secondary) 25%, var(--bg-card) 50%, var(--bg-secondary) 75%); background-size: 200% 100%; animation: adShim 1.2s linear infinite; }
.ad-grid .dash-chart[data-state="empty"]::after { background: var(--bg-secondary); }
.ad-grid .dash-chart[data-state="error"]::after { color: var(--danger); background: var(--bg-secondary); }
@keyframes adShim { to { background-position: -200% 0; } }
@media (max-width: 576px) {
    .ad-fin, .ad-fin tbody, .ad-fin tr, .ad-fin td { display: block; width: 100%; }
    .ad-fin thead { display: none; }
    .ad-fin tr { padding: 10px 12px; border-bottom: 1px solid var(--border-color); }
    .ad-fin tbody tr:nth-child(6) td { border-top: 0; } .ad-fin tbody tr:nth-child(6) { border-top: 2px solid var(--border-color); }
    .ad-fin td { padding: 2px 0; border: 0; text-align: left; }
    .ad-fin td[data-l] { display: flex; justify-content: space-between; gap: 12px; }
    .ad-fin td[data-l]::before { content: attr(data-l); color: var(--text-muted); font-size: 13px; }
    .ad-fin td.num { text-align: right; }
}
@media (prefers-reduced-motion: reduce) { .ad-bar i { transition: none; } .ad-grid .dash-chart[data-state="loading"]::after { animation: none; } }
.site-body a.btn, .site-body a.btn:hover { text-decoration: none; }

/* right-side record drawer (quick look) — new, built from tokens */
.rs-drawer-ov { position: fixed; inset: 0; z-index: 1002; background: rgba(0, 0, 0, .28); opacity: 0; pointer-events: none; transition: opacity .25s var(--ease, ease); }
.rs-drawer-ov.open { opacity: 1; pointer-events: auto; }
.rs-drawer { position: fixed; top: 0; right: 0; bottom: 0; z-index: 1003; width: min(560px, 100vw); display: flex; flex-direction: column; background: var(--bg-card);
    border-left: 1px solid var(--border-color); box-shadow: -12px 0 32px var(--shadow-color); transform: translateX(105%); transition: transform .25s var(--ease, ease); }
.rs-drawer.open { transform: none; }
.rs-drawer-head { display: flex; align-items: center; gap: 12px; padding: 14px 16px; border-bottom: 1px solid var(--border-color); }
.rs-drawer-head h3 { margin: 0; font-size: 17px; color: var(--text-primary); min-width: 0; flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rs-drawer-head .cell-sub { display: block; }
.rs-drawer-body { flex: 1; overflow-y: auto; padding: 14px 16px calc(16px + env(safe-area-inset-bottom)); }
.rs-drawer .ab-tabs { margin: 0 -16px 14px; padding: 0 16px; }
.kv { display: grid; grid-template-columns: minmax(0, 40%) minmax(0, 1fr); gap: 2px 12px; margin: 0 0 12px; }
.kv dt { color: var(--text-muted); font-size: 13px; padding: 6px 0; border-bottom: 1px solid var(--border-light); }
.kv dd { margin: 0; padding: 6px 0; font-weight: 600; color: var(--text-primary); border-bottom: 1px solid var(--border-light); overflow-wrap: anywhere; }
.staff-row { display: flex; align-items: center; gap: 10px; min-height: 52px; padding: 6px 0; border-bottom: 1px solid var(--border-light); }
.staff-row > span { flex: 1; min-width: 0; }
@media (prefers-reduced-motion: reduce) { .rs-drawer, .rs-drawer-ov { transition: none; } }
.swal-left { text-align: left; font-size: 13.5px; padding: 2px 0; }
.ms-wrap .sd-label { display: flex; flex-wrap: wrap; gap: 4px; white-space: normal; padding: 6px 0; }
.ms-chip { display: inline-flex; align-items: center; padding: 2px 8px; border-radius: var(--r-chip); background: rgba(var(--navy-accent-rgb), .12); color: var(--accent-ink); font-size: 12.5px; font-weight: 600; }
.ms-item i { width: 16px; color: var(--text-muted); }
.ms-item.on i { color: var(--accent-ink); }
.ms-item.on { background: rgba(var(--navy-accent-rgb), .06); }

/* catalogue */
.tb-thumb { display: block; width: 48px; height: 36px; border-radius: var(--r-ctrl); object-fit: cover; background: var(--bg-secondary); border: 1px solid var(--border-light); }
.model-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 14px; margin-bottom: 14px; }
.model-card { display: flex; flex-direction: column; gap: 6px; padding: 10px; text-align: left; border: 1px solid var(--border-color); border-radius: var(--r-panel); background: var(--bg-card); color: var(--text-primary); font: inherit; cursor: pointer; min-width: 0; }
.model-card img, .model-card .mc-noimg { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: var(--r-ctrl); background: var(--bg-secondary); display: flex; align-items: center; justify-content: center; color: var(--text-muted); font-size: 32px; }
.model-card b { font-size: 15px; }
.model-card small { color: var(--text-muted); font-size: 12.5px; }
.model-card .mc-price { font-weight: 700; color: var(--accent-ink); font-size: 14px; }
.model-card:hover, .model-card:focus-visible { border-color: var(--navy-accent); }
.pv-card-model { cursor: default; }
.chk-editor { display: flex; flex-direction: column; gap: 6px; margin-bottom: 10px; }
.chk-row { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1.2fr) auto auto auto; gap: 6px; align-items: center; }
.chk-row input:not([type=checkbox]) { min-height: 40px; }
.chk-row .toggle-row { min-height: 40px; font-size: 13px; }
.photo-strip { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 8px; }
.photo-strip .ph { position: relative; width: 96px; height: 72px; }
.photo-strip .ph img { width: 100%; height: 100%; object-fit: cover; border-radius: var(--r-ctrl); border: 1px solid var(--border-color); }
.photo-strip .ph .act { position: absolute; top: 2px; background: var(--bg-card); }
.photo-strip .ph .act:first-of-type { left: 2px; }
.photo-strip .ph .act-del { right: 2px; }
@media (max-width: 576px) { .chk-row { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); } .model-grid { grid-template-columns: minmax(0, 1fr); } }

/* pricing */
.rule-strip { display: flex; gap: 4px; align-items: stretch; overflow-x: auto; padding: 4px 0 12px; scrollbar-width: thin; }
.rs-strip-l { flex: none; align-self: center; margin-right: 6px; font-size: 12px; font-weight: 700; color: var(--text-muted); text-transform: uppercase; letter-spacing: .04em; }
.rs-day { flex: none; width: 34px; display: flex; flex-direction: column; align-items: center; padding: 4px 0; border: 1px solid var(--border-light); border-radius: var(--r-ctrl); background: var(--bg-card); font-size: 12px; }
.rs-day small { color: var(--text-muted); font-size: 10.5px; }
.rs-day.up { background: color-mix(in srgb, var(--warning) 16%, var(--bg-card)); border-color: color-mix(in srgb, var(--warning) 40%, transparent); }
.rs-day.down { background: color-mix(in srgb, var(--success) 14%, var(--bg-card)); border-color: color-mix(in srgb, var(--success) 40%, transparent); }
.calc-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 420px); gap: 20px; align-items: start; }
.calc-out { position: sticky; top: 80px; padding: 16px; border: 1px solid var(--border-color); border-radius: var(--r-panel); background: var(--bg-secondary); }
.calc-chips { margin: 4px 0 0; }
.fare-head { margin-bottom: 10px; }
.fare-head b { display: block; font-size: 16px; color: var(--text-primary); }
.fare-notes { list-style: none; margin: 10px 0 0; padding: 0; font-size: 13px; color: var(--text-secondary); }
.fare-notes li { display: flex; gap: 8px; padding: 3px 0; }
.fare-notes i { color: var(--accent-ink); width: 16px; }
.hist-v { padding: 10px 0; border-bottom: 1px solid var(--border-color); }
.hist-h { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; }
@media (max-width: 900px) { .calc-grid { grid-template-columns: minmax(0, 1fr); } .calc-out { position: static; } }

/* admin bits: url prefix input, code textarea, cms preview, notes, muted rows */
.input-prefix { display: flex; align-items: stretch; min-width: 0; }
.input-prefix > span { display: inline-flex; align-items: center; padding: 0 10px; border: 1px solid var(--border-color); border-right: 0; border-radius: var(--r-ctrl) 0 0 var(--r-ctrl); background: var(--bg-secondary); color: var(--text-muted); font-size: 13px; white-space: nowrap; }
.input-prefix > input { flex: 1; min-width: 0; border-radius: 0 var(--r-ctrl) var(--r-ctrl) 0 !important; }
textarea.mono-sm { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 13.5px !important; line-height: 1.55; }
.pv-cms { display: flex; flex-direction: column; gap: 8px; padding: 12px; }
.pv-cms img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; border-radius: var(--r-ctrl); }
.pv-cms p { margin: 0; color: var(--text-secondary); font-size: 13.5px; line-height: 1.55; }
.form-note { display: flex; gap: 10px; align-items: flex-start; padding: 10px 12px; margin-bottom: 14px; border: 1px solid var(--border-color); border-radius: var(--r-ctrl); background: var(--bg-secondary); color: var(--text-secondary); font-size: 13.5px; }
.form-note i { color: var(--accent-ink); margin-top: 2px; }
.tabulator-row.row-muted { opacity: .6; }

/* storefront: hero + search */
.home-hero { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, .9fr); gap: 28px; align-items: center; padding: 12px 0 28px; }
.home-hero h1 { margin: 0 0 10px; font-size: clamp(26px, 4vw, 40px); line-height: 1.15; color: var(--text-primary); }
.home-hero .hh-copy > p { margin: 0 0 18px; max-width: 600px; font-size: 16.5px; color: var(--text-secondary); line-height: 1.6; }
.hh-img img { display: block; width: 100%; height: auto; aspect-ratio: 16 / 11; object-fit: cover; border-radius: var(--r-panel); border: 1px solid var(--border-color); }
.search-card { display: flex; flex-direction: column; gap: 12px; padding: 16px; background: var(--bg-card); border: 1px solid var(--border-color); border-radius: var(--r-panel); box-shadow: 0 2px 10px var(--shadow-color); }
.search-card .form-group { margin: 0; min-width: 0; }
.search-card label { display: flex; align-items: center; gap: 6px; font-size: 12.5px; font-weight: 700; color: var(--text-secondary); margin-bottom: 4px; }
.search-card label i { color: var(--accent-ink); }
.search-card input[type=datetime-local] { width: 100%; min-height: 46px; font-size: 16px; }
.sw-mode { align-self: flex-start; }
.sw-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.search-inline .sw-grid { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) minmax(0, 1fr) auto; align-items: end; }
.search-inline .sw-go { min-height: 46px; }
.sw-chips > span { display: flex; flex-wrap: wrap; gap: 6px; }
.sw-chips button { min-height: 36px; padding: 0 12px; border: 1px solid var(--border-color); border-radius: var(--r-chip); background: var(--bg-card); color: var(--text-secondary); font-weight: 600; font-size: 13px; cursor: pointer; touch-action: manipulation; }
.sw-chips button:hover { border-color: var(--navy-accent); color: var(--accent-ink); }
.sw-chips button.is-on { border-color: var(--navy-accent); background: rgba(var(--navy-accent-rgb), .1); color: var(--accent-ink); }
.sw-go { width: 100%; min-height: 48px; justify-content: center; font-size: 16px; }
.search-inline .sw-go { width: auto; }

/* storefront: sections + model cards */
.home-sec { padding: 18px 0; }
.home-sec-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.home-sec-head h2 { margin: 0; font-size: 22px; color: var(--text-primary); }
.home-sec-head a { color: var(--accent-ink); font-weight: 600; text-decoration: none; white-space: nowrap; }
.cat-tabs { display: flex; gap: 6px; overflow-x: auto; padding-bottom: 4px; margin-bottom: 14px; scrollbar-width: none; }
.cat-tabs::-webkit-scrollbar { display: none; }
.cat-tabs button { flex: none; display: inline-flex; align-items: center; gap: 8px; min-height: 40px; padding: 0 14px; border: 1px solid var(--border-color); border-radius: var(--r-chip); background: var(--bg-card); color: var(--text-secondary); font-weight: 600; font-size: 14px; cursor: pointer; }
.cat-tabs button.on { border-color: var(--navy-accent); background: var(--navy-accent); color: var(--on-accent); }
.sc-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 16px; }
.sc-card { display: flex; flex-direction: column; min-width: 0; background: var(--bg-card); border: 1px solid var(--border-color); border-radius: var(--r-panel); overflow: hidden; }
.sc-card[hidden] { display: none; }
.sc-img { display: flex; align-items: center; justify-content: center; aspect-ratio: 4 / 3; background: var(--bg-secondary); color: var(--text-muted); font-size: 40px; border-bottom: 1px solid var(--border-light); }
.sc-img img { width: 100%; height: 100%; object-fit: cover; }
.sc-body { display: flex; flex-direction: column; gap: 6px; padding: 12px 14px 14px; flex: 1; }
.sc-top { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.sc-cat { font-size: 11.5px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: var(--text-muted); }
.sc-rate { font-size: 13px; font-weight: 700; color: var(--text-primary); }
.sc-rate i { color: var(--warning); }
.sc-new { font-size: 11.5px; font-weight: 700; padding: 2px 8px; border-radius: var(--r-chip); background: rgba(var(--navy-accent-rgb), .1); color: var(--accent-ink); }
.sc-card h3 { margin: 0; font-size: 17px; line-height: 1.3; }
.sc-card h3 a { color: var(--text-primary); text-decoration: none; }
.sc-card h3 a:hover { color: var(--accent-ink); }
.sc-spec { margin: 0; font-size: 13px; color: var(--text-secondary); }
.sc-km { margin: 0; font-size: 12.5px; color: var(--text-muted); line-height: 1.5; }
.sc-km i { color: var(--accent-ink); }
.sc-foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: auto; padding-top: 8px; border-top: 1px solid var(--border-light); }
.sc-price { font-size: 14px; color: var(--text-secondary); line-height: 1.35; min-width: 0; }
.sc-price b { color: var(--text-primary); font-size: 16px; }
.sc-price small { display: block; font-size: 11.5px; color: var(--text-muted); }
.sc-foot .btn { flex: none; min-height: 44px; }

/* storefront: how it works, offers, cities, band, faqs */
.offer-strip { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(260px, 1fr); gap: 14px; overflow-x: auto; padding-bottom: 6px; }
.offer-card { display: flex; flex-direction: column; gap: 6px; padding: 14px; border: 1px solid var(--border-color); border-radius: var(--r-panel); background: var(--bg-card); color: var(--text-primary); text-decoration: none; min-width: 0; }
.offer-card img { width: 100%; aspect-ratio: 16 / 7; object-fit: cover; border-radius: var(--r-ctrl); }
.offer-card span { font-size: 13.5px; color: var(--text-secondary); }
a.offer-card:hover { border-color: var(--navy-accent); }
.city-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 14px; }
.city-card { display: flex; flex-direction: column; gap: 4px; padding: 16px; border: 1px solid var(--border-color); border-radius: var(--r-panel); background: var(--bg-card); color: var(--text-primary); text-decoration: none; min-width: 0; }
.city-card > i { color: var(--accent-ink); font-size: 20px; margin-bottom: 4px; }
.city-card span { font-size: 13.5px; color: var(--text-secondary); line-height: 1.5; }
a.city-card:hover { border-color: var(--navy-accent); }
.faq-list { display: flex; flex-direction: column; gap: 8px; }
.site-faq { border: 1px solid var(--border-color); border-radius: var(--r-ctrl); background: var(--bg-card); }
.site-faq summary { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 48px; padding: 10px 14px; font-weight: 700; color: var(--text-primary); cursor: pointer; list-style: none; }
.site-faq summary::-webkit-details-marker { display: none; }
.site-faq summary::after { content: '+'; font-size: 20px; color: var(--text-muted); transition: transform .2s; }
.site-faq[open] summary::after { transform: rotate(45deg); }
.site-faq > div { padding: 0 14px 14px; color: var(--text-secondary); line-height: 1.65; font-size: 14.5px; }
.site-faq .cms-body p { margin: 0 0 8px; }

/* storefront: search results + filter rail */
.rent-page .search-inline { margin-bottom: 18px; }
.rent-layout { display: grid; grid-template-columns: 250px minmax(0, 1fr); gap: 20px; align-items: start; }
.rent-bar { grid-column: 1 / -1; display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.rent-bar h1 { margin: 0; font-size: 20px; color: var(--text-primary); }
.flt-btn { display: none; }
.flt-btn .nav-pill { position: static; margin-left: 4px; }
.flt-rail { position: sticky; top: 80px; display: flex; flex-direction: column; gap: 12px; padding: 14px; background: var(--bg-card); border: 1px solid var(--border-color); border-radius: var(--r-panel); }
.flt-rail .form-group { margin: 0; }
.flt-head { display: flex; align-items: center; justify-content: space-between; }
.flt-head .close-btn { display: none; }
.flt-pair { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.flt-pair input { min-width: 0; width: 100%; }
.flt-acts { display: flex; gap: 8px; }
.flt-acts .btn { flex: 1; justify-content: center; }
.rent-note { display: flex; gap: 8px; margin: 0 0 12px; padding: 10px 12px; border: 1px solid var(--border-color); border-radius: var(--r-ctrl); background: var(--bg-card); color: var(--text-secondary); font-size: 13.5px; }
.rent-note i { color: var(--accent-ink); margin-top: 2px; }
.rent-results { min-width: 0; }

/* storefront: model page */
.veh-crumb { font-size: 13px; color: var(--text-muted); margin-bottom: 14px; }
.veh-crumb a { color: var(--text-secondary); text-decoration: none; }
.veh-crumb a:hover { color: var(--accent-ink); }
.veh-layout { display: grid; grid-template-columns: minmax(0, 1fr) 380px; gap: 24px; align-items: start; }
.veh-main { min-width: 0; }
.vg-main { display: flex; align-items: center; justify-content: center; aspect-ratio: 4 / 3; max-height: 460px; width: 100%; background: var(--bg-card); border: 1px solid var(--border-color); border-radius: var(--r-panel); overflow: hidden; color: var(--text-muted); font-size: 60px; }
.vg-main img { width: 100%; height: 100%; object-fit: contain; }
.vg-thumbs { display: flex; gap: 8px; margin-top: 8px; overflow-x: auto; }
.vg-thumbs button { flex: none; width: 72px; height: 54px; padding: 0; border: 2px solid transparent; border-radius: var(--r-ctrl); background: var(--bg-card); cursor: pointer; overflow: hidden; }
.vg-thumbs button.on { border-color: var(--navy-accent); }
.vg-thumbs img { width: 100%; height: 100%; object-fit: cover; }
.veh-head { margin: 16px 0 8px; }
.veh-head h1 { margin: 4px 0; font-size: clamp(24px, 3.4vw, 32px); color: var(--text-primary); }
.veh-head p { margin: 0; }
.veh-specs { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin: 14px 0; }
.veh-specs div { padding: 12px; border: 1px solid var(--border-color); border-radius: var(--r-ctrl); background: var(--bg-card); }
.veh-specs dt { font-size: 12px; color: var(--text-muted); font-weight: 600; }
.veh-specs dt i { color: var(--accent-ink); width: 16px; }
.veh-specs dd { margin: 4px 0 0; font-size: 17px; font-weight: 700; color: var(--text-primary); }
.veh-desc { color: var(--text-secondary); line-height: 1.7; }
.veh-feats { list-style: none; padding: 0; margin: 10px 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px 16px; }
.veh-feats li { color: var(--text-secondary); font-size: 14.5px; }
.veh-feats i { color: var(--success); margin-right: 6px; }
.veh-sec { margin-top: 22px; }
.veh-sec h2 { margin: 0 0 10px; font-size: 20px; color: var(--text-primary); }
.pol-table th { width: 34%; text-align: left; vertical-align: top; white-space: normal; }
.pol-table td { white-space: normal; line-height: 1.55; }
/* dark storefront: primary turns light, keep label cells dark with light text */
body.dark-mode.site-body .about-roles-table th { background: var(--lv-white); color: var(--lv-char); border-color: var(--lv-line); }
.veh-side { position: sticky; top: 80px; min-width: 0; }
.fare-card { display: flex; flex-direction: column; gap: 12px; padding: 16px; background: var(--bg-card); border: 1px solid var(--border-color); border-radius: var(--r-panel); box-shadow: 0 2px 10px var(--shadow-color); }
.fare-card h2 { margin: 0; font-size: 18px; color: var(--text-primary); }
.fare-card .form-group { margin: 0; min-width: 0; }
.fare-card label { font-size: 12.5px; font-weight: 700; color: var(--text-secondary); }
.fare-card label i { color: var(--accent-ink); }
.fare-card .form-grid { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 10px; }
.fare-card input[type=datetime-local] { width: 100%; min-height: 46px; font-size: 16px; }
.fare-addons { margin: 0; padding: 0; border: 0; display: flex; flex-direction: column; }
.fare-addons legend { font-size: 12.5px; font-weight: 700; color: var(--text-secondary); margin-bottom: 2px; }
.fare-card .toggle-row span { display: flex; flex-direction: column; font-size: 14px; }
.fare-card .toggle-row small { font-weight: 500; color: var(--text-muted); font-size: 12px; }
.fare-out.is-busy { opacity: .55; }
.fare-km { margin: 8px 0 0; font-size: 13px; color: var(--text-secondary); }
.fare-km i { color: var(--accent-ink); }
.fare-book { width: 100%; min-height: 48px; justify-content: center; font-size: 16px; }
.fare-soon { margin: 0; padding: 10px 12px; border-radius: var(--r-ctrl); background: var(--bg-secondary); color: var(--text-secondary); font-size: 13.5px; }
.fare-bar { display: none; }

/* storefront home: warm cream look — hero + booking card, showcase slides, figures, collection, why, ways to ride, steps, offers, cities, reviews, partner, faq
   Cream #f7f4ed · charcoal #1c1c1c · off-white #fcfbf8 · muted #5f5f5d · lines #eceae4. Greys = charcoal at an opacity.
   Figtree 400 + 600 only. Borders hold things together; the one shadow is the inset on dark buttons.
   Radii: 6 buttons + fields · 12 cards · 16 containers · full pill for icon buttons + filters. Dark mode = neutral black, same rules. */
body.site-body, body.lv-auth {
    --lv-cream: var(--lvx-bg, #ffffff); --lv-char: var(--lvx-ink, #111827); --lv-white: #ffffff; --lv-muted: var(--lvx-muted, #5b6472); --lv-line: var(--lvx-line, #e6e8ec);
    --lv-c83: rgba(var(--lvx-ink-rgb, 17, 24, 39), .83); --lv-c40: rgba(var(--lvx-ink-rgb, 17, 24, 39), .4); --lv-c04: rgba(var(--lvx-ink-rgb, 17, 24, 39), .04); --lv-c03: rgba(var(--lvx-ink-rgb, 17, 24, 39), .03);
    /* --lvx-* = the admin's website colours (Marketing › Home page) on <body style>; buttons follow them in dark mode too */
    --lv-btn: var(--lvx-btn, #16a34a); --lv-btn-ink: var(--lvx-btn-ink, #ffffff);
    /* green look: forest = dark bands + footer, mint = soft tint, acc = accent on dark, gt = accent as text on light */
    --lv-forest: var(--lvx-band, #0b3b2c); --lv-mint: color-mix(in srgb, var(--lv-btn) 9%, var(--lv-cream)); --lv-acc: color-mix(in srgb, var(--lv-btn) 72%, #ffffff); --lv-gt: color-mix(in srgb, var(--lv-btn) 82%, #000000);
    --lv-ring: color-mix(in srgb, var(--lv-btn) 40%, transparent);
    --lv-focus: rgba(0, 0, 0, .1) 0 4px 12px;
    --lv-inset: rgba(255, 255, 255, .2) 0 .5px 0 0 inset, rgba(0, 0, 0, .2) 0 0 0 .5px inset, rgba(0, 0, 0, .05) 0 1px 2px 0;
    --lv-wash-a: color-mix(in srgb, var(--lv-btn) 14%, transparent); --lv-wash-b: color-mix(in srgb, var(--lv-btn) 9%, transparent); --lv-wash-c: color-mix(in srgb, var(--lvx-band, #0b3b2c) 10%, transparent);
    --lv-font: 'Figtree', ui-sans-serif, system-ui, sans-serif;
    /* shared widgets on this page (dropdown, overlay, menus) follow these */
    --navy-primary: var(--lv-char); --navy-dark: var(--lv-char); --navy-light: var(--lv-muted); --navy-accent: var(--lv-char); --navy-hover: var(--lv-char);
    --navy-primary-rgb: var(--lvx-ink-rgb, 17, 24, 39); --navy-light-rgb: 91, 100, 114; --navy-accent-rgb: var(--lvx-ink-rgb, 17, 24, 39);
    --bg-primary: var(--lv-cream); --bg-secondary: var(--lv-cream); --bg-card: var(--lv-cream);
    --text-primary: var(--lv-char); --text-secondary: var(--lv-c83); --text-muted: var(--lv-muted);
    --border-color: var(--lv-line); --border-light: var(--lv-line); --input-bg: var(--lv-cream); --input-border: var(--lv-line);
    --glass-strong: var(--lv-cream);
    --r-ctrl: 6px; --r-panel: 16px; --r-chip: 9999px; --soft-r: 6px; --sb-r: 6px; --wa-r: 6px;
    background: var(--lv-cream); color: var(--lv-char); font-family: var(--lv-font); -webkit-font-smoothing: antialiased; overflow-x: hidden;
}
body.dark-mode.site-body, body.dark-mode.lv-auth {
    --lv-cream: #0a0a0a; --lv-char: #f3f4f6; --lv-white: #141414; --lv-muted: #a1a1aa; --lv-line: rgba(255, 255, 255, .1);
    --lv-forest: color-mix(in srgb, var(--lvx-band, #0b3b2c) 65%, #000000); --lv-mint: color-mix(in srgb, var(--lv-btn) 14%, #0a0a0a); --lv-gt: var(--lv-acc);
    --lv-c83: rgba(242, 240, 234, .83); --lv-c40: rgba(242, 240, 234, .4); --lv-c04: rgba(255, 255, 255, .05); --lv-c03: rgba(255, 255, 255, .03);
    --lv-focus: rgba(0, 0, 0, .5) 0 4px 12px;
    --lv-inset: rgba(255, 255, 255, .25) 0 .5px 0 0 inset, rgba(0, 0, 0, .3) 0 0 0 .5px inset;
    --lv-wash-a: color-mix(in srgb, var(--lv-btn) 8%, transparent); --lv-wash-b: color-mix(in srgb, var(--lv-btn) 5%, transparent); --lv-wash-c: color-mix(in srgb, var(--lv-btn) 6%, transparent);
    --navy-primary-rgb: 242, 240, 234; --navy-light-rgb: 163, 162, 157; --navy-accent-rgb: 242, 240, 234;
    --bg-card: #141414; --input-bg: #141414; --glass-strong: #141414;
}
html:has(> body.site-home) { scroll-behavior: smooth; scroll-padding-top: 76px; }
.site-body input, .site-body select, .site-body button, .site-body textarea { font-family: inherit; }
.site-home .site-main { padding: 0; }
.site-body :is(a, button):focus-visible { outline: none; box-shadow: 0 0 0 2px var(--lv-ring); }
.site-body :is(h1, h2, h3) { font-weight: 600; color: var(--lv-char); }

/* header: cream bar, hairline once the page scrolls */
body.site-body .site-head { background: var(--lv-cream); border-bottom: 1px solid var(--lv-line); -webkit-backdrop-filter: none; backdrop-filter: none; transition: border-color .2s; }
body.site-home:not(.head-solid):not(.menu-open) .site-head { border-bottom-color: transparent; }
.site-body .site-head .site-wrap { min-height: 68px; }
.site-body .site-logo { font-weight: 600; font-size: 18px; letter-spacing: -.02em; color: var(--lv-char); }
.site-body .site-logo img { border-radius: 8px; }
.site-body .site-nav a, .site-body .site-nav button { font-size: 15px; font-weight: 400; color: var(--lv-char); border-radius: 6px; }
.site-body .site-nav > a i { font-size: 12px; color: var(--lv-muted); }
.site-body .site-nav a:hover, .site-body .site-nav button:hover, .site-body .site-nav a.on { color: var(--lv-char); background: var(--lv-c04); }
.site-body .site-nav > .btn-primary { min-height: 40px; padding: 8px 16px; background: var(--lv-btn); border: 0; color: var(--lv-btn-ink); box-shadow: var(--lv-inset); }
.site-body .site-nav > .btn-primary i { color: inherit; }
.site-body .site-nav > .btn-primary:hover { background: var(--lv-btn); color: var(--lv-btn-ink); opacity: .9; transform: none; }
.site-body .site-city { border: 1px solid var(--lv-line); border-radius: 9999px; background: transparent; color: var(--lv-char); }
.site-body .site-logo { flex: none; }
.site-body .site-logo span { white-space: nowrap; }
@media (min-width: 769px) and (max-width: 1100px) { .site-body .site-city { flex: none; width: 40px; min-width: 40px; padding: 0; justify-content: center; } .site-body .site-city span { display: none; } .site-body .site-nav > a:not(.btn) { padding: 0 10px; } .site-body .site-nav > a:not(.btn) i { display: none; } } /* tablets: pin only, text-only links — the nav needs the room */
.site-body .site-city i { color: var(--lv-muted); }
.site-body .site-user-menu, .site-body .site-menu { background: var(--bg-card); border-color: var(--lv-line); border-radius: 12px; box-shadow: var(--lv-focus); }
.site-body .site-menu { border-radius: 0 0 16px 16px; }
.site-body .site-menu a { font-weight: 400; border-bottom-color: var(--lv-line); color: var(--lv-char); }
.site-body .site-menu a i, .site-body .site-user-menu a i { color: var(--lv-muted); }
.site-body .site-menu a.btn { border-radius: 6px; background: var(--lv-btn); color: var(--lv-btn-ink); box-shadow: var(--lv-inset); }
.site-body .site-user-menu a:hover { background: var(--lv-c04); color: var(--lv-char); }

/* buttons: dark with the inset shadow, ghost with the interactive border, light for dark cards; active = .8 */
.lv-btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 8px 18px; border: 1px solid transparent; border-radius: 6px;
          font: 400 16px/1.5 var(--lv-font); text-decoration: none; white-space: nowrap; cursor: pointer; touch-action: manipulation; transition: opacity .15s, background-color .15s; }
.lv-btn i { font-size: 13px; transition: transform .2s; }
.lv-btn:hover i.fa-arrow-right { transform: translateX(3px); }
.lv-btn:active { opacity: .8; }
.lv-btn-dark { background: var(--lv-btn); color: var(--lv-btn-ink); box-shadow: var(--lv-inset); }
.lv-btn-dark:hover { opacity: .9; }
.lv-btn-ghost { background: transparent; border-color: var(--lv-c40); color: var(--lv-char); }
.lv-btn-ghost:hover { background: var(--lv-c04); }
.lv-btn-light { background: var(--lv-white); color: var(--lv-char); }
.lv-btn-light:hover { opacity: .9; }
.lv-btn-lg { min-height: 52px; padding: 12px 24px; }
.lv-pill { display: inline-grid; place-items: center; width: 44px; height: 44px; padding: 0; border: 0; border-radius: 9999px; background: var(--lv-cream); color: var(--lv-char);
           box-shadow: var(--lv-inset); font-size: 14px; cursor: pointer; touch-action: manipulation; }
.lv-pill:hover { background: var(--lv-c04); }
.lv-pill:active { opacity: .8; }

/* hero: centred editorial head on a faint warm wash, booking card as the centrepiece */
.lv-hero { position: relative; padding: 96px 0 0; isolation: isolate; }
.lv-hero::before { content: ''; position: absolute; inset: 0 0 auto; height: 760px; z-index: -1; pointer-events: none;
                   background: radial-gradient(40% 50% at 22% 30%, var(--lv-wash-a), transparent 70%), radial-gradient(36% 46% at 78% 26%, var(--lv-wash-c), transparent 70%), radial-gradient(44% 40% at 50% 70%, var(--lv-wash-b), transparent 70%); }
.lv-hero-in { display: flex; flex-direction: column; align-items: center; text-align: center; }
.site-home .lv-eyebrow { display: inline-flex; margin: 0 0 22px; padding: 6px 14px; border: 1px solid var(--lv-line); border-radius: 9999px; font-size: 14px; color: var(--lv-muted); background: var(--lv-c03); }
.lv-hero h1 { margin: 0; max-width: 820px; font-size: clamp(40px, 6vw, 64px); line-height: 1.04; letter-spacing: -1.6px; }
:is(.site-home, .site-rent, .site-partner) .lv-lead { margin: 16px 0 0; max-width: 620px; font-size: 18px; line-height: 1.45; color: var(--lv-muted); }
.lv-hero-in > .lv-lead { margin-top: 20px; }

.site-home .lv-book { width: 100%; max-width: 920px; margin-top: 40px; gap: 16px; padding: 20px; text-align: left; background: var(--bg-card); border: 1px solid var(--lv-line); border-radius: 16px; box-shadow: var(--lv-focus); }
.lv-book-top { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; }
.lv-seg { display: inline-flex; gap: 2px; padding: 3px; border: 1px solid var(--lv-line); border-radius: 9999px; background: var(--lv-c03); }
.lv-seg button { display: inline-flex; align-items: center; gap: 8px; min-height: 38px; padding: 0 16px; border: 0; border-radius: 9999px; background: transparent; color: var(--lv-muted); font-size: 15px; cursor: pointer; }
.lv-seg button i { font-size: 12px; }
.lv-seg button.is-on { background: var(--lv-btn); color: var(--lv-btn-ink); box-shadow: var(--lv-inset); }
@media (max-width: 480px) { .lv-seg { max-width: 100%; } .lv-seg button, .lv-seg a { padding: 0 11px; font-size: 14px; white-space: nowrap; } } /* Daily · Monthly · Book a cab fit one row at 390px */
.site-home .lv-chips button { min-height: 36px; padding: 0 14px; border: 1px solid var(--lv-line); border-radius: 9999px; background: transparent; color: var(--lv-c83); font-size: 14px; font-weight: 400; }
.site-home .lv-chips button:hover { border-color: var(--lv-c40); color: var(--lv-char); }
.site-home .lv-chips button.is-on { border-color: var(--lv-char); background: var(--lv-c04); color: var(--lv-char); }
.lv-book-grid { display: grid; grid-template-columns: 1.2fr 1fr 1fr auto; gap: 12px; align-items: end; }
.site-home .lv-book label { font-size: 13px; font-weight: 400; color: var(--lv-muted); }
.site-home .lv-book label i { color: var(--lv-muted); }
.site-home .lv-book :is(input, .sd-trigger) { min-height: 48px; border: 1px solid var(--lv-line); border-radius: 6px !important; background: var(--lv-cream); color: var(--lv-char); box-shadow: none; }
.site-home .lv-book :is(input:focus, .sd-wrap.open .sd-trigger, .sd-trigger:focus-visible) { border-color: var(--lv-c40); box-shadow: 0 0 0 2px var(--lv-ring); outline: none; }
.lv-book .sw-go { min-height: 48px; }

/* showcase: hero slides inside a bordered frame, caption card bottom-left */
.lv-show { margin-top: 56px; }
.lv-show-frame { position: relative; aspect-ratio: 16 / 8; overflow: hidden; border: 1px solid var(--lv-line); border-radius: 16px; background: var(--lv-c04); }
.lv-show .hx-slide { position: absolute; inset: 0; opacity: 0; visibility: hidden; transition: opacity .9s ease, visibility .9s; }
.lv-show .hx-slide.is-on { opacity: 1; visibility: visible; }
.lv-show picture, .lv-show .hx-slide img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.lv-cap { position: absolute; left: 20px; bottom: 20px; display: grid; grid-template-columns: minmax(0, 1fr) auto; column-gap: 18px; align-items: center; max-width: min(460px, calc(100% - 40px));
          padding: 16px 18px; border: 1px solid var(--lv-line); border-radius: 12px; background: var(--lv-cream); color: var(--lv-char); text-decoration: none; box-shadow: var(--lv-focus); }
.lv-cap small { grid-column: 1; font-size: 13px; color: var(--lv-muted); }
.lv-cap strong { grid-column: 1; font-size: 18px; font-weight: 600; line-height: 1.25; letter-spacing: -.2px; }
.lv-cap em { grid-column: 1; margin-top: 4px; font-style: normal; font-size: 14px; color: var(--lv-muted); }
.lv-cap em b { font-weight: 600; color: var(--lv-char); }
.lv-cap > i { grid-column: 2; grid-row: 1 / span 3; display: grid; place-items: center; width: 40px; height: 40px; border-radius: 9999px; background: var(--lv-btn); color: var(--lv-btn-ink); font-size: 13px; transition: transform .2s; }
.lv-cap:hover > i { transform: translateX(3px); }
.lv-show-ctrl { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 14px; }
.lv-show .hx-dots { display: flex; align-items: center; }
.lv-show .hx-dots button { display: inline-flex; align-items: center; justify-content: center; width: 28px; height: 44px; padding: 0; border: 0; background: none; cursor: pointer; }
.lv-show .hx-dots button::before { content: ''; width: 8px; height: 8px; border-radius: 9999px; background: var(--lv-c40); transition: width .3s; }
.lv-show .hx-dots button[aria-current]::before { width: 22px; background: var(--lv-btn); }
.lv-show-btns { display: flex; gap: 8px; }

/* figures */
.lv-stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 32px; margin: 56px 0 0; padding: 40px 0 0; border-top: 1px solid var(--lv-line); }
.lv-stats div { display: flex; flex-direction: column-reverse; justify-content: flex-end; min-width: 0; }
.lv-stats dd { margin: 0; font-size: clamp(32px, 4vw, 48px); font-weight: 600; line-height: 1.05; letter-spacing: -1.2px; color: var(--lv-char); }
.lv-stats dt { margin-top: 8px; font-size: 16px; color: var(--lv-muted); }

/* sections */
.lv-sec { padding: 128px 0 0; }
.lv-sec:last-of-type { padding-bottom: 128px; }
.lv-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; margin-bottom: 40px; }
.lv-sec h2 { margin: 0; max-width: 760px; font-size: clamp(32px, 4.2vw, 48px); line-height: 1.05; letter-spacing: -1.2px; }
.site-home .lv-car-cat { margin: 0; font-size: 13px; letter-spacing: .02em; color: var(--lv-muted); }
.lv-box { padding: 40px; border: 1px solid var(--lv-line); border-radius: 16px; }
.lv-empty h3 { margin: 0 0 6px; font-size: 20px; }
.lv-empty p { margin: 0; color: var(--lv-muted); }

/* collection */
.site-home .lv-tabs { gap: 8px; margin-bottom: 28px; }
.site-home .lv-tabs button { min-height: 40px; padding: 0 16px; border: 1px solid var(--lv-line); border-radius: 9999px; background: transparent; color: var(--lv-c83); font-size: 15px; font-weight: 400; }
.site-home .lv-tabs button i { font-size: 12px; color: var(--lv-muted); }
.site-home .lv-tabs button:hover { border-color: var(--lv-c40); }
.site-home .lv-tabs button.on { border-color: var(--lv-btn); background: var(--lv-btn); color: var(--lv-btn-ink); box-shadow: var(--lv-inset); }
.site-home .lv-tabs button.on i { color: inherit; }
.lv-cars { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; }
.lv-car { display: flex; flex-direction: column; min-width: 0; overflow: hidden; border: 1px solid var(--lv-line); border-radius: 12px; background: var(--lv-cream); transition: border-color .2s; }
.lv-car:hover { border-color: var(--lv-c40); }
.lv-car[hidden] { display: none; }
.lv-car-img { display: grid; place-items: center; aspect-ratio: 4 / 3; background: var(--lv-c04); color: var(--lv-c40); font-size: 48px; overflow: hidden; }
.lv-car-img img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s ease; }
.lv-car:hover .lv-car-img img { transform: scale(1.03); }
.lv-car-body { display: flex; flex-direction: column; gap: 8px; flex: 1; padding: 20px; }
.lv-car h3 { margin: 0; font-size: 22px; font-weight: 400; line-height: 1.25; letter-spacing: -.3px; }
.lv-car h3 a { color: var(--lv-char); text-decoration: none; }
.lv-car h3 b { font-weight: 600; }
.lv-car h3 em { font-style: normal; color: var(--lv-muted); }
.site-home .lv-car-tag { margin: 0; font-size: 15px; line-height: 1.5; color: var(--lv-muted); }
.lv-car-spec { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin: 8px 0 0; padding: 14px 0; border-top: 1px solid var(--lv-line); border-bottom: 1px solid var(--lv-line); }
.lv-car-spec dt { font-size: 12px; color: var(--lv-muted); }
.lv-car-spec dd { margin: 2px 0 0; font-size: 15px; font-weight: 600; color: var(--lv-char); }
.lv-car-foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: auto; padding-top: 12px; }
.site-home .lv-car-price { margin: 0; min-width: 0; color: var(--lv-muted); }
.lv-car-price small { font-size: 13px; }
.lv-car-price strong { font-size: 24px; font-weight: 600; letter-spacing: -.5px; color: var(--lv-char); }

/* why choose us */
.lv-why { list-style: none; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; margin: 0; padding: 0; }
.lv-why li { display: flex; flex-direction: column; gap: 8px; min-width: 0; padding: 28px; border: 1px solid var(--lv-line); border-radius: 12px; }
.lv-why i { margin-bottom: 14px; font-size: 22px; color: var(--lv-char); }
.lv-why b { font-size: 20px; font-weight: 600; letter-spacing: -.2px; color: var(--lv-char); }
:is(.site-home, .site-partner) .lv-why span { font-size: 16px; line-height: 1.5; color: var(--lv-muted); }

/* ways to ride */
.lv-ways { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 360px), 1fr)); gap: 24px; }
.lv-way { display: flex; flex-direction: column; align-items: flex-start; gap: 10px; padding: 36px; border: 1px solid var(--lv-line); border-radius: 16px; }
.lv-way h3 { margin: 0; font-size: 30px; line-height: 1.1; letter-spacing: -.9px; }
.site-home .lv-way p { margin: 0; font-size: 16px; line-height: 1.5; color: var(--lv-muted); }
.site-home .lv-way .lv-way-price { margin: 6px 0 4px; color: var(--lv-muted); }
.lv-way-price strong { font-size: 40px; font-weight: 600; letter-spacing: -1.2px; color: var(--lv-char); }
.lv-way-price small { margin-left: 4px; font-size: 15px; }
.lv-way .lv-btn { margin-top: auto; }
.lv-way > .lv-btn { margin-top: 18px; }
.lv-way.is-dark { background: var(--lv-char); border-color: var(--lv-char); }
.site-home .lv-way.is-dark :is(h3, p, .lv-car-cat, small, strong) { color: var(--lv-white); }
.site-home .lv-way.is-dark :is(p, .lv-car-cat, small) { opacity: .72; }
body.dark-mode.site-home .lv-way.is-dark { background: var(--bg-card); border-color: var(--lv-c40); }
body.dark-mode.site-home .lv-way.is-dark :is(h3, p, .lv-car-cat, small, strong) { color: var(--lv-char); }

/* steps + photos */
.lv-steps { list-style: none; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); margin: 0; padding: 0; border: 1px solid var(--lv-line); border-radius: 16px; counter-reset: st; }
.lv-steps li { display: flex; flex-direction: column; gap: 8px; min-width: 0; padding: 28px; counter-increment: st; }
.lv-steps li + li { border-left: 1px solid var(--lv-line); }
.lv-steps li::before { content: counter(st, decimal-leading-zero); margin-bottom: 16px; font-size: 14px; color: var(--lv-muted); }
.lv-steps b { font-size: 20px; font-weight: 600; color: var(--lv-char); }
:is(.site-home, .site-rent, .site-partner) .lv-steps span { font-size: 15px; line-height: 1.55; color: var(--lv-muted); }
.lv-pics { display: grid; grid-template-columns: 1.3fr 1fr; gap: 24px; margin-top: 24px; }
.lv-pics.is-one { grid-template-columns: minmax(0, 1fr); }
.lv-pics figure { margin: 0; min-width: 0; overflow: hidden; border: 1px solid var(--lv-line); border-radius: 12px; }
.lv-pics img { display: block; width: 100%; aspect-ratio: 16 / 9; object-fit: cover; }
.lv-pics figcaption { display: flex; flex-direction: column; gap: 4px; padding: 18px 20px; }
.lv-pics figcaption b { font-size: 18px; font-weight: 600; color: var(--lv-char); }
.site-home .lv-pics figcaption span { font-size: 15px; color: var(--lv-muted); }

/* offers + cities */
.lv-offers { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr)); gap: 24px; }
.lv-offer { display: flex; flex-direction: column; gap: 6px; overflow: hidden; padding-bottom: 20px; border: 1px solid var(--lv-line); border-radius: 12px; color: var(--lv-char); text-decoration: none; transition: border-color .2s; }
a.lv-offer:hover { border-color: var(--lv-c40); }
.lv-offer img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; margin-bottom: 10px; }
.lv-offer b { padding: 0 20px; font-size: 18px; font-weight: 600; }
.lv-offer:not(:has(img)) b { padding-top: 20px; }
.site-home .lv-offer span { padding: 0 20px; font-size: 15px; color: var(--lv-muted); }
.lv-cities { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 340px), 1fr)); gap: 16px; }
.lv-city { display: grid; grid-template-columns: minmax(0, 1fr) auto; column-gap: 16px; align-items: center; min-height: 96px; padding: 20px 24px; border: 1px solid var(--lv-line); border-radius: 12px;
           color: var(--lv-char); text-decoration: none; transition: border-color .2s, background-color .2s; }
.lv-city:hover { border-color: var(--lv-c40); background: var(--lv-c03); }
.lv-city b { font-size: 22px; font-weight: 600; letter-spacing: -.4px; }
.site-home .lv-city span { grid-column: 1; font-size: 14px; color: var(--lv-muted); }
.lv-city i { grid-column: 2; grid-row: 1 / span 2; color: var(--lv-muted); transition: transform .2s; }
.lv-city:hover i { transform: translateX(3px); color: var(--lv-char); }

/* reviews */
.lv-revs { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; }
.lv-rev { display: flex; flex-direction: column; gap: 16px; margin: 0; padding: 28px; border: 1px solid var(--lv-line); border-radius: 12px; }
.lv-stars { display: flex; gap: 3px; font-size: 13px; color: var(--lv-char); }
.lv-rev blockquote { margin: 0; font-size: 20px; line-height: 1.4; letter-spacing: -.2px; color: var(--lv-char); }
.lv-rev figcaption { margin-top: auto; font-size: 14px; color: var(--lv-muted); }
.lv-rev figcaption b { font-weight: 600; color: var(--lv-char); }

/* partner */
.lv-partner { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); align-items: center; gap: 48px; padding: 48px; }
.lv-partner > div { display: flex; flex-direction: column; align-items: flex-start; gap: 14px; }
.lv-partner .lv-lead { margin: 0 0 10px; }
.lv-partner img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border: 1px solid var(--lv-line); border-radius: 12px; }

/* faq */
.lv-faq { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr); gap: 56px; align-items: start; }
.site-body .lv-faq .faq-list { gap: 0; border-top: 1px solid var(--lv-line); }
.site-body .lv-faq .site-faq { border: 0; border-bottom: 1px solid var(--lv-line); border-radius: 0; background: transparent; }
.site-body .lv-faq .site-faq summary { min-height: 64px; padding: 14px 0; font-size: 18px; font-weight: 400; color: var(--lv-char); }
.site-body .lv-faq .site-faq summary::after { color: var(--lv-muted); }
.site-body .lv-faq .site-faq > div { padding: 0 0 20px; font-size: 16px; color: var(--lv-muted); }

/* footer: bordered container with a warm fade */
.site-body .site-foot { margin: 0 auto calc(16px + env(safe-area-inset-bottom)); width: calc(100% - 32px); max-width: 1200px; padding: 48px 0 24px; border: 1px solid var(--lv-line); border-radius: 16px;
                        background: linear-gradient(180deg, transparent, var(--lv-wash-a)); color: var(--lv-muted); }
.site-body .site-foot .site-wrap { padding: 0 32px; }
.site-body .site-foot h4 { font-size: 15px; font-weight: 600; color: var(--lv-char); }
.site-body .site-foot a { color: var(--lv-muted); }
.site-body .site-foot a:hover { color: var(--lv-char); }
.site-body .site-foot .site-copy { border-top-color: var(--lv-line); color: var(--lv-muted); }

@media (prefers-reduced-motion: reduce) { .lv-show .hx-slide, .lv-car-img img, .lv-btn i, .lv-cap > i, .lv-city i { transition: none; } }
@media (max-width: 1024px) {
    .lv-cars, .lv-why, .lv-revs { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .lv-steps { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .lv-steps li:nth-child(3) { border-left: 0; }
    .lv-steps li:nth-child(n+3) { border-top: 1px solid var(--lv-line); }
    .lv-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .lv-book-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .lv-book .sw-go { grid-column: 1 / -1; }
    .lv-partner, .lv-faq { grid-template-columns: minmax(0, 1fr); gap: 32px; }
}
@media (max-width: 768px) {
    html:has(> body.site-home) { scroll-padding-top: 72px; }
    .lv-hero { padding-top: 56px; }
    .lv-hero h1 { letter-spacing: -1.1px; }
    :is(.site-home, .site-rent, .site-partner) .lv-lead { font-size: 17px; }
    .site-home .lv-book { margin-top: 28px; padding: 16px; }
    .lv-book-top { flex-direction: column; align-items: stretch; }
    .lv-seg { align-self: flex-start; }
    .lv-book-grid { grid-template-columns: minmax(0, 1fr); }
    .lv-show { margin-top: 40px; }
    .lv-show-frame { aspect-ratio: 4 / 5; }
    .lv-cap { left: 12px; right: 12px; bottom: 12px; max-width: none; }
    .lv-stats { gap: 28px 20px; margin-top: 40px; padding-top: 32px; }
    .lv-sec { padding-top: 80px; }
    .lv-sec:last-of-type { padding-bottom: 80px; }
    .lv-head { flex-direction: column; align-items: stretch; margin-bottom: 28px; }
    .lv-head > .lv-btn { align-self: flex-start; }
    .lv-cars, .lv-why, .lv-revs, .lv-steps, .lv-pics { grid-template-columns: minmax(0, 1fr); }
    .lv-steps li + li { border-left: 0; border-top: 1px solid var(--lv-line); }
    .lv-why li, .lv-rev, .lv-steps li { padding: 22px; }
    .lv-way { padding: 26px; }
    .lv-way > .lv-btn { width: 100%; }
    .lv-partner { padding: 24px; }
    .lv-partner .lv-btn { width: 100%; }
    .lv-rev blockquote { font-size: 18px; }
    .site-body .site-foot { width: calc(100% - 24px); padding-top: 36px; }
    .site-body .site-foot .site-wrap { padding: 0 20px; }
}
@media (max-width: 420px) { .lv-stats { grid-template-columns: minmax(0, 1fr); } }

/* home extras: live strip, carbon counter, video reviews, leaderboard, journal */
.lv-live { border-bottom: 1px solid var(--lv-line); background: var(--lv-c03); }
.lv-live-in { display: flex; align-items: center; gap: 14px; min-height: 48px; }
.lv-live-tag { display: inline-flex; flex: none; align-items: center; gap: 8px; padding: 4px 12px; border: 1px solid var(--lv-line); border-radius: 9999px; font-size: 13px; font-weight: 600; color: var(--lv-char); background: var(--lv-cream); }
.lv-dot { position: relative; width: 8px; height: 8px; border-radius: 9999px; background: #16a34a; }
.lv-dot::after { content: ''; position: absolute; inset: -4px; border-radius: inherit; border: 2px solid #16a34a; opacity: 0; animation: lvPing 2s ease-out infinite; }
@keyframes lvPing { 0% { opacity: .6; transform: scale(.6); } 100% { opacity: 0; transform: scale(1.6); } }
.lv-live-view { flex: 1; min-width: 0; overflow: hidden; -webkit-mask-image: linear-gradient(90deg, transparent, #000 24px, #000 calc(100% - 24px), transparent); mask-image: linear-gradient(90deg, transparent, #000 24px, #000 calc(100% - 24px), transparent); }
.lv-live-track { display: flex; width: max-content; animation: lvTicker calc(var(--n, 6) * 7s) linear infinite; }
.lv-live:hover .lv-live-track, .lv-live:focus-within .lv-live-track, .lv-live.is-paused .lv-live-track { animation-play-state: paused; }
@keyframes lvTicker { to { transform: translateX(-50%); } }
.lv-live-item { display: inline-flex; align-items: center; gap: 8px; padding: 0 28px 0 0; font-size: 14px; white-space: nowrap; color: var(--lv-c83); text-decoration: none; }
.lv-live-item i { font-size: 12px; color: var(--lv-muted); }
.lv-live-item small { font-size: 12px; color: var(--lv-muted); }
a.lv-live-item:hover { color: var(--lv-char); }
.lv-live-pause { flex: none; width: 36px; height: 36px; font-size: 12px; }

.lv-carbon { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.3fr); align-items: center; gap: 48px; padding: 48px;
             background: radial-gradient(60% 80% at 100% 0%, rgba(22, 163, 74, .07), transparent 70%), var(--lv-cream); }
.lv-carbon .lv-car-cat i { color: #16a34a; }
.lv-carbon h2 { margin-top: 10px; }
.lv-co2 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 28px 24px; margin: 0; }
.lv-co2 div { display: flex; flex-direction: column-reverse; justify-content: flex-end; min-width: 0; }
.lv-co2 .is-main { grid-column: 1 / -1; padding-bottom: 24px; border-bottom: 1px solid var(--lv-line); }
.lv-co2 dd { margin: 0; font-size: clamp(26px, 3vw, 36px); font-weight: 600; line-height: 1.05; letter-spacing: -1px; color: var(--lv-char); font-variant-numeric: tabular-nums; }
.lv-co2 .is-main dd { font-size: clamp(44px, 6vw, 72px); letter-spacing: -2px; }
.lv-co2 dt { margin-top: 6px; font-size: 15px; color: var(--lv-muted); }

.lv-vids { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; }
.lv-vid { display: flex; flex-direction: column; gap: 14px; min-width: 0; margin: 0; }
.lv-vid-frame { position: relative; display: block; width: 100%; aspect-ratio: 4 / 5; padding: 0; overflow: hidden; border: 1px solid var(--lv-line); border-radius: 12px; background: #111; cursor: pointer; }
.lv-vid-frame img, .lv-vid-frame video, .lv-vid-frame iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; object-fit: cover; }
.lv-vid-frame.is-playing video { object-fit: contain; }
.lv-vid-frame > i { position: absolute; left: 50%; top: 50%; display: grid; place-items: center; width: 64px; height: 64px; padding-left: 4px; border-radius: 9999px; background: var(--lv-white); color: var(--lv-char); font-size: 20px; transform: translate(-50%, -50%); box-shadow: var(--lv-focus); transition: transform .2s; }
.lv-vid-frame:hover > i { transform: translate(-50%, -50%) scale(1.06); }
.lv-vid figcaption { font-size: 14px; color: var(--lv-muted); }
.lv-vid blockquote { margin: 0 0 8px; font-size: 18px; line-height: 1.4; letter-spacing: -.2px; color: var(--lv-char); }
.lv-vid figcaption b { font-weight: 600; color: var(--lv-char); }

.lv-lbs { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 380px), 1fr)); gap: 24px; }
.lv-lb { padding: 28px; }
.lv-lb h3 { display: flex; align-items: center; gap: 10px; margin: 0 0 12px; font-size: 20px; }
.lv-lb h3 i { font-size: 15px; color: var(--lv-muted); }
.lv-rank { list-style: none; margin: 0; padding: 0; }
.lv-rank li { display: grid; grid-template-columns: 36px minmax(0, 1fr) auto; align-items: center; gap: 12px; min-height: 60px; padding: 10px 0; border-top: 1px solid var(--lv-line); }
.lv-rank li:first-child { border-top: 0; }
.lv-rank-n { display: inline-grid; place-items: center; gap: 2px; font-size: 15px; font-weight: 600; color: var(--lv-muted); font-variant-numeric: tabular-nums; }
.lv-rank li:nth-child(-n+3) .lv-rank-n { color: var(--lv-char); }
.lv-rank-n i { font-size: 11px; color: #b7791f; }
.lv-rank b { display: flex; flex-direction: column; min-width: 0; font-size: 16px; font-weight: 600; color: var(--lv-char); overflow: hidden; text-overflow: ellipsis; }
.lv-rank b small, .lv-rank em small { font-size: 13px; font-weight: 400; color: var(--lv-muted); }
.lv-rank em { display: flex; flex-direction: column; align-items: flex-end; font-style: normal; font-size: 16px; font-weight: 600; color: var(--lv-char); text-align: right; white-space: nowrap; }
.lv-rank-full { padding: 8px 28px; }
.lv-rank li.is-me { margin: 0 -28px; padding: 10px 28px; background: var(--lv-c04); }
.lv-lb-bar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 20px; }
.lv-seg a, .lv-chips a { display: inline-flex; align-items: center; gap: 8px; min-height: 40px; padding: 0 16px; border-radius: 9999px; color: var(--lv-muted); font-size: 15px; text-decoration: none; }
.lv-seg a i, .lv-chips a i { font-size: 12px; }
.lv-seg a.is-on { background: var(--lv-btn); color: var(--lv-btn-ink); box-shadow: var(--lv-inset); }
.lv-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.lv-chips a { border: 1px solid var(--lv-line); color: var(--lv-c83); }
.lv-chips a.is-on { border-color: var(--lv-char); background: var(--lv-c04); color: var(--lv-char); }
.site-body .lv-lb-me { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 0 0 16px; padding: 14px 18px; border: 1px solid var(--lv-line); border-radius: 12px; color: var(--lv-c83); }
.lv-lb-me b { color: var(--lv-char); }
.lv-lb-me a, .lv-back, .lv-article-cta a:not(.lv-btn) { color: var(--lv-char); font-weight: 600; text-decoration: none; }

.lv-post small { padding: 0 20px; font-size: 13px; color: var(--lv-muted); }
.lv-post:not(:has(img)) small { padding-top: 20px; }
.lv-post:not(:has(img)) b { padding-top: 0; }
.lv-feature { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); align-items: center; gap: 40px; padding: 20px; margin-bottom: 24px; color: var(--lv-char); text-decoration: none; transition: border-color .2s; }
.lv-feature:hover { border-color: var(--lv-c40); }
.lv-feature:not(:has(img)) { grid-template-columns: minmax(0, 1fr); padding: 32px; }
.lv-feature img { width: 100%; aspect-ratio: 16 / 10; object-fit: cover; border-radius: 12px; }
.lv-feature > div { display: flex; flex-direction: column; gap: 12px; padding-right: 20px; }
.lv-feature small { font-size: 14px; color: var(--lv-muted); }
.lv-feature b { font-size: clamp(26px, 3vw, 36px); font-weight: 600; line-height: 1.1; letter-spacing: -.9px; }
.site-body .lv-feature span { font-size: 17px; line-height: 1.5; color: var(--lv-muted); }
.lv-feature em { font-style: normal; font-weight: 600; }
.lv-article { max-width: 760px; margin: 0 auto; }
.lv-back { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; margin-bottom: 16px; font-size: 15px; }
.lv-article h1 { margin: 8px 0 0; }
.lv-article .lv-lead { margin-top: 16px; max-width: none; font-size: 20px; }
.lv-article-img { width: 100%; height: auto; margin: 32px 0 8px; border: 1px solid var(--lv-line); border-radius: 16px; }
.lv-prose { margin-top: 24px; font-size: 18px; line-height: 1.7; color: var(--lv-c83); }
.lv-prose :is(h2, h3) { margin: 40px 0 12px; color: var(--lv-char); line-height: 1.2; }
.lv-prose h2 { font-size: 28px; letter-spacing: -.6px; }
.lv-prose h3 { font-size: 22px; }
.lv-prose p { margin: 0 0 20px; }
.lv-prose img { max-width: 100%; height: auto; margin: 12px 0; border-radius: 12px; }
.lv-prose blockquote { margin: 28px 0; padding: 4px 0 4px 20px; border-left: 2px solid var(--lv-char); font-size: 21px; line-height: 1.5; color: var(--lv-char); }
.lv-prose a { color: var(--lv-char); font-weight: 600; text-decoration: none; border-bottom: 0; }
.lv-prose :is(ul, ol) { margin: 0 0 20px; padding-left: 22px; }
.lv-article-cta { display: flex; align-items: center; justify-content: space-between; gap: 20px; margin-top: 48px; padding: 28px; }
.lv-article-cta div { display: flex; flex-direction: column; gap: 4px; }
.lv-article-cta b { font-size: 20px; font-weight: 600; color: var(--lv-char); }
.site-body .lv-article-cta span { color: var(--lv-muted); }
.lv-more { margin-top: 96px; }
.lv-more h2 { margin: 0 0 28px; }
.lv-journal-grid { margin-top: 0; }

/* admin: blog editor + video preview (panel theme) */
.rte { display: flex; flex-direction: column; border: 1px solid var(--input-border); border-radius: var(--r-ctrl, 4px); background: var(--input-bg); overflow: hidden; }
.rte[hidden] { display: none; }
.rte-bar { display: flex; flex-wrap: wrap; gap: 2px; padding: 6px; border-bottom: 1px solid var(--border-color); background: color-mix(in srgb, var(--text-muted) 6%, transparent); }
.rte-bar button { display: inline-grid; place-items: center; width: 36px; height: 36px; border: 0; border-radius: var(--r-ctrl, 4px); background: transparent; color: var(--text-secondary); cursor: pointer; }
.rte-bar button:hover:not(:disabled), .rte-bar button[aria-pressed="true"] { background: rgba(var(--navy-accent-rgb), .1); color: var(--accent-ink); }
.rte-bar button:disabled { opacity: .35; cursor: default; }
.rte-area { min-height: 260px; max-height: 60vh; overflow-y: auto; padding: 14px 16px; font-size: 16px; line-height: 1.6; color: var(--text-primary); outline: none; }
.rte-area[hidden] { display: none; }
.rte-area :is(h2, h3) { margin: 16px 0 8px; } .rte-area p { margin: 0 0 10px; } .rte-area img { max-width: 100%; height: auto; border-radius: 6px; }
.rte-area blockquote { margin: 12px 0; padding-left: 14px; border-left: 3px solid var(--border-color); }
.rte + textarea { margin-top: 8px; }
.mk-vid { margin-bottom: 12px; }
.mk-vid video { display: block; width: 100%; max-height: 320px; border-radius: var(--r-ctrl, 4px); background: #000; }
.mk-vid small { display: block; margin-top: 6px; color: var(--text-muted); }

@media (prefers-reduced-motion: reduce) {
    .lv-live-track { animation: none; } .lv-live-view { overflow-x: auto; } .lv-dot::after { animation: none; }
    .lv-vid-frame > i { transition: none; }
}
@media (max-width: 1024px) {
    .lv-carbon, .lv-feature { grid-template-columns: minmax(0, 1fr); gap: 28px; }
    .lv-feature > div { padding: 0 8px 8px; }
    .lv-vids { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 768px) {
    .lv-live-in { gap: 10px; min-height: 44px; }
    .lv-live-tag { padding: 3px 10px; }
    .lv-carbon { padding: 24px; }
    .lv-co2 { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 20px 16px; }
    .lv-co2 > div:last-child { grid-column: 1 / -1; }
    .lv-vids { grid-auto-flow: column; grid-template-columns: none; grid-auto-columns: 78%; gap: 14px; margin: 0 -16px; padding: 0 16px 8px; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; }
    .lv-vids::-webkit-scrollbar { display: none; }
    .lv-vid { scroll-snap-align: start; }
    .lv-lb, .lv-article-cta { padding: 20px; }
    .lv-rank-full { padding: 4px 18px; }
    .lv-rank li.is-me { margin: 0 -18px; padding: 10px 18px; }
    .lv-rank li { grid-template-columns: 30px minmax(0, 1fr) auto; gap: 10px; }
    .lv-feature { padding: 12px; }
    .lv-prose { font-size: 17px; }
    .lv-article-cta { flex-direction: column; align-items: stretch; }
    .lv-article-cta .lv-btn { width: 100%; }
    .lv-more { margin-top: 64px; }
}

/* storefront pack: banner on top, sliders, offer sheet, review slider, partner card + strip, social links, theme button, ribbons, share + heart, faq by topic */
.lv-top { padding: 20px 0 0; }
.lv-top .lv-show { margin-top: 0; }
.site-home .lv-hero { padding-top: 72px; }

.lv-rail { position: relative; min-width: 0; }
.lv-rail[hidden] { display: none; }
.lv-rail-track { display: grid; grid-auto-flow: column; grid-auto-columns: calc((100% - 48px) / 3); grid-template-columns: none; gap: 24px; overflow-x: auto; scroll-snap-type: x mandatory; overscroll-behavior-x: contain; scrollbar-width: none; }
.lv-rail-track::-webkit-scrollbar { display: none; }
.lv-rail-track > * { min-width: 0; scroll-snap-align: start; }
.lv-rail-ctrl { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 16px; }
.lv-rail-dots { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; min-width: 0; }
.lv-rail-dots i { width: 8px; height: 8px; border-radius: 9999px; background: var(--lv-c40); transition: width .3s, background-color .3s; }
.lv-rail-dots i.on { width: 22px; background: var(--lv-btn); }

.lv-offer.lv-slide { height: 100%; }
/* offer card: tinted value head (or banner photo), title + 2-line desc, code box with copy, valid till + details pinned to the bottom */
#offers .lv-offer { gap: 0; padding: 0; }
#offers .lv-offer span { padding: 0; }
#offers .lv-offer img { margin: 0; }
.lv-offer-top { display: flex; align-items: center; gap: 12px; padding: 18px 20px; border-bottom: 1px dashed var(--lv-line); background: var(--lv-mint); }
#offers .lv-offer-ico { display: grid; place-items: center; flex: 0 0 40px; height: 40px; border-radius: 10px; background: var(--lv-btn); color: var(--lv-btn-ink); font-size: 16px; }
.lv-offer-top div { display: grid; gap: 2px; min-width: 0; }
.lv-offer-top strong { font-size: 22px; font-weight: 700; line-height: 1.15; letter-spacing: -.3px; text-transform: uppercase; color: var(--lv-gt); }
.lv-offer-top small { font-size: 13px; line-height: 1.3; color: var(--lv-muted); }
.lv-offer-main { display: flex; flex-direction: column; flex: 1; gap: 8px; padding: 18px 20px 20px; }
.lv-offer-main :is(h3, p) { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden; margin: 0; }
.lv-offer-main h3 { font-size: 18px; font-weight: 600; line-height: 1.3; letter-spacing: -.2px; color: var(--lv-char); }
.lv-offer-main p { font-size: 14.5px; line-height: 1.5; color: var(--lv-muted); }
.lv-offer-end { display: grid; gap: 12px; margin-top: auto; padding-top: 10px; }
.lv-offer-code { display: flex; align-items: center; justify-content: space-between; gap: 8px; min-height: 44px; padding: 3px 3px 3px 12px; border: 1px dashed var(--lv-c40); border-radius: 8px; }
#offers .lv-offer-code span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 14px; font-weight: 700; letter-spacing: .08em; color: var(--lv-char); }
.lv-offer-code span i { margin-right: 6px; color: var(--lv-muted); }
.lv-offer-code button { display: inline-flex; align-items: center; gap: 6px; flex: 0 0 auto; min-height: 36px; padding: 0 12px; border: 0; border-radius: 6px; background: var(--lv-mint); color: var(--lv-gt); font: inherit; font-size: 13px; font-weight: 600; cursor: pointer; transition: background-color .2s, color .2s; }
.lv-offer-code button:hover { background: var(--lv-btn); color: var(--lv-btn-ink); }
.lv-offer-foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
#offers .lv-offer-foot > span { display: inline-flex; align-items: center; gap: 6px; min-width: 0; font-size: 13px; color: var(--lv-muted); }
.lv-offer-more { display: inline-flex; align-items: center; gap: 6px; flex: 0 0 auto; min-height: 40px; margin-left: auto; padding: 0; border: 0; background: none; color: var(--lv-gt); font: inherit; font-size: 14px; font-weight: 600; cursor: pointer; }
.lv-offer-more i { font-size: 12px; transition: transform .2s; }
.lv-offer-more:hover i { transform: translateX(3px); }
:is(.lv-offer-code button, .lv-offer-more):focus-visible { outline: 2px solid var(--lv-btn); outline-offset: 2px; }

.lv-sheet { position: fixed; inset: 0; z-index: 1200; display: grid; place-items: center; padding: 16px; background: rgba(0, 0, 0, .45); }
.lv-sheet[hidden] { display: none; }
body.lv-noscroll { overflow: hidden; }
.lv-sheet-box { position: relative; width: min(560px, 100%); max-height: calc(100dvh - 32px); overflow-y: auto; padding: 28px; border: 1px solid var(--lv-line); border-radius: 16px; background: var(--lv-cream); color: var(--lv-char); box-shadow: var(--lv-focus); }
.lv-sheet-x { position: absolute; top: 14px; right: 14px; z-index: 1; }
.lv-sheet-img { display: block; width: 100%; aspect-ratio: 16 / 9; object-fit: cover; margin-bottom: 16px; border: 1px solid var(--lv-line); border-radius: 12px; }
.lv-sheet-body .lv-offer-badge { display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px; border: 1px solid var(--lv-line); border-radius: 9999px; font-size: 13px; color: var(--lv-c83); }
.lv-sheet-body h2 { margin: 12px 48px 8px 0; font-size: 28px; line-height: 1.12; letter-spacing: -.6px; }
.lv-sheet-lead { margin: 0; font-size: 17px; line-height: 1.5; color: var(--lv-muted); }
.lv-sheet-body .lv-prose { margin-top: 8px; font-size: 16px; }
.lv-sheet-terms { list-style: none; display: grid; gap: 10px; margin: 16px 0; padding: 0; }
.lv-sheet-terms li { display: flex; gap: 10px; font-size: 15px; line-height: 1.45; color: var(--lv-c83); }
.lv-sheet-terms i, .lv-pt-points i, .lv-way-pts i { margin-top: 4px; font-size: 12px; color: var(--lv-char); }
.lv-sheet-until { display: flex; align-items: center; gap: 8px; margin: 12px 0 0; font-size: 14px; color: var(--lv-muted); }
.lv-sheet-code { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; margin: 16px 0 0; padding: 14px 16px; border: 1px dashed var(--lv-c40); border-radius: 12px; }
.lv-sheet-code span { width: 100%; font-size: 13px; color: var(--lv-muted); }
.lv-sheet-code b { flex: 1; font-size: 22px; font-weight: 600; letter-spacing: .08em; }
.lv-sheet-go { width: 100%; margin-top: 20px; }

.lv-gsum { display: flex; flex-direction: column; align-items: flex-end; gap: 10px; }
.lv-gsum p { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 0; font-size: 15px; color: var(--lv-muted); }
.lv-gsum b { font-size: 24px; font-weight: 600; color: var(--lv-char); }
.lv-gsum-links { display: flex; flex-wrap: wrap; gap: 10px; }
.lv-rev.lv-slide { height: 100%; }
.lv-rev-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.lv-rev-src { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; color: var(--lv-muted); text-decoration: none; white-space: nowrap; }
a.lv-rev-src:hover { color: var(--lv-char); }
.lv-rev figcaption small { font-size: 13px; color: var(--lv-muted); }
.lv-rail-track.lv-vids { grid-template-columns: none; margin: 0; padding: 0; }

.lv-way-pts { list-style: none; display: grid; gap: 8px; margin: 2px 0 0; padding: 0; }
.site-home .lv-way-pts li { display: flex; gap: 10px; font-size: 15px; line-height: 1.45; color: var(--lv-muted); }
.site-home .lv-way.is-dark .lv-way-pts :is(li, i) { color: var(--lv-white); }
.site-home .lv-way.is-dark .lv-way-pts li { opacity: .8; }
body.dark-mode.site-home .lv-way.is-dark .lv-way-pts :is(li, i) { color: var(--lv-char); }

.lv-partner-full { grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: 56px; padding: 56px; }
.lv-partner-full .lv-pt-main h2 { margin: 0; }
.lv-pt-points { list-style: none; display: grid; gap: 12px; margin: 0; padding: 0; }
.lv-pt-points li { display: flex; gap: 10px; font-size: 16px; line-height: 1.45; color: var(--lv-c83); }
.lv-pt-btns { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 10px; }
.lv-pt-vid { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; font-size: 15px; font-weight: 600; color: var(--lv-char); text-decoration: none; }
.lv-partner .lv-pt-side { align-items: stretch; gap: 20px; }
.lv-pt-figs { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; margin: 0; }
.lv-pt-figs div { display: flex; flex-direction: column-reverse; justify-content: flex-end; min-width: 0; padding-top: 14px; border-top: 1px solid var(--lv-line); }
.lv-pt-figs dd { margin: 0; font-size: clamp(22px, 2.6vw, 30px); font-weight: 600; line-height: 1.1; letter-spacing: -.6px; color: var(--lv-char); }
.lv-pt-figs dt { margin-top: 4px; font-size: 14px; color: var(--lv-muted); }
.lv-live.is-foot { margin-top: 128px; border-top: 1px solid var(--lv-line); }
.lv-wins { margin-bottom: 24px; padding: 28px; }
.lv-wins > .lv-car-cat { margin: 0 0 14px; font-size: 13px; color: var(--lv-muted); }
.lv-wins > .lv-car-cat i { color: var(--lv-char); }
.lv-wins-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 340px), 1fr)); gap: 12px 40px; }
.lv-wins h3 { display: flex; align-items: center; gap: 10px; margin: 0 0 6px; font-size: 18px; }
.lv-wins h3 i { font-size: 14px; color: var(--lv-muted); }
.lv-win-list em { max-width: 48%; font-size: 14px; font-weight: 400; white-space: normal; color: var(--lv-c83); }

.site-partner-strip { width: calc(100% - 32px); max-width: 1200px; margin: 0 auto 16px; border: 1px solid var(--lv-line); border-radius: 16px; background: var(--lv-c03); }
.site-partner-strip .site-wrap { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px 24px; padding: 20px 28px; }
.site-partner-strip p { display: flex; align-items: center; gap: 12px; margin: 0; font-size: 16px; line-height: 1.45; color: var(--lv-c83); }
.site-partner-strip p > i { flex: none; font-size: 18px; color: var(--lv-char); }
.site-partner-strip b { font-weight: 600; color: var(--lv-char); }
.site-partner-btns { display: flex; flex-wrap: wrap; gap: 10px; }

.social-row { display: flex; flex-wrap: wrap; gap: 8px; }
.social-row a { display: inline-grid; place-items: center; width: 40px; height: 40px; border: 1px solid var(--border-color); border-radius: 9999px; color: var(--text-secondary); text-decoration: none; transition: background-color .15s, color .15s; }
.social-row a:hover { background: rgba(var(--navy-accent-rgb), .08); color: var(--accent-ink); }
.site-foot-social { margin-top: 16px; }
.site-body .site-foot .social-row a { border-color: var(--lv-line); color: var(--lv-muted); }
.site-body .site-foot .social-row a:hover { background: var(--lv-c04); color: var(--lv-char); }
.site-menu .social-row { padding-top: 14px; }
.site-menu .social-row a { display: inline-grid; width: 44px; height: 44px; min-height: 44px; border: 1px solid var(--border-color); font-size: 16px; }
.site-menu .social-row a i { width: auto; color: inherit; }
.sb-social { flex-shrink: 0; justify-content: center; gap: 4px; padding: 8px 12px 0; border-top: 1px solid var(--border-color); }
.sb-social a { width: 34px; height: 34px; border-color: transparent; color: inherit; opacity: .7; }
.sb-social a:hover { opacity: 1; background: var(--sb-hover); color: inherit; }
.sidebar.collapsed .sb-social { display: none; }

.site-body .site-nav .site-theme { display: inline-grid; place-items: center; flex: none; width: 40px; min-width: 40px; height: 40px; padding: 0; border: 1px solid var(--lv-line); border-radius: 9999px; background: transparent; color: var(--lv-char); font-size: 14px; cursor: pointer; }
.site-body .site-nav .site-theme:hover { background: var(--lv-c04); }
@media (max-width: 768px) { .site-body .site-nav .site-theme { display: none; } } /* phones: it lives in the ☰ menu */
.site-menu .site-menu-btn { display: flex; align-items: center; gap: 12px; width: 100%; min-height: 52px; padding: 0; border: 0; border-bottom: 1px solid var(--border-light); background: none; color: var(--text-primary); font: inherit; font-size: 16px; text-align: left; cursor: pointer; }
.site-menu .site-menu-btn i { width: 20px; color: var(--lv-muted, var(--navy-accent)); }

.lv-car, .sc-card { position: relative; }
.lv-ribbon { position: absolute; top: 14px; left: 14px; z-index: 2; display: inline-flex; align-items: center; min-height: 26px; padding: 0 10px; border: 1px solid transparent; border-radius: 6px;
             font-size: 12px; font-weight: 600; letter-spacing: .02em; background: var(--lv-char, var(--navy-primary)); color: var(--lv-white, #fff); pointer-events: none; }
.lv-ribbon.t-green { background: color-mix(in srgb, var(--success) 16%, var(--lv-cream, var(--bg-card))); border-color: color-mix(in srgb, var(--success) 45%, transparent); color: color-mix(in srgb, var(--success) 62%, var(--lv-char, var(--text-primary))); }
.lv-ribbon.t-amber { background: color-mix(in srgb, var(--warning) 20%, var(--lv-cream, var(--bg-card))); border-color: color-mix(in srgb, var(--warning) 55%, transparent); color: color-mix(in srgb, var(--warning) 35%, var(--lv-char, var(--text-primary))); }
.lv-ribbon.t-red { background: color-mix(in srgb, var(--danger) 14%, var(--lv-cream, var(--bg-card))); border-color: color-mix(in srgb, var(--danger) 45%, transparent); color: color-mix(in srgb, var(--danger) 70%, var(--lv-char, var(--text-primary))); }
.veh-head-top { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.veh-head .lv-ribbon { position: static; }
.lv-tools { position: absolute; top: 12px; right: 12px; z-index: 2; display: flex; gap: 8px; }
.lv-tool { display: inline-grid; place-items: center; width: 40px; height: 40px; padding: 0; border: 1px solid var(--lv-line, var(--border-color)); border-radius: 9999px; background: var(--lv-cream, var(--bg-card));
           color: var(--lv-char, var(--text-primary)); font-size: 15px; cursor: pointer; touch-action: manipulation; box-shadow: var(--lv-focus, none); transition: transform .15s; }
.lv-tool:hover { transform: scale(1.06); }
.lv-tool:disabled { cursor: wait; }
.lv-fav.is-on i { color: var(--danger); }
.lv-tools.veh-tools { position: static; margin-top: 12px; }
.veh-tools .lv-tool { box-shadow: none; }
.lv-share-menu { position: fixed; z-index: 1300; display: flex; flex-direction: column; min-width: 210px; padding: 6px; border: 1px solid var(--lv-line, var(--border-color)); border-radius: 12px; background: var(--bg-card); box-shadow: var(--lv-focus, 0 10px 30px var(--shadow-color)); }
.lv-share-menu :is(a, button) { display: flex; align-items: center; gap: 12px; min-height: 44px; padding: 0 12px; border: 0; border-radius: 6px; background: none; color: var(--text-primary); font: inherit; font-size: 15px; text-align: left; text-decoration: none; cursor: pointer; }
.lv-share-menu :is(a, button):is(:hover, :focus-visible) { background: var(--lv-c04, rgba(var(--navy-accent-rgb), .06)); }
.lv-share-menu i { width: 18px; text-align: center; color: var(--text-muted); }

body:not(.site-home) .lv-faq-sec { margin-top: 72px; padding-top: 48px; border-top: 1px solid var(--lv-line); }
.pt-guides .lv-rail { margin-top: 28px; }
.hold-chip { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 10px; margin: 12px 0; padding: 12px 14px; border: 1px solid var(--lv-line, var(--border-color)); border-radius: 12px; font-size: 15px; color: var(--text-primary); background: var(--bg-card); }
.hold-chip[hidden] { display: none; }
.hold-chip > i { color: var(--text-muted); }
.hold-chip em { font-style: normal; font-weight: 600; font-variant-numeric: tabular-nums; }
.hold-bar { flex-basis: 100%; height: 3px; overflow: hidden; border-radius: 9999px; background: var(--lv-c04, rgba(var(--navy-accent-rgb), .08)); }
.hold-bar i { display: block; width: 100%; height: 100%; background: var(--lv-char, var(--navy-accent)); transition: width 1s linear; }
.hold-chip.is-low { border-color: color-mix(in srgb, var(--warning) 60%, transparent); background: color-mix(in srgb, var(--warning) 10%, var(--bg-card)); }
.hold-chip.is-low .hold-bar i { background: var(--warning); }
.hold-chip.is-over { border-color: color-mix(in srgb, var(--danger) 50%, transparent); background: color-mix(in srgb, var(--danger) 8%, var(--bg-card)); }
.co-side > .hold-chip { margin-top: 0; }
.hold-x { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; margin: 0 0 12px; padding: 14px; border: 1px solid color-mix(in srgb, var(--danger) 45%, transparent); border-radius: 12px; }
.hold-x[hidden] { display: none; }
.hold-x p { display: flex; gap: 10px; margin: 0; font-size: 15px; color: var(--text-primary); }
@media (prefers-reduced-motion: reduce) { .hold-bar i { transition: none; } }
.dash-guides { grid-column: 1 / -1; }
.bad-msg { border: 1px solid color-mix(in srgb, var(--danger) 45%, var(--border-color)); border-radius: var(--r-ctrl); }
.bad-msg i { color: var(--danger); }
.dl-box { display: flex; flex-direction: column; gap: 12px; margin: 0 0 18px; padding: 16px; border: 1px solid var(--lv-line, var(--border-color)); border-radius: 12px; background: var(--lv-c03, transparent); }
.dl-box b { display: flex; align-items: center; gap: 8px; font-size: 16px; color: var(--text-primary); }
.dl-box .site-meta { margin: 6px 0 0; }
.dl-box .btn { align-self: flex-start; }
@media (max-width: 768px) { .dl-box .btn { align-self: stretch; } }
.lb-pend { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; margin-bottom: 14px; padding: 14px 16px; border: 1px solid color-mix(in srgb, var(--warning) 55%, transparent); border-radius: var(--r-panel, 8px); background: color-mix(in srgb, var(--warning) 10%, var(--bg-card)); color: var(--text-primary); }
.lb-pend[hidden] { display: none; }
.lb-pend > i { color: var(--accent-ink); }
.lb-pend span { flex: 1; min-width: 200px; font-weight: 500; }
.lb-row { padding: 12px 0; border-top: 1px solid var(--border-color); }
.lb-row:first-of-type { border-top: 0; padding-top: 4px; }
.lb-who { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 10px; margin-bottom: 8px; }
.lb-who b { font-size: 15px; }
.lb-who small { color: var(--text-muted); }
.lb-rank { display: inline-grid; place-items: center; min-width: 30px; height: 26px; padding: 0 6px; border-radius: var(--r-ctrl, 4px); background: rgba(var(--navy-accent-rgb), .1); color: var(--accent-ink); font-size: 13px; font-weight: 600; }
.dash-vids { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 220px), 1fr)); gap: 16px; }
.dash-vid { display: flex; flex-direction: column; gap: 6px; min-width: 0; color: var(--text-primary); text-decoration: none; }
.dash-vid-pic { position: relative; display: grid; place-items: center; aspect-ratio: 16 / 9; overflow: hidden; border: 1px solid var(--border-color); border-radius: var(--r-ctrl, 4px); background: rgba(var(--navy-accent-rgb), .06); }
.dash-vid-pic img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.dash-vid-pic i { position: relative; display: grid; place-items: center; width: 44px; height: 44px; padding-left: 3px; border-radius: 9999px; background: var(--bg-card); color: var(--accent-ink); box-shadow: 0 2px 8px var(--shadow-color); }
.dash-vid b { font-size: 14px; }
.dash-vid small { font-size: 13px; color: var(--text-muted); }
.dash-vid:hover b { color: var(--accent-ink); }
.lv-faq-sec h2 { margin: 0; font-size: clamp(28px, 3.4vw, 40px); line-height: 1.08; letter-spacing: -1px; }
.lv-faq-sec .lv-lead { margin: 12px 0 0; font-size: 17px; line-height: 1.45; color: var(--lv-muted); }
.lv-faq-tabs { margin-top: 20px; }
.lv-faq .site-faq[hidden] { display: none; }

@media (pointer: coarse) { .lv-tool { width: 44px; height: 44px; } }
@media (prefers-reduced-motion: reduce) { .lv-rail-dots i, .lv-tool { transition: none; } .lv-rail-track { scroll-behavior: auto; } }
@media (max-width: 1024px) {
    .lv-rail-track { grid-auto-columns: calc((100% - 24px) / 2); }
    .lv-partner-full { gap: 32px; padding: 40px; }
}
@media (max-width: 768px) {
    .lv-top { padding-top: 12px; }
    .site-home .lv-hero { padding-top: 48px; }
    .lv-rail-track, .lv-rail-track.lv-vids { grid-auto-columns: 86%; gap: 14px; margin: 0 -16px; padding: 0 16px; scroll-padding-left: 16px; }
    .lv-gsum { align-items: flex-start; }
    .lv-sheet { place-items: stretch; padding: 0; }
    .lv-sheet-box { width: 100%; max-height: none; height: 100dvh; border: 0; border-radius: 0; padding: 20px 16px calc(24px + env(safe-area-inset-bottom)); }
    .lv-sheet-body h2 { font-size: 24px; }
    .lv-partner-full { padding: 24px; }
    .lv-pt-btns { flex-direction: column; width: 100%; }
    .lv-pt-figs { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
    .lv-live.is-foot { margin-top: 80px; }
    .site-partner-strip { width: calc(100% - 24px); }
    .site-partner-strip .site-wrap { padding: 18px 16px; }
    .site-partner-btns { flex-direction: column; width: 100%; }
    .site-partner-btns .lv-btn { width: 100%; }
    body:not(.site-home) .lv-faq-sec { margin-top: 48px; padding-top: 32px; }
    .lv-tools { top: 10px; right: 10px; }
    .lv-ribbon { top: 12px; left: 12px; }
}

/* storefront pages on the cream look — rent, vehicle, plans, partner, checkout, booking, my rides, city, blog, policy pages */
body.site-body:not(.site-home) .site-main { padding: 48px 0 96px; }
body.site-body:not(.site-home) .site-main :is(h1, h2) { font-weight: 600; color: var(--lv-char); }
body.site-body:not(.site-home) .site-main h1 { font-size: clamp(30px, 4vw, 44px); line-height: 1.08; letter-spacing: -1.1px; }
body.site-body:not(.site-home) .site-main h2 { letter-spacing: -.4px; }
body.site-body .site-main h3 { font-weight: 600; letter-spacing: -.2px; }
body.site-body .rent-bar h1 { font-size: clamp(26px, 3vw, 36px); }
body.site-body .rent-count { display: block; margin-top: 6px; font-size: 15px; font-weight: 400; letter-spacing: 0; color: var(--lv-muted); }
/* surfaces: borders, not shadows — 12px cards, 16px containers */
body.site-body :is(.site-card, .sc-card, .city-card, .offer-card, .model-card, .lte-card, .data-section, .veh-specs div, .vg-main) { border: 1px solid var(--lv-line); border-radius: 12px; box-shadow: none; background: var(--bg-card); }
body.site-body :is(.search-card, .fare-card) { border: 1px solid var(--lv-line); border-radius: 16px; box-shadow: var(--lv-focus); background: var(--bg-card); }
body.site-body .site-card { padding: 28px; }
body.site-body :is(.sc-card, .city-card, .offer-card, .model-card) { transition: border-color .2s; }
body.site-body :is(.sc-card, a.city-card, a.offer-card, .model-card):hover { border-color: var(--lv-c40); box-shadow: none; transform: none; }
body.site-body .sc-card h3 a, body.site-body .sc-card h3 a:hover { color: var(--lv-char); }
body.site-body .sc-price b { font-weight: 600; letter-spacing: -.4px; color: var(--lv-char); }
body.site-body .vg-thumbs button { border-radius: 8px; }
body.site-body .vg-thumbs button.on { border-color: var(--lv-char); }
/* buttons: dark with the inset shadow, ghost outline; no lift on hover, .8 when pressed */
body.site-body .btn { min-height: 44px; border-radius: 6px; font-family: var(--lv-font); font-size: 15px; font-weight: 400; box-shadow: none; transition: opacity .15s, background-color .15s; }
body.site-body .btn:hover { transform: none; }
body.site-body .btn:active { opacity: .8; }
body.site-body :is(.btn-primary, a.btn-primary, a.btn-primary:hover) { background: var(--lv-btn); border: 1px solid var(--lv-btn); color: var(--lv-btn-ink); box-shadow: var(--lv-inset); }
body.site-body .btn-primary:hover { background: var(--lv-btn); opacity: .9; }
body.site-body :is(.btn-secondary, a.btn-secondary, a.btn-secondary:hover) { background: transparent; border: 1px solid var(--lv-c40); color: var(--lv-char); }
body.site-body .btn-secondary:hover { background: var(--lv-c04); }
body.site-body .btn-sm { min-height: 36px; font-size: 14px; }
/* fields */
body.site-body .form-group label, body.site-body .search-card label, body.site-body .fare-card label { font-weight: 400; color: var(--lv-c83); }
body.site-body :is(.search-card, .fare-card) label i { color: var(--lv-muted); }
body.site-body :is(.form-group input, .form-group select, .form-group textarea, .sd-trigger) { border: 1px solid var(--lv-line); border-radius: 6px; background: var(--input-bg); color: var(--lv-char); box-shadow: none; }
body.site-body :is(.form-group input:focus, .form-group select:focus, .form-group textarea:focus, .sd-wrap.open .sd-trigger, .sd-trigger:focus-visible) { border-color: var(--lv-c40); box-shadow: 0 0 0 2px var(--lv-ring); outline: none; }
/* pills: tabs, chips, segmented switch */
body.site-body .cat-tabs button, body.site-body .sw-chips button { border: 1px solid var(--lv-line); border-radius: 9999px; background: transparent; color: var(--lv-c83); font-weight: 400; }
body.site-body .cat-tabs button.on { border-color: var(--lv-btn); background: var(--lv-btn); color: var(--lv-btn-ink); box-shadow: var(--lv-inset); }
body.site-body .sw-chips button:hover { border-color: var(--lv-c40); color: var(--lv-char); }
body.site-body .sw-chips button.is-on { border-color: var(--lv-char); background: var(--lv-c04); color: var(--lv-char); }
body.site-body .hf-seg { border-color: var(--lv-line); border-radius: 9999px; background: var(--lv-c03); }
body.site-body .hf-seg button { border-radius: 9999px; font-weight: 400; }
body.site-body .hf-seg button.is-on { background: var(--lv-btn); color: var(--lv-btn-ink); box-shadow: var(--lv-inset); }
body.site-body .ab-tab { font-weight: 400; color: var(--lv-muted); }
body.site-body .ab-tab.on { color: var(--lv-char); border-bottom-color: var(--lv-char); font-weight: 600; }
/* text */
body.site-body .site-main :is(.cms-body, .veh-desc, .site-card) a:not(.btn) { color: var(--lv-char); font-weight: 600; text-decoration: none; }
body.site-body .site-faq { border-color: var(--lv-line); border-radius: 12px; }
body.site-body .site-faq summary { font-weight: 400; }
body.site-body .veh-crumb a:hover { color: var(--lv-char); }
@media (max-width: 768px) { body.site-body:not(.site-home) .site-main { padding: 28px 0 calc(96px + env(safe-area-inset-bottom)); } body.site-body .site-card { padding: 20px; } }

body:is(.site-body, .lv-auth) .sd-panel { border-color: var(--lv-line); border-radius: 12px; box-shadow: var(--lv-focus); }
body:is(.site-body, .lv-auth) .sd-item.sel { background: var(--lv-btn); color: var(--lv-btn-ink); }
/* cream pages keep their own surfaces — the glass theme option never frosts them */
html[data-shape="glass"] body:is(.site-body, .lv-auth) {
    --glass-bg: var(--lv-cream); --glass-strong: var(--bg-card); --glass-line: var(--lv-line); --glass-blur: none; --glass-shadow: 0 0 #0000; --glass-hi: 0 0 #0000;
    background: var(--lv-cream) !important;
}
html[data-shape="glass"] body.dark-mode:is(.site-body, .lv-auth) { --glass-bg: var(--lv-cream); --glass-strong: var(--bg-card); --glass-line: var(--lv-line); }
html[data-shape="glass"] body.site-home .lv-faq .site-faq { border: 1px solid var(--lv-line) !important; border-radius: 14px !important; box-shadow: none !important; }
html[data-shape="glass"] body.site-home .lv-book { box-shadow: var(--lv-focus) !important; }

/* sign-in pages on the home look: login, signup, forgot / reset password, verify code */
body.auth-body.lv-auth {
    --auth-page: var(--lv-cream); --auth-paper: var(--lv-cream); --auth-link: var(--lv-char);
    --auth-ink: var(--lv-btn); --auth-on-ink: var(--lv-btn-ink); --auth-bolt: var(--lv-btn-ink); --auth-tick: var(--lv-btn-ink);
    --input-bg: var(--lv-cream); --input-border: var(--lv-line);
    font-family: var(--lv-font);
    background: radial-gradient(40% 46% at 18% 12%, var(--lv-wash-a), transparent 70%), radial-gradient(36% 44% at 84% 18%, var(--lv-wash-c), transparent 70%),
                radial-gradient(46% 40% at 50% 96%, var(--lv-wash-b), transparent 70%), var(--lv-cream) !important;
    background-attachment: fixed !important;
}
body.dark-mode.auth-body.lv-auth { --auth-paper: var(--bg-card); --input-bg: #1e1e1e; --input-border: var(--lv-line); }
body.lv-auth :is(.auth-back, .auth-toggle) { border: 1px solid var(--lv-c40) !important; background: transparent !important; box-shadow: none !important; color: var(--lv-char); }
.lv-auth .auth-back { min-height: 44px; border-radius: 6px; font-weight: 400; font-size: 15px; }
.lv-auth .auth-back i { color: var(--lv-char); }
.lv-auth .auth-toggle { width: 44px; height: 44px; border-radius: 9999px; }
body.lv-auth .auth-card { padding: 40px 40px 36px; background: var(--auth-paper) !important; border: 1px solid var(--lv-line) !important; border-radius: 16px; box-shadow: var(--lv-focus) !important; }
.lv-auth .auth-brandmark { margin-bottom: 28px; font-size: 17px; font-weight: 600; letter-spacing: -.02em; color: var(--lv-char); }
.lv-auth .auth-brandmark img { border-radius: 8px; }
.lv-auth .auth-form-inner h1 { margin-bottom: 10px; font-size: 34px; font-weight: 600; line-height: 1.1; letter-spacing: -.9px; color: var(--lv-char); }
.lv-auth .auth-sub { font-size: 16px; line-height: 1.5; color: var(--lv-muted); }
.lv-auth .auth-group label { font-size: 14px; font-weight: 400; color: var(--lv-c83); }
.lv-auth .auth-field input, .lv-auth .auth-group .sd-trigger { height: 48px; min-height: 48px; border: 1px solid var(--lv-line); border-radius: 6px; background: var(--input-bg); color: var(--lv-char); font-weight: 400; box-shadow: none; }
.lv-auth .auth-field input::placeholder { color: var(--lv-muted); opacity: 1; }
.lv-auth .auth-field input:focus, .lv-auth .auth-group :is(.sd-wrap.open .sd-trigger, .sd-trigger:focus-visible) { border-color: var(--lv-c40); box-shadow: 0 0 0 2px var(--lv-ring); }
.lv-auth .auth-field input:-webkit-autofill, .lv-auth .auth-field input:-webkit-autofill:hover { box-shadow: 0 0 0 100px var(--input-bg) inset; }
.lv-auth .auth-field input:-webkit-autofill:focus { box-shadow: 0 0 0 100px var(--input-bg) inset, 0 0 0 2px var(--lv-ring); }
.lv-auth .auth-field:focus-within .auth-field-icon { color: var(--lv-char); }
.lv-auth .auth-eye { border-radius: 9999px; }
.lv-auth .auth-check input { border: 1px solid var(--lv-c40); border-radius: 4px; }
.lv-auth .auth-link, .lv-auth .auth-consent a, .lv-auth .auth-contact-links a { color: var(--lv-char); font-weight: 600; }
.lv-auth .auth-submit { height: 48px; border-radius: 6px; font-size: 16px; font-weight: 400; letter-spacing: 0; box-shadow: var(--lv-inset) !important; }
.lv-auth .auth-submit::before { background: color-mix(in srgb, var(--lv-white) 22%, transparent); border-right-color: color-mix(in srgb, var(--lv-white) 60%, transparent); }
.lv-auth .auth-submit:active { transform: none; opacity: .8; }
.lv-auth .auth-google { height: 48px; border: 1px solid var(--lv-c40); border-radius: 6px; background: transparent; font-weight: 400; box-shadow: none; }
.lv-auth .auth-or::before, .lv-auth .auth-or::after { background: var(--lv-line); }
.lv-auth .auth-form-inner :is(.error, .success) { border-radius: 6px; }
.lv-auth .auth-contact-title { font-weight: 600; color: var(--lv-char); }
.lv-auth :is(.auth-back, .auth-toggle, .auth-link, .auth-submit, .auth-google, .auth-eye):focus-visible, .lv-auth .auth-check input:focus-visible { outline: none; box-shadow: 0 0 0 2px var(--lv-ring) !important; }
body.dark-mode.lv-auth .auth-check input:checked { background: var(--lv-btn); border-color: var(--lv-btn); }
@media (hover: hover) {
    .lv-auth :is(.auth-back, .auth-toggle):hover { background: var(--lv-c04) !important; }
    .lv-auth .auth-field input:hover:not(:focus), .lv-auth .auth-check input:hover:not(:checked) { border-color: var(--lv-c40); }
    .lv-auth .auth-submit:hover:not(:disabled) { background: var(--lv-btn); transform: none; opacity: .9; }
    .lv-auth .auth-google:hover { background: var(--lv-c04); border-color: var(--lv-c40); }
    .lv-auth :is(.auth-link, .auth-consent a, .auth-contact-links a):hover { text-decoration: none; opacity: .7; }
}
@media (max-width: 520px) {
    body.lv-auth .auth-card { padding: 28px 20px 24px; }
    .lv-auth .auth-form-inner h1 { font-size: 28px; letter-spacing: -.6px; }
}

/* storefront: blog */
.blog-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 16px; }
.blog-card { display: flex; flex-direction: column; gap: 6px; padding: 14px; border: 1px solid var(--border-color); border-radius: var(--r-panel); background: var(--bg-card); color: var(--text-primary); text-decoration: none; }
.blog-card img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; border-radius: var(--r-ctrl); }
.blog-card small { color: var(--text-muted); }
.blog-card span { color: var(--text-secondary); font-size: 14px; line-height: 1.55; }
.blog-card:hover { border-color: var(--navy-accent); }
.blog-post { max-width: 820px; margin: 0 auto; }
.blog-img { width: 100%; height: auto; border-radius: var(--r-ctrl); margin: 8px 0 16px; }

@media (max-width: 960px) {
    .home-hero { grid-template-columns: minmax(0, 1fr); }
    .hh-img { display: none; }
    .veh-layout { grid-template-columns: minmax(0, 1fr); }
    .veh-side { position: static; }
}
@media (max-width: 768px) {
    .sw-grid, .search-inline .sw-grid { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
    .sw-city { grid-column: 1 / -1; }
    .search-inline .sw-go { grid-column: 1 / -1; width: 100%; }
    .search-card { padding: 14px; }
    .sc-grid { grid-template-columns: minmax(0, 1fr); gap: 12px; }
    .sc-card { flex-direction: row; }
    .sc-img { flex: 0 0 38%; aspect-ratio: auto; border-bottom: 0; border-right: 1px solid var(--border-light); font-size: 30px; }
    .sc-img img { object-fit: contain; padding: 6px; } /* tall row card after a search: show the whole vehicle, never a crop */
    .sc-body { padding: 10px 12px; gap: 4px; }
    .sc-card h3 { font-size: 15.5px; }
    .sc-foot { flex-wrap: wrap; }
    .home-sec-head h2 { font-size: 19px; }
    .rent-layout { grid-template-columns: minmax(0, 1fr); }
    .flt-btn { display: inline-flex; }
    .flt-rail { display: none; position: fixed; inset: auto 0 0 0; top: auto; z-index: 1200; max-height: 85vh; overflow-y: auto; border-radius: var(--r-panel) var(--r-panel) 0 0; padding: 16px 16px calc(16px + env(safe-area-inset-bottom)); box-shadow: 0 -8px 30px var(--shadow-color); }
    .flt-rail.open { display: flex; }
    body.sheet-open::after { content: ''; position: fixed; inset: 0; z-index: 1100; background: rgba(0, 0, 0, .45); }
    .flt-head .close-btn { display: inline-flex; }
    .veh-specs { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .veh-feats { grid-template-columns: minmax(0, 1fr); }
    .pol-table th { width: 40%; }
    .fare-bar { display: flex; position: fixed; left: 0; right: 0; bottom: 0; z-index: 900; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 16px calc(10px + env(safe-area-inset-bottom)); background: var(--bg-card); border-top: 1px solid var(--border-color); box-shadow: 0 -4px 16px var(--shadow-color); }
    body:has(.site-mobile-nav) .fare-bar { bottom: calc(68px + env(safe-area-inset-bottom)); }
    .fare-bar .fb-total { display: flex; flex-direction: column; min-width: 0; }
    .fare-bar .fb-total b { font-size: 18px; color: var(--text-primary); }
    .fare-bar .fb-total small { color: var(--text-muted); font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
    .fare-bar .btn { flex: none; min-height: 46px; min-width: 110px; justify-content: center; }
    .site-vehicle .site-main { padding-bottom: calc(150px + env(safe-area-inset-bottom)); }
}
@media (max-width: 400px) {
    .sc-img { flex-basis: 34%; }
}
@media (max-width: 768px) { .sc-card > .lv-tools { top: auto; right: auto; bottom: 10px; left: 10px; } } /* phone row card: tools sit on the photo, never over the title */
@media (max-width: 768px) {
    .tb-table .tabulator-cell .act { width: 32px; height: 36px; }
    .tb-table .tabulator-cell:has(> .act) { display: flex; flex-wrap: wrap; justify-content: center; align-content: center; gap: 2px; white-space: normal; } /* more than 3 actions wrap to a 2nd row, never shrink */
    .sw-grid { grid-template-columns: minmax(0, 1fr); }
    .search-inline .sw-grid { grid-template-columns: minmax(0, 1fr); }
    .site-logo span { max-width: 132px; }
    .site-city { max-width: 120px; padding: 0 10px; font-size: 13px; }
}
.sw-chips > span[hidden] { display: none; }
.site-city { text-decoration: none; white-space: nowrap; }
.site-city span { overflow: hidden; text-overflow: ellipsis; min-width: 0; }
@media (max-width: 380px) { .site-logo span { display: none; } }

/* chip-grouped Tabulator tables */
.tb-table.chip-table .tabulator-row .tabulator-cell { white-space: normal; padding: 7px 10px; vertical-align: top; }
.tb-table.chip-table .chip-row { min-width: 0; }
.tb-table .tabulator-tableholder { height: auto !important; max-height: none !important; overflow: hidden !important; } /* no table scroller, rows grow the page */
.tb-table .tabulator-responsive-collapse .chip-row { white-space: normal; }
.tabulator-cell > .cell-stack { flex: 1 1 auto; width: 100%; min-width: 0; } /* chip left, value at the right edge */
.tabulator-cell .chip-row .val { min-width: 0; white-space: normal; overflow-wrap: anywhere; } /* long values wrap, never clip */
.tb-table.chip-table .cell-stack .st-pill { align-self: flex-start; }
@media (max-width: 768px) { .tb-table.chip-table .chip-row { gap: 8px; } .tb-table.chip-table .chip { min-width: 70px; } }

/* fleet */
.swal-form { display: flex; flex-direction: column; gap: 4px; text-align: left; }
.swal-form label { font-size: 13px; font-weight: 700; color: var(--text-secondary); margin-top: 6px; }
.doc-rows { display: flex; flex-direction: column; gap: 12px; }
.doc-row { padding: 12px; border: 1px solid var(--border-color); border-radius: var(--r-ctrl); background: var(--bg-secondary); }
.doc-row[hidden] { display: none; }
.doc-row-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 8px; color: var(--text-primary); }
.blk-chips { margin-bottom: 10px; }

/* record 360 (vehicle / vendor) */
.v360-head { display: flex; gap: 16px; align-items: center; padding: 16px; margin-bottom: 14px; background: var(--bg-card); border: 1px solid var(--border-color); border-radius: var(--r-panel); min-width: 0; }
.v360-img { flex: none; width: 120px; height: 90px; display: flex; align-items: center; justify-content: center; border-radius: var(--r-ctrl); background: var(--bg-secondary); color: var(--text-muted); font-size: 34px; overflow: hidden; }
.v360-img img { width: 100%; height: 100%; object-fit: cover; }
.v360-id { min-width: 0; }
.v360-id h2 { margin: 0; font-size: 20px; color: var(--text-primary); }
.v360-id h2 small { font-size: 14px; font-weight: 600; color: var(--text-muted); margin-left: 6px; }
.v360-id p { margin: 4px 0 8px; color: var(--text-secondary); font-size: 14px; }
.v360-pills { display: flex; flex-wrap: wrap; gap: 6px; }
.v360-note { margin: 8px 0 0 !important; font-size: 13px; color: var(--text-secondary); }
.v360-note i { color: var(--warning); }
.v360-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 14px; }
.v360-card { background: var(--bg-card); border: 1px solid var(--border-color); border-radius: var(--r-panel); min-width: 0; }
.v360-card-h { padding: 12px 16px; border-bottom: 1px solid var(--border-color); }
.v360-card-h h3 { margin: 0; font-size: 15px; color: var(--text-primary); }
.v360-card-b { padding: 8px 16px 4px; }
.v360-soc { display: flex; align-items: center; gap: 10px; margin: 6px 0 10px; }
.v360-soc b { font-size: 26px; color: var(--text-primary); }
.v360-soc.is-low b { color: var(--warning); }
.doc-line { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 8px 0; border-bottom: 1px solid var(--border-light); font-size: 14px; color: var(--text-primary); }
.doc-check { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 10px; margin-bottom: 14px; }
.doc-req { display: grid; grid-template-columns: auto 1fr; gap: 2px 10px; align-items: center; padding: 12px; border: 1px solid var(--border-color); border-radius: var(--r-ctrl); background: var(--bg-card); }
.doc-req i { grid-row: span 2; font-size: 20px; }
.doc-req.is-ok i { color: var(--success); }
.doc-req.is-miss { border-color: color-mix(in srgb, var(--danger) 45%, var(--border-color)); }
.doc-req.is-miss i { color: var(--danger); }
.doc-req span { font-size: 12.5px; color: var(--text-muted); }
.doc-req .btn { grid-column: 1 / -1; margin-top: 6px; justify-content: center; }
.timeline { list-style: none; margin: 0; padding: 0; }
.timeline li { display: grid; grid-template-columns: 140px 1fr; gap: 2px 14px; padding: 10px 0; border-bottom: 1px solid var(--border-light); font-size: 14px; }
.timeline time { grid-row: span 2; color: var(--text-muted); font-size: 13px; font-variant-numeric: tabular-nums; }
.timeline b { color: var(--text-primary); text-transform: capitalize; }
.timeline span { color: var(--text-secondary); font-size: 13px; overflow-wrap: anywhere; }
.empty-state { text-align: center; padding: 48px 16px; color: var(--text-secondary); }
.empty-state > i { font-size: 36px; color: var(--text-muted); }
.empty-state h3 { margin: 12px 0 6px; color: var(--text-primary); }
.sk-line { height: 60px; border-radius: var(--r-ctrl); background: linear-gradient(90deg, var(--bg-secondary), var(--border-light), var(--bg-secondary)); background-size: 200% 100%; animation: skShine 1.2s linear infinite; width: 100%; }
@keyframes skShine { to { background-position: -200% 0; } }
@media (max-width: 576px) {
    .v360-head { flex-direction: column; align-items: flex-start; }
    .v360-img { width: 100%; height: 150px; }
    .timeline li { grid-template-columns: minmax(0, 1fr); }
    .timeline time { grid-row: auto; }
}
@media (prefers-reduced-motion: reduce) { .sk-line { animation: none; } }

/* document reviewer */
.rv-modal { width: min(1100px, 96vw); max-width: none; }
.rv-body { display: grid; grid-template-columns: minmax(0, 1fr) 320px; min-height: 60vh; }
.rv-doc { display: flex; flex-direction: column; min-width: 0; border-right: 1px solid var(--border-color); background: var(--bg-secondary); }
.rv-tools { display: flex; gap: 6px; padding: 8px; border-bottom: 1px solid var(--border-color); }
.rv-view { flex: 1; overflow: auto; display: flex; align-items: center; justify-content: center; min-height: 360px; }
.rv-view img { max-width: 100%; transition: transform .2s; transform-origin: center; }
.rv-view iframe { width: 100%; height: 100%; min-height: 60vh; border: 0; background: #fff; }
.rv-side { display: flex; flex-direction: column; padding: 16px; min-width: 0; }
.rv-acts { display: flex; gap: 8px; margin-top: auto; padding-top: 12px; }
.rv-acts .btn { flex: 1; justify-content: center; min-height: 46px; }
@media (max-width: 768px) {
    .rv-body { grid-template-columns: minmax(0, 1fr); }
    .rv-doc { border-right: 0; border-bottom: 1px solid var(--border-color); }
    .rv-view, .rv-view iframe { min-height: 45vh; }
    .rv-acts { position: sticky; bottom: 0; background: var(--bg-card); padding-bottom: calc(12px + env(safe-area-inset-bottom)); }
}
.tb-stars { color: var(--warning); font-size: 12px; letter-spacing: 1px; white-space: nowrap; }
.tb-stars .far { color: var(--border-color); }

/* onboarding stepper */
.stepper { list-style: none; margin: 0 0 16px; padding: 0; display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 8px; }
.stepper > li { position: relative; padding: 12px; border: 1px solid var(--border-color); border-radius: var(--r-ctrl); background: var(--bg-card); min-width: 0; font-size: 13px; color: var(--text-muted); }
.stepper > li > b { display: flex; align-items: center; gap: 6px; color: var(--text-secondary); }
.stepper > li > b::before { content: ''; width: 10px; height: 10px; border-radius: 50%; border: 2px solid var(--border-color); flex: none; }
.stepper > li.done > b { color: var(--text-primary); }
.stepper > li.done > b::before { background: var(--success); border-color: var(--success); }
.stepper > li.now { border-color: var(--navy-accent); }
.stepper > li.now > b { color: var(--accent-ink); }
.stepper > li.now > b::before { border-color: var(--navy-accent); background: rgba(var(--navy-accent-rgb), .25); }
.stepper ul { margin: 8px 0 0; padding-left: 16px; color: var(--text-secondary); font-size: 12.5px; line-height: 1.5; }
.stepper .btn { margin-top: 8px; }
.terms { margin: 8px 0 12px; padding-left: 18px; color: var(--text-secondary); font-size: 13.5px; line-height: 1.6; }
@media (max-width: 900px) { .stepper { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 480px) { .stepper { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); } }

/* partner page */
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }
.partner-points { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; color: var(--text-secondary); font-size: 15px; }
.partner-points i { color: var(--accent-ink); width: 20px; }
.est-card h2 { margin: 0; font-size: 18px; color: var(--text-primary); }
.est-card input[type=number] { width: 100%; min-height: 46px; font-size: 16px; }
.est-out { display: flex; flex-direction: column; gap: 4px; margin: 4px 0 0; padding: 12px; border-radius: var(--r-ctrl); background: var(--bg-secondary); }
.est-out span { font-size: 13px; color: var(--text-secondary); }
.est-out b { font-size: 26px; color: var(--text-primary); }
.est-out small { font-size: 12px; color: var(--text-muted); line-height: 1.5; }
.apply-form .form-sec { margin-bottom: 14px; }
.apply-form input:not([type=checkbox]) { min-height: 46px; font-size: 16px; }
.apply-go { min-height: 48px; padding: 0 22px; }
.ob-card h1 { margin: 0 0 6px; font-size: 24px; color: var(--text-primary); }
.ob-card h2 { margin: 22px 0 10px; font-size: 18px; color: var(--text-primary); }
.ob-steps { list-style: none; margin: 14px 0; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.ob-steps li { display: flex; flex-direction: column; gap: 2px; padding: 10px; border: 1px solid var(--border-color); border-radius: var(--r-ctrl); font-size: 13px; color: var(--text-muted); }
.ob-steps li b { color: var(--text-secondary); }
.ob-steps li.done { border-color: color-mix(in srgb, var(--success) 45%, var(--border-color)); }
.ob-steps li.done b { color: var(--success); }
.ob-steps li.now { border-color: var(--navy-accent); }
.ob-steps li.now b { color: var(--accent-ink); }
.ob-docs { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 12px; }
.ob-doc { display: flex; flex-direction: column; gap: 10px; padding: 14px; border: 1px solid var(--border-color); border-radius: var(--r-ctrl); background: var(--bg-secondary); min-width: 0; }
.ob-doc-h { display: flex; align-items: center; justify-content: space-between; gap: 8px; color: var(--text-primary); }
.ok-msg { border: 1px solid color-mix(in srgb, var(--success) 40%, var(--border-color)); border-radius: var(--r-ctrl); }
.ok-msg i { color: var(--success); }
@media (max-width: 576px) { .ob-steps { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.txt-bad { color: var(--danger); }
.sc-avail { margin: 0; font-size: 12.5px; font-weight: 700; color: var(--success); }
.sc-avail.is-out { color: var(--danger); }
.sc-soon { margin: 4px 0 0; font-size: 12.5px; line-height: 1.6; color: var(--text-secondary); }
.sc-soon i { width: 16px; color: var(--text-secondary); }
.sc-soon b { color: var(--success); }
@media (max-width: 768px) {
    .tb-table.chip-table .tabulator-row .tabulator-cell .chip-row { flex-wrap: wrap; justify-content: flex-start; gap: 2px 8px; }
    .tb-table.chip-table .tabulator-row .tabulator-cell .chip-row .val { flex: 1 1 auto; text-align: right; overflow-wrap: anywhere; }
}
@media (max-width: 576px) { .v360-img:not(:has(img)) { width: 56px; height: 56px; font-size: 24px; } }
@media (max-width: 420px) { .site-city span { display: none; } .site-city { padding: 0 12px; } }
@media (max-width: 768px) {
    .tb-table.chip-table .tabulator-responsive-collapse .chip-row { flex-wrap: wrap; justify-content: flex-start; gap: 2px 8px; white-space: normal; min-width: 0; }
    .tb-table.chip-table .tabulator-responsive-collapse .chip-row .val { flex: 1 1 100%; overflow-wrap: anywhere; white-space: normal; }
    .tb-table.chip-table .tabulator-responsive-collapse .cell-stack { min-width: 0; }
}
.v360-soc .mini-bar-n { display: none; }

/* checkout */
.co-steps { list-style: none; margin: 0 0 16px; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; }
.co-steps li { display: flex; align-items: center; justify-content: center; gap: 8px; min-height: 42px; padding: 0 8px; border: 1px solid var(--border-color); border-radius: var(--r-ctrl); background: var(--bg-card); color: var(--text-muted); font-size: 13.5px; font-weight: 600; text-align: center; }
.co-steps li.now { border-color: var(--navy-accent); color: var(--accent-ink); }
.co-steps li.done { color: var(--success); }
.co-layout { display: grid; grid-template-columns: minmax(0, 1fr) 380px; gap: 20px; align-items: start; }
.co-main { min-width: 0; display: flex; flex-direction: column; gap: 14px; }
.co-pane h2, .bk-page h2, .my-page h2 { margin: 0 0 10px; font-size: 18px; color: var(--text-primary); }
.co-pane h2 i { color: var(--accent-ink); }
.co-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.co-actions .btn { min-height: 46px; }
.co-side { position: sticky; top: 80px; min-width: 0; }
.co-veh { display: flex; gap: 12px; align-items: flex-start; }
.co-veh img, .co-veh > i { flex: none; width: 96px; height: 72px; object-fit: cover; border-radius: var(--r-ctrl); background: var(--bg-secondary); display: flex; align-items: center; justify-content: center; color: var(--text-muted); font-size: 28px; }
.co-veh div { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.co-veh small { color: var(--text-secondary); font-size: 13px; }
.co-veh a { font-size: 13px; color: var(--accent-ink); }
.co-gate { list-style: none; margin: 0 0 10px; padding: 0; display: grid; gap: 6px; }
.co-gate li { display: flex; gap: 8px; align-items: center; font-size: 14.5px; color: var(--text-primary); }
.co-gate li.ok i { color: var(--success); } .co-gate li.no i { color: var(--danger); }
.co-addons { display: grid; gap: 10px; }
.co-addon { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 12px; align-items: center; padding: 12px; border: 1px solid var(--border-color); border-radius: var(--r-ctrl); background: var(--bg-card); cursor: pointer; }
.co-addon.is-prot { border-color: color-mix(in srgb, var(--navy-accent) 40%, var(--border-color)); }
.co-addon span { display: flex; flex-direction: column; min-width: 0; }
.co-addon small { color: var(--text-muted); font-size: 12.5px; }
.co-addon em { font-style: normal; font-weight: 700; color: var(--text-primary); text-align: right; display: flex; flex-direction: column; }
.co-addon em small { font-weight: 500; }
.co-addon .toggle { width: 44px; min-width: 44px; max-width: 44px; flex: 0 0 44px; }
.co-door { margin-top: 12px; }
.co-door span { display: flex; flex-direction: column; } .co-door small { color: var(--text-muted); font-weight: 500; }
.co-inline { display: flex; gap: 8px; } .co-inline input { flex: 1; min-width: 0; min-height: 46px; font-size: 16px; text-transform: uppercase; }
.co-disc { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 12px; }
.co-rules { list-style: none; margin: 8px 0 12px; padding: 0; display: grid; gap: 6px; font-size: 13.5px; color: var(--text-secondary); }
.co-rules i { color: var(--accent-ink); width: 16px; }
.co-accept span a { color: var(--accent-ink); }
.co-pay .btn { flex: 1 1 220px; justify-content: center; min-height: 50px; font-size: 16px; }
.co-bar { display: none; }
/* booking page */
.bk-head { display: flex; gap: 16px; align-items: center; margin-bottom: 14px; }
.bk-veh img, .bk-veh > i { width: 120px; height: 90px; object-fit: cover; border-radius: var(--r-ctrl); background: var(--bg-secondary); display: flex; align-items: center; justify-content: center; color: var(--text-muted); font-size: 34px; }
.bk-id h1 { margin: 6px 0 2px; font-size: 22px; color: var(--text-primary); }
.bk-id p { margin: 2px 0; color: var(--text-secondary); font-size: 14px; }
.bk-grid { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 16px; align-items: start; }
.bk-main, .bk-side { display: flex; flex-direction: column; gap: 14px; min-width: 0; }
.bk-code { text-align: center; }
.bk-code-n { display: inline-block; margin: 6px 0; padding: 10px 22px; font: 800 34px/1.1 ui-monospace, Menlo, Consolas, monospace; letter-spacing: 6px; color: var(--text-primary); background: var(--bg-secondary); border: 2px dashed var(--navy-accent); border-radius: var(--r-ctrl); cursor: pointer; }
.bk-code-n.copied { border-style: solid; }
.bk-docs { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.bk-docs li { display: flex; justify-content: space-between; gap: 8px; font-size: 13.5px; color: var(--text-secondary); }
.linkish { border: 0; background: none; padding: 0; color: var(--accent-ink); font: inherit; cursor: pointer; text-align: left; min-height: 32px; }
.bk-acts .btn { width: 100%; justify-content: center; margin-top: 8px; min-height: 46px; }
.bk-acts input { width: 100%; min-height: 46px; font-size: 16px; }
.bk-acts #bkChForm { margin-top: 12px; }
.cell-pills { display: flex; flex-wrap: wrap; gap: 4px; white-space: normal; } /* several status pills in one cell wrap instead of being cut */
.bk-acts .sw-drop .hf-seg { display: flex; width: 100%; } /* the change card is narrow: the two choices share the width */
.bk-acts .sw-drop .hf-seg button { flex: 1 1 0; min-width: 0; padding: 0 8px; white-space: nowrap; }
.warn-msg { border: 1px solid color-mix(in srgb, var(--warning) 50%, var(--border-color)); border-radius: var(--r-ctrl); }
.warn-msg i { color: var(--warning); }
/* my account */
.my-head h1 { margin: 0 0 10px; font-size: 24px; color: var(--text-primary); }
.my-page .ab-tabs a { text-decoration: none; }
.my-page .ab-tab em.st-ok { background: color-mix(in srgb, var(--success) 18%, transparent); color: var(--ok-ink); }
.my-page .ab-tab em.st-warn { background: color-mix(in srgb, var(--warning) 20%, transparent); }
.my-page .ab-tab em.st-bad { background: color-mix(in srgb, var(--danger) 15%, transparent); color: var(--bad-ink); }
.my-page .site-card { margin-bottom: 14px; }
.my-h2 { margin: 14px 0 8px !important; font-size: 15px !important; color: var(--text-secondary) !important; text-transform: uppercase; letter-spacing: .04em; }
.ride-list { display: grid; gap: 10px; }
.ride-card { display: grid; grid-template-columns: 84px minmax(0, 1fr) auto; gap: 12px; align-items: center; padding: 10px; background: var(--bg-card); border: 1px solid var(--border-color); border-radius: var(--r-panel); color: var(--text-primary); text-decoration: none; }
.ride-card:hover { border-color: var(--navy-accent); }
.ride-img img, .ride-img > i { width: 84px; height: 63px; object-fit: cover; border-radius: var(--r-ctrl); background: var(--bg-secondary); display: flex; align-items: center; justify-content: center; color: var(--text-muted); font-size: 24px; }
.ride-body { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.ride-body small { color: var(--text-secondary); font-size: 12.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ride-end { display: flex; flex-direction: column; align-items: flex-end; gap: 6px; }
.kyc-steps { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 12px; }
.kyc-step { display: flex; flex-direction: column; gap: 10px; padding: 14px; border: 1px solid var(--border-color); border-radius: var(--r-ctrl); background: var(--bg-secondary); min-width: 0; }
.kyc-step input:not([type=checkbox]):not([type=file]) { min-height: 46px; font-size: 16px; }
@media (max-width: 960px) { .co-layout, .bk-grid { grid-template-columns: minmax(0, 1fr); } .co-side { position: static; order: -1; } }
@media (max-width: 768px) {
    .co-steps li span { display: none; } .co-steps li { min-height: 40px; }
    .co-steps li.now span { display: inline; }
    .co-disc { grid-template-columns: minmax(0, 1fr); }
    .co-bar { display: flex; }
    .site-checkout .site-main { padding-bottom: calc(150px + env(safe-area-inset-bottom)); }
    .bk-head { flex-direction: row; } .bk-veh img, .bk-veh > i { width: 84px; height: 63px; }
    .ride-card { grid-template-columns: 64px minmax(0, 1fr); } .ride-img img, .ride-img > i { width: 64px; height: 48px; }
    .ride-end { grid-column: 2; flex-direction: row; justify-content: space-between; align-items: center; }
}
.bk-stepper { grid-template-columns: repeat(auto-fit, minmax(110px, 1fr)); }
.bv-h { margin: 16px 0 8px; font-size: 15px; color: var(--text-primary); }
.bv-h4 { margin: 12px 0 6px; font-size: 13px; color: var(--text-secondary); text-transform: uppercase; letter-spacing: .04em; }
.bv-totals { max-width: 360px; margin: 10px 0 0 auto; }
.bv-note { margin-bottom: 10px; }
.timeline li.tl-override b { color: var(--danger); }
@media (max-width: 576px) { .bk-stepper { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.json-box { margin: 0; padding: 12px; max-height: 70vh; overflow: auto; background: var(--bg-secondary); border: 1px solid var(--border-color); border-radius: var(--r-ctrl); font: 12.5px/1.5 ui-monospace, Menlo, Consolas, monospace; color: var(--text-primary); white-space: pre; }
.txt-ok { color: var(--success); }
.pv-doc { display: flex; flex-direction: column; gap: 6px; padding: 12px; border: 1px solid var(--border-color); border-radius: var(--r-ctrl); background: var(--bg-card); }
.pv-doc > b { letter-spacing: 2px; font-size: 13px; color: var(--text-primary); }
.pv-doc small { color: var(--text-muted); font-size: 12px; }

/* fleet planner */
.pl-phone { display: none; }
.pl-agenda { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.pl-ag { display: flex; flex-direction: column; gap: 2px; padding: 12px; border: 1px solid var(--border-color); border-left: 0; border-radius: var(--r-ctrl); background: var(--bg-card); font-size: 14px; }
.pl-ag small { color: var(--text-muted); }
.pl-ag .btn { align-self: flex-start; margin-top: 6px; }
.pl-free { padding: 8px 12px; font-size: 13px; color: var(--success); }
@media (max-width: 768px) { .fp-time { display: none; } .pl-phone { display: block; } }
.iv-totals { display: flex; flex-wrap: wrap; gap: 8px 18px; align-items: baseline; margin-top: 10px; padding: 10px 14px; border: 1px solid var(--border-color); border-radius: var(--r-ctrl); background: var(--bg-secondary); }
.iv-totals div { display: flex; gap: 6px; font-size: 13.5px; color: var(--text-secondary); }
.iv-totals b { color: var(--text-primary); font-variant-numeric: tabular-nums; }
.iv-totals small { flex-basis: 100%; color: var(--text-muted); font-size: 12px; }
.mono { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; letter-spacing: .02em; }
@media (max-width: 576px) {
    .db-info.py-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
    .py-stats .info-box { padding: 10px 12px; }
    .py-stats .info-box-icon { display: none; }
    .py-stats .info-box-text { white-space: normal; font-size: 11px; }
    .py-stats .info-box-number { font-size: 17px; }
    .doc-check.cv-kyc { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
}

/* inspection wizard (phone first) */
.in-wrap { max-width: 760px; margin: 0 auto; display: flex; flex-direction: column; gap: 12px; }
.in-head { padding: 14px; border: 1px solid var(--border-color); border-radius: var(--r-panel); background: var(--bg-card); }
.in-veh { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 10px; }
.in-veh b { font-size: 18px; color: var(--text-primary); }
.in-veh span { color: var(--text-secondary); font-size: 14px; }
.in-meta { margin-top: 4px; font-size: 14px; color: var(--text-secondary); display: flex; flex-wrap: wrap; align-items: center; gap: 4px; }
.in-resume { margin: 10px 0 0; font-size: 13px; color: var(--text-secondary); }
.in-progress { height: 4px; background: var(--border-light); border-radius: 2px; overflow: hidden; }
.in-progress i { display: block; height: 100%; width: 0; background: var(--navy-accent); transition: width .25s ease; }
.in-steps { list-style: none; margin: 0; padding: 0; display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; }
.in-steps::-webkit-scrollbar { display: none; }
.in-steps button { display: flex; align-items: center; gap: 6px; min-height: 36px; padding: 0 10px; border: 1px solid var(--border-color); border-radius: var(--r-ctrl); background: var(--bg-card); color: var(--text-secondary); font: inherit; font-size: 13px; white-space: nowrap; cursor: pointer; }
.in-steps em { font-style: normal; font-weight: 700; width: 20px; height: 20px; display: inline-flex; align-items: center; justify-content: center; border-radius: 50%; background: var(--bg-secondary); font-size: 11px; }
.in-steps .is-on { border-color: var(--navy-accent); color: var(--text-primary); font-weight: 700; }
.in-steps .is-on em, .in-steps .is-done em { background: var(--navy-accent); color: var(--on-accent); }
.in-pane { padding: 16px; border: 1px solid var(--border-color); border-radius: var(--r-panel); background: var(--bg-card); min-width: 0; }
.in-h { margin: 0 0 4px; font-size: 18px; color: var(--text-primary); }
.in-sub { margin: 0 0 12px; color: var(--text-secondary); font-size: 14px; }
.in-g { margin: 16px 0 6px; font-size: 12px; text-transform: uppercase; letter-spacing: .04em; color: var(--text-muted); }
.in-hint { display: block; margin-top: 6px; color: var(--text-muted); font-size: 13px; }
.in-nav { position: sticky; bottom: 0; z-index: 5; display: flex; justify-content: space-between; gap: 10px; padding: 10px 0; background: linear-gradient(transparent, var(--bg-primary) 30%); }
.in-nav .btn { min-height: 48px; flex: 1; font-size: 16px; }
.in-gate { list-style: none; margin: 0 0 12px; padding: 0; display: grid; gap: 6px; }
.in-gate li { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border: 1px solid var(--border-color); border-radius: var(--r-ctrl); font-size: 15px; }
.in-gate li small { margin-left: auto; color: var(--text-muted); }
.in-gate .is-ok i { color: var(--success); }
.in-gate .is-bad { border-color: color-mix(in srgb, var(--danger) 45%, var(--border-color)); }
.in-gate .is-bad i { color: var(--danger); }
.in-delta { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; margin-bottom: 12px; }
.in-delta > div { display: flex; flex-direction: column; padding: 10px 12px; border: 1px solid var(--border-color); border-radius: var(--r-ctrl); background: var(--bg-secondary); }
.in-delta span, .in-delta small { font-size: 12px; color: var(--text-muted); }
.in-delta b { font-size: 18px; color: var(--text-primary); }
.in-delta b i { font-style: normal; }
.in-cl { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 8px 12px; padding: 10px 0; border-bottom: 1px solid var(--border-light); font-size: 15px; }
.in-cl .in-note { grid-column: 1 / -1; }
.in-seg { display: inline-flex; border: 1px solid var(--border-color); border-radius: var(--r-ctrl); overflow: hidden; }
.in-seg button { min-width: 56px; min-height: 44px; padding: 0 10px; border: 0; border-left: 1px solid var(--border-color); background: var(--bg-card); color: var(--text-secondary); font: inherit; font-size: 14px; font-weight: 600; cursor: pointer; touch-action: manipulation; }
.in-seg button:first-child { border-left: 0; }
.in-seg .is-ok { background: color-mix(in srgb, var(--success) 18%, var(--bg-card)); color: var(--text-primary); }
.in-seg .is-issue { background: color-mix(in srgb, var(--danger) 18%, var(--bg-card)); color: var(--text-primary); }
.in-seg .is-na { background: var(--bg-secondary); color: var(--text-primary); }
.in-note, .in-code input, #inMarkNote { font-size: 16px; }
.in-ph { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.in-slot { position: relative; display: flex; flex-direction: column; gap: 4px; font-size: 13px; color: var(--text-secondary); min-width: 0; text-decoration: none; }
.in-shot { display: flex; align-items: center; justify-content: center; width: 100%; aspect-ratio: 4 / 3; padding: 0; border: 1px dashed var(--border-color); border-radius: var(--r-ctrl); background: var(--bg-secondary); color: var(--text-muted); font-size: 24px; overflow: hidden; cursor: pointer; }
.in-slot.req:not(.has) .in-shot { border-color: color-mix(in srgb, var(--navy-accent) 55%, var(--border-color)); }
.in-slot.has .in-shot { border-style: solid; }
.in-shot img { width: 100%; height: 100%; object-fit: cover; display: block; }
.in-was { position: absolute; right: 6px; top: 6px; width: 34%; aspect-ratio: 4 / 3; border: 2px solid var(--bg-card); border-radius: 3px; overflow: hidden; box-shadow: 0 1px 4px var(--shadow-color); }
.in-was img { width: 100%; height: 100%; object-fit: cover; display: block; }
.in-x { position: absolute; left: 6px; top: 6px; width: 32px; height: 32px; border: 0; border-radius: 50%; background: rgba(0, 0, 0, .55); color: #fff; cursor: pointer; }
.in-dmg { display: grid; grid-template-columns: minmax(0, 260px) minmax(0, 1fr); gap: 16px; align-items: start; }
.in-svg { width: 100%; height: auto; max-height: 420px; }
.in-zone { cursor: pointer; outline: none; }
.in-zone rect { fill: var(--bg-secondary); stroke: var(--border-color); stroke-width: 1.5; }
.in-zone text { font-size: 10px; text-anchor: middle; fill: var(--text-secondary); pointer-events: none; }
.in-zone:hover rect, .in-zone:focus rect { stroke: var(--navy-accent); }
.in-zone.is-marked rect { fill: color-mix(in srgb, var(--danger) 22%, var(--bg-card)); stroke: color-mix(in srgb, var(--danger) 60%, var(--border-color)); }
.in-zone.is-marked text { fill: var(--text-primary); font-weight: 700; }
.in-marks { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.in-marks li { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 2px 8px; padding: 10px 12px; border: 1px solid var(--border-color); border-radius: var(--r-ctrl); font-size: 14px; }
.in-marks li span { color: var(--text-secondary); grid-column: 1; }
.in-marks li .btn { grid-row: 1 / span 2; grid-column: 2; align-self: center; }
.in-marks .in-none { display: flex; gap: 8px; align-items: center; color: var(--success); }
.in-acc { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--border-light); font-size: 15px; }
.in-acc small { display: block; font-size: 12px; color: var(--text-muted); }
.in-acc.is-short span { color: var(--danger); }
.in-cnt { display: inline-flex; align-items: center; gap: 10px; }
.in-cnt .btn { min-width: 44px; min-height: 44px; padding: 0; }
.in-cnt b { min-width: 24px; text-align: center; font-size: 18px; }
.in-code { display: flex; gap: 8px; margin: 8px 0 16px; }
.in-code input { width: 48px; height: 56px; text-align: center; font-size: 24px; font-weight: 700; border: 1px solid var(--border-color); border-radius: var(--r-ctrl); background: var(--bg-card); color: var(--text-primary); }
.in-code input:focus { border-color: var(--navy-accent); outline: 2px solid rgba(var(--navy-accent-rgb), .25); }
.in-alt { display: flex; align-items: center; gap: 10px; font-size: 14px; margin-bottom: 10px; }
.in-alt .toggle { width: 44px; min-width: 44px; max-width: 44px; flex: 0 0 44px; }
.in-who { display: grid; gap: 10px; }
.in-who button { display: grid; grid-template-columns: 32px minmax(0, 1fr); gap: 2px 10px; align-items: center; text-align: left; padding: 14px; border: 1px solid var(--border-color); border-radius: var(--r-ctrl); background: var(--bg-card); color: var(--text-primary); font: inherit; cursor: pointer; }
.in-who i { grid-row: span 2; font-size: 22px; color: var(--text-muted); }
.in-who small { color: var(--text-muted); }
.in-who .is-on { border-color: var(--navy-accent); background: rgba(var(--navy-accent-rgb), .06); }
.in-who .is-on i { color: var(--accent-ink); }
.in-probs { list-style: none; margin: 0 0 12px; padding: 0; display: grid; gap: 6px; }
.in-probs li { padding: 10px 12px; border: 1px solid color-mix(in srgb, var(--danger) 40%, var(--border-color)); border-radius: var(--r-ctrl); font-size: 14px; }
.in-probs i { color: var(--danger); }
.in-submit { width: 100%; min-height: 52px; font-size: 17px; margin-top: 8px; }
.in-done { text-align: center; padding: 8px 0 12px; }
.in-done > i { font-size: 44px; color: var(--success); }
.in-done h3 { margin: 8px 0 2px; }
.in-done p { margin: 0; color: var(--text-secondary); }
.in-docs, .in-end { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.in-end { justify-content: flex-end; }
.in-ph.is-view small { font-size: 11px; }
@media (max-width: 768px) {
    .in-pane { padding: 14px 12px; }
    .in-nav { bottom: -40px; padding-bottom: 50px; margin: 0 -2px; }   /* main-content padding already clears the bottom bar (sticky respects it) */
    .in-ph { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .in-dmg { grid-template-columns: 1fr; }
    .in-svg { max-height: 340px; }
    .in-cl { grid-template-columns: 1fr; }
    .in-seg { width: 100%; }
    .in-seg button { flex: 1; }
    .in-code { justify-content: space-between; gap: 6px; }
    .in-code input { width: calc((100% - 30px) / 6); }
    .in-end .btn { flex: 1; }
}

/* tasks: table on desktop, task cards on the phone */
.tk-cards { display: none; }
.tk-type { display: inline-flex; align-items: center; gap: 6px; font-weight: 600; color: var(--text-primary); }
.tk-type i { color: var(--accent-ink); width: 16px; text-align: center; }
.tk-grp { margin: 14px 0 8px; font-size: 12px; text-transform: uppercase; letter-spacing: .04em; color: var(--text-muted); display: flex; align-items: center; gap: 6px; }
.tk-grp em { font-style: normal; font-weight: 700; color: var(--text-secondary); }
.tk-card { display: grid; grid-template-columns: 44px minmax(0, 1fr); gap: 10px 12px; padding: 14px; margin-bottom: 10px; border: 1px solid var(--border-color); border-radius: var(--r-panel); background: var(--bg-card); }
.tk-card.is-late { border-color: color-mix(in srgb, var(--danger) 55%, var(--border-color)); }
.tk-card.is-done { opacity: .7; }
.tk-ico { width: 44px; height: 44px; display: flex; align-items: center; justify-content: center; border-radius: var(--r-ctrl); background: var(--bg-secondary); color: var(--accent-ink); font-size: 18px; }
.tk-body { min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.tk-body p { margin: 0; font-size: 14px; color: var(--text-secondary); overflow-wrap: anywhere; }
.tk-top { display: flex; justify-content: space-between; gap: 8px; align-items: baseline; }
.tk-top b { font-size: 16px; color: var(--text-primary); }
.tk-when { font-size: 13px; font-weight: 700; color: var(--text-secondary); white-space: nowrap; }
.tk-card.is-late .tk-when { color: var(--danger); }
.tk-go { grid-column: 1 / -1; min-height: 48px; font-size: 16px; justify-content: center; }
.swal-lab { display: block; text-align: left; margin: 12px 0 -6px; font-size: 14px; font-weight: 600; }
@media (max-width: 768px) {
    .tk-desk, [data-pane="list"] .tb-bar { display: none !important; }
    .tk-cards { display: block; }
}

/* damage record */
.modal.dm-rec { max-width: 90vw; width: 90vw; }
.dm-tabs { margin-bottom: 12px; }
.dm-pairs { display: grid; gap: 14px; }
.dm-pair { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.dm-pair h5 { grid-column: 1 / -1; margin: 0; font-size: 12px; text-transform: uppercase; letter-spacing: .04em; color: var(--text-muted); }
.dm-pair figure { margin: 0; border: 1px solid var(--border-color); border-radius: var(--r-ctrl); overflow: hidden; background: var(--bg-secondary); }
.dm-pair img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; display: block; }
.dm-pair figcaption { padding: 6px 8px; font-size: 12px; color: var(--text-secondary); }
.dm-pair .is-none { display: flex; align-items: center; justify-content: center; aspect-ratio: 4 / 3; color: var(--text-muted); font-size: 13px; }
.dm-add { margin-top: 14px; display: grid; gap: 8px; }
.dm-add-row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.dm-add-row label { font-size: 13px; color: var(--text-secondary); }
.dm-live { padding: 12px; border: 1px solid var(--border-color); border-radius: var(--r-ctrl); background: var(--bg-secondary); font-size: 15px; }
.dm-live b { font-size: 18px; margin-left: 6px; }
.dm-acts { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 8px; margin-top: 16px; padding-top: 12px; border-top: 1px solid var(--border-light); }
@media (max-width: 768px) {
    .modal.dm-rec { width: 100vw; }
    .dm-pair { grid-template-columns: 1fr; }
    .dm-acts .btn { flex: 1; }
}

/* tickets: list + conversation */
.txt-warn { color: color-mix(in srgb, var(--warning) 70%, var(--text-primary)); }
.tb-stars i { font-style: normal; color: var(--border-color); }
.tk-split { display: grid; grid-template-columns: minmax(0, 1fr); gap: 16px; align-items: start; }
.tk-list { min-width: 0; }
.tabulator-row.is-current { box-shadow: inset 3px 0 0 var(--navy-accent); }
.tk-thread { display: flex; flex-direction: column; min-width: 0; max-height: calc(100vh - 150px); position: sticky; top: 12px; border: 1px solid var(--border-color); border-radius: var(--r-panel); background: var(--bg-card); overflow: hidden; }
.tt-head { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 8px; align-items: start; padding: 12px 14px; border-bottom: 1px solid var(--border-color); }
.tt-head h3 { margin: 0; font-size: 16px; color: var(--text-primary); overflow-wrap: anywhere; }
.tt-head p { margin: 4px 0 0; font-size: 13px; color: var(--text-secondary); display: flex; flex-wrap: wrap; gap: 4px; align-items: center; }
.tt-back { display: none; }
.tt-quick, .tt-acts { display: flex; flex-wrap: wrap; gap: 6px; padding: 8px 14px; border-bottom: 1px solid var(--border-light); }
.tt-acts { border-bottom: 0; border-top: 1px solid var(--border-light); }
.tt-msgs { list-style: none; margin: 0; padding: 14px; display: flex; flex-direction: column; gap: 10px; overflow-y: auto; flex: 1; min-height: 160px; }
.tt-msg { max-width: 86%; align-self: flex-start; padding: 10px 12px; border: 1px solid var(--border-color); border-radius: var(--r-ctrl); background: var(--bg-secondary); }
.tt-msg.is-me { align-self: flex-end; background: rgba(var(--navy-accent-rgb), .08); border-color: color-mix(in srgb, var(--navy-accent) 30%, var(--border-color)); }
.tt-msg.is-note { background: color-mix(in srgb, var(--warning) 12%, var(--bg-card)); border-style: dashed; }
.tt-msg div { display: flex; justify-content: space-between; gap: 10px; font-size: 12px; color: var(--text-muted); }
.tt-msg b { color: var(--text-secondary); }
.tt-msg p { margin: 4px 0 0; font-size: 14px; line-height: 1.5; color: var(--text-primary); white-space: pre-line; overflow-wrap: anywhere; }
.tt-files { list-style: none; margin: 6px 0 0; padding: 0; font-size: 13px; }
.tt-sys { align-self: center; font-size: 12px; color: var(--text-muted); text-align: center; }
.tt-comp { display: grid; gap: 8px; padding: 10px 14px; border-top: 1px solid var(--border-color); background: var(--bg-card); }
.tt-comp textarea { width: 100%; resize: vertical; min-height: 64px; font-size: 16px; }
.tt-row { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.tt-row .rs-drop { flex: 1 1 220px; min-width: 0; }
.tt-int { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; }
.tt-int .toggle { width: 44px; min-width: 44px; max-width: 44px; flex: 0 0 44px; }
.tt-closed, .tt-rate { padding: 12px 14px; margin: 0; border-top: 1px solid var(--border-light); color: var(--text-secondary); font-size: 14px; }
.tt-rate .btn { color: var(--warning); font-size: 18px; }
@media (min-width: 1200px) { .tk-split.has-thread { grid-template-columns: minmax(0, 1fr) 460px; } }
@media (max-width: 1199px) {
    .tk-thread:not([hidden]) { position: fixed; inset: 0; z-index: 1200; max-height: none; border-radius: 0; border: 0; }
    .tt-back { display: inline-flex; }
    .tt-x { display: none; }
    .tt-comp { padding-bottom: calc(10px + env(safe-area-inset-bottom, 0px)); }
}
.bk-ev { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 8px; margin: 10px 0; }
.bk-ev a { display: flex; flex-direction: column; gap: 2px; text-decoration: none; color: var(--text-secondary); font-size: 12px; }
.bk-ev img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border: 1px solid var(--border-color); border-radius: var(--r-ctrl); }
.bk-dmg h2 { display: flex; gap: 8px; align-items: center; }
.bk-rf li span small { display: block; color: var(--text-muted); font-size: 12px; }
.my-thread .my-msgs { max-height: 60vh; border: 1px solid var(--border-light); border-radius: var(--r-ctrl); margin: 10px 0; }
.my-thread .tt-comp { padding: 0; border: 0; }
.my-tk a { display: flex; flex-direction: column; text-decoration: none; color: var(--text-primary); min-width: 0; }
.my-tk small { color: var(--text-muted); font-size: 12px; }
.sr-only { position: absolute; top: 0; left: 0; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
.in-nav[hidden], .tk-thread[hidden], .in-swap[hidden] { display: none !important; }
a.btn, a.btn:hover { text-decoration: none; }

/* reports: chart above the table */
.rp-chart { position: relative; height: 240px; margin-bottom: 14px; padding: 10px 12px; border: 1px solid var(--border-color); border-radius: var(--r-ctrl); background: var(--bg-card); }
.rp-chart[hidden] { display: none; }
@media (max-width: 768px) { .rp-chart { padding: 8px; } }

/* maintenance: parts grid (stacked cards on phones), clipped complaint */
.cell-clip { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; white-space: normal; }
.wo-parts { display: grid; gap: 8px; margin-bottom: 10px; }
.wo-part { display: grid; grid-template-columns: minmax(0, 2.2fr) minmax(0, .8fr) minmax(0, 1fr) minmax(0, .9fr) 44px; gap: 8px; align-items: end; }
.wo-part .form-group { margin: 0; min-width: 0; }
.wo-part > .btn-icon { height: 44px; }
@media (max-width: 768px) {
    .wo-part { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); padding: 10px; border: 1px solid var(--border-color); border-radius: var(--r-ctrl); background: var(--bg-secondary); }
    .wo-part .form-group:first-child { grid-column: 1 / -1; }
    .wo-part > .btn-icon { grid-column: 1 / -1; justify-self: end; }
}
.ex-bill { display: block; max-width: 100%; max-height: 260px; margin: 10px 0; border: 1px solid var(--border-color); border-radius: var(--r-ctrl); object-fit: contain; background: var(--bg-secondary); }
.tk-soc2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; } .tk-soc2 .rs-pop-input { width: 100%; margin: 4px 0 8px; }

/* settlement statement: waterfall gross -> net */
.sv-fall { margin: 0; display: grid; gap: 0; }
.sv-fall div { display: flex; justify-content: space-between; gap: 12px; padding: 7px 0; border-bottom: 1px solid var(--border-color); font-size: 14px; }
.sv-fall dt { color: var(--text-secondary); font-weight: 500; } .sv-fall dd { margin: 0; font-variant-numeric: tabular-nums; color: var(--text-primary); }
.sv-fall .sv-net { border-bottom: 0; padding-top: 10px; font-size: 16px; } .sv-fall .sv-net dt, .sv-fall .sv-net dd { font-weight: 700; color: var(--text-primary); }
/* ride rating: 3 star rows (right-to-left radios so the hovered star lights the ones before it) */
.rv-row { border: 0; margin: 0 0 12px; padding: 0; display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.rv-row legend { float: left; display: flex; flex-direction: column; padding: 0; } .rv-row legend small { color: var(--text-muted); font-size: 12.5px; }
.rv-stars { display: inline-flex; flex-direction: row-reverse; gap: 2px; }
.rv-stars input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.rv-stars label { width: 44px; height: 44px; display: inline-flex; align-items: center; justify-content: center; font-size: 26px; color: var(--border-color); cursor: pointer; touch-action: manipulation; }
.rv-stars input:checked ~ label, .rv-stars label:hover, .rv-stars label:hover ~ label { color: var(--warning); }
.rv-stars input:focus-visible + label { outline: 2px solid var(--navy-accent); outline-offset: 2px; }
.rv-row[disabled] .rv-stars label { cursor: default; }
/* partner scorecard */
.pf-total { display: flex; align-items: baseline; gap: 8px; margin-bottom: 12px; } .pf-total b { font-size: 30px; color: var(--text-primary); } .pf-total span { color: var(--text-muted); font-size: 13px; }
.pf-row { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 170px); gap: 10px; align-items: center; padding: 7px 0; border-bottom: 1px solid var(--border-color); }
.pf-row small { display: block; color: var(--text-muted); font-size: 12px; }
.pf-chart { height: 220px; margin: 0; border: 0; padding: 0; }
@media (max-width: 480px) { .pf-row { grid-template-columns: minmax(0, 1fr); gap: 4px; } }
/* campaign builder */
.cm-steps { margin: 0 0 14px; grid-template-columns: repeat(3, minmax(0, 1fr)); } .cm-count { margin-top: 10px; padding: 10px 12px; border: 1px solid var(--border-color); border-radius: var(--r-ctrl); background: var(--bg-secondary); }
.cm-count small { display: block; color: var(--text-muted); font-size: 12px; margin-top: 2px; }
/* customer subscription meter + rewards wallet */
.my-meter-top { display: flex; justify-content: space-between; gap: 12px; align-items: flex-start; } .my-meter-top h2 { margin: 0; }
.my-km { margin: 14px 0; } .my-km-bar { height: 14px; border-radius: 14px; background: var(--bg-secondary); border: 1px solid var(--border-color); overflow: hidden; }
.my-km-bar i { display: block; height: 100%; background: var(--navy-accent); } .my-km-bar i.is-over { background: var(--danger); }
.my-km-n { margin-top: 6px; font-size: 15px; color: var(--text-secondary); } .my-km-n b { font-size: 20px; color: var(--text-primary); }
.my-wallet { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; } .my-wallet > div { display: flex; flex-direction: column; }
.my-pts { font-size: 36px; line-height: 1.1; color: var(--text-primary); }
.my-code { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin: 10px 0; } .my-code b { font-size: 22px; letter-spacing: 2px; padding: 8px 14px; border: 1px dashed var(--border-color); border-radius: var(--r-ctrl); }
@media (max-width: 480px) { .my-code .btn { flex: 1 1 100%; justify-content: center; min-height: 46px; } }
.my-km-bar i.w0 { width: 0%; }
.my-km-bar i.w5 { width: 5%; }
.my-km-bar i.w10 { width: 10%; }
.my-km-bar i.w15 { width: 15%; }
.my-km-bar i.w20 { width: 20%; }
.my-km-bar i.w25 { width: 25%; }
.my-km-bar i.w30 { width: 30%; }
.my-km-bar i.w35 { width: 35%; }
.my-km-bar i.w40 { width: 40%; }
.my-km-bar i.w45 { width: 45%; }
.my-km-bar i.w50 { width: 50%; }
.my-km-bar i.w55 { width: 55%; }
.my-km-bar i.w60 { width: 60%; }
.my-km-bar i.w65 { width: 65%; }
.my-km-bar i.w70 { width: 70%; }
.my-km-bar i.w75 { width: 75%; }
.my-km-bar i.w80 { width: 80%; }
.my-km-bar i.w85 { width: 85%; }
.my-km-bar i.w90 { width: 90%; }
.my-km-bar i.w95 { width: 95%; }
.my-km-bar i.w100 { width: 100%; }
/* storefront plans */
.plans-head h1 { margin: 0 0 6px; }
.plan-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 16px; margin: 16px 0 32px; }
.plan-card { display: flex; flex-direction: column; gap: 10px; min-width: 0; } .plan-card.is-rec { border-color: var(--navy-accent); }
.plan-card h2 { margin: 0; } .plan-price { margin: 0; } .plan-price b { font-size: 30px; color: var(--text-primary); } .plan-price small { display: block; color: var(--text-muted); font-size: 12.5px; }
.plan-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 7px; flex: 1; } .plan-list i { width: 18px; color: var(--accent-ink); }
.plan-card > .btn { justify-content: center; min-height: 46px; }
@media (max-width: 768px) { .plan-card.is-rec { order: -1; } }
.my-ledger li > span, .my-share .bk-docs li > span { display: flex; flex-direction: column; min-width: 0; } .my-ledger li > span small, .my-share .bk-docs li > span small { color: var(--text-muted); font-size: 12.5px; }
/* wallet + cashback */
.cb-tag { display: inline-flex; align-items: center; gap: 6px; width: fit-content; max-width: 100%; padding: 3px 10px; border-radius: var(--r-chip); font-size: 12.5px; font-weight: 600; line-height: 1.5; color: var(--success); background: color-mix(in srgb, var(--success) 12%, transparent); }
.cb-tag i { font-size: 11px; } .cb-tag small { font-weight: 500; color: var(--text-muted); }
.sc-card .cb-tag, .lv-car .cb-tag { margin: 6px 0 2px; } .veh-head .cb-tag { margin-top: 8px; }
.cb-line { display: flex; align-items: center; gap: 8px; margin: 10px 0 0; font-size: 13.5px; font-weight: 600; color: var(--success); }
.co-wallet { margin: 4px 0 12px; } .co-wallet small { margin-left: 4px; font-weight: 500; color: var(--text-muted); }
.wl-add { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 12px; margin-bottom: 12px; }
.wl-add .form-group { flex: 1 1 160px; min-width: 0; margin: 0; }
.wl-quick { display: flex; flex-wrap: wrap; gap: 8px; } .wl-quick .btn, .wl-add > .btn { min-height: 44px; }
.est-break { margin: 4px 0 8px; }
/* searchable list: "add new" row pinned under the results */
.sd-item.sd-add { position: sticky; bottom: 0; display: flex; align-items: center; gap: 8px; border-top: 1px solid var(--border-color); background: var(--bg-card); color: var(--accent-ink); font-weight: 600; }
/* logo removed: the name's first letter where a square mark is needed */
.brand-ini { display: inline-grid; place-items: center; flex: none; width: 40px; height: 40px; border-radius: var(--r-ctrl); background: var(--navy-accent); color: var(--on-accent); font-size: 18px; font-weight: 700; line-height: 1; }
.brand-ini.sb-logo { width: 30px; height: 30px; font-size: 14px; } .brand-ini.ab-logo { width: 52px; height: 52px; font-size: 22px; border: 0; }
.rs-overlay-card .brand-ini { width: 44px; height: 44px; font-size: 20px; }
.modal.modal-sm { max-width: 460px; }

/* Marketing › Home page: website colours (preview card reads the pickers) + section order */
.scp-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px 16px; }
.sc-pick { display: flex; align-items: center; gap: 8px; }
.sc-pick input[type=color] { flex: none; width: 44px; height: 40px; padding: 2px; border: 1px solid var(--input-border); border-radius: var(--r-ctrl); background: var(--input-bg); cursor: pointer; }
.sc-pick input:not([type=color]) { flex: 1; min-width: 0; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; }
.sc-demo { display: grid; justify-items: start; gap: 4px; margin: 16px 0 12px; padding: 20px; border: 1px solid var(--sc-line); border-radius: 12px; background: var(--sc-bg); color: var(--sc-ink); }
.sc-demo b { font-size: 20px; font-weight: 600; }
.sc-demo small { font-size: 14px; color: var(--sc-muted); }
.sc-demo-btn { display: inline-flex; align-items: center; gap: 8px; margin-top: 10px; padding: 8px 16px; border-radius: 6px; background: var(--sc-btn); color: var(--sc-btn-ink); font-size: 14px; }
.hs-list { list-style: none; margin: 0; padding: 0; border: 1px solid var(--border-color); border-radius: var(--r-panel); }
.hs-row { display: flex; align-items: center; gap: 10px; min-height: 52px; padding: 4px 8px 4px 14px; }
.hs-row + .hs-row { border-top: 1px solid var(--border-light); }
.hs-ic { width: 20px; text-align: center; color: var(--accent-ink); }
.hs-name { flex: 1; min-width: 0; font-weight: 500; }
.hs-row:has(.toggle:not(:checked)) :is(.hs-ic, .hs-name) { opacity: .5; }
.hs-row .toggle-row { margin: 0; }
.hs-mv { display: inline-grid; place-items: center; flex: none; width: 44px; height: 44px; border: 1px solid var(--border-color); border-radius: var(--r-ctrl); background: var(--bg-card); color: var(--text-primary); cursor: pointer; touch-action: manipulation; }
.hs-mv:hover:not(:disabled), .hs-mv:focus-visible { border-color: var(--navy-accent); color: var(--accent-ink); }
.hs-row:first-child [data-mv="-1"], .hs-row:last-child [data-mv="1"] { visibility: hidden; }
@media (max-width: 768px) { .scp-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } .hs-row { gap: 6px; padding-left: 10px; } }
@media (max-width: 480px) { .scp-grid { grid-template-columns: minmax(0, 1fr); } }

/* KYC bonus: storefront popup + My Rides › KYC line */
.lv-kyc-amt { display: inline-flex; align-items: center; gap: 8px; padding: 4px 12px; border: 1px solid var(--lv-line); border-radius: 9999px; font-size: 15px; font-weight: 600; color: var(--lv-char); }
.lv-kyc-amt i { color: var(--lv-btn); }
.lv-kyc .lv-sheet-box { width: min(480px, 100%); }
.lv-kyc .lv-sheet-go { margin-top: 16px; }
.lv-kyc-later { width: 100%; margin-top: 8px; }
.kyc-bonus { display: flex; align-items: flex-start; gap: 10px; margin: 0 0 16px; padding: 12px 16px; border: 1px dashed var(--border-color); border-radius: 12px; font-size: 15px; line-height: 1.45; }
.kyc-bonus i { margin-top: 3px; color: var(--accent-ink); }

/* ===== green storefront look (owner 2026-10-22): green buttons, forest bands + footer, white page ===== */
.site-topbar { background: var(--lv-forest); color: rgba(255, 255, 255, .86); font-size: 13px; }
.site-topbar .site-wrap { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 34px; }
.site-topbar i { margin-right: 6px; color: var(--lv-acc); }
.site-body .site-head { background: var(--lv-white); box-shadow: 0 1px 0 var(--lv-line); border-bottom: 0; }
.site-body .site-nav { flex: 1; }
.site-links { display: flex; align-items: center; gap: 2px; margin: 0 auto; }
.site-body .site-links a { font-size: 14px; padding: 0 10px; }
.site-body .site-links a i { display: none; }
.site-body .site-links a.on { color: var(--lv-gt); font-weight: 600; background: transparent; }
.site-body .site-links a:hover { color: var(--lv-gt); background: transparent; }
.site-body .site-nav a.lv-btn { min-height: 40px; padding: 0 16px; font-size: 14px; font-weight: 600; border-radius: 8px; }
.site-body .site-nav a.lv-btn-dark, .site-body .site-nav a.lv-btn-dark:hover { background: var(--lv-btn); color: var(--lv-btn-ink); }
.site-body .site-nav a.lv-btn-ghost { border: 1px solid var(--lv-line); }
.site-body .site-nav a.lv-btn-ghost:hover { border-color: var(--lv-btn); color: var(--lv-gt); background: transparent; }
.site-body .site-nav a.lv-btn i { display: none; }
.lv-btn-dark:hover { filter: brightness(.94); }
.lv-btn-ghost:hover { border-color: var(--lv-btn); color: var(--lv-gt); }
.lv-btn-glass { background: rgba(255, 255, 255, .08); border-color: rgba(255, 255, 255, .7); color: #fff; }
.lv-btn-glass:hover { background: rgba(255, 255, 255, .16); color: #fff; }
.lv-eyebrow, .site-home .lv-eyebrow { display: block; margin: 0 0 8px; padding: 0; border: 0; border-radius: 0; background: none; font-size: 13px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--lv-gt); }
@media (max-width: 1240px) { .site-links a[href="index.php#how"], .site-links a[href="blog.php"] { display: none !important; } }
@media (max-width: 1000px) { .site-links a[href="index.php"], .site-mybk { display: none !important; } }

/* hero: full-width slide, headline left, badges right, controls above the booking card */
.site-home .lv-top { padding: 0; }
.lv-top-in { position: relative; }
.site-home .lv-show { margin: 0; }
.site-home .lv-show-frame { aspect-ratio: auto; height: clamp(540px, 74vh, 680px); border: 0; border-radius: 0; background: var(--lv-forest); }
.site-home .hx-slide::after { content: ''; position: absolute; inset: 0; pointer-events: none; background: linear-gradient(90deg, rgba(3, 22, 15, .86) 0%, rgba(3, 22, 15, .6) 42%, rgba(3, 22, 15, .08) 78%), linear-gradient(0deg, rgba(3, 22, 15, .55), transparent 38%); }
.site-home .lv-cap { left: max(var(--site-gut, 16px), calc((100% - var(--site-max, 1200px)) / 2 + var(--site-gut, 16px))); top: 44%; bottom: auto; transform: translateY(-50%); z-index: 1; display: flex; flex-direction: column; align-items: flex-start; gap: 14px; max-width: min(780px, calc(100% - 2 * var(--site-gut, 16px))); padding: 0; border: 0; border-radius: 0; background: none; box-shadow: none; color: #fff; }
.site-home .lv-cap small { font-size: 15px; font-weight: 600; line-height: 1.4; color: var(--lv-acc); }
.site-home .lv-cap strong { font-size: clamp(36px, 5.4vw, 64px); font-weight: 700; line-height: 1.04; letter-spacing: -1.5px; color: #fff; }
.site-home .lv-cap strong span { display: block; color: var(--lv-acc); }
.site-home .lv-cap em { margin: 0; font-size: 17px; color: rgba(255, 255, 255, .86); }
.site-home .lv-cap em b { color: #fff; }
.lv-cap-btns { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 8px; }
.lv-badges { position: absolute; right: max(var(--site-gut, 16px), calc((100% - var(--site-max, 1200px)) / 2 + var(--site-gut, 16px))); top: 44%; transform: translateY(-50%); z-index: 1; display: flex; flex-direction: column; gap: 4px; margin: 0; padding: 8px; list-style: none; border: 1px solid rgba(255, 255, 255, .14); border-radius: 16px; background: rgba(3, 22, 15, .55); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); }
.lv-badges li { display: flex; align-items: center; gap: 12px; padding: 8px 14px 8px 8px; color: #fff; font-size: 14px; font-weight: 600; }
.lv-badges li i { display: grid; place-items: center; width: 34px; height: 34px; border: 1.5px solid var(--lv-acc); border-radius: 9999px; color: var(--lv-acc); font-size: 13px; }
.site-home .lv-show-ctrl { position: absolute; left: max(var(--site-gut, 16px), calc((100% - var(--site-max, 1200px)) / 2 + var(--site-gut, 16px))); right: max(var(--site-gut, 16px), calc((100% - var(--site-max, 1200px)) / 2 + var(--site-gut, 16px))); bottom: 108px; z-index: 2; margin: 0; }
.site-home .lv-show .hx-dots button::before { background: rgba(255, 255, 255, .45); }
.site-home .lv-show .hx-dots button[aria-current]::before { background: var(--lv-acc); }
.site-home .lv-show-ctrl .lv-pill { background: rgba(255, 255, 255, .14); color: #fff; }
.site-home .lv-show-ctrl .lv-pill:hover { background: rgba(255, 255, 255, .26); }

/* booking card over the slide bottom */
.site-home .lv-hero { padding: 0; }
.site-home .lv-hero::before { display: none; }
.site-home .lv-hero-in { display: block; text-align: left; }
.site-home .lv-book { position: relative; z-index: 3; max-width: none; margin-top: -84px; display: grid; grid-template-columns: 230px minmax(0, 1fr); grid-template-areas: "t top" "t grid" "t err"; gap: 14px 28px; align-items: start; padding: 24px; border-radius: 16px; background: var(--lv-white); box-shadow: 0 20px 44px rgba(3, 22, 15, .14); }
.lv-book-title { grid-area: t; align-self: center; }
.site-home .lv-book-top { grid-area: top; }
.site-home .lv-book-grid { grid-area: grid; }
.site-home .lv-book .form-err { grid-area: err; margin: 0; }
.lv-book-title h1 { margin: 0; font-size: 24px; font-weight: 700; line-height: 1.15; letter-spacing: -.4px; }
.lv-book-title p { margin: 8px 0 0; font-size: 14px; line-height: 1.45; color: var(--lv-muted); }
.site-home .lv-chips button.is-on { border-color: var(--lv-btn); background: var(--lv-mint); color: var(--lv-gt); }
.site-home .lv-book :is(input:focus, .sd-wrap.open .sd-trigger, .sd-trigger:focus-visible) { border-color: var(--lv-btn); box-shadow: 0 0 0 3px color-mix(in srgb, var(--lv-btn) 22%, transparent); }
.site-home .lv-book label i { color: var(--lv-gt); }
.site-home .lv-stats { gap: 16px; margin: 24px 0 0; padding: 0; border: 0; }
.site-home .lv-stats div { flex-direction: column; padding: 16px 18px; border-radius: 12px; background: var(--lv-mint); }
.site-home .lv-stats dd { font-size: clamp(22px, 2.4vw, 30px); font-weight: 700; letter-spacing: -.6px; color: var(--lv-gt); }
.site-home .lv-stats dt { margin-top: 4px; font-size: 14px; }

/* sections */
:is(.site-home, .site-rent, .site-partner) .lv-sec { padding-top: 88px; }
:is(.site-home, .site-rent, .site-partner) .lv-sec:last-of-type { padding-bottom: 88px; }
:is(.site-home, .site-rent, .site-partner) .lv-sec h2 { font-size: clamp(26px, 3.2vw, 38px); font-weight: 700; letter-spacing: -.8px; line-height: 1.12; }
:is(.site-home, .site-rent, .site-partner) .lv-head { margin-bottom: 28px; }
:is(.site-home, .site-rent, .site-partner) .lv-head .lv-lead { margin-top: 8px; font-size: 16px; }
:is(.site-home, .site-rent, .site-partner) .lv-head > .lv-btn-ghost { border-color: transparent; color: var(--lv-gt); font-weight: 600; padding: 0 4px; }
.site-home .lv-live { background: var(--lv-forest); border: 0; }
.site-home .lv-live-tag { border: 0; background: var(--lv-btn); color: var(--lv-btn-ink); }
.site-home .lv-live-item { color: rgba(255, 255, 255, .88); }
.site-home .lv-live-item i, .site-home .lv-live-item small { color: var(--lv-acc); }
.site-home .lv-live-pause { background: rgba(255, 255, 255, .12); color: #fff; }
.site-home .lv-live.is-foot { margin-top: 88px; border: 0; }
.site-home .lv-top + .lv-live, .site-home .lv-hero + .lv-live { margin-top: 28px; }

:is(.site-home, .site-partner) .lv-why { grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 16px; }
:is(.site-home, .site-partner) .lv-why li { gap: 6px; padding: 22px 18px; border-radius: 14px; background: var(--lv-white); transition: border-color .2s, box-shadow .2s; }
:is(.site-home, .site-partner) .lv-why li:hover { border-color: color-mix(in srgb, var(--lv-btn) 45%, transparent); box-shadow: 0 10px 24px rgba(3, 22, 15, .06); }
:is(.site-home, .site-partner) .lv-why i { display: grid; place-items: center; width: 48px; height: 48px; margin-bottom: 8px; border-radius: 12px; background: var(--lv-mint); color: var(--lv-gt); font-size: 20px; }
:is(.site-home, .site-partner) .lv-why b { font-size: 16px; }
:is(.site-home, .site-partner) .lv-why span { font-size: 14px; line-height: 1.45; color: var(--lv-muted); }

.site-home .lv-tabs { margin-bottom: 20px; }
.site-home .lv-tabs button { background: var(--lv-white); }
.site-home .lv-tabs button.on { border-color: var(--lv-btn); background: var(--lv-btn); color: var(--lv-btn-ink); }
.site-home .lv-veh .lv-rail-track { grid-auto-columns: calc((100% - 72px) / 4); gap: 24px; }
.site-home .lv-veh .lv-rail-dots { visibility: hidden; }
.lv-rail.is-fit .lv-rail-ctrl { display: none; }
.site-home .lv-car { border-radius: 14px; background: var(--lv-white); transition: border-color .2s, box-shadow .2s; }
.site-home .lv-car:hover { border-color: color-mix(in srgb, var(--lv-btn) 45%, transparent); box-shadow: 0 12px 28px rgba(3, 22, 15, .08); }
.site-home .lv-car-img { background: var(--lv-mint); }
.site-home .lv-car-body { gap: 4px; padding: 16px 18px 18px; }
.site-home .lv-car-cat { display: flex; align-items: center; gap: 8px; margin: 0 0 4px; font-size: 12px; letter-spacing: .04em; text-transform: uppercase; color: var(--lv-muted); }
.site-home .lv-car .lv-tools { gap: 6px; }
.site-home .lv-car .lv-tool { width: 36px; height: 36px; border-color: transparent; font-size: 14px; box-shadow: 0 2px 8px rgba(0, 0, 0, .14); }
.lv-pt { padding: 2px 8px; border-radius: 6px; background: #374151; color: #ffffff; font-size: 11px; font-weight: 700; letter-spacing: .04em; }
.lv-pt.is-ev { background: var(--lv-btn); color: var(--lv-btn-ink); }
.site-home .lv-car h3 { font-size: 18px; font-weight: 500; line-height: 1.3; }
.site-home .lv-car h3 a { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.site-home .lv-car h3 b { font-weight: 700; }
.lv-car-var { min-height: 20px; margin: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 14px; line-height: 20px; color: var(--lv-muted); }
.lv-car-rate { margin: 0; font-size: 13px; color: var(--lv-muted); }
.lv-car-rate i { color: #f59e0b; }
.lv-car-rate b { color: var(--lv-char); }
.site-home .lv-car-tag { display: none; }
/* specs, price + buttons pinned to the card bottom so every card lines up */
.lv-car-end { display: grid; gap: 14px; margin-top: auto; padding-top: 10px; }
.site-home .lv-car-spec { gap: 6px; margin: 0; padding: 12px 0; }
.site-home .lv-car-spec dt { font-size: 12px; }
.site-home .lv-car-spec dd { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 14px; }
.site-home .lv-car-price { display: grid; gap: 2px; }
.site-home .lv-car-price span { font-size: 14px; color: var(--lv-muted); }
.site-home .lv-car-price strong { font-size: 22px; font-weight: 700; letter-spacing: -.4px; color: var(--lv-gt); }
.site-home .lv-car-price small { font-size: 12.5px; }
.lv-car-btns { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.lv-car-btns .lv-btn { min-height: 42px; padding: 0 8px; font-size: 14px; font-weight: 600; border-radius: 8px; }
.lv-car-btns .lv-btn-ghost { border-color: var(--lv-line); }

.site-home #offers .lv-rail-track { grid-auto-columns: calc((100% - 72px) / 4); gap: 24px; }
.site-home .lv-offer { border-radius: 14px; background: var(--lv-white); }
.site-home .lv-offer img { aspect-ratio: 16 / 10; }
.site-home .lv-offer-badge { color: var(--lv-gt); }

.site-home .lv-band { margin-top: 88px; padding: 72px 0; background: var(--lv-forest); color: #fff; }
.site-home .lv-band + .lv-sec { padding-top: 88px; }
.site-home .lv-band h2 { color: #fff; }
.site-home .lv-band .lv-lead { color: rgba(255, 255, 255, .78); }
.site-home .lv-band .lv-way { border-color: rgba(255, 255, 255, .14); border-radius: 16px; background: rgba(255, 255, 255, .05); }
.site-home .lv-band .lv-way.is-dark { border-color: color-mix(in srgb, var(--lv-btn) 60%, transparent); background: color-mix(in srgb, var(--lv-btn) 18%, transparent); }
.site-home .lv-band .lv-way :is(h3, .lv-way-price strong), .site-home .lv-band .lv-way.is-dark :is(h3, .lv-way-price strong) { color: #fff; }
.site-home .lv-band .lv-way :is(p, li, small) { color: rgba(255, 255, 255, .8); }
.site-home .lv-band .lv-car-cat, .site-home .lv-band .lv-way-pts i { color: var(--lv-acc); }
.site-home .lv-band .lv-btn-ghost { border-color: rgba(255, 255, 255, .6); color: #fff; }
.site-home .lv-band .lv-btn-ghost:hover { background: rgba(255, 255, 255, .1); }
.site-home .lv-band .lv-btn-light { background: var(--lv-btn); color: var(--lv-btn-ink); }

.lv-stepbox { display: grid; grid-template-columns: 240px minmax(0, 1fr) auto; align-items: center; gap: 28px; padding: 32px; border-radius: 18px; background: var(--lv-forest); color: #fff; }
.lv-stepbox-head h2 { margin: 0; color: #fff !important; font-size: clamp(22px, 2.4vw, 28px) !important; }
.lv-stepbox-head p { margin: 8px 0 0; font-size: 14px; color: rgba(255, 255, 255, .75); }
:is(.site-home, .site-rent, .site-partner) .lv-stepbox .lv-steps { border: 0; border-radius: 0; }
:is(.site-home, .site-rent, .site-partner) .lv-stepbox .lv-steps li { gap: 6px; padding: 0 18px; }
:is(.site-home, .site-rent, .site-partner) .lv-stepbox .lv-steps li + li { border-left: 1px dashed rgba(255, 255, 255, .2); }
:is(.site-home, .site-rent, .site-partner) .lv-stepbox .lv-steps li::before { display: none; }
:is(.site-home, .site-rent, .site-partner) .lv-stepbox .lv-steps i { display: grid; place-items: center; width: 44px; height: 44px; margin-bottom: 6px; border: 1.5px solid var(--lv-acc); border-radius: 9999px; color: var(--lv-acc); font-size: 16px; }
:is(.site-home, .site-rent, .site-partner) .lv-stepbox .lv-steps b { font-size: 15px; color: #fff; }
:is(.site-home, .site-rent, .site-partner) .lv-stepbox .lv-steps span { font-size: 13px; line-height: 1.45; color: rgba(255, 255, 255, .72); }

.site-home .lv-vid-frame { border-radius: 14px; }
.site-home .lv-vid blockquote { font-size: 15px; }
.site-home .lv-co2band .lv-carbon { border: 0; border-radius: 18px; color: #fff; background: linear-gradient(90deg, rgba(3, 22, 15, .94) 0%, rgba(3, 22, 15, .78) 55%, rgba(3, 22, 15, .45) 100%), url('uploads/site/feat-park.webp') center / cover no-repeat, var(--lv-forest); }
.site-home .lv-carbon h2, .site-home .lv-co2 dd { color: #fff; }
.site-home .lv-carbon .lv-lead, .site-home .lv-co2 dt { color: rgba(255, 255, 255, .78); }
.site-home .lv-carbon .lv-car-cat, .site-home .lv-carbon .lv-car-cat i { color: var(--lv-acc); }
.site-home .lv-co2 .is-main { border-bottom-color: rgba(255, 255, 255, .18); }
.site-home .lv-co2 .is-main dd { color: var(--lv-acc); }

:is(.site-home, .site-rent, .site-partner) .lv-rev { padding: 22px; border-radius: 14px; background: var(--lv-white); }
:is(.site-home, .site-rent, .site-partner) .lv-rev blockquote { font-size: 15px; line-height: 1.5; }
:is(.site-home, .site-rent, .site-partner) .lv-stars i { color: #f59e0b; }
:is(.site-home, .site-rent, .site-partner) .lv-gsum b { font-size: 30px; }
.site-home .lv-post { border-radius: 14px; background: var(--lv-white); }
.site-home .lv-post small { padding: 0 20px; color: var(--lv-gt); font-weight: 600; }

.site-home .lv-partner-full { gap: 0; padding: 0; overflow: hidden; border: 0; border-radius: 18px; }
.site-home .lv-pt-main { padding: 44px; color: #fff; background: linear-gradient(90deg, rgba(3, 22, 15, .95), rgba(3, 22, 15, .78)), url('uploads/site/hero-ola-gig.webp') center / cover no-repeat, var(--lv-forest); }
.site-home .lv-pt-main h2 { color: #fff; }
.site-home .lv-pt-main .lv-lead, .site-home .lv-pt-points li { color: rgba(255, 255, 255, .84); }
.site-home .lv-pt-main .lv-car-cat, .site-home .lv-pt-points i { color: var(--lv-acc); }
.site-home .lv-pt-main .lv-btn-ghost, .site-home .lv-pt-vid { border-color: rgba(255, 255, 255, .6); color: #fff; }
.site-home .lv-partner .lv-pt-side { justify-content: center; align-self: stretch; padding: 44px; background: var(--lv-mint); }
.site-home .lv-pt-side img { display: none; }
.site-home .lv-pt-figs dd { color: var(--lv-gt); }
.lv-pt-side-t { margin: 0; font-size: clamp(20px, 2.2vw, 26px); font-weight: 700; line-height: 1.2; letter-spacing: -.4px; color: var(--lv-char); }
.site-home .lv-pt-figs div { padding: 16px; border: 0; border-radius: 12px; background: var(--lv-white); }
.site-home .lv-post:not(:has(img)) small { padding-top: 20px; }
.site-topbar .site-wrap > span { white-space: nowrap; }

.site-body .site-foot { width: 100%; max-width: none; margin: 0; padding: 56px 0 calc(24px + env(safe-area-inset-bottom)); border: 0; border-radius: 0; background: var(--lv-forest); color: rgba(255, 255, 255, .8); }
.site-body .site-foot .site-wrap { grid-template-columns: 2fr 1fr 1fr 1fr; padding: 0 16px; }
.site-body .site-foot h4 { color: #fff; font-size: 15px; font-weight: 700; }
.site-body .site-foot :is(p, .site-addr) { color: rgba(255, 255, 255, .8); }
.site-body .site-foot a { color: rgba(255, 255, 255, .82); }
.site-body .site-foot a i { color: var(--lv-acc); }
.site-body .site-foot a:hover { color: var(--lv-acc); }
.site-body .site-foot .site-copy { border-top-color: rgba(255, 255, 255, .16); color: rgba(255, 255, 255, .65); }
.site-body .site-foot .site-copy a { color: rgba(255, 255, 255, .82); min-height: 0; }
.site-body .site-foot .social-row a { border-color: rgba(255, 255, 255, .35); color: #fff; }
.site-body .site-foot .social-row a:hover { border-color: var(--lv-acc); background: rgba(255, 255, 255, .08); color: var(--lv-acc); }
.site-pay { grid-column: 1 / -1; display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.site-pay span { display: inline-grid; place-items: center; min-width: 52px; height: 34px; padding: 0 10px; border-radius: 6px; background: rgba(255, 255, 255, .1); color: #fff; font-size: 22px; }
.site-pay .is-txt { font-size: 12px; font-weight: 700; letter-spacing: .04em; }

@media (max-width: 1280px) { .site-home .lv-veh .lv-rail-track { grid-auto-columns: calc((100% - 48px) / 3); } }
@media (max-width: 1100px) {
    :is(.site-home, .site-partner) .lv-why { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .site-home #offers .lv-rail-track { grid-auto-columns: calc((100% - 48px) / 3); }
    .lv-stepbox { grid-template-columns: minmax(0, 1fr); }
    .lv-stepbox > .lv-btn { justify-self: start; }
    .lv-badges { display: none; }
}
@media (max-width: 900px) {
    .site-body .site-foot .site-wrap { grid-template-columns: 1fr 1fr; padding: 0 16px; }
    .site-body .site-foot { padding-top: 40px; }
    .site-body .site-foot .site-wrap > div:first-child { grid-column: 1 / -1; }
    .site-home .lv-book { grid-template-columns: minmax(0, 1fr); grid-template-areas: "t" "top" "grid" "err"; }
    .site-home .lv-partner-full { grid-template-columns: minmax(0, 1fr); }
    .site-home .lv-veh .lv-rail-track { grid-auto-columns: calc((100% - 24px) / 2); }
}
@media (max-width: 768px) {
    .site-home .lv-show-frame { height: 600px; }
    .site-home .hx-slide::after { background: linear-gradient(0deg, rgba(3, 22, 15, .92) 12%, rgba(3, 22, 15, .5) 55%, rgba(3, 22, 15, .2)); }
    .site-home .lv-cap { top: auto; bottom: 150px; transform: none; gap: 10px; }
    .site-home .lv-cap strong { font-size: 36px; letter-spacing: -1px; }
    .site-home .lv-cap em { font-size: 15px; }
    .lv-cap-btns { width: 100%; }
    .lv-cap-btns .lv-btn { flex: 1 1 100%; }
    .site-home .lv-show-ctrl { bottom: 86px; }
    .site-home .lv-book { margin-top: -64px; padding: 18px; gap: 12px; }
    .lv-book-title h1 { font-size: 21px; }
    .site-home .lv-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
    :is(.site-home, .site-rent, .site-partner) .lv-sec { padding-top: 56px; }
    :is(.site-home, .site-rent, .site-partner) .lv-sec:last-of-type { padding-bottom: 56px; }
    .site-home .lv-band { margin-top: 56px; padding: 48px 0; }
    .site-home .lv-band + .lv-sec { padding-top: 56px; }
    .site-home .lv-live.is-foot { margin-top: 56px; }
    :is(.site-home, .site-partner) .lv-why { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
    :is(.site-home, .site-partner) .lv-why li { padding: 16px 14px; }
    .site-home .lv-veh .lv-rail-track { grid-auto-columns: 78%; gap: 12px; }
    .site-home .lv-car .lv-tool { width: 40px; height: 40px; }
    .site-home #offers .lv-rail-track { grid-auto-columns: 82%; gap: 12px; }
    .lv-offer-top { padding: 16px; }
    .lv-offer-top strong { font-size: 20px; }
    .lv-offer-main { padding: 16px; }
    .lv-offer-code button, .lv-offer-more { min-height: 44px; }
    .lv-stepbox { padding: 24px 18px; gap: 20px; }
    :is(.site-home, .site-rent, .site-partner) .lv-stepbox .lv-steps { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px 0; }
    :is(.site-home, .site-rent, .site-partner) .lv-stepbox .lv-steps li { padding: 0 12px; }
    :is(.site-home, .site-rent, .site-partner) .lv-stepbox .lv-steps li:nth-child(3) { border-left: 0; }
    :is(.site-home, .site-rent, .site-partner) .lv-stepbox .lv-steps li + li { border-top: 0; }
    .site-topbar .site-hide-m { display: none; }
    .lv-stepbox > .lv-btn { width: 100%; }
    .site-home .lv-pt-main, .site-home .lv-partner .lv-pt-side { padding: 28px 20px; }
}
@media (max-width: 420px) { :is(.site-home, .site-partner) .lv-why { grid-template-columns: minmax(0, 1fr); } .site-body .site-foot .site-wrap { grid-template-columns: minmax(0, 1fr); } }

/* why ride: 3 x 2 cards, icon tile left of the title + text */
:is(.site-home, .site-partner) .lv-why { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
:is(.site-home, .site-partner) .lv-why li { display: grid; grid-template-columns: 48px minmax(0, 1fr); grid-template-rows: auto 1fr; align-content: start; gap: 6px 16px; padding: 24px; }
:is(.site-home, .site-partner) .lv-why i { grid-row: 1 / 3; margin: 0; }
:is(.site-home, .site-partner) .lv-why b { padding-top: 2px; font-size: 17px; line-height: 1.3; }
:is(.site-home, .site-partner) .lv-why span { font-size: 14.5px; line-height: 1.55; }

/* price cards (home plans + plans page): raised top (tinted head, tagline, button) over the included list */
.lv-plans { padding: 56px 0 72px; background: color-mix(in srgb, var(--lv-char) 4%, var(--lv-cream)); }
.site-home .lv-plans { margin-top: 88px; padding: 72px 0; }
body.dark-mode.site-body .lv-plans { background: var(--lv-cream); }
.lv-plans-head { max-width: 680px; margin: 0 auto 40px; text-align: center; }
.lv-plans-head :is(h1, h2) { margin: 0 auto; font-size: clamp(28px, 3.6vw, 42px); font-weight: 700; line-height: 1.1; letter-spacing: -1px; }
.lv-plans-head .lv-lead { max-width: 620px; margin: 12px auto 0; font-size: 17px; line-height: 1.5; color: var(--lv-muted); }
/* rows shared across the cards (subgrid): head, tagline, button and list start at the same height in every card */
.pl-grid { --pl-gap: 24px; display: grid; grid-template-columns: repeat(var(--pl-cols, 3), minmax(0, 380px)); justify-content: center; column-gap: var(--pl-gap); }
.pl-card { display: grid; grid-row: span 4; grid-template-rows: subgrid; min-width: 0; margin-bottom: var(--pl-gap); border: 1px solid transparent; border-radius: 28px; background: var(--lv-white); box-shadow: 0 28px 48px -32px rgba(0, 0, 0, .28); scroll-margin-top: 96px; }
.pl-top { display: grid; grid-row: span 3; grid-template-rows: subgrid; padding: 12px; border-radius: 28px; background: var(--lv-white); box-shadow: 0 12px 24px -14px rgba(0, 0, 0, .2), 0 0 0 1px rgba(0, 0, 0, .04); }
.pl-head { display: flex; flex-direction: column; min-height: 156px; padding: 16px 18px 18px; border-radius: 20px; background: color-mix(in srgb, var(--lv-char) 5%, var(--lv-white)); }
.pl-card.is-rec .pl-head { background: linear-gradient(135deg, color-mix(in srgb, var(--lv-btn) 24%, var(--lv-white)), color-mix(in srgb, var(--lv-btn) 6%, var(--lv-white))); }
.pl-pills { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: auto; }
.pl-pill { display: inline-flex; align-items: center; gap: 6px; min-height: 30px; margin: 0; padding: 0 14px; border-radius: 9999px; background: var(--lv-white); font-size: 12.5px; font-weight: 600; line-height: 1; letter-spacing: .04em; text-transform: uppercase; color: var(--lv-char); }
.pl-pill.is-rec { letter-spacing: 0; text-transform: none; color: var(--lv-gt); }
.pl-pill.is-rec i { font-size: 10px; }
.pl-price { display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px; margin: 28px 0 0; color: var(--lv-char); }
.pl-price strong { font-size: 40px; font-weight: 700; line-height: 1; letter-spacing: -1.5px; font-variant-numeric: tabular-nums; }
.pl-price span { font-size: 17px; font-weight: 500; }
.pl-note { margin: 6px 0 0; font-size: 13px; color: var(--lv-muted); }
.pl-sub { margin: 0; padding: 16px 10px; font-size: 15px; line-height: 1.45; color: var(--lv-char); }
.pl-btn { display: flex; align-items: center; justify-content: center; gap: 8px; min-height: 52px; margin-top: auto; padding: 0 20px; border-radius: 9999px; background: linear-gradient(180deg, rgba(255, 255, 255, .16), rgba(255, 255, 255, 0) 55%), var(--lv-char); color: var(--lv-cream); font-size: 15px; font-weight: 600; text-decoration: none; box-shadow: 0 10px 18px -10px rgba(0, 0, 0, .55), inset 0 1px 0 rgba(255, 255, 255, .18); transition: transform .15s, box-shadow .15s; }
.pl-btn:hover { color: var(--lv-cream); transform: translateY(-1px); box-shadow: 0 14px 22px -10px rgba(0, 0, 0, .55), inset 0 1px 0 rgba(255, 255, 255, .18); }
.pl-btn:focus-visible { outline: 2px solid var(--lv-btn); outline-offset: 3px; }
.pl-btn i { font-size: 12px; }
.pl-feat { list-style: none; display: grid; gap: 14px; margin: 0; padding: 26px 24px 32px; }
.pl-feat li { display: flex; gap: 12px; font-size: 15px; line-height: 1.4; color: var(--lv-char); }
.pl-feat i { flex: 0 0 auto; margin-top: 4px; font-size: 12px; color: var(--lv-c40); }
body.dark-mode.site-body .pl-card { border-color: var(--lv-line); }
body.dark-mode.site-body .pl-top { box-shadow: 0 0 0 1px var(--lv-line); }
@media (prefers-reduced-motion: reduce) { .pl-btn { transition: none; } .pl-btn:hover { transform: none; } }

/* leaderboard: medal podium (1st in the middle, tallest step), ranked rows with a bar against the leader, champions with one chip per prize */
:is(#leaders, .lv-lbpage) { --lb-1: #d4a017; --lb-2: #9aa3ae; --lb-3: #c47a3a; }
.lv-lb { display: flex; flex-direction: column; gap: 20px; padding: 24px; }
.lb-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 16px; }
.lv-lb .lb-head :is(h2, h3) { display: flex; align-items: center; gap: 10px; margin: 0; font-size: 20px; font-weight: 700; letter-spacing: -.3px; }
.lb-head :is(h2, h3) i { font-size: 15px; color: var(--lv-gt); }
.lb-period { display: inline-flex; align-items: center; gap: 6px; min-height: 28px; padding: 0 12px; border-radius: 9999px; background: var(--lv-c04); font-size: 13px; color: var(--lv-muted); }
.lb-period i { font-size: 12px; }
.lb-medal { --m: var(--lb-1); display: inline-grid; place-items: center; flex: 0 0 auto; width: 24px; height: 24px; border: 1.5px solid var(--m); border-radius: 9999px; background: color-mix(in srgb, var(--m) 30%, var(--lv-white)); color: var(--lv-char); font-size: 12px; font-weight: 700; font-variant-numeric: tabular-nums; }
.lb-podium { list-style: none; display: flex; align-items: flex-end; justify-content: center; gap: 12px; margin: 0; padding: 4px 0 0; }
.lb-p { --m: var(--lb-1); position: relative; display: flex; flex-direction: column; align-items: center; flex: 1 1 0; min-width: 0; max-width: 200px; text-align: center; }
.lb-p.r1 { order: 2; } .lb-p.r2 { --m: var(--lb-2); order: 1; } .lb-p.r3 { --m: var(--lb-3); order: 3; }
.lb-p .lb-medal { --m: inherit; position: absolute; right: -4px; bottom: -4px; box-shadow: 0 0 0 2px var(--lv-white); }
.lb-crown { margin-bottom: 6px; font-size: 18px; color: var(--lb-1); }
.lb-av-wrap { position: relative; margin-bottom: 12px; }
.lb-av { display: inline-grid; place-items: center; flex: 0 0 auto; width: 40px; height: 40px; border-radius: 9999px; background: var(--lv-mint); color: var(--lv-gt); font-size: 14px; font-weight: 700; letter-spacing: .02em; }
.lb-p .lb-av { width: 60px; height: 60px; font-size: 19px; background: color-mix(in srgb, var(--m) 18%, var(--lv-white)); color: color-mix(in srgb, var(--m) 65%, var(--lv-char)); box-shadow: 0 0 0 3px var(--lv-white), 0 0 0 5px var(--m); }
.lb-p.r1 .lb-av { width: 72px; height: 72px; font-size: 22px; }
.lb-p.is-me .lb-av { box-shadow: 0 0 0 3px var(--lv-white), 0 0 0 5px var(--lv-btn); }
.lb-p b, .lb-p small { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lb-p b { font-size: 15px; font-weight: 600; color: var(--lv-char); }
.lb-p small { font-size: 12.5px; color: var(--lv-muted); }
.lb-p strong { margin-top: 4px; font-size: 17px; font-weight: 700; color: var(--lv-gt); font-variant-numeric: tabular-nums; }
.lb-step { display: grid; place-items: center; width: 100%; height: 56px; margin-top: 12px; border-radius: 12px 12px 0 0; background: linear-gradient(180deg, color-mix(in srgb, var(--m) 28%, var(--lv-white)), color-mix(in srgb, var(--m) 6%, var(--lv-white))); color: color-mix(in srgb, var(--m) 70%, var(--lv-char)); font-size: 26px; font-weight: 800; }
.lb-p.r1 .lb-step { height: 92px; font-size: 32px; } .lb-p.r2 .lb-step { height: 72px; }
:is(.lb-p b, .lb-who b) em { margin-left: 6px; padding: 1px 8px; border-radius: 9999px; background: var(--lv-btn); color: var(--lv-btn-ink); font-size: 11px; font-style: normal; font-weight: 700; vertical-align: middle; }
.lb-list { list-style: none; display: grid; gap: 4px; margin: 0; padding: 0; }
.lb-list li { display: grid; grid-template-columns: 28px 40px minmax(0, 1fr) auto; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 12px; }
.lb-list li:nth-child(odd) { background: var(--lv-c03); }
.lb-list li.is-me { background: color-mix(in srgb, var(--lv-btn) 10%, var(--lv-white)); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--lv-btn) 40%, transparent); }
.lb-n { font-size: 14px; font-weight: 700; text-align: center; color: var(--lv-muted); font-variant-numeric: tabular-nums; }
.lb-who { display: grid; gap: 2px; min-width: 0; }
.lb-who b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 15px; font-weight: 600; color: var(--lv-char); }
.lb-who small { font-size: 12.5px; color: var(--lv-muted); }
.lb-bar { display: block; height: 6px; margin-top: 4px; overflow: hidden; border-radius: 9999px; background: var(--lv-c04); }
.lb-bar i { display: block; height: 100%; border-radius: inherit; background: var(--lv-btn); }
.lb-val { display: grid; justify-items: end; gap: 2px; text-align: right; }
.lb-val strong { font-size: 15px; font-weight: 700; white-space: nowrap; color: var(--lv-char); font-variant-numeric: tabular-nums; }
.lb-val small { font-size: 12px; white-space: nowrap; color: var(--lv-muted); }
.lb-champs { margin-bottom: 24px; padding: 24px; background: linear-gradient(135deg, color-mix(in srgb, var(--lb-1) 10%, var(--lv-white)), var(--lv-white) 60%); }
.lb-champs-head { display: flex; align-items: center; gap: 14px; margin-bottom: 20px; }
.lb-champs-ico { display: grid; place-items: center; flex: 0 0 48px; height: 48px; border-radius: 14px; background: color-mix(in srgb, var(--lb-1) 22%, var(--lv-white)); color: color-mix(in srgb, var(--lb-1) 70%, var(--lv-char)); font-size: 20px; }
.lb-champs-head p { margin: 0; font-size: 12px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--lv-muted); }
.lb-champs-head h3 { margin: 2px 0 0; font-size: 22px; font-weight: 700; letter-spacing: -.3px; }
.lb-champs-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 340px), 1fr)); gap: 20px 32px; }
.lb-champs h4 { display: flex; align-items: center; gap: 8px; margin: 0 0 10px; font-size: 15px; font-weight: 600; color: var(--lv-char); }
.lb-champs h4 i { font-size: 13px; color: var(--lv-gt); }
.lb-wins { list-style: none; display: grid; gap: 10px; margin: 0; padding: 0; }
.lb-wins > li { display: grid; grid-template-columns: 32px minmax(0, 1fr); align-items: start; gap: 12px; padding: 14px; border: 1px solid var(--lv-line); border-radius: 12px; background: var(--lv-white); }
.lb-wins .lb-medal { width: 32px; height: 32px; font-size: 14px; }
.lb-wins .r2 .lb-medal { --m: var(--lb-2); } .lb-wins .r3 .lb-medal { --m: var(--lb-3); } .lb-wins .r4 .lb-medal { --m: var(--lv-c40); }
.lb-wins b { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 15px; font-weight: 600; color: var(--lv-char); }
.lb-wins small { display: block; margin-top: 2px; font-size: 12.5px; color: var(--lv-muted); }
.lb-prizes { list-style: none; display: flex; flex-wrap: wrap; gap: 6px; margin: 10px 0 0; padding: 0; }
.lb-prizes li { display: inline-flex; align-items: center; gap: 6px; min-height: 26px; padding: 0 10px; border-radius: 9999px; background: var(--lv-mint); font-size: 12.5px; color: var(--lv-char); }
.lb-prizes i { font-size: 11px; color: var(--lv-gt); }

@media (max-width: 1100px) {
    :is(.site-home, .site-partner) .lv-why { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .pl-grid { grid-template-columns: repeat(auto-fit, minmax(0, 380px)); }
}
@media (max-width: 768px) {
    :is(.site-home, .site-partner) .lv-why { grid-template-columns: minmax(0, 1fr); gap: 12px; }
    :is(.site-home, .site-partner) .lv-why li { grid-template-columns: 44px minmax(0, 1fr); gap: 4px 14px; padding: 18px; }
    :is(.site-home, .site-partner) .lv-why i { width: 44px; height: 44px; font-size: 18px; }
    .lv-plans { padding: 40px 0 56px; }
    .site-home .lv-plans { margin-top: 56px; padding: 48px 0; }
    .lv-plans-head { margin-bottom: 28px; }
    .pl-grid { --pl-gap: 16px; }
    .pl-grid { grid-template-columns: minmax(0, 440px); }
    .site-home .pl-grid { grid-template-columns: none; grid-template-rows: repeat(4, auto); grid-auto-flow: column; grid-auto-columns: 86%; justify-content: start; overflow-x: auto; scroll-snap-type: x mandatory; overscroll-behavior-x: contain; padding: 4px 2px; scrollbar-width: none; }
    .site-home .pl-grid::-webkit-scrollbar { display: none; }
    .site-home .pl-card { scroll-snap-align: center; }
    .pl-price strong { font-size: 36px; }
    .pl-feat { padding: 22px 20px 26px; }
    .lv-lb { padding: 18px 16px; }
    .lb-podium { gap: 8px; }
    .lb-p .lb-av { width: 52px; height: 52px; font-size: 17px; }
    .lb-p.r1 .lb-av { width: 62px; height: 62px; font-size: 20px; }
    .lb-step { height: 48px; font-size: 22px; } .lb-p.r1 .lb-step { height: 78px; font-size: 28px; } .lb-p.r2 .lb-step { height: 62px; }
    .lb-list li { grid-template-columns: 22px 36px minmax(0, 1fr) auto; gap: 10px; padding: 10px 8px; }
    .lb-list .lb-av { width: 36px; height: 36px; font-size: 13px; }
    .lb-val small { display: none; }
    .lb-champs { padding: 18px 16px; }
}

/* faq: questions as cards with +/x in a circle; home (topic pills) = centred column, first topic open, help box under */
.site-body .lv-faq .faq-list { gap: 10px; border-top: 0; }
.site-body .lv-faq .site-faq { border: 1px solid var(--lv-line); border-radius: 14px; background: var(--lv-white); transition: border-color .2s, box-shadow .2s; }
.site-body .lv-faq .site-faq:hover { border-color: var(--lv-c40); }
.site-body .lv-faq .site-faq[open] { border-color: color-mix(in srgb, var(--lv-btn) 45%, transparent); box-shadow: 0 12px 24px -18px rgba(0, 0, 0, .3); }
.site-body .lv-faq .site-faq summary { min-height: 64px; padding: 14px 16px 14px 22px; font-size: 17px; font-weight: 500; line-height: 1.35; }
.site-body .lv-faq .site-faq summary::after { display: grid; place-items: center; flex: 0 0 32px; height: 32px; border-radius: 9999px; background: var(--lv-mint); color: var(--lv-gt); font-size: 20px; line-height: 1; transition: transform .2s, background-color .2s, color .2s; }
.site-body .lv-faq .site-faq[open] summary::after { background: var(--lv-btn); color: var(--lv-btn-ink); }
.site-body .lv-faq .site-faq summary:focus-visible { outline: 2px solid var(--lv-btn); outline-offset: 2px; border-radius: 14px; }
.site-body .lv-faq .site-faq > div { padding: 0 22px 20px; font-size: 15.5px; line-height: 1.65; }
.lv-faq-sec.is-tabs .lv-faq { grid-template-columns: minmax(0, 1fr); gap: 28px; max-width: 880px; margin: 0 auto; }
.lv-faq-sec.is-tabs .lv-faq > div:first-child { text-align: center; }
.lv-faq-sec.is-tabs h2 { margin: 0 auto; }
.lv-faq-sec.is-tabs .lv-lead { max-width: 620px; margin-left: auto; margin-right: auto; }
.lv-faq-sec.is-tabs .lv-faq-tabs { justify-content: center; margin-top: 24px; }
.lv-faq-tabs button { display: inline-flex; align-items: center; gap: 8px; min-height: 40px; }
.lv-faq-tabs button span { display: inline-grid; place-items: center; min-width: 22px; height: 22px; padding: 0 7px; border-radius: 9999px; background: var(--lv-c04); color: var(--lv-muted); font-size: 12px; font-weight: 600; font-variant-numeric: tabular-nums; }
.lv-faq-tabs button.is-on span { background: var(--lv-btn); color: var(--lv-btn-ink); }
.lv-faq-tabs button:focus-visible { outline: 2px solid var(--lv-btn); outline-offset: 2px; }
.lv-faq-help { display: flex; flex-wrap: wrap; align-items: center; gap: 16px 20px; max-width: 880px; margin: 28px auto 0; padding: 20px 22px; border-radius: 16px; background: var(--lv-mint); }
.lv-faq-help-ico { display: grid; place-items: center; flex: 0 0 48px; height: 48px; border-radius: 14px; background: var(--lv-white); color: var(--lv-gt); font-size: 20px; }
.lv-faq-help-t { display: grid; flex: 1 1 220px; gap: 2px; min-width: 0; }
.lv-faq-help-t b { font-size: 17px; font-weight: 600; color: var(--lv-char); }
.lv-faq-help-t span { font-size: 14.5px; color: var(--lv-muted); }
.lv-faq-help-btns { display: flex; flex-wrap: wrap; gap: 8px; }
.lv-faq-help-btns .lv-btn { min-height: 44px; }
@media (prefers-reduced-motion: reduce) { .site-body .lv-faq .site-faq summary::after { transition: none; } }
@media (max-width: 768px) {
    .lv-faq-sec.is-tabs .lv-faq { gap: 20px; }
    .lv-faq-sec.is-tabs .lv-faq > div:first-child { text-align: left; }
    .lv-faq-sec.is-tabs .lv-faq-tabs { flex-wrap: nowrap; justify-content: flex-start; overflow-x: auto; margin: 20px -16px 0; padding: 0 16px 4px; scrollbar-width: none; }
    .lv-faq-sec.is-tabs .lv-faq-tabs::-webkit-scrollbar { display: none; }
    .lv-faq-tabs button { flex: 0 0 auto; min-height: 44px; }
    .site-body .lv-faq .site-faq summary { min-height: 56px; padding: 12px 12px 12px 16px; font-size: 16px; }
    .site-body .lv-faq .site-faq > div { padding: 0 16px 16px; font-size: 15px; }
    .lv-faq-help { padding: 18px 16px; }
    .lv-faq-help-btns { width: 100%; }
    .lv-faq-help-btns .lv-btn { flex: 1 1 auto; justify-content: center; }
}

/* leaderboard open spot: a place nobody holds yet (dashed avatar, muted text, link to join) */
:is(.lb-p, .lb-list li).is-open .lb-av { border: 2px dashed var(--lv-c40); background: transparent; color: var(--lv-c40); box-shadow: none; font-size: 14px; }
.lb-p.is-open .lb-av { border-color: color-mix(in srgb, var(--m) 70%, transparent); color: var(--m); }
.lb-p.is-open .lb-medal { opacity: .7; }
.lb-p.is-open .lb-crown { opacity: .45; }
.lb-p.is-open .lb-step { opacity: .5; }
:is(.lb-p, .lb-list li).is-open b a { color: var(--lv-muted); font-weight: 600; text-decoration: none; }
:is(.lb-p, .lb-list li).is-open b a:hover { color: var(--lv-gt); }
:is(.lb-p, .lb-list li).is-open strong { color: var(--lv-c40); }

/* rent page: photo hero, search card over its edge with tabs, vehicle type rail, offer + plans promos, results */
.site-rent .rn-hero { padding: 72px 0 124px; background: linear-gradient(90deg, rgba(3, 22, 15, .94) 0%, rgba(3, 22, 15, .74) 45%, rgba(3, 22, 15, .25) 100%), var(--rn-img, none) center / cover no-repeat, var(--lv-forest); color: #fff; }
.rn-hero-copy { max-width: 640px; }
.rn-eyebrow { display: inline-flex; align-items: center; gap: 8px; margin: 0 0 18px; padding: 6px 14px; border: 1px solid rgba(255, 255, 255, .25); border-radius: 9999px; font-size: 14px; color: rgba(255, 255, 255, .86); }
.rn-eyebrow i { color: var(--lv-acc); }
.rn-hero h1 { margin: 0; font-size: clamp(34px, 5vw, 58px); font-weight: 700; line-height: 1.05; letter-spacing: -1.5px; color: #fff; }
.rn-hero h1 span { color: var(--lv-acc); }
.rn-lead { max-width: 540px; margin: 16px 0 0; font-size: 18px; line-height: 1.5; color: rgba(255, 255, 255, .82); }
.rn-badges { list-style: none; display: flex; flex-wrap: wrap; gap: 14px 28px; margin: 28px 0 0; padding: 0; }
.rn-badges li { display: flex; align-items: center; gap: 10px; }
.rn-badges i { display: grid; place-items: center; flex: 0 0 38px; height: 38px; border-radius: 10px; background: rgba(255, 255, 255, .12); color: var(--lv-acc); font-size: 15px; }
.rn-badges span { display: grid; gap: 1px; }
.rn-badges b { font-size: 14px; font-weight: 600; color: #fff; }
.rn-badges small { font-size: 12.5px; color: rgba(255, 255, 255, .72); }
.rn-search { position: relative; z-index: 2; margin-top: -78px; }
.rn-tabs { display: inline-flex; gap: 4px; padding: 6px 6px 0; border-radius: 14px 14px 0 0; background: var(--bg-card); }
.rn-tabs :is(span, a) { display: inline-flex; align-items: center; gap: 8px; min-height: 40px; padding: 0 16px; border-radius: 10px; font-size: 14px; font-weight: 600; color: var(--lv-muted); text-decoration: none; }
.rn-tabs a:hover { color: var(--lv-char); }
.rn-tabs .is-on { background: var(--lv-mint); color: var(--lv-gt); }
.site-rent .rn-search .search-card { padding: 20px; border-top-left-radius: 0; box-shadow: 0 24px 48px -24px rgba(0, 0, 0, .32); }
.rn-sec { margin-top: 56px; }
.rn-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 12px 24px; margin-bottom: 20px; }
.rn-head h2 { margin: 0; font-size: clamp(24px, 2.8vw, 32px); font-weight: 700; letter-spacing: -.6px; color: var(--lv-char); }
.rn-head p { margin: 6px 0 0; font-size: 15px; color: var(--lv-muted); }
.rn-head .lv-btn-ghost { border-color: var(--lv-line); }
.rn-types .lv-rail-track { grid-auto-columns: calc((100% - 64px) / 5); gap: 16px; }
.rn-type { display: flex; flex-direction: column; gap: 4px; min-width: 0; padding: 12px 12px 16px; border: 1px solid var(--lv-line); border-radius: 16px; background: var(--bg-card); color: var(--lv-char); text-decoration: none; transition: border-color .2s, box-shadow .2s; }
.rn-type:hover { border-color: var(--lv-c40); box-shadow: 0 12px 24px -16px rgba(0, 0, 0, .28); }
.rn-type.is-on { border-color: var(--lv-btn); box-shadow: 0 0 0 1px var(--lv-btn); }
.rn-type:focus-visible { outline: 2px solid var(--lv-btn); outline-offset: 2px; }
.rn-type-img { display: grid; place-items: center; aspect-ratio: 16 / 10; margin-bottom: 8px; overflow: hidden; border-radius: 12px; background: var(--lv-mint); color: var(--lv-gt); font-size: 36px; }
.rn-type-img img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s; }
.rn-type:hover .rn-type-img img { transform: scale(1.04); }
.rn-type b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 16px; font-weight: 600; }
.rn-type small { display: flex; align-items: center; gap: 6px; font-size: 13px; color: var(--lv-muted); }
.rn-type-price { margin-top: 8px; font-size: 13px; color: var(--lv-muted); }
.rn-type-price strong { font-size: 18px; font-weight: 700; color: var(--lv-gt); }
.rn-promos { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 420px), 1fr)); gap: 20px; margin-top: 40px; }
.rn-promo { display: flex; flex-direction: column; align-items: flex-start; gap: 6px; min-height: 230px; padding: 28px; overflow: hidden; border-radius: 18px; background: linear-gradient(90deg, rgba(3, 22, 15, .95) 0%, rgba(3, 22, 15, .72) 55%, rgba(3, 22, 15, .25) 100%), var(--rn-img, none) center / cover no-repeat, var(--lv-forest); color: #fff; text-decoration: none; }
.rn-promo.is-light { background: linear-gradient(90deg, var(--lv-mint) 0%, color-mix(in srgb, var(--lv-mint) 82%, transparent) 50%, transparent 100%), var(--rn-img, none) center / cover no-repeat, var(--lv-mint); color: var(--lv-char); }
.rn-promo:focus-visible { outline: 2px solid var(--lv-btn); outline-offset: 3px; }
.rn-promo-tag { display: inline-flex; align-items: center; gap: 6px; margin-bottom: 6px; padding: 4px 12px; border-radius: 9999px; background: rgba(255, 255, 255, .14); font-size: 12.5px; font-weight: 600; }
.rn-promo.is-light .rn-promo-tag { background: var(--bg-card); color: var(--lv-gt); }
.rn-promo b { max-width: 380px; font-size: 22px; font-weight: 700; line-height: 1.2; }
.rn-promo strong { font-size: clamp(28px, 3.4vw, 40px); font-weight: 800; line-height: 1.05; letter-spacing: -1px; text-transform: uppercase; color: var(--lv-acc); }
.rn-promo.is-light strong { text-transform: none; color: var(--lv-gt); }
.rn-promo small { margin-bottom: 16px; font-size: 14px; opacity: .86; }
.rn-promo-btn { display: inline-flex; align-items: center; gap: 8px; min-height: 42px; margin-top: auto; padding: 0 18px; border-radius: 10px; background: var(--lv-btn); color: var(--lv-btn-ink); font-size: 14px; font-weight: 600; }
.rn-promo.is-light .rn-promo-btn { background: var(--lv-char); color: var(--lv-cream); }
.rn-promo-btn i { font-size: 12px; transition: transform .2s; }
.rn-promo:hover .rn-promo-btn i { transform: translateX(3px); }
.rn-results { scroll-margin-top: 80px; }
body.site-body .rent-bar h2 { margin: 0; font-size: clamp(24px, 2.8vw, 32px); font-weight: 700; letter-spacing: -.6px; color: var(--lv-char); }
@media (prefers-reduced-motion: reduce) { .rn-type-img img, .rn-promo-btn i { transition: none; } }
@media (max-width: 1100px) { .rn-types .lv-rail-track { grid-auto-columns: calc((100% - 32px) / 3); } }
@media (max-width: 768px) {
    .site-rent .rn-hero { padding: 40px 0 100px; background: linear-gradient(0deg, rgba(3, 22, 15, .95) 20%, rgba(3, 22, 15, .62) 70%, rgba(3, 22, 15, .35)), var(--rn-img, none) center / cover no-repeat, var(--lv-forest); }
    .rn-lead { font-size: 16px; }
    .rn-badges { gap: 12px; margin-top: 22px; }
    .rn-badges li { flex: 1 1 100%; }
    .rn-search { margin-top: -66px; }
    .rn-tabs :is(span, a) { min-height: 44px; padding: 0 12px; font-size: 13.5px; }
    .site-rent .rn-search .search-card { padding: 14px; }
    .rn-sec { margin-top: 40px; }
    .rn-types .lv-rail-track { grid-auto-columns: 62%; gap: 12px; }
    .rn-promo { min-height: 200px; padding: 22px 20px; }
    .rn-promo b { font-size: 19px; }
}

/* rent hero fixes: no gap under the header, white headline, one badge row, the search card's own Daily / Monthly switch hidden (the tabs above it cover that) */
body.site-body.site-rent .site-main { padding-top: 0; }
body.site-body.site-rent .rn-hero h1 { max-width: 760px; font-size: clamp(34px, 5vw, 58px); font-weight: 700; line-height: 1.05; letter-spacing: -1.5px; color: #fff; }
body.site-body.site-rent .rn-hero h1 span { color: var(--lv-acc); }
.site-rent .rn-hero-copy { max-width: none; }
.site-rent .rn-search .sw-mode { display: none; }

/* reviews: who first (initials, name, ride + month, source), stars, quote up to 5 lines, faint quote mark; score card in the head */
:is(.site-home, .site-rent, .site-partner) .lv-rev { position: relative; gap: 14px; padding: 22px 22px 28px; overflow: hidden; transition: border-color .2s, box-shadow .2s; }
:is(.site-home, .site-rent, .site-partner) .lv-rev:hover { border-color: var(--lv-c40); box-shadow: 0 12px 24px -18px rgba(0, 0, 0, .28); }
.lv-rev .lv-rev-who { display: flex; align-items: center; gap: 12px; margin: 0; }
.lv-rev-av { display: grid; place-items: center; flex: 0 0 44px; height: 44px; border-radius: 9999px; background: var(--lv-mint); color: var(--lv-gt); font-size: 15px; font-weight: 700; }
.lv-rev-id { display: grid; flex: 1 1 auto; gap: 2px; min-width: 0; }
.lv-rev-id b, .lv-rev-id small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lv-rev-id b { font-size: 15px; font-weight: 600; color: var(--lv-char); }
.lv-rev-id small { font-size: 13px; color: var(--lv-muted); }
.lv-rev-who .lv-rev-src { align-self: flex-start; padding: 4px 10px; border-radius: 9999px; background: var(--lv-mint); color: var(--lv-gt); font-size: 12px; font-weight: 600; }
:is(.site-home, .site-rent, .site-partner) .lv-rev blockquote { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 5; overflow: hidden; font-size: 16px; line-height: 1.55; color: var(--lv-char); }
.lv-rev-q { position: absolute; right: 20px; bottom: 16px; font-size: 40px; color: var(--lv-mint); pointer-events: none; }
.lv-rev-sum { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 20px; padding: 14px 18px; border: 1px solid var(--lv-line); border-radius: 16px; background: var(--lv-white); }
.lv-rev-score { display: flex; align-items: center; gap: 12px; }
.lv-rev-score > b { font-size: 34px; font-weight: 700; line-height: 1; letter-spacing: -1px; color: var(--lv-char); }
.lv-rev-score > div { display: grid; gap: 4px; }
.lv-rev-score small { font-size: 13px; color: var(--lv-muted); }
.lv-rev-sum .lv-btn { min-height: 42px; }
.lv-rev-sum .lv-btn-ghost { border-color: var(--lv-line); }
@media (max-width: 768px) {
    .lv-rev-sum { width: 100%; justify-content: space-between; padding: 12px 14px; }
    .lv-rev-score > b { font-size: 28px; }
    :is(.site-home, .site-rent, .site-partner) .lv-rev blockquote { font-size: 15px; }
}

/* public pages: full-width container with fluid side gutters (16px phones, up to 72px wide screens), capped at 1920px on ultra-wide */
body.site-body { --site-max: 1920px; --site-gut: clamp(16px, 4vw, 72px); }
body.site-body .site-wrap { max-width: var(--site-max); padding-left: var(--site-gut); padding-right: var(--site-gut); }
body.site-body .site-foot .site-wrap { padding-left: var(--site-gut); padding-right: var(--site-gut); }
body.site-body .site-partner-strip { width: calc(100% - 2 * var(--site-gut)); max-width: calc(var(--site-max) - 2 * var(--site-gut)); }
.site-page > article.site-card { max-width: 920px; margin-left: auto; margin-right: auto; } /* legal / cms pages keep a reading width */
@media (min-width: 1440px) { .rent-results .sc-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
@media (min-width: 1600px) {
    .site-home .lv-veh .lv-rail-track, .site-home #offers .lv-rail-track { grid-auto-columns: calc((100% - 96px) / 5); }
    :is(.site-home, .site-rent, .site-partner) #reviews .lv-rail-track { grid-auto-columns: calc((100% - 72px) / 4); }
    .rn-types .lv-rail-track { grid-auto-columns: calc((100% - 80px) / 6); }
}
@media (min-width: 1880px) { .rent-results .sc-grid { grid-template-columns: repeat(5, minmax(0, 1fr)); } }
@media (max-width: 768px) {
    body.site-body .lv-rail-track, body.site-body .lv-rail-track.lv-vids { margin-left: calc(-1 * var(--site-gut)); margin-right: calc(-1 * var(--site-gut)); padding-left: var(--site-gut); padding-right: var(--site-gut); scroll-padding-left: var(--site-gut); }
    body.site-body .lv-faq-sec.is-tabs .lv-faq-tabs { margin-left: calc(-1 * var(--site-gut)); margin-right: calc(-1 * var(--site-gut)); padding-left: var(--site-gut); padding-right: var(--site-gut); }
}

/* partner strip (above the footer): icon tile, headline + three ticks, Become a partner first, login second */
body.site-body .site-partner-strip { border: 0; border-radius: 20px; background: var(--lv-mint); }
body.site-body .site-partner-strip .site-wrap { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 16px 24px; padding: 24px 28px; }
.psx-ico { display: grid; place-items: center; width: 56px; height: 56px; border-radius: 16px; background: var(--lv-white); color: var(--lv-gt); font-size: 22px; }
.site-partner-strip .psx-t { display: block; margin: 0; font-size: 19px; font-weight: 500; line-height: 1.35; color: var(--lv-char); }
.site-partner-strip .psx-t b { font-weight: 700; }
.psx-pts { list-style: none; display: flex; flex-wrap: wrap; gap: 6px 20px; margin: 8px 0 0; padding: 0; }
.psx-pts li { display: inline-flex; align-items: center; gap: 8px; font-size: 14px; color: var(--lv-c83); }
.psx-pts i { font-size: 11px; color: var(--lv-gt); }
.site-partner-btns { display: flex; flex-wrap: wrap; gap: 10px; }
.site-partner-btns .lv-btn { min-height: 46px; }
.site-partner-btns .lv-btn-ghost { border-color: color-mix(in srgb, var(--lv-char) 22%, transparent); background: var(--lv-white); }
@media (max-width: 1024px) { body.site-body .site-partner-strip .site-wrap { grid-template-columns: auto minmax(0, 1fr); } .site-partner-btns { grid-column: 1 / -1; } }
@media (max-width: 768px) {
    body.site-body .site-partner-strip .site-wrap { gap: 14px 16px; padding: 20px 18px; }
    .psx-ico { width: 48px; height: 48px; font-size: 19px; }
    .site-partner-strip .psx-t { font-size: 17px; }
    .site-partner-btns .lv-btn { flex: 1 1 auto; justify-content: center; }
}

/* fixes: open leaderboard spots carry no bar fill; the steps box title stays white on pages other than home */
.lb-list li.is-open .lb-bar i { width: 0; }
body.site-body .lv-stepbox-head h2 { color: #fff; }

/* dropdown note beside an option (city: "6 vehicles · 2 hubs") */
.sd-item:has(.sd-sub) { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.sd-sub { flex: 0 0 auto; font-size: 12.5px; font-weight: 400; color: var(--text-muted); }
.sd-item.sel .sd-sub { color: inherit; opacity: .85; }
.sd-label .sd-sub { margin-left: 6px; }

/* partner page: photo hero with the earnings card, 4 steps, why cards, apply = checklist left + form right */
body.site-body.site-partner .site-main { padding-top: 0; }
.site-partner .pt-hero { padding: 64px 0 72px; background: linear-gradient(90deg, rgba(3, 22, 15, .95) 0%, rgba(3, 22, 15, .78) 50%, rgba(3, 22, 15, .4) 100%), var(--rn-img, none) center / cover no-repeat, var(--lv-forest); color: #fff; }
.pt-hero-in { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(320px, .8fr); align-items: center; gap: 40px 64px; }
body.site-body.site-partner .pt-hero h1 { max-width: 720px; margin: 0; font-size: clamp(32px, 4.6vw, 54px); font-weight: 700; line-height: 1.06; letter-spacing: -1.4px; color: #fff; }
body.site-body.site-partner .pt-hero h1 span { color: var(--lv-acc); }
.pt-hero .rn-lead { max-width: 620px; }
.pt-hero-btns { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }
.site-partner .pt-est { gap: 14px; padding: 26px; border: 0; border-radius: 20px; box-shadow: 0 28px 56px -28px rgba(0, 0, 0, .55); color: var(--lv-char); }
body.site-body.site-partner .pt-est h2 { margin: 0; font-size: 20px; font-weight: 700; letter-spacing: -.3px; color: var(--lv-char); }
.site-partner .pt-est .est-out { padding: 16px; border-radius: 14px; background: var(--lv-mint); }
.site-partner .pt-est .est-out span { color: var(--lv-c83); }
.site-partner .pt-est .est-out b { font-size: 34px; font-weight: 800; letter-spacing: -.8px; color: var(--lv-gt); font-variant-numeric: tabular-nums; }
.site-partner .lv-stepbox > .lv-btn { align-self: center; }
.pt-apply { display: grid; grid-template-columns: minmax(260px, .8fr) minmax(0, 1.6fr); align-items: start; gap: 32px 48px; scroll-margin-top: 80px; }
.pt-apply-side { position: sticky; top: 96px; }
body.site-body.site-partner .pt-apply-side h2 { margin: 0; font-size: clamp(24px, 2.8vw, 32px); font-weight: 700; letter-spacing: -.6px; }
.pt-apply-side > p { margin: 10px 0 0; font-size: 15.5px; line-height: 1.55; color: var(--lv-muted); }
.pt-apply-side h3 { display: flex; align-items: center; gap: 8px; margin: 24px 0 10px; font-size: 15px; font-weight: 600; color: var(--lv-char); }
.pt-apply-side h3 i { color: var(--lv-gt); }
.pt-need { flex-direction: column; gap: 10px; margin: 0; }
.pt-help { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 22px 0 0; padding: 12px 14px; border-radius: 12px; background: var(--lv-mint); font-size: 14px; color: var(--lv-c83); }
.pt-help i { color: var(--lv-gt); }
.pt-help a { font-weight: 600; color: var(--lv-gt); text-decoration: none; }
body.site-body .pt-apply-card { padding: 28px; border-radius: 20px; }
.pt-apply-card .apply-go { width: 100%; justify-content: center; }
@media (max-width: 1024px) {
    .pt-hero-in, .pt-apply { grid-template-columns: minmax(0, 1fr); }
    .pt-apply-side { position: static; }
}
@media (max-width: 768px) {
    .site-partner .pt-hero { padding: 40px 0 48px; background: linear-gradient(0deg, rgba(3, 22, 15, .96) 25%, rgba(3, 22, 15, .65) 75%, rgba(3, 22, 15, .4)), var(--rn-img, none) center / cover no-repeat, var(--lv-forest); }
    .pt-hero-btns .lv-btn { flex: 1 1 auto; justify-content: center; }
    .site-partner .pt-est { padding: 18px; }
    body.site-body .pt-apply-card { padding: 18px; }
}

/* header location picker: cities with fleet counts, then that city's areas (hubs); phones = bottom sheet in two steps */
.loc-box { width: min(820px, 100%); padding: 24px; }
.loc-box h2 { display: flex; align-items: center; gap: 10px; margin: 0 48px 4px 0; font-size: 22px; font-weight: 700; letter-spacing: -.3px; color: var(--lv-char); }
.loc-box h2 i { font-size: 18px; color: var(--lv-gt); }
.loc-sub { margin: 0 0 16px; font-size: 14.5px; color: var(--lv-muted); }
.loc-search { display: flex; align-items: center; gap: 10px; min-height: 48px; padding: 0 14px; border: 1px solid var(--lv-line); border-radius: 12px; background: var(--bg-card); }
.loc-search i { color: var(--lv-muted); }
.loc-search input { flex: 1; min-width: 0; height: 46px; padding: 0; border: 0; outline: 0; background: transparent; color: var(--lv-char); font: inherit; font-size: 16px; }
.loc-search:focus-within { border-color: var(--lv-btn); box-shadow: 0 0 0 3px color-mix(in srgb, var(--lv-btn) 18%, transparent); }
.loc-cols { display: grid; grid-template-columns: minmax(0, .9fr) minmax(0, 1.3fr); gap: 16px; margin-top: 16px; }
.loc-cities, .loc-areas { display: grid; align-content: start; gap: 6px; max-height: 52vh; overflow-y: auto; }
.loc-city, .loc-area { display: flex; align-items: center; gap: 12px; width: 100%; min-height: 56px; padding: 10px 12px; border: 1px solid transparent; border-radius: 12px; background: transparent; color: var(--lv-char); font: inherit; text-align: left; text-decoration: none; cursor: pointer; }
.loc-city:hover, .loc-area:hover { background: var(--lv-c04); }
.loc-city.is-on { border-color: color-mix(in srgb, var(--lv-btn) 40%, transparent); background: var(--lv-mint); }
.loc-area.is-on { border-color: var(--lv-btn); background: var(--lv-mint); }
:is(.loc-city, .loc-area):focus-visible { outline: 2px solid var(--lv-btn); outline-offset: 2px; }
.loc-city span, .loc-area span { display: grid; flex: 1; gap: 2px; min-width: 0; }
.loc-city b, .loc-area b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 15px; font-weight: 600; }
.loc-city small, .loc-area small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 12.5px; color: var(--lv-muted); }
.loc-city > i { font-size: 12px; color: var(--lv-muted); }
.loc-area > i { display: grid; place-items: center; flex: 0 0 36px; height: 36px; border-radius: 10px; background: var(--lv-mint); color: var(--lv-gt); font-size: 14px; }
.loc-area.is-on > i { background: var(--lv-btn); color: var(--lv-btn-ink); }
.loc-right { min-width: 0; padding-left: 16px; border-left: 1px solid var(--lv-line); }
.loc-back { display: none; }
.loc-none { margin: 8px 0 0; font-size: 14px; color: var(--lv-muted); }
:is(.loc-city, .loc-area, .loc-areas, .loc-none)[hidden] { display: none; }
@media (min-width: 1101px) { .site-body .site-city span { max-width: 240px; } }
@media (max-width: 640px) {
    .loc-sheet.lv-sheet { place-items: end center; padding: 0; }
    .loc-box.lv-sheet-box { width: 100%; max-height: 90dvh; padding: 20px 16px calc(20px + env(safe-area-inset-bottom)); border-radius: 20px 20px 0 0; }
    .loc-cols { grid-template-columns: minmax(0, 1fr); }
    .loc-right { display: none; padding-left: 0; border-left: 0; }
    .loc-box.is-areas .loc-cities { display: none; }
    .loc-box.is-areas .loc-right { display: block; }
    .loc-back { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; margin-bottom: 6px; padding: 0 4px; border: 0; background: none; color: var(--lv-gt); font: inherit; font-weight: 600; cursor: pointer; }
    .loc-cities, .loc-areas { max-height: none; }
}

/* admin dashboard bento: greeting + net revenue hero · 2×2 KPI tiles (profit filled) · revenue chart · targets + pending · recent bookings */
.bn-kpis { margin-bottom: 16px; }
.bn-kpis .small-box { margin: 0; }
.bn-kpis .small-box .inner h3 { font-size: clamp(20px, 1.9vw, 26px); }
.bn-kpis .small-box .icon { font-size: 40px; }
.bn-kpis .small-box.is-hero .ad-info { color: inherit; opacity: .8; }
.bn-kpis .small-box.is-hero .ad-def { color: inherit; }
.bn-grid { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 16px; margin-bottom: 24px; }
.bn-chart, .bn-recent { grid-column: span 8; min-width: 0; }
.bn-pendc, .bn-side { grid-column: span 4; min-width: 0; }
.bn-grid > .lte-card, .bn-side > .lte-card { margin: 0; }
.bn-chart .dash-chart { height: 320px; }
.bn-status .dash-chart { height: 220px; }
.bn-side { display: grid; align-content: start; gap: 16px; }
.bn-side .ad-tg { grid-template-columns: minmax(0, 1fr); gap: 12px; }
.bn-pend { display: grid; gap: 2px; }
.bn-row { display: flex; align-items: center; gap: 12px; min-height: 44px; padding: 6px 8px; border-radius: var(--r-ctrl, 6px); color: var(--text-primary); font-size: 14px; font-weight: 500; text-decoration: none; }
.bn-row:hover, .bn-row:focus-visible { background: rgba(var(--navy-accent-rgb), .07); }
.bn-row i { flex: none; width: 18px; text-align: center; color: var(--text-muted); }
.bn-row span { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bn-row b { flex: none; min-width: 26px; padding: 2px 8px; border-radius: var(--r-chip, 3px); background: color-mix(in srgb, var(--warning) 20%, transparent); color: color-mix(in srgb, var(--warning) 50%, #000); font-size: 13px; text-align: center; font-variant-numeric: tabular-nums; }
body.dark-mode .bn-row b { color: var(--warning); }
.bn-row.is-zero { color: var(--text-secondary); }
.bn-row.is-zero b { background: transparent; color: var(--text-muted); }
.bn-row.is-bad i { color: var(--bad-ink); }
.bn-row.is-bad b { background: color-mix(in srgb, var(--danger) 14%, transparent); color: var(--bad-ink); }
.bn-table td small { display: block; margin-top: 2px; font-size: 12px; color: var(--text-muted); }
.bn-table :is(th, td).num { text-align: right; }
.bn-table td.bn-go { width: 1%; text-align: right; }
.bn-st { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 600; white-space: nowrap; color: var(--text-primary); }
.bn-st::before { content: ''; flex: 0 0 8px; height: 8px; border-radius: 9999px; background: var(--text-muted); }
.bn-st:is(.s-confirmed, .s-active, .s-completed)::before { background: var(--success); }
.bn-st:is(.s-payment_pending, .s-pickup_pending, .s-return_pending, .s-inspection)::before { background: var(--warning); }
.bn-st:is(.s-cancelled, .s-no_show)::before { background: var(--danger); }
@media (max-width: 1100px) {
    .bn-chart, .bn-recent, .bn-pendc, .bn-side { grid-column: 1 / -1; }
    .bn-side { grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: start; }
}
@media (max-width: 768px) {
    .bn-grid { gap: 12px; margin-bottom: 16px; }
    .bn-kpis { margin-bottom: 12px; }
    .bn-side { grid-template-columns: minmax(0, 1fr); gap: 12px; }
    .bn-chart .dash-chart { height: 260px; }
}
@media (max-width: 576px) {
    .bn-table, .bn-table tbody, .bn-table tr, .bn-table td { display: block; width: 100%; }
    .bn-table thead { display: none; }
    .bn-table tr { position: relative; padding: 10px 12px; border-bottom: 1px solid var(--border-color); }
    .bn-table td { padding: 2px 0; border: 0; text-align: left; }
    .bn-table td[data-l] { display: flex; justify-content: space-between; gap: 12px; }
    .bn-table td[data-l]::before { content: attr(data-l); font-size: 13px; color: var(--text-muted); }
    .bn-table td[data-l="Booking"] { display: block; padding-right: 48px; }
    .bn-table td[data-l="Booking"]::before { content: none; }
    .bn-table td.bn-go { position: absolute; top: 8px; right: 8px; width: auto; }
}
/* filled KPI tile stays filled under glass (the frosted box rule is !important); tighter bento table + one-column targets */
html[data-shape="glass"] .dash-kpis .small-box.is-hero { background: var(--navy-primary) !important; border-color: var(--navy-primary) !important; -webkit-backdrop-filter: none; backdrop-filter: none; }
.bn-recent .lte-card-body { padding-top: 6px; }
.bn-recent .about-table-wrapper { margin: 0; }
.bn-table :is(th, td) { padding: 10px 12px; text-align: left; vertical-align: middle; }
.bn-table :is(th, td).num { text-align: right; }
.bn-table td:first-child :is(a, b) { white-space: nowrap; }
.bn-side .ad-tg { grid-template-columns: minmax(0, 1fr); gap: 14px; }
.bn-kpis .small-box .inner h3 { font-size: clamp(18px, 1.5vw, 22px); }
.bn-kpis .small-box .icon { font-size: 34px; }
.bn-pend.db-info { grid-template-columns: minmax(0, 1fr); gap: 8px; margin: 0; }
.bn-pend .info-box { padding: 10px 12px; }
.bn-pend .info-box-content { flex-direction: row; align-items: center; justify-content: space-between; flex: 1; gap: 12px; }
.bn-pend .info-box-number { font-size: 18px; }
.bn-tgc .lte-card-header .btn .ad-hide-m { display: none; }
.bn-table a { color: var(--accent-ink); }
body.dark-mode .bn-table a { color: color-mix(in srgb, var(--navy-accent) 55%, white); }

/* touch: message + conversation tools are always reachable (no hover on phones) */
.chat-msg:focus-within .chat-tools { display: flex; }
.ai-conv:focus-within .ai-conv-del { opacity: 1; }
@media (hover: none) {
    .chat-msg .chat-tools { position: static; display: flex; transform: none; margin-top: 4px; box-shadow: none; }
    .ai-conv-del { opacity: 1; }
}

/* no underline anywhere — links, buttons, hovers, <u>; state shows by colour (line-through on void rows stays) */
a, a:hover, a:focus, a:active, u, .btn, .btn:hover, .set-link, .tb-link, .auth-link { text-decoration: none; }
.toggle-switch-large .toggle { width: 44px; min-width: 44px; max-width: 44px; flex: 0 0 44px; }

/* list sections: the table card is an AdminLTE card; KPI row (rsKpis) above it; ⋮ row menu (rsMore) */
.data-section.lte-card { overflow: visible; margin-bottom: 0; padding: 20px; border-radius: var(--r-panel, 8px); }
.list-kpis { margin-bottom: 16px; }
button.small-box.list-kpi { display: flex; flex-direction: column; width: 100%; margin: 0; padding: 0; font: inherit; text-align: left; cursor: pointer; }
button.small-box.list-kpi .inner { flex: 1; width: 100%; }
button.small-box.list-kpi .small-box-footer { display: block; width: 100%; text-align: center; }
button.small-box.list-kpi:focus-visible { outline: 2px solid var(--navy-accent); outline-offset: 2px; }
.act-menu { position: fixed; z-index: 1300; display: grid; min-width: 200px; max-width: min(280px, calc(100vw - 16px)); padding: 6px; border: 1px solid var(--border-color); border-radius: var(--r-panel, 8px); background: var(--bg-card); box-shadow: 0 12px 28px var(--shadow-color); }
.act-menu button { display: flex; align-items: center; gap: 10px; width: 100%; min-height: 38px; padding: 0 12px; border: 0; border-radius: var(--r-ctrl, 6px); background: none; color: var(--text-primary); font: inherit; font-size: 14px; text-align: left; cursor: pointer; }
.act-menu button i { width: 16px; text-align: center; color: var(--text-muted); }
.act-menu button:hover, .act-menu button:focus-visible { outline: none; background: rgba(var(--navy-accent-rgb), .1); }
.act-menu button:is(.danger, .act-danger), .act-menu button:is(.danger, .act-danger) i { color: var(--danger); }
.act-menu hr { margin: 4px 6px; border: 0; border-top: 1px solid var(--border-color); }
@media (pointer: coarse) { .act-menu button { min-height: 44px; } }
@media (max-width: 768px) { .data-section.lte-card { padding: 14px; } .list-kpis { margin-bottom: 12px; } }

/* ===== Popups — rsPop dialog + corner toasts (every alert, confirm and prompt in the app) ===== */
.rs-pop-wrap { position: fixed; inset: 0; z-index: 12000; display: flex; align-items: center; justify-content: center; padding: 16px; background: rgba(15, 23, 42, .45); animation: rsPopFade .16s ease-out; }
.dark-mode .rs-pop-wrap { background: rgba(0, 0, 0, .65); }
.rs-pop-wrap.out { opacity: 0; transition: opacity .15s; }
body.rs-pop-open { overflow: hidden; }
body.rs-pop-open .sd-panel, body.rs-pop-open .searchable-dropdown-list { z-index: 12100; }   /* searchable picker inside a popup */
.rs-pop { --pop-c: var(--navy-accent); position: relative; width: 100%; max-width: 460px; max-height: calc(100dvh - 32px); overflow-y: auto; overscroll-behavior: contain;
    padding: 24px; background: var(--bg-card); color: var(--text-primary); border: 1px solid var(--border-color); border-radius: var(--r-panel, 4px);
    box-shadow: 0 18px 48px rgba(0, 0, 0, .22); animation: rsPopRise .2s cubic-bezier(.4, 0, .2, 1); }
.rs-pop-success { --pop-c: var(--success); }
.rs-pop-error { --pop-c: var(--danger); }
.rs-pop-warning { --pop-c: color-mix(in srgb, var(--warning) 78%, var(--text-primary)); }
.rs-pop-x { position: absolute; top: 10px; right: 10px; width: 36px; height: 36px; display: flex; align-items: center; justify-content: center; padding: 0; border: 0;
    background: transparent; color: var(--text-muted); font-size: 16px; border-radius: var(--r-ctrl, 3px); cursor: pointer; }
.rs-pop-x:hover, .rs-pop-x:focus-visible { background: rgba(var(--navy-accent-rgb), .08); color: var(--text-primary); }
.rs-pop-head { display: flex; align-items: flex-start; gap: 14px; padding-right: 28px; }
.rs-pop-ico { flex: 0 0 40px; width: 40px; height: 40px; display: flex; align-items: center; justify-content: center; border-radius: 50%; font-size: 17px;
    color: var(--pop-c); background: color-mix(in srgb, var(--pop-c) 14%, transparent); }
.rs-pop-ico + .rs-pop-hd { padding-top: 8px; }
.rs-pop-hd { min-width: 0; flex: 1; }
.rs-pop-title { margin: 0; font-size: 18px; font-weight: 700; line-height: 1.3; color: var(--text-primary); overflow-wrap: anywhere; }
.rs-pop-title:empty { display: none; }
.rs-pop-text { margin: 8px 0 0; font-size: 14.5px; line-height: 1.55; color: var(--text-secondary); white-space: pre-line; overflow-wrap: anywhere; }
.rs-pop-body { margin-top: 14px; font-size: 14px; line-height: 1.55; color: var(--text-secondary); }
.rs-pop-body:empty { display: none; }
.rs-pop-body > :last-child { margin-bottom: 0; }
.rs-pop-body a:not(.btn) { color: var(--accent-ink); font-weight: 600; text-decoration: none; }
.rs-pop-field { margin-top: 4px; }
.rs-pop-body > .rs-pop-field:first-child { margin-top: 0; }
.rs-pop-label { display: block; margin-bottom: 6px; font-size: 13px; font-weight: 600; color: var(--text-primary); }
.rs-pop-input { display: block; width: 100%; min-height: 44px; padding: 10px 12px; font: inherit; font-size: 16px; color: var(--text-primary);
    background: var(--input-bg); border: 1px solid var(--input-border); border-radius: var(--r-ctrl, 3px); }
textarea.rs-pop-input { min-height: 96px; line-height: 1.5; resize: vertical; }
.rs-pop-input:focus { outline: none; border-color: var(--navy-accent); box-shadow: 0 0 0 3px rgba(var(--navy-accent-rgb), .15); }
.rs-pop-input[aria-invalid="true"] { border-color: var(--danger); }
.rs-pop .sd-wrap { width: 100%; }
.rs-pop .sd-trigger { min-height: 44px; font-size: 16px; }
.rs-pop-msg { display: flex; align-items: center; gap: 8px; margin-top: 10px; padding: 8px 10px; font-size: 13.5px; color: var(--danger);
    background: color-mix(in srgb, var(--danger) 10%, transparent); border-radius: var(--r-ctrl, 3px); }
.rs-pop-msg[hidden] { display: none; }
/* how to fix it — numbered steps under the message */
.rs-pop-help { margin-top: 2px; padding: 12px 14px; background: rgba(var(--navy-accent-rgb), .06); border: 1px solid rgba(var(--navy-accent-rgb), .16); border-radius: var(--r-panel, 4px); }
.rs-pop-field + .rs-pop-help, .rs-pop-p + .rs-pop-help { margin-top: 12px; }
.rs-pop-help-h { display: flex; align-items: center; gap: 8px; font-size: 12px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: var(--accent-ink); }
.rs-pop-help ol { counter-reset: st; display: grid; gap: 8px; margin: 10px 0 0; padding: 0; list-style: none; }
.rs-pop-help li { counter-increment: st; position: relative; padding-left: 28px; font-size: 14px; line-height: 1.5; color: var(--text-primary); }
.rs-pop-help li::before { content: counter(st); position: absolute; left: 0; top: 1px; width: 20px; height: 20px; display: flex; align-items: center; justify-content: center;
    font-size: 11.5px; font-weight: 700; color: var(--accent-ink); background: rgba(var(--navy-accent-rgb), .14); border-radius: var(--r-chip, 3px); }
.rs-pop-help b { color: var(--text-primary); }
.rs-pop-foot { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 8px; margin-top: 20px; }
.rs-pop-foot:empty { display: none; }
.rs-pop-foot .btn { min-height: 40px; text-decoration: none; }
.rs-pop-ghost { background: transparent; color: var(--text-primary); border: 1px solid var(--border-color) !important; }
.rs-pop-ghost:hover { background: rgba(var(--navy-accent-rgb), .06); }
.rs-pop-alt { background: transparent; color: var(--accent-ink); border: 1px solid rgba(var(--navy-accent-rgb), .45) !important; }
.rs-pop-alt:hover { background: rgba(var(--navy-accent-rgb), .08); }
/* busy bar — only when the page has no write overlay to hand over to */
.rs-pop-wait { display: none; position: relative; width: 160px; height: 3px; margin: 18px auto 2px; overflow: hidden; border-radius: 3px; background: rgba(var(--navy-accent-rgb), .15); }
.rs-pop-wait i { position: absolute; inset: 0 auto 0 0; width: 40%; background: var(--navy-accent); animation: rsPopBar 1s linear infinite; }
.rs-pop-busy .rs-pop-wait { display: block; }
.rs-pop-busy .rs-pop-foot, .rs-pop-busy .rs-pop-x { display: none; }
/* content helpers for html popups */
.rs-pop-list { margin: 0; padding-left: 18px; text-align: left; font-size: 13px; }
.rs-pop-p { margin: 0 0 10px; text-align: left; font-size: 14px; line-height: 1.5; color: var(--text-secondary); }
.rs-pop-pre { margin: 0 0 10px; padding: 10px 12px; max-height: 220px; overflow: auto; white-space: pre-wrap; text-align: left; font: inherit; font-size: 13.5px; line-height: 1.5;
    color: var(--text-primary); background: var(--bg-primary); border: 1px solid var(--border-color); border-radius: var(--r-ctrl, 3px); }
/* toasts — top right, phones full width under the status bar */
.rs-toasts { position: fixed; top: 16px; right: 16px; z-index: 12500; display: flex; flex-direction: column; gap: 8px; width: min(360px, calc(100vw - 32px)); pointer-events: none; }
.rs-toast { --pop-c: var(--navy-accent); display: flex; align-items: center; gap: 12px; padding: 12px 14px; pointer-events: auto; cursor: pointer; color: var(--text-primary);
    background: var(--bg-card); border: 1px solid var(--border-color); border-radius: var(--r-panel, 4px); box-shadow: 0 10px 28px rgba(0, 0, 0, .16); animation: rsToastIn .2s ease-out; }
.rs-toast .rs-pop-ico { flex-basis: 30px; width: 30px; height: 30px; font-size: 13px; }
.rs-toast b { display: block; font-size: 14px; font-weight: 600; line-height: 1.4; overflow-wrap: anywhere; }
.rs-toast p { margin: 2px 0 0; font-size: 13px; color: var(--text-secondary); }
.rs-toast.out { opacity: 0; transform: translateX(12px); transition: opacity .18s, transform .18s; }
@keyframes rsPopFade { from { opacity: 0; } to { opacity: 1; } }
@keyframes rsPopRise { from { opacity: 0; transform: translateY(10px) scale(.99); } to { opacity: 1; transform: none; } }
@keyframes rsPopUp { from { opacity: 0; transform: translateY(24px); } to { opacity: 1; transform: none; } }
@keyframes rsToastIn { from { opacity: 0; transform: translateY(-6px); } to { opacity: 1; transform: none; } }
@keyframes rsPopBar { from { transform: translateX(-100%); } to { transform: translateX(260%); } }
@media (max-width: 600px) {   /* bottom sheet */
    .rs-pop-wrap { align-items: flex-end; padding: 0; }
    .rs-pop { max-width: none !important; max-height: 88dvh; padding: 20px 16px calc(16px + env(safe-area-inset-bottom)); animation-name: rsPopUp; }
    html[data-shape] .rs-pop-wrap .rs-pop { border-radius: var(--r-panel, 4px) var(--r-panel, 4px) 0 0 !important; }   /* sheet: flat bottom edge */
    .rs-pop-foot { flex-direction: column; }
    .rs-pop-foot .btn { width: 100%; min-height: 46px; }
    .rs-pop-foot .btn-primary, .rs-pop-foot .btn-danger { order: -1; }
    .rs-pop-foot .rs-pop-close { order: 1; }
    .rs-toasts { top: calc(10px + env(safe-area-inset-top)); left: 16px; right: 16px; width: auto; }
}
@media (prefers-reduced-motion: reduce) { .rs-pop-wrap, .rs-pop, .rs-toast { animation: none; } .rs-pop-wait i { animation-duration: 2.5s; } }


/* 360 layer: the record page framed at 90vw × 90vh over the list (rs360); layers stack; phones = full screen */
.r360-wrap { position: fixed; inset: 0; z-index: 1100; display: grid; place-items: center; background: rgba(0, 0, 0, .45); }
body.r360-open { overflow: hidden; }
.r360 { position: relative; width: 90vw; height: 90vh; overflow: hidden; border-radius: var(--r-panel, 10px); background: var(--bg-primary); box-shadow: 0 24px 60px rgba(0, 0, 0, .35); }
.r360-frame { display: block; width: 100%; height: 100%; border: 0; opacity: 0; transition: opacity .15s; }
.r360-wrap.is-ready .r360-frame { opacity: 1; }
.r360-load { position: absolute; inset: 0; display: grid; place-items: center; font-size: 28px; color: var(--text-muted); }
.r360-wrap.is-ready .r360-load { display: none; }
.r360-x { position: absolute; top: 14px; right: 14px; z-index: 2; display: grid; place-items: center; width: 40px; height: 40px; border: 1px solid var(--border-color); border-radius: 9999px; background: var(--bg-card); color: var(--text-primary); font-size: 16px; cursor: pointer; }
.r360-x:focus-visible { outline: 2px solid var(--navy-accent); outline-offset: 2px; }
@media (max-width: 768px) { .r360 { width: 100vw; height: 100dvh; border-radius: 0; } .r360-x { top: 8px; right: 8px; } }
@media (prefers-reduced-motion: reduce) { .r360-frame { transition: none; } }
/* a page inside a 360 layer: no sidebar, bottom bar, crumbs or header tools */
body.is-embed :is(.sidebar, .mobile-bottom-nav, .sidebar-overlay, .header-right, .head-crumbs) { display: none !important; }
body.is-embed .main-content { margin-left: 0 !important; padding: 16px 68px 16px 20px !important; }
@media (max-width: 768px) { body.is-embed .main-content { padding: 10px 10px 16px !important; } }
/* record pages: record LEFT (detail cards), related tabs RIGHT, Activity last */
.r360-body { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 3fr); align-items: start; gap: 20px; margin-top: 16px; }
.r360-rec, .r360-main { min-width: 0; }
.r360-rec { display: grid; gap: 14px; }
.r360-rec .v360-grid { grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr)); }
@media (max-width: 1100px) { .r360-body { grid-template-columns: minmax(0, 1fr); } }

/* ===== GLASS EFFECTS — <html data-glass>: frosted (default) · clear · blur. only while data-shape="glass".
   an effect re-points the --glass-* tokens the glass block paints with — never restyle panels one by one ===== */

/* clear (iOS): pane almost gone, backdrop stays sharp, a light-catching rim gives it its edge */
html[data-shape="glass"][data-glass="clear"] body {
    --glass-bg: color-mix(in srgb, var(--bg-card) 20%, transparent);
    --glass-strong: color-mix(in srgb, var(--bg-card) 86%, transparent);
    --glass-line: rgba(255, 255, 255, 0.75);
    --glass-blur: blur(1.5px) saturate(150%) brightness(1.04);
    --glass-blur-strong: blur(14px) saturate(170%);
    --glass-tex: none;
    --glass-shadow: 0 8px 28px rgba(15, 23, 42, 0.10);
    --glass-hi: inset 1.5px 1.5px 1px -0.5px rgba(255, 255, 255, 0.95), inset -1px -1px 1px -0.5px rgba(255, 255, 255, 0.55), inset 0 0 16px rgba(255, 255, 255, 0.22);
}
html[data-shape="glass"][data-glass="clear"] body.dark-mode {
    --glass-bg: color-mix(in srgb, var(--bg-card) 30%, transparent);
    --glass-line: rgba(255, 255, 255, 0.22);
    --glass-blur: blur(1.5px) saturate(160%) brightness(0.9);
    --glass-shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
    --glass-hi: inset 1.5px 1.5px 1px -0.5px rgba(255, 255, 255, 0.38), inset -1px -1px 1px -0.5px rgba(255, 255, 255, 0.16), inset 0 0 16px rgba(255, 255, 255, 0.05);
}

/* blur (One UI): deep, saturated blur — colour behind melts into a soft glow, no grain, quiet edge */
html[data-shape="glass"][data-glass="blur"] body {
    --glass-bg: color-mix(in srgb, var(--bg-card) 38%, transparent);
    --glass-strong: color-mix(in srgb, var(--bg-card) 88%, transparent);
    --glass-line: rgba(255, 255, 255, 0.35);
    --glass-blur: blur(40px) saturate(220%);
    --glass-tex: none;
    --glass-shadow: 0 14px 40px rgba(15, 23, 42, 0.10);
    --glass-hi: inset 0 1px 0 rgba(255, 255, 255, 0.4);
}
html[data-shape="glass"][data-glass="blur"] body.dark-mode {
    --glass-bg: color-mix(in srgb, var(--bg-card) 42%, transparent);
    --glass-line: rgba(255, 255, 255, 0.07);
    --glass-shadow: 0 14px 40px rgba(0, 0, 0, 0.35);
    --glass-hi: inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

@media (max-width: 768px) { html[data-shape="glass"][data-glass="blur"] body { --glass-blur: blur(30px) saturate(220%); } }
/* effect pickers show only while glass is the shape */
html:not([data-shape="glass"]) :is(.theme-quick-glass, .ui-glass-panel, .ui-glass-badge) { display: none; }
.set-glass-row[hidden] { display: none; }
@media (prefers-reduced-transparency: reduce) { html[data-shape="glass"] body { --glass-bg: var(--bg-card) !important; --glass-strong: var(--bg-card) !important; --glass-blur: none !important; } }
/* list KPI row over a table (tasks, customers hide it on tabs it does not belong to) — .lte-kpi-grid sets display:grid, which beats the UA [hidden] */
.list-kpis[hidden] { display: none; }
.swal-form .rs-pop-input { margin: 0; }

/* ===== 360 record layer — band on top, record LEFT (about 40 %), tabs RIGHT; tokens only ===== */
.r360-wrap.has-band .r360-x, .r360-wrap.is-modal .r360-x { display: none; }
.r360-wrap.is-modal { background: transparent; }
.r360-wrap.is-modal .r360 { width: 100vw; height: 100vh; border-radius: 0; background: transparent; box-shadow: none; }
/* a list page opened only for its form: page invisible, the modal (and popups on <body>) show */
html:has(> body.is-modal-only), body.is-modal-only, body.is-modal-only :is(.app-container, .main-content) { background: transparent !important; }
body.is-modal-only .app-container { visibility: hidden; }
body.is-modal-only .modal-overlay.active { visibility: visible; }
body.is-embed:has(.r360-body) #rsHeader { display: none; }
.v360-band { display: flex; align-items: center; gap: 16px; padding: 14px 20px; background: var(--navy-primary); color: #fff; }
body.dark-mode .v360-band { background: color-mix(in srgb, var(--navy-accent) 22%, var(--bg-card)); color: var(--text-primary); }
html[data-ui="soft"] .v360-band { background: var(--bg-card); color: var(--text-primary); border-bottom: 1px solid var(--border-color); }
.v360-band .v360-head { flex: 1; min-width: 0; gap: 14px; margin: 0; padding: 0; background: none; border: 0; border-radius: 0; color: inherit; }
.v360-band .v360-img { width: 50px; height: 50px; font-size: 21px; color: inherit; background: color-mix(in srgb, currentColor 14%, transparent); }
html[data-ui="soft"] .v360-band .v360-img { color: var(--accent-ink); background: rgba(var(--navy-accent-rgb), .1); }
.v360-band .v360-id { display: grid; grid-template-columns: minmax(0, max-content) 1fr; align-items: center; gap: 4px 12px; }
.v360-band .v360-id h2 { grid-area: 1 / 1; font-size: 19px; color: inherit; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.v360-band .v360-id h2 small { color: inherit; opacity: .75; }
.v360-band .v360-pills { grid-area: 1 / 2; }
.v360-band .v360-id p { grid-column: 1 / 3; margin: 0; font-size: 13px; color: inherit; opacity: .8; }
.v360-band .v360-note { grid-column: 1 / 3; color: inherit !important; opacity: .85; }
.v360-band .st-pill { box-shadow: inset 0 0 0 40px var(--bg-card); }
html[data-ui="soft"] .v360-band .st-pill, body.dark-mode .v360-band .st-pill { box-shadow: none; }
.v360-tools { display: flex; align-items: center; gap: 6px; flex-shrink: 0; }
.v360-band .head-btn { height: 38px; color: inherit; background: none; border-color: color-mix(in srgb, currentColor 35%, transparent); }
.v360-band .head-btn:hover, .v360-band .v360-x:hover { background: color-mix(in srgb, currentColor 14%, transparent); }
.v360-band .head-btn.lbl { width: auto; padding: 0 14px; }
.v360-band .head-btn.lbl span { position: static; width: auto; height: auto; overflow: visible; clip: auto; }
.v360-band .head-btn.primary { background: var(--bg-card); color: var(--navy-primary); border-color: transparent; }
html[data-ui="soft"] .v360-band .head-btn.primary, body.dark-mode .v360-band .head-btn.primary { background: var(--navy-accent); color: var(--on-accent); }
.v360-x { width: 38px; height: 38px; margin-left: 4px; border: 0; border-radius: var(--r-ctrl); background: color-mix(in srgb, currentColor 14%, transparent); color: inherit; font-size: 18px; cursor: pointer; }
.v360-band :is(.head-btn, .v360-x):focus-visible { outline: 2px solid currentColor; outline-offset: 2px; }
@media (min-width: 992px) {
    body.is-embed:has(.r360-body) .main-content { height: 100vh; padding: 0 !important; display: flex; flex-direction: column; overflow: hidden; }
    body.is-embed .r360-body { flex: 1; min-height: 0; margin: 0; gap: 0; align-items: stretch; grid-template-columns: clamp(360px, 40%, 760px) minmax(0, 1fr); }
    body.is-embed .r360-rec { overflow-y: auto; align-content: start; gap: 16px; padding: 20px; background: var(--bg-card); border-right: 1px solid var(--border-color); container-type: inline-size; scrollbar-gutter: stable; }
    body.is-embed .r360-main { overflow-y: auto; background: var(--bg-primary); scrollbar-gutter: stable; }
    body.is-embed .r360-main > .ab-tabs { position: sticky; top: 0; z-index: 3; margin: 0; padding: 8px 16px; background: var(--bg-card); }
    body.is-embed .r360-main > .rs-pane { padding: 18px 20px; }
}
@media (max-width: 991px) {
    .v360-band { flex-wrap: wrap; gap: 10px 12px; padding: calc(10px + env(safe-area-inset-top)) 12px 12px; }
    .v360-tools { width: 100%; }
    .v360-band .head-btn.primary { flex: 1; }
    .v360-band :is(.head-btn, .v360-x) { min-width: 44px; height: 44px; }
    body.is-embed:has(.r360-body) .main-content { padding: 0 0 16px !important; }
    body.is-embed .r360-body { margin: 0; padding: 12px; }
}
/* KPI tiles — solid icon square on a light wash of the same colour */
.v360-kpis { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.v360-kpi { --k: var(--navy-accent); display: flex; align-items: center; gap: 14px; min-width: 0; padding: 14px; border: 1px solid color-mix(in srgb, var(--k) 24%, var(--border-color)); border-radius: var(--r-panel);
    background: color-mix(in srgb, var(--k) 7%, var(--bg-card)); color: var(--text-primary); font: inherit; text-align: left; cursor: pointer; transition: border-color .15s, background-color .15s; }
.v360-kpi.c1, .v360-kpi.t-good { --k: var(--success); }
.v360-kpi.c2, .v360-kpi.t-warn { --k: var(--warning); }
.v360-kpi.c3 { --k: var(--navy-primary); }
.v360-kpi.t-danger { --k: var(--danger); }
.v360-kpi[disabled] { cursor: default; }
.v360-kpi:not([disabled]):hover { border-color: color-mix(in srgb, var(--k) 55%, var(--border-color)); background: color-mix(in srgb, var(--k) 12%, var(--bg-card)); }
.v360-kpi-ico { flex: 0 0 48px; height: 48px; display: inline-flex; align-items: center; justify-content: center; border-radius: var(--r-ctrl); font-size: 19px; color: #fff; background: var(--k); }
.v360-kpi-txt { min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.v360-kpi small { font-size: 11px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: color-mix(in srgb, var(--k) 40%, var(--text-secondary)); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.v360-kpi b { font-size: 20px; font-weight: 800; line-height: 1.2; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
@media (max-width: 600px) { .v360-kpi { flex-direction: column; align-items: flex-start; gap: 10px; padding: 12px; } .v360-kpi-ico { flex: 0 0 auto; width: 36px; height: 36px; font-size: 15px; } .v360-kpi b { font-size: 18px; overflow-wrap: normal; } } /* phone: icon on top, the amount keeps one line */
.v360-quick { display: flex; flex-wrap: wrap; gap: 8px; }
.v360-quick button { flex: 1 1 auto; display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 40px; padding: 0 14px; border: 1px solid rgba(var(--navy-accent-rgb), .22);
    border-radius: var(--r-ctrl); background: rgba(var(--navy-accent-rgb), .06); color: var(--text-primary); font: inherit; font-size: 13px; font-weight: 600; cursor: pointer; }
.v360-quick i { color: var(--accent-ink); }
.v360-quick button:hover { border-color: var(--navy-accent); color: var(--accent-ink); background: rgba(var(--navy-accent-rgb), .12); }
/* detail cards — tinted title strip, label left · value right; cards cycle the four theme colours */
.v360-card { --g: var(--navy-accent); overflow: hidden; border-color: color-mix(in srgb, var(--g) 20%, var(--border-color)); }
.v360-grid > .v360-card:nth-child(4n+2) { --g: var(--success); }
.v360-grid > .v360-card:nth-child(4n+3) { --g: var(--warning); }
.v360-grid > .v360-card:nth-child(4n+4) { --g: var(--navy-primary); }
.v360-card-h { display: flex; align-items: center; justify-content: space-between; gap: 8px; background: color-mix(in srgb, var(--g) 8%, var(--bg-card)); border-bottom-color: color-mix(in srgb, var(--g) 20%, var(--border-color)); }
.v360-card-h h3 { font-size: 14.5px; }
.v360-card .kv { grid-template-columns: auto minmax(0, 1fr); gap: 0 14px; }
.v360-card .kv dt { padding: 9px 0; }
.v360-card .kv dd { padding: 9px 0; text-align: right; }
.v360-meta { margin: 0; padding-top: 12px; border-top: 1px solid var(--border-color); font-size: 12px; color: var(--text-muted); display: flex; align-items: center; gap: 6px; }
.v360-meta:empty { display: none; }
/* tab bar — figures LEFT | the tab's own actions + CSV · PDF · Print RIGHT */
.v360-bar { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.v360-figs { min-width: 0; display: flex; flex-wrap: wrap; gap: 6px 18px; font-size: 13px; color: var(--text-secondary); }
.v360-figs b { color: var(--text-primary); font-variant-numeric: tabular-nums; }
.v360-acts { display: flex; align-items: center; gap: 6px; flex-shrink: 0; margin-left: auto; }
.v360-acts .btn { min-height: 38px; height: 38px; padding: 0 12px; }
.v360-acts .btn.icon { width: 38px; padding: 0; justify-content: center; }
.v360-acts .sep { width: 1px; height: 24px; margin: 0 4px; background: var(--border-color); }
.v360-acts > .v360-dyn { display: contents; }
@media (max-width: 768px) { .v360-bar { flex-wrap: wrap; } .v360-acts { width: 100%; } .v360-acts .btn-primary { flex: 1; } }

/* ===== bookings card board — the table's rows as cards LEFT, the picked booking RIGHT ===== */
.bk-board { display: grid; grid-template-columns: minmax(0, 1fr) minmax(360px, 460px); gap: 16px; margin-top: 4px; align-items: start; }
body:not(.bk-cards) .bk-board, body.bk-cards :is(#bkTable, #bkBulk) { display: none !important; }
.bk-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 12px; align-items: stretch; }
.bk-card { display: flex; flex-direction: column; gap: 12px; min-width: 0; height: 100%; padding: 14px 16px; border: 1px solid var(--border-color); border-radius: var(--r-panel); background: var(--bg-card);
    color: var(--text-primary); font: inherit; text-align: left; cursor: pointer; transition: border-color .15s, box-shadow .15s; }
.bk-card:hover { border-color: rgba(var(--navy-accent-rgb), .45); }
.bk-card.is-on { border-color: var(--text-primary); box-shadow: 0 0 0 1px var(--text-primary); }
.bk-card:focus-visible { outline: 2px solid var(--navy-accent); outline-offset: 2px; }
.bk-card-top, .bk-dno { display: flex; align-items: center; justify-content: space-between; gap: 8px; min-width: 0; }
.bk-card-top { flex-direction: column; align-items: flex-start; gap: 6px; }   /* number, then pills: same shape on every card */
.bk-card-top b { max-width: 100%; font-size: 15px; font-weight: 800; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bk-pills { display: flex; flex-wrap: wrap; gap: 4px; min-height: 24px; }
.bk-dno .bk-pills { justify-content: flex-end; }
.bk-card-body { display: flex; align-items: flex-end; gap: 10px; min-width: 0; margin-top: auto; }
.bk-card-txt { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 10px; }
.bk-l { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.bk-l small { font-size: 11.5px; color: var(--text-muted); }
.bk-l > span { font-size: 13px; font-weight: 600; color: var(--text-primary); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bk-ph, .bk-dph { flex: 0 0 96px; height: 72px; display: flex; align-items: center; justify-content: center; color: var(--text-muted); font-size: 30px; }
.bk-dph { flex-basis: 132px; height: 96px; font-size: 40px; }
.bk-ph img, .bk-dph img { max-width: 100%; max-height: 100%; object-fit: contain; }
.bk-more { display: flex; margin: 12px auto 0; }
.bk-detail { position: sticky; top: 16px; display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.bk-detail:empty { display: none; }
.bk-dcard { min-width: 0; padding: 16px; border: 1px solid var(--border-color); border-radius: var(--r-panel); background: var(--bg-card); }
.bk-dhead { display: flex; align-items: flex-start; gap: 12px; }
.bk-dhead-txt { flex: 1; min-width: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px 14px; }
.bk-dno { grid-column: 1 / 3; }
.bk-dno b { font-size: 18px; font-weight: 800; }
.bk-who { display: flex !important; align-items: center; gap: 8px; }
.bk-ava { flex: none; width: 24px; height: 24px; display: inline-flex; align-items: center; justify-content: center; border-radius: 50%; font-size: 11px; font-style: normal; font-weight: 800; color: var(--on-accent); background: var(--navy-accent); }
/* status line — done dots filled, the current step bold */
.bk-steps { display: flex; margin-top: 18px; }
.bk-step { position: relative; flex: 1; display: flex; flex-direction: column; align-items: center; gap: 6px; font-size: 11.5px; color: var(--text-muted); text-align: center; }
.bk-step::before { content: ''; position: absolute; top: 5px; left: -50%; right: 50%; height: 2px; background: var(--border-color); }
.bk-step:first-child::before { display: none; }
.bk-step i { position: relative; z-index: 1; width: 12px; height: 12px; border-radius: 50%; border: 2px solid var(--border-color); background: var(--bg-card); }
.bk-step:is(.done, .now)::before { background: var(--text-primary); }
.bk-step.done i { border-color: var(--text-primary); background: var(--text-primary); }
.bk-step.now { font-size: 12.5px; font-weight: 800; color: var(--text-primary); }
.bk-step.now i { border-color: var(--navy-accent); background: var(--navy-accent); box-shadow: 0 0 0 4px rgba(var(--navy-accent-rgb), .18); }
.bk-ended { display: flex; align-items: center; gap: 8px; margin: 16px 0 0; font-size: 13px; color: var(--text-secondary); }
.bk-ended i { color: var(--text-muted); }
.bk-dgrid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.bk-dcard h4 { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin: 0 0 12px; font-size: 14px; color: var(--text-primary); }
.bk-dcard h4 i { margin-right: 6px; color: var(--accent-ink); }
.bk-dcard h4 small { font-size: 12px; font-weight: 700; color: var(--text-secondary); }
.bk-ring { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; }
.bk-ring-c { position: relative; flex: none; width: 56px; height: 56px; }
.bk-ring-c svg { width: 56px; height: 56px; transform: rotate(-90deg); }
.bk-ring-c circle { fill: none; stroke-width: 6; }
.bk-ring-c .trk { stroke: var(--border-color); }
.bk-ring-c .val { stroke: var(--navy-accent); stroke-linecap: round; }
.bk-ring-c b { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; font-size: 12.5px; color: var(--text-primary); }
.bk-kv { display: flex; flex-direction: column; gap: 8px; margin: 0; font-size: 13px; }
.bk-kv div { display: flex; justify-content: space-between; gap: 10px; min-width: 0; }
.bk-kv dt { color: var(--text-muted); }
.bk-kv dd { margin: 0; min-width: 0; text-align: right; font-weight: 600; color: var(--text-primary); overflow-wrap: anywhere; }
.bk-bar { display: block; height: 10px; border-radius: 99px; background: var(--border-color); overflow: hidden; }
.bk-bar span { display: block; height: 100%; border-radius: inherit; background: var(--navy-accent); }
.bk-stats { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px 14px; margin-top: 14px; }
.bk-stats small { display: block; font-size: 11.5px; color: var(--text-muted); }
.bk-stats b { font-size: 14.5px; color: var(--text-primary); font-variant-numeric: tabular-nums; }
.bk-person { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; }
.bk-person .bk-ava { width: 38px; height: 38px; font-size: 15px; }
.bk-person .bk-l { flex: 1; }
.bk-icon-btn { flex: none; width: 38px; height: 38px; display: inline-flex; align-items: center; justify-content: center; border: 1px solid var(--border-color); border-radius: var(--r-ctrl); background: var(--bg-card); color: var(--text-primary); }
.bk-icon-btn:hover { border-color: var(--navy-accent); color: var(--accent-ink); }
.bk-dacts { display: flex; gap: 8px; }
.bk-dacts .btn { flex: 1; justify-content: center; }
@media (max-width: 1280px) { .bk-dgrid { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 991px) { .bk-board { grid-template-columns: minmax(0, 1fr); } .bk-detail { display: none; } }
@media (max-width: 768px) { .bk-grid { grid-template-columns: minmax(0, 1fr); } }

/* ===== fleet planner — "right now by model" tiles + the timeline, in plain words ===== */
.fp-card { margin-bottom: 16px; padding: 16px; border: 1px solid var(--border-color); border-radius: var(--r-panel); background: var(--bg-card); min-width: 0; }
.fp-card-h { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px 16px; margin-bottom: 14px; }
.fp-card-h h3 { display: flex; align-items: center; gap: 8px; margin: 0; font-size: 16px; color: var(--text-primary); }
.fp-card-h h3 i { color: var(--accent-ink); }
.fp-models { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 12px; }
.fp-model { display: flex; flex-direction: column; gap: 10px; min-width: 0; padding: 14px; border: 1px solid var(--border-color); border-radius: var(--r-panel); background: var(--bg-card); color: var(--text-primary); font: inherit; text-align: left; cursor: pointer; transition: border-color .15s, background-color .15s; }
.fp-model:hover { border-color: rgba(var(--navy-accent-rgb), .45); }
.fp-model.is-on { border-color: var(--navy-accent); background: rgba(var(--navy-accent-rgb), .06); box-shadow: 0 0 0 1px var(--navy-accent); }
.fp-model:focus-visible { outline: 2px solid var(--navy-accent); outline-offset: 2px; }
.fp-model-top { display: flex; align-items: center; gap: 10px; min-width: 0; }
.fp-model-img { flex: 0 0 56px; height: 42px; display: flex; align-items: center; justify-content: center; font-size: 22px; color: var(--text-muted); }
.fp-model-img img { max-width: 100%; max-height: 100%; object-fit: contain; }
.fp-model-name { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.fp-model-name b { font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.fp-model-name small { font-size: 12px; color: var(--text-muted); }
.fp-model-free { display: flex; flex-direction: column; align-items: center; line-height: 1; font-size: 11.5px; font-weight: 700; color: var(--success); }
.fp-model-free strong { font-size: 26px; font-weight: 800; }
.fp-model-free.is-none { color: var(--danger); }
.fp-split { display: flex; gap: 2px; height: 10px; border-radius: 99px; overflow: hidden; background: var(--border-color); }
.fp-split i { display: block; height: 100%; }
.fp-split .is-free, .fp-dot.is-free { background: var(--success); }
.fp-split .is-rent, .fp-dot.is-rent { background: var(--navy-accent); }
.fp-split .is-block, .fp-dot.is-block { background: var(--danger); }
.fp-model-leg { display: flex; flex-wrap: wrap; gap: 4px 12px; font-size: 12px; color: var(--text-secondary); }
.fp-model-leg span { display: inline-flex; align-items: center; gap: 5px; }
.fp-dot { flex: none; display: inline-block; width: 9px; height: 9px; border-radius: 50%; }
.fp-back { display: flex; align-items: center; gap: 6px; font-size: 12px; color: var(--text-secondary); }
.fp-legend { display: flex; flex-wrap: wrap; gap: 6px 14px; font-size: 12.5px; color: var(--text-secondary); }
.fp-legend span { display: inline-flex; align-items: center; gap: 6px; }
.fp-lg { display: inline-block; width: 18px; height: 12px; border-radius: 3px; }
/* timeline — vehicle LEFT, days across; bars carry the rider's first name + pickup time */
.planner { border: 1px solid var(--border-color); border-radius: var(--r-ctrl); overflow: hidden; }
.fp-head, .fp-row { display: grid; grid-template-columns: 210px minmax(0, 1fr); }
.fp-head { position: sticky; top: 0; z-index: 3; background: var(--bg-secondary); border-bottom: 1px solid var(--border-color); }
.fp-head > .fp-lab { font-size: 12px; font-weight: 700; color: var(--text-secondary); }
.fp-cols { display: grid; grid-template-columns: repeat(var(--cols), minmax(0, 1fr)); }
.fp-cols span { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1px; min-width: 0; padding: 6px 2px; font-size: 13px; font-weight: 800; color: var(--text-primary); border-left: 1px solid var(--border-light); white-space: nowrap; overflow: hidden; }
.fp-cols small { font-size: 10.5px; font-weight: 600; color: var(--text-muted); text-transform: uppercase; }
.fp-cols .is-today { color: var(--accent-ink); background: rgba(var(--navy-accent-rgb), .1); }
.fp-cols .is-today small { color: var(--accent-ink); }
.fp-group { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 8px 12px; background: var(--bg-secondary); border-bottom: 1px solid var(--border-light); font-size: 13px; font-weight: 700; color: var(--text-primary); }
.fp-group i { color: var(--accent-ink); }
.fp-group small { font-size: 12px; font-weight: 600; color: var(--text-secondary); }
.fp-row { min-height: 56px; border-bottom: 1px solid var(--border-light); }
.fp-row:last-child { border-bottom: 0; }
.fp-row.is-over { background: rgba(var(--navy-accent-rgb), .08); }
.fp-lab { display: flex; align-items: center; gap: 10px; min-width: 0; padding: 6px 12px; background: var(--bg-card); border-right: 1px solid var(--border-color); }
.fp-lab-t { min-width: 0; display: flex; flex-direction: column; gap: 1px; font-size: 13.5px; }
.fp-lab-t small { font-size: 11.5px; color: var(--text-muted); }
.fp-lab-t em { font-size: 11.5px; font-style: normal; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.fp-lab-t em.is-free { color: var(--success); }
.fp-lab-t em.is-rent { color: var(--accent-ink); }
.fp-lab-t em.is-block { color: var(--danger); }
.fp-track { position: relative; min-width: 0; background-image: repeating-linear-gradient(90deg, transparent 0, transparent calc(100% / var(--cols) - 1px), var(--border-light) calc(100% / var(--cols) - 1px), var(--border-light) calc(100% / var(--cols))); }
.fp-today { position: absolute; top: 0; bottom: 0; background: rgba(var(--navy-accent-rgb), .06); pointer-events: none; }
.fp-bar { position: absolute; top: 10px; height: 36px; z-index: 1; padding: 0 8px; border: 0; border-radius: var(--r-ctrl); font: inherit; font-size: 12px; font-weight: 700; line-height: 36px; color: #fff; text-align: left; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; cursor: pointer; }
.fp-bar span { pointer-events: none; }
.fp-bar.can-drag { cursor: grab; }
.fp-bar:hover { filter: brightness(1.08); }
.fp-bar:focus-visible { outline: 2px solid var(--text-primary); outline-offset: 1px; }
:is(.fp-bar, .fp-lg).is-book { background: var(--navy-primary); }
:is(.fp-bar, .fp-lg).is-rent { background: var(--navy-accent); }
:is(.fp-bar, .fp-lg).is-pay { background: var(--warning); color: #1f1300; }
:is(.fp-bar, .fp-lg).is-done { background: color-mix(in srgb, var(--text-muted) 45%, var(--bg-card)); color: var(--text-primary); }
.fp-buf, .fp-lg.is-buf { position: absolute; top: 10px; height: 36px; background: repeating-linear-gradient(45deg, rgba(var(--navy-accent-rgb), .25) 0 3px, transparent 3px 6px); }
.fp-block, .fp-lg.is-block { position: absolute; top: 6px; height: 44px; border: 1px solid color-mix(in srgb, var(--danger) 45%, transparent); border-radius: var(--r-ctrl); background: repeating-linear-gradient(-45deg, color-mix(in srgb, var(--danger) 22%, transparent) 0 4px, transparent 4px 8px); }
.fp-block.is-maint { border-color: color-mix(in srgb, var(--warning) 50%, transparent); background: repeating-linear-gradient(-45deg, color-mix(in srgb, var(--warning) 25%, transparent) 0 4px, transparent 4px 8px); }
.fp-lg.is-buf, .fp-lg.is-block { position: static; top: auto; height: 12px; }
.fp-now { position: absolute; top: 0; bottom: 0; width: 2px; z-index: 2; background: var(--danger); pointer-events: none; }
.fp-cols { position: relative; }
.fp-now b { position: absolute; bottom: 2px; left: 50%; transform: translateX(-50%); padding: 0 5px; border-radius: 3px; font-size: 10px; line-height: 16px; color: #fff; background: var(--danger); }
@media (max-width: 1100px) { .fp-head, .fp-row { grid-template-columns: 170px minmax(0, 1fr); } }

/* booking status chevrons — one colour per status, by meaning; amber carries dark ink */
#bkPipe .pipeline-stage { --pc: var(--navy-primary); background: var(--pc); }
#bkPipe [data-s="payment_pending"] { --pc: var(--warning); color: #1f1300; }
#bkPipe [data-s="confirmed"] { --pc: var(--navy-accent); }
#bkPipe [data-s="pickup_pending"] { --pc: color-mix(in srgb, var(--navy-accent) 50%, var(--success)); }
#bkPipe [data-s="active"] { --pc: color-mix(in srgb, var(--navy-accent) 70%, var(--navy-primary)); }
#bkPipe [data-s="return_pending"] { --pc: color-mix(in srgb, var(--warning) 55%, var(--danger)); }
#bkPipe [data-s="inspection"] { --pc: color-mix(in srgb, var(--warning) 70%, var(--navy-primary)); }
#bkPipe [data-s="completed"] { --pc: var(--success); }
#bkPipe [data-s="closed"] { --pc: color-mix(in srgb, var(--text-muted) 75%, var(--navy-primary)); }
#bkPipe [data-s="risk"] { --pc: var(--danger); }
#bkPipe .pipeline-stage { flex-direction: column; gap: 2px; padding: 8px 14px 8px 26px; }
#bkPipe .pipeline-stage-name { overflow: visible; white-space: normal; text-align: center; line-height: 1.15; letter-spacing: .2px; }
#bkPipe .pipeline-stage-count { font-size: 16px; line-height: 1.1; }
/* compact 360 band — title + actions on the same rows, thin status strip under it */
.v360-band { gap: 12px; padding: 10px 16px; }
.v360-band .v360-img { width: 40px; height: 40px; font-size: 17px; }
.v360-band .v360-id { grid-template-columns: minmax(0, max-content) minmax(0, 1fr) auto; gap: 2px 10px; }
.v360-band .v360-id h2 { font-size: 17px; }
.v360-band .v360-id p { font-size: 12.5px; }
.v360-band .co-actions { grid-column: 3; grid-row: 1 / 3; flex-wrap: nowrap; justify-content: flex-end; gap: 6px; margin: 0; }
.v360-band .co-actions .btn { height: 32px; min-height: 32px; padding: 0 10px; font-size: 12.5px; color: inherit; background: none; border: 1px solid color-mix(in srgb, currentColor 35%, transparent); box-shadow: none; transform: none; }
.v360-band .co-actions .btn:hover { background: color-mix(in srgb, currentColor 14%, transparent); }
.v360-band .co-actions .btn-danger { color: #fff; background: var(--danger); border-color: var(--danger); }
.v360-band .co-actions .btn-danger:hover { background: var(--danger); filter: brightness(1.08); }
.v360-band :is(.head-btn, .v360-x) { height: 34px; }
.v360-band .head-btn:not(.primary):not(.lbl), .v360-x { width: 34px; }
body.is-embed .v360-band + .stepper { display: flex; flex-wrap: wrap; gap: 4px 18px; margin: 0; padding: 8px 16px; background: var(--bg-card); border-bottom: 1px solid var(--border-color); }
body.is-embed .v360-band + .stepper > li { padding: 0; border: 0; background: none; font-size: 12.5px; }
body.is-embed .v360-band + .stepper > li > b { font-weight: 600; }
body.is-embed .v360-band + .stepper > li.now > b { font-weight: 800; }
body.is-embed .v360-band + .stepper > li :is(ul, .btn) { display: none; }
@media (max-width: 991px) {
    .v360-band .v360-id { grid-template-columns: minmax(0, max-content) minmax(0, 1fr); }
    .v360-band .co-actions { grid-column: 1 / -1; grid-row: auto; flex-wrap: wrap; justify-content: flex-start; }
    .v360-band .co-actions .btn { height: 40px; min-height: 40px; }
}

/* medium split — 1–2 field money actions that still show what changes (860px, height fits) */
.modal.modal-split.is-md { width: min(90vw, 860px); max-width: min(90vw, 860px); height: auto; max-height: 90vh; }
.modal.modal-split.is-md .split-body { grid-template-columns: minmax(0, 1fr) minmax(280px, 1fr); }

/* plan form: a note under each include toggle (shown while on) + the website-card list */
.form-group .inc-note { margin-top: 8px; }
.inc-list { list-style: none; display: grid; gap: 8px; margin: 12px 0 0; padding: 0; }
.inc-list li { display: flex; gap: 8px; font-size: 14px; line-height: 1.4; color: var(--text-primary); }
.inc-list i { flex: none; margin-top: 3px; font-size: 12px; color: var(--accent-ink); }

/* vehicle page: picked pickup → drop-off, highlighted in the fare card */
.fare-when { display: grid; gap: 6px; padding: 12px 14px; border: 1px solid var(--lv-ring, var(--border-color)); border-radius: 12px; background: var(--lv-mint, var(--bg-secondary)); }
.fare-when[hidden] { display: none; }
.fw-pt { display: flex; align-items: flex-start; gap: 12px; min-width: 0; }
.fw-ic { display: inline-grid; place-items: center; flex: none; width: 36px; height: 36px; border-radius: 10px; background: var(--lv-btn, var(--navy-accent)); color: var(--lv-btn-ink, #fff); font-size: 14px; }
.fw-tx { display: flex; flex-direction: column; gap: 2px; min-width: 0; line-height: 1.3; }
.fw-tx small { font-size: 11.5px; letter-spacing: .04em; text-transform: uppercase; color: var(--lv-muted, var(--text-muted)); }
.fw-dt { display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 8px; }
.fw-dt b { font-size: 14px; font-weight: 600; color: var(--lv-char, var(--text-primary)); }
.fw-dt strong { font-size: 17px; font-weight: 700; color: var(--lv-gt, var(--navy-accent)); }
.fw-tx em { font-style: normal; font-size: 12.5px; color: var(--lv-muted, var(--text-muted)); overflow-wrap: anywhere; }
.fw-mid { display: flex; align-items: center; gap: 8px; padding-left: 12px; font-size: 12px; color: var(--lv-muted, var(--text-muted)); }
.fw-mid small { font-size: 12.5px; font-weight: 600; color: var(--lv-char, var(--text-primary)); }

/* searches + vehicle page: same hub / different drop-off (one-way) */
.sw-drop { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 10px 12px; margin-top: 12px; }
.sw-drop .hf-seg { height: 44px; }
.sw-drop .hf-seg button { display: inline-flex; align-items: center; justify-content: center; gap: 6px; padding: 0 14px; font-size: 14px; touch-action: manipulation; }
.sw-drop .sw-drop-hub { flex: 1 1 260px; min-width: 0; margin: 0; }
.sw-drop .sw-drop-hub[hidden] { display: none; }
.sw-drop label small { font-weight: 400; color: var(--text-muted); }
.fare-card .sw-drop { flex-direction: column; align-items: stretch; margin-top: 0; }
.fare-card .sw-drop .hf-seg, .fare-card .sw-drop .sw-drop-hub { flex: none; width: 100%; }
.fare-card .sw-drop .hf-seg { display: flex; } .fare-card .sw-drop .hf-seg button { flex: 1; }
@media (max-width: 768px) {
    .sw-drop { flex-direction: column; align-items: stretch; }
    .sw-drop .hf-seg { display: flex; width: 100%; } .sw-drop .hf-seg button { flex: 1; }
    .sw-drop .sw-drop-hub { flex: none; }
}
.site-card .bk-drop { margin-top: 12px; } .bk-drop i { color: var(--lv-gt, var(--navy-accent)); }

/* rider self-return: photos grid on the booking page, cues in My Rides */
.bk-ret h2 i { color: var(--lv-gt, var(--navy-accent)); margin-right: 6px; }
.sp-h { margin: 20px 0 4px; font-size: 16px; }
.sp-h i { margin-right: 6px; color: var(--lv-gt, var(--navy-accent)); }
.sp-checks { margin-bottom: 16px; }
.sp-accept { display: flex; align-items: center; gap: 10px; min-height: 44px; margin-bottom: 12px; font-weight: 600; cursor: pointer; }
.sp-accept input { width: 20px; height: 20px; flex: 0 0 20px; }
.sr-shots { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 12px; margin: 14px 0; }
.sr-shots .form-group { margin: 0; min-width: 0; }
.bk-ret .form-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.bk-ret .btn[type=submit] { margin-top: 6px; min-height: 46px; }
.bk-ret .hold-chip { margin-top: 12px; }
.ride-sr { color: var(--lv-gt, var(--navy-accent)); font-weight: 600; } .ride-sr em { font-style: normal; }
.ride-cta { display: inline-flex; align-items: center; gap: 6px; margin-top: 6px; padding: 6px 12px; border-radius: 9999px; background: var(--lv-btn, var(--navy-accent)); color: var(--lv-btn-ink, #fff); font-size: 13px; font-weight: 600; white-space: nowrap; }
@media (max-width: 480px) { .sr-shots { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); } .bk-ret .form-grid { grid-template-columns: minmax(0, 1fr); } }
.sr-thumbs { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 6px; margin-top: 10px; }
.sr-thumbs img { display: block; width: 100%; aspect-ratio: 1; object-fit: cover; border: 1px solid var(--border-color); border-radius: var(--r-ctrl, 6px); }

/* doorstep delivery: courier's sharing chip (tasks) + the rider's live map (booking page) */
.tk-track { display: flex; align-items: center; gap: 8px; margin: 0 0 12px; padding: 10px 14px; border: 1px solid var(--border-color); border-radius: var(--r-ctrl, 6px); background: color-mix(in srgb, var(--navy-accent) 8%, var(--bg-card)); color: var(--text-primary); font-size: 14px; }
.tk-track[hidden] { display: none; } .tk-track i { color: var(--accent-ink); }
.bk-trk h2 i { color: var(--lv-gt, var(--navy-accent)); margin-right: 6px; }
.trk-map { position: relative; isolation: isolate; z-index: 0; height: 300px; margin-top: 12px; border: 1px solid var(--border-color); border-radius: 12px; overflow: hidden; background: var(--bg-secondary); }
.trk-meta { margin: 10px 0 0; font-size: 13px; color: var(--text-muted); } .trk-meta i { color: var(--lv-gt, var(--navy-accent)); }
.trk-pin { display: grid !important; place-items: center; border: 3px solid var(--bg-card); border-radius: 50%; background: var(--lv-btn, var(--navy-accent)); color: var(--lv-btn-ink, #fff); font-size: 15px; box-shadow: 0 2px 8px rgba(0, 0, 0, .3); }
.trk-pin.is-hub { background: var(--lv-forest, var(--navy-primary)); font-size: 12px; }
@media (max-width: 480px) { .trk-map { height: 240px; } }

/* cab + tours (public): page head, cab booking form beside the map, ride cards, tour detail, operator form */
@media (max-width: 1100px) { .site-links a[href="partner.php"] { display: none !important; } }
.cab-hero { padding: 32px 0 8px; } .cab-hero h1 { margin: 0 0 6px; font-size: clamp(26px, 4vw, 38px); color: var(--lv-char, var(--text-primary)); } .cab-hero h1 i { color: var(--lv-gt, var(--navy-accent)); margin-right: 8px; }
.cab-page, .tour-page { padding-bottom: 32px; }
.cab-layout { display: grid; grid-template-columns: minmax(0, 440px) minmax(0, 1fr); gap: 16px; align-items: start; margin-top: 12px; }
.cab-form { display: flex; flex-direction: column; gap: 12px; padding: 18px; }
.cab-form .form-group { margin: 0; position: relative; min-width: 0; }
.cab-in { display: flex; gap: 8px; } .cab-in input { flex: 1; min-width: 0; min-height: 46px; font-size: 16px; } .cab-in .btn-icon { flex: none; width: 46px; height: 46px; }
.cab-sug { position: absolute; left: 0; right: 0; top: 100%; z-index: 30; margin: 4px 0 0; padding: 4px; list-style: none; background: var(--bg-card); border: 1px solid var(--border-color); border-radius: 10px; box-shadow: 0 8px 24px var(--shadow-color); max-height: 260px; overflow-y: auto; }
.cab-sug[hidden] { display: none; }
.cab-sug button { display: flex; gap: 8px; width: 100%; padding: 10px; border: 0; border-radius: 8px; background: none; color: var(--text-primary); font: inherit; font-size: 14px; text-align: left; cursor: pointer; touch-action: manipulation; }
.cab-sug button:hover, .cab-sug button:focus-visible { background: var(--lv-mint, var(--bg-secondary)); } .cab-sug i { margin-top: 3px; color: var(--lv-gt, var(--navy-accent)); } .cab-none { padding: 10px; font-size: 13px; color: var(--text-muted); }
.cab-when { display: flex; width: 100%; height: 44px; } .cab-when button { flex: 1; } #cabAt { margin-top: 8px; width: 100%; min-height: 46px; font-size: 16px; }
.cab-types { display: grid; gap: 8px; margin: 0; padding: 0; border: 0; } .cab-types legend { margin-bottom: 6px; font-size: 12.5px; color: var(--lv-c83, var(--text-secondary)); }
.cab-type { display: flex; align-items: center; gap: 12px; min-height: 60px; padding: 10px 12px; border: 1px solid var(--border-color); border-radius: 12px; cursor: pointer; touch-action: manipulation; }
.cab-type input { position: absolute; opacity: 0; pointer-events: none; }
.cab-type:has(input:checked) { border-color: var(--lv-btn, var(--navy-accent)); background: var(--lv-mint, var(--bg-secondary)); }
.cab-type:has(input:focus-visible) { outline: 2px solid var(--lv-ring, var(--navy-accent)); outline-offset: 2px; }
.cab-ic { display: inline-grid; place-items: center; flex: none; width: 40px; height: 40px; border-radius: 10px; background: var(--lv-btn, var(--navy-accent)); color: var(--lv-btn-ink, #fff); }
.cab-tx { display: flex; flex-direction: column; flex: 1; min-width: 0; } .cab-tx small { font-size: 12.5px; color: var(--text-muted); }
.cab-px { flex: none; font-size: 17px; color: var(--lv-char, var(--text-primary)); }
.cab-book { min-height: 48px; justify-content: center; }
.cab-map { position: sticky; top: 88px; isolation: isolate; z-index: 0; height: min(70vh, 620px); border: 1px solid var(--border-color); border-radius: 16px; overflow: hidden; background: var(--bg-secondary); }
.cab-rides { margin-top: 24px; } .cab-rides h2 { font-size: 20px; } .cab-rides h2 i { color: var(--lv-gt, var(--navy-accent)); margin-right: 6px; }
.cab-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 12px; }
.cab-ride { display: flex; flex-direction: column; gap: 8px; padding: 16px; } .cab-ride p { margin: 0; }
.cab-ride-h { display: flex; align-items: center; gap: 8px; } .cab-ride-h strong { margin-left: auto; font-size: 17px; }
.cab-route { font-size: 14px; line-height: 1.6; } .cab-route i { width: 18px; color: var(--lv-gt, var(--navy-accent)); }
.cab-drv i, .cab-drv a i { color: var(--lv-gt, var(--navy-accent)); }
.cab-code { padding: 8px 12px; border-radius: 10px; background: var(--lv-mint, var(--bg-secondary)); font-size: 14px; } .cab-code b { font-size: 18px; letter-spacing: .2em; }
.hp-field { position: absolute; left: -10000px; width: 1px; height: 1px; opacity: 0; }
.tour-back { margin: 16px 0 8px; } .tour-back a { color: var(--lv-gt, var(--navy-accent)); }
.tour-hero { aspect-ratio: 16 / 10; display: grid; place-items: center; overflow: hidden; font-size: 48px; color: var(--text-muted); } .tour-hero img { width: 100%; height: 100%; object-fit: cover; }
.tour-h1 { margin: 16px 0 8px; font-size: clamp(24px, 3.5vw, 34px); }
.tour-facts { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 12px; padding: 0; list-style: none; }
.tour-facts li { display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; border: 1px solid var(--border-color); border-radius: 9999px; font-size: 13.5px; } .tour-facts i { color: var(--lv-gt, var(--navy-accent)); }
.tour-itin { display: grid; gap: 0; margin: 0; padding: 0; list-style: none; }
.tour-itin li { display: grid; grid-template-columns: 84px minmax(0, 1fr); column-gap: 12px; padding: 10px 0; border-top: 1px solid var(--border-light, var(--border-color)); }
.tour-itin li:first-child { border-top: 0; } .tour-itin small { grid-column: 2; color: var(--text-muted); } .ti-t { grid-row: span 2; font-weight: 600; color: var(--lv-gt, var(--navy-accent)); }
.fare-card h2 small { font-size: 13px; font-weight: 400; color: var(--text-muted); }
.tour-mine { margin-top: 12px; padding: 16px; } .tour-mine h3 { margin: 0 0 8px; font-size: 16px; } .tour-mine p { margin: 6px 0; font-size: 14px; }
.tour-op { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr); gap: 24px; margin-top: 28px; }
.tour-op h2 i { color: var(--lv-gt, var(--navy-accent)); margin-right: 6px; } .tour-op-form .btn { margin-top: 12px; min-height: 46px; }
.tr-photos { display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: 8px; margin-bottom: 12px; }
.tr-photos figure { position: relative; margin: 0; } .tr-photos img { display: block; width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border: 1px solid var(--border-color); border-radius: var(--r-ctrl, 6px); }
.tr-photos .act { position: absolute; top: 4px; right: 4px; background: var(--bg-card); }
@media (max-width: 900px) {
    .cab-layout { grid-template-columns: minmax(0, 1fr); } .cab-map { position: relative; top: 0; height: 280px; order: -1; }
    .tour-op { grid-template-columns: minmax(0, 1fr); }
}

/* storefront header: bell + language (icon buttons, phones too) */
.site-body .site-ico { position: relative; display: inline-flex; align-items: center; justify-content: center; gap: 6px; flex: none; min-width: 40px; height: 40px; padding: 0 10px; border: 1px solid var(--lv-line); border-radius: 9999px; background: transparent; color: var(--lv-char); font: inherit; font-size: 14px; cursor: pointer; touch-action: manipulation; }
.site-body .site-ico:hover, .site-body .site-ico:focus-visible { background: var(--lv-c04); }
.site-ico-n { position: absolute; top: -4px; right: -4px; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9999px; background: var(--lv-btn); color: var(--lv-btn-ink); font-size: 11px; font-style: normal; font-weight: 700; line-height: 18px; text-align: center; }
.site-ico-n[hidden] { display: none; }
.site-lang-code { font-size: 12px; font-weight: 700; }
.site-bell-menu { width: min(360px, calc(100vw - 32px)); padding: 0; }
.site-bell-menu .sb-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 10px 12px; border-bottom: 1px solid var(--lv-line); }
.site-bell-menu .sb-head b { display: inline-flex; align-items: center; gap: 8px; color: var(--lv-char); }
.sb-all { min-height: 36px; padding: 0 8px; border: 0; background: none; color: var(--lv-muted); font: inherit; font-size: 13px; cursor: pointer; }
.sb-all:hover, .sb-all:focus-visible { color: var(--lv-char); }
.sb-list { max-height: min(60vh, 420px); overflow-y: auto; padding: 6px; }
.site-user-menu .sb-item { align-items: flex-start; gap: 10px; min-height: 0; padding: 10px 12px; }
.sb-item span { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.sb-item b { color: var(--lv-char); font-weight: 600; }
.sb-item small { color: var(--lv-muted); font-size: 13px; overflow-wrap: anywhere; }
.sb-item small.sb-when { font-size: 12px; }
.sb-item.is-new { background: var(--lv-c04); }
.sb-item.is-new b::after { content: ''; display: inline-block; width: 7px; height: 7px; margin-left: 6px; border-radius: 50%; background: var(--lv-btn); vertical-align: middle; }
.sb-empty { margin: 0; padding: 20px 12px; color: var(--lv-muted); text-align: center; }
.site-lang-menu { min-width: 200px; max-height: 360px; overflow-y: auto; }
.site-lang-menu button { display: flex; align-items: center; gap: 10px; width: 100%; min-height: 44px; padding: 0 12px; border: 0; border-radius: var(--r-ctrl); background: none; color: var(--lv-char); font: inherit; text-align: start; cursor: pointer; }
.site-lang-menu button:hover, .site-lang-menu button:focus-visible, .site-lang-menu button.is-on { background: var(--lv-c04); }
.site-lang-menu button.is-on { font-weight: 700; }
.site-lang-menu small { margin-inline-start: auto; color: var(--lv-muted); font-size: 12px; }
.site-lang-menu button i { color: var(--lv-char); font-size: 12px; }
@media (max-width: 768px) { .site-lang-code { display: none; } .site-body .site-ico { padding: 0; width: 40px; } .site-user-menu.site-bell-menu, .site-user-menu.site-lang-menu { position: fixed; top: 64px; right: 16px; left: auto; } }
/* google translate: hide its own bar + tooltips, our menu drives it */
.goog-te-banner-frame, .goog-te-banner-frame.skiptranslate, .skiptranslate iframe { display: none !important; visibility: hidden !important; }
body.site-body { top: 0 !important; position: static !important; }
.goog-tooltip, .goog-tooltip:hover, #goog-gt-tt, .goog-te-balloon-frame { display: none !important; }
.goog-text-highlight { background: none !important; box-shadow: none !important; }
font[style] { background: transparent !important; box-shadow: none !important; }
#google_translate_element { display: none; }
/* rider photo + greeting */
.site-ava { width: 26px; height: 26px; border-radius: 50%; object-fit: cover; }
.my-hello { display: flex; align-items: center; gap: 14px; margin: 0 0 10px; }
.my-hello h1 { margin: 0; }
.my-hello small { display: inline-flex; align-items: center; gap: 6px; color: var(--text-secondary); font-size: 14px; }
.my-ava { display: inline-grid; place-items: center; flex: none; width: 56px; height: 56px; overflow: hidden; border: 1px solid var(--border-color); border-radius: 50%; background: rgba(var(--navy-accent-rgb), .08); color: var(--accent-ink); font-size: 18px; font-weight: 700; }
.my-ava img { width: 100%; height: 100%; object-fit: cover; }
.my-ava-lg { width: 88px; height: 88px; font-size: 26px; }
.my-photo { display: grid; grid-template-columns: auto minmax(0, 1fr); align-items: center; gap: 16px; }
.my-photo .form-actions { grid-column: 1 / -1; justify-content: flex-end; }
@media (max-width: 768px) { .my-photo { grid-template-columns: minmax(0, 1fr); justify-items: center; } .my-photo .form-group { width: 100%; } }
/* blog categories */
.lv-blog-cats { margin: 0 0 20px; }
.lv-blog-cats em { font-style: normal; color: var(--lv-muted); margin-left: 2px; }
@media (max-width: 768px) { .lv-blog-cats { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; padding-bottom: 2px; } .lv-blog-cats::-webkit-scrollbar { display: none; } .lv-blog-cats a { flex: none; } }
/* vehicle page: fast charging note */
.veh-fast { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; margin: 0 0 16px; padding: 12px 14px; border: 1px solid var(--lv-line); border-radius: 12px; color: var(--lv-c83); }
.veh-fast > i { color: var(--lv-char); }
.veh-fast a { color: var(--lv-char); font-weight: 600; text-decoration: none; }

/* social icons keep their own brand colours in light and dark */
.social-row a.sn-facebook, .social-row a.sn-instagram, .social-row a.sn-youtube, .social-row a.sn-x, .social-row a.sn-linkedin, .social-row a.sn-whatsapp { background: #ffffff; border-color: rgba(0, 0, 0, .08); }
.social-row a.sn-facebook, .site-body .site-foot .social-row a.sn-facebook { color: #1877f2; }
.social-row a.sn-instagram, .site-body .site-foot .social-row a.sn-instagram { color: #e4405f; }
.social-row a.sn-youtube, .site-body .site-foot .social-row a.sn-youtube { color: #ff0000; }
.social-row a.sn-x, .site-body .site-foot .social-row a.sn-x { color: #000000; }
.social-row a.sn-linkedin, .site-body .site-foot .social-row a.sn-linkedin { color: #0a66c2; }
.social-row a.sn-whatsapp, .site-body .site-foot .social-row a.sn-whatsapp { color: #25d366; }
.social-row a[class^="sn-"]:hover, .site-body .site-foot .social-row a[class^="sn-"]:hover { background: #ffffff; opacity: .85; }
.site-body .site-foot .social-row a[class^="sn-"] { background: #ffffff; border-color: transparent; }

/* vehicle card: cashback + pickup place (red) on one row */
.sc-tags { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; margin: 6px 0 2px; }
.sc-tags .cb-tag { margin: 0; }
.sc-pick { display: inline-flex; align-items: center; gap: 5px; max-width: 100%; color: var(--danger, #dc2626); font-size: 12.5px; font-weight: 600; overflow-wrap: anywhere; }

/* leaderboard photos */
.lb-av { overflow: hidden; }
.lb-av img { width: 100%; height: 100%; object-fit: cover; }

/* FAQ: right-edge tab + sheet, See more */
.faq-fab { position: fixed; right: 0; top: 50%; z-index: 900; display: inline-flex; align-items: center; justify-content: center; width: 40px; min-height: 120px; padding: 14px 0; border: 0; border-radius: 4px 0 0 4px; background: var(--lv-btn, var(--navy-primary)); color: var(--lv-btn-ink, #fff); font: inherit; font-size: 15px; font-weight: 700; line-height: 1; transform: translateY(-50%); cursor: pointer; touch-action: manipulation; box-shadow: -4px 4px 14px rgba(0, 0, 0, .16); }
.faq-fab span { writing-mode: vertical-rl; text-orientation: upright; letter-spacing: 6px; }
.faq-fab i { display: none; }
.faq-fab span::after { content: 'S'; }
.faq-fab:hover, .faq-fab:focus-visible { width: 44px; }
.faq-fab:focus-visible { outline: 2px solid var(--lv-btn-ink, #fff); outline-offset: -4px; }
.faq-more { margin-top: 14px; }
@media (max-width: 768px) { .faq-fab { width: 34px; min-height: 104px; padding: 12px 0; font-size: 13px; } .faq-fab span { letter-spacing: 4px; } .faq-fab:hover, .faq-fab:focus-visible { width: 34px; } }

/* a full AI-made page runs in its own frame */
.cms-raw { display: block; width: 100%; min-height: 480px; border: 0; background: transparent; }

/* dashboard: arrange cards */
.dash-edit .dk-off { opacity: .4; }
body:not(.dash-edit) .dk-off { display: none !important; }
.dash-edit :is(.lte-card, .small-box, .info-box, .ad-sec) { position: relative; outline: 1px dashed var(--navy-accent); outline-offset: 2px; cursor: grab; }
.dash-edit .dk-drag { opacity: .5; }
.dk-bar { position: absolute; top: 6px; right: 6px; z-index: 5; display: inline-flex; gap: 4px; padding: 3px; border: 1px solid var(--border-color); border-radius: var(--r-ctrl, 6px); background: var(--bg-card); box-shadow: 0 4px 12px var(--shadow-color); }
.dk-bar button, .dk-grip { display: inline-grid; place-items: center; width: 32px; height: 32px; border: 0; border-radius: var(--r-ctrl, 6px); background: none; color: var(--text-secondary); cursor: pointer; }
.dk-bar button:hover, .dk-bar button:focus-visible { background: rgba(var(--navy-accent-rgb), .1); color: var(--accent-ink); }
.dk-grip { cursor: grab; }
.dk-tools { position: fixed; left: 50%; bottom: calc(20px + env(safe-area-inset-bottom)); z-index: 1300; display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 10px; width: max-content; max-width: calc(100vw - 32px); padding: 10px 14px; border: 1px solid var(--border-color); border-radius: var(--r-panel, 10px); background: var(--bg-card); color: var(--text-primary); box-shadow: 0 10px 28px var(--shadow-color); transform: translateX(-50%); }
@media (max-width: 768px) { .dk-tools { bottom: calc(96px + env(safe-area-inset-bottom)); } .dk-grip { display: none; } }

/* cab: trip type, packages, what riders get */
.cab-mode, .cab-way { display: flex; width: 100%; height: auto; min-height: 44px; margin-bottom: 12px; }
.cab-mode button, .cab-way button { flex: 1; min-height: 38px; }
.cab-in .btn-icon + .btn-icon { margin-left: 0; }
.cab-am { display: flex; flex-wrap: wrap; gap: 4px 8px; margin-top: 4px; }
.cab-am em { display: inline-flex; align-items: center; gap: 4px; font-size: 12px; font-style: normal; color: var(--text-secondary); }
.cab-am em i { color: var(--accent-ink); font-size: 10px; }
.cab-pk { color: var(--accent-ink); font-weight: 600; }
.cab-type.is-off { opacity: .5; cursor: not-allowed; }
.cab-pkgs { display: flex; flex-direction: column; gap: 8px; margin-bottom: 10px; }
.cab-pkg { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)) 44px; align-items: end; gap: 8px; }
.cab-pkg .form-group { margin: 0; }
@media (max-width: 768px) { .cab-mode, .cab-way { flex-wrap: wrap; } .cab-mode button { flex: 1 1 30%; } }

/* sign in with a mobile OTP */
.auth-otp-open { width: 100%; justify-content: center; }
.auth-otp { margin-top: 14px; }
.auth-otp-msg { min-height: 18px; margin: 0 0 10px; font-size: 13px; color: var(--text-secondary); }
.auth-otp-msg.is-bad { color: var(--danger, #dc2626); }

/* careers */
.jobs-list { display: flex; flex-direction: column; gap: 12px; }
.jobs-card { display: grid; grid-template-columns: 48px minmax(0, 1fr) auto; align-items: center; gap: 16px; color: var(--lv-char, var(--text-primary)); text-decoration: none; }
.jobs-ico { display: grid; place-items: center; width: 48px; height: 48px; border-radius: 12px; background: var(--lv-c04, rgba(var(--navy-accent-rgb), .08)); color: var(--lv-char, var(--navy-accent)); }
.jobs-tx { display: flex; flex-direction: column; gap: 4px; min-width: 0; } .jobs-tx small { color: var(--lv-muted, var(--text-muted)); }
.jobs-tags { display: flex; flex-wrap: wrap; gap: 6px 14px; } .jobs-tags em { display: inline-flex; align-items: center; gap: 5px; font-size: 13px; font-style: normal; color: var(--lv-muted, var(--text-muted)); }
.jobs-go { font-weight: 600; white-space: nowrap; }
.jobs-one { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); align-items: start; gap: 24px; }
.jobs-meta { display: flex; flex-wrap: wrap; gap: 8px 18px; margin: 10px 0 14px; padding: 0; list-style: none; color: var(--lv-muted, var(--text-muted)); }
.jobs-apply { position: sticky; top: 90px; }
@media (max-width: 900px) { .jobs-one { grid-template-columns: minmax(0, 1fr); } .jobs-apply { position: static; } .jobs-card { grid-template-columns: 40px minmax(0, 1fr); } .jobs-go { grid-column: 2; } }

/* local ads */
.lv-ads .lv-adcats { margin: 0 0 16px; }
.lv-ad { padding-bottom: 16px; }
.lv-ad small, .lv-ad b, .lv-ad span, .lv-ad .lv-ad-shop { padding: 0 20px; }
.lv-ad small { font-size: 12px; color: var(--lv-muted); }
.lv-ad span { font-size: 14px; color: var(--lv-muted); }
.lv-ad .lv-ad-shop { display: inline-flex; align-items: center; gap: 6px; margin-top: auto; font-size: 13px; font-style: normal; font-weight: 600; color: var(--lv-char); }
.lv-ad-ico { display: grid; place-items: center; aspect-ratio: 16 / 9; margin-bottom: 10px; background: var(--lv-c04); color: var(--lv-muted); font-size: 32px; }
.ad-rates { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin-bottom: 20px; }
.ad-rates .site-card { display: flex; flex-direction: column; gap: 4px; } .ad-rates small { color: var(--text-muted); } .ad-rates b { font-size: 22px; }
@media (max-width: 768px) { .ad-rates { grid-template-columns: repeat(2, minmax(0, 1fr)); } .lv-adcats { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; } .lv-adcats a { flex: none; } }

/* shop */
.shop-tools { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin-bottom: 18px; }
.shop-tools .hf-field { flex: 1 1 240px; max-width: 360px; }
.shop-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 16px; }
.shop-card { display: flex; flex-direction: column; gap: 6px; }
.shop-card[hidden] { display: none; }
.shop-card h3 { margin: 0; font-size: 16px; }
.shop-card small { color: var(--text-muted); }
.shop-card .btn { margin-top: auto; }
.shop-img { display: grid; place-items: center; aspect-ratio: 1 / 1; margin-bottom: 6px; padding: 0; overflow: hidden; border: 0; border-radius: var(--r-ctrl, 8px); background: var(--bg-secondary); color: var(--text-muted); font-size: 32px; cursor: pointer; }
.shop-img img { width: 100%; height: 100%; object-fit: cover; }
.shop-price { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px; margin: 0; } .shop-price b { font-size: 18px; } .shop-price s { color: var(--text-muted); font-size: 13px; } .shop-price em { color: var(--success, #16a34a); font-size: 12px; font-style: normal; font-weight: 700; }
.shop-cart-btn em { margin-left: 4px; font-style: normal; }
.shop-cart { width: min(620px, 100%); }
.shop-lines { display: flex; flex-direction: column; gap: 10px; margin: 0 0 16px; padding: 0; list-style: none; }
.shop-lines li { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; align-items: center; gap: 12px; padding-bottom: 10px; border-bottom: 1px solid var(--border-color); }
.shop-lines li span:first-child { display: flex; flex-direction: column; min-width: 0; } .shop-lines small { color: var(--text-muted); }
.shop-qty { display: inline-flex; align-items: center; gap: 8px; } .shop-qty button { display: grid; place-items: center; width: 36px; height: 36px; border: 1px solid var(--border-color); border-radius: var(--r-ctrl, 6px); background: var(--bg-card); color: var(--text-primary); cursor: pointer; }
.shop-pics { display: grid; grid-auto-flow: column; grid-auto-columns: 100%; gap: 8px; overflow-x: auto; scroll-snap-type: x mandatory; margin-bottom: 12px; } .shop-pics img { width: 100%; aspect-ratio: 1 / 1; object-fit: cover; border-radius: var(--r-ctrl, 8px); scroll-snap-align: start; }
.shop-keep { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.shop-keep-ph { position: relative; } .shop-keep-ph img { width: 72px; height: 72px; object-fit: cover; border: 1px solid var(--border-color); border-radius: var(--r-ctrl, 6px); }
.shop-keep-ph button { position: absolute; top: -6px; right: -6px; display: grid; place-items: center; width: 24px; height: 24px; border: 1px solid var(--border-color); border-radius: 50%; background: var(--bg-card); color: var(--text-secondary); cursor: pointer; }
.tb-prod { display: inline-flex; align-items: center; gap: 10px; } .tb-prod img { width: 36px; height: 36px; object-fit: cover; border-radius: var(--r-ctrl, 6px); } .tb-prod > i { width: 36px; text-align: center; color: var(--text-muted); }
@media (max-width: 768px) { .shop-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; } .shop-lines li { grid-template-columns: minmax(0, 1fr) auto; } .shop-lines li > b { grid-column: 2; } }
.my-finish { max-width: 720px; }
.lv-ad[hidden] { display: none; }
/* faq panel: fills a fixed, clipped box, so sliding it off the right edge can never widen the page */
.faq-dock { position: fixed; inset: 0; z-index: 1200; overflow: hidden; visibility: hidden; pointer-events: none; transition: visibility 0s linear .28s; }
.faq-dock.is-open { visibility: visible; pointer-events: auto; transition-delay: 0s; }
.faq-dock [hidden] { display: none !important; }
.faq-shade { position: absolute; inset: 0; background: rgba(0, 0, 0, .45); opacity: 0; transition: opacity .28s ease; }
.faq-dock.is-open .faq-shade { opacity: 1; }
.faq-panel { position: absolute; top: 0; right: 0; bottom: 0; display: flex; flex-direction: column; width: min(420px, 100%); background: var(--lv-cream, var(--bg-card)); color: var(--lv-char, var(--text-primary)); box-shadow: -12px 0 32px rgba(0, 0, 0, .18); transform: translateX(100%); transition: transform .28s cubic-bezier(.2, .8, .2, 1); }
.faq-dock.is-open .faq-panel { transform: none; }
.faq-top { display: flex; align-items: center; gap: 8px; padding: 10px 12px; border-bottom: 1px solid var(--lv-line, var(--border-color)); }
.faq-top h2 { flex: 1; min-width: 0; margin: 0 0 0 4px; font-size: 18px; font-weight: 700; line-height: 1.2; }
.faq-ibtn { display: grid; place-items: center; flex: 0 0 44px; width: 44px; height: 44px; padding: 0; border: 0; border-radius: 9999px; background: transparent; color: inherit; font-size: 18px; cursor: pointer; touch-action: manipulation; }
.faq-ibtn:hover, .faq-ibtn:focus-visible { background: var(--lv-c04, var(--border-color)); }
.faq-scroll { flex: 1; min-height: 0; padding: 16px 16px calc(16px + env(safe-area-inset-bottom)); overflow-y: auto; overscroll-behavior: contain; }
.faq-cats { display: grid; gap: 8px; }
.faq-cat { display: flex; align-items: center; gap: 12px; width: 100%; min-height: 56px; padding: 10px 12px; border: 1px solid var(--lv-line, var(--border-color)); border-radius: 12px; background: var(--lv-white, var(--bg-card)); color: inherit; font: inherit; text-align: left; cursor: pointer; touch-action: manipulation; }
.faq-cat:hover, .faq-cat:focus-visible { border-color: var(--lv-btn, var(--navy-accent)); }
.faq-cat b { flex: 1; min-width: 0; font-size: 15px; font-weight: 600; }
.faq-cat small { color: var(--lv-muted, var(--text-muted)); font-size: 13px; font-variant-numeric: tabular-nums; }
.faq-cat > .fa-chevron-right { color: var(--lv-muted, var(--text-muted)); font-size: 12px; }
.faq-cat-ico { display: grid; place-items: center; flex: 0 0 36px; height: 36px; border-radius: 10px; background: var(--lv-mint, var(--border-color)); color: var(--lv-gt, var(--navy-accent)); font-size: 15px; }
@media (prefers-reduced-motion: reduce) { .faq-dock, .faq-shade, .faq-panel { transition: none; } }
/* pickup link on the vehicle cards */
a.sc-pick { text-decoration: none; cursor: pointer; touch-action: manipulation; }
.lv-head-acts { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.sc-pick em { font-style: normal; opacity: .8; }
.sc-pick small { font-size: 12px; font-weight: 600; color: var(--lv-muted, var(--text-muted)); }
.rent-near { margin: 0 0 12px; }
.rent-near .lv-btn[hidden], .lv-head-acts .lv-btn[hidden] { display: none; }
@media (max-width: 768px) { a.sc-pick { min-height: 44px; } }
/* km limit on a ride: the whole line stays readable at 390px */
.ride-body small.ride-km { white-space: normal; overflow: visible; }
/* local ads under My Rides */
.site-wrap + .lv-ads { padding-top: 48px; }
/* booking confirmed popup */
.rs-pop:has(.bk-ok) .rs-pop-head { display: none; }
.bk-ok { display: grid; justify-items: center; gap: 6px; padding: 8px 0 4px; text-align: center; }
.bk-ok h3 { margin: 10px 0 0; font-size: 22px; font-weight: 700; }
.bk-ok-no { margin: 0; color: var(--text-secondary); font-weight: 600; }
.bk-ok-l { display: flex; align-items: center; justify-content: center; gap: 8px; margin: 0; color: var(--text-secondary); font-size: 14px; }
.bk-tick { position: relative; display: grid; place-items: center; width: 84px; height: 84px; border-radius: 50%; background: var(--success); color: #fff; font-size: 38px; animation: bkPop .45s cubic-bezier(.2, 1.4, .4, 1) both; }
.bk-tick::after { content: ""; position: absolute; inset: 0; border-radius: 50%; border: 3px solid var(--success); animation: bkRing .9s ease-out .2s both; }
.bk-tick i { animation: bkPop .35s cubic-bezier(.2, 1.4, .4, 1) .18s both; }
@keyframes bkPop { from { opacity: 0; transform: scale(.4); } to { opacity: 1; transform: scale(1); } }
@keyframes bkRing { from { opacity: .7; transform: scale(1); } to { opacity: 0; transform: scale(1.6); } }
@media (prefers-reduced-motion: reduce) { .bk-tick, .bk-tick i, .bk-tick::after { animation: none; } .bk-tick::after { opacity: 0; } }
/* live bill on the return step */
.in-bill .kv dd:last-of-type { font-weight: 700; }
/* date + time boxes: value painted as DD-MM-YYYY / 12-hour over the native control */
.rs-dtf { position: relative; display: block; width: 100%; min-width: 0; }
.rs-dtf > input { width: 100%; }
.rs-dtf > input::-webkit-datetime-edit, .rs-dtf > input::-webkit-date-and-time-value { opacity: 0; }
.rs-dtf > input::-webkit-calendar-picker-indicator { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; padding: 0; opacity: 0; cursor: pointer; }
.rs-dtf-v { position: absolute; inset: 0; display: flex; align-items: center; overflow: hidden; color: var(--lv-char, var(--text-primary)); white-space: nowrap; pointer-events: none; }
.rs-dtf-v.is-empty { color: var(--lv-muted, var(--text-muted)); }
.rs-dtf::after { content: "\f073"; position: absolute; top: 50%; right: 10px; color: var(--lv-muted, var(--text-muted)); font: 400 14px/1 "Font Awesome 6 Free"; transform: translateY(-50%); pointer-events: none; }
.rs-dtf:has(> input[type="time"])::after { content: "\f017"; }
.rs-dtf:has(> input[hidden]) { display: none; }
.hf-field > .rs-dtf { height: 100%; }
@supports (-moz-appearance: none) { .rs-dtf > input { color: transparent; } }
/* phones: the header row must fit the screen, or every page slides left-right. logo mark only, text stays when there is no image */
@media (max-width: 480px) {
    .site-body .site-logo:has(img) span { display: none; }
    .site-head .site-wrap { gap: 6px; }
    .site-nav { min-width: 0; gap: 2px; }
}
/* dark mode's global text rule outranks an element's own colour: anything on a coloured fill keeps its ink */
body.dark-mode.site-body :is(.rn-promo-btn, .lv-pt.is-ev, .lv-live-tag, .faq-fab span, .ride-cta) { color: var(--lv-btn-ink) !important; }
body.dark-mode.site-body .rn-promo.is-light .rn-promo-btn { color: var(--lv-cream) !important; }
body.dark-mode.site-body .site-meta a { color: var(--lv-acc); }

/* readable colour pairs: ink on a fill, accent as text. any palette or brand colour */
body { --on-accent: #fff; --on-primary: #fff; --accent-ink: color-mix(in srgb, var(--navy-accent) 55%, #000); --accent-ink-dark: color-mix(in srgb, var(--navy-accent) 60%, #fff); }
@supports (color: lch(from #000 calc(l) c h)) {
    body { --on-accent: lch(from var(--navy-accent) calc((50 - l) * 100) 0 0); --on-primary: lch(from var(--navy-primary) calc((50 - l) * 100) 0 0);
        --accent-ink: lch(from var(--navy-accent) min(l, 44) c h); --accent-ink-dark: lch(from var(--navy-accent) max(l, 72) c h); }
    body.site-body, body.lv-auth { --lv-btn-ink: var(--lvx-btn-ink, lch(from var(--lv-btn) calc((50 - l) * 100) 0 0)); }
}
body.dark-mode, html:not([data-sb="light"]) .sidebar { --accent-ink: var(--accent-ink-dark); }
body { --ok-ink: color-mix(in srgb, var(--success) 62%, #000); --bad-ink: color-mix(in srgb, var(--danger) 78%, #000); }
body.dark-mode { --ok-ink: color-mix(in srgb, var(--success) 70%, #fff); --bad-ink: color-mix(in srgb, var(--danger) 70%, #fff); }
.flt-head .close-btn { color: var(--text-primary); }
.site-body .site-nav > a.lv-btn i { color: inherit; }
.rbac-scope-btn:not(.on) { color: var(--text-secondary); }
body.dark-mode .rbac-scope-btn:not(.on) { color: var(--text-secondary); }
.cb-tag { color: var(--ok-ink); }
body.site-body .modal-header, body.lv-auth .modal-header { background: var(--bg-card); color: var(--text-primary); }
body.site-body .modal-header .close-btn, body.lv-auth .modal-header .close-btn { color: var(--text-primary); }
.tabulator .tabulator-footer .tabulator-page.active:hover { background: var(--navy-accent); border-color: var(--navy-accent); color: var(--on-accent); }
.btn-secondary :is(i, span) { color: inherit !important; }
body.site-body .site-menu :is(.btn-primary, .lv-btn-dark) i { color: inherit; }
.leaflet-container .leaflet-bar a, .leaflet-container .leaflet-bar a:hover, .leaflet-container .leaflet-bar a span { background: var(--bg-card); color: var(--text-primary) !important; }
.leaflet-container .leaflet-control-attribution { background: var(--bg-card) !important; color: var(--text-secondary) !important; }
@supports (color: lch(from #000 calc(l) c h)) {
    body.site-body, body.lv-auth { --lv-gt: lch(from var(--lv-btn) min(l, 44) c h); }
    body.dark-mode.site-body, body.dark-mode.lv-auth { --lv-gt: var(--lv-acc); }
    .sc-demo-btn { color: lch(from var(--sc-btn) calc((50 - l) * 100) 0 0); }
    .v360-kpi-ico { color: lch(from var(--k) calc((50 - l) * 100) 0 0); }
    .pipeline-stage { color: lch(from var(--pc, var(--navy-primary)) calc((50 - l) * 100) 0 0) !important; }
    html[data-ui="soft"] .small-box { --sbx-ink: lch(from var(--sbx) min(l, 44) c h); }
    body.dark-mode .small-box { --sbx-ink: lch(from var(--sbx) max(l, 72) c h); }
    html[data-ui="soft"] .small-box-footer, html[data-ui="soft"] .small-box-footer:hover { color: var(--sbx-ink); }
}
