/* ================================================================
   Verytable — Global App Styles
   "Gilt" — Premium light theme, charcoal & gold
   Fonts: Onest (UI) + Fira Code (data/mono)
   ================================================================ */

:root {
    /* ── Gilt Light Palette ────────────────────────────────────── */
    --c-bg:           #faf9f8; /* warm cream matte */
    --c-surface:      #ffffff;        /* card/panel surface */
    --c-surface-2:    #F4F4F4;        /* elevated hover surface */
    --c-surface-3:    #EBEBEB;        /* deepest elevation */
    --c-border:       #E5E3DF;        /* standard border */
    --c-border-dim:   #F0EEEB;        /* very subtle border */
    --c-border-hi:    #CECCCA;        /* prominent border */

    --c-text:         #1C1A17;        /* deep charcoal — almost black */
    --c-muted:        #494644;        /* warm stone grey */
    --c-muted-2:      #A8A29C;        /* tertiary / placeholder */

    --c-accent:      #c28034;        /* warm taupe */
    --c-accent-dark:  #9e682a;        /* taupe pressed/hover */
    --c-accent-dim:   rgba(154,140,103,0.10);
    --c-accent-glow:  rgba(154,140,103,0.18);
    --c-accent-nav:   rgba(28, 27, 27, 0.12);

    --c-nav:          #FAFAFA;        /* sidebar — near white */
    --c-nav-text:     #1C1A17;        /* sidebar text */
    --c-nav-muted:    #6B6460;        /* sidebar muted text */
    --c-nav-hover:    rgba(154,140,103,0.07);
    --c-nav-active:   rgba(154,140,103,0.10);

    --c-danger:       #C0392B;        /* deep red */
    --c-danger-bg:    rgba(192,57,43,0.08);
    --c-warning:      #B7791F;        /* deep amber */
    --c-warning-bg:   rgba(183,121,31,0.10);
    --c-success:      #1E6B45;        /* forest green */
    --c-success-bg:   rgba(30,107,69,0.08);
    --c-info:         #1A5FA8;        /* steel blue */
    --c-info-bg:      rgba(26,95,168,0.08);
    --c-purple:       #6D3FA0;        /* plum */
    --c-purple-bg:    rgba(109,63,160,0.08);
    --c-muted-bg:     rgba(107,100,96,0.08);
    --c-orange:       #C05C1A;        /* burnt sienna */

    /* ── GA alias variables (keep for backward compat with Tailwind) */
    --ga-blue:        var(--c-accent);
    --ga-blue-dark:   var(--c-accent-dark);
    --ga-blue-light:  var(--c-accent-dim);
    --ga-bg:          var(--c-bg);
    --ga-surface:     var(--c-surface);
    --ga-border:      var(--c-border);
    --ga-text:        var(--c-text);
    --ga-muted:       var(--c-muted);
    --ga-hover:       var(--c-surface-2);
    --ga-nav:         var(--c-nav);
    --ga-green:       var(--c-success);
    --ga-green-bg:    var(--c-success-bg);
    --ga-red:         var(--c-danger);
    --ga-red-bg:      var(--c-danger-bg);
    --ga-yellow:      var(--c-warning);
    --ga-yellow-bg:   var(--c-warning-bg);
    --ga-purple:      var(--c-purple);
    --ga-orange:      var(--c-orange);

    /* ── Spacing ───────────────────────────────────────────────── */
    --sidebar-collapsed: 56px;
    --sidebar-expanded:  240px;
    --header-height:     60px;

    /* ── Typography ────────────────────────────────────────────── */
    --font-ui:   'Onest', 'DM Sans', sans-serif;
    --font-mono: 'Jost', sans-serif;
    --font-sans: var(--font-ui);

    /* ── Motion ────────────────────────────────────────────────── */
    --tr-fast:   150ms ease;
    --tr-normal: 250ms ease;
    --tr-slow:   350ms ease;
    --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* ── Reset & Base ───────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; }

html { height: 100%; }

body {
    min-height: 100%;
    font-family: var(--font-ui);
    background-color: var(--c-bg);
    color: var(--c-text);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* ── Typography ─────────────────────────────────────────────── */
.page-title {
    font-size: 17px;
    font-weight: 600;
    color: var(--c-text);
    letter-spacing: -0.2px;
    font-family: var(--font-ui);
}

.section-title {
    font-size: 13px;
    font-weight: 600;
    color: var(--c-text);
    letter-spacing: 0.1px;
}

.label-sm {
    font-size: 10px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--c-muted);
    font-family: var(--font-mono);
}

.mono {
    font-family: var(--font-mono);
    font-size: 0.875em;
}

/* ── GA Cards ───────────────────────────────────────────────── */
.ga-card {
    background: rgba(255,255,255,0.88);
    backdrop-filter: blur(16px) saturate(160%);
    -webkit-backdrop-filter: blur(16px) saturate(160%);
    border-radius: 10px;
    border: 1px solid rgba(0,0,0,0.07);
    transition: border-color var(--tr-normal), box-shadow var(--tr-normal);
}

.ga-card:hover {
    border-color: rgba(0,0,0,0.11);
    box-shadow: 0 4px 20px rgba(0,0,0,0.06);
}

.ga-card-elevated {
    background: var(--c-surface);
    border-radius: 10px;
    border: 1px solid var(--c-border);
    box-shadow: 0 4px 20px rgba(28,26,23,0.08), 0 1px 3px rgba(28,26,23,0.06);
}

/* ── Stat Cards (like GA metric cards) ─────────────────────── */
.stat-card {
    background: var(--c-surface);
    border: 1px solid var(--c-border-dim);
    border-radius: 10px;
    padding: 20px 24px;
    display: flex;
    flex-direction: column;
    gap: 6px;
    transition: border-color var(--tr-normal), box-shadow var(--tr-normal), transform var(--tr-normal);
    position: relative;
    overflow: hidden;
}

.stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, var(--c-accent), transparent);
    opacity: 0;
    transition: opacity var(--tr-normal);
}

.stat-card:hover {
    border-color: var(--c-border-hi);
    box-shadow: 0 8px 24px rgba(28,26,23,0.10), 0 0 0 1px var(--c-border-dim);
    transform: translateY(-1px);
}

.stat-card:hover::before {
    opacity: 1;
}

.stat-card__label {
    font-size: 10px;
    font-weight: 600;
    color: var(--c-muted);
    text-transform: uppercase;
    letter-spacing: 1px;
    font-family: var(--font-mono);
}

.stat-card__value {
    font-size: 30px;
    font-weight: 700;
    color: var(--c-text);
    letter-spacing: -1px;
    line-height: 1.1;
    font-family: var(--font-mono);
}

.stat-card__delta {
    font-size: 12px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 3px;
    font-family: var(--font-mono);
}

.stat-card__delta--up   { color: var(--c-success); }
.stat-card__delta--down { color: var(--c-danger); }

/* ── GA Tables ──────────────────────────────────────────────── */
.ga-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
    font-family: var(--font-ui);
}

.ga-table thead th {
    padding: 10px 16px;
    text-align: left;
    font-size: 10px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--c-muted);
    border-bottom: 1px solid rgba(0,0,0,0.07);
    white-space: nowrap;
    background: rgba(255,255,255,0.82);
    backdrop-filter: blur(16px) saturate(160%);
    -webkit-backdrop-filter: blur(16px) saturate(160%);
    position: sticky;
    top: 0;
    z-index: 1;
    font-family: var(--font-mono);
}

.ga-table tbody tr {
    border-bottom: 1px solid var(--c-border-dim);
    transition: background var(--tr-fast);
    cursor: pointer;
}

.ga-table tbody tr:last-child { border-bottom: none; }

.ga-table tbody tr:hover {
    background: var(--c-surface-2);
}

.ga-table tbody td {
    padding: 11px 16px;
    color: var(--c-text);
    vertical-align: middle;
}

/* ── Buttons ─────────────────────────────────────────────────── */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    height: 34px;
    padding: 0 16px;
    border-radius: 6px;
    font-family: var(--font-ui);
    font-size: 13px;
    font-weight: 600;
    letter-spacing: .1px;
    cursor: pointer;
    transition: background var(--tr-fast), box-shadow var(--tr-fast),
                opacity var(--tr-fast), transform var(--tr-fast);
    border: none;
    outline: none;
    white-space: nowrap;
    text-decoration: none;
}

.btn:active { transform: scale(0.97); }

.btn-primary {
    background: var(--c-accent);
    color: #fff;
}
.btn-primary:hover {
    background: var(--c-accent-dark);
    box-shadow: 0 2px 12px var(--c-accent-glow);
}

.btn-secondary {
    background: var(--c-surface);
    color: var(--c-text);
    border: 1px solid var(--c-border);
}
.btn-secondary:hover {
    background: var(--c-surface-2);
    border-color: var(--c-border-hi);
}

.btn-danger {
    background: transparent;
    color: var(--c-danger);
    border: 1px solid var(--c-border);
}
.btn-danger:hover {
    background: var(--c-danger-bg);
    border-color: var(--c-danger);
}

.btn-ghost {
    background: transparent;
    color: var(--c-accent);
    border: 1px solid var(--c-accent-dim);
}
.btn-ghost:hover {
    background: var(--c-accent-dim);
    box-shadow: 0 2px 8px var(--c-accent-glow);
}

.btn-icon {
    height: 34px;
    width: 34px;
    padding: 0;
    border-radius: 6px;
    background: transparent;
    border: 1px solid transparent;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background var(--tr-fast), border-color var(--tr-fast);
    color: var(--c-muted);
}
.btn-icon:hover {
    background: var(--c-surface-2);
    border-color: var(--c-border);
    color: var(--c-text);
}

/* ── Form inputs ─────────────────────────────────────────────── */
.ga-input, .ga-select, .ga-textarea {
    width: 100%;
    height: 36px;
    padding: 0 12px;
    background: var(--c-surface);
    border: 1px solid var(--c-border);
    border-radius: 6px;
    font-family: var(--font-ui);
    font-size: 13px;
    color: var(--c-text);
    transition: border-color var(--tr-fast), box-shadow var(--tr-fast),
                background var(--tr-fast);
    outline: none;
}

.ga-textarea {
    height: auto;
    padding: 8px 12px;
    resize: vertical;
}

.ga-input:focus, .ga-select:focus, .ga-textarea:focus {
    border-color: var(--c-accent);
    background: var(--c-surface);
    box-shadow: 0 0 0 3px var(--c-accent-dim), 0 1px 4px rgba(154,140,103,0.08);
}

.ga-input::placeholder { color: var(--c-muted-2); }
.ga-input[readonly]    {
    background: var(--c-surface-2);
    cursor: not-allowed;
    color: var(--c-muted);
}

/* Select arrow */
.ga-select {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%236B6460' stroke-width='1.5' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 10px center;
    padding-right: 32px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.form-label {
    font-size: 12px;
    font-weight: 600;
    color: var(--c-muted);
    text-transform: uppercase;
    letter-spacing: 0.7px;
    font-family: var(--font-mono);
}

/* ── Modal ──────────────────────────────────────────────────── */
.ga-modal {
    position: fixed;
    inset: 0;
    z-index: 50;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    padding: 48px 16px;
    overflow-y: auto;
}

.ga-modal__box {
    background: var(--c-surface);
    border-radius: 12px;
    width: 100%;
    max-width: 680px;
    border: 1px solid var(--c-border);
    box-shadow: 0 20px 60px rgba(28,26,23,0.18), 0 4px 16px rgba(28,26,23,0.08);
    animation: modal-in .2s cubic-bezier(0.34, 1.2, 0.64, 1);
}

.ga-modal__box--wide { max-width: 900px; }
.ga-modal__box--narrow { max-width: 480px; }

@keyframes modal-in {
    from { opacity: 0; transform: translateY(-8px) scale(.97); }
    to   { opacity: 1; transform: translateY(0) scale(1); }
}

.ga-modal__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 18px 24px;
    border-bottom: 1px solid var(--c-border-dim);
}

.ga-modal__title {
    font-size: 15px;
    font-weight: 600;
    color: var(--c-text);
}

.ga-modal__body    { padding: 24px; }
.ga-modal__footer  {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
    padding: 16px 24px;
    border-top: 1px solid var(--c-border-dim);
    background: var(--c-surface-2);
    border-radius: 0 0 12px 12px;
}

/* ── ga-modal hyphen aliases (settings tabs) ────────────────── */
.ga-modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(28,26,23,0.45);
}
.ga-modal-box     { background: var(--c-surface); border-radius: 12px; border: 1px solid var(--c-border); box-shadow: 0 20px 60px rgba(28,26,23,0.18), 0 4px 16px rgba(28,26,23,0.08); animation: modal-in .2s cubic-bezier(0.34,1.2,0.64,1); position: relative; z-index: 1; }
.ga-modal-header  { display: flex; align-items: center; justify-content: space-between; padding: 18px 24px; border-bottom: 1px solid var(--c-border-dim); }
.ga-modal-title   { font-size: 15px; font-weight: 600; color: var(--c-text); }
.ga-modal-close   { display: inline-flex; align-items: center; justify-content: center; width: 28px; height: 28px; border-radius: 6px; color: var(--c-muted); transition: background .15s, color .15s; }
.ga-modal-close:hover { background: var(--c-surface-2); color: var(--c-text); }
.ga-modal-body    { padding: 24px; }
.ga-modal-footer  { display: flex; align-items: center; justify-content: flex-end; gap: 8px; padding: 16px 24px; border-top: 1px solid var(--c-border-dim); background: var(--c-surface-2); border-radius: 0 0 12px 12px; }

/* ── Status Badges (reservations) ───────────────────────────── */
.badge {
    display: inline-flex;
    align-items: center;
    height: 20px;
    padding: 0 8px;
    border-radius: 4px;
    font-size: 10px;
    font-weight: 600;
    letter-spacing: .5px;
    white-space: nowrap;
    text-transform: uppercase;
    font-family: var(--font-mono);
}

.badge-confirmed    { background: var(--c-success-bg);  color: var(--c-success); }
.badge-not-confirmed{ background: var(--c-warning-bg);  color: var(--c-warning); }
.badge-cancelled    { background: var(--c-danger-bg);   color: var(--c-danger); }
.badge-seated       { background: rgba(192,92,26,0.10); color: #C05C1A; }
.badge-finished     { background: var(--c-muted-bg);    color: var(--c-muted); }
.badge-no-show      { background: var(--c-danger-bg);   color: var(--c-danger); }
.badge-waitlist     { background: var(--c-purple-bg);   color: var(--c-purple); }
.badge-vip          { background: var(--c-warning-bg);  color: var(--c-warning); }
.badge-voucher      { background: var(--c-success-bg);  color: var(--c-success); }

/* ── Toggle Switch ──────────────────────────────────────────── */
.toggle {
    position: relative;
    display: inline-block;
    width: 36px;
    height: 20px;
    flex-shrink: 0;
}
.toggle input { opacity: 0; width: 0; height: 0; }
.toggle-track {
    position: absolute;
    inset: 0;
    background: var(--c-border);
    border-radius: 10px;
    cursor: pointer;
    transition: background var(--tr-fast), box-shadow var(--tr-fast);
}
.toggle input:checked + .toggle-track {
    background: var(--c-accent);
    box-shadow: 0 1px 6px var(--c-accent-glow);
}
.toggle-track::after {
    content: '';
    position: absolute;
    left: 3px;
    top: 3px;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: #fff;
    box-shadow: 0 1px 3px rgba(0,0,0,.4);
    transition: transform var(--tr-fast);
}
.toggle input:checked + .toggle-track::after { transform: translateX(16px); }

/* ── Tab navigation (settings pages) ───────────────────────── */
.ga-tabs {
    display: flex;
    border-bottom: 1px solid var(--c-border-dim);
    gap: 0;
    overflow-x: auto;
    scrollbar-width: none;
}
.ga-tabs::-webkit-scrollbar { display: none; }

.ga-tab {
    padding: 10px 18px;
    font-size: 13px;
    font-weight: 500;
    color: var(--c-muted);
    border-bottom: 2px solid transparent;
    cursor: pointer;
    white-space: nowrap;
    transition: color var(--tr-fast), border-color var(--tr-fast);
    text-decoration: none;
    font-family: var(--font-ui);
}
.ga-tab:hover { color: var(--c-text); }
.ga-tab.active {
    color: var(--c-accent);
    border-bottom-color: var(--c-accent);
}

/* ── Toast notifications ────────────────────────────────────── */
.toast {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 16px;
    border-radius: 8px;
    background: var(--c-surface);
    border: 1px solid var(--c-border);
    box-shadow: 0 8px 32px rgba(28,26,23,0.14), 0 2px 6px rgba(28,26,23,0.08);
    font-size: 13px;
    font-weight: 500;
    min-width: 240px;
    max-width: 400px;
    pointer-events: all;
    color: var(--c-text);
    animation: toast-in .2s ease, toast-out .2s ease 3.8s forwards;
}
.toast-success { border-left: 3px solid var(--c-accent); }
.toast-error   { border-left: 3px solid var(--c-danger); }
.toast-info    { border-left: 3px solid var(--c-info); }

@keyframes toast-in  { from { opacity:0; transform: translateY(8px); } to { opacity:1; transform:translateY(0); } }
@keyframes toast-out { from { opacity:1; } to { opacity:0; transform: translateY(8px); } }

/* ── Loading skeleton ───────────────────────────────────────── */
.skeleton {
    background: linear-gradient(90deg, var(--c-surface-2) 25%, var(--c-border-dim) 50%, var(--c-surface-2) 75%);
    background-size: 200% 100%;
    animation: skeleton-shimmer 1.6s infinite;
    border-radius: 4px;
}
@keyframes skeleton-shimmer { 0% { background-position: 200% 0; } 100% { background-position: -200% 0; } }

/* ── Scrollbar (global slimmer) ─────────────────────────────── */
::-webkit-scrollbar       { width: 5px; height: 5px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--c-border); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--c-border-hi); }

/* ── Utility: visually-hidden ───────────────────────────────── */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0,0,0,0);
    white-space: nowrap;
    border: 0;
}

/* ── Page load stagger animation ────────────────────────────── */
@keyframes fade-up {
    from { opacity: 0; transform: translateY(10px); }
    to   { opacity: 1; transform: translateY(0); }
}

.stagger-children > * {
    animation: fade-up 0.35s ease both;
}
.stagger-children > *:nth-child(1)  { animation-delay: 0ms; }
.stagger-children > *:nth-child(2)  { animation-delay: 50ms; }
.stagger-children > *:nth-child(3)  { animation-delay: 100ms; }
.stagger-children > *:nth-child(4)  { animation-delay: 150ms; }
.stagger-children > *:nth-child(5)  { animation-delay: 200ms; }
.stagger-children > *:nth-child(6)  { animation-delay: 250ms; }
.stagger-children > *:nth-child(7)  { animation-delay: 300ms; }
.stagger-children > *:nth-child(n+8){ animation-delay: 350ms; }

.animate-fade-up {
    animation: fade-up 0.4s ease both;
}

/* ── Subtle accent shadow ───────────────────────────────────── */
.glow-accent {
    box-shadow: 0 2px 12px var(--c-accent-glow);
}

.text-accent   { color: var(--c-accent); }
.text-muted    { color: var(--c-muted); }
.text-danger   { color: var(--c-danger); }
.text-warning  { color: var(--c-warning); }

/* ── Terminal / code inline ─────────────────────────────────── */
.code-inline {
    font-family: var(--font-mono);
    font-size: 12px;
    background: var(--c-surface-2);
    border: 1px solid var(--c-border-dim);
    border-radius: 4px;
    padding: 1px 6px;
    color: var(--c-accent);
}
/* ── Glass utilities (shared across all pages) ────────────────── */

/* Metric / stat chip card */
.ga-glass-card {
    background: rgba(255,255,255,0.90);
    backdrop-filter: blur(22px) saturate(165%) brightness(1.01);
    -webkit-backdrop-filter: blur(22px) saturate(165%) brightness(1.01);
    border: 1px solid rgba(0,0,0,0.07);
    border-radius: 14px;
    position: relative;
    overflow: hidden;
    box-shadow: none;
    transition: transform 220ms var(--ease-spring), background 220ms ease, border-color 220ms ease, box-shadow 220ms ease;
}
.ga-glass-card::before {
    content: '';
    position: absolute;
    top: 0; left: 10%; right: 10%;
    height: 1px;
    background: linear-gradient(90deg, transparent 0%, rgba(255,255,255,0.9) 38%, rgba(255,255,255,0.9) 62%, transparent 100%);
    pointer-events: none;
    z-index: 1;
}
.ga-glass-card > * { position: relative; z-index: 1; }
.ga-glass-card:hover {
    transform: translateY(-5px) scale(1.018);
    background: rgba(244,244,244,0.95);
    border-color: rgba(0,0,0,0.11);
    box-shadow:
        0 4px 16px rgba(28,26,23,0.06),
        0 1px 4px rgba(28,26,23,0.03);
}
/* Color tint overlay — add <span class="ga-glass-card-accent"> as first child */
.ga-glass-card-accent {
    position: absolute;
    inset: 0;
    background: linear-gradient(140deg, var(--stat-accent, transparent) 0%, transparent 52%);
    pointer-events: none;
    border-radius: inherit;
    z-index: 0;
}

/* Section / group container card */
.ga-glass-section {
    background: rgba(255,255,255,0.88);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255,255,255,0.92);
    border-bottom: 1px solid rgba(221,217,210,0.55);
    border-radius: 14px;
    box-shadow: none;
    overflow: hidden;
    transition: box-shadow 250ms ease, transform 250ms ease;
    margin-bottom: 16px;
}
.ga-glass-section:hover {
    box-shadow:
        0 4px 16px rgba(28,26,23,0.06),
        0 1px 4px rgba(28,26,23,0.03);
    transform: translateY(-1px);
}

/* Floating dropdown (context menus, status pickers) */
.ga-glass-dropdown {
    background: rgba(255,255,255,0.92) !important;
    backdrop-filter: blur(24px) saturate(180%) !important;
    -webkit-backdrop-filter: blur(24px) saturate(180%) !important;
    border: 1px solid rgba(0,0,0,0.08) !important;
    box-shadow:
        0 12px 44px rgba(0,0,0,0.10),
        0 3px 12px rgba(0,0,0,0.06),
        inset 0 1px 0 rgba(255,255,255,0.95) !important;
}

/* Tag pill with color-keyed border (use with inline style for color) */
.ga-tag-pill {
    border-width: 1px;
    border-style: solid;
}

/* Table / list row with status left-edge accent */
.ga-accent-row {
    transition: background 120ms ease, box-shadow 140ms ease;
    border-left-style: solid;
    border-left-width: 3px;
}
.ga-accent-row:hover {
    background: color-mix(in srgb, var(--row-accent, #9a8c67) 4%, transparent) !important;
    box-shadow: inset 4px 0 20px var(--row-color, rgba(154,140,103,0.10));
}

/* Mobile card list item with status left-edge accent */
.ga-accent-card {
    transition: background 120ms ease, box-shadow 140ms ease;
    border-left-style: solid;
    border-left-width: 3px;
    border-radius: 0;
}
.ga-accent-card:hover {
    background: color-mix(in srgb, var(--row-accent, #9a8c67) 4%, transparent) !important;
    box-shadow: inset 4px 0 20px var(--row-color, rgba(154,140,103,0.10));

}

/* Animated time / status pill badge */
.ga-time-badge {
    transition: transform 150ms var(--ease-spring), box-shadow 150ms ease;
}
.ga-accent-row:hover .ga-time-badge,
.ga-accent-card:hover .ga-time-badge {
    transform: scale(1.1) translateY(-1px);
}
/* ── Sidebar — frosted glass ───────────────────────────────── */
#sidebar {
    border-right: 1px solid rgba(0,0,0,0.07) !important;
}

/* ── Page content area ──────────────────────────────────────── */


/* ── Header — frosted glass ─────────────────────────────────── */
header {
    backdrop-filter: blur(20px) saturate(180%) brightness(1.02) !important;
    -webkit-backdrop-filter: blur(20px) saturate(180%) brightness(1.02) !important;
}

/* ── Dropdown menus — frosted glass ─────────────────────────── */
#restaurant-menu,
#user-menu {
    background: rgba(255,255,255,0.88) !important;
    backdrop-filter: blur(20px) saturate(180%) brightness(1.02) !important;
    -webkit-backdrop-filter: blur(20px) saturate(180%) brightness(1.02) !important;
    border: 1px solid rgba(0,0,0,0.08) !important;
    box-shadow: 0 10px 40px rgba(0,0,0,0.09), 0 2px 8px rgba(0,0,0,0.05) !important;
}

/* ── Modal backdrop ─────────────────────────────────────────── */
#modal-backdrop {
    background: rgba(28,26,23,0.5);
    backdrop-filter: blur(4px);
}

/* ── Quill editor light override ────────────────────────────── */
.ql-toolbar {
    background: var(--c-surface-2) !important;
    border-color: var(--c-border) !important;
    border-radius: 6px 6px 0 0;
}
.ql-container {
    background: var(--c-surface) !important;
    border-color: var(--c-border) !important;
    color: var(--c-text) !important;
    border-radius: 0 0 6px 6px;
    font-family: var(--font-ui) !important;
}
.ql-editor { color: var(--c-text) !important; }
.ql-toolbar .ql-stroke { stroke: var(--c-muted) !important; }
.ql-toolbar .ql-fill   { fill:   var(--c-muted) !important; }
.ql-toolbar button:hover .ql-stroke { stroke: var(--c-accent) !important; }

/* ── Reservation modal — force white form backgrounds ───────── */
#reservation-modal-panel .ga-input,
#reservation-modal-panel .ga-select,
#reservation-modal-panel .ga-textarea {
    background: #fff;
}
#reservation-modal-panel .ga-input:focus,
#reservation-modal-panel .ga-select:focus,
#reservation-modal-panel .ga-textarea:focus {
    background: #fff;
}
#reservation-modal-panel .ga-input[readonly] {
    background: var(--c-surface-2);
}
/* Time / tables trigger boxes */
#reservation-modal-panel #rm-time-container,
#reservation-modal-panel #rm-tables-container {
    background: #fff;
}

/* ── Responsive tweaks ──────────────────────────────────────── */
@media (max-width: 768px) {
    .ga-modal { padding: 16px; }
    .ga-modal__box { max-width: 100%; }
}


/* -- Analytics � Themed Report Sections ----------------------- */
.ana-section-wrap {
    border: 1px solid var(--c-border-dim);
    border-radius: 10px;
    overflow: hidden;
    background: var(--c-surface);
}

.ana-section-header {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 13px 20px;
    cursor: pointer;
    background: var(--c-surface-2);
    border-bottom: 1px solid var(--c-border-dim);
    transition: background var(--tr-fast);
    user-select: none;
    list-style: none;
    border: none;
    width: 100%;
    text-align: left;
}

.ana-section-header:hover {
    background: var(--c-surface-3);
}

.ana-section-icon {
    font-size: 18px;
    color: var(--c-accent);
    flex-shrink: 0;
}

.ana-section-title {
    font-size: 14px;
    font-weight: 700;
    color: var(--c-text);
    font-family: var(--font-ui);
    flex: 1;
}

.ana-section-sub {
    color: var(--c-muted-2);
    font-size: 10px;
}

.ana-section-chevron {
    font-size: 18px;
    color: var(--c-muted-2);
    transition: transform var(--tr-normal);
    flex-shrink: 0;
}

.ana-section-chevron.collapsed {
    transform: rotate(-90deg);
}

.ana-section-body {
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.ana-section-body.hidden {
    display: none;
}

.ana-topic-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 12px;
}

.ana-chart-wrap {
    position: relative;
    height: 230px;
}

.ana-chart-wrap--tall {
    height: 280px;
}

.ana-chart-wrap--short {
    height: 180px;
}

.ana-toggle {
    font-size: 10px;
    font-weight: 600;
    color: var(--c-muted);
    text-transform: uppercase;
    letter-spacing: 0.6px;
    background: transparent;
    border: 1px solid var(--c-border);
    border-radius: 4px;
    padding: 3px 9px;
    cursor: pointer;
    font-family: var(--font-mono);
    transition: background var(--tr-fast), color var(--tr-fast), border-color var(--tr-fast);
    flex-shrink: 0;
}

.ana-toggle:hover {
    background: var(--c-surface-2);
    color: var(--c-text);
    border-color: var(--c-border-hi);
}

.ana-table-wrap {
    overflow-x: auto;
    max-height: 300px;
    overflow-y: auto;
    border-top: 1px solid var(--c-border-dim);
    margin-top: 8px;
}

.ana-table-wrap.hidden {
    display: none;
}

/* Retention stat large number */
.ana-retention-pct {
    font-size: 44px;
    font-weight: 800;
    color: var(--c-accent);
    font-family: var(--font-mono);
    letter-spacing: -2px;
    line-height: 1;
}

/* No-show rate colour coding in tables */
.rate-high   { color: var(--c-danger);  font-weight: 600; }
.rate-medium { color: var(--c-warning); font-weight: 600; }
.rate-low    { color: var(--c-success); }

/* Loading state */
.ana-loading-bar {
    position: absolute;
    bottom: 0;
    left: 0;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--c-accent), var(--c-info), transparent);
    background-size: 200% 100%;
    animation: ana-bar-slide 1.2s linear infinite;
    border-radius: 0 0 10px 10px;
    width: 100%;
    opacity: 0;
    transition: opacity var(--tr-fast);
    pointer-events: none;
}
.ana--loading .ana-loading-bar {
    opacity: 1;
}
@keyframes ana-bar-slide {
    0%   { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

.ana--loading .stat-card__value,
.ana--loading .stat-card__delta,
.ana--loading .ana-section-sub {
    color: transparent !important;
    background: linear-gradient(90deg, var(--c-surface-2) 25%, var(--c-border-dim) 50%, var(--c-surface-2) 75%);
    background-size: 200% 100%;
    animation: skeleton-shimmer 1.4s infinite;
    border-radius: 4px;
    pointer-events: none;
    user-select: none;
}

.ana--loading .ana-section-sub {
    min-width: 80px;
    display: inline-block;
}

.ana--loading canvas {
    opacity: 0.25;
    transition: opacity var(--tr-normal);
}

.ana--loading .btn-primary[data-ana-apply] {
    opacity: 0.6;
    pointer-events: none;
    cursor: wait;
}

/* ── Top Findings Banner ────────────────────────────────────── */
.ana-findings-banner {
    background: var(--c-surface);
    border: 1px solid var(--c-border-dim);
    border-left: 3px solid var(--c-accent);
    border-radius: 10px;
    overflow: hidden;
}

.ana-findings-header {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 11px 16px;
    background: var(--c-surface-2);
    border-bottom: 1px solid var(--c-border-dim);
}

.ana-findings-title {
    font-size: 12px;
    font-weight: 700;
    color: var(--c-text);
    text-transform: uppercase;
    letter-spacing: 0.8px;
    font-family: var(--font-mono);
    flex: 1;
}

.ana-findings-period {
    font-size: 10px;
    color: var(--c-muted-2);
    font-family: var(--font-mono);
}

.ana-findings-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0;
    padding: 4px 0;
}

.ana-finding-item {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    padding: 9px 16px;
    font-size: 13px;
    color: var(--c-text);
    border-bottom: 1px solid var(--c-border-dim);
    width: 100%;
    line-height: 1.4;
    transition: background var(--tr-fast);
}

.ana-finding-item:last-child { border-bottom: none; }

.ana-finding-item:hover { background: var(--c-surface-2); }

.ana-finding-icon {
    font-size: 14px;
    flex-shrink: 0;
    margin-top: 1px;
}

.ana-finding-icon--up      { color: var(--c-success); }
.ana-finding-icon--down    { color: var(--c-danger); }
.ana-finding-icon--warning { color: var(--c-warning); }
.ana-finding-icon--neutral { color: var(--c-muted-2); }
.ana-finding-icon--info    { color: var(--c-info); }

.ana-finding-text strong { font-weight: 600; }
.ana-finding-text em { font-style: normal; color: var(--c-muted); font-size: 12px; }

/* ── Health badges on stat cards ────────────────────────────── */
.ana-health-badge {
    font-size: 10px;
    font-weight: 700;
    font-family: var(--font-mono);
    letter-spacing: 0.5px;
    padding: 1px 6px;
    border-radius: 3px;
    text-transform: uppercase;
    line-height: 1.6;
    display: none;
}

.ana-health-badge.on-track  { display: inline-block; background: var(--c-success-bg); color: var(--c-success); }
.ana-health-badge.watch     { display: inline-block; background: var(--c-warning-bg); color: var(--c-warning); }
.ana-health-badge.action    { display: inline-block; background: var(--c-danger-bg);  color: var(--c-danger); }

/* ── Insight callout cards ──────────────────────────────────── */
.ana-insight-callout {
    background: linear-gradient(135deg, rgba(194,128,52,0.06) 0%, transparent 60%);
    border: 1px solid var(--c-border-dim);
    border-left: 3px solid var(--c-accent);
    border-radius: 8px;
    padding: 12px 16px;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.ana-insight-item {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    font-size: 12px;
    color: var(--c-muted);
    line-height: 1.45;
}

.ana-insight-item .material-icons {
    font-size: 14px;
    flex-shrink: 0;
    margin-top: 1px;
}

.ana-insight-item strong { color: var(--c-text); font-weight: 600; }

/* ── Trend narrative micro-label ────────────────────────────── */
.ana-trend-narrative {
    font-size: 11px;
    color: var(--c-muted-2);
    font-family: var(--font-mono);
    padding: 6px 2px 2px;
    display: none;
    gap: 4px;
    align-items: center;
}

.ana-trend-narrative.visible { display: flex; }
.ana-trend-narrative .material-icons { font-size: 13px; }

/* ── KPI tooltip icon ───────────────────────────────────────── */
.ana-tip-icon {
    font-size: 11px;
    color: var(--c-muted-2);
    cursor: help;
    line-height: 1;
    flex-shrink: 0;
    transition: color var(--tr-fast);
}

.ana-tip-icon:hover { color: var(--c-accent); }

/* ── Best/worst row highlight in tables ─────────────────────── */
.ana-row-best td:first-child::before {
    content: '\1F525';
    margin-right: 5px;
    font-size: 11px;
}

.ana-row-worst td:first-child::before {
    content: '\26A0\FE0F';
    margin-right: 4px;
    font-size: 11px;
}

.ana-row-best  { background: var(--c-success-bg) !important; }
.ana-row-worst { background: var(--c-warning-bg) !important; }
