@import url('fonts.css');

/* ============================================================
   Design tokens
   ============================================================ */
:root {
    --ink: #18141F;
    --ink-soft: #5B5570;
    --ink-faint: #8B85A0;

    --brand: #4F3FF0;
    --brand-dark: #3C2FC7;
    --brand-light: #EEEBFD;
    --brand-rgb: 79, 63, 240;

    --accent: #D6A13F;
    --accent-dark: #B3842E;
    --accent-light: #FBF1DD;

    --surface: #FFFFFF;
    --bg: #FAF9FC;
    --bg-alt: #F4F1FB;
    --border: #E9E6F3;

    --success: #1F9D6C;
    --danger: #DC3D5C;
    --warning: #E2A33D;

    --font-heading: 'Playfair Display', Georgia, 'Times New Roman', serif;
    --font-body: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;

    --radius-sm: 10px;
    --radius-md: 16px;
    --radius-lg: 24px;
    --radius-pill: 999px;

    --shadow-sm: 0 1px 2px rgba(24, 20, 31, 0.06), 0 1px 1px rgba(24, 20, 31, 0.04);
    --shadow-md: 0 8px 24px rgba(24, 20, 31, 0.08), 0 2px 8px rgba(24, 20, 31, 0.04);
    --shadow-lg: 0 20px 48px rgba(24, 20, 31, 0.14), 0 6px 16px rgba(24, 20, 31, 0.06);
    --shadow-brand: 0 10px 28px rgba(var(--brand-rgb), 0.28);

    --ease: cubic-bezier(0.4, 0, 0.2, 1);

    /* Bootstrap 5.3 theme override - retheme the framework via its own CSS variables
       rather than fighting it with !important overrides everywhere. */
    --bs-primary: var(--brand);
    --bs-primary-rgb: var(--brand-rgb);
    --bs-link-color: var(--brand);
    --bs-link-color-rgb: var(--brand-rgb);
    --bs-link-hover-color: var(--brand-dark);
    --bs-body-font-family: var(--font-body);
    --bs-body-color: var(--ink);
    --bs-body-bg: var(--bg);
    --bs-border-radius: var(--radius-sm);
    --bs-border-radius-lg: var(--radius-md);
    --bs-border-color: var(--border);
}

/* ============================================================
   Base
   ============================================================ */
body {
    background: var(--bg);
    color: var(--ink);
    -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, .h1, .h2, .h3, .h4,
.font-heading {
    font-family: var(--font-heading);
    font-weight: 700;
    letter-spacing: -0.01em;
    color: var(--ink);
}

h5, h6, .h5, .h6 {
    font-family: var(--font-body);
    font-weight: 700;
}

/* Bare inline links (legal-page prose, the contact sidebar, mailto links, etc.)
   were falling through to the browser's default underlined blue - clashing hard
   against the rest of the site's underline-free, brand-colored link language
   (nav links, footer links, buttons all already override this). A soft,
   low-contrast underline keeps links distinguishable by more than color alone
   (not just relying on the brand purple) without looking like a raw <a> tag. */
a {
    color: var(--brand);
    text-decoration-color: rgba(var(--brand-rgb), 0.35);
    text-underline-offset: 3px;
    transition: color 150ms var(--ease), text-decoration-color 150ms var(--ease);
}
a:hover {
    color: var(--brand-dark);
    text-decoration-color: currentColor;
}

.text-muted {
    color: var(--ink-faint) !important;
}

::selection {
    background: var(--brand-light);
    color: var(--brand-dark);
}

/* ============================================================
   Icons - self-hosted line icons (Lucide-style), inherit color via
   currentColor. Deliberately monochrome, no per-icon color variety.
   ============================================================ */
.icon {
    width: 1.25em;
    height: 1.25em;
    vertical-align: -0.2em;
    stroke-width: 1.75;
    flex-shrink: 0;
}

.icon-circle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 52px;
    height: 52px;
    border-radius: var(--radius-md);
    background: var(--brand-light);
    color: var(--brand);
}

.icon-sm {
    width: 0.85em;
    height: 0.85em;
}

.icon-circle .icon {
    width: 24px;
    height: 24px;
    stroke-width: 1.6;
}

.icon-circle.icon-circle-accent {
    background: var(--accent-light);
    color: var(--accent-dark);
}

/* ============================================================
   Buttons
   ============================================================ */
.btn {
    font-weight: 600;
    border-radius: var(--radius-sm);
    padding: 0.5rem 1rem;
    transition: transform 150ms var(--ease), box-shadow 150ms var(--ease), background-color 150ms var(--ease), filter 150ms var(--ease);
}

/* Same bug as the .form-control-sm fix above: .btn and Bootstrap's own .btn-sm
   are both single-class selectors, and this stylesheet loads after
   bootstrap.min.css, so .btn's padding was silently beating .btn-sm's smaller
   padding everywhere - "Use a sample" and every other small button in the app
   was rendering at full size. */
.btn-sm {
    padding: 0.3rem 0.65rem;
    font-size: 0.8125rem;
}

.btn-primary {
    background: linear-gradient(135deg, var(--brand) 0%, var(--brand-dark) 100%);
    border: none;
    box-shadow: var(--shadow-brand);
}

.btn-primary:hover,
.btn-primary:focus {
    filter: brightness(1.06);
    transform: translateY(-1px);
    box-shadow: 0 14px 32px rgba(var(--brand-rgb), 0.34);
}

.btn-primary:active {
    transform: translateY(0);
}

.btn-lg {
    padding: 0.85rem 1.75rem;
    border-radius: var(--radius-md);
    font-size: 1.05rem;
}

.btn-outline-primary {
    border-width: 1.5px;
    color: var(--brand);
    border-color: var(--brand);
}

.btn-outline-primary:hover {
    background: var(--brand);
    border-color: var(--brand);
    transform: translateY(-1px);
}

.btn-outline-secondary {
    border-width: 1.5px;
}

.btn-success {
    background: var(--success);
    border-color: var(--success);
}

/* ============================================================
   Cards & surfaces
   ============================================================ */
.card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
    transition: box-shadow 200ms var(--ease), transform 200ms var(--ease);
}

.card.card-hover:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
}

.shadow-elegant {
    box-shadow: var(--shadow-lg) !important;
}

/* ============================================================
   Forms
   ============================================================ */
.form-control, .form-select {
    border: 1.5px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 0.6rem 0.9rem;
    transition: border-color 150ms var(--ease), box-shadow 150ms var(--ease);
}

/* Without this, Bootstrap's own .form-control-sm/.form-select-sm padding
   (0.25rem 0.5rem) loses to the blanket rule above - same specificity, and
   this stylesheet loads after bootstrap.min.css - so every "sm" field in the
   app (this includes the LED Screen qty input, table filters, admin list
   pages) was rendering at full-size padding instead of compact. */
.form-control-sm, .form-select-sm {
    padding: 0.25rem 0.5rem;
}

.form-control:focus, .form-select:focus {
    border-color: var(--brand);
    box-shadow: 0 0 0 4px var(--brand-light);
}

.form-control-color {
    border-radius: var(--radius-sm);
    height: 2.75rem;
}

/* Custom color picker (color-picker.js) - replaces the native <input type=color>
   UI, which renders inconsistently across mobile browsers, with one swatch-grid
   widget that looks the same on every device. */
.color-picker {
    position: relative;
}

.color-picker-control {
    display: flex;
    align-items: center;
    gap: 0.6rem;
}

.color-picker-swatch {
    width: 2.75rem;
    height: 2.75rem;
    flex-shrink: 0;
    border-radius: var(--radius-sm);
    border: 1.5px solid var(--border);
    padding: 0;
    cursor: pointer;
}

.color-picker-swatch:focus-visible {
    outline: 2px solid var(--brand);
    outline-offset: 2px;
}

.color-picker-panel {
    position: absolute;
    z-index: 20;
    top: calc(100% + 0.4rem);
    left: 0;
    right: 0;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-md);
    padding: 0.75rem;
}

.color-picker-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 0.5rem;
}

.color-picker-option {
    width: 100%;
    aspect-ratio: 1;
    border-radius: 6px;
    border: 1.5px solid var(--border);
    padding: 0;
    cursor: pointer;
    transition: transform 120ms var(--ease);
}

.color-picker-option:hover,
.color-picker-option:focus-visible {
    transform: scale(1.12);
}

/* LED Screen quantity: sits inline in normal flow next to its own checkbox
   (LED Screen has its own row now, nothing to push around), shown/hidden
   via a plain toggled class - not inline display or a Bootstrap .d-flex/
   .d-none utility, both of which are !important in Bootstrap and silently
   beat an inline style or a plain class rule. */
.led-screen-qty-wrap {
    display: none;
}
.led-screen-qty-wrap.is-open {
    display: block;
}
.led-screen-qty-wrap .led-screen-qty {
    width: 52px;
    /* Bootstrap's default arrow sits at "right .75rem center" while
       .form-select-sm's left padding is .5rem - mismatched margins either
       side of the number. Match the arrow's offset to the same .5rem. */
    background-position: right 0.5rem center;
}

label.form-label {
    color: var(--ink-soft);
    font-size: 0.85rem;
    letter-spacing: 0.01em;
    text-transform: uppercase;
    font-weight: 700;
}

/* ============================================================
   Alerts & badges
   ============================================================ */
.alert {
    border: none;
    border-radius: var(--radius-sm);
    border-left: 4px solid transparent;
}

.alert-success { background: #E9F7EF; border-left-color: var(--success); color: #146C48; }
.alert-danger  { background: #FCEAEE; border-left-color: var(--danger);  color: #A32541; }
.alert-warning { background: var(--accent-light); border-left-color: var(--accent); color: #8A6A22; }

.badge {
    font-weight: 600;
    padding: 0.4em 0.75em;
    border-radius: var(--radius-pill);
}

/* ============================================================
   Body background texture - subtle, not a flat void
   ============================================================ */
body {
    background-image:
        radial-gradient(circle at 15% 0%, rgba(var(--brand-rgb), 0.06) 0%, transparent 45%),
        radial-gradient(circle at 100% 20%, rgba(214, 161, 63, 0.07) 0%, transparent 40%);
    background-attachment: fixed;
}

/* ============================================================
   Marketing / auth chrome
   ============================================================ */
.brand-wordmark {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-family: var(--font-heading);
    font-weight: 800;
    font-size: 1.5rem;
    color: var(--ink);
    letter-spacing: -0.01em;
}
.brand-wordmark img {
    height: 1.6rem;
    width: auto;
    display: block;
}
.brand-wordmark--sm {
    font-size: 1.15rem;
}
.brand-wordmark--sm img {
    height: 1.3rem;
}

.hero-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    background: var(--brand-light);
    color: var(--brand-dark);
    font-weight: 700;
    font-size: 0.8rem;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    padding: 0.4rem 0.9rem;
    border-radius: var(--radius-pill);
}

.hero-blob {
    position: absolute;
    border-radius: 50%;
    filter: blur(60px);
    opacity: 0.5;
    z-index: 0;
    pointer-events: none;
}

.fade-in-up {
    animation: fadeInUp 600ms var(--ease) both;
}

.fade-in-up-delay-1 { animation-delay: 80ms; }
.fade-in-up-delay-2 { animation-delay: 160ms; }
.fade-in-up-delay-3 { animation-delay: 240ms; }

@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(14px); }
    to { opacity: 1; transform: translateY(0); }
}

@media (prefers-reduced-motion: reduce) {
    .fade-in-up, .fade-in-up-delay-1, .fade-in-up-delay-2, .fade-in-up-delay-3 {
        animation: none;
    }
}

/* ============================================================
   Native app biometric lock overlay - hidden by default (only ever
   shown by native-biometric-lock.js when actually running inside the
   Capacitor app shell). Sits above everything else on cold launch/resume
   until the user unlocks with Face ID/fingerprint.
   ============================================================ */
.native-lock-overlay {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 2000;
    background: var(--ink);
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    text-align: center;
    padding: 2rem;
}
.native-lock-overlay.is-visible {
    display: flex;
}
.native-lock-overlay img {
    width: 64px;
    height: 64px;
}
.native-lock-overlay .native-lock-status {
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.9rem;
}
.native-lock-overlay button {
    display: none;
}
.native-lock-overlay.is-failed button {
    display: inline-flex;
}

/* ============================================================
   App shell (authenticated dashboard)
   ============================================================ */
:root {
    --tc-bottom-nav-height: 64px;
}

.app-shell {
    /* 100vh on mobile Safari/Chrome is measured against the largest possible
       viewport (address bar hidden), not what's actually visible - min-height
       can end up taller than the real screen, which is what makes a
       position:fixed bottom nav feel like it "un-sticks" or jumps near the
       scroll boundary. 100dvh tracks the real, current viewport instead. */
    min-height: 100vh;
    min-height: 100dvh;
    display: flex;
    flex-direction: column;
}

.app-content {
    flex: 1;
    padding-bottom: calc(var(--tc-bottom-nav-height) + env(safe-area-inset-bottom, 0px));
}

@media (min-width: 768px) {
    .app-content {
        padding-bottom: 0;
    }
}

/* Dashed placeholder box for images/screenshots the studio (or we) will drop in
   later - keeps every marketing page shippable today without faking real photos. */
.img-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    background: var(--bg-soft, #F6F4FC);
    border: 1.5px dashed var(--border, #DDD6F3);
    border-radius: var(--radius, 16px);
    color: var(--ink-faint, #9992AC);
    text-align: center;
    padding: 1.5rem;
}
.img-placeholder .icon {
    width: 28px;
    height: 28px;
    opacity: 0.6;
}
.img-placeholder span {
    font-size: 0.8rem;
    font-weight: 600;
    max-width: 240px;
}
.img-placeholder-hero { aspect-ratio: 16 / 10; }
.img-placeholder-wide { aspect-ratio: 16 / 9; }
.img-placeholder-square { aspect-ratio: 1 / 1; }
.img-placeholder-avatar { aspect-ratio: 1 / 1; width: 96px; border-radius: 50%; padding: 0; }

/* Data storage table: a visible top border wherever the client changes is what
   makes consecutive same-client rows read as one stacked group instead of a
   flat list repeating (or, since the name is blanked after the first row,
   silently omitting) the client on every line. */
.dsr-client-group-start td {
    border-top: 2px solid var(--border);
}
.dsr-client-group-start:first-child td {
    border-top: none;
}

.legal-content {
    line-height: 1.7;
}
.legal-content p, .legal-content ul {
    color: var(--ink-soft);
}
.legal-content h2 {
    color: var(--ink);
}

.plan-choice {
    transition: border-color 150ms var(--ease), background 150ms var(--ease);
}
.plan-choice-selected {
    border-color: var(--brand) !important;
    background: var(--brand-light);
}

/* The "Menu" bottom-nav item is a <button> (opens the offcanvas), not an <a>
   like its siblings - explicit reset so it renders identically to them
   despite the browser's default button styling. */
.app-bottom-nav__item {
    font-family: inherit;
}
.app-bottom-nav__lock {
    position: absolute;
    top: -4px;
    right: -8px;
    background: var(--surface);
    border-radius: 50%;
    line-height: 1;
    padding: 2px;
    box-shadow: 0 0 0 1px var(--border);
}
/* Specificity has to beat .app-bottom-nav__icon .icon (22px, defined later in
   this file) - three classes here always wins regardless of source order,
   rather than depending on this rule staying below that one. */
.app-bottom-nav__icon .app-bottom-nav__lock .icon {
    width: 10px;
    height: 10px;
    stroke-width: 2.5;
}

.app-mobile-menu {
    --bs-offcanvas-height: 100vh;
    height: 100vh;
    border-top-left-radius: var(--radius-lg);
    border-top-right-radius: var(--radius-lg);
}
.app-mobile-menu .offcanvas-body {
    overflow-y: auto;
    padding-bottom: calc(1rem + env(safe-area-inset-bottom, 0px));
}

.impersonation-banner {
    background: #18141F;
    color: #fff;
    text-align: center;
    font-size: 0.85rem;
    font-weight: 600;
    padding: 8px 12px;
    position: sticky;
    top: 0;
    z-index: 1040;
}
.impersonation-banner a {
    color: #fff;
    text-decoration: underline;
    margin-left: 10px;
}

.app-navbar {
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border);
}

/* Bootstrap's .navbar > .container defaults to flex-wrap: wrap (so the brand and
   nav items can stack on narrow screens) - with 5+ items plus the Settings
   dropdown that made "Settings"/"Log out" drop to their own line well before the
   mobile nav takes over. This is a desktop-only bar (d-md-flex), so it should
   just stay on one row and let items shrink instead. */
.app-navbar .container {
    flex-wrap: nowrap;
}
.app-navbar .container > .d-flex {
    flex-wrap: nowrap;
    flex-shrink: 0;
}

/* display:flex + align-items:center is what actually keeps every item's text
   vertically centered in its 44px (min-height, for touch targets) box. Without
   it, plain <a> tags are top-anchored block boxes - the extra height above
   min-height just pads out the bottom, leaving text sitting a few px above
   true center - while a <button> (the Settings dropdown-toggle) centers its
   content natively in most browsers. That mismatch, not a wrapper/box-model
   issue, is what made Settings look vertically offset from its siblings. */
.app-navbar .nav-link {
    display: flex;
    align-items: center;
    color: var(--ink-soft);
    font-weight: 600;
    padding: 0.4rem 0.75rem;
    border-radius: var(--radius-sm);
    transition: all 150ms var(--ease);
}

.app-navbar .nav-link:hover {
    color: var(--brand);
    background: var(--brand-light);
}

.app-navbar .nav-link.active {
    color: var(--brand);
    background: var(--brand-light);
}

/* The Settings item's <button> sits inside a <div class="dropdown"> wrapper (for
   the menu to anchor to) instead of being a direct flex child like its siblings -
   this just keeps that wrapper from affecting the button's own centering above. */
.app-navbar .dropdown {
    display: flex;
    align-items: center;
}

/* App-like bottom tab bar for mobile - this is what makes the dashboard feel
   like a native app instead of a shrunk desktop site on a phone. */
.app-bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    display: flex;
    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border-top: 1px solid var(--border);
    padding-bottom: env(safe-area-inset-bottom, 0px);
    box-shadow: 0 -8px 24px rgba(24, 20, 31, 0.06);
    z-index: 1030;
}

.app-bottom-nav__item {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 3px;
    padding: 8px 4px;
    min-height: var(--tc-bottom-nav-height);
    font-size: 0.7rem;
    font-weight: 600;
    color: var(--ink-faint);
    text-decoration: none;
    transition: color 150ms var(--ease), transform 150ms var(--ease);
}

.app-bottom-nav__item.active {
    color: var(--brand);
}

.app-bottom-nav__item:active {
    transform: scale(0.94);
}

.app-bottom-nav__icon {
    line-height: 1;
}

.app-bottom-nav__icon .icon {
    width: 22px;
    height: 22px;
    stroke-width: 1.8;
    vertical-align: 0;
}

/* Touch-friendly minimum tap target size across the dashboard */
.btn, .form-control, .app-bottom-nav__item, a.nav-link {
    min-height: 44px;
}

/* The 44px floor above is right for primary actions, but makes the small
   toolbar-style buttons/selects used everywhere (page headers, filter bars)
   look oversized on mobile - and since .form-select-sm was never included in
   that rule at all (only .form-control was), a "sm" <select> sitting next to
   "sm" buttons ended up visibly shorter than them. Giving all three "sm"
   variants one shared, smaller floor fixes both at once. */
.btn-sm, .form-control-sm, .form-select-sm {
    min-height: 34px;
}

/* ============================================================
   Rich text editor (Quill) - restyled to match the design system
   ============================================================ */
.rich-editor-mount .ql-toolbar.ql-snow {
    border: 1.5px solid var(--border);
    border-bottom: none;
    border-radius: var(--radius-sm) var(--radius-sm) 0 0;
    background: var(--bg-alt);
}

.rich-editor-mount .ql-container.ql-snow {
    border: 1.5px solid var(--border);
    border-radius: 0 0 var(--radius-sm) var(--radius-sm);
    font-family: var(--font-body);
    font-size: 0.95rem;
    min-height: 120px;
}

.rich-editor-mount .ql-editor { min-height: 120px; }

.rich-editor-mount .ql-snow.ql-toolbar button:hover,
.rich-editor-mount .ql-snow .ql-toolbar button:hover,
.rich-editor-mount .ql-snow.ql-toolbar button.ql-active,
.rich-editor-mount .ql-snow .ql-toolbar button.ql-active {
    color: var(--brand);
}

.rich-editor-mount .ql-snow.ql-toolbar button:hover .ql-stroke,
.rich-editor-mount .ql-snow.ql-toolbar button.ql-active .ql-stroke {
    stroke: var(--brand);
}

/* Read-only rendering of saved rich text (proposal PDF preview area, etc.) */
.rich-text-content { font-size: 0.95rem; line-height: 1.6; }
.rich-text-content p { margin-bottom: 0.5em; }
.rich-text-content ul, .rich-text-content ol { padding-left: 1.4em; margin-bottom: 0.5em; }

/* ============================================================
   Gallery photo grid overlay buttons
   ============================================================ */
.photo-item .position-relative::after {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 1;
    background: rgba(0, 0, 0, 0);
    transition: background-color 150ms var(--ease);
    pointer-events: none;
}

.photo-item:hover .position-relative::after {
    background: rgba(0, 0, 0, 0.18);
}

.photo-overlay-actions {
    z-index: 2;
}

.photo-overlay-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.92);
    color: var(--ink-soft);
    box-shadow: var(--shadow-sm);
    cursor: pointer;
    border: none;
    margin: 0;
    position: relative;
    transition: transform 150ms var(--ease), background-color 150ms var(--ease);
}

.photo-overlay-btn .icon {
    width: 14px;
    height: 14px;
}

.photo-overlay-btn:hover {
    background: #fff;
    transform: scale(1.08);
}

.photo-overlay-btn-danger:hover {
    color: var(--danger);
}

/* ============================================================
   Searchable dropdown (client / event-type autocomplete)
   ============================================================ */
/* Wrapper must tightly contain just the input (not the label) so 50%/translateY
   centers on the input itself regardless of label height or grid-column padding. */
.combobox-chevron {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--ink-faint);
    pointer-events: none;
}

.combobox-chevron .icon {
    width: 1rem;
    height: 1rem;
}

input[data-combobox] {
    padding-right: 34px;
}

.combobox-menu {
    position: absolute;
    left: 0;
    right: 0;
    top: 100%;
    z-index: 20;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    box-shadow: var(--shadow-md);
    margin-top: 4px;
    max-height: 220px;
    overflow-y: auto;
    padding: 6px;
}

.combobox-item {
    display: block;
    width: 100%;
    text-align: left;
    background: none;
    border: none;
    padding: 8px 10px;
    border-radius: var(--radius-sm);
    font-size: 0.9rem;
    color: var(--ink);
}

.combobox-item:hover, .combobox-item:focus {
    background: var(--brand-light);
    color: var(--brand-dark);
}

.combobox-item .combobox-item-sub {
    display: block;
    font-size: 0.78rem;
    color: var(--ink-faint);
}

.combobox-item-disabled {
    padding: 8px 10px;
    font-size: 0.85rem;
    color: var(--ink-faint);
    font-style: italic;
}

.stat-card {
    border-radius: var(--radius-md);
    border: 1px solid var(--border);
    background: var(--surface);
    padding: 1.25rem 1.5rem;
}

.stat-label {
    font-size: 0.78rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    color: var(--ink-faint);
}

.stat-card .stat-value,
.card .stat-value {
    font-family: var(--font-heading);
    font-size: 1.9rem;
    font-weight: 700;
    color: var(--ink);
}

.studio-avatar {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    flex-shrink: 0;
    border-radius: 50%;
    background: var(--brand-light);
    color: var(--brand-dark);
    font-weight: 700;
    font-size: 0.85rem;
}

/* ============================================================
   Admin shell (sidebar nav + content) - stacked vertically on desktop,
   collapses to a flat wrapped strip above the content on mobile so there's
   no JS-dependent toggle to get wrong without a browser to test it in.
   ============================================================ */
.admin-shell {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}
@media (min-width: 768px) {
    .admin-shell { flex-direction: row; }
}

.admin-sidebar {
    background: var(--ink);
    color: rgba(255, 255, 255, 0.75);
    flex-shrink: 0;
    padding: 1rem;
    display: flex;
    flex-direction: column;
}
@media (min-width: 768px) {
    .admin-sidebar {
        width: 240px;
        min-height: 100vh;
        position: sticky;
        top: 0;
        padding: 1.5rem 1rem;
    }
}

.admin-sidebar-brand {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    color: #fff;
    font-weight: 700;
    margin-bottom: 1rem;
}
.admin-sidebar-brand img {
    height: 1.9rem;
    width: auto;
    display: block;
    flex-shrink: 0;
}
.admin-sidebar-brand-text {
    display: flex;
    flex-direction: column;
    line-height: 1.15;
}
.admin-sidebar-brand-eyebrow {
    opacity: 0.55;
    font-size: 0.72rem;
    letter-spacing: 0.05em;
}

.admin-sidebar-nav {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    gap: 2px;
}
@media (min-width: 768px) {
    .admin-sidebar-nav {
        flex-direction: column;
        flex-wrap: nowrap;
        flex-grow: 1;
        overflow-y: auto;
    }
}

.admin-nav-group-label {
    width: 100%;
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: rgba(255, 255, 255, 0.4);
    margin: 1rem 0 0.35rem;
    padding: 0 0.6rem;
}
.admin-nav-group-label:first-child { margin-top: 0; }

.admin-nav-link {
    display: inline-block;
    padding: 0.45rem 0.6rem;
    border-radius: var(--radius-sm);
    color: rgba(255, 255, 255, 0.72);
    font-size: 0.9rem;
    text-decoration: none;
    transition: background 150ms var(--ease), color 150ms var(--ease);
}
@media (min-width: 768px) {
    .admin-nav-link { display: block; }
}
.admin-nav-link:hover { background: rgba(255, 255, 255, 0.08); color: #fff; }
.admin-nav-link.active { background: var(--brand); color: #fff; font-weight: 600; }

.admin-sidebar-footer {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid rgba(255, 255, 255, 0.12);
}
@media (min-width: 768px) {
    .admin-sidebar-footer { margin-top: auto; }
}
.admin-sidebar-user { margin-bottom: 0.6rem; font-size: 0.85rem; }
.admin-sidebar-user .fw-semibold { color: #fff; }
.admin-sidebar-user-email {
    color: rgba(255, 255, 255, 0.5);
    font-size: 0.78rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.admin-main { flex: 1; min-width: 0; }
.admin-content {
    padding: 1.5rem 1rem 3rem;
    max-width: 1240px;
    margin: 0 auto;
}
@media (min-width: 992px) {
    .admin-content { padding: 2rem 2rem 3rem; }
}

/* ============================================================
   Admin dashboard
   ============================================================ */
.stat-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    border-radius: var(--radius-sm);
    background: var(--brand-light);
    color: var(--brand-dark);
    margin-bottom: 0.6rem;
}
.stat-icon svg { width: 18px; height: 18px; }
.stat-sub {
    font-size: 0.8rem;
    color: var(--ink-faint);
    margin-top: 0.15rem;
}
.stat-card-attention {
    border-color: var(--accent);
    background: var(--accent-light);
}

.mix-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.85rem;
    color: var(--ink-soft);
    background: var(--bg-alt);
    border-radius: var(--radius-pill);
    padding: 0.35rem 0.75rem 0.35rem 0.5rem;
}

.bar-chart-row {
    display: grid;
    grid-template-columns: 110px 1fr minmax(90px, auto);
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 0.6rem;
}
.bar-chart-row:last-child { margin-bottom: 0; }
.bar-chart-label {
    font-size: 0.85rem;
    color: var(--ink-soft);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.bar-chart-track {
    background: var(--bg-alt);
    border-radius: var(--radius-pill);
    height: 10px;
    overflow: hidden;
}
.bar-chart-fill {
    height: 100%;
    background: var(--brand);
    border-radius: var(--radius-pill);
}
/* ============================================================
   Dashboard booking calendar + agenda
   ============================================================ */
.dashboard-calendar-grid {
    display: grid;
    grid-template-columns: 35% 65%;
    gap: 1rem;
    align-items: stretch;
}
@media (max-width: 767px) {
    .dashboard-calendar-grid {
        grid-template-columns: 1fr;
    }
}

/* Stretches the agenda list to fill exactly as much height as the calendar
   card next to it takes up, rather than a fixed max-height that leaves dead
   space (or clips) depending on how tall the calendar grid happens to be. */
.dashboard-agenda-body {
    display: flex;
    flex-direction: column;
}
.agenda-list {
    flex: 1 1 0;
    min-height: 0;
    overflow-y: auto;
}
.agenda-row {
    display: flex;
    align-items: flex-start;
    gap: 0.85rem;
    padding: 0.55rem 0.25rem;
    border-radius: var(--radius-sm);
    transition: background-color 150ms var(--ease);
}
.agenda-row:hover {
    background: var(--bg-alt);
}
.agenda-row-new-date {
    margin-top: 0.35rem;
    border-top: 1px solid var(--border);
    padding-top: 0.75rem;
}
.agenda-row-new-date:first-child {
    margin-top: 0;
    border-top: none;
    padding-top: 0.55rem;
}
.agenda-date {
    flex-shrink: 0;
    width: 84px;
    font-size: 0.78rem;
    font-weight: 700;
    color: var(--brand);
    line-height: 1.3;
    padding-top: 0.1rem;
}
.min-w-0 { min-width: 0; }

.calendar-nav-btn {
    padding: 0.3rem 0.55rem;
}
.calendar-nav-btn svg {
    transform: rotate(180deg);
}
.calendar-nav-next svg {
    transform: none;
}

.calendar-weekdays {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    text-align: center;
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    color: var(--ink-faint);
    margin-bottom: 0.4rem;
}

.calendar-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 4px;
}
.calendar-day-cell {
    aspect-ratio: 1;
    border-radius: var(--radius-sm);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 3px;
    font-size: 0.82rem;
    color: var(--ink);
    background: var(--bg-alt);
    position: relative;
}
.calendar-day-cell.is-other-month {
    background: transparent;
    color: var(--ink-faint);
}
.calendar-day-cell.is-today {
    box-shadow: inset 0 0 0 2px var(--brand);
    font-weight: 700;
}
.calendar-day-cell.has-events {
    cursor: pointer;
    background: var(--surface);
    box-shadow: 0 0 0 1px var(--border);
}
.calendar-day-cell.has-events:hover {
    box-shadow: 0 0 0 1px var(--brand);
}
.calendar-day-cell.is-today.has-events {
    box-shadow: inset 0 0 0 2px var(--brand);
}
.calendar-day-dots {
    display: flex;
    gap: 3px;
    height: 6px;
}
.calendar-day-dot,
.calendar-legend-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    display: inline-block;
}
.calendar-legend-dot {
    width: 8px;
    height: 8px;
}
.calendar-day-popover-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    max-width: 220px;
}

.bar-chart-value {
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--ink);
    text-align: right;
    white-space: nowrap;
}

.engagement-row {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 0.75rem;
    padding: 0.6rem 0;
    border-bottom: 1px solid var(--border);
    font-size: 0.9rem;
    color: var(--ink-soft);
}
.engagement-row:last-child { border-bottom: none; padding-bottom: 0; }
.engagement-row svg { width: 15px; height: 15px; margin-right: 0.35rem; vertical-align: -2px; }
.engagement-row strong { color: var(--ink); }

@media only screen and (max-width: 600px) {
    .h2, h2 { font-size: 22px; }
    .h6, h6 { font-size: 14px; }
}
