/* ================================================

EVNTO APP


   TABLE OF CONTENTS
   1.  CSS Variables (Themes)
   2.  Reset & Base
   3.  Layout
   4.  Sidebar
   5.  Grid System
   6.  Cards & Panels
   7.  Buttons
   8.  Form Elements
   9.  Badges & Status
   10. Notifications & Dropdowns
   11. Navigation Tabs
   12. Accordion
   13. Tables
   14. Auth Pages
   15. Documents
   16. To-Do / Activity
   17. Invoices & Billing
   18. Events
   19. Modals
   20. Checklist / Check Rows
   21. Timeline
   22. Account & Profile
   23. Business & Units
   24. Menu Builder
   25. Preferences
   26. Applications
   27. Animations
   28. Calendar
   29. Organiser Dashboard3
   30. Reviews
   31. Onboarding Wizard
   32. Guided Tour
   33. Toast
   34. Mobile Navigation
   35. onboarding card
   36. venue layout
   37. Media Queries
================================================ */


/* ================================================
   1. CSS VARIABLES (THEMES)
================================================ */

:root {
    /* ===== BACKGROUND / BASE ===== */
    --bg:           #f7f4ed;
    --panel:        #ffffff;
    --panel-2:      #f0ede6;
    --border:       #ded6c8;

    /* ===== TYPOGRAPHY ===== */
    --text:         #1c1b18;
    --text-muted:   #6b6257;

    /* ===== BRAND ===== */
    --primary:      #6c4df6;
    --secondary:    #19c3b3;
    --accent:       #ff5c7a;

    /* ===== STATUS ===== */
    --success:      #2fbf71;
    --warning:      #f4a62a;
    --danger:       #ef476f;
    --info:         #3aaed8;

    /* ===== SURFACES ===== */
    --panel-hover:  #f9f6ef;
    --input-bg:     #ffffff;

    /* ===== SHADOWS ===== */
    --card-shadow:  0 2px 10px rgba(20, 16, 10, 0.06);
    --shadow-hover: 0 14px 28px rgba(108, 77, 246, 0.12);

    /* ===== RADIUS SCALE ===== */
    --radius-sm:    8px;   /* controls: buttons, inputs */
    --radius-md:    12px;  /* containers: cards, panels */
    --radius-pill:  999px; /* pills: badges, status */

    /* ===== BADGES ===== */
    --badge-success-bg:   #e8f7ef;
    --badge-success-text: #1f6b43;
    --badge-warning-bg:   #fff3dd;
    --badge-warning-text: #7a4e12;
    --badge-danger-bg:    #ffe3ea;
    --badge-danger-text:  #7a2a3b;
    --badge-info-bg:      #e8f4ff;
    --badge-info-text:    #2b5d7a;

    /* ===== SYSTEM ===== */
    --modal-overlay:    rgba(20, 16, 12, 0.55);
    --scrollbar-thumb:  #d4cbb8;

    /* ===== TYPOGRAPHY SCALE ===== */


    --text-sm:      0.9rem;   /* ~11-13px */
    --text-base:    1rem;      /* ~13-15px */
    --text-input:   1rem;
    --text-section: 1.25rem;
    --text-page:    1.4rem;

    --weight-normal:   400;
    --weight-medium:   500;
    --weight-semibold: 600;
    --weight-bold:     700;
}

[data-theme="dark"] {
    /* ===== BACKGROUND / BASE ===== */
    --bg:           #0f1117;
    --panel:        #1a1d26;
    --panel-2:      #21252f;
    --border:       #2e3340;

    /* ===== TYPOGRAPHY ===== */
--text:         #f4f4f6;
--text-muted:   #a0a4bc;

    /* ===== BRAND ===== */
    --primary:      #8b6fff;
    --secondary:    #1dd9c7;
    --accent:       #ff7a94;

    /* ===== STATUS ===== */
    --success:      #34d97e;
    --warning:      #f7b84b;
    --danger:       #f26b8a;
    --info:         #4dc0e8;

    /* ===== SURFACES ===== */
    --panel-hover:  #272b38;
    --input-bg:     #21252f;

    /* ===== SHADOWS ===== */
    --card-shadow:  0 2px 10px rgba(0, 0, 0, 0.4);
    --shadow-hover: 0 14px 28px rgba(139, 111, 255, 0.2);

    /* ===== BADGES ===== */
    --badge-success-bg:   #0d2e1f;
    --badge-success-text: #4ddb8f;
    --badge-warning-bg:   #2e1f06;
    --badge-warning-text: #f7c46b;
    --badge-danger-bg:    #2e0d1a;
    --badge-danger-text:  #f28fab;
    --badge-info-bg:      #0a1e30;
    --badge-info-text:    #6bcff0;

    /* ===== SYSTEM ===== */
    --modal-overlay:    rgba(0, 0, 0, 0.75);
    --scrollbar-thumb:  #363b4a;
}

[data-theme="contrast"] {
    /* ===== BACKGROUND / BASE ===== */
    --bg:           #000000;
    --panel:        #0a0a0a;
    --panel-2:      #111111;
    --border:       #ffffff;

    /* ===== TYPOGRAPHY ===== */
    --text:         #ffffff;
    --text-muted:   #dddddd;

    /* ===== BRAND ===== */
    --primary:      #a98fff;
    --secondary:    #00ffe5;
    --accent:       #ff6b8a;

    /* ===== STATUS ===== */
    --success:      #00ff7f;
    --warning:      #ffcc00;
    --danger:       #ff4466;
    --info:         #00ccff;

    /* ===== SURFACES ===== */
    --panel-hover:  #1a1a1a;
    --input-bg:     #0a0a0a;

    /* ===== SHADOWS ===== */
    --card-shadow:  0 0 0 1px #ffffff;
    --shadow-hover: 0 0 0 2px #a98fff;

    /* ===== BADGES ===== */
    --badge-success-bg:   #003320;
    --badge-success-text: #00ff7f;
    --badge-warning-bg:   #332200;
    --badge-warning-text: #ffcc00;
    --badge-danger-bg:    #330011;
    --badge-danger-text:  #ff4466;
    --badge-info-bg:      #001a33;
    --badge-info-text:    #00ccff;

    /* ===== SYSTEM ===== */
    --modal-overlay:    rgba(0, 0, 0, 0.9);
    --scrollbar-thumb:  #555555;
}


/* ================================================
   2. RESET & BASE
================================================ */
html {
    font-size: clamp(12px, 1vw, 15px);
}
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Inter', sans-serif;
}

body {
    color: var(--text);
    font-size: var(--text-base);
    min-height: 100vh;
    overflow: hidden;
    transition: background 0.25s ease, color 0.25s ease;
}

/* Prevent iOS zoom on input focus */
input, select, textarea { font-size: var(--text-base); }

/* Prevent iOS date input from overflowing its container */
input[type="date"] { max-width: 100%; box-sizing: border-box; min-width: 0; }

/* Global checkbox base styling - more specific selectors elsewhere
   (.checkbox-row, .addon-card, .preference-item, etc.) override this
   where they need different sizing/spacing.
   Built with appearance:none rather than relying on accent-color,
   since mobile Safari/Chrome render native checkboxes inconsistently
   (or ignore accent-color) at small sizes. */
input[type="checkbox"] {
    appearance: none;
    -webkit-appearance: none;
    width: 16px;
    height: 16px;
    min-width: 16px;
    border: 1.5px solid var(--border);
    border-radius: 4px;
    background: var(--panel);
    cursor: pointer;
    position: relative;
    flex-shrink: 0;
    margin: 0;
    transition: background 0.15s ease, border-color 0.15s ease;
}

input[type="checkbox"]:checked {
    background: var(--primary);
    border-color: var(--primary);
}

input[type="checkbox"]:checked::after {
    content: '';
    position: absolute;
    left: 4px;
    top: 1px;
    width: 5px;
    height: 9px;
    border: solid #fff;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

input[type="checkbox"]:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

input[type="checkbox"]:focus-visible {
    outline: 2px solid var(--primary);
    outline-offset: 2px;
}

.hidden   { display: none !important; }
.muted    { color: var(--text-muted); font-size: var(--text-sm); line-height: 1.4; margin-top: 4px; }
.meta-row { margin-top: 10px; }


/* ================================================
   3. LAYOUT
================================================ */

.app {
    display: flex;
    flex-direction: column;
    height: 100dvh;
    overflow: hidden;
}

.content-wrap {
    display: flex;
    flex-direction: row;
    flex: 1;
    overflow: hidden;
    background: var(--panel);
}

/* Topbar */
.topbar {
    height: 60px;
    background: var(--panel);
    border-bottom: none;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 7px;
    width: 100%;
    flex-shrink: 0;
    position: relative;
    z-index: 1000;
}

.topbar .title { font-weight: var(--weight-semibold); font-size: var(--text-base); }
.topbar .right { display: flex; gap: 12px; align-items: center; }

.icon       { cursor: pointer; padding: 8px; border-radius: 8px; color: var(--text-muted); transition: 0.2s; position: relative; }
.icon:hover { background: var(--panel-2); color: var(--text); }
.icon i     { font-size: 18px; color: var(--text-muted); }

.menu-btn   { display: none; cursor: pointer; font-size: 20px; color: var(--text); }
.menu-btn i { font-size: 18px; color: var(--text-muted); }

.notification-icon,
.user-icon         { position: relative; cursor: pointer; height: 36px; width: 36px; display: flex; align-items: center; justify-content: center; border-radius: 50%; background: none; }
.notification-icon:hover,
.user-icon:hover   { background: var(--panel-2); }
.notification-icon i,
.user-icon i        { font-size: 16px; }

/* Topbar user pill */
.topbar-user-wrap { position: relative; }

.topbar-user {
    display: flex;
    align-items: center;
    gap: 8px;
    height: 36px;
    padding: 0 10px;
    border-radius: 8px;
    cursor: pointer;
    transition: background 0.15s;
    background: none;
    flex-shrink: 0;
}
.topbar-user:hover { background: var(--panel-2); }

.topbar-av {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: var(--primary);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    font-weight: 600;
    flex-shrink: 0;
    box-shadow: 0 0 0 2px var(--panel-2), 0 0 0 3px var(--border);
}

.topbar-biz-logo {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
    box-shadow: 0 0 0 2px var(--panel-2), 0 0 0 3px var(--border);
}

.topbar-user-name {
    font-size: 13px;
    font-weight: var(--weight-medium);
    color: var(--text);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 120px;
}

.topbar-av-name  { font-size: 13px; font-weight: 500; color: var(--text); white-space: nowrap; }
.topbar-av-chev  { font-size: 11px; color: var(--text-muted); }
.topbar-divider  { width: 1px; height: 24px; background: var(--border); margin: 0 4px; flex-shrink: 0; }

/* Mobile logo in topbar (shown only on mobile) */
.topbar-mobile-logo {
    display: none;
    align-items: center;
    gap: 8px;
    font-weight: 600;
    color: var(--text);
    flex-shrink: 0;
    margin-right: 12px;
}
.topbar-mobile-logo .logo-icon {
    width: 30px;
    height: 30px;
    background: var(--primary);
    color: #fff;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Main + content */
.main    { display: flex; flex: 1; overflow: hidden; }

.content {
    flex: 1;
    overflow-y: auto;
    padding: 16px;
    background: var(--bg);
    border-top-left-radius: 12px;
    border-top: 1px solid var(--border);
    border-left: 1px solid var(--border);
}
.content::-webkit-scrollbar       { width: 8px; }
.content::-webkit-scrollbar-thumb { background: var(--scrollbar-thumb); border-radius: 10px; }
.content h1 { font-size: var(--text-page); margin-bottom: 20px; color: var(--text); }

.page-header    { margin-bottom: 20px; }
.page-header h1 { font-size: var(--text-page); font-weight: var(--weight-semibold); }
.page-header p  { font-size: var(--text-sm); color: var(--text-muted); margin-top: 4px; }

/* page-header variant with inline action buttons (e.g. venues.php) */
.page-header-row {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 20px;
}
.page-header-row h1                  { font-size: var(--text-page); font-weight: var(--weight-semibold); }
.page-header-row p                   { font-size: var(--text-sm); color: var(--text-muted); margin-top: 4px; }
.page-header-row .page-header-actions { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }

.section-divider {
     padding-top: 16px;
    display: flex;
    align-items: center;
    gap: 12px;
    color: var(--text-muted);
    font-size: var(--text-sm);
    margin: 8px 0;
}
.section-divider::before,
.section-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--border);
}

.premium-nudge {
    display: flex;
    align-items: center;
    gap: 14px;
    background: var(--panel);
    border: 1px solid var(--border);
    border-left: 3px solid var(--warning);
    border-radius: 10px;
    padding: 12px;
}

.premium-nudge i {
    color: var(--warning);
    font-size: 18px;
    flex-shrink: 0;
}

.premium-nudge strong {
    display: block;
    margin-bottom: 2px;
}

.premium-nudge p {
    margin: 0;
    font-size: var(--text-sm);
    color: var(--text-muted);
}
.layout-btn-wrapper {
    position: relative;
    display: inline-block;
}

.layout-lock-badge {
    position: absolute;
    top: -6px;
    right: -6px;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: var(--panel);
    color: var(--warning);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.25);
    z-index: 2;
}
/* ================================================
   4. SIDEBAR
================================================ */

.sidebar {
   
    width: 240px;
    height: 100%;
    background: var(--panel);
    border-right: none;
    padding: 0 10px 10px 10px;
    display: flex;
    flex-direction: column;
    gap: 2px;
    overflow-x: hidden;
    overflow-y: auto;
    transition: width 0.2s ease;
}

/* Tooltip on collapsed sidebar */
.sidebar-collapsed .nav-item { position: relative; }
.sidebar-collapsed .nav-item:hover::after {
    content: attr(data-label);
    position: fixed;
    left: 72px;
    background: #1c1b18;
    color: #fff;
    font-size: 12px;
    padding: 5px 10px;
    border-radius: 6px;
    white-space: nowrap;
    pointer-events: none;
    z-index: 9999;
}

.sidebar h2 { font-size: var(--text-sm); color: var(--text-muted); margin: 20px 0 8px; padding: 0 15px; letter-spacing: 0.08em; padding-top:10px; }
.sidebar h2:first-of-type { margin-top: 0; }

.sidebar a        { padding: 10px 7px; border-radius: 8px; color: var(--text-muted); text-decoration: none; font-size: var(--text-base); transition: 0.2s; }
.sidebar a:hover  { background: var(--panel-2); color: var(--text); }
.sidebar a.active { background: var(--primary); color: white; }

.sidebar-link,
.nav-item {
    display: flex;
    align-items: center;
    height: 42px;
    min-height: 42px;
    max-height: 42px;
    padding: 0 12px;
    width: 100%;
    text-decoration: none;
    color: var(--text-muted);
    border-radius: 6px;
    transition: background 0.2s ease, color 0.2s ease;
    box-sizing: border-box;
            font-size: var(--text-base);
}
.sidebar-link:hover,
.nav-item:hover { background: var(--panel-hover); }

.sidebar-link .icon,
.nav-item .icon         { width: 26px; min-width: 26px; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }

/* Circular ring treatment on every nav icon, matching the business/admin/tools style. */
.sidebar-link .icon,
.nav-item .icon {
    height: 26px;
    padding: 0;
    border-radius: 50%;
    background: var(--panel-2);
    box-shadow: 0 0 0 2px var(--panel), 0 0 0 3px var(--border);
}
.sidebar-link .icon i,
.nav-item .icon i { font-size: 12px; margin-right: 0; }
.sidebar-link i         { margin-right: 10px; width: 18px; text-align: center; }
.sidebar-link .label,
.nav-item .label        { margin-left: 10px; white-space: nowrap; }
.sidebar-link.admin     { color: var(--danger); }
.sidebar-link.admin:hover { background: color-mix(in srgb, var(--danger) 12%, transparent); }

.sidebar-top    { display: flex; align-items: center; justify-content: flex-end; }
.sidebar-bottom { margin-top: auto; display: flex; justify-content: flex-end; }

/* Logo */
.sidebar-header {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    margin-bottom: 10px;
}

.sidebar-logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: var(--text-base);
    font-weight: var(--weight-medium);
    color: var(--text);
    flex-shrink: 0;
}

.logo-icon {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--primary);
    color: #fff;
    border-radius: 8px;
    flex-shrink: 0;
}

.logo-icon {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.topbar-mobile-logo .logo-icon {
    width: 30px;
    height: 30px;
}

/* Remove old icon styling for SVG logos */
.logo-image-wrapper {
    background: transparent;
    border-radius: 0;
    color: inherit;
}

.logo-image {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    display: block;
}


.logo-text {
    font-size: 30px; /* adjust as needed */
    font-weight: 600;
    color: #6c4df6;
    white-space: nowrap; 
}

.sidebar-logo-mark {
    width: 30px;
    height: 30px;
    border-radius: 8px;
    background: #e09a30;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 15px;
    font-weight: 700;
    color: #1e1535;
    flex-shrink: 0;
}

.sidebar-logo-name {
    font-size: 17px;
    font-weight: 700;
    color: #ffffff;
    letter-spacing: -0.03em;
}

/* Business switcher (top of sidebar) */
.sidebar-switcher-wrap { position: relative; margin: 0 0 12px; }

.sidebar-switcher {
    width: 100%;
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px;
    border: none;
    border-radius: 8px;
    background: none;
    cursor: pointer;
    transition: background 0.15s ease;
    text-align: left;
}
.sidebar-switcher:hover { background: var(--panel-2); }

.sidebar-switcher-avatar {
    width: 26px;
    height: 26px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
    background: var(--panel);
    box-shadow: 0 0 0 2px var(--panel), 0 0 0 3px var(--border);
}
.sidebar-switcher-avatar-fallback {
    background: var(--primary);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    font-weight: 600;
}

.sidebar-switcher-name {
    flex: 1;
    min-width: 0;
    font-size: var(--text-base);
    font-weight: var(--weight-medium);
    color: var(--text);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.sidebar-switcher-chev { font-size: 11px; color: var(--text-muted); flex-shrink: 0; transition: transform 0.15s ease; }
.sidebar-switcher[aria-expanded="true"] .sidebar-switcher-chev { transform: rotate(180deg); }

.sidebar-switcher.active                        { background: var(--primary); color: white; }
.sidebar-switcher.active .sidebar-switcher-name { color: white; }
.sidebar-switcher.active .sidebar-switcher-chev { color: white; }
.sidebar-switcher-dropdown {
    position: fixed;
    width: 220px;
    background: var(--panel);
    border: 1px solid var(--border);
    border-radius: 12px;
    box-shadow: 0 12px 30px rgba(0,0,0,0.15);
    padding: 6px;
    z-index: 1001;
    opacity: 0;
    pointer-events: none;
    transform: translateY(-6px) scale(0.98);
    transform-origin: top left;
    transition: opacity 0.15s ease, transform 0.15s ease;
}
.sidebar-switcher-dropdown.opens-up { transform-origin: bottom left; transform: translateY(6px) scale(0.98); }
.sidebar-switcher-dropdown.open     { opacity: 1; pointer-events: auto; transform: translateY(0) scale(1); }

.sidebar-switcher-item {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    padding: 8px 10px;
    border: none;
    background: none;
    border-radius: 8px;
    font-size: var(--text-base);
    color: var(--text);
    cursor: pointer;
    text-align: left;
    transition: background 0.15s ease;
}
.sidebar-switcher-item:hover  { background: var(--panel-hover); }
.sidebar-switcher-item.active { color: var(--primary); font-weight: var(--weight-medium); }
.sidebar-switcher-item i      { font-size: 11px; color: var(--primary); }

.sidebar-switcher-action {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 10px;
    border-radius: 8px;
    font-size: var(--text-base);
    color: var(--text);
    text-decoration: none;
    transition: background 0.15s ease;
}
.sidebar-switcher-action:hover { background: var(--panel-hover); }
.sidebar-switcher-action i     { width: 14px; text-align: center; color: var(--text-muted); }
.sidebar-switcher-action.active          { color: var(--primary); background: var(--panel-2); }
.sidebar-switcher-action.active i        { color: white; }

.sidebar-admin-icon { background: var(--badge-danger-bg); color: var(--danger); font-size: 12px; }

.sidebar-switcher.sidebar-tools-trigger            { background: none; padding: 10 7px; border-radius: 6px; gap: 0; }
.sidebar-switcher.sidebar-tools-trigger:hover      { background: var(--panel-2); }
.sidebar-switcher.sidebar-tools-trigger.active     { background: var(--primary); color: white; }
.sidebar-switcher.sidebar-tools-trigger.active .sidebar-switcher-chev { color: white; }
.sidebar-tools-trigger .sidebar-switcher-chev      { margin-left: auto; }
.sidebar-tools-trigger .icon, .sidebar-tools-trigger .label { pointer-events: none; }

.sidebar-tools-wrap { margin: 0; }

.sidebar-admin-wrap { margin-top: auto; padding-top: 12px; border-top: 1px solid var(--border); }

/* Collapsed sidebar: switcher label shrinks away, avatar stays put — same pattern as nav-item icons */
.sidebar-collapsed .sidebar-switcher-name,
.sidebar-collapsed .sidebar-switcher-chev  { opacity: 0; width: 0; overflow: hidden; margin: 0; }

/* Collapse button */
.sidebar-collapse-btn {
    display: flex;
    align-items: center;
    height: 36px;
    width: 100%;
    padding: 0 12px;
    border: none;
    background: var(--panel-2);
    color: var(--text-muted);
    border-radius: 8px;
    cursor: pointer;
    transition: background 0.2s ease;
    box-shadow: 0 2px 10px rgba(0,0,0,0.08);
}
.sidebar-collapse-btn:hover  { background: var(--panel-hover); color: var(--text); transform: translateY(-1px); }
.sidebar-collapse-btn:active { transform: scale(0.96); }
.sidebar-collapse-btn .icon  { width: 36px; min-width: 36px; display: flex; align-items: center; justify-content: center; }
.sidebar-collapse-btn .label { margin-left: 10px; white-space: nowrap; }
.sidebar-collapse-btn i      { font-size: var(--text-base); }

/* Collapsed state */
.sidebar-collapsed .sidebar               { width: 60px; }
.sidebar-collapsed .sidebar-top          { justify-content: center; }
.sidebar-collapsed .sidebar-bottom       { justify-content: center; }
.sidebar-collapsed .sidebar-collapse-btn { width: 38px; height: 38px; border-radius: 12px; padding: 0; justify-content: center; }
.sidebar-collapsed .sidebar-link .label,
.sidebar-collapsed .nav-item .label,
.sidebar-collapsed .sidebar-collapse-btn .label { opacity: 0; width: 0; overflow: hidden; margin: 0; }
.sidebar-collapsed h2                   { visibility: hidden; }
.sidebar-collapsed .sidebar-logo-name   { display: none; }
.sidebar-collapsed .sidebar-logo        { justify-content: center; }


.sidebar-overlay        { display: none; position: fixed; inset: 0; background: var(--modal-overlay); z-index: 999; }
.sidebar-overlay.active { display: block; }

/* Dropdown inside sidebar */
.dropdown-section { padding: 10px 12px; border-bottom: 1px solid var(--border); }
.dropdown-label   { font-size: var(--text-sm); opacity: 0.6; display: block; margin-bottom: 6px; }
.dropdown-select  { width: 100%; padding: 6px; border-radius: 6px; border: 1px solid var(--border); font-size: var(--text-sm); background: var(--panel); color: var(--text); }


.sidebar-lock-badge {
    position: absolute;
    top: 4px;
    right: 6px;
    font-size: 8px !important;
    color: var(--warning) !important;
    border-radius: 50%;
    padding: 1px;
    line-height: 1;
}

/* Sidebar edge toggle — circular button on the sidebar border */
.sidebar-edge-toggle {
    position: fixed;
    top: 50%;
    transform: translateY(-50%);
    left: calc(240px - 13px);
    width: 26px;
    height: 26px;
    background: var(--panel);
    border: 1px solid var(--border);
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
    z-index: 200;
    padding: 0;
    box-shadow: 0 1px 4px rgba(0,0,0,0.10);
    transition: left 0.2s ease, background 0.2s ease, color 0.2s ease, box-shadow 0.2s ease;
}
.sidebar-edge-toggle:hover {
    background: var(--primary);
    color: #fff;
    border-color: var(--primary);
    box-shadow: 0 2px 8px rgba(108,77,246,0.25);
}
.sidebar-edge-toggle i {
    font-size: 11px;
    pointer-events: none;
}

.sidebar-collapsed .sidebar-edge-toggle {
    left: calc(60px - 13px);
}

@media (max-width: 1400px) {
    .sidebar-edge-toggle { left: calc(210px - 13px); }
    .sidebar-collapsed .sidebar-edge-toggle { left: calc(52px - 13px); }
}

@media (max-width: 768px) {
    .sidebar-edge-toggle { display: none; }
}

/* Hide sidebar logo on desktop — it's in the topbar */
.sidebar-header { display: none; }

/* Show it on mobile where topbar is hidden */
@media (max-width: 768px) {
    .sidebar-header {
        display: flex;
        margin-bottom: 10px;
    }
}
/* ================================================
   5. GRID SYSTEM
================================================ */

.grid         { display: grid; grid-template-columns: repeat(12, 1fr); gap: 16px; padding-top: inherit; align-items: start; }
.grid-spacing { padding-top: inherit; }

.col-12  { grid-column: span 12; }
.col-10  { grid-column: span 10; }
.col-8   { grid-column: span 8; }
.col-6   { grid-column: span 6; }
.col-4   { grid-column: span 4; }
.col-3   { grid-column: span 3; }
.col-2,
.span-2  { grid-column: span 2; }
.full-width { grid-column: 1 / -1; }


/* ================================================
   6. CARDS & PANELS
================================================ */

.card,
.event-billing-card,
.panel {
    background: var(--panel);
    border: 1px solid var(--border);
    transition: background 0.25s ease, border 0.25s ease;
}

.card { padding: 16px; border-radius: var(--radius-md); min-width: 0; max-width: 100%; box-shadow: var(--card-shadow); }

.card h2 { font-size: var(--text-section); font-weight: var(--weight-semibold); margin-bottom: 12px; color: var(--text); }
.card h3 { font-size: var(--text-base); font-weight: var(--weight-semibold); margin-bottom: 6px; color: var(--text); }
.card p  { font-size: var(--text-base); color: var(--text-muted); padding-bottom: inherit; }

.card form   { display: flex; flex-direction: column; gap: 6px; }
.card label  { display: flex; align-items: center; gap: 6px; font-size: var(--text-sm); color: var(--text-muted); text-wrap-mode: nowrap; }


.card input:not([type="checkbox"]):not([type="radio"]),
.card textarea,
.card select {
    width: 100%;
    padding: 10px 12px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border);
    background: var(--panel);
    color: var(--text);
    font-size: var(--text-base);
    outline: none;
    transition: 0.2s;
}
.card input:focus:not([type="checkbox"]):not([type="radio"]),
.card textarea:focus,
.card select:focus { border-color: var(--primary); }
.card textarea { min-height: 180px; resize: vertical; font-family: inherit; }
.card select   { appearance: none; -webkit-appearance: none; cursor: pointer; }

.card ul    { list-style: none; padding: 0; margin: 0; }
.card ul li {
    display: flex; align-items: center; justify-content: space-between; gap: 12px;
    padding: 10px 12px; margin-bottom: 8px;
    background: var(--panel-2); border: 1px solid var(--border); border-radius: 10px;
    font-size: var(--text-base); color: var(--text);
    transition: all 0.2s ease;
}
.card ul li:hover { background: var(--panel-hover); }

.mini-card  { display: flex; justify-content: space-between; align-items: center; padding: 10px; border: 1px solid var(--border); border-radius: var(--radius-md); background: var(--panel-2); }
.mini-title { font-weight: var(--weight-medium); }
.mini-right { display: flex; gap: 6px; }

.info-box            { background: var(--panel-2); border: 1px solid var(--border); border-radius: var(--radius-md); padding: 12px; margin-bottom: 10px; color: var(--text); }
.info-box:last-child { margin-bottom: 0; }
.info-box strong     { color: var(--text); display: block; margin-bottom: 4px; }
.info-box.highlight  { background: var(--panel-hover); border-color: var(--primary); }

.card-header  { display: flex; justify-content: space-between; align-items: center; margin-bottom: 12px; }
.empty-state  { text-align: center; padding: 40px; color: var(--text-muted); background: var(--panel); border: 1px solid var(--border); border-radius: var(--radius-md); }
.card-subtle  { background: var(--panel-2); }

/* Utilities */
.mb-6         { margin-bottom: 6px; }
.mb-16        { margin-bottom: 16px; }
.mb-20        { margin-bottom: 20px; }
.form-actions { display: flex; justify-content: flex-end; }
.btn-min      { min-width: 180px; }
.icon-mr      { margin-right: 4px; }
.label-optional  { font-weight: var(--weight-normal); color: var(--text-muted); }
.section-label   { font-size: var(--text-sm); color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.06em; margin-bottom: 12px; }


/* ================================================
   7. BUTTONS
================================================ */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 10px 14px;
    font-size: var(--text-base);
    font-weight: var(--weight-semibold);
    border-radius: var(--radius-sm);
    border: 1px solid transparent;
    cursor: pointer;
    text-decoration: none;
    transition: all 0.2s ease;
}
.btn:hover            { transform: translateY(-1px); opacity: 0.95; }
.btn:active           { transform: translateY(0); }
.btn:disabled,
.btn.is-disabled      { opacity: 0.5; cursor: not-allowed; pointer-events: none; }
.btn.is-disabled-soft { opacity: 0.5; cursor: not-allowed; } /* looks disabled but stays clickable, so we can highlight what's missing instead of silently swallowing the click */

.btn-primary          { background: var(--primary); color: #fff; border-color: var(--primary); }
.btn-secondary        { background: transparent; color: var(--primary); border-color: var(--primary); }
.btn-secondary:hover  { background: var(--panel-2); }
.btn-ghost            { background: transparent; border: none; color: var(--text-muted); }
.btn-ghost:hover      { background: var(--panel-2); color: var(--text); }
.btn-danger           { background: var(--danger); color: #fff; border-color: var(--danger); }
.btn-success          { background: var(--success); color: #fff; border-color: var(--success); }

.btn-sm { padding: 6px 10px; font-size: var(--text-sm); border-radius: 6px; }
.btn-lg { padding: 12px 18px; font-size: var(--text-input); border-radius: 10px; }

.btn-block  { width: 100%; }
.btn-full   { width: 100%; display: flex; }
.btn-center { justify-content: center; }
.btn-left   { justify-content: flex-start; }

.btn-filter        { background: var(--panel); color: var(--text); border-color: var(--border); }
.btn-filter.active { background: var(--primary); color: #fff; border-color: var(--primary); }

.btn-offer              { background: var(--panel); color: var(--text); border-color: var(--border); }
.btn-offer:hover        { box-shadow: var(--shadow-hover); }
.btn-offer.btn-success  { border-color: var(--success); color: var(--success); background: transparent; }
.btn-offer.btn-danger   { border-color: var(--danger); color: var(--danger); background: transparent; }
.app-offered .btn-offer.btn-success { background: var(--success); color: #fff; }


/* ================================================
   8. FORM ELEMENTS
================================================ */

.form-group       { margin-bottom: 12px; }
.form-group input:not([type="checkbox"]):not([type="radio"]) { width: 100%; padding: 10px; border: 1px solid var(--border); border-radius: 8px; font-size: var(--text-base); background: var(--panel); color: var(--text); }
.form-group input:focus:not([type="checkbox"]):not([type="radio"]) { outline: none; border-color: var(--primary); }

.form-block { display: flex; flex-direction: column; gap: 12px; }

.search-box       { padding: 12px 14px; border: 1px solid var(--border); outline: none; transition: 0.2s; border-radius: 12px; flex: 1; background: var(--panel); color: var(--text); font-size: var(--text-base); }
.search-box:focus { border-color: var(--text-muted); }

.password-wrap    { position: relative; }
.toggle-password  { position: absolute; right: 10px; top: 10px; font-size: var(--text-sm); cursor: pointer; color: var(--text-muted); }

.checkbox-row                        { display: flex; align-items: center; gap: 10px; margin-top: 10px; cursor: pointer; font-size: var(--text-base); user-select: none; }
.checkbox-row input[type="checkbox"] { width: 18px; height: 18px; accent-color: var(--primary); }

.success {
    background: rgba(22,163,74,0.08);
    border: 1px solid rgba(34,197,94,0.3);
    color: var(--success);
    padding: 10px 12px; border-radius: 8px; font-size: var(--text-base);
}
.error {
    background: rgba(239,68,68,0.08);
    border: 1px solid rgba(239,68,68,0.3);
    color: var(--danger);
    padding: 10px 12px; border-radius: 8px; font-size: var(--text-base);
}
.auth-message { font-size: var(--text-base); padding: 10px; border-radius: 8px; margin-bottom: 12px; }

.password-rules {
    list-style: none;
    padding: 0;
    margin: 12px 0;
    font-size: var(--text-sm);
    display: flex;
    flex-direction: column;
    gap: 4px;
}
.card ul.password-rules li         { justify-content: flex-start; padding: 0; margin-bottom: 0; background: none; border: none; color: var(--text-muted); display: flex; align-items: center; gap: 8px; transition: color 0.2s; }
.password-rules li::before { content: '○'; font-size: var(--text-sm); transition: all 0.2s; }
.password-rules li.met     { color: var(--success); }
.password-rules li.met::before { content: '✓'; }


/* ================================================
   9. BADGES & STATUS
================================================ */

.badge         { display: inline-block; padding: 5px 10px; border-radius: var(--radius-pill); font-size: var(--text-sm); background: var(--badge-info-bg); color: var(--badge-info-text); }
.badge.success { background: var(--badge-success-bg); color: var(--badge-success-text); }
.badge.warning { background: var(--badge-warning-bg); color: var(--badge-warning-text); }
.badge.danger  { background: var(--badge-danger-bg);  color: var(--badge-danger-text); }
.badge.info    { background: var(--badge-info-bg);    color: var(--badge-info-text); }

.badge-manager { display: inline-block; padding: 5px 10px; border-radius: var(--radius-pill); font-size: var(--text-sm); background: var(--badge-success-bg); color: var(--badge-success-text); }
.badge-under   { display: inline-block; padding: 5px 10px; border-radius: var(--radius-pill); font-size: var(--text-sm); background: var(--badge-danger-bg);  color: var(--badge-danger-text); }
.badge-warning { background: var(--badge-danger-bg); color: var(--badge-danger-text); padding: 2px 8px; border-radius: var(--radius-pill); font-size: var(--text-sm); margin-left: 8px; }

.action-badge     { font-size: var(--text-sm); font-weight: var(--weight-semibold); padding: 3px 8px; border-radius: var(--radius-pill); background: var(--success); color: #fff; white-space: nowrap; }
.action-badge-red { font-size: var(--text-sm); font-weight: var(--weight-semibold); padding: 3px 8px; border-radius: var(--radius-pill); background: var(--danger);  color: #fff; white-space: nowrap; }

.role             { background: var(--panel-2); border: 1px solid var(--border); color: var(--text); padding: 2px 8px; border-radius: var(--radius-pill); font-size: var(--text-sm); }
.status           { padding: 2px 8px; border-radius: var(--radius-pill); font-size: var(--text-sm); }
.status.active    { background: var(--badge-success-bg); color: var(--badge-success-text); }
.status.pending   { background: var(--badge-warning-bg); color: var(--badge-warning-text); }
.status.suspended { background: var(--badge-danger-bg);  color: var(--badge-danger-text); }

.tag-credit  { background: var(--badge-info-bg);   color: var(--badge-info-text);   font-size: var(--text-sm); padding: 2px 6px; border-radius: 6px; margin-left: 6px; }
.tag-dispute { background: var(--badge-danger-bg); color: var(--badge-danger-text); font-size: var(--text-sm); padding: 2px 6px; border-radius: 6px; margin-left: 6px; }
.type-badge  { font-size: var(--text-sm); background: var(--panel-2); padding: 2px 6px; border-radius: var(--radius-pill); margin-left: 8px; color: var(--text-muted); text-transform: uppercase; }

.trust-badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 4px 10px;
    border-radius: 999px;
    font-size: var(--text-sm);
    font-weight: var(--weight-semibold);
    white-space: nowrap;
}
.trust-badge.reliable      { background: var(--badge-success-bg); color: var(--badge-success-text); }
.trust-badge.verified      { background: var(--badge-info-bg);    color: var(--badge-info-text); }
.trust-badge.no-show       { background: var(--badge-danger-bg);  color: var(--badge-danger-text); }
.trust-badge.late-payer    { background: var(--badge-warning-bg); color: var(--badge-warning-text); }
.trust-badge.top-organiser { background: var(--badge-success-bg); color: var(--badge-success-text); }
.trust-badge.top-rated     { background: #fef3c7; color: #92400e; }
html[data-theme="dark"] .trust-badge.top-rated { background: #78350f; color: #fde68a; }


/* ================================================
   10. NOTIFICATIONS & DROPDOWNS
================================================ */

.notification-list { display: flex; flex-direction: column; gap: 10px; }

.notification                      { background: var(--panel); border: 1px solid var(--border); padding: 14px; border-radius: 12px; display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; transition: 0.2s; }
.notification:hover                { background: var(--panel-2); }
.notification.unread               { border-left: 4px solid var(--primary); background: var(--badge-info-bg); }
.notification.high-priority        { background: var(--badge-danger-bg); }
.notification.unread.high-priority { border-left: 4px solid var(--danger); background: var(--badge-danger-bg); }
.notification .text                { flex: 1; }
.notification .title               { font-size: var(--text-base); font-weight: var(--weight-semibold); margin-bottom: 4px; }
.notification .message             { font-size: var(--text-base); color: var(--text-muted); }
.notification .time                { font-size: var(--text-sm); color: var(--text-muted); white-space: nowrap; }
.notification .actions             { display: flex; gap: 8px; margin-top: 8px; }
.notification a                    { font-size: var(--text-sm); color: var(--primary); text-decoration: none; }
.notification a:hover              { text-decoration: underline; }

.notif-badge { min-width: 18px; height: 18px; padding: 0 5px; border-radius: 999px; background: var(--danger); color: white; font-size: var(--text-sm); font-weight: var(--weight-bold); position: absolute; top: 0; right: 0; display: flex; align-items: center; justify-content: center; }

.nav-badge {
    margin-left: auto;
    min-width: 18px;
    height: 18px;
    padding: 0 5px;
    border-radius: 999px;
    background: var(--danger);
    color: white;
    font-size: var(--text-sm);
    font-weight: var(--weight-bold);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
.nav-badge.warning { background: var(--warning); }

/* Collapsed sidebar: badge moves to overlay the icon corner since the label (and its
   inline badge) is hidden. .sidebar-collapsed .nav-item already has position:relative
   from the hover-tooltip rule, so this positions against the whole row. */
.sidebar-collapsed .nav-badge {
    position: absolute;
    top: 2px;
    right: 2px;
    margin-left: 0;
    min-width: 16px;
    height: 16px;
    font-size: 10px;
    padding: 0 4px;
}

.notif-dropdown        { position: absolute; right: 0; top: calc(100% + 10px); width: 300px; background: var(--panel); border: 1px solid var(--border); border-radius: var(--radius-md); box-shadow: var(--card-shadow); overflow: hidden; z-index: 999; max-height: 300px; overflow-y: auto; transition: opacity 0.15s ease, transform 0.15s ease; transform-origin: top right; }
.notif-dropdown.hidden { opacity: 0; transform: scale(0.98); pointer-events: none; display: none; }

.notif-item        { padding: 10px 12px; border-bottom: 1px solid var(--border); cursor: pointer; }
.notif-item:hover  { background: var(--panel-2); }
.notif-item small  { display: block; color: var(--text-muted); font-size: var(--text-sm); margin-top: 4px; }
.notif-item.high   { border-left: 3px solid var(--danger); }

.notif-empty { padding: 12px; text-align: center; font-size: var(--text-base); color: var(--text-muted); }
.view-all    { display: block; text-align: center; padding: 10px; font-size: var(--text-base); color: var(--primary); text-decoration: none; }

/* User dropdown */
.user-dropdown { width: 260px; padding: 0; overflow: hidden; }
.user-header   { display: flex; align-items: center; gap: 10px; padding: 14px; background: var(--panel-2); border-bottom: 1px solid var(--border); }
.user-avatar   { width: 40px; height: 40px; border-radius: 50%; background: var(--primary); color: white; display: flex; align-items: center; justify-content: center; font-weight: var(--weight-bold); }
.user-name     { font-weight: var(--weight-semibold); font-size: var(--text-base); }
.user-email    { font-size: var(--text-sm); opacity: 0.6; }
.user-meta     { padding: 10px 14px; font-size: var(--text-sm); border-bottom: 1px solid var(--border); }

.user-actions             { display: flex; flex-direction: column; }
.user-actions .notif-item { padding: 10px 14px; border-radius: 0; }
.user-actions .notif-item:hover { background: var(--panel-hover); }
.user-actions .danger     { color: var(--danger); }

.user-dropdown a,
.user-dropdown a:visited,
.user-dropdown a:active,
.user-dropdown a:link     { color: inherit; text-decoration: none; }

.user-dropdown .notif-item       { display: block; padding: 10px 12px; border-radius: 8px; color: var(--text); transition: background 0.15s ease; border-bottom: none !important; }
.user-dropdown .notif-item:hover { background: rgba(0,0,0,0.06); }
.user-dropdown .notif-item.danger       { color: #e74c3c; }
.user-dropdown .notif-item.danger:hover { background: rgba(231,76,60,0.08); }

#user-dropdown.user-dropdown {
    position: absolute;
    right: 0; top: calc(100% + 10px);
    width: 290px;
    cursor: default;
    background: var(--panel);
    border: 1px solid var(--border);
    border-radius: 12px;
    box-shadow: 0 12px 35px rgba(0,0,0,0.15);
    overflow: hidden;
    overflow-y: auto;
    z-index: 999;
    transform-origin: top right;
    transition: opacity 0.15s ease, transform 0.15s ease;
}
#user-dropdown.hidden { opacity: 0; transform: translateY(-8px) scale(0.98); pointer-events: none; }

#user-dropdown .user-header      { background: linear-gradient(to bottom, var(--panel-2), transparent); padding: 16px; }
#user-dropdown .user-avatar      { width: 42px; height: 42px; background: linear-gradient(135deg, var(--primary), #6c5ce7); font-size: var(--text-input); }
#user-dropdown .dropdown-section { padding: 14px 16px; border-top: 1px solid var(--border); }
#user-dropdown .dropdown-label   { display: block; font-size: var(--text-sm); text-transform: uppercase; letter-spacing: 0.5px; margin-bottom: 6px; opacity: 0.6; }
#user-dropdown .dropdown-select  { width: 100%; padding: 8px 10px; border-radius: 8px; border: 1px solid var(--border); background: var(--panel-2); font-size: var(--text-base); cursor: pointer; transition: border-color 0.15s ease, box-shadow 0.15s ease; }
#user-dropdown .dropdown-select:hover { border-color: var(--primary); }
#user-dropdown .dropdown-select:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 2px rgba(108,92,231,0.15); }
#user-dropdown .dropdown-select option { background: white; color: black; }
#user-dropdown .user-actions     { padding: 8px; border-top: 1px solid var(--border); }
#user-dropdown .notif-item       { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 10px; font-size: var(--text-base); color: var(--text); text-decoration: none; transition: background 0.15s ease, transform 0.15s ease; border-bottom: none !important; }
#user-dropdown .notif-item i     { width: 16px; text-align: center; opacity: 0.7; }
#user-dropdown .notif-item:hover { background: var(--panel-hover); }
#user-dropdown .notif-item.danger       { color: #e74c3c; }
#user-dropdown .notif-item.danger:hover { background: rgba(231,76,60,0.08); }
#user-dropdown .divider { height: 1px; background: var(--border); margin: 6px 0; opacity: 0.7; }

.user-dropdown-static {
    padding: 10px 12px;
    background: var(--panel-2);
    border: 1px solid var(--border);
    border-radius: 8px;
    font-size: var(--text-base);
    font-weight: var(--weight-medium);
    color: var(--text);
    cursor: default;
    user-select: none;
    opacity: 0.9;
}


/* ================================================
   11. NAVIGATION TABS
================================================ */

.tabs                    { display: flex; gap: 8px; width: 100%; overflow-x: auto; white-space: nowrap; scroll-behavior: smooth; -ms-overflow-style: none; scrollbar-width: none; }
.tabs::-webkit-scrollbar { display: none; }
.tabs > *                { flex: 0 0 auto; }

.tab        { padding: 10px 14px; border: 1px solid var(--border); background: var(--panel); color: var(--text-muted); cursor: pointer; border-radius: 8px; font-size: var(--text-base); transition: 0.2s ease; flex: 0 0 auto; white-space: nowrap; }
.tab:hover  { background: var(--panel-2); color: var(--text); }
.tab.active { background: rgba(37,99,235,0.08); color: var(--primary); border-color: rgba(37,99,235,0.25); font-weight: var(--weight-semibold); }
/* Anchor tabs should not show underline */
a.tab       { text-decoration: none; }

.tab-content        { display: none; margin-top: 16px; }
.tab-content.active { display: block; }
.mobile-tabs        { display: none; }

/* Mobile tab select — styled to match card selects */
select.mobile-tabs,
.mobile-tabs select {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: var(--panel);
    color: var(--text);
    font-size: var(--text-base);
    outline: none;
    cursor: pointer;
    appearance: none;
    -webkit-appearance: none;
    transition: border-color 0.2s;
}
select.mobile-tabs:focus,
.mobile-tabs select:focus { border-color: var(--primary); }

.tab-count { background: var(--panel-2); color: var(--text-muted); border-radius: 999px; font-size: var(--text-sm); padding: 1px 7px; margin-left: 5px; }
.tab.active .tab-count { background: rgba(255,255,255,0.3); color: #fff; }

.invoice-filters { display: flex; gap: 10px; margin-bottom: 15px; }


/* ================================================
   12. ACCORDION
================================================ */

.accordion             { margin-bottom: 12px; border: 1px solid var(--border); border-radius: 8px; overflow: hidden; }
.accordion-header      { display: flex; justify-content: space-between; padding: 12px; background: var(--panel-2); cursor: pointer; font-weight: var(--weight-semibold); }
.accordion-header.open { background: var(--border); }
.accordion-body        { display: none; padding: 10px; width: 100%; overflow-x: auto; overflow-y: hidden; -webkit-overflow-scrolling: touch; }
.accordion-body.open   { display: block; }


/* ================================================
   13. TABLES
================================================ */

.table-scroll { width: 100%; overflow-x: auto; -webkit-overflow-scrolling: touch; border: 1px solid var(--border); border-radius: 12px; }

.table-clean               { width: 100%; min-width: 700px; border-collapse: collapse; background: var(--panel); border-radius: 10px; overflow: hidden; box-shadow: var(--card-shadow); font-size: var(--text-base); }
.table-clean thead         { background: var(--panel-2); text-align: left; }
.table-clean thead th      { padding: 14px 16px; font-weight: var(--weight-semibold); color: var(--text); border-bottom: 1px solid var(--border); }
.table-clean tbody td      { padding: 7px 7px; border-bottom: 1px solid var(--border); color: var(--text-muted); vertical-align: middle; }
.table-clean tbody tr      { transition: all 0.15s ease; }
.table-clean tbody tr:hover { background: var(--panel-hover); }
.table-clean tbody tr:last-child td { border-bottom: none; }
.table-empty { padding: 20px; text-align: center; color: var(--text-muted); font-size: var(--text-base); }

.mobile-table-scroll { width: 100%; overflow-x: auto; -webkit-overflow-scrolling: touch; }
.mobile-table,
.staff-table         { border-collapse: collapse; min-width: 100%; width: max-content; }
.mobile-table th, .mobile-table td,
.staff-table th,  .staff-table td  { padding: 12px 16px; text-align: left; border-bottom: 1px solid var(--border); white-space: nowrap; }

.clean-list    { list-style: none; padding: 0; }
.clean-list li { padding: 8px 0; border-bottom: 1px solid var(--border); }

/* Table cell helpers */
.text-right     { text-align: right; }
.invoice-code   { font-size: var(--text-sm); font-family: monospace; }
.td-name        { font-size: var(--text-base); font-weight: var(--weight-semibold); }
.td-meta        { font-size: var(--text-sm); color: var(--text-muted); }
.td-amount      { text-align: right; font-weight: var(--weight-semibold); }
.td-overdue     { color: var(--danger); font-weight: var(--weight-semibold); }
.td-outstanding { color: var(--warning); }
.td-paid        { color: var(--success); }
.td-actions     { display: flex; gap: 6px; align-items: center; white-space: nowrap; }


/* ================================================
   14. AUTH PAGES
================================================ */

/* Legacy single-column (keep for fallback) */
.auth-page      { display: flex; align-items: center; justify-content: center; min-height: 100vh; padding: 20px; background: var(--bg); }
.auth-wrapper   { width: 100%; max-width: 420px; }
.auth-header    { margin-bottom: 16px; }
.auth-header h2 { font-size: var(--text-section); margin-bottom: 4px; }
.auth-header p  { font-size: var(--text-base); color: var(--text-muted); }
.auth-footer    { margin-top: 14px; text-align: center; font-size: var(--text-sm); color: var(--text-muted); }

/* Two-column split layout */
.auth-split {
    display: grid;
    grid-template-columns: 1fr 1fr;
    min-height: 100vh;
    align-items: stretch;
}

.auth-split-left {
    background: var(--primary);
    padding: 64px 52px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    position: relative;
    overflow: hidden;
}
.auth-split-left::before {
    content: '';
    position: absolute;
    top: -100px; right: -80px;
    width: 380px; height: 380px;
    background: radial-gradient(circle, rgba(255,255,255,0.07) 0%, transparent 70%);
    pointer-events: none;
}

.auth-split-left .auth-logo {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    margin-bottom: 40px;
}
.auth-split-left .auth-logo-mark {
    width: 36px; height: 36px;
    background: rgb(255,255,255);
    border: 1px solid rgba(255,255,255,0.25);
    border-radius: 8px;
    display: flex; align-items: center; justify-content: center;
}
.auth-split-left .auth-logo-mark img { width: 22px; height: 22px; object-fit: contain; }
.auth-split-left .auth-logo-text {
    font-size: 22px; font-weight: 700;
    color: #fff; letter-spacing: -0.3px;
}

.auth-split-left h1 {
    font-size: clamp(26px, 3vw, 38px);
    font-weight: 800;
    line-height: 1.1;
    letter-spacing: -0.02em;
    color: #fff;
    margin-bottom: 12px;
}
.auth-split-left > p {
    font-size: var(--text-input);
    color: rgba(255,255,255,0.7);
    line-height: 1.7;
 /*   max-width: 360px;*/
    margin-bottom: 36px;
}

.auth-benefit {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    margin-bottom: 16px;
}
.auth-benefit-icon {
    width: 34px; height: 34px;
    background: rgba(255,255,255,0.12);
    border: 1px solid rgba(255,255,255,0.18);
    border-radius: 8px;
    display: flex; align-items: center; justify-content: center;
    font-size: 15px;
    flex-shrink: 0;
}
.auth-benefit-title { font-size: var(--text-base); font-weight: 600; color: #fff; margin-bottom: 2px; }
.auth-benefit-sub   { font-size: var(--text-sm); color: rgba(255,255,255,0.6); line-height: 1.5; }

.auth-split-right {
    background: var(--panel);
    padding: 64px 52px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.auth-split-right .auth-form-header { margin-bottom: 24px; }
.auth-split-right .auth-form-header h2 {
    font-size: clamp(20px, 2.5vw, 28px);
    font-weight: 800;
    letter-spacing: -0.02em;
    color: var(--text);
    margin-bottom: 4px;
}
.auth-split-right .auth-form-header p {
    font-size: var(--text-base);
    color: var(--text-muted);
}

.auth-split-right .auth-form-footer {
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid var(--border);
    font-size: var(--text-sm);
    color: var(--text-muted);
    text-align: center;
}
.auth-split-right .auth-form-footer a {
    color: var(--primary);
    font-weight: 600;
    text-decoration: none;
}

.auth-message {
    width: 100%;
    padding: 10px 12px;
    border-radius: 8px;
    font-size: var(--text-base);
    display: flex;
    align-items: center;
    gap: 8px;
    line-height: 1.4;
    margin-top: 12px;
}
.auth-message.warning { background: var(--badge-warning-bg); color: var(--badge-warning-text); }
.auth-message.danger  { background: var(--badge-danger-bg);  color: var(--badge-danger-text); }
.auth-message.info    { background: var(--badge-info-bg);    color: var(--badge-info-text); }
.auth-message.success { background: var(--badge-success-bg); color: var(--badge-success-text); }

/* Auth steps */
.step { display: none; }
.step.active { display: block; }

/* Forgot password link */
.forgot-link { display: block; text-align: right; font-size: var(--text-sm); color: var(--text-muted); margin-top: 6px; cursor: pointer; transition: color 0.15s; }
.forgot-link:hover { color: var(--primary); }

/* Loading overlay */
#overlay { position: fixed; inset: 0; background: rgba(0,0,0,0.55); display: none; align-items: center; justify-content: center; z-index: 9999; }

.loader-box { background: var(--panel); padding: 20px 25px; border-radius: 12px; text-align: center; }

.spinner { width: 28px; height: 28px; border: 3px solid var(--border); border-top: 3px solid var(--primary); border-radius: 50%; animation: spin 0.8s linear infinite; margin: 0 auto 10px; }

@keyframes spin { to { transform: rotate(360deg); } }
/* Signup */
.signup-message { width: 100%; padding: 10px 12px; border-radius: 8px; font-size: var(--text-base); display: flex; align-items: center; gap: 8px; line-height: 1.4; margin-top: 12px; }

.signup-message.danger { background: var(--badge-danger-bg); color: var(--badge-danger-text); }

.signup-message.success { background: var(--badge-success-bg); color: var(--badge-success-text); }

.signup-terms { font-size: 12px; color: var(--text-muted); text-align: center; margin-top: 14px; line-height: 1.6; }

.signup-terms a { color: var(--primary); text-decoration: none; }

.signup-terms a:hover { text-decoration: underline; }

.signup-success { text-align: center; padding: 8px 0; }

.signup-success-icon { font-size: 40px; margin-bottom: 14px; }

.signup-success h3 { font-size: 20px; font-weight: 700; color: var(--text); margin-bottom: 8px; }

.signup-success p { font-size: var(--text-sm); color: var(--text-muted); line-height: 1.7; }

.signup-success-resend { font-size: 12px; color: var(--text-muted); margin-top: 14px; line-height: 1.6; }

.signup-success-resend a { color: var(--primary); font-weight: 600; text-decoration: none; }
   .rv-message {
            width: 100%;
            padding: 10px 12px;
            border-radius: 8px;
            font-size: var(--text-base);
            display: flex;
            align-items: center;
            gap: 8px;
            line-height: 1.4;
            margin-top: 12px;
        }
        .rv-message.danger  { background: var(--badge-danger-bg);  color: var(--badge-danger-text); }
        .rv-message.success { background: var(--badge-success-bg); color: var(--badge-success-text); }
        .auth-footer {
            text-align: center;
            font-size: 13px;
            color: var(--text-muted);
            margin-top: 16px;
            padding-top: 16px;
            border-top: 1px solid var(--border);
        }
        .auth-footer a { color: var(--primary); font-weight: 600; text-decoration: none; }
                .sp-message {
            width: 100%;
            padding: 10px 12px;
            border-radius: 8px;
            font-size: var(--text-base);
            display: flex;
            align-items: center;
            gap: 8px;
            line-height: 1.4;
            margin-top: 12px;
        }
        .sp-message.danger  { background: var(--badge-danger-bg);  color: var(--badge-danger-text); }
        .sp-message.success { background: var(--badge-success-bg); color: var(--badge-success-text); }

        .password-strength { height: 3px; border-radius: 99px; background: var(--border); margin-top: 6px; overflow: hidden; }
        .password-strength-fill { height: 100%; border-radius: 99px; transition: width 0.2s, background 0.2s; width: 0%; }
        .strength-hint { font-size: 11px; color: var(--text-muted); margin-top: 3px; }
        
/* ================================================
   15. DOCUMENTS
================================================ */

.document-list { display: flex; flex-direction: column; gap: 12px; }

.document-card         { display: flex; justify-content: flex-start; gap: 24px; align-items: flex-start; padding: 16px; border: 1px solid var(--border); border-radius: var(--radius-md); background: var(--panel); }
.document-card.expired { border-left: 4px solid var(--danger);     background: var(--badge-danger-bg); }
.document-card.missing { border-left: 4px solid var(--warning);    background: var(--badge-warning-bg); }
.document-card.valid   { border-left: 4px solid var(--success);    background: var(--badge-success-bg); }
.document-card.exempt  { border-left: 4px solid var(--text-muted); background: var(--panel-2); }

.document-left  { flex: 1; min-width: 0; }
.document-right { display: flex; flex-direction: column; align-items: flex-end; gap: 6px; min-width: 140px; flex-shrink: 0; }

.doc-status         { font-size: var(--text-sm); padding: 4px 8px; border-radius: var(--radius-pill); }
.doc-status.expired { background: var(--badge-danger-bg);  color: var(--badge-danger-text); }
.doc-status.missing { background: var(--badge-warning-bg); color: var(--badge-warning-text); }
.doc-status.valid   { background: var(--badge-success-bg); color: var(--badge-success-text); }
.doc-status.exempt  { background: var(--panel-2);          color: var(--text-muted); }

.doc-link           { font-size: var(--text-base); color: var(--primary); text-decoration: none; }
.doc-link:hover     { text-decoration: underline; }
.doc-link.secondary { color: var(--text-muted); }
.doc-link.muted     { color: var(--text-muted); font-size: var(--text-sm); }
.doc-link.warning   { color: var(--danger); font-size: var(--text-sm); }
.doc-row            { font-size: var(--text-sm); padding: 4px 0; color: var(--text-muted); line-height: 1.3; }
.document-right a.doc-link { margin-right: 6px; }

.doc-warning { background: var(--badge-warning-bg); border: 1px solid var(--warning); color: var(--badge-warning-text); padding: 10px 12px; border-radius: 8px; font-size: var(--text-base); margin: 10px 0; line-height: 1.4; }

.compliance-wrapper { margin-bottom: 20px; }
.compliance-header  { font-size: var(--text-input); font-weight: var(--weight-semibold); margin-bottom: 8px; }
.compliance-bar     { width: 100%; max-width: 400px; height: 14px; background: var(--panel-2); border-radius: 20px; overflow: hidden; }
.compliance-fill         { height: 100%; width: 0%; border-radius: 20px; transition: width 0.5s ease; }
.compliance-fill.low     { background: var(--danger); }
.compliance-fill.medium  { background: var(--warning); }
.compliance-fill.high    { background: var(--success); }

.stall-toggle       { width: 100%; display: flex; justify-content: space-between; align-items: center; padding: 14px 16px; margin-bottom: 10px; background: var(--panel); border: 1px solid var(--border); border-radius: 12px; color: var(--text); font-size: 15px; font-weight: var(--weight-semibold); cursor: pointer; transition: all 0.2s ease; box-shadow: 0 1px 2px rgba(0,0,0,0.04); }
.stall-toggle:hover { border-color: var(--primary); background: var(--panel-2); transform: translateY(-1px); }
.stall-toggle-left,
.stall-toggle-right { display: flex; align-items: center; gap: 10px; }
.stall-toggle-right { margin-left: auto; }
.stall-toggle.open .chev { transform: rotate(180deg); opacity: 0.9; }

.stall-score           { padding: 4px 10px; border-radius: 999px; font-weight: var(--weight-semibold); font-size: var(--text-base); }
.stall-score.excellent { background: var(--badge-success-bg); color: var(--badge-success-text); }
.stall-score.good      { background: var(--badge-info-bg);    color: var(--badge-info-text); }
.stall-score.warning   { background: var(--badge-warning-bg); color: var(--badge-warning-text); }
.stall-score.bad       { background: var(--badge-danger-bg);  color: var(--badge-danger-text); }

.stall-missing { font-size: var(--text-sm); opacity: 0.7; margin-left: 8px; }
.chev          { transition: transform 0.2s ease; opacity: 0.5; margin-left: 6px; font-size: var(--text-sm); }

.stall-mini-bar         { height: 4px; background: var(--panel-2); border-radius: 999px; overflow: hidden; margin: 6px 2px 12px; }
.stall-mini-fill        { height: 100%; transition: width 0.3s ease; }
.stall-mini-fill.low    { background: var(--danger); }
.stall-mini-fill.medium { background: var(--warning); }
.stall-mini-fill.high   { background: var(--success); }

.is-exempt .upload-wrapper { display: none; }

.stall-card { padding: 10px; border: 1px solid var(--border); border-radius: 10px; margin-bottom: 8px; background: var(--panel); }

.stall-header,
.app-header       { cursor: pointer; padding: 10px; border-radius: 8px; }
.stall-header:hover,
.app-header:hover { background: var(--panel-2); }
.stall-header     { padding: 12px 10px; }

.stall-content { display: none; overflow: hidden; transition: all 0.25s ease; }
.stall-content .document-right { display: flex; flex-direction: column; align-items: flex-end; gap: 6px; min-width: 200px; flex-shrink: 0; }
.stall-section.open .stall-content,
.stall-content.open { display: block; }

.inline-upload-form { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; justify-content: flex-end; padding: 5px; border-radius: 8px; }
.inline-upload-form input[type="file"],
.inline-upload-form input[type="date"] { padding: 6px; border: 1px solid var(--border); border-radius: 6px; background: var(--panel); color: var(--text); }
.inline-upload-form input[type="file"] { max-width: 160px; }
.inline-upload-form button             { padding: 6px 10px; border-radius: 6px; border: none; cursor: pointer; font-size: var(--text-sm); transition: 0.2s ease; }
.inline-upload-form .btn-upload        { background: var(--primary); color: #fff; }
.inline-upload-form .btn-upload:hover  { opacity: 0.9; }
.inline-upload-form .btn-muted         { background: var(--panel-2); color: var(--text-muted); }
.inline-upload-form .btn-muted:hover   { background: var(--border); }

.uploadForm { display: flex; flex-direction: column; gap: 6px; width: 100%; max-width: 200px; min-height: 70px; }
.uploadForm input[type="file"],
.uploadForm input[type="date"] { width: 100%; max-width: 100%; box-sizing: border-box; }
.document-right button,
.document-right a { width: 100%; text-align: center; padding: 4px 10px; }
.document-right .btn-primary-normal { width: 100%; display: block; }


/* ================================================
   16. TO-DO / ACTIVITY
================================================ */

.todo    { margin-top: 20px; background: var(--panel); border: 1px solid var(--border); padding: 16px; border-radius: 12px; }
.todo h3 { margin-bottom: 10px; font-size: var(--text-base); color: var(--text); }
.to-do p { font-size: var(--text-base); }

.todo-card   { background: var(--panel); border-radius: 12px; padding: 16px; box-shadow: var(--card-shadow); }
.todo-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 12px; }
.todo-count  { font-size: var(--text-sm); background: var(--badge-info-bg); color: var(--primary); padding: 4px 8px; border-radius: 999px; }
.todo-list   { display: flex; flex-direction: column; gap: 10px; }

.todo-item             { display: flex; justify-content: space-between; padding: 10px 12px; border-radius: 8px; text-decoration: none; color: var(--text-muted); border-left: 4px solid transparent; border-bottom: 1px solid var(--border); background: var(--panel-2); font-size: var(--text-base); }
.todo-item:last-child  { border-bottom: none; }
.todo-item:hover       { background: var(--panel-hover); }
.todo-item.invoice     { border-left-color: var(--danger); }
.todo-item.document    { border-left-color: var(--warning); }
.todo-item.application { border-left-color: var(--primary); }
.todo-type { font-size: var(--text-sm); opacity: 0.6; }

.todo-empty { padding: 14px; text-align: center; color: var(--text-muted); background: var(--panel-2); border-radius: 8px; font-size: var(--text-base); }

.todo-business                    { display: flex; justify-content: space-between; align-items: center; padding: 10px 12px; border-bottom: 1px solid var(--border); border-left: 4px solid transparent; border-radius: 8px; background: var(--panel-2); color: var(--text-muted); font-size: var(--text-base); text-decoration: none; }
.todo-business.is-active-business { border-left-color: var(--success); }


/* ================================================
   17. INVOICES & BILLING
================================================ */

.invoice-list { display: flex; flex-direction: column; gap: 12px; }

.invoice-card             { display: flex; justify-content: space-between; align-items: center; padding: 14px; margin-bottom: 10px; border: 1px solid var(--border); border-radius: 10px; background: var(--panel); transition: box-shadow 0.2s ease, background 0.2s ease, border 0.2s ease; }
.invoice-card:hover       { box-shadow: var(--shadow-hover); }
.invoice-card.overdue     { border-left: 4px solid var(--danger); }
.invoice-card.cancelled   { background: var(--panel-2); border-left: 4px solid var(--text-muted); opacity: 0.8; }
.invoice-card.credit-note { border-left: 4px solid var(--primary); }
.invoice-card.disputed    { border-left: 4px solid var(--danger); }

.invoice-left h4    { margin: 0; font-size: var(--text-base); font-weight: var(--weight-semibold); }
.invoice-left p     { margin: 4px 0; font-size: var(--text-sm); color: var(--text-muted); }
.invoice-left small { font-size: var(--text-sm); color: var(--text-muted); }
.invoice-meta       { font-size: var(--text-base); opacity: 0.7; }
.invoice-id         { font-size: var(--text-sm); opacity: 0.5; }

.invoice-right  { text-align: right; display: flex; flex-direction: column; align-items: flex-end; gap: 6px; }
.invoice-amount { font-size: 22px; font-weight: var(--weight-bold); letter-spacing: -0.5px; color: var(--text); }

.invoice-status           { font-size: var(--text-sm); padding: 3px 10px; border-radius: 20px; font-weight: var(--weight-semibold); text-transform: uppercase; display: inline-block; }
.invoice-status.paid      { background: var(--badge-success-bg); color: var(--badge-success-text); }
.invoice-status.unpaid,
.invoice-status.not\ paid { background: var(--badge-warning-bg); color: var(--badge-warning-text); }
.invoice-status.cancelled { background: var(--panel-2); color: var(--text-muted); }

.invoice-actions    { display: flex; gap: 10px; }
.invoice-actions a,
.invoice-link       { font-size: var(--text-sm); text-decoration: none; color: var(--primary); font-weight: var(--weight-medium); }
.invoice-actions a:hover,
.invoice-link:hover { text-decoration: underline; }
.invoice-link.secondary { color: var(--text-muted); }
.paid-label { font-size: var(--text-sm); color: var(--success); }

.event-billing-card         { border-radius: 12px; margin-bottom: 16px; overflow: hidden; box-shadow: 0 1px 3px rgba(0,0,0,0.04); }
.event-billing-header       { display: flex; justify-content: space-between; align-items: center; padding: 16px 18px; cursor: pointer; background: var(--panel); transition: background 0.2s ease; }
.event-billing-header:hover { background: var(--panel-2); }
.event-billing-header h3    { margin: 0; font-size: var(--text-input); font-weight: var(--weight-semibold); }
.event-summary              { font-size: var(--text-base); color: var(--text-muted); margin-top: 4px; }
.event-toggle-icon          { font-size: var(--text-input); color: var(--text-muted); transition: transform 0.2s ease; }
.event-invoices             { padding: 10px 14px; background: var(--panel); }

.occurrence-item { display: inline-block; background: var(--panel-2); border: 1px solid var(--border); padding: 4px 8px; border-radius: 6px; font-size: var(--text-sm); margin-top: 5px; margin-right: 5px; }

/* KPI summary cards */
.kpi-card             { text-align: center; align-self: stretch; }
.kpi-card .kpi-label  { font-size: var(--text-sm); color: var(--text-muted); text-transform: uppercase; letter-spacing: .05em; margin-bottom: 4px; }
.kpi-card .kpi-value  { font-size: 1.2rem; font-weight: var(--weight-bold); }
.kpi-value            { font-size: 28px; font-weight: var(--weight-bold); color: var(--text); line-height: 1; margin: 8px 0 4px; }
.kpi-value.positive   { color: var(--success); }
.kpi-sub              { font-size: var(--text-sm); color: var(--text-muted); margin-bottom: 12px; }
.kpi-sub.danger       { color: var(--danger); }

/* KPI grid wrapper — 2-per-row on mobile */
.kpi-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.kpi-stacked-row { display: contents; } /* desktop: cards sit directly in parent grid */

/* Upcoming events — desktop shows table, mobile shows list */
.upcoming-mobile { display: none; }
.upcoming-mobile-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 10px 0;
    border-bottom: 1px solid var(--border);
}
.upcoming-mobile-row:last-child { border-bottom: none; }
.upcoming-mobile-name { font-weight: var(--weight-semibold); font-size: var(--text-base); }
.upcoming-mobile-date { font-size: var(--text-sm); color: var(--text-muted); margin-top: 2px; }

/* Filter form */
.filter-form { display: flex; flex-direction: row; gap: 12px; flex-wrap: wrap; align-items: flex-end; }
.filter-form .filter-field { display: flex; flex-direction: column; gap: 4px; }
.filter-form .filter-field label { font-size: var(--text-sm); color: var(--text-muted); }
.filter-form .filter-field.flex-1 { flex: 1; min-width: 160px; }
.filter-form .filter-field.w-130  { min-width: 130px; }
.filter-form .filter-actions { display: flex; gap: 8px; align-items: center; }

.invoice-table-header { display: flex; align-items: center; justify-content: space-between; padding: 12px 16px; }
.card-table { padding: 0 !important; overflow: hidden; }


/* ================================================
   18. EVENTS
================================================ */

.events-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 16px; }

.event-search        { display: flex; gap: 10px; margin-bottom: 20px; flex-wrap: wrap; }
.event-search select { padding: 10px 12px; border-radius: 8px; border: 1px solid var(--border); background: var(--panel); color: var(--text); font-size: var(--text-base); outline: none; transition: 0.2s; appearance: none; -webkit-appearance: none; cursor: pointer; }
.event-search select:focus { border-color: var(--primary); }

/* venues.php — filter bar: search grows, dropdowns stay narrow */
.venue-filters select  { min-width: 0; flex: 0 1 160px; }
.venue-search-wrap     { flex: 1; min-width: 180px; }

.event-card {
    border: 1px solid var(--border);
    border-radius: 12px;
    background: var(--panel);
    overflow: hidden;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    height: 100%;
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.event-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-hover); }

.event-image         { width: 100%; height: 180px; overflow: hidden; background: var(--panel-2); position: relative; }
.event-image img     { width: 100%; height: 100%; object-fit: cover; }
.event-content       { flex: 1; display: flex; flex-direction: column; padding: 15px; gap: 6px; }
.event-bottom        { margin-top: auto; display: flex; flex-direction: column; gap: 6px; }
.event-meta          { font-size: var(--text-base); color: var(--text-muted); margin-top: 4px; }
.event-meta.organiser { font-weight: var(--weight-medium); color: var(--text); }

.event-status                { display: inline-block; padding: 5px 10px; border-radius: 999px; font-size: var(--text-sm); font-weight: var(--weight-semibold); white-space: nowrap; }
.event-status.status-open    { background: var(--badge-success-bg); color: var(--badge-success-text); }
.event-status.status-soon    { background: var(--badge-warning-bg); color: var(--badge-warning-text); }
.event-status.status-closed  { background: var(--badge-danger-bg);  color: var(--badge-danger-text); }
.event-status.status-unknown { background: var(--badge-info-bg);    color: var(--badge-info-text); }

.event-actions { position: absolute; top: 10px; right: 10px; display: flex; gap: 8px; align-items: center; }

.fav-toggle-btn        { display: inline-flex; align-items: center; gap: 8px; padding: 8px 10px; border-radius: 12px; border: 1px solid var(--border); background: var(--panel); color: var(--text-muted); cursor: pointer; transition: all 0.2s ease; font-size: var(--text-base); }
.fav-toggle-btn:hover  { background: var(--panel-hover); color: var(--text); }
.fav-toggle-btn.active { background: var(--badge-danger-bg); border-color: var(--danger); color: var(--danger); }
.fav-toggle-btn i      { font-size: var(--text-input); }

.event-share-btn,
.event-report-btn        { display: inline-flex; align-items: center; justify-content: center; padding: 8px 10px; border-radius: 12px; border: 1px solid var(--border); background: var(--panel); color: var(--text-muted); cursor: pointer; transition: all 0.2s ease; font-size: var(--text-base); }
.event-share-btn:hover   { color: var(--text); background: var(--panel-hover); }
.event-report-btn:hover  { color: var(--danger); border-color: var(--danger); background: var(--panel-hover); }
.event-report-btn.reported { cursor: default; border-color: var(--danger); color: var(--danger); }

/* Skeletons */
.skeleton              { animation: pulse 1.2s infinite; }
.skeleton-image        { height: 180px; background: #2a2a2a; }
.skeleton-line         { height: 10px; background: #2a2a2a; border-radius: 6px; margin-bottom: 5px; width: 100%; }
.skeleton-line.short   { width: 40%; }
.skeleton-meta         { display: flex; flex-direction: column; gap: 6px; }
.event-card.skeleton   { pointer-events: none; }

/* Apply modal steps */
.apply-steps { display: flex; margin-bottom: 20px; border-bottom: 2px solid var(--border); }
.apply-step-indicator        { flex: 1; text-align: center; padding: 8px 4px; font-size: var(--text-sm); color: var(--text-muted); cursor: default; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.apply-step-indicator.active { color: var(--primary); font-weight: var(--weight-semibold); border-bottom: 2px solid var(--primary); margin-bottom: -2px; }
.apply-step-indicator.done   { color: var(--success); }
.apply-step-content          { display: none; }
.apply-step-content.active   { display: block; }

.modal-question       { margin-bottom: 16px; }
.modal-question label { display: block; font-size: var(--text-base); font-weight: var(--weight-medium); margin-bottom: 6px; color: var(--text); }
.modal-question label .required-star { color: var(--danger); margin-left: 2px; }
.modal-question input[type=text],
.modal-question textarea,
.modal-question select { width: 100%; padding: 8px 10px; border: 1px solid var(--border); border-radius: 6px; background: var(--panel); color: var(--text); box-sizing: border-box; }
.modal-question textarea { min-height: 70px; resize: vertical; }
.modal-question .radio-group,
.modal-question .checkbox-group { display: flex; flex-direction: column; gap: 6px; }
.modal-question .radio-group label,
.modal-question .checkbox-group label { font-weight: var(--weight-normal); display: flex; align-items: center; gap: 8px; cursor: pointer; }

.modal-q-section-title { font-size: var(--text-base); font-weight: var(--weight-bold); color: var(--primary); margin-bottom: 12px; padding-bottom: 6px; border-bottom: 1px solid var(--border); }

.addon-list              { display: flex; flex-direction: column; gap: 10px; }
.addon-card              { display: flex; align-items: flex-start; gap: 12px; padding: 12px; border: 1px solid var(--border); border-radius: 8px; background: var(--panel); cursor: pointer; transition: border-color 0.15s; }
.addon-card:hover        { border-color: var(--primary); }
.addon-card.selected     { border-color: var(--primary); background: var(--panel-2); }
.addon-card input[type=checkbox] { margin-top: 2px; accent-color: var(--primary); width: 16px; height: 16px; flex-shrink: 0; cursor: pointer; }
.addon-card-body  { flex: 1; }
.addon-card-name  { font-weight: var(--weight-semibold); font-size: var(--text-base); }
.addon-card-desc  { font-size: var(--text-sm); color: var(--text-muted); margin-top: 2px; }
.addon-card-price { font-size: var(--text-sm); color: var(--primary); margin-top: 4px; }

.step-nav      { display: flex; justify-content: space-between; align-items: center; margin-top: 20px; gap: 10px; }
.step-nav .btn { min-width: 100px; }
.modal-loading { text-align: center; padding: 40px; color: var(--text-muted); font-size: var(--text-base); }

/* Event side panel */
.event-panel {
    position: fixed;
    top: 60px; right: 0; bottom: 0;
    width: min(580px, 100vw);
    background: var(--panel);
    box-shadow: -8px 0 32px rgba(0,0,0,0.12);
    z-index: 900;
    display: flex;
    flex-direction: column;
    transform: translateX(100%);
    transition: transform 0.3s cubic-bezier(0.4,0,0.2,1);
    overflow: hidden;
}
.event-panel.open { transform: translateX(0); }

.event-panel-close { position: absolute; top: 12px; right: 14px; width: 32px; height: 32px; border-radius: 50%; border: none; background: var(--panel-2); color: var(--text-muted); font-size: var(--text-input); cursor: pointer; display: flex; align-items: center; justify-content: center; transition: background 0.15s, color 0.15s; z-index: 10; flex-shrink: 0; }
.event-panel-close:hover { background: var(--border); color: var(--text); }

.event-panel-image  { width: 100%; height: 180px; object-fit: cover; display: block; flex-shrink: 0; }
.event-panel-header { padding: 14px 16px 0; flex-shrink: 0; }
.event-panel-title  { font-size: var(--text-section); font-weight: var(--weight-bold); line-height: 1.3; color: var(--text); margin: 0 0 6px; padding-right: 40px; }
.event-panel-meta   { display: flex; flex-direction: column; gap: 3px; font-size: var(--text-base); color: var(--text-muted); margin-bottom: 12px; }
.event-panel-meta span { display: flex; align-items: center; gap: 6px; }

.event-panel-tabs { display: flex; border-bottom: 2px solid var(--border); flex-shrink: 0; background: var(--panel); position: sticky; top: 0; z-index: 5; }
.event-panel-tab  { flex: 1; padding: 10px 8px; font-size: var(--text-base); font-weight: var(--weight-semibold); text-align: center; cursor: pointer; color: var(--text-muted); border: none; background: none; border-bottom: 2px solid transparent; margin-bottom: -2px; transition: color 0.15s, border-color 0.15s; white-space: nowrap; }
.event-panel-tab:hover  { color: var(--text); }
.event-panel-tab.active { color: var(--primary); border-bottom-color: var(--primary); }

.event-panel-body { flex: 1; overflow-y: auto; overflow-x: hidden; -webkit-overflow-scrolling: touch; }
.event-panel-body::-webkit-scrollbar       { width: 6px; }
.event-panel-body::-webkit-scrollbar-thumb { background: var(--scrollbar-thumb); border-radius: 10px; }

.event-panel-tab-content        { display: none; padding: 16px; }
.event-panel-tab-content.active { display: block; }

.event-panel-section            { margin-bottom: 20px; }
.event-panel-section:last-child { margin-bottom: 0; }
.event-panel-section-title      { font-size: var(--text-sm); font-weight: var(--weight-bold); text-transform: uppercase; letter-spacing: 0.07em; color: var(--text-muted); margin-bottom: 8px; }
.event-panel-description        { font-size: var(--text-base); color: var(--text-muted); line-height: 1.6; white-space: pre-line; }

.event-panel-organiser-score { display: flex; align-items: center; gap: 12px; padding: 12px 14px; background: var(--panel-2); border: 1px solid var(--border); border-radius: 10px; margin-bottom: 12px; }
.event-panel-score-num       { font-size: 28px; font-weight: var(--weight-bold); color: var(--text); line-height: 1; }
.event-panel-score-stars     { display: flex; gap: 2px; color: #f59e0b; font-size: var(--text-base); margin-top: 2px; }
.event-panel-score-sub       { font-size: var(--text-sm); color: var(--text-muted); margin-top: 2px; }

.panel-apply-steps { display: flex; margin-bottom: 20px; border-bottom: 2px solid var(--border); }
.panel-apply-step  { flex: 1; text-align: center; padding: 8px 4px; font-size: var(--text-sm); color: var(--text-muted); border-bottom: 2px solid transparent; margin-bottom: -2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.panel-apply-step.active { color: var(--primary); font-weight: var(--weight-semibold); border-bottom-color: var(--primary); }
.panel-apply-step.done   { color: var(--success); }

.event-panel-closed-msg   { text-align: center; padding: 32px 16px; color: var(--text-muted); font-size: var(--text-base); }
.event-panel-closed-msg i { font-size: 32px; margin-bottom: 12px; display: block; opacity: 0.4; }

.panel-review-summary  { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 12px; }
.panel-review-stat     { flex: 1; min-width: 80px; background: var(--panel-2); border: 1px solid var(--border); border-radius: 8px; padding: 10px 12px; text-align: center; }
.panel-review-stat-val { font-size: 20px; font-weight: var(--weight-bold); color: var(--text); line-height: 1; }
.panel-review-stat-lbl { font-size: var(--text-sm); color: var(--text-muted); margin-top: 3px; }

.panel-review-card            { background: var(--panel-2); border: 1px solid var(--border); border-radius: 10px; padding: 12px 14px; margin-bottom: 10px; }
.panel-review-card:last-child { margin-bottom: 0; }
.panel-review-top    { display: flex; justify-content: space-between; align-items: flex-start; gap: 8px; margin-bottom: 6px; }
.panel-review-name   { font-size: var(--text-base); font-weight: var(--weight-semibold); color: var(--text); }
.panel-review-date   { font-size: var(--text-sm); color: var(--text-muted); white-space: nowrap; }
.panel-review-stars  { display: flex; gap: 2px; font-size: var(--text-sm); color: #f59e0b; margin-bottom: 5px; }
.panel-review-stars .fa-regular { color: var(--border); }
.panel-review-comment { font-size: var(--text-base); color: var(--text-muted); line-height: 1.5; }
.panel-review-metrics { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.panel-review-metric     { font-size: var(--text-sm); padding: 3px 8px; border-radius: 999px; background: var(--panel); border: 1px solid var(--border); color: var(--text-muted); }
.panel-review-metric.yes { background: var(--badge-success-bg); color: var(--badge-success-text); border-color: transparent; }
.panel-review-metric.no  { background: var(--badge-danger-bg);  color: var(--badge-danger-text);  border-color: transparent; }

.panel-reviews-section-title             { font-size: var(--text-sm); font-weight: var(--weight-bold); text-transform: uppercase; letter-spacing: 0.07em; color: var(--text-muted); margin: 16px 0 8px; }
.panel-reviews-section-title:first-child { margin-top: 0; }
.panel-reviews-empty { text-align: center; padding: 24px; color: var(--text-muted); font-size: var(--text-base); background: var(--panel-2); border: 1px dashed var(--border); border-radius: 10px; }

.panel-would-return     { display: inline-flex; align-items: center; gap: 4px; font-size: var(--text-sm); font-weight: var(--weight-semibold); padding: 3px 8px; border-radius: 999px; }
.panel-would-return.yes { background: var(--badge-success-bg); color: var(--badge-success-text); }
.panel-would-return.no  { background: var(--badge-danger-bg);  color: var(--badge-danger-text); }

.review-sub-tabs { display: flex; border-bottom: 2px solid var(--border); margin-bottom: 16px; }
.review-sub-tab  { flex: 1; padding: 8px; font-size: var(--text-base); font-weight: var(--weight-semibold); text-align: center; cursor: pointer; color: var(--text-muted); border: none; background: none; border-bottom: 2px solid transparent; margin-bottom: -2px; transition: color 0.15s, border-color 0.15s; }
.review-sub-tab.active { color: var(--primary); border-bottom-color: var(--primary); }

/* Organiser event management cards */
.event-mgmt-card    { padding: 0 !important; overflow: hidden; display: grid; grid-template-columns: 1fr 3fr 2fr; min-height: 160px; margin-bottom: 16px; }
.event-mgmt-image   { background: var(--panel-2); overflow: hidden; }
.event-mgmt-main    { padding: 14px 16px; display: flex; flex-direction: column; min-width: 0; }
.event-mgmt-right   { border-left: 1px solid var(--border); background: var(--panel-2); padding: 14px 16px; display: flex; flex-direction: column; gap: 10px; }
.event-mgmt-divider { height: 1px; background: var(--border); flex-shrink: 0; }

/* create-invoice.php — spacing between stall selection and builder */
#step-stalls { margin-bottom: 16px; }
.av-grid-3{
    display:grid;
    grid-template-columns:repeat(3,minmax(0,1fr));
    gap:16px;
}

.av-span-3{
    grid-column:1 / -1;
}

@media (max-width:900px){
    .av-grid-3{
        grid-template-columns:1fr;
    }

    .av-span-3{
        grid-column:auto;
    }
}

/* ================================================
   19. MODALS
================================================ */

.event-modal         { position: fixed !important; inset: 0; width: 100vw; height: 100vh; background: var(--modal-overlay); display: flex; align-items: center; justify-content: center; z-index: 99999; }
.event-modal.hidden  { display: none !important; }
.event-modal-content { background: var(--panel); width: 75%; max-height: 75vh; overflow-y: auto; border-radius: 12px; padding: 24px; position: relative; }
.event-modal-close   { position: absolute; right: 15px; top: 10px; font-size: 26px; cursor: pointer; color: var(--text); }

.modal-header      { display: flex; gap: 16px; align-items: flex-start; padding-bottom: 10px; }
.modal-image       { width: 180px; height: 120px; flex-shrink: 0; border-radius: 10px; overflow: hidden; background: var(--panel-2); }
.modal-image img   { width: 100%; height: 100%; object-fit: cover; }
.modal-header-info { display: flex; flex-direction: column; flex: 1; }
.modal-title-row   { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 8px; }
.modal-title       { margin: 0; font-size: 22px; font-weight: var(--weight-bold); line-height: 1.2; }
.meta-block        { display: flex; flex-direction: column; gap: 4px; }
.meta-label        { font-size: var(--text-sm); color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.05em; }
.meta-value        { font-size: var(--text-base); font-weight: var(--weight-medium); }
.modal-section     { padding: 10px 0; }
.modal-section h4  { margin-bottom: 8px; font-size: var(--text-base); }
.modal-section p   { font-size: var(--text-base); color: var(--text-muted); line-height: 1.5; white-space: pre-line; }

#modalNotes { width: 100%; box-sizing: border-box; padding: 10px; border: 1px solid var(--border); border-radius: 8px; resize: vertical; margin-top: 10px; background: var(--panel); color: var(--text); }

.modal-stalls { display: flex; flex-wrap: wrap; gap: 10px; }
.modal-occ-card,
.modal-stall-card { cursor: pointer; padding: 10px; border: 1px solid var(--border); margin: 5px; border-radius: 6px; transition: all 0.15s ease; background: var(--panel); color: var(--text); }
.modal-occ-card.selected,
.modal-stall-card.selected { background: var(--panel-hover); border-color: var(--primary); box-shadow: var(--shadow-hover); }
.modal-stall-card.disabled { opacity: 0.5; cursor: not-allowed; position: relative; }
.modal-stall-card.disabled::after { content: "Applied"; position: absolute; top: 8px; right: 8px; font-size: var(--text-sm); font-weight: var(--weight-semibold); color: var(--badge-danger-text); background: var(--badge-danger-bg); padding: 3px 6px; border-radius: 999px; }
.applied-badge { margin-top: 6px; display: inline-block; font-size: var(--text-sm); font-weight: var(--weight-semibold); color: var(--badge-danger-text); background: var(--badge-danger-bg); padding: 3px 8px; border-radius: 999px; }

.applied-occ { opacity: 0.55; background: var(--panel-2); border-color: var(--border); position: relative; pointer-events: none; }
.applied-occ::after { content: "✓ Applied"; position: absolute; top: 6px; right: 8px; font-size: var(--text-sm); color: var(--success); font-weight: var(--weight-semibold); }

.occ-closed { opacity: 0.4; background: repeating-linear-gradient(45deg, var(--panel-2), var(--panel-2) 6px, #e2e8f0 6px, #e2e8f0 12px); border-color: var(--border); cursor: not-allowed; position: relative; pointer-events: none; }

.occ-date-row        { padding: 4px 0; font-size: var(--text-base); }
.occ-date-row--faded { opacity: 0.4; }
.occ-blocked-label   { font-size: var(--text-sm); color: var(--danger); }
.all-dates-list      { margin-bottom: 12px; }

.global-modal-overlay { position: fixed; inset: 0; background: var(--modal-overlay); backdrop-filter: blur(6px); display: none; align-items: center; justify-content: center; z-index: 9999; }
.global-modal-box     { width: 520px; max-width: 92%; max-height: 85vh; background: var(--panel); border-radius: 14px; box-shadow: 0 20px 60px rgba(0,0,0,0.25); overflow: hidden; animation: modalIn 0.18s ease-out; }

#copyModalOverlay { position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: var(--modal-overlay); z-index: 9998; }
#copyModal        { display: none; position: fixed; top: 50%; left: 50%; transform: translate(-50%,-50%); width: 420px; max-width: 90%; background: var(--panel); border-radius: 12px; box-shadow: 0 20px 60px rgba(0,0,0,0.25); padding: 24px; z-index: 9999; }
#copyModal h3     { margin: 0 0 16px; font-size: var(--text-section); font-weight: var(--weight-semibold); color: var(--text); border-bottom: 1px solid var(--border); padding-bottom: 10px; }
#copyList         { min-height: 80px; max-height: 300px; overflow-y: auto; padding: 10px; background: var(--panel-2); border: 1px solid var(--border); border-radius: 8px; font-size: var(--text-base); color: var(--text-muted); }
#copyList > *     { display: block; margin-bottom: 10px; }
#copyModal button { margin-top: 16px; padding: 10px 14px; background: var(--text); color: var(--panel); border: none; border-radius: 8px; cursor: pointer; font-size: var(--text-base); transition: background 0.2s ease; width: 100%; }
#copyModal button:hover { opacity: 0.9; }


/* ================================================
   20. CHECKLIST / CHECK ROWS
================================================ */

.checklist .check { display: flex; justify-content: space-between; align-items: center; padding: 10px; border: 1px solid var(--border); border-radius: 10px; margin-bottom: 8px; background: var(--panel); }

.check       { display: flex; justify-content: space-between; align-items: center; gap: 12px; min-height: 55px; padding: 0 12px; border-radius: 10px; border: 1px solid var(--border); margin-bottom: 8px; box-sizing: border-box; }
.check:hover { background: var(--panel-2); }
.check.done  { background: var(--badge-success-bg); border-color: var(--success); }

.check-left  { display: flex; flex-direction: row; gap: 4px; min-width: 0; }
.check-meta  { color: var(--text-muted); white-space: normal; word-break: break-word; overflow-wrap: anywhere; }
.check-icon  { font-size: var(--text-base); }
.check-label { font-weight: var(--weight-medium); }

.expand-header { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-bottom: 10px; font-size: var(--text-sm); }
.expand-title  { flex: 1; }

.check-expand      { display: none; width: 100%; padding: 10px; box-sizing: border-box; border: 2px solid var(--danger); border-radius: 10px; }
.check-expand.open { display: block; }

.check-details.collapsible      { display: none; margin-top: 10px; padding-left: 10px; border-left: 3px solid var(--border); }
.check-details.collapsible.open { display: block; }


/* ================================================
   21. TIMELINE
================================================ */

.timeline { position: relative; margin-top: 10px; padding-left: 22px; }

.timeline-item              { position: relative; margin-bottom: 14px; opacity: 0; transform: translateY(6px); animation: fadeInUp 0.4s ease forwards; }
.timeline-item:nth-child(1) { animation-delay: 0.05s; }
.timeline-item:nth-child(2) { animation-delay: 0.10s; }
.timeline-item:nth-child(3) { animation-delay: 0.15s; }
.timeline-item:nth-child(4) { animation-delay: 0.20s; }
.timeline-item:nth-child(5) { animation-delay: 0.25s; }
.timeline-item.rejected .timeline-dot { background: var(--danger); }
.timeline-item.pending      { opacity: 0.5; }

.timeline-horizontal { display: flex; gap: 10px; overflow-x: auto; flex-wrap: wrap; align-items: flex-start; }
.timeline-step       { display: flex; flex-direction: column; align-items: center; text-align: center; min-width: 90px; position: relative; border-radius: 10px; padding: 10px; }

.timeline-dot              { width: 12px; height: 12px; border-radius: 50%; margin-bottom: 6px; background: var(--border); }
.timeline .timeline-dot    { position: absolute; left: -15px; top: 3px; border: 2px solid var(--panel); }
.timeline-horizontal .timeline-dot { position: static; }
.timeline-dot.dot-done     { background: var(--primary); }
.timeline-dot.dot-current  { background: var(--success); box-shadow: 0 0 0 4px rgba(34,197,94,0.2); }
.timeline-dot.dot-error    { background: var(--danger); }

.timeline-content { font-size: var(--text-base); color: var(--text); }
.timeline-date    { font-size: var(--text-sm); color: var(--text-muted); margin-top: 2px; }


/* ================================================
   22. ACCOUNT & PROFILE
================================================ */

.account-container { max-width: 1000px; margin: 0 auto; }
.profile-header    { display: flex; align-items: center; gap: 12px; }
.avatar-large      { width: 48px; height: 48px; border-radius: 50%; background: var(--primary); color: white; display: flex; align-items: center; justify-content: center; font-weight: var(--weight-semibold); }

.email-row        { display: flex; align-items: center; gap: 10px; }
.email-row input  { flex: 1; min-width: 0; }
.email-row .badge { white-space: nowrap; }

.section-overview { padding: 25px; }
.overview-grid    { display: grid; grid-template-columns: 2fr 1fr; gap: 30px; align-items: start; }
.overview-side    { background: var(--panel-2); padding: 15px; border-radius: 10px; }
.progress-box     { margin: 15px 0; }
.progress-bar     { width: 100%; height: 8px; background: var(--border); border-radius: 5px; overflow: hidden; }
.progress-fill    { height: 100%; background: var(--success); }
.next-task          { margin-top: 15px; padding: 12px; background: var(--badge-info-bg); border-radius: 8px; }
.next-task.complete { background: var(--badge-success-bg); text-align: center; }


/* ================================================
   23. BUSINESS & UNITS
================================================ */

.business-grid        { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-bottom: 16px; }
.business-grid label  { display: block; font-size: var(--text-base); margin-bottom: 6px; color: var(--text-muted); }
.business-grid input:not([type="checkbox"]):not([type="radio"]),
.business-grid select { width: 100%; padding: 10px; border: 1px solid var(--border); border-radius: 8px; box-sizing: border-box; background: var(--panel); color: var(--text); }

.business-list        { display: flex; flex-direction: column; gap: 10px; }
.business-card        { display: flex; justify-content: space-between; align-items: center; padding: 12px; border: 1px solid var(--border); border-radius: 10px; background: var(--panel); box-shadow: var(--card-shadow); transition: background 0.15s ease, box-shadow 0.15s ease; }
.business-card:hover  { background: var(--panel-hover); box-shadow: var(--shadow-hover); }
.business-left        { display: flex; flex-direction: column; }
.business-name        { font-weight: var(--weight-semibold); color: var(--text); margin-bottom: 6px; }
.business-sub         { font-size: var(--text-sm); color: var(--text-muted); }
.business-meta        { display: flex; gap: 8px; font-size: var(--text-sm); color: var(--text-muted); align-items: center; }
.business-right       { display: flex; gap: 6px; align-items: center; }

.details-grid         { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; }
.details-section      { background: var(--panel); border: 1px solid var(--border); border-radius: 12px; padding: 14px; box-shadow: var(--card-shadow); }
.details-section.full { grid-column: 1 / -1; }
.details-section h4   { margin: 0 0 10px; font-size: var(--text-base); color: var(--text-muted); font-weight: var(--weight-semibold); letter-spacing: 0.3px; }

.unit-list-header         { display: flex; justify-content: space-between; align-items: center; }
.unit-list-item           { border: 1px solid var(--border); padding: 12px; margin-bottom: 10px; border-radius: 8px; display: flex; justify-content: space-between; align-items: center; transition: 0.2s ease; }
.unit-list-item:hover     { box-shadow: var(--shadow-hover); }
.unit-list-item.is-active { border-color: var(--primary); background: rgba(59,130,246,0.08); }
.unit-list-item-actions   { font-size: var(--text-sm); opacity: 0.7; padding: 6px 10px; }
.unit-helper-text         { color: var(--text-muted); font-size: var(--text-sm); margin-bottom: 8px; }

.biz-choice-card,
.biz-choice-card1 {
    display: flex; align-items: center; gap: 16px; width: 100%; padding: 24px;
    background: var(--panel); border: 1px solid var(--border); border-radius: 12px;
    color: var(--text); cursor: pointer; transition: border-color 0.2s, background 0.2s, transform 0.15s; text-align: left;
}
.biz-choice-card:hover  { border-color: var(--primary); background: var(--panel-2); transform: translateY(-1px); }
.biz-choice-card1:hover { border-color: var(--primary); background: var(--panel-2); }

.biz-choice-card.selected,
.biz-choice-card1.selected { border-color: var(--primary); background: var(--panel-hover); box-shadow: var(--shadow-hover); }

.biz-choice-card input[type="checkbox"],
.biz-choice-card1 input[type="checkbox"] { display: none; }

.biz-role-grid .biz-choice-card:has(:checked),
.biz-role-grid .biz-choice-card1:has(:checked) { border-color: var(--primary); background: var(--panel-hover); box-shadow: var(--shadow-hover); transform: translateY(-2px); }

.biz-choice-card strong,
.biz-choice-card1 strong { display: block; font-size: 15px; margin-bottom: 4px; }
.biz-choice-card p,
.biz-choice-card1 p      { font-size: var(--text-base); color: var(--text-muted); margin: 0; line-height: 1.5; }

.biz-choice-body  { flex: 1; text-align: left; }
.biz-choice-icon  { width: 48px; height: 48px; border-radius: 12px; background: rgba(29,78,216,0.1); color: var(--primary); display: flex; align-items: center; justify-content: center; font-size: 20px; flex-shrink: 0; }
.biz-choice-arrow { margin-left: auto; color: var(--text-muted); font-size: var(--text-base); flex-shrink: 0; transition: transform 0.2s; }
.biz-choice-card:hover .biz-choice-arrow { transform: translateX(4px); color: var(--primary); }

.biz-code-label { font-size: var(--text-sm); color: var(--text-muted); display: block; margin-bottom: 6px; }
.biz-code-input { width: 100%; padding: 14px 16px; font-family: 'Courier New', monospace; font-size: 22px; font-weight: var(--weight-bold); letter-spacing: 0.2em; border: 2px solid var(--border); border-radius: 10px; background: var(--panel); color: var(--text); text-transform: uppercase; text-align: center; transition: border-color 0.2s; outline: none; }
.biz-code-input:focus { border-color: var(--primary); }
.biz-code-hint  { display: block; color: var(--text-muted); margin-top: 6px; font-size: var(--text-sm); }

.biz-steps     { display: flex; flex-direction: column; gap: 16px; }
.biz-step      { display: flex; gap: 12px; align-items: flex-start; }
.biz-step-num  { width: 26px; height: 26px; border-radius: 50%; background: var(--primary); color: #fff; display: flex; align-items: center; justify-content: center; font-size: var(--text-sm); font-weight: var(--weight-bold); flex-shrink: 0; }
.biz-step-title { display: block; font-size: var(--text-base); margin-bottom: 2px; }
.biz-role-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }

.postcode-feedback           { font-size: var(--text-sm); margin-top: 5px; min-height: 16px; transition: color 0.2s; }
.postcode-feedback--checking { color: var(--text-muted); }
.postcode-feedback--valid    { color: var(--success); }
.postcode-feedback--invalid  { color: var(--danger); }


/* ================================================
   24. MENU BUILDER
================================================ */

.menu-card    { border: 1px solid var(--border); padding: 12px; border-radius: 10px; background: var(--panel); margin-bottom: 10px; }
.menu-grid    { display: grid; gap: 8px; }
.menu-row     { display: flex; gap: 10px; flex-wrap: wrap; font-size: var(--text-sm); }
.menu-builder { margin-top: 10px; }
.menu-builder-needs-attention {
    border: 2px solid var(--danger) !important;
}
.profile-selector { display: flex; gap: 14px; flex-wrap: wrap; margin-bottom: 10px; }
@media (max-width: 768px) {
    .profile-selector { flex-direction: column; flex-wrap: nowrap; gap: 10px; }
}

/* Dedicated, self-contained styling for the pricing-profile toggles -
   intentionally NOT relying on the global input[type="checkbox"] rule,
   so changes to one can never affect the other. */
.profile-option {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: var(--text-base);
    cursor: pointer;
    width: max-content;
}

input.profile-checkbox {
    appearance: none;
    -webkit-appearance: none;
    width: 16px;
    height: 16px;
    min-width: 16px;
    max-width: 16px;
    flex: 0 0 16px;
    border: 1.5px solid var(--border);
    border-radius: 4px;
    background: var(--panel);
    cursor: pointer;
    position: relative;
    margin: 0;
    transition: background 0.15s ease, border-color 0.15s ease;
}

input.profile-checkbox:checked {
    background: var(--primary);
    border-color: var(--primary);
}

input.profile-checkbox:checked::after {
    content: '';
    position: absolute;
    left: 4px;
    top: 1px;
    width: 5px;
    height: 9px;
    border: solid #fff;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

input.profile-checkbox:focus-visible {
    outline: 2px solid var(--primary);
    outline-offset: 2px;
}
.menu-item    { border: 1px solid var(--border); border-radius: 10px; margin-bottom: 10px; overflow: hidden; background: var(--panel); }

.menu-item-header { padding: 10px; cursor: pointer; display: flex; justify-content: space-between; align-items: center; font-weight: var(--weight-semibold); background: var(--panel-2); }
.menu-item-body   { padding: 10px; display: none; }
.menu-item.open .menu-item-body { display: block; }

.dietary-options       { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 10px; font-size: var(--text-sm); align-items: center; }
.dietary-options label { display: flex; align-items: center; gap: 4px; }

/* Menu/unit builder table — editable but visually consistent with .table-clean */
.menu-table {
    width: 100%;
    border-collapse: collapse;
    background: var(--panel);
    font-size: var(--text-base);
}
.menu-table thead {
    background: var(--panel-2);
    text-align: left;
}
.menu-table thead th {
    padding: 12px 14px;
    font-weight: var(--weight-semibold);
    color: var(--text);
    /*border-bottom: 2px solid var(--border);*/
    white-space: nowrap;
    font-size: var(--text-sm);
}
.table-clean tbody td {
    padding: 7px 7px;
}
.menu-table tbody td {
    padding: 8px 10px;
    border-bottom: 1px solid var(--border);
    vertical-align: middle;
}
.menu-table tbody tr:hover td { background: var(--panel-hover); }
.menu-table tbody tr:last-child td { border-bottom: none; }
.menu-table td:last-child,
.menu-table th:last-child { border-right: none; }

/* Inputs inside the menu table */
.menu-table input[type="text"],
.menu-table input[type="number"] {
    width: 100%;
    padding: 6px 8px;
    border: 1px solid var(--border);
    border-radius: 6px;
    background: var(--panel);
    color: var(--text);
    font-size: var(--text-base);
    transition: border-color 0.15s;
}
.menu-table input:focus { border-color: var(--primary); outline: none; }

/* Dietary tag pills */
.dietary-cell {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    min-width: 160px;
}
.diet-pill {
    display: inline-block;
    padding: 2px 7px;
    border-radius: 20px;
    font-size: var(--text-sm);
    font-weight: var(--weight-semibold);
    cursor: pointer;
    border: 1.5px solid var(--border);
    background: transparent;
    color: var(--text-muted);
    user-select: none;
    transition: background 0.15s, color 0.15s, border-color 0.15s;
    white-space: nowrap;
}
.diet-pill.active {
    background: var(--accent);
    border-color: var(--accent);
    color: #fff;
}

/* Menu table scroll wrapper — shrinks to content on mobile */
.menu-table-scroll {
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}


/* ================================================
   25. PREFERENCES
================================================ */

.preferences-group { display: flex; flex-direction: column; gap: 10px; margin-top: 10px; }

.preference-item                        { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border: 1px solid var(--border); border-radius: 8px; background: var(--panel); transition: 0.15s ease; cursor: pointer; }
.preference-item:hover                  { background: var(--panel-2); }
.preference-item input[type="checkbox"] { width: 16px; height: 16px; accent-color: var(--primary); cursor: pointer; }
.preference-item span                   { font-size: var(--text-base); color: var(--text); }
.preferences-section-title              { margin-top: 10px; font-weight: var(--weight-semibold); font-size: var(--text-base); color: var(--text-muted); }


/* ================================================
   26. APPLICATIONS
================================================ */

.app-wrapper      { background: var(--panel); border-radius: 12px; overflow: hidden; margin-bottom: 12px; border: 1px solid var(--border); }
.app-wrapper.open { border-color: var(--primary); box-shadow: 0 4px 14px rgba(52,152,219,0.15); }
.app-wrapper.open .invoice-card { background: var(--panel); }

.application-card        { padding: 16px; display: flex; justify-content: space-between; align-items: center; background: transparent; }
.application-card .inner { flex-direction: column; }
.app-item    { padding: 0; }
.app-header  { padding: 10px; cursor: pointer; }
.app-details { padding: 10px; }
.app-details-panel      { display: none; padding: 0 16px 16px; background: var(--panel); font-size: var(--text-base); }
.app-details-panel.open { display: block; }

.app-chev { color: var(--text-muted); font-size: var(--text-sm); transition: transform 0.2s ease; flex-shrink: 0; }
.app-wrapper.open .app-chev { transform: rotate(180deg); }

.action-card    { background: var(--panel); border: 1px solid var(--border); border-radius: 12px; padding: 16px; }
.action-card h4 { margin: 0 0 12px; font-size: var(--text-base); font-weight: var(--weight-semibold); color: var(--text); }
.action-card-buttons { display: flex; flex-direction: column; gap: 10px; }
.action-card .offer-btn,
.action-card .btn-primary-normal { padding: 12px; border-radius: 8px; font-weight: var(--weight-semibold); transition: 0.2s ease; }
.action-card .offer-btn:hover,
.action-card .btn-primary-normal:hover { transform: translateY(-1px); }

.action-row         { display: flex; gap: 10px; flex-wrap: wrap; }
.offer-details-card { background: var(--panel-2); border: 1px solid var(--border); border-radius: 12px; padding: 14px; }
.offer-details-card h4 { margin: 0 0 10px; color: var(--text); }

.bulk-bar        { display: none; align-items: center; gap: 12px; flex-wrap: wrap; background: var(--panel-hover); border: 1px solid var(--primary); border-radius: 10px; padding: 12px 16px; }
.bulk-bar.active { display: flex; }
.bulk-bar-count  { font-size: var(--text-base); font-weight: var(--weight-semibold); color: var(--primary); }
.bulk-bar-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.bulk-bar-clear  { margin-left: auto; }

.offer-form        { display: none; background: var(--panel-2); border: 1px solid var(--border); border-radius: 10px; padding: 14px; margin-top: 8px; }
.offer-form.active { display: block; }
.offer-form h4     { font-size: var(--text-base); margin-bottom: 10px; color: var(--text); }

.app-detail-grid   { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; padding: 0 16px 16px; }
.app-detail-left   { display: flex; flex-direction: column; gap: 12px; }
.app-detail-right  { display: flex; flex-direction: column; gap: 12px; }
.app-detail-center { grid-column: 1 / -1; display: flex; flex-direction: column; gap: 12px; }

.trader-detail-grid              { display: grid; grid-template-columns: repeat(2, 1fr); gap: 6px; font-size: var(--text-base); }
.trader-detail-grid .detail-item { display: flex; flex-direction: column; gap: 2px; }

.q-answer-group        { margin-bottom: 10px; }
.q-answer-group-title  { font-size: var(--text-sm); font-weight: var(--weight-semibold); text-transform: uppercase; letter-spacing: 0.05em; color: var(--text-muted); margin-bottom: 6px; }
.q-answer-item         { margin-bottom: 8px; font-size: var(--text-base); }
.q-answer-item .q-text  { font-weight: var(--weight-medium); }
.q-answer-item .q-value { color: var(--text-muted); margin-top: 2px; }

.notes-textarea { width: 100%; padding: 8px; border: 1px solid var(--border); border-radius: 8px; font-size: var(--text-base); resize: vertical; min-height: 60px; background: var(--panel); color: var(--text); font-family: inherit; }

.select-all-row { display: flex; align-items: center; gap: 10px; font-size: var(--text-base); color: var(--text-muted); padding: 4px 0; }

.questionnaire-picker-row { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; padding: 10px; border: 1px solid var(--border); border-radius: 8px; background: var(--panel); }
.q-trigger-wrap select    { padding: 6px 10px; border: 1px solid var(--border); border-radius: 6px; font-size: var(--text-sm); background: var(--panel); color: var(--text); }


/* ================================================
   27. ANIMATIONS
================================================ */

@keyframes fadeInUp {
    to { opacity: 1; transform: translateY(0); }
}
@keyframes modalIn {
    from { transform: translateY(10px); opacity: 0; }
    to   { transform: translateY(0);    opacity: 1; }
}
@keyframes pulse {
    0%, 100% { opacity: 0.6; }
    50%       { opacity: 0.3; }
}
@keyframes obFadeIn {
    from { opacity: 0; transform: translateY(8px); }
    to   { opacity: 1; transform: translateY(0); }
}
@keyframes tourTooltipIn {
    from { opacity: 0; transform: translateY(6px); }
    to   { opacity: 1; transform: translateY(0); }
}


/* ================================================
   28. CALENDAR
================================================ */

/* cal-outer uses grid-spacing so it inherits page padding correctly */
.cal-outer {
    display: grid;
    grid-template-columns: 1fr 300px;
    gap: 16px;
    align-items: start;
}

/* On desktop the main calendar card stretches to fill the full height */
@media (min-width: 901px) {
    .cal-card { align-self: stretch; }
}

.cal-card {
    background: var(--panel);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 20px;
    box-shadow: var(--card-shadow);
    min-height: 0;
}

.cal-side-panel {
    background: var(--panel);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 20px;
    box-shadow: var(--card-shadow);
    position: sticky;
    top: 16px;
}
.cal-side-panel h3 { font-size: 15px; font-weight: var(--weight-semibold); margin: 0 0 4px; color: var(--text); }
.cal-side-empty    { color: var(--text-muted); font-size: var(--text-base); padding: 20px 0; text-align: center; }

.cal-nav         { display: flex; align-items: center; justify-content: space-between; margin-bottom: 16px; }
.cal-month-label { font-size: var(--text-input); font-weight: var(--weight-semibold); margin: 0; color: var(--text); }
.cal-nav-arrows  { display: flex; gap: 8px; }
.cal-nav-btn     { background: var(--panel-2); border: 1px solid var(--border); border-radius: 8px; padding: 6px 12px; cursor: pointer; font-size: var(--text-base); color: var(--text); transition: background 0.15s; }
.cal-nav-btn:hover { background: var(--panel-hover); }

.cal-grid       { display: grid; grid-template-columns: repeat(7, 1fr); gap: 3px; }
.cal-day-header { text-align: center; font-size: var(--text-sm); font-weight: var(--weight-semibold); text-transform: uppercase; letter-spacing: 0.05em; padding: 6px 0; color: var(--text-muted); }

.cal-day { border-radius: 8px; border: 1px solid var(--border); padding: 6px 5px 5px; cursor: pointer; transition: border-color 0.15s, background 0.15s; background: var(--panel); min-height: 125px; position: relative; }
.cal-day:hover:not(.cal-other-month) { border-color: var(--primary); background: var(--panel-hover); }
.cal-day.cal-selected    { border-color: var(--primary); background: var(--panel-hover); box-shadow: 0 0 0 1px var(--primary); }
.cal-day.cal-today       { border-color: var(--primary); border-width: 2px; }
.cal-day.cal-other-month { opacity: 0.3; cursor: default; }
.cal-day-num             { font-size: var(--text-sm); font-weight: var(--weight-semibold); color: var(--text-muted); margin-bottom: 4px; line-height: 1; }
.cal-day.cal-today .cal-day-num { color: var(--primary); }

.cal-pill             { font-size: var(--text-sm); font-weight: var(--weight-medium); padding: 2px 5px; border-radius: 4px; margin-bottom: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; display: block; }
.cal-pill-booking     { background: var(--badge-info-bg);    color: var(--badge-info-text); }
.cal-pill-holiday     { background: var(--badge-warning-bg); color: var(--badge-warning-text); }
.cal-pill-unavailable { background: var(--badge-danger-bg);  color: var(--badge-danger-text); }
.cal-pill-other       { background: var(--panel-2);          color: var(--text-muted); }
.cal-pill-travel      { background: #e0f2fe; color: #0369a1; }
.cal-pill-setup       { background: #f0fdf4; color: #166534; }
.cal-pill-breakdown   { background: #fdf4ff; color: #7e22ce; }
.cal-pill-bankholiday { background: var(--panel-2); color: var(--text-muted); border: 1px solid var(--border); }

.cal-dots { display: none; gap: 3px; flex-wrap: wrap; margin-top: 4px; }
.cal-dot               { width: 7px; height: 7px; border-radius: 50%; flex-shrink: 0; }
.cal-dot-booking       { background: var(--primary); }
.cal-dot-holiday       { background: var(--warning); }
.cal-dot-unavailable   { background: var(--danger); }
.cal-dot-other         { background: var(--text-muted); }
.cal-dot-conflict      { background: var(--danger); border: 1px solid #fff; }
.cal-dot-travel        { background: #0369a1; }
.cal-dot-setup         { background: #166534; }
.cal-dot-breakdown     { background: #7e22ce; }
.cal-dot-bankholiday   { background: var(--text-muted); border: 1px dashed var(--border); }

.cal-conflict-flag { position: absolute; top: 4px; right: 4px; font-size: var(--text-sm); line-height: 1; }
.cal-bh-label      { font-size: var(--text-sm); color: var(--text-muted); font-style: italic; margin-top: 2px; display: block; }

.cal-legend      { display: flex; gap: 14px; flex-wrap: wrap; margin-bottom: 16px; font-size: var(--text-sm); color: var(--text-muted); }
.cal-legend-item { display: flex; align-items: center; gap: 5px; }
.cal-legend-dot  { width: 10px; height: 10px; border-radius: 3px; flex-shrink: 0; }

.cal-panel-date       { font-size: var(--text-sm); color: var(--text-muted); margin-bottom: 16px; }
.cal-panel-section    { margin-bottom: 16px; }
.cal-panel-section h4 { font-size: var(--text-sm); font-weight: var(--weight-semibold); text-transform: uppercase; letter-spacing: 0.06em; color: var(--text-muted); margin: 0 0 8px; }

.cal-booking-item        { background: var(--badge-info-bg); border-radius: 8px; padding: 10px 12px; margin-bottom: 6px; }
.cal-booking-item strong { display: block; font-size: var(--text-base); font-weight: var(--weight-semibold); color: var(--badge-info-text); margin-bottom: 2px; }
.cal-booking-item small  { font-size: var(--text-sm); color: var(--badge-info-text); opacity: 0.8; }

.cal-block-row             { display: flex; align-items: center; justify-content: space-between; padding: 8px 10px; border-radius: 8px; margin-bottom: 6px; font-size: var(--text-base); }
.cal-block-row.HOLIDAY     { background: var(--badge-warning-bg); color: var(--badge-warning-text); }
.cal-block-row.UNAVAILABLE { background: var(--badge-danger-bg);  color: var(--badge-danger-text); }
.cal-block-row.OTHER       { background: var(--panel-2);          color: var(--text-muted); }
.cal-block-row.TRAVEL      { background: #e0f2fe; color: #0369a1; }
.cal-block-row.SETUP       { background: #f0fdf4; color: #166534; }
.cal-block-row.BREAKDOWN   { background: #fdf4ff; color: #7e22ce; }

.cal-block-remove       { background: none; border: none; cursor: pointer; font-size: var(--text-base); opacity: 0.5; padding: 0 2px; color: inherit; transition: opacity 0.15s; }
.cal-block-remove:hover { opacity: 1; }

.cal-add-form { display: flex; flex-direction: column; gap: 8px; }
.cal-add-form select,
.cal-add-form input[type="text"] { width: 100%; padding: 8px 10px; border: 1px solid var(--border); border-radius: 8px; background: var(--input-bg); color: var(--text); outline: none; transition: border-color 0.15s; }
.cal-add-form select:focus,
.cal-add-form input:focus { border-color: var(--primary); }

.cal-range-row   { display: flex; flex-direction: column; gap: 8px; }
.cal-range-field { display: flex; align-items: center; gap: 8px; }
.cal-range-field label { font-size: var(--text-sm); font-weight: var(--weight-semibold); text-transform: uppercase; letter-spacing: 0.05em; color: var(--text-muted); white-space: nowrap; width: 28px; flex-shrink: 0; }
.cal-range-field input[type="date"] { flex: 1; min-width: 0; padding: 7px 8px; border: 1px solid var(--border); border-radius: 8px; background: var(--input-bg); color: var(--text); outline: none; transition: border-color 0.15s; }
.cal-range-field input[type="date"]:focus { border-color: var(--primary); }

.cal-conflict-warning { background: var(--badge-danger-bg); border: 1px solid var(--danger); border-radius: 8px; padding: 10px 12px; font-size: var(--text-base); color: var(--badge-danger-text); margin-bottom: 12px; }

.cal-suggest           { margin-top: 10px; padding-top: 10px; border-top: 1px solid var(--border); display: flex; flex-direction: column; gap: 6px; }
.cal-suggest-label     { font-size: var(--text-sm); font-weight: var(--weight-semibold); text-transform: uppercase; letter-spacing: 0.05em; color: var(--text-muted); display: block; margin-top: 4px; }
.cal-suggest-btn       { margin-right: 6px; border: 1px solid var(--border); background: var(--panel-2); color: var(--text); }
.cal-suggest-travel    { border-color: #0369a1; color: #0369a1; }
.cal-suggest-setup     { border-color: #166534; color: #166534; }
.cal-suggest-breakdown { border-color: #7e22ce; color: #7e22ce; }

/* Mobile calendar drawer — hidden by default, shown via @media below */
.cal-drawer-overlay { display: none; }
.cal-drawer         { display: none; }


/* ================================================
   29. ORGANISER DASHBOARD
   (KPI classes live in section 17 alongside billing)
================================================ */


/* ================================================
   30. REVIEWS
================================================ */

.radio-pill { display: inline-flex; align-items: center; gap: 6px; padding: 8px 16px; border: 1px solid var(--border); border-radius: 999px; cursor: pointer; font-size: var(--text-base); transition: border-color 0.15s, background 0.15s; background: var(--panel); color: var(--text); user-select: none; }
.radio-pill input[type="radio"]  { display: none; }
.radio-pill:has(input:checked)   { border-color: var(--primary); background: var(--panel-hover); font-weight: var(--weight-semibold); color: var(--primary); }

.star-picker { display: flex; gap: 6px; align-items: center; }
.star-label  { cursor: pointer; font-size: 26px; color: var(--text-muted); transition: color 0.1s, transform 0.1s; line-height: 1; }
.star-label:hover,
.star-label.active      { color: #f59e0b; transform: scale(1.12); }
.star-label i.fa-solid  { color: #f59e0b; }

.no-show-label           { padding: 14px; border: 1px solid var(--border); border-radius: 10px; background: var(--panel); cursor: pointer; transition: border-color 0.15s, background 0.15s; }
.no-show-label.is-checked { border-color: var(--danger); background: var(--badge-danger-bg); }

.review-card            { background: var(--panel); border: 1px solid var(--border); border-radius: 12px; padding: 16px; margin-bottom: 12px; }
.review-card:last-child { margin-bottom: 0; }
.review-card-header     { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; margin-bottom: 10px; }
.review-card-meta       { font-size: var(--text-sm); color: var(--text-muted); margin-top: 2px; }
.review-stars           { display: flex; gap: 2px; font-size: var(--text-base); color: #f59e0b; flex-shrink: 0; }
.review-stars .fa-regular { color: var(--text-muted); }
.review-body            { font-size: var(--text-base); color: var(--text-muted); line-height: 1.6; }
.review-metrics         { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.review-metric          { display: flex; align-items: center; gap: 5px; font-size: var(--text-sm); color: var(--text-muted); background: var(--panel-2); border: 1px solid var(--border); border-radius: 6px; padding: 4px 8px; }
.review-metric.pass     { color: var(--badge-success-text); background: var(--badge-success-bg); border-color: transparent; }
.review-metric.fail     { color: var(--badge-danger-text);  background: var(--badge-danger-bg);  border-color: transparent; }

.would-return-yes { color: var(--badge-success-text); background: var(--badge-success-bg); }
.would-return-no  { color: var(--badge-danger-text);  background: var(--badge-danger-bg); }

.review-summary      { display: flex; flex-direction: column; gap: 10px; margin-bottom: 16px; }
.review-summary-row  { display: flex; align-items: center; gap: 10px; font-size: var(--text-base); }
.review-summary-label    { width: 180px; flex-shrink: 0; color: var(--text-muted); }
.review-summary-bar-wrap { flex: 1; height: 6px; background: var(--panel-2); border-radius: 999px; overflow: hidden; }
.review-summary-bar-fill { height: 100%; border-radius: 999px; background: #f59e0b; transition: width 0.4s ease; }
.review-summary-score    { width: 30px; text-align: right; font-weight: var(--weight-semibold); color: var(--text); font-size: var(--text-base); }

.review-overall       { display: flex; align-items: baseline; gap: 6px; margin-bottom: 4px; }
.review-overall-score { font-size: 36px; font-weight: var(--weight-bold); color: var(--text); line-height: 1; }
.review-overall-max   { font-size: var(--text-input); color: var(--text-muted); }
.review-overall-count { font-size: var(--text-base); color: var(--text-muted); }

.review-empty { text-align: center; padding: 30px; color: var(--text-muted); font-size: var(--text-base); background: var(--panel-2); border: 1px dashed var(--border); border-radius: 12px; }

.trader-badges        { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.trader-badge-summary { display: flex; flex-direction: column; gap: 8px; }
.badge-summary-stats  { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.badge-stat           { display: inline-flex; align-items: center; gap: 5px; font-size: var(--text-sm); color: var(--text-muted); }
.badge-stat-danger    { color: var(--badge-danger-text); }
.badge-stat-warning   { color: var(--badge-warning-text); }


/* ================================================
   31. ONBOARDING WIZARD
================================================ */

.ob-overlay { position: fixed; inset: 0; background: var(--modal-overlay); display: flex; align-items: center; justify-content: center; z-index: 10000; padding: 16px; }

.ob-card { background: var(--panel); border: 1px solid var(--border); border-radius: 16px; width: 100%; max-width: 520px; max-height: 90vh; overflow-y: auto; padding: 28px 28px 20px; box-shadow: 0 24px 60px rgba(0,0,0,0.2); scrollbar-width: thin; scrollbar-color: var(--scrollbar-thumb) transparent; }
.ob-card::-webkit-scrollbar       { width: 6px; }
.ob-card::-webkit-scrollbar-thumb { background: var(--scrollbar-thumb); border-radius: 10px; }

.ob-progress-track { height: 3px; background: var(--panel-2); border-radius: 99px; margin-bottom: 24px; overflow: hidden; }
.ob-progress-fill  { height: 100%; background: var(--primary); border-radius: 99px; transition: width 0.4s ease; width: 0%; }

.ob-step           { display: none; animation: obFadeIn 0.22s ease; }
.ob-step.ob-active { display: block; }

.ob-title     { font-size: var(--text-page); font-weight: var(--weight-semibold); color: var(--text); margin-bottom: 4px; }
.ob-sub       { font-size: var(--text-base); color: var(--text-muted); margin-bottom: 18px; line-height: 1.5; }
.ob-hero-icon { font-size: 32px; color: var(--text-muted); margin-bottom: 12px; }

.ob-stats    { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-bottom: 20px; }
.ob-stat     { background: var(--panel-2); border: 1px solid var(--border); border-radius: 10px; padding: 12px; text-align: center; }
.ob-stat-val { font-size: 22px; font-weight: var(--weight-bold); color: var(--primary); line-height: 1; }
.ob-stat-lbl { font-size: var(--text-sm); color: var(--text-muted); margin-top: 3px; }

.ob-choice-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 20px; }
.ob-choice-card { background: var(--panel); border: 1.5px solid var(--border); border-radius: 12px; padding: 16px; cursor: pointer; transition: border-color 0.15s, background 0.15s; text-align: left; }
.ob-choice-card:hover,
.ob-choice-card.ob-selected { border-color: var(--primary); background: var(--panel-hover); }
.ob-choice-icon { font-size: 22px; color: var(--text-muted); margin-bottom: 8px; }
.ob-choice-name { font-size: var(--text-base); font-weight: var(--weight-semibold); color: var(--text); margin-bottom: 3px; }
.ob-choice-desc { font-size: var(--text-sm); color: var(--text-muted); line-height: 1.4; }

.ob-sub-panel  { animation: obFadeIn 0.18s ease; }
.ob-sub-header { display: flex; align-items: center; gap: 10px; margin-bottom: 16px; padding-bottom: 12px; border-bottom: 1px solid var(--border); }
.ob-sub-title  { font-size: 15px; font-weight: var(--weight-semibold); color: var(--text); }

.ob-form-grid  { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 4px; }
.ob-field      { display: flex; flex-direction: column; gap: 4px; }
.ob-field-full { grid-column: span 2; }
.ob-field label  { font-size: var(--text-sm); color: var(--text-muted); font-weight: var(--weight-medium); }
.ob-field input,
.ob-field select { width: 100%; padding: 10px 12px; border: 1px solid var(--border); border-radius: 8px; background: var(--panel); color: var(--text); outline: none; transition: border-color 0.15s; font-family: inherit; }
.ob-field input:focus,
.ob-field select:focus { border-color: var(--primary); }
.ob-field select { appearance: none; -webkit-appearance: none; cursor: pointer; }
.ob-required { color: var(--danger); margin-left: 2px; }
.ob-optional { color: var(--text-muted); font-weight: var(--weight-normal); }

.ob-role-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.ob-role-card { background: var(--panel); border: 1.5px solid var(--border); border-radius: 10px; padding: 14px; cursor: pointer; transition: border-color 0.15s, background 0.15s; user-select: none; }
.ob-role-card:hover       { border-color: var(--primary); background: var(--panel-2); }
.ob-role-card.ob-selected { border-color: var(--primary); background: rgba(29,78,216,0.06); }
html[data-theme="dark"] .ob-role-card.ob-selected { background: rgba(59,130,246,0.1); }
.ob-role-icon { font-size: 20px; color: var(--text-muted); margin-bottom: 6px; }
.ob-role-card.ob-selected .ob-role-icon { color: var(--primary); }
.ob-role-name { font-size: var(--text-base); font-weight: var(--weight-semibold); color: var(--text); margin-bottom: 2px; }
.ob-role-desc { font-size: var(--text-sm); color: var(--text-muted); line-height: 1.4; }

.ob-checklist { display: flex; flex-direction: column; gap: 8px; margin-bottom: 20px; }
.ob-check     { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border: 1px solid var(--border); border-radius: 10px; background: var(--panel); cursor: pointer; transition: background 0.15s, border-color 0.15s; text-decoration: none; color: var(--text); }
.ob-check:hover   { background: var(--panel-hover); }
.ob-check.ob-done { border-color: var(--success); background: var(--badge-success-bg); }
.ob-circle { width: 22px; height: 22px; border-radius: 50%; border: 1.5px solid var(--border); display: flex; align-items: center; justify-content: center; flex-shrink: 0; font-size: var(--text-sm); color: transparent; transition: all 0.15s; }
.ob-check.ob-done .ob-circle { background: var(--success); border-color: var(--success); color: #fff; }
.ob-check-body  { flex: 1; min-width: 0; }
.ob-check-label { font-size: var(--text-base); font-weight: var(--weight-semibold); color: var(--text); }
.ob-check.ob-done .ob-check-label { color: var(--badge-success-text); }
.ob-check-meta  { font-size: var(--text-sm); color: var(--text-muted); margin-top: 1px; }

.ob-badge             { font-size: var(--text-sm); font-weight: var(--weight-semibold); padding: 3px 9px; border-radius: 999px; white-space: nowrap; flex-shrink: 0; }
.ob-badge-required    { background: var(--badge-danger-bg);  color: var(--badge-danger-text); }
.ob-badge-recommended { background: var(--badge-warning-bg); color: var(--badge-warning-text); }
.ob-badge-optional    { background: var(--panel-2); color: var(--text-muted); border: 1px solid var(--border); }
.ob-badge-done        { background: var(--badge-success-bg); color: var(--badge-success-text); }

.ob-features   { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-bottom: 20px; }
.ob-feat       { background: var(--panel-2); border: 1px solid var(--border); border-radius: 10px; padding: 14px 12px; }
.ob-feat-icon  { font-size: 18px; color: var(--text-muted); margin-bottom: 6px; }
.ob-feat-title { font-size: var(--text-base); font-weight: var(--weight-semibold); color: var(--text); margin-bottom: 2px; }
.ob-feat-desc  { font-size: var(--text-sm); color: var(--text-muted); line-height: 1.4; }

.ob-finish      { text-align: center; padding: 20px 0 10px; }
.ob-finish-icon { font-size: 40px; color: var(--success); margin-bottom: 12px; }

.ob-nav     { display: flex; align-items: center; justify-content: space-between; padding-top: 12px; border-top: 1px solid var(--border); margin-top: 8px; }
.ob-btn-row { display: flex; align-items: center; gap: 8px; }

.ob-dots { display: flex; gap: 6px; align-items: center; }
.ob-dot  { width: 6px; height: 6px; border-radius: 50%; background: var(--border); transition: background 0.2s, transform 0.2s; }
.ob-dot.ob-dot-active { background: var(--primary); transform: scale(1.35); }


/* ================================================
   32. GUIDED TOUR
================================================ */

#tour-overlay {
    position: fixed; inset: 0;
    z-index: 99000;
    background: rgba(0,0,0,0.55);
    pointer-events: all;
}
#tour-spotlight {
    position: absolute;
    border-radius: 10px;
    box-shadow: 0 0 0 4px var(--primary), 0 0 0 9999px rgba(0,0,0,0.55);
    pointer-events: none;
    transition: top 0.3s ease, left 0.3s ease, width 0.3s ease, height 0.3s ease;
    z-index: 1;
}
#tour-tooltip { position: fixed; width: 320px; background: var(--panel); border: 1px solid var(--border); border-radius: 14px; padding: 18px 18px 14px; box-shadow: 0 20px 50px rgba(0,0,0,0.3); z-index: 99001; animation: tourTooltipIn 0.2s ease; }

#tour-tooltip-header  { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; }
#tour-tooltip-counter { font-size: var(--text-sm); font-weight: var(--weight-semibold); color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.06em; background: var(--panel-2); padding: 3px 8px; border-radius: 999px; border: 1px solid var(--border); }
#tour-close           { background: none; border: none; color: var(--text-muted); cursor: pointer; padding: 4px 6px; border-radius: 6px; font-size: var(--text-base); line-height: 1; transition: background 0.15s, color 0.15s; }
#tour-close:hover     { background: var(--panel-2); color: var(--text); }

#tour-tooltip-title { font-size: 15px; font-weight: var(--weight-bold); color: var(--text); margin-bottom: 6px; line-height: 1.3; }
#tour-tooltip-body  { font-size: var(--text-base); color: var(--text-muted); line-height: 1.6; margin-bottom: 14px; }

#tour-tooltip-nav { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding-top: 12px; border-top: 1px solid var(--border); }
#tour-btn-prev       { display: inline-flex; align-items: center; gap: 5px; padding: 7px 12px; font-size: var(--text-base); font-weight: var(--weight-semibold); border-radius: 8px; border: 1px solid var(--border); background: var(--panel-2); color: var(--text-muted); cursor: pointer; transition: background 0.15s, color 0.15s; }
#tour-btn-prev:hover { background: var(--panel-hover); color: var(--text); }
#tour-btn-next       { display: inline-flex; align-items: center; gap: 5px; padding: 7px 14px; font-size: var(--text-base); font-weight: var(--weight-semibold); border-radius: 8px; border: 1px solid var(--primary); background: var(--primary); color: #fff; cursor: pointer; transition: opacity 0.15s, transform 0.15s; margin-left: auto; }
#tour-btn-next:hover { opacity: 0.9; transform: translateY(-1px); }


/* ================================================
   33. TOAST
================================================ */

#toast-container {
    position: fixed;
    top: 70px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 99999;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    pointer-events: none;
    min-width: 260px;
    width: max-content;
    max-width: calc(100vw - 32px);
}

.toast {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 11px 16px;
    border-radius: 10px;
    font-size: var(--text-base);
    font-weight: var(--weight-medium);
    font-family: 'Inter', sans-serif;
    opacity: 0;
    transform: translateY(-10px);
    transition: opacity .2s ease, transform .2s ease;
    pointer-events: all;
    box-shadow: 0 4px 16px rgba(0,0,0,.12), 0 1px 3px rgba(0,0,0,.08);
    white-space: normal;
    word-break: break-word;
    width: 100%;
    box-sizing: border-box;
    border: 1px solid transparent;
    text-align: center;
}
.toast-show { opacity: 1; transform: translateY(0); }

.toast-success { background: var(--badge-success-bg); color: var(--badge-success-text); border-color: rgba(22,163,74,.2); }
.toast-error   { background: var(--badge-danger-bg);  color: var(--badge-danger-text);  border-color: rgba(185,28,28,.2); }
.toast-info    { background: var(--badge-info-bg);    color: var(--badge-info-text);    border-color: rgba(29,78,216,.2); }
.toast-warning { background: var(--badge-warning-bg); color: var(--badge-warning-text); border-color: rgba(180,83,9,.2); }

.toast::before         { font-family: 'Font Awesome 6 Free'; font-weight: 900; font-size: var(--text-sm); flex-shrink: 0; }
.toast-success::before { content: '\f00c'; }
.toast-error::before   { content: '\f071'; }
.toast-info::before    { content: '\f129'; }
.toast-warning::before { content: '\f071'; }


/* ================================================
   34. MOBILE NAVIGATION
================================================ */

/* Bottom nav bar — hidden on desktop */
.mobile-nav { display: none; }

/* Mobile-only panels */
.mobile-menu-drawer {
    position: fixed;
    left: 0; right: 0;
    bottom: -100%;
    background: var(--panel);
    border-radius: 20px 20px 0 0;
    padding: 20px;
    transition: bottom 0.25s ease;
    z-index: 3000;
}
.mobile-menu-drawer.open { bottom: 64px; }

.mobile-account-panel {
    position: fixed;
    inset: 0 0 64px 0;
    background: var(--panel);
    z-index: 3500;
    transform: translateX(100%);
    transition: transform 0.25s ease;
    overflow-y: auto;
    padding: 20px;
}
.mobile-account-panel.open { transform: translateX(0); }

.mobile-account-header {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px;
    background: var(--panel-2);
    border-radius: 12px;
    margin-bottom: 15px;
}
.mobile-account-avatar {
    width: 48px; height: 48px;
    border-radius: 50%;
    background: var(--primary);
    color: #fff;
    display: flex; align-items: center; justify-content: center;
    font-weight: 600;
}
.mobile-account-info .name  { font-weight: 600; font-size: 15px; }
.mobile-account-info .email { font-size: 12px; color: var(--text-muted); }

.mobile-card       { background: var(--panel-2); border-radius: 12px; padding: 10px; margin-bottom: 12px; }
.mobile-card-title { font-size: 12px; color: var(--text-muted); margin-bottom: 8px; padding-left: 6px; }

.mobile-action        { display: flex; align-items: center; gap: 10px; padding: 12px; border-radius: 10px; text-decoration: none; color: var(--text); transition: 0.15s; }
.mobile-action:hover  { background: var(--panel-hover); }
.mobile-action.danger { color: var(--danger); }

.mobile-select { width: 100%; padding: 10px; border-radius: 10px; border: 1px solid var(--border); background: var(--panel); color: var(--text); }


/* ═══════════════════════════════════════════
   35. DASHBOARD ONBOARDING CARD
═══════════════════════════════════════════ */
.dash-ob-card {
    background: var(--panel);
    border: 1px solid var(--border);
    border-radius: 14px;
    padding: 20px;
    margin-bottom: 24px;
}

.dash-ob-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 14px;
}
.dash-ob-header-left {
    display: flex;
    align-items: center;
    gap: 12px;
}
.dash-ob-icon {
    width: 38px;
    height: 38px;
    border-radius: 10px;
    background: rgba(108,77,246,0.12);
    color: var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    flex-shrink: 0;
}
.dash-ob-title {
    font-size: 15px;
    font-weight: 700;
    color: var(--text);
    line-height: 1.2;
}
.dash-ob-subtitle {
    font-size: 12px;
    color: var(--text-muted);
    margin-top: 2px;
}
.dash-ob-dismiss {
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    padding: 4px 6px;
    border-radius: 6px;
    font-size: 14px;
    transition: background 0.15s, color 0.15s;
    line-height: 1;
}
.dash-ob-dismiss:hover {
    background: var(--panel-2);
    color: var(--text);
}

.dash-ob-progress-track {
    height: 4px;
    background: var(--panel-2);
    border-radius: 99px;
    margin-bottom: 16px;
    overflow: hidden;
}
.dash-ob-progress-fill {
    height: 100%;
    background: var(--primary);
    border-radius: 99px;
    transition: width 0.4s ease;
}

.dash-ob-steps {
    display: flex;
    flex-direction: column;
    gap: 2px;
}
.dash-ob-step {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px;
    border-radius: 10px;
    text-decoration: none;
    transition: background 0.15s;
    cursor: pointer;
}
.dash-ob-step:hover:not(.dash-ob-done) {
    background: var(--panel-2);
}
.dash-ob-step.dash-ob-done {
    opacity: 0.5;
    cursor: default;
    pointer-events: none;
}
.dash-ob-step-check {
    width: 26px;
    height: 26px;
    border-radius: 50%;
    border: 2px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    font-weight: 700;
    color: var(--text-muted);
    flex-shrink: 0;
    transition: background 0.15s, border-color 0.15s;
}
.dash-ob-step.dash-ob-done .dash-ob-step-check {
    background: var(--success);
    border-color: var(--success);
    color: #fff;
}
.dash-ob-step-body {
    flex: 1;
    min-width: 0;
}
.dash-ob-step-title {
    font-size: 13px;
    font-weight: 600;
    color: var(--text);
    display: flex;
    align-items: center;
    gap: 6px;
}
.dash-ob-step-desc {
    font-size: 12px;
    color: var(--text-muted);
    margin-top: 1px;
    line-height: 1.4;
}
.dash-ob-optional {
    font-size: 10px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-muted);
    background: var(--panel-2);
    border: 1px solid var(--border);
    border-radius: 99px;
    padding: 1px 7px;
}
.dash-ob-step-arrow {
    font-size: 11px;
    color: var(--text-muted);
    flex-shrink: 0;
    transition: transform 0.15s;
}
.dash-ob-step:hover .dash-ob-step-arrow {
    transform: translateX(2px);
}

/* ================================================
   36. VENUE LAYOUT BUILDER
   Prefix: vl-
   All colours use existing CSS variables.
================================================ */

/* ── Page shell ── */
.vl-page {
    display: flex;
    flex-direction: column;
    height: 100dvh;
    overflow: hidden;
    background: var(--bg);
}

/* ── Top bar ── */
.vl-topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 0 12px;
    min-height: 56px;
    height: auto;
    row-gap: 6px;
    flex-wrap: wrap;
    flex-shrink: 0;
    margin-top: 16px;
    background: var(--panel);
    border: 1px solid var(--border);
    border-top-left-radius: 12px;
    border-top-right-radius: 12px;
}
.vl-topbar-left  { display: flex; align-items: center; gap: 10px; min-width: 0; }
.vl-topbar-right { display: flex; align-items: center; gap: 8px; flex-shrink: 0; flex-wrap: wrap; }

.vl-back-btn {
    display: flex; align-items: center; justify-content: center;
    width: 32px; height: 32px; border-radius: 8px;
    background: var(--panel-2); color: var(--text-muted);
    text-decoration: none; transition: background 0.15s, color 0.15s; flex-shrink: 0;
}
.vl-back-btn:hover { background: var(--border); color: var(--text); }

.vl-page-title {
    font-size: var(--text-base); font-weight: var(--weight-semibold);
    color: var(--text); white-space: nowrap; overflow: hidden;
    text-overflow: ellipsis; max-width: 280px;
}
.vl-venue-tag {
    font-size: var(--text-sm); color: var(--text-muted);
    display: flex; align-items: center; gap: 4px; margin-top: 1px;
}

/* ── Sidebar ── */
.vl-body {
    display: flex;
    flex-direction: row;
    flex: 1 1 0;
    min-height: 0;
    overflow: hidden;
    position: relative; /* containing block for the floating toggle + right panel */
}
.vl-sidebar {
    background: var(--panel);
    border-left: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    flex-shrink: 0;
    width: 220px;
    scrollbar-width: thin;
    scrollbar-color: var(--scrollbar-thumb) transparent;
}
.vl-sidebar::-webkit-scrollbar       { width: 4px; }
.vl-sidebar::-webkit-scrollbar-thumb { background: var(--scrollbar-thumb); border-radius: 4px; }

/* Collapsible left sidebar — now a floating overlay (position:absolute)
   rather than a flex item that resizes the canvas. The map is always
   full-bleed underneath; the sidebar just slides on/off the top of it,
   same technique as .vl-sidebar-right below. Targeted by id (not the
   shared .vl-sidebar class) so it never touches .vl-sidebar-right.
   !important on position: this was previously defeated by other JS
   (setSidebarLocked) setting an inline position:relative on this same
   element for an unrelated reason (positioning its own lock overlay) —
   inline styles always win over external rules regardless of specificity,
   which silently put the sidebar back in normal flex flow. That JS is
   fixed now too, but !important here means any future inline position on
   this element can no longer reintroduce the same bug. */
#vl-sidebar-left {
    position: absolute !important;
    top: 0; left: 0; bottom: 0;
    transform: translateX(0);
    transition: transform 0.2s ease;
    box-shadow: 4px 0 16px rgba(0,0,0,0.15);
    z-index: 55;
}
.vl-body.vl-left-collapsed #vl-sidebar-left { transform: translateX(-100%); }

/* Floating collapse handle — sits on the fold line, like OnePlan's "<" arrow */
.vl-sidebar-toggle {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 26px; height: 26px;
    border-radius: 50%;
    background: var(--panel);
    border: 1px solid var(--border);
    display: flex; align-items: center; justify-content: center;
    cursor: pointer;
    z-index: 60;
    box-shadow: 0 1px 4px rgba(0,0,0,0.18);
    color: var(--text-muted);
    font-size: 11px;
    transition: left 0.2s ease, color 0.15s, border-color 0.15s;
}
.vl-sidebar-toggle:hover { color: var(--text); border-color: var(--primary); }
.vl-sidebar-toggle i { transition: transform 0.2s ease; }
.vl-sidebar-toggle-left { left: 227px; } /* left sidebar is 240px wide (inline style) — sit on its edge */
.vl-body.vl-left-collapsed .vl-sidebar-toggle-left { left: 4px; }
.vl-body.vl-left-collapsed .vl-sidebar-toggle-left i { transform: rotate(180deg); }

/* Sidebar tabs */
.vl-tabs {
    display: flex;
    flex-shrink: 0;
    border-bottom: 1px solid var(--border);
    background: var(--panel-2);
}
.vl-tab {
    flex: 1; padding: 8px 4px;
    font-size: 11px; font-weight: 500;
    text-align: center; cursor: pointer;
    border: none; background: transparent;
    color: var(--text-muted);
    border-bottom: 2px solid transparent;
    transition: color 0.15s, border-color 0.15s;
    white-space: nowrap;
}
.vl-tab:hover { color: var(--text); }
.vl-tab.active { color: var(--primary); border-bottom-color: var(--primary); }
.vl-tab-panel { flex: 1 1 0; overflow-y: auto; }
.vl-tab-panel.hidden { display: none; }

.vl-sb-section {
    padding: 8px 10px;
    
}
.vl-sb-section:last-child { border-bottom: none; }

.vl-sb-label {
    font-size: var(--text-sm); font-weight: var(--weight-semibold);
    color: var(--text-muted); text-transform: uppercase;
    letter-spacing: 0.06em; margin-bottom: 8px;
    display: flex; align-items: center; gap: 6px;
}

.vl-select {
    width: 100%; padding: 7px 10px;
    border: 1px solid var(--border); border-radius: 8px;
    background: var(--panel); color: var(--text);
    font-size: var(--text-sm); margin-bottom: 6px;
    appearance: none; -webkit-appearance: none;
    cursor: pointer; outline: none; transition: border-color 0.15s;
}
.vl-select:focus { border-color: var(--primary); }

.vl-layout-actions { display: flex; gap: 4px; }

/* ── Pitch type grid ── */
.vl-pitch-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4px;
    margin-top: 6px;
}
.vl-pitch-type {
    display: flex; flex-direction: column; align-items: center; gap: 4px;
    padding: 8px 4px; border: 1px solid var(--border); border-radius: 8px;
    background: var(--panel-2); color: var(--text-muted);
    font-size: 11px; cursor: pointer;
    transition: border-color 0.15s, background 0.15s, color 0.15s;
}
.vl-pitch-type:hover { background: var(--panel-hover); color: var(--text); }
.vl-pitch-type.active {
    background: rgba(108,77,246,0.08);
    border-color: var(--primary); color: var(--primary);
}
.vl-pt-preview { background: var(--primary); opacity: 0.35; border-radius: 3px; }

/* ── Pitch size inputs ── */
.vl-pitch-dim-row  { display: flex; gap: 8px; margin-bottom: 8px; }
.vl-pitch-dim-field { flex: 1; display: flex; flex-direction: column; gap: 3px; }
.vl-pitch-dim-field label { font-size: 11px; color: var(--text-muted); }
.vl-pitch-dim-field input { width: 100%; }

/* ── Object palette — vertical list rows ── */
/* Each object is a full-width row: icon left, label right */
.vl-obj-list {
    display: flex;
    flex-direction: column;
    gap: 1px;
}

.vl-obj-item {
    display: flex;
    align-items: center;
    gap: 9px;
    width: 100%;
    padding: 6px 8px;
    border: none !important;  /* override .vl-obj-btn border */
    border-radius: 7px;
    background: transparent;
    color: var(--text-muted);
    font-size: 12px;
    font-weight: 500;
    cursor: pointer;
    text-align: left;
    transition: background 0.12s, color 0.12s;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1.3;
}
.vl-obj-item:hover  { background: var(--panel-2); color: var(--text); }
.vl-obj-item.active { background: rgba(108,77,246,0.09); color: var(--primary); }

/* Icon cell — fixed width so labels all start at the same x */
.vl-obj-item-icon {
    width: 22px;
    text-align: center;
    font-size: 13px;
    flex-shrink: 0;
    color: inherit;
}

/* Colour swatch for staffing dots & line types */
.vl-obj-item-swatch {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    border: 1.5px solid #fff;
    box-shadow: 0 0 0 1px rgba(0,0,0,0.15);
    flex-shrink: 0;
}
.vl-obj-item-swatch.square {
    border-radius: 2px;
}

/* Line type colour stripe */
.vl-obj-item-stripe {
    width: 18px;
    height: 3px;
    border-radius: 2px;
    flex-shrink: 0;
}

/* Sub-section label within accordion */
.vl-obj-sub-label {
    font-size: 10px;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    padding: 6px 8px 2px;
    opacity: 0.7;
}

/* .vl-obj-btn is used as a JS selector hook on ALL placeable object buttons.
   Fixed square sizing only applies when it is NOT inside a .vl-obj-list.
   When inside .vl-obj-list the .vl-obj-item styles take over. */
.vl-obj-btn {
    cursor: pointer;
    border-radius: 7px;
    color: var(--text-muted);
    transition: color 0.12s, background 0.12s;
    font-size: inherit;
    background: transparent;
    border: none;
}
.vl-obj-btn:hover  { color: var(--primary); }
.vl-obj-btn.active { color: var(--primary); }

/* Zone & line draw buttons — full-width rows */
.vl-obj-zone-btn, .vl-obj-line-btn, .vl-obj-draw-btn {
    display: flex; align-items: center;
    width: 100%; height: auto;
    padding: 5px 8px; gap: 8px;
    font-size: 12px; font-weight: 500;
    justify-content: flex-start;
    border-radius: 6px;
    color: var(--text-muted);
}
.vl-obj-zone-btn:hover, .vl-obj-line-btn:hover, .vl-obj-draw-btn:hover { color: var(--primary); background: rgba(108,77,246,0.06); }
.vl-obj-zone-btn.active, .vl-obj-line-btn.active { color: var(--primary); background: rgba(108,77,246,0.08); }

/* Trader list */
.vl-trader-row {
    display: flex; align-items: center; gap: 8px;
    padding: 6px 8px; border-radius: 8px;
    cursor: grab; margin-bottom: 2px;
    border: 1px solid transparent;
    transition: background 0.15s, border-color 0.15s;
}
.vl-trader-row:hover { background: var(--panel-2); border-color: var(--border); }
.vl-trader-row.vl-trader-placed-row { opacity: 0.5; cursor: default; }
.vl-trader-dot  { width: 10px; height: 10px; border-radius: 50%; background: var(--primary); flex-shrink: 0; }
.vl-trader-info { flex: 1; min-width: 0; }
.vl-trader-name { font-size: 12px; font-weight: var(--weight-medium); color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.vl-trader-type { font-size: 10px; color: var(--text-muted); }

/* Placed items tab */
.vl-placed-row {
    display: flex; align-items: center; gap: 8px;
    padding: 5px 10px; cursor: pointer; border-radius: 6px;
    transition: background 0.1s;
}
.vl-placed-row:hover { background: var(--panel-2); }
.vl-placed-row:hover .vl-placed-icon { opacity: 1; }
.vl-placed-dot  { width: 10px; height: 10px; border-radius: 50%; flex-shrink: 0; }
.vl-placed-info { flex: 1; min-width: 0; }
.vl-placed-name { font-size: 12px; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.vl-placed-sub  { font-size: 11px; color: var(--text-muted); }
.vl-placed-icon { font-size: 11px; color: var(--text-muted); opacity: 0; transition: opacity 0.1s; flex-shrink: 0; }

/* ── Main area ── */
.vl-main {
    flex: 1 1 0; min-width: 0;
    display: flex; flex-direction: column;
    overflow: hidden; height: 100%;
    position: relative; /* containing block for the floating stats pill */
}

/* Toolbar */
.vl-toolbar {
    display: flex; align-items: center; gap: 4px;
    padding: 5px 10px; background: var(--panel);
    flex-shrink: 0; flex-wrap: wrap;
    border-bottom: 1px solid var(--border);
}
.vl-tb-group { display: flex; align-items: center; gap: 3px; }
.vl-tb-sep   { width: 1px; height: 20px; background: var(--border); flex-shrink: 0; margin: 0 2px; }
.vl-tb-right { margin-left: auto; display: flex; align-items: center; gap: 8px; }

/* File / Edit / View / Tools menu bar dropdowns */
.vl-menu-panel {
    position: absolute; top: calc(100% + 6px); left: 0; z-index: 500;
    background: var(--color-background-primary,#fff);
    border: 1px solid var(--color-border-tertiary,#e0e0e0);
    border-radius: 10px; padding: 6px; min-width: 190px;
    box-shadow: 0 4px 16px rgba(0,0,0,0.12);
    flex-direction: column; gap: 2px;
}
.vl-menu-trigger i.fa-caret-down { font-size: 9px; margin-left: 3px; opacity: 0.6; }
.vl-menu-divider    { height: 1px; background: var(--color-border-tertiary,#e0e0e0); margin: 4px 0; }
.vl-menu-subheading { font-size: 11px; font-weight: 600; color: var(--color-text-secondary,#666); padding: 6px 8px 2px; text-transform: uppercase; letter-spacing: 0.02em; }

/* Canvas */
.vl-canvas-wrap {
    flex: 1 1 0; min-height: 0;
    position: relative; overflow: hidden;
    border: 1px solid var(--border);
}
.vl-map { position: absolute; inset: 0; z-index: 1; width: 100%; height: 100%; }
.vl-pitch-layer { position: absolute; inset: 0; z-index: 10; pointer-events: none; }
.vl-pitch-layer.vl-placing { cursor: crosshair; pointer-events: all; }

/* Scale overlay */
.vl-scale-overlay {
    position: absolute; inset: 0;
    background: rgba(244,166,42,0.06);
    cursor: crosshair; z-index: 20; pointer-events: all;
}
.vl-scale-hint {
    position: absolute; top: 14px; left: 50%; transform: translateX(-50%);
    background: var(--badge-warning-bg); color: var(--badge-warning-text);
    border: 1px solid var(--warning); border-radius: 8px;
    padding: 7px 14px; font-size: var(--text-sm);
    white-space: nowrap; pointer-events: none;
}
.vl-scale-line {
    position: absolute; height: 2px; background: var(--warning);
    transform-origin: left center; pointer-events: none; z-index: 21;
}

/* Pitch elements (legacy — used by indoor SVG layer) */
.vl-pitch { position: absolute; transform-origin: center center; pointer-events: all; cursor: pointer; user-select: none; }
.vl-pitch-box {
    width: 100%; height: 100%; border-radius: 6px; border: 1.5px solid;
    display: flex; flex-direction: column; align-items: center; justify-content: center;
    position: relative; transition: outline 0.1s;
}
.vl-pitch.vl-pitch-empty    .vl-pitch-box { background: rgba(47,191,113,0.15); border-color: var(--success); color: var(--success); }
.vl-pitch.vl-pitch-assigned .vl-pitch-box { background: rgba(108,77,246,0.12); border-color: var(--primary); color: var(--primary); }
.vl-pitch.vl-selected       .vl-pitch-box { outline: 2px solid var(--primary); outline-offset: 2px; }
.vl-pitch-label  { font-size: 10px; font-weight: var(--weight-semibold); text-align: center; line-height: 1.2; }
.vl-pitch-trader { font-size: 9px; text-align: center; opacity: 0.8; margin-top: 1px; }

/* Map objects — icon-in-box style (non-shaped) */
.vl-map-object { position: absolute; transform-origin: center center; pointer-events: all; cursor: pointer; user-select: none; z-index: 5; }
.vl-map-obj-icon {
    /* size is set inline by JS — no hardcoded w/h here */
    border-radius: 8px;
    display: flex; align-items: center; justify-content: center;
    border: 1.5px solid; position: relative;
    box-shadow: 0 1px 3px rgba(0,0,0,0.18);
}
/* Visibility tints — colour override comes from inline style; these just set fallback */
.vl-map-obj-icon.vl-vis-organiser { opacity: 0.9; }
.vl-map-obj-icon.vl-vis-traders   { opacity: 0.95; }
.vl-map-obj-icon.vl-vis-public    { opacity: 1; }

/* Shaped SVG objects (marquees, stages, toilets etc) */
.vl-map-shaped { display: block; overflow: visible; }
.vl-map-shaped svg { display: block; overflow: visible; filter: drop-shadow(0 1px 3px rgba(0,0,0,0.22)); }

/* Staff position dots */
.vl-map-staff-dot {
    border-radius: 50%;
    border: 2px solid #fff;
    box-shadow: 0 1px 4px rgba(0,0,0,0.35);
    cursor: pointer;
    transition: transform 0.1s;
}
.vl-map-staff-dot:hover { transform: scale(1.3); }

/* Notes pin */
.vl-map-notes-pin {
    display: flex; align-items: center; justify-content: center;
    border-radius: 4px 4px 0 4px; color: #fff; font-size: 14px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.3);
}

/* Exclusion zone hatch */
.vl-zone-exclusion {
    background: repeating-linear-gradient(
        45deg, transparent, transparent 6px,
        rgba(229,57,53,0.18) 6px, rgba(229,57,53,0.18) 9px
    );
}

/* Rotation handle (map) */
.vl-rot-stem  { position: absolute; top: -14px; left: 50%; width: 1px; height: 12px; background: var(--primary); transform: translateX(-50%); display: none; pointer-events: none; }
.vl-rot-handle { position: absolute; top: -24px; left: 50%; transform: translateX(-50%); width: 16px; height: 16px; border-radius: 50%; background: var(--panel); border: 1.5px solid var(--primary); display: none; align-items: center; justify-content: center; cursor: grab; font-size: 10px; color: var(--primary); pointer-events: all; }
.vl-pitch.vl-selected .vl-rot-stem, .vl-pitch.vl-selected .vl-rot-handle { display: flex; }
.vl-rot-map-handle { width: 24px; height: 24px; background: var(--panel); border: 2px solid var(--text); border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 11px; cursor: grab; box-shadow: 0 1px 4px rgba(0,0,0,0.25); }
.vl-rot-map-handle:active { cursor: grabbing; }

/* Right sidebar (detail panel) — floats over the canvas instead of
   permanently reserving width. Only slides in while it has something to
   show; #vl-open is toggled by JS (see initDetailPanelFloat in venues-02.js)
   whenever #vl-detail-content actually has content. */
.vl-sidebar-right {
    border-bottom: 1px solid var(--border); border-right: 1px solid var(--border); border-left: none;
    position: absolute; top: 0; right: 0; bottom: 0;
    transform: translateX(100%);
    transition: transform 0.2s ease;
    box-shadow: -4px 0 16px rgba(0,0,0,0.15);
    z-index: 55;
}
.vl-sidebar-right.vl-open { transform: translateX(0); }
#vl-detail-content h3      { font-size: 13px; font-weight: 500; margin: 0 0 10px; color: var(--text); }
#vl-detail-content label   { font-size: 12px; font-weight: 500; color: var(--text-muted); margin: 8px 0 3px; display: block; }
#vl-detail-content input[type="text"],
#vl-detail-content input[type="number"],
#vl-detail-content textarea,
#vl-detail-content select  { width: 100%; box-sizing: border-box; font-size: 13px; }
#vl-detail-content textarea { resize: vertical; }
#vl-detail-content .vl-modal-btns { display: flex; gap: 6px; margin-top: 12px; padding-top: 10px; border-top: 1px solid var(--border); }

/* Stats bar — floating pill anchored bottom-center of the canvas (same
   pattern as #vl-layer-panel) instead of a full-width strip pushing the
   canvas up. The old hint text (.vl-stat-hint) was removed — it's no
   longer part of the markup, just the pitch/trader counts. */
.vl-stats-bar {
    position: absolute; left: 50%; bottom: 12px; transform: translateX(-50%);
    display: flex; align-items: center;
    background: var(--panel); border: 1px solid var(--border);
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.15);
    z-index: 400;
    max-width: calc(100% - 24px);
    overflow: hidden;
}
.vl-stat      { flex: 0 0 auto; text-align: center; padding: 5px 12px; border-right: 1px solid var(--border); }
.vl-stat:last-child { border-right: none; }
.vl-stat-n    { display: block; font-size: 16px; font-weight: var(--weight-semibold); color: var(--text); line-height: 1; }
.vl-stat-l    { display: block; font-size: 10px; color: var(--text-muted); margin-top: 2px; }

/* Scale / calibration overlay */
.vl-cal-line { position: absolute; height: 2px; background: var(--warning); transform-origin: left center; pointer-events: none; z-index: 30; }
.vl-cal-dot  { position: absolute; width: 8px; height: 8px; border-radius: 50%; background: var(--warning); transform: translate(-50%, -50%); pointer-events: none; z-index: 31; }

/* Modals */
.vl-modal-bg { position: fixed; inset: 0; background: var(--modal-overlay); display: flex; align-items: center; justify-content: center; z-index: 9999; }
.vl-modal {
    background: var(--panel); border: 1px solid var(--border);
    border-radius: 12px; padding: 20px; width: 340px;
    max-width: 92vw; box-shadow: 0 20px 60px rgba(0,0,0,0.2);
}
.vl-modal h3 { font-size: var(--text-base); font-weight: var(--weight-semibold); margin-bottom: 14px; padding-bottom: 10px; border-bottom: 1px solid var(--border); }
.vl-modal label { display: block; font-size: var(--text-sm); color: var(--text-muted); margin-bottom: 4px; }
.vl-modal input, .vl-modal select, .vl-modal textarea { width: 100%; padding: 8px 10px; border: 1px solid var(--border); border-radius: 8px; background: var(--panel); color: var(--text); font-size: var(--text-base); margin-bottom: 10px; outline: none; transition: border-color 0.15s; }
.vl-modal input:focus, .vl-modal select:focus, .vl-modal textarea:focus { border-color: var(--primary); }
.vl-modal-btns { display: flex; gap: 8px; margin-top: 6px; }
.vl-modal-btns .btn { flex: 1; }

/* Trader picker in assign modal */
.vl-trader-option { display: flex; align-items: center; gap: 8px; padding: 8px; border-radius: 8px; border: 1px solid var(--border); background: var(--panel-2); cursor: pointer; margin-bottom: 6px; transition: border-color 0.15s, background 0.15s; }
.vl-trader-option:hover  { border-color: var(--primary); background: var(--panel-hover); }
.vl-trader-option.active { border-color: var(--primary); background: rgba(108,77,246,0.08); }
.vl-trader-option-dot    { width: 10px; height: 10px; border-radius: 50%; background: var(--primary); flex-shrink: 0; }
.vl-trader-option-name   { font-size: var(--text-sm); font-weight: var(--weight-medium); }
.vl-trader-option-type   { font-size: 10px; color: var(--text-muted); }
.vl-trader-option-check  { margin-left: auto; color: var(--success); display: none; }
.vl-trader-option.active .vl-trader-option-check { display: block; }

/* Accordion */
.vl-accordion-item { border-bottom: 1px solid var(--border); }
.vl-accordion-header {
    width: 100%; background: none; border: none;
    padding: 9px 10px; display: flex; justify-content: space-between;
    align-items: center; cursor: pointer;
    font-weight: 600; font-size: 12px; color: var(--text);
}
.vl-accordion-header i { transition: transform 0.22s ease; font-size: 11px; color: var(--text-muted); }
.vl-accordion-item.active .vl-accordion-header i { transform: rotate(180deg); }
.vl-accordion-content { display: none; padding: 2px 0 8px; }
.vl-accordion-item.active .vl-accordion-content { display: block; }

/* Snap grid input */
#snap-grid-inp { width: 44px; font-size: 12px; padding: 2px 4px; }

/* Mobile block (non-mobile it's hidden) */
.vl-mobile-block { display: none; height: 100vh; width: 100%; align-items: center; justify-content: center; text-align: center; padding: 24px; }
.vl-mobile-card  { max-width: 320px; margin: 0 auto; color: var(--text); }
.vl-mobile-card i { font-size: 42px; opacity: 0.4; margin-bottom: 12px; }

/* Leaflet overrides */
.leaflet-pane         { z-index: 1 !important; }
.leaflet-tile-pane    { z-index: 1 !important; }
.leaflet-overlay-pane { z-index: 2 !important; }
.leaflet-marker-pane  { z-index: 3 !important; }
.leaflet-popup-pane   { z-index: 4 !important; }
.leaflet-control      { z-index: 8 !important; }
.leaflet-top, .leaflet-bottom { z-index: 8 !important; }

/* ── Media queries ── */
@media (max-width: 900px) {
    .vl-sidebar { width: 190px; }
    .vl-toolbar { gap: 3px; }
}
@media (max-width: 768px) {
    .vl-body    { flex-direction: column; }
    .vl-sidebar { width: 100%; flex-direction: row; flex-wrap: nowrap; overflow-x: auto; overflow-y: hidden; height: auto; border-bottom: 1px solid var(--border); }
    .vl-canvas-wrap { height: 55vh; }
    .vl-topbar-right .btn   { display: none; }
    .vl-topbar-right .badge { display: none; }
}
@media (max-width: 900px) {
    .vl-page.content .page-header,
    .vl-page.content .vl-topbar,
    .vl-page.content .vl-body  { display: none; }
    .vl-mobile-block            { display: flex; }
    .vl-fullscreen-btn          { display: none !important; }
}

/* ================================================
   37. MEDIA QUERIES
   All breakpoints in one place, largest first.
================================================ */

/* ── Desktop: action buttons go side-by-side ── */
@media (min-width: 600px) {
    .action-card-buttons     { flex-direction: row; }
    .action-card-buttons > * { flex: 1; }
}
@media (max-width: 1400px) {
    html { font-size: 12px; }

    .sidebar {
        width: 210px;
        padding: 0 6px 6px 6px;
        gap: 4px;
        overflow-y: auto;
        scrollbar-width: none;
    }
    .sidebar::-webkit-scrollbar { display: none; }

    .sidebar a { padding: 10px 7px; }

    .sidebar h2 { margin: 6px 0 3px; }

    .sidebar-link,
    .nav-item {
        height: 42px;
        min-height: 42px;
        max-height: 42px;
        padding: 10 7px;
        display: flex;
        align-items: center;
        width: 100%;
        box-sizing: border-box;
    }

    .sidebar-link .icon,
    .nav-item .icon {
        display: flex;
        align-items: center;
        justify-content: center;
        flex-shrink: 0;
    }

    .sidebar-link i,
    .nav-item i {
        margin-right: 0;
        width: 14px;
        text-align: center;
    }

    .sidebar-link .label,
    .nav-item .label {
        margin-left: 10px;
        white-space: nowrap;
    }

    .topbar { height: 48px; }
    .content { padding: 12px; }
    .card { padding: 12px; }

    /* Collapsed — just hide label, touch nothing else */
    .sidebar-collapsed .sidebar { width: 52px; }

    .sidebar-collapsed .sidebar-link .label,
    .sidebar-collapsed .nav-item .label {
        opacity: 0;
        width: 0;
        overflow: hidden;
        margin: 0;
    }

    /* Grids */
    .events-grid { grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); }
    .event-image { height: 140px; }
    .event-content { padding: 10px; gap: 4px; }

    .venue-grid { grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); }
    .venue-cover { height: 140px; }
    .venue-body { padding: 12px; gap: 10px; }

    /* Event panel */
    .event-panel { top: 48px; }
    .event-panel-image { display: none; }
}

/* ── Large tablet: biz choice card padding ── */
@media (max-width: 1000px) {
    .biz-choice-card,
    .biz-choice-card1 { padding: 16px; }
}

/* ── Calendar: switch to single-column + mobile drawer ── */
@media (max-width: 900px) {
    .cal-outer      { grid-template-columns: 1fr; }
    .cal-side-panel { display: none; }
    .cal-pill       { display: none; }
    .cal-dots       { display: flex; }
    .cal-day        { min-height: 52px; padding: 5px 4px 4px; }
    .cal-nav        { flex-direction: column; align-items: center; gap: 10px; margin-bottom: 12px; }

    .cal-drawer-overlay { display: block; position: fixed; inset: 0; background: var(--modal-overlay); z-index: 2400; opacity: 0; pointer-events: none; transition: opacity 0.2s; }
    .cal-drawer-overlay.open { opacity: 1; pointer-events: all; }

    .cal-drawer { display: block; position: fixed; bottom: 64px; left: 0; right: 0; background: var(--panel); border-top: 1px solid var(--border); border-radius: 16px 16px 0 0; padding: 20px 20px 32px; z-index: 2500; transform: translateY(100%); transition: transform 0.25s ease; max-height: 80vh; overflow-y: auto; }
    .cal-drawer.open { transform: translateY(0); }
    .cal-drawer-handle { width: 36px; height: 4px; background: var(--border); border-radius: 2px; margin: 0 auto 16px; }
    

    .auth-split { grid-template-columns: 1fr; }
    .auth-split-left { padding: 0px 20px 0px; }
    .auth-split-left h1 {display: none;}
    .auth-split-left > p { display: none;}
    .auth-split-right { padding: 36px 28px 48px; }
    .auth-benefit { display: none; }
    .auth-split-left .auth-logo {margin-top:25px; margin-bottom:25px;}
    .auth-split {min-height:0;}
    

}

/* ── Event panel: bottom sheet on mid-width screens ── */
@media (max-width: 800px) {
    .event-panel {
        top: auto; left: 0; right: 0;
        bottom: 64px;
        width: 100%;
        height: calc(92vh - 64px);
        border-radius: 16px 16px 0 0;
        transform: translateY(100%);
        box-shadow: 0 -8px 32px rgba(0,0,0,0.15);
        z-index: 2500;
    }
    .event-panel.open { transform: translateY(0); }
    .event-panel::before { content: ''; display: block; position: absolute; top: 8px; left: 50%; transform: translateX(-50%); width: 36px; height: 4px; border-radius: 2px; background: var(--border); z-index: 10; }
}

/* ── Mobile: full layout overhaul ── */
@media (max-width: 768px) {
    /* Base */
    body { overflow: auto; }

    /* Restore column layout on mobile */
    .app { flex-direction: column; }
    .content-wrap { flex-direction: column; min-width: 0; }

    /* Topbar hidden — replaced by bottom nav */
    .topbar { display: none; }

    /* Hide desktop topbar logo on mobile */
    .topbar-logo { display: none; }

    /* Content */
    .content {
        padding: 16px;
        padding-bottom: 80px; /* breathe above bottom nav */
        border-top-left-radius: 0;
        margin: 0;
        min-width: 0;
    }

    /* Sidebar becomes a full-screen overlay drawer */
    .sidebar {
        position: fixed;
        top: 0; left: 0;
        bottom: 64px;
        width: 100%;
        height: auto;
        border-radius: 0;
        z-index: 3000;
        transform: translateX(100%);
        transition: transform 0.25s ease;
        overflow-y: auto;
        display:block;
    }
    .sidebar.mobile-open { transform: translateX(0); }
    .sidebar-bottom { display: none !important; }
     .sidebar-toggle-tab { display: none; }

    /* Bottom nav */
    .mobile-nav {
        display: flex;
        position: fixed;
        bottom: 0; left: 0; right: 0;
        height: 64px;
        background: var(--panel);
        border-top: 1px solid var(--border);
        align-items: center;
        justify-content: space-around;
        z-index: 3000;
    }
    .mobile-nav-item {
        flex: 1;
        height: 100%;
        border: none;
        background: none;
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: 4px;
        color: var(--text-muted);
        text-decoration: none;
        font-size: 11px;
    }
    
    .mobile-nav-item i      { font-size: 18px; }
    .mobile-nav-item.active { color: var(--primary); }

    /* Topbar pieces hidden on mobile */
    .menu-btn        { display: none; }
    .topbar-av-name  { display: none; }
    .topbar-av-chev  { display: none; }
    .topbar-divider  { display: none; }

    /* Mobile logo shown in topbar */
    .topbar-mobile-logo { display: flex; }

    /* Grid collapses to single column */
    .grid { grid-template-columns: 1fr; }
    .col-2, .col-3, .col-4,
    .col-6, .col-8, .col-10, .col-12 { grid-column: auto !important; width: 100% !important; }

    /* Tabs */
    .tabs        { display: none; }
    .mobile-tabs { display: block; width: 100%;  }

    /* Event grid */
    .events-grid         { grid-template-columns: 1fr; }
    .event-modal-content { width: 95%; max-height: 85vh; }
    .modal-header        { flex-direction: column; }
    .modal-image         { width: 100%; height: 180px; }
    .modal-title-row     { flex-direction: column; align-items: flex-start; gap: 8px; }
    .event-status        { align-self: flex-start; width: 100%; text-align: center; }
    .event-panel-image   { height: 140px; border-radius: 16px 16px 0 0; }

    /* Layout grids */
    .overview-grid   { grid-template-columns: 1fr; }
    .business-grid   { grid-template-columns: 1fr; }
    .details-grid    { grid-template-columns: 1fr; }
    .app-detail-grid { grid-template-columns: 1fr; }
    .biz-role-grid   { grid-template-columns: 1fr; }

    /* Checks */
    .check        { flex-direction: column; align-items: flex-start; gap: 6px; }
    .check-left   { width: 100%; display: block !important; }
    .check-label  { width: 100%; }
    .check-meta   { margin-left: 0; display: block; margin-top: 4px; }
    .manage-btn,
    .check a.btn  { width: 100%; text-align: center; margin-top: 6px; }
    .expand-header      { flex-direction: column; align-items: flex-start; }
    .expand-header .btn { width: 100%; margin-top: 8px; }

    /* Documents */
    .document-card  { flex-direction: column; }
    .document-right { width: 100%; align-items: flex-start; }
    .inline-upload-form { width: 100%; justify-content: flex-start; }
    .inline-upload-form input[type="file"],
    .inline-upload-form input[type="date"],
    .inline-upload-form button { width: 100%; }
    .inline-upload-form input[type="file"] { max-width: 100%; }
    .uploadForm { max-width: 100%; }

    /* Tables */
    .table-clean { font-size: var(--text-base); }
    .table-clean thead th,
    .table-clean tbody td { padding: 10px; }
    .mobile-table th,
    .mobile-table td { padding: 14px 18px; }

    /* Misc */
    .action-card-buttons { flex-direction: column; }
    .review-card-header  { flex-direction: column; }
    .review-summary-label { width: 130px; }
    .star-label          { font-size: 22px; }
    .table-clean {
        min-width: unset !important;
        width: 100% !important;
    }
    /* applications-table layout handled in section 41 */
   

    /* iOS zoom prevention */
    input, select, textarea { font-size: var(--text-input) !important; }
    .drawer-row * { max-width: 100%; box-sizing: border-box; }

.drawer-row input[style*="width:140px"] { width: 100% !important; }

.drawer-row [style*="white-space:nowrap"] { white-space: normal !important; }

.action-row,
.info-box > div[style*="display:flex"] { flex-wrap: wrap !important; }

    /* events.php — search bar: status full-width, radius + fav share a row */
    .event-search .search-box      { width: 100%; flex: 0 0 100%; }
    .event-search #statusFilter    { width: 100%; flex: 0 0 100%; }
    .event-search #radiusFilter    { flex: 1 1 0; min-width: 0; }
    .event-search .fav-toggle-btn  { flex: 1 1 0; min-width: 0; justify-content: center; }
    .event-search select           { width: 100%; min-width: 0; flex: 0 0 100%; box-sizing: border-box; }
    .event-search .checkbox-row    { flex: 0 0 100%; }

    /* bookings.php — mobile tab select spacing */
    select.mobile-tabs,
    .mobile-tabs select { margin-bottom: 16px; }

    /* invoices — KPI cards 2-per-row: override the col-3 collapse */
    .kpi-card.col-3 { grid-column: span 6 !important; width: auto !important; }
    /* Upcoming events — swap table for mobile list */
    .upcoming-desktop { display: none; }
    .upcoming-mobile  { display: block; }

    /* organiser dashboard — KPI cards full-width (1-per-row) */
    .kpi-stacked-row { display: grid !important; grid-template-columns: 1fr !important; gap: 16px; }
    .kpi-card.kpi-stacked { grid-column: auto !important; width: 100% !important; }

    /* units.php — menu table shrinks to content */
    .menu-table { min-width: max-content; }

    /* event-operations.php traders table — stall-type pill wraps to 3 lines
       in the narrow Unit column; drop the pill treatment so it reads as
       plain wrapped text instead */
    #traders-table .type-badge { display: block; width: fit-content; background: none; padding: 2px 0 0; margin-left: 0; border-radius: 0; }
}

/* ── Organiser event management card ── */
@media (max-width: 680px) {
    .event-mgmt-card  { grid-template-columns: 1fr; grid-template-rows: 120px auto auto; }
    .event-mgmt-image { height: 120px; }
    .event-mgmt-right { border-left: none; border-top: 1px solid var(--border); flex-direction: row; flex-wrap: wrap; gap: 12px; align-items: flex-start; }
    .event-mgmt-right > * { flex: 1; min-width: 140px; }
    .event-mgmt-divider { display: none; }
}

@media (max-width: 600px) {
    .biz-role-grid { grid-template-columns: 1fr; }
}

@media (max-width: 540px) {
    .event-panel-image { display: none; }
    .ob-card           { padding: 20px 16px 16px; }
    .ob-choice-grid    { grid-template-columns: 1fr; }
    .ob-form-grid      { grid-template-columns: 1fr; }
    .ob-field-full     { grid-column: span 1; }
    .ob-role-grid      { grid-template-columns: 1fr; }
    .ob-features       { grid-template-columns: 1fr 1fr; }
    .ob-stats          { grid-template-columns: 1fr; }
}

@media (max-width: 640px) {
    /* organiser/events.php — mobile filter select spacing */
    #mobile-filter-select { margin-bottom: 12px; }
}

@media (max-width: 480px) {
    #tour-tooltip   { width: calc(100vw - 32px); left: 16px !important; right: 16px; }
    #tour-spotlight { box-shadow: 0 0 0 2px var(--primary), 0 0 0 9999px rgba(0,0,0,0.55); }
}

/* ================================================
   38. INVOICE PAGES
   Moved from invoices.php, invoices-received.php,
   invoices-sent.php
================================================ */

/* ---- Split layout (invoices.php) ---- */
.invoice-split              { display:grid; grid-template-columns:1fr 1fr; gap:20px; align-items:start; }
.invoice-list-panel         { min-width:0; }
.invoice-viewer-panel       { min-width:0; }
.invoice-viewer-card        { background:var(--panel); border:1px solid var(--border); border-radius:12px; box-shadow:var(--card-shadow); }

.viewer-placeholder         { display:flex; flex-direction:column; align-items:center; justify-content:center; padding:60px 20px; color:var(--text-muted); text-align:center; gap:10px; }
.viewer-placeholder i       { font-size:2rem; opacity:0.2; display:block; }
.viewer-placeholder p       { font-size:var(--text-base); margin:0; }
.viewer-loading             { display:flex; align-items:center; justify-content:center; padding:40px 20px; gap:10px; color:var(--text-muted); font-size:var(--text-base); }

/* Event billing cards (invoices.php variant) */
.event-header-left h3       { margin:0 0 6px; font-size:var(--text-input); font-weight:600; }
.event-summary              { display:flex; flex-wrap:wrap; gap:6px; }
.summary-pill               { font-size:var(--text-sm); padding:2px 8px; border-radius:99px; background:var(--panel-2); color:var(--text-muted); }
.pill-paid                  { background:var(--badge-success-bg); color:var(--badge-success-text); }
.pill-unpaid                { background:var(--badge-warning-bg); color:var(--badge-warning-text); }
.pill-part                  { background:var(--badge-info-bg);    color:var(--badge-info-text); }
.pill-overdue               { background:var(--badge-danger-bg);  color:var(--badge-danger-text); }

.event-header-chevron       { transition:transform 0.2s; color:var(--text-muted); }
.event-header-chevron.open  { transform:rotate(180deg); }

/* Stall divider */
.stall-divider              { display:flex; align-items:center; gap:8px; padding:8px 20px; font-size:var(--text-sm); font-weight:600; color:var(--text-muted); background:var(--panel-2); border-top:1px solid var(--border); border-bottom:1px solid var(--border); text-transform:uppercase; letter-spacing:.05em; }
.stall-divider i            { font-size:var(--text-sm); }

/* Invoice cards (invoices.php variant) */
.invoice-title-row          { display:flex; align-items:baseline; gap:10px; flex-wrap:wrap; margin-bottom:4px; }
.invoice-title-row h4       { margin:0; font-size:var(--text-base); font-weight:600; }
.invoice-number             { font-size:var(--text-sm); color:var(--text-muted); font-family:monospace; }
.invoice-outstanding        { font-size:var(--text-sm); color:var(--danger); font-weight:500; }

.invoice-status             { font-size:var(--text-sm); font-weight:600; padding:2px 8px; border-radius:99px; text-transform:uppercase; letter-spacing:.04em; display:inline-block; }
.status-paid                { background:var(--badge-success-bg); color:var(--badge-success-text); }
.status-unpaid              { background:var(--badge-warning-bg); color:var(--badge-warning-text); }
.status-part                { background:var(--badge-info-bg);    color:var(--badge-info-text); }
.status-overdue             { background:var(--badge-danger-bg);  color:var(--badge-danger-text); }
.status-disputed            { background:var(--badge-warning-bg); color:var(--badge-warning-text); }
.status-cancelled           { background:var(--panel-2);          color:var(--text-muted); }
.status-draft               { background:var(--panel-2);          color:var(--text-muted); }

/* Invoice viewer */
.viewer-inner               { padding:20px; }
.viewer-back-btn            { display:none; }

.detail-header              { display:flex; justify-content:space-between; align-items:flex-start; padding-bottom:14px; border-bottom:1px solid var(--border); margin-bottom:14px; gap:16px; flex-wrap:wrap; }
.detail-header-from         { font-size:var(--text-sm); color:var(--text-muted); line-height:1.6; }
.detail-header-from strong  { display:block; font-size:var(--text-base); color:var(--text); }
.detail-header-meta         { font-size:var(--text-sm); color:var(--text-muted); text-align:right; line-height:1.8; }
.detail-header-meta strong  { color:var(--text); }

.line-items-table           { width:100%; border-collapse:collapse; font-size:var(--text-sm); margin:8px 0; }
.line-items-table th        { text-align:left; padding:6px 8px; font-weight:600; color:var(--text-muted); border-bottom:1px solid var(--border); font-size:var(--text-sm); text-transform:uppercase; letter-spacing:.04em; }
.line-items-table th.num,
.line-items-table td.num    { text-align:right; }
.line-items-table td        { padding:8px; border-bottom:1px solid var(--panel-2); vertical-align:top; color:var(--text); }
.line-items-table tr:last-child td { border-bottom:none; }

.item-type-badge            { font-size:var(--text-sm); padding:1px 5px; border-radius:3px; margin-left:5px; vertical-align:middle; text-transform:uppercase; font-weight:600; }
.badge-addon                { background:var(--badge-info-bg);    color:var(--badge-info-text); }
.badge-discount             { background:var(--badge-success-bg); color:var(--badge-success-text); }
.badge-late_fee             { background:var(--badge-danger-bg);  color:var(--badge-danger-text); }
.badge-tax                  { background:var(--panel-2);          color:var(--text-muted); }
.tax-label                  { font-size:var(--text-sm); color:var(--text-muted); display:block; }

.invoice-totals             { margin-left:auto; width:100%; max-width:320px; font-size:var(--text-sm); }
.totals-row                 { display:flex; justify-content:space-between; padding:5px 8px; color:var(--text-muted); }
.totals-row.total-final     { font-size:var(--text-input); font-weight:700; color:var(--text); border-top:2px solid var(--border); padding-top:8px; margin-top:4px; }
.totals-row.discount-row    { color:var(--success); }

.items-loading              { padding:16px 0; font-size:var(--text-sm); color:var(--text-muted); display:flex; align-items:center; gap:8px; }

.payments-section           { margin-top:16px; }
.payments-section h5        { font-size:var(--text-sm); text-transform:uppercase; letter-spacing:.06em; color:var(--text-muted); margin:0 0 8px; font-weight:600; }
.payment-row                { display:flex; justify-content:space-between; align-items:center; padding:7px 8px; font-size:var(--text-sm); border-bottom:1px solid var(--panel-2); }
.payment-row:last-child     { border-bottom:none; }
.payment-method-badge       { font-size:var(--text-sm); padding:1px 6px; border-radius:4px; background:var(--panel-2); color:var(--text-muted); text-transform:uppercase; font-weight:600; margin-left:6px; border:1px solid var(--border); }

.invoice-notes              { margin-top:14px; padding:10px 12px; background:var(--panel-2); border-radius:6px; font-size:var(--text-sm); color:var(--text-muted); border-left:3px solid var(--border); line-height:1.5; }
.invoice-notes strong       { display:block; margin-bottom:3px; color:var(--text); }

.detail-actions             { display:flex; gap:8px; margin-top:16px; padding-top:14px; border-top:1px solid var(--border); flex-wrap:wrap; }

/* ---- Invoice mobile card list (invoices-received, invoices-sent) ---- */
.invoices-mobile            { display: none; }
.invoice-card                { background: var(--panel); border: 1px solid var(--border); border-radius: 12px; padding: 14px; box-shadow: var(--card-shadow); }
.invoice-card + .invoice-card { margin-top: 10px; }
.invoice-card-top           { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; margin-bottom: 8px; }
.invoice-card-number        { font-family: monospace; font-size: var(--text-sm); color: var(--text-muted); }
.invoice-card-name          { font-size: var(--text-base); font-weight: var(--weight-semibold); color: var(--text); margin-top: 2px; }
.invoice-card-meta          { font-size: var(--text-sm); color: var(--text-muted); margin-top: 2px; }
.invoice-card-row            { display: flex; justify-content: space-between; align-items: baseline; margin-top: 10px; padding-top: 10px; border-top: 1px solid var(--border); }
.invoice-card-amounts        { display: flex; flex-direction: column; gap: 2px; }
.invoice-card-total          { font-size: var(--text-base); font-weight: var(--weight-semibold); color: var(--text); }
.invoice-card-outstanding    { font-size: var(--text-sm); }
.invoice-card-actions        { display: flex; gap: 8px; margin-top: 12px; }
.invoice-card-actions .btn   { flex: 1; justify-content: center; }

/* ---- Venue / invoice search bar (invoices-received, invoices-sent) ---- */
.venue-search-wrap          { position:relative; flex:1; min-width:0; }
.venue-search-wrap i        { position:absolute; left:12px; top:50%; transform:translateY(-50%); color:var(--text-muted); font-size:var(--text-sm); pointer-events:none; }
.venue-search-wrap input    { width:100%; height:42px; border:1px solid var(--border); background:var(--panel); color:var(--text); border-radius:10px; padding:0 14px 0 38px; font-size:var(--text-base); outline:none; transition:border-color .15s; box-sizing:border-box; }
.venue-search-wrap input:focus { border-color:var(--primary); }

/* ---- Invoice detail page ---- */
.inv-detail-grid            { display:grid; grid-template-columns:1fr 300px; gap:20px; align-items:start; }

/* ---- Create invoice page ---- */
.inv-builder                { display:grid; grid-template-columns:1fr 300px; gap:20px; align-items:start; }
.line-items-list            { display:flex; flex-direction:column; gap:4px; min-height:40px; }
.line-item-row              { display:grid; grid-template-columns:24px 1fr 60px 88px 76px 80px 28px; gap:5px; align-items:center; background:var(--panel); border:1px solid var(--border); border-radius:8px; padding:7px 10px; font-size:var(--text-sm); }
.line-item-row.is-discount  { border-left:3px solid var(--success); }
.line-item-row.is-section-header { background:var(--panel); border-color:var(--border); border-bottom:2px solid var(--primary); grid-template-columns:24px 1fr 28px !important; margin-top:4px; }
.line-item-row.is-section-header input[type="text"] { background:transparent !important; border:none !important; border-radius:0 !important; color:var(--primary) !important; font-size:var(--text-sm); font-weight:700; text-transform:uppercase; letter-spacing:.06em; padding:2px 4px; }
.line-item-row.is-section-header input[type="text"]::placeholder { color:color-mix(in srgb,var(--primary) 40%,transparent); }
.line-item-row.is-description { background:var(--panel) !important; border-style:dashed; grid-template-columns:24px 1fr 28px !important; }
.line-item-row.is-description input[type="text"] { font-style:italic; color:var(--text-muted) !important; }
.line-item-row input,
.line-item-row select       { width:100%; padding:4px 6px; border:1px solid var(--border); border-radius:6px; background:var(--panel-2); color:var(--text); font-size:var(--text-sm); }
.li-del                     { cursor:pointer; color:var(--danger); font-size:16px; background:none; border:none; padding:0; line-height:1; opacity:.6; }
.li-del:hover               { opacity:1; }
.add-line-btn               { display:inline-flex; align-items:center; gap:5px; padding:5px 11px; border:1px dashed var(--border); border-radius:7px; font-size:var(--text-sm); cursor:pointer; background:none; color:var(--text-muted); transition:all .12s; }
.add-line-btn:hover         { border-color:var(--primary); color:var(--primary); background:var(--panel-2); }
.stall-select-card          { border:2px solid var(--border); border-radius:10px; padding:11px 14px; cursor:pointer; transition:all .12s; display:flex; align-items:center; gap:10px; }
.stall-select-card.selected { border-color:var(--primary); background:var(--panel-2); }
.stall-select-card input[type="checkbox"] { width:16px; height:16px; accent-color:var(--primary); flex-shrink:0; }
.inv-summary-panel          { background:var(--panel); border:1px solid var(--border); border-radius:12px; padding:16px; position:sticky; top:80px; }
.inv-sum-row                { display:flex; justify-content:space-between; padding:3px 0; font-size:var(--text-sm); color:var(--text-muted); }
.inv-sum-row.total          { font-size:var(--text-input); font-weight:700; color:var(--text); border-top:2px solid var(--border); padding-top:8px; margin-top:4px; }

/* ---- Overdue reminder modal (invoices-sent) ---- */
.reminder-modal             { display:none; position:fixed; inset:0; background:var(--modal-overlay); z-index:10000; align-items:center; justify-content:center; }
.reminder-modal.is-open     { display:flex; }
.reminder-modal-panel       { background:var(--panel); border-radius:12px; padding:24px; width:100%; max-width:440px; margin:16px; box-shadow:var(--card-shadow); }
.reminder-modal-panel h3    { margin:0 0 8px; }
.reminder-modal-summary     { margin:0 0 16px; font-size:var(--text-base); }
.reminder-modal-label       { display:block; font-size:var(--text-base); font-weight:var(--weight-semibold); margin-bottom:6px; color:var(--text); }
.reminder-modal-note        { width:100%; min-height:90px; padding:8px 10px; border:1px solid var(--border); border-radius:6px; background:var(--panel); color:var(--text); font-size:var(--text-base); resize:vertical; box-sizing:border-box; }
.reminder-modal-note:focus  { border-color:var(--primary); outline:none; }
.reminder-modal-count       { text-align:right; font-size:var(--text-sm); margin-top:2px; }
.reminder-modal-error       { display:none; color:var(--danger); font-size:var(--text-base); margin-top:8px; }
.reminder-modal-error.is-visible { display:block; }
.reminder-modal-actions     { display:flex; gap:8px; justify-content:flex-end; margin-top:16px; }

/* ---- Media queries ---- */
@media (max-width:900px) {
    .inv-builder     { grid-template-columns:1fr; }
    .inv-detail-grid { grid-template-columns:1fr; }
}
@media (max-width:768px) {
    .invoice-split               { grid-template-columns:1fr; }
    .invoice-list-panel,
    .invoice-viewer-panel        { position:static; max-height:none; }
    .invoice-viewer-panel        { display:none; }
    .invoice-viewer-panel.mobile-active { display:block; position:fixed; inset:0; z-index:500; background:var(--modal-overlay); overflow-y:auto; padding:12px; }
    .invoice-viewer-panel.mobile-active .invoice-viewer-card { max-height:none; margin-top:48px; }
    .viewer-back-btn             { display:inline-flex; margin-bottom:14px; }
    .kpi-grid                    { grid-template-columns:repeat(2,1fr) !important; }
    .line-item-col-headers       { display:none !important; }
    .line-item-row               { grid-template-columns:24px 1fr 28px !important; grid-template-rows:auto auto; }
    #filterForm                  { display:flex; flex-direction:column; }
    #filterForm select,
    #filterForm .venue-search-wrap { width:100% !important; min-width:0 !important; flex:none !important; }

    /* invoices-received / invoices-sent — swap table for card list */
    .invoices-desktop { display: none; }
    .invoices-mobile  { display: block; }
}


/* ================================================
   39. UNITS PAGE
   Moved from units.php
================================================ */

.menu-table tr:last-child td              { border-bottom:none; }
.menu-table thead th                      { font-size:var(--text-base) !important; font-weight:var(--weight-semibold) !important; color:var(--text) !important; }
.menu-table td input[type="text"]         { width:100%; background:transparent; border:none; outline:none; color:var(--text); font-size:var(--text-base); font-family:inherit; padding:6px; border-radius:0; transition:background .15s; }
.menu-table td input[type="text"]:focus   { background:var(--panel-2); border-radius:6px; outline:2px solid var(--primary); outline-offset:-1px; }

.gallery-grid                   { display:grid; grid-template-columns:repeat(auto-fill,minmax(120px,1fr)); gap:10px; margin-top:12px; }
.gallery-item                   { position:relative; border-radius:8px; overflow:hidden; border:1px solid var(--border); background:var(--panel-2); aspect-ratio:1; cursor:grab; }
.gallery-item:active            { cursor:grabbing; }
.gallery-item img               { width:100%; height:100%; object-fit:cover; display:block; }
.gallery-item-delete            { position:absolute; top:4px; right:4px; background:rgba(0,0,0,0.6); color:#fff; border:none; border-radius:50%; width:22px; height:22px; font-size:13px; line-height:22px; text-align:center; cursor:pointer; padding:0; display:flex; align-items:center; justify-content:center; opacity:0; transition:opacity 0.15s; }
.gallery-item:hover .gallery-item-delete { opacity:1; }
.gallery-item.drag-over         { border:2px dashed var(--primary); }
.gallery-upload-slot            { border:2px dashed var(--border); border-radius:8px; background:var(--panel-2); aspect-ratio:1; display:flex; flex-direction:column; align-items:center; justify-content:center; cursor:pointer; gap:6px; color:var(--text-muted); font-size:var(--text-sm); transition:border-color .15s, background .15s; }
.gallery-upload-slot:hover      { border-color:var(--primary); background:var(--panel); }
.gallery-upload-slot i          { font-size:20px; }

@media (max-width:600px) {
    .form-block[style*="grid-template-columns"] { grid-template-columns:1fr !important; }
    .form-block [style*="grid-column:span 2"],
    .form-block [style*="grid-column: span 2"] { grid-column:span 1 !important; }
}

/* inv-accent-bar — background colour is set per-page via inline style */
.inv-accent-bar { height:4px; border-radius:4px 4px 0 0; }



/* ================================================
   40. VENUES PAGE
   Moved from venues.php
================================================ */

.venue-filters              { display:flex; gap:12px; flex-wrap:wrap; align-items:center; }
.venue-search-wrap          { position:relative; flex:1; min-width:180px; }
.venue-search-wrap i        { position:absolute; left:12px; top:50%; transform:translateY(-50%); color:var(--text-muted); font-size:var(--text-sm); }
.venue-search-wrap input,
.venue-filters select       { width:100%; height:42px; border:1px solid var(--border); background:var(--panel); color:var(--text); border-radius:10px; padding:0 14px; font-size:var(--text-base); outline:none; transition:border-color .15s; }
.venue-search-wrap input    { padding-left:38px; }
.venue-filters select       { min-width:0; }
.venue-search-wrap input:focus,
.venue-filters select:focus { border-color:var(--primary); }

.venue-grid                 { display:grid; grid-template-columns:repeat(auto-fill,minmax(320px,1fr)); gap:20px; }
.venue-card                 { background:var(--panel); border:1px solid var(--border); border-radius:18px; overflow:hidden; display:flex; flex-direction:column; transition:0.18s ease; }
.venue-card:hover           { transform:translateY(-2px); border-color:var(--primary); }
.venue-cover                { position:relative; height:180px; background:var(--panel-2); }
.venue-cover img            { width:100%; height:100%; object-fit:cover; }
.venue-cover-placeholder    { width:100%; height:100%; display:flex; align-items:center; justify-content:center; font-size:38px; color:var(--text-muted); }
.venue-badges               { position:absolute; top:12px; left:12px; display:flex; gap:8px; flex-wrap:wrap; }
.venue-body                 { padding:18px; display:flex; flex-direction:column; gap:16px; }
.venue-header h3            { margin:0 0 6px; font-size:var(--text-section); }
.venue-location             { display:flex; align-items:center; gap:6px; font-size:var(--text-sm); color:var(--text-muted); }
.venue-description          { margin:0; color:var(--text-muted); font-size:var(--text-base); line-height:1.5; }
.venue-features             { display:flex; flex-wrap:wrap; gap:8px; }
.venue-feature              { display:flex; align-items:center; gap:6px; padding:6px 10px; border-radius:999px; background:var(--panel-2); border:1px solid var(--border); font-size:var(--text-sm); }
.venue-actions              { display:flex; gap:10px; margin-top:auto; }

/* Add venue form helpers */
.av-grid-2                  { display:grid; grid-template-columns:1fr 1fr; gap:12px; }
.av-label                   { display:block; font-size:var(--text-sm); color:var(--text-muted); margin-bottom:5px; }
.av-req                     { color:var(--danger); }
.av-input,
.av-select                  { width:100%; padding:10px 12px; border:1px solid var(--border); border-radius:8px; background:var(--panel); color:var(--text); font-size:var(--text-base); outline:none; transition:border-color .15s; }
.av-select                  { height:42px; appearance:none; -webkit-appearance:none; cursor:pointer; }
.av-input:focus,
.av-select:focus            { border-color:var(--primary); }
.av-textarea                { width:100%; padding:10px 12px; border:1px solid var(--border); border-radius:8px; background:var(--panel); color:var(--text); font-size:var(--text-base); font-family:inherit; resize:vertical; outline:none; transition:border-color .15s; }
.av-textarea:focus          { border-color:var(--primary); }
.av-facility-toggle         { display:flex; align-items:center; cursor:pointer; }
.av-facility-toggle input[type="checkbox"]    { display:none; }
.av-facility-toggle span    { display:inline-flex; align-items:center; gap:7px; padding:8px 14px; border:1px solid var(--border); border-radius:999px; font-size:var(--text-sm); background:var(--panel-2); color:var(--text-muted); transition:all .15s ease; user-select:none; }
.av-facility-toggle input:checked + span      { background:var(--primary); color:#fff; border-color:var(--primary); }
.av-facility-toggle:hover span                { border-color:var(--primary); color:var(--primary); }
.av-facility-toggle input:checked + span i    { color:#fff; }
.event-modal-content::-webkit-scrollbar       { width:6px; }
.event-modal-content::-webkit-scrollbar-thumb { background:var(--scrollbar-thumb); border-radius:10px; }

/* View venue modal (vv- prefix) */
#viewVenueModal             { align-items:center; padding:20px; }
.vv-shell                   { background:var(--panel); width:min(860px,96vw); max-height:calc(100vh - 40px); border-radius:18px; overflow:hidden; display:flex; flex-direction:column; box-shadow:0 24px 64px rgba(0,0,0,0.28); animation:modalIn 0.2s ease-out; position:relative; }
.vv-close-btn               { position:absolute; top:14px; right:14px; z-index:20; width:36px; height:36px; border-radius:50%; border:none; background:rgba(0,0,0,.45); backdrop-filter:blur(4px); color:#fff; font-size:16px; cursor:pointer; display:flex; align-items:center; justify-content:center; transition:background .15s; }
.vv-close-btn:hover         { background:rgba(0,0,0,.7); }
.vv-hero                    { position:relative; height:280px; background:var(--panel-2); flex-shrink:0; }
.vv-hero-placeholder        { width:100%; height:100%; display:flex; align-items:center; justify-content:center; font-size:64px; color:var(--text-muted); opacity:.3; }
.vv-hero-img                { width:100%; height:100%; object-fit:cover; display:block; }
.vv-hero-gradient           { position:absolute; inset:0; background:linear-gradient(to bottom,transparent 40%,rgba(0,0,0,.55) 100%); }
.vv-scroll                  { flex:1; overflow-y:auto; overflow-x:hidden; -webkit-overflow-scrolling:touch; }
.vv-scroll::-webkit-scrollbar       { width:6px; }
.vv-scroll::-webkit-scrollbar-thumb { background:var(--scrollbar-thumb); border-radius:10px; }
.vv-divider                 { height:1px; background:var(--border); margin:0 24px; }
.vv-header-block            { padding:22px 24px 16px; }
.vv-header-top              { display:flex; justify-content:space-between; align-items:flex-start; gap:16px; margin-bottom:14px; }
.vv-name                    { margin:0 0 6px; font-size:26px; font-weight:var(--weight-bold); color:var(--text); line-height:1.2; }
.vv-location                { display:flex; align-items:center; gap:6px; font-size:var(--text-base); color:var(--text-muted); }
.vv-header-badges           { display:flex; gap:8px; flex-wrap:wrap; justify-content:flex-end; flex-shrink:0; }
.vv-badge                   { display:inline-block; padding:5px 12px; border-radius:999px; font-size:var(--text-sm); font-weight:var(--weight-semibold); text-transform:uppercase; letter-spacing:.04em; white-space:nowrap; }
.vv-badge-space             { background:var(--badge-info-bg); color:var(--badge-info-text); }
.vv-badge-type              { background:var(--panel-2); border:1px solid var(--border); color:var(--text-muted); }
.vv-stat-row                { display:flex; flex-wrap:wrap; gap:8px; margin-bottom:12px; }
.vv-stat                    { display:inline-flex; align-items:center; gap:7px; padding:7px 14px; background:var(--panel-2); border:1px solid var(--border); border-radius:999px; font-size:var(--text-sm); color:var(--text-muted); }
.vv-stat i                  { color:var(--primary); font-size:var(--text-sm); }
.vv-stat span               { color:var(--text); font-weight:var(--weight-medium); }
.vv-stat-link               { color:var(--primary); text-decoration:none; font-weight:var(--weight-medium); }
.vv-stat-link:hover         { text-decoration:underline; }
.vv-header-actions          { display:flex; gap:10px; flex-wrap:wrap; }
.vv-section                 { padding:22px 24px; }
.vv-section-label           { display:flex; align-items:center; gap:8px; font-size:var(--text-sm); font-weight:var(--weight-bold); text-transform:uppercase; letter-spacing:.08em; color:var(--text-muted); margin-bottom:14px; }
.vv-section-label i         { color:var(--primary); font-size:var(--text-sm); }
.vv-prose                   { margin:0; font-size:var(--text-input); color:var(--text); line-height:1.75; white-space:pre-line; }
.vv-two-col-section         { display:grid; grid-template-columns:1fr 1px 1fr; gap:0; padding:22px 24px; }
.vv-col-section             { display:flex; flex-direction:column; gap:12px; }
.vv-col-section:first-child { padding-right:24px; }
.vv-col-section:last-child  { padding-left:24px; }
.vv-col-divider             { background:var(--border); width:1px; }
.vv-address-block           { background:var(--panel-2); border:1px solid var(--border); border-radius:10px; padding:12px 14px; }
.vv-address-lines           { font-size:var(--text-base); color:var(--text); line-height:1.8; }
.vv-tile                    { background:var(--panel-2); border:1px solid var(--border); border-radius:10px; padding:10px 14px; display:flex; flex-direction:column; gap:2px; }
.vv-tile-label              { font-size:var(--text-sm); text-transform:uppercase; letter-spacing:.06em; color:var(--text-muted); font-weight:var(--weight-semibold); }
.vv-tile-value              { font-size:var(--text-input); font-weight:var(--weight-semibold); color:var(--text); }
.vv-map-link                { display:inline-flex; align-items:center; gap:7px; font-size:var(--text-sm); font-weight:var(--weight-semibold); color:var(--primary); text-decoration:none; padding:2px 0; }
.vv-map-link:hover          { text-decoration:underline; }
.vv-fac-grid                { display:grid; grid-template-columns:1fr 1fr; gap:8px; }
.vv-fac-item                { display:flex; align-items:center; gap:9px; padding:10px 12px; border-radius:10px; border:1px solid var(--border); font-size:var(--text-sm); font-weight:var(--weight-medium); }
.vv-fac-item.on             { background:var(--badge-success-bg); border-color:transparent; color:var(--badge-success-text); }
.vv-fac-item.off            { background:var(--panel-2); color:var(--text-muted); opacity:.45; }
.vv-fac-item i              { font-size:var(--text-base); width:16px; text-align:center; flex-shrink:0; }
.vv-notes-section           { padding-top:0; }
.vv-notes-box               { background:var(--badge-warning-bg); border:1px solid var(--border); border-left:3px solid var(--warning); border-radius:10px; padding:14px 16px; font-size:var(--text-base); color:var(--text); line-height:1.65; white-space:pre-line; }

@media (max-width:700px) {
    .venue-grid                  { grid-template-columns:1fr; }
    .venue-actions               { flex-direction:column; }
    .venue-actions .btn          { width:100%; justify-content:center; }
    .av-grid-2                   { grid-template-columns:1fr; }
    .venue-search-wrap           { width:100%; flex:none; }
    .venue-filters select        { flex:1; min-width:calc(50% - 6px); }
    .venue-filters-add-btn       { width:100%; justify-content:center; }
}
@media (max-width:640px) {
    #viewVenueModal              { padding:0; align-items:flex-end; }
    .vv-shell                    { width:100%; max-height:95vh; border-radius:18px 18px 0 0; }
    .vv-hero                     { height:200px; }
    .vv-name                     { font-size:20px; }
    .vv-header-top               { flex-direction:column; gap:10px; }
    .vv-header-badges            { justify-content:flex-start; }
    .vv-header-actions .btn      { flex:1; justify-content:center; }
    .vv-two-col-section          { grid-template-columns:1fr; padding:18px; gap:24px; }
    .vv-col-section:first-child  { padding-right:0; }
    .vv-col-section:last-child   { padding-left:0; }
    .vv-col-divider              { display:none; }
    .vv-fac-grid                 { grid-template-columns:1fr 1fr; }
}


/* ================================================
   41. APPLICATIONS PAGE
   Moved from applications.php
================================================ */

#applications-table .app-row:hover          { transform:none; }
#applications-table .drawer-row:hover       { background:var(--panel); transform:none; }

.drawer-tab-content         { display:none; }
.drawer-tab-content.active  { display:block; }

.counter-details            { background:var(--badge-warning-bg); border:1px solid var(--warning); border-radius:8px; padding:10px 12px; font-size:var(--text-sm); margin-bottom:10px; }

.drawer-tabs-mobile         { display:none; }

@media (max-width:768px) {
    #applications-table .app-row:hover          { background:none !important; transform:none !important; box-shadow:none !important; }
    #applications-table .app-row.open:hover     { background:none !important; }
    .col-hide-mobile                            { display:none !important; }
    .table-scroll                               { overflow-x:hidden; }
    #applications-table                         { width:100%; table-layout:auto !important; }
    #applications-table th:nth-child(1),
    #applications-table td:nth-child(1)         { width:28px !important; }
    #applications-table th:nth-child(2),
    #applications-table td:nth-child(2)         { width:28px !important; }
    #applications-table th:last-child,
    #applications-table td:last-child           { width:22px !important; }
    #applications-table .badge,
    #applications-table [class^="badge"]        { font-size:10px !important; padding:2px 5px !important; white-space:nowrap; }
    .drawer-row > td                            { width:100% !important; max-width:100vw !important; overflow-x:hidden !important; box-sizing:border-box !important; }
    .drawer-row > td > div                      { width:100%; max-width:100%; overflow-x:hidden; box-sizing:border-box; }
    .drawer-row *                               { max-width:100%; box-sizing:border-box; }
    .drawer-overview-grid,
    .drawer-notes-grid,
    .trader-detail-grid                         { grid-template-columns:1fr !important; }
    .odr-pricing                                { grid-template-columns:1fr 1fr !important; }
    .wl-pricing-grid                            { grid-template-columns:1fr !important; }
    .drawer-row input[style*="width:140px"],
    .drawer-row input[style*="width: 140px"]    { width:100% !important; }
    .drawer-row [style*="white-space:nowrap"],
    .drawer-row [style*="white-space: nowrap"]  { white-space:normal !important; }
    .action-row,
    .info-box > div[style*="display:flex"]      { flex-wrap:wrap !important; }
    .drawer-tabs-desktop                        { display:none !important; }
    .drawer-tabs-mobile                         { display:block !important; }
}


/* ================================================
   42. CREATE / EDIT EVENT
   Moved from create-event.php and edit-event.php
================================================ */

.tag-picker-label           { display:inline-flex; align-items:center; gap:6px; padding:5px 13px; border-radius:999px; cursor:pointer; font-size:var(--text-sm); font-weight:var(--weight-semibold); transition:all .15s; user-select:none; }
.tag-picker-label:hover     { opacity:.85; }


/* ================================================
   43. EVENT OPERATIONS PAGE
   Moved from event-operations.php
================================================ */

/* Tab content */
.tab-content                 { display:none; }
.tab-content.active          { display:block; min-width:0; max-width:100%; box-sizing:border-box; }

/* Suppress row lift on traders table */
#traders-table .app-row:hover        { transform:none !important; box-shadow:none !important; }
#traders-table .ops-drawer-row:hover { background:var(--panel) !important; transform:none !important; box-shadow:none !important; }

.ops-drawer-row              { display:none; }
.ops-drawer-row.open         { display:table-row; }
.ops-drawer-content          { padding:16px; background:var(--panel); }

.ops-tabs                    { display:flex; gap:6px; flex-wrap:wrap; }
.ops-tabs .tab               { font-size:var(--text-sm); padding:6px 12px; border-radius:6px; border:1px solid var(--border); background:var(--panel-2); color:var(--text-muted); cursor:pointer; font-family:inherit; transition:background .15s, color .15s; }
.ops-tabs .tab.active        { background:var(--primary); color:#fff; border-color:var(--primary); }
.ops-tabs .tab:hover:not(.active) { background:var(--panel); color:var(--text); }

/* Gallery */
.ops-photo-grid              { display:grid; grid-template-columns:repeat(auto-fill,minmax(120px,1fr)); gap:10px; padding:4px 0; }
.ops-photo-grid a            { display:block; border-radius:8px; overflow:hidden; border:1px solid var(--border); aspect-ratio:1; background:var(--panel-2); }
.ops-photo-grid img          { width:100%; height:100%; object-fit:cover; display:block; }

.pass-section                { margin-bottom:12px; }

/* Print layout */
.print-section-mobile        { display:none; }
.print-section-desktop       { display:block; }

@media (max-width:768px) {
    .col-hide-mobile                        { display:none !important; }
    .table-scroll                           { overflow-x:hidden; }
    #traders-table                          { width:100%; }
    #traders-table th:last-child,
    #traders-table td:last-child            { width:28px !important; }
    #traders-table .badge                   { font-size:10px !important; padding:2px 5px !important; white-space:nowrap; }
    .ops-drawer-row > td                    { padding:0 !important; }
    .ops-drawer-content                     { padding:12px; box-sizing:border-box; overflow:hidden; }
    .ops-drawer-content *                   { max-width:100%; box-sizing:border-box; }
    .ops-drawer-content [style*="grid-template-columns:1fr 1fr"],
    .ops-drawer-content [style*="grid-template-columns: 1fr 1fr"] { grid-template-columns:1fr !important; }
    .ops-tabs                               { gap:4px; }
    .ops-tabs .tab                          { font-size:var(--text-sm); padding:5px 9px; }
    .event-summary-card [style*="display:flex"] { flex-wrap:wrap !important; gap:10px !important; }
    #contact-grid                           { grid-template-columns:1fr !important; }
    #files-grid                             { grid-template-columns:1fr !important; }
    .event-ops-row                          { flex-direction:column !important; overflow:hidden; }
    .event-ops-row > *                      { width:100% !important; min-width:0 !important; flex:none !important; box-sizing:border-box !important; }
    .print-section-desktop                  { display:none; }
    .print-section-mobile                   { display:flex; }
}

/* =============================================================================
   MOBILE FONT SIZES
   iOS zooms into any input with font-size < 16px on focus. We force all
   interactive fields to exactly 16px on mobile, then scale the rest of the
   type down slightly to keep things tight on small screens.
============================================================================= */
@media (max-width: 768px) {

    /* Prevent iOS zoom — must be >= 16px */
    input,
    input[type="text"],
    input[type="email"],
    input[type="password"],
    input[type="number"],
    input[type="tel"],
    input[type="url"],
    input[type="search"],
    input[type="date"],
    input[type="time"],
    input[type="datetime-local"],
    select,
    textarea {
        font-size: 16px !important;
    }

    /* Bump base font size — the desktop clamp bottoms out at 12px which is
       too small on phones. 14px reads comfortably on iOS/Android. */
    html, body {
        font-size: 14px;
    }

    /* Adjust type scale relative to the new base */
    :root {
        --text-sm:      0.85rem;   /* ~12px */
        --text-base:    1rem;      /* 14px */
        --text-input:   1.14rem;   /* ~16px — kept >= 16px to prevent iOS zoom */
        --text-section: 1.2rem;    /* ~17px */
        --text-page:    1.35rem;   /* ~19px */
    }
}