/* ═══════════════════════════════════════════════════════════════
   SALON AT EASE — WEB THEME
   Structural + component CSS for the desktop admin experience.

   Design language ported from the LiquorPOS MVC admin reference
   (dark sidebar, sticky topbar, grid-based "table-like" row lists,
   custom modal/toast chrome, clamp()-based fluid spacing) — but
   built as Blazor/MudBlazor component overrides, not cshtml/jQuery.

   Palette: reuses the EXACT --color-* tokens already defined in
   app.css (shared with Mobile) as the single source of truth.
   This file only adds:
     1. Structural tokens the web shell needs that Mobile doesn't
        (sidebar width, topbar height).
     2. The "se-" component system (panel/row/pager/modal/toast/
        empty-state) — a project-neutral prefix, not borrowed
        from LiquorPOS's "lp-" naming.
     3. MudBlazor structural overrides so Mud's default Material
        chrome never shows through — every visual detail is ours.

   Load order: app.css (tokens + legacy mobile component classes)
   must load BEFORE this file. See index.html.
   ═══════════════════════════════════════════════════════════════ */

/* ─────────────────────────────────────────
   0. STRUCTURAL TOKENS (web-shell only)
───────────────────────────────────────── */
:root {
    --shell-sidebar-w: 240px;
    --shell-sidebar-w-collapsed: 76px;
    --shell-topbar-h: clamp(56px, 5vw, 68px);
    /* Content width ceiling — keeps panels from bleeding edge-to-edge
       on ultrawide monitors while still being fluid on laptops. */
    --shell-content-max: clamp(960px, 92vw, 1600px);
    /* .se-content's own bottom padding — named so .se-page-footer can
       cancel it out exactly (see that rule for why). */
    --se-content-pb: clamp(28px, 3vw, 44px);
    /* Standard transition timing — every hover/focus/color change in the
       app uses this ONE value. Previously drifted between .12s/.13s
       across components (audit finding — fixed here, not per-component). */
    --t-fast: 150ms ease;
    /* Spacing scale — panel headers, list rows, form gaps all draw from
       this instead of ad hoc px values per page (previously drifted
       between 14px/16px/18px/20px/22px with no rule). */
    --sp-1: 4px;
    --sp-2: 8px;
    --sp-3: 12px;
    --sp-4: 16px;
    --sp-5: 20px;
    --sp-6: 24px;
    --dtext-xs: clamp(11px, 0.75vw, 12px);
    --dtext-sm: clamp(12.5px, 0.85vw, 13.5px);
    --dtext-base: clamp(13.5px, 0.95vw, 14.5px);
    --dtext-md: clamp(15px, 1.05vw, 16.5px);
    --dtext-lg: clamp(17px, 1.2vw, 19px);
    --dtext-xl: clamp(20px, 1.5vw, 23px);
    --dtext-2xl: clamp(24px, 1.9vw, 28px);
}

/* ─────────────────────────────────────────
   1. APP SHELL  (sidebar + topbar + content)
───────────────────────────────────────── */
.se-shell {
    display: flex;
    height: 100vh;
    overflow: hidden;
    background: var(--color-bg-app);
}

/* ── Sidebar ── */
.se-sidebar {
    width: var(--shell-sidebar-w);
    flex-shrink: 0;
    background: var(--color-primary-deeper);
    display: flex;
    flex-direction: column;
    position: sticky;
    top: 0;
    height: 100vh;
    overflow-y: auto;
    scrollbar-width: none;
    z-index: 100;
}

    .se-sidebar::-webkit-scrollbar {
        display: none;
    }

.se-sidebar-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 20px 20px 18px;
    border-bottom: 1px solid rgba(255,255,255,0.08);
    flex-shrink: 0;
}

.se-sidebar-brand-name {
    font-size: var(--dtext-md);
    font-weight: 800;
    color: #fff;
    letter-spacing: -0.2px;
}

.se-sidebar-brand-sub {
    font-size: var(--dtext-xs);
    color: var(--color-gold-light);
    font-weight: 500;
    display: block;
    margin-top: 2px;
}

.se-sidebar-nav {
    flex: 1;
    padding: 14px 12px;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.se-sidebar-section-label {
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.6px;
    text-transform: uppercase;
    color: rgba(255,255,255,0.32);
    padding: 12px 10px 6px;
}

.se-sidebar-divider {
    height: 1px;
    background: rgba(255,255,255,0.08);
    margin: 8px 4px;
}

/* NavLink active-state convention: exact match only for /dashboard
   (it's a prefix of nothing else); every other top-level route uses
   prefix match so sub-routes (e.g. /customers/42, /services/new)
   keep the parent link highlighted. Applied via Match= param on the
   MudNavLink itself in AppShellLayout — this class only styles it. */
.se-sidebar-link {
    display: flex;
    align-items: center;
    gap: 11px;
    padding: 10px 12px;
    border-radius: var(--radius-sm);
    font-size: var(--dtext-sm);
    font-weight: 500;
    color: rgba(255,255,255,0.82);
    text-decoration: none;
    transition: background var(--t-fast), color var(--t-fast);
    white-space: nowrap;
}

    .se-sidebar-link:hover {
        background: rgba(255,255,255,0.08);
        color: #fff;
    }

    .se-sidebar-link:focus-visible {
        outline: 2px solid var(--color-gold);
        outline-offset: -2px;
    }

    .se-sidebar-link.active {
        background: var(--color-primary-dark);
        color: #fff;
        font-weight: 600;
    }

    .se-sidebar-link .material-symbols-rounded {
        font-size: 19px;
        opacity: .85;
        flex-shrink: 0;
    }

    .se-sidebar-link.active .material-symbols-rounded {
        opacity: 1;
    }

.se-sidebar-footer {
    flex-shrink: 0;
    padding: 12px;
    border-top: 1px solid rgba(255,255,255,0.08);
}

.se-sidebar-user {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 10px;
    border-radius: var(--radius-sm);
}

.se-sidebar-user-avatar {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: var(--color-gold-dark);
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.se-sidebar-user-info {
    flex: 1;
    min-width: 0;
}

.se-sidebar-user-name {
    display: block;
    font-size: var(--dtext-sm);
    font-weight: 600;
    color: rgba(255,255,255,0.8);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.se-sidebar-user-role {
    font-size: 10.5px;
    color: rgba(255,255,255,0.4);
}

.se-sidebar-logout-btn {
    background: none;
    border: none;
    color: rgba(255,255,255,0.4);
    cursor: pointer;
    padding: 7px;
    border-radius: var(--radius-sm);
    font-size: 15px;
    line-height: 1;
    flex-shrink: 0;
    transition: color var(--t-fast), background var(--t-fast);
}

    .se-sidebar-logout-btn:hover {
        color: rgba(255,255,255,0.9);
        background: rgba(255,255,255,0.09);
    }

/* ─────────────────────────────────────────
   1b. RESPONSIVE SIDEBAR — three states
   >=960px  : full sidebar (240px, icons + labels) — default above
   640-959px: icon rail (~64px, icons only, native title tooltip)
   <640px   : hidden by default, hamburger toggle in topbar opens it
              as an overlay with a backdrop
───────────────────────────────────────── */
.se-hamburger-btn {
    display: none; /* only shown <640px */
    background: none;
    border: none;
    color: var(--color-text-soft);
    cursor: pointer;
    padding: 6px;
    border-radius: var(--radius-sm);
    margin-right: var(--sp-2);
}

    .se-hamburger-btn:hover {
        background: var(--color-bg-muted);
    }

    .se-hamburger-btn .material-symbols-rounded {
        font-size: 22px;
    }

.se-sidebar-backdrop {
    display: none;
}

/* ── Icon rail (640px–959px) ── */
@media (max-width: 959px) and (min-width: 640px) {
    .se-sidebar {
        width: 64px;
    }

    .se-sidebar-brand-sub,
    .se-sidebar-section-label,
    .se-sidebar-link-label,
    .se-sidebar-user-info,
    .se-sidebar-logout-btn {
        display: none;
    }

    .se-sidebar-brand {
        justify-content: center;
        padding: 18px 8px;
    }

        .se-sidebar-brand > div {
            display: none;
        }
        /* hide name+sub text block */
        .se-sidebar-brand::before {
            content: 'content_cut';
            font-family: 'Material Symbols Rounded';
            font-size: 22px;
            color: var(--color-gold);
        }

    .se-sidebar-link {
        justify-content: center;
        padding: 12px 8px;
    }

        .se-sidebar-link .material-symbols-rounded {
            font-size: 21px;
        }

    .se-sidebar-user {
        justify-content: center;
        padding: 8px;
    }

    .se-sidebar-divider {
        margin: 8px 14px;
    }
}

/* ── Overlay drawer (<640px) ── */
@media (max-width: 639px) {
    .se-hamburger-btn {
        display: inline-flex;
        align-items: center;
        justify-content: center;
    }

    .se-sidebar {
        position: fixed;
        top: 0;
        left: 0;
        width: 260px;
        transform: translateX(-100%);
        transition: transform 220ms ease;
        z-index: 200;
        box-shadow: var(--shadow-lg);
    }

        .se-sidebar.se-sidebar-open {
            transform: translateX(0);
        }

    .se-sidebar-backdrop {
        display: block;
        position: fixed;
        inset: 0;
        background: rgba(26, 36, 16, 0.45);
        z-index: 190;
        animation: se-fade-in 180ms ease;
    }

    @keyframes se-fade-in {
        from {
            opacity: 0;
        }

        to {
            opacity: 1;
        }
    }

    .se-content {
        padding-left: var(--sp-4);
        padding-right: var(--sp-4);
    }
}

/* ── Main column ── */
.se-main {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-width: 0;
    height: 100vh;
    overflow: hidden;
}

.se-topbar {
    display: flex;
    align-items: center;
    gap: 16px;
    height: var(--shell-topbar-h);
    padding: 0 clamp(20px, 2.2vw, 32px);
    background: var(--color-bg-card);
    border-bottom: 1px solid var(--color-border);
    flex-shrink: 0;
    z-index: 50;
}

.se-page-title {
    font-size: var(--dtext-lg);
    font-weight: 700;
    color: var(--color-text);
    letter-spacing: -0.2px;
    margin: 0;
    flex: 1;
}

.se-topbar-right {
    display: flex;
    align-items: center;
    gap: 14px;
}

.se-topbar-date {
    font-size: var(--dtext-xs);
    color: var(--color-text-muted);
    font-weight: 500;
}

/* THE fix for "nothing scrolls" — this is the one scrollable region for
   every page by default (forms, detail pages, anything not using the
   list-page pattern below). Previously had no overflow rule at all,
   while html/body (shared with Mobile) sets overflow:hidden — so content
   taller than the viewport was just silently clipped, not scrollable. */
.se-content {
    flex: 1;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    min-height: 0;
    padding: clamp(18px, 2.4vw, 28px) clamp(18px, 2.4vw, 32px) var(--se-content-pb);
    max-width: var(--shell-content-max);
    width: 100%;
    margin: 0 auto;
}

/* ── List-page pattern: topbar + toolbar + column-head + pager all stay
   pinned; only the row list itself scrolls (matches the LiquorPOS
   reference — search/filters/actions in one toolbar row, pager anchored
   to the bottom of the panel, list body is the only scrolling part). ── */
.se-list-page {
    display: flex;
    flex-direction: column;
    flex: 1;
    min-height: 0;
    gap: var(--sp-4);
}

.se-toolbar {
    display: flex;
    align-items: center;
    gap: var(--sp-3);
    flex-wrap: wrap;
    background: var(--color-bg-card);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    padding: var(--sp-3) var(--sp-4);
    flex-shrink: 0;
}

.se-toolbar-search {
    position: relative;
    flex: 1 1 260px;
    max-width: 360px;
}

    .se-toolbar-search input {
        width: 100%;
        padding: 9px 12px 9px 36px;
        border: 1px solid var(--color-border);
        border-radius: var(--radius-sm);
        background: var(--color-bg-input);
        font-size: var(--dtext-sm);
        color: var(--color-text);
    }

    .se-toolbar-search .material-symbols-rounded {
        position: absolute;
        left: 11px;
        top: 50%;
        transform: translateY(-50%);
        font-size: 18px;
        color: var(--color-text-muted);
    }

.se-toolbar-filters {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    flex: 1;
}

.se-toolbar-spacer {
    flex: 1;
}

/* ── Filter trigger + active chips (LiquorPOS's actual pattern — a
   drawer, not inline chips cluttering the toolbar) ── */
.se-filter-trigger {
    position: relative;
}

.se-filter-badge {
    position: absolute;
    top: -6px;
    right: -6px;
    background: var(--color-primary);
    color: #fff;
    font-size: 10px;
    font-weight: 700;
    min-width: 16px;
    height: 16px;
    border-radius: 999px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 3px;
}

.se-filter-chip {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 5px 6px 5px 12px;
    border-radius: var(--radius-full);
    background: var(--color-bg-card-alt);
    border: 1px solid var(--color-primary-light);
    color: var(--color-primary-dark);
    font-size: var(--dtext-xs);
    font-weight: 600;
}

    .se-filter-chip button {
        background: none;
        border: none;
        color: var(--color-primary-dark);
        cursor: pointer;
        display: flex;
        align-items: center;
        padding: 2px;
        border-radius: 50%;
    }

        .se-filter-chip button:hover {
            background: rgba(74,103,65,0.15);
        }

/* ── Filter drawer (SeFilterDrawer → MudDrawer override) ──
   Class="se-filter-drawer" on <MudDrawer> applies directly to the same
   element MudBlazor renders as .mud-drawer — NOT a parent of it. The
   previous ".se-filter-drawer .mud-drawer" was a descendant selector
   that never matched anything, so none of these overrides were ever
   applying — the drawer was rendering as MudBlazor's raw default,
   which inherited the dark DrawerBackground (#2C3A1E) set for the
   sidebar theme. That's the "black text on dark olive" bug. Fixed:
   selector corrected, background/text explicitly forced so the theme
   leak can't happen again regardless of Mud's own palette. */
.se-filter-drawer.mud-drawer {
    box-shadow: var(--shadow-lg);
    background: var(--color-bg-card) !important;
    color: var(--color-text) !important;
}

.se-filter-drawer-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: var(--sp-4) var(--sp-5);
    border-bottom: 1px solid var(--color-border-light);
    background: var(--color-bg-card);
}

.se-filter-drawer-title {
    font-size: var(--dtext-md);
    font-weight: 700;
    color: var(--color-text);
}

.se-filter-drawer-body {
    padding: var(--sp-5);
    display: flex;
    flex-direction: column;
    gap: var(--sp-5);
    overflow-y: auto;
    flex: 1;
    background: var(--color-bg-card);
}

.se-filter-drawer-section-label {
    font-size: var(--dtext-xs);
    font-weight: 700;
    color: var(--color-text-soft);
    margin-bottom: var(--sp-2);
    display: block;
}

.se-filter-drawer-options {
    display: flex;
    flex-direction: column;
    gap: 4px;
    width: 100%;
}

.se-filter-option {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    border-radius: var(--radius-sm);
    cursor: pointer;
    font-size: var(--dtext-sm);
    color: var(--color-text);
    text-align: left;
    background: var(--color-bg-card);
    border: 1px solid transparent;
    width: 100%;
    box-sizing: border-box;
}

    .se-filter-option:hover {
        background: var(--color-bg-muted);
    }

    .se-filter-option.active {
        background: var(--color-bg-card-alt);
        border-color: var(--color-primary-light);
        color: var(--color-primary-dark);
        font-weight: 600;
    }

    .se-filter-option .material-symbols-rounded {
        font-size: 18px;
        color: var(--color-primary);
        visibility: hidden;
        flex-shrink: 0;
    }

    .se-filter-option.active .material-symbols-rounded {
        visibility: visible;
    }

.se-filter-drawer-footer {
    display: flex;
    gap: 10px;
    padding: var(--sp-4) var(--sp-5);
    border-top: 1px solid var(--color-border-light);
    flex-shrink: 0;
    background: var(--color-bg-card);
}

    .se-filter-drawer-footer button {
        white-space: nowrap;
        padding-left: 10px;
        padding-right: 10px;
    }

/* .se-list-panel is the CARD: border, radius, shadow, corner-clipping.
   It does NOT scroll itself anymore (see history below) — scrolling is
   owned entirely by .se-list-scroll inside it, so nothing can visually
   spill past this card's rounded corners regardless of content width. */
.se-list-panel {
    display: flex;
    flex-direction: column;
    flex: 1;
    min-height: 0;
    background: var(--color-bg-card);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    overflow: hidden;
}

/* PAST BUG this replaces: .se-list-panel had overflow-x:auto while its
   child .se-list only set overflow-y:auto (no overflow-x). Per the CSS
   overflow spec, setting one axis and leaving the other 'visible' forces
   the browser to silently promote the untouched axis to 'auto' as well —
   so .se-list became its OWN independent horizontal scroll container,
   separate from the panel. Column head + pager scrolled with the panel;
   rows scrolled on their own — two scrollbars, header/rows could drift
   out of alignment, and rows could render outside the card's rounded
   corners. Fix: ONE shared scroll region (.se-list-scroll, both axes)
   wraps header+rows together; the header pins via position:sticky
   instead of a second flex/scroll region, so it can never desync from
   the rows scrolling horizontally beneath it. */
.se-list-scroll {
    display: flex;
    flex-direction: column;
    flex: 1;
    min-height: 0;
    min-width: 0;
    overflow: auto;
}

.se-list-panel .se-col-head {
    position: sticky;
    top: 0;
    z-index: 2;
}

/* Restores what .se-list used to get for free when it was a direct
       flex-item of .se-list-panel: without this, .se-list-scroll being a
       flex container isn't enough on its own — .se-list itself also needs
       to be told to grow, otherwise it just sizes to its own content
       (height:auto) and the empty-state/skeleton flex:1 below has nothing
       to grow into, rendering small and top-aligned instead of filling
       the card. */
.se-list-panel .se-list {
    flex: 1;
    min-height: 0;
}

.se-list-panel .se-pager {
    flex-shrink: 0;
}

.se-list-panel .se-empty,
.se-list-panel .se-skel-row:first-child {
    flex: 1;
}

/* ─────────────────────────────────────────
   2. CARD / GRID DISCIPLINE
   Two named grid behaviors so every page picks one deliberately
   instead of defaulting to a stretchy 1fr grid.
───────────────────────────────────────── */

/* Compact: cards take their natural width; row gains breathing room
   on wide screens instead of stretching cards. Use for stat/summary
   cards, quick-action buttons — anything where content is fixed-size. */
.se-grid-compact {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 220px));
    gap: clamp(12px, 1.2vw, 18px);
    justify-content: start;
}

/* Fill: content genuinely benefits from filling available width
   (e.g. a horizontal row-list, a full-bleed panel). */
.se-grid-fill {
    display: grid;
    grid-template-columns: 1fr;
    gap: clamp(10px, 1vw, 14px);
}

/* ─────────────────────────────────────────
   3. PANEL / ROW LIST SYSTEM
   (LiquorPOS's .lp-panel/.lp-row equivalent — CSS grid rows that
   read like a table but style like cards: badges, icon buttons,
   hover-lift, all free-form per cell.)
───────────────────────────────────────── */
.se-panel {
    background: var(--color-bg-card);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    overflow: hidden;
}

/* Page-content section label — groups loose content (stat rows, action
   toolbars) that isn't already inside a titled .se-panel. Same visual
   language as .se-sidebar-section-label but on light backgrounds — that
   one is white-on-dark and sidebar-only, this is text-on-app-bg. */
.se-section-label {
    font-size: 11px;
    font-weight: 700;
    letter-spacing: .5px;
    text-transform: uppercase;
    color: var(--color-text-muted);
    margin-bottom: var(--sp-2);
}

/* Clickable panel variant — stat cards, PO/purchase-order banner, any
   .se-panel that acts as a button. Was previously done ad hoc per page
   with inline cursor:pointer and zero hover feedback (audit finding). */
.se-panel-clickable {
    cursor: pointer;
    transition: box-shadow var(--t-fast), transform var(--t-fast);
}

    .se-panel-clickable:hover {
        box-shadow: var(--shadow-md);
        transform: translateY(-1px);
    }

    .se-panel-clickable:focus-visible {
        outline: 2px solid var(--color-primary);
        outline-offset: 2px;
    }

/* Stat card — icon + big number + label. Replaces the inline-styled
   divs previously hand-rolled per page (Dashboard, Inventory). */
.se-stat-card {
    padding: var(--sp-4);
}

.se-stat-icon {
    font-size: 22px;
}

.se-stat-value {
    font-size: var(--dtext-2xl);
    font-weight: 800;
    margin-top: var(--sp-2);
    line-height: 1.1;
}

.se-stat-label {
    font-size: var(--dtext-xs);
    color: var(--color-text-muted);
    margin-top: 2px;
}

.se-panel-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--sp-3);
    padding: var(--sp-4) var(--sp-5);
    border-bottom: 1px solid var(--color-border-light);
}

.se-panel-title {
    font-size: var(--dtext-md);
    font-weight: 700;
    color: var(--color-text);
}

/* Column-head row: sits above the list, defines the grid template
   the rows below must match exactly (set --se-cols on both). */
.se-col-head {
    display: grid;
    grid-template-columns: var(--se-cols, 1fr);
    justify-content: center;
    justify-content: safe center;
    gap: 12px;
    padding: 10px calc(clamp(16px, 1.6vw, 22px) + 10px);
    background: var(--color-bg-muted);
    border-bottom: 1px solid var(--color-border-light);
    font-size: 10.5px;
    font-weight: 700;
    letter-spacing: .4px;
    text-transform: uppercase;
    color: var(--color-text-muted);
}

/* Row list — each row is its OWN card (background, radius, border,
   shadow, hover-lift), separated by a small gap, matching LiquorPOS's
   actual .lp-row/.lp-list (verified directly in their CSS — comment
   there literally says "ROW CARD"). Earlier version had rows flush
   against each other divided only by border-bottom, which is NOT what
   the reference does — corrected here. */
.se-list {
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding: 8px 10px;
}

.se-row {
    display: grid;
    grid-template-columns: var(--se-cols, 1fr);
    justify-content: center;
    justify-content: safe center;
    gap: 12px;
    align-items: center;
    padding: clamp(12px, 1.2vw, 16px) clamp(16px, 1.6vw, 22px);
    background: var(--color-bg-card);
    border: 1px solid var(--color-border-light);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-xs);
    font-size: var(--dtext-base);
    color: var(--color-text);
    transition: box-shadow var(--t-fast), transform var(--t-fast);
    cursor: pointer;
}

    .se-row:hover {
        box-shadow: var(--shadow-md);
        transform: translateY(-1px);
    }

    .se-row:focus-visible {
        outline: 2px solid var(--color-primary);
        outline-offset: -2px;
    }

.se-row-primary {
    font-weight: 600;
    color: var(--color-text);
}

.se-row-muted {
    color: var(--color-text-muted);
    font-size: var(--dtext-sm);
    font-weight: 500;
}

.se-row-amount {
    font-weight: 700;
    font-variant-numeric: tabular-nums;
}

.se-row-actions {
    display: flex;
    gap: 6px;
    justify-content: flex-end;
}

/* ── Responsive fallback: below this width, fixed-column .se-row grids
   (e.g. "1.4fr 1fr 1.6fr 1.2fr 110px 100px") would crush or truncate —
   there was no fallback for this before (audit finding). Rows become
   wrapping cards instead: each cell keeps its natural width and wraps
   to the next line rather than being forced into a shrinking track. ── */
@media (max-width: 960px) {
    .se-col-head {
        display: none;
    }
    /* column labels are meaningless once cells wrap/stack */

    .se-row {
        grid-template-columns: unset !important;
        display: flex;
        flex-wrap: wrap;
        row-gap: 6px;
        column-gap: var(--sp-4);
        padding: var(--sp-4);
    }

        .se-row > * {
            flex: 1 1 auto;
            min-width: 120px;
        }

    .se-row-primary {
        flex-basis: 100%;
    }
    /* name/title always gets its own full-width line */
    .se-row-actions {
        flex-basis: 100%;
        justify-content: flex-start;
        margin-top: 4px;
    }

    .se-row-amount {
        text-align: left !important;
        margin-left: auto;
    }

    .se-row-rich {
        align-items: flex-start;
    }

        .se-row-rich > * {
            flex-basis: 45%;
        }

        .se-row-rich .se-row-cell-stack:first-child {
            flex-basis: 100%;
        }

    .se-skel-row {
        grid-template-columns: unset !important;
        display: flex;
        flex-wrap: wrap;
        gap: var(--sp-2);
    }

        .se-skel-row .se-skel {
            flex: 1 1 auto;
            min-width: 90px;
        }
}

/* ── Row-list variant for richer / non-tabular content
   (Dashboard "Upcoming", Appointment cards) — two-line cell support,
   icon-prefixed secondary line, still grid-aligned like .se-row. ── */
.se-row-rich {
    align-items: start;
}

    .se-row-rich .se-row-cell-stack {
        display: flex;
        flex-direction: column;
        gap: 2px;
    }

        /* The time-range line (e.g. "10:00 AM – 10:30 AM") must never wrap
           mid-text — a wrapped time reads as broken, not "handled". This
           makes it structurally impossible regardless of how narrow the
           Time column gets: it either fits on one line, or the column's
           own minPx (set generously enough for the longest real value)
           keeps it from being squeezed that far in the first place. */
        .se-row-rich .se-row-cell-stack > span:first-child {
            white-space: nowrap;
        }

    .se-row-rich .se-row-cell-line {
        display: flex;
        align-items: center;
        gap: 6px;
        font-size: var(--dtext-sm);
        color: var(--color-text-soft);
    }

        .se-row-rich .se-row-cell-line .material-symbols-rounded {
            font-size: 15px;
            color: var(--color-text-muted);
        }

/* ── Badges ── */
.se-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 3px 10px;
    border-radius: var(--radius-full);
    font-size: 11px;
    font-weight: 700;
    white-space: nowrap;
}

.se-badge-scheduled {
    color: var(--color-scheduled);
    background: var(--color-scheduled-bg);
}

.se-badge-inprogress {
    color: var(--color-inprogress);
    background: var(--color-inprogress-bg);
}

.se-badge-completed {
    color: var(--color-completed);
    background: var(--color-completed-bg);
}

.se-badge-cancelled {
    color: var(--color-cancelled);
    background: var(--color-cancelled-bg);
}

.se-badge-noshow {
    color: var(--color-noshow);
    background: var(--color-noshow-bg);
}

.se-badge-paid {
    color: var(--color-paid);
    background: var(--color-paid-bg);
}

.se-badge-unpaid {
    color: var(--color-unpaid);
    background: var(--color-unpaid-bg);
}

.se-badge-partial {
    color: var(--color-partial);
    background: var(--color-partial-bg);
}

.se-badge-draft {
    color: var(--color-text-muted);
    background: var(--color-bg-muted);
}

/* ── Icon buttons inside rows (view/edit/cancel) ── */
.se-icon-btn {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 6px 11px;
    border-radius: var(--radius-sm);
    font-size: var(--dtext-xs);
    font-weight: 600;
    border: 1px solid var(--color-border);
    background: var(--color-bg-card);
    color: var(--color-text-soft);
    cursor: pointer;
    box-shadow: var(--shadow-xs);
    transition: background var(--t-fast), border-color var(--t-fast), color var(--t-fast), box-shadow var(--t-fast), transform var(--t-fast);
    text-decoration: none;
}

    .se-icon-btn:hover {
        background: var(--color-bg-muted);
        box-shadow: var(--shadow-sm);
        transform: translateY(-1px);
    }

    .se-icon-btn:active {
        transform: translateY(0);
        box-shadow: var(--shadow-xs);
    }

    .se-icon-btn:focus-visible {
        outline: 2px solid var(--color-primary);
        outline-offset: 1px;
    }

.se-icon-btn-primary {
    border-color: var(--color-primary);
    color: var(--color-primary-dark);
}

    .se-icon-btn-primary:hover {
        background: var(--color-bg-card-alt);
    }

.se-icon-btn-danger {
    border-color: var(--color-cancelled);
    color: var(--color-cancelled);
}

    .se-icon-btn-danger:hover {
        background: var(--color-cancelled-bg);
    }

/* ─────────────────────────────────────────
   4. PAGER  (SePager component target)
───────────────────────────────────────── */
.se-pager {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 12px clamp(16px, 1.6vw, 22px);
    border-top: 1px solid var(--color-border-light);
    flex-wrap: wrap;
}

.se-pager-size {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: var(--dtext-sm);
    color: var(--color-text-soft);
}

    .se-pager-size select {
        border: 1px solid var(--color-border);
        border-radius: var(--radius-sm);
        padding: 4px 8px;
        font-size: var(--dtext-sm);
        background: var(--color-bg-input);
        color: var(--color-text);
    }

.se-pager-buttons {
    display: flex;
    align-items: center;
    gap: 4px;
}

.se-pager-btn {
    min-width: 30px;
    height: 30px;
    padding: 0 8px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--color-border);
    background: var(--color-bg-card);
    border-radius: var(--radius-sm);
    font-size: var(--dtext-sm);
    font-weight: 600;
    color: var(--color-text-soft);
    cursor: pointer;
    transition: background var(--t-fast), color var(--t-fast);
}

    .se-pager-btn:hover:not(:disabled) {
        background: var(--color-bg-muted);
    }

    .se-pager-btn:disabled {
        opacity: .4;
        cursor: default;
    }

    .se-pager-btn.active {
        background: var(--color-primary);
        border-color: var(--color-primary);
        color: #fff;
    }

.se-pager-ellipsis {
    border: none;
    background: none;
    cursor: default;
}

.se-pager-info {
    font-size: var(--dtext-sm);
    color: var(--color-text-muted);
    white-space: nowrap;
}

/* ─────────────────────────────────────────
   5. MODAL  (SeModal → MudDialog override target)
───────────────────────────────────────── */
.se-modal .mud-dialog {
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    max-width: 480px;
}

.se-modal-header {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    padding: 20px 22px 16px;
    border-bottom: 1px solid var(--color-border-light);
}

.se-modal-icon {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    background: var(--color-cancelled-bg);
    color: var(--color-cancelled);
    font-size: 19px;
}

    .se-modal-icon.se-modal-icon-info {
        background: var(--color-scheduled-bg);
        color: var(--color-scheduled);
    }

.se-modal-title {
    font-size: var(--dtext-md);
    font-weight: 700;
    color: var(--color-text);
}

.se-modal-subtitle {
    font-size: var(--dtext-sm);
    color: var(--color-text-muted);
    margin-top: 2px;
}

.se-modal-body {
    padding: 18px 22px;
}

/* Large-panel variant (Manage Schedule, Manage Staff) — sized via
   DialogOptions.MaxWidth on the caller's ShowAsync call; this handles
   the internal scroll/tabs/no-icon layout differences from the small
   confirm-dialog mode. */
.se-modal-lg .mud-dialog {
    max-width: none;
    max-height: 85vh;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

/* MudBlazor's own .mud-dialog-content wrapper sits between .mud-dialog
   and our content — its stock overflow/padding behavior isn't something
   we control or have verified against this MudBlazor version. Neutralize
   it explicitly rather than assume it cooperates with our flex/scroll
   chain: force it to participate as a flex child (flex:1, min-height:0)
   with no padding/overflow of its own, since our own .se-modal-header/
   .se-modal-body already carry the real padding. */
.se-modal-lg .mud-dialog-content {
    flex: 1;
    min-height: 0;
    overflow: hidden;
    padding: 0 !important;
    display: flex;
    flex-direction: column;
}

.se-modal-lg .se-modal-header {
    flex-shrink: 0;
    align-items: center;
}

.se-modal-tabs {
    flex-shrink: 0;
    border-bottom: 1px solid var(--color-border-light);
    padding: 0 22px;
}

/* Chip-style tab switcher used inside .se-modal-tabs (e.g. Manage Schedule's
   Weekly Hours / Time Off). Plain buttons, not MudTabs — avoids fighting
   Mud's own focus/ripple/active color behavior on the tab label text. */
.se-schedule-tabs {
    display: flex;
    gap: var(--sp-2);
    padding: var(--sp-2) 0;
}

.se-schedule-tab {
    flex: 1;
    padding: var(--sp-2) var(--sp-3);
    border: none;
    background: transparent;
    border-radius: var(--radius-sm);
    font-size: var(--dtext-xs);
    font-weight: 700;
    color: var(--color-text-muted);
    cursor: pointer;
    transition: background var(--t-fast), color var(--t-fast);
}

    .se-schedule-tab:hover {
        background: var(--color-border-light);
    }

    .se-schedule-tab.active {
        background: var(--color-primary);
        color: #fff;
    }

        .se-schedule-tab.active:hover {
            background: var(--color-primary);
        }

.se-modal-body-scroll {
    flex: 1;
    overflow-y: auto;
    min-height: 0;
}

.se-modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    padding: 14px 22px 20px;
}

.se-modal-btn-ghost {
    padding: 9px 18px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--color-border);
    background: var(--color-bg-card);
    color: var(--color-text-soft);
    font-weight: 600;
    font-size: var(--dtext-sm);
    cursor: pointer;
}

    .se-modal-btn-ghost:hover {
        background: var(--color-bg-muted);
    }

.se-modal-btn-danger {
    padding: 9px 18px;
    border-radius: var(--radius-sm);
    border: none;
    background: var(--color-cancelled);
    color: #fff;
    font-weight: 600;
    font-size: var(--dtext-sm);
    cursor: pointer;
}

    .se-modal-btn-danger:hover {
        filter: brightness(0.93);
    }

.se-modal-btn-primary {
    padding: 9px 18px;
    border-radius: var(--radius-sm);
    border: none;
    background: var(--color-primary);
    color: #fff;
    font-weight: 600;
    font-size: var(--dtext-sm);
    cursor: pointer;
}

    .se-modal-btn-primary:hover {
        filter: brightness(0.95);
    }

    .se-modal-btn-primary:disabled,
    .se-modal-btn-danger:disabled {
        opacity: .6;
        cursor: default;
    }

/* Scoped modifier for the Quick Add Client/Service/Category dialogs only
   (see SeModal's ExtraClass parameter) — wider dialog and roomier spacing
   without touching .se-modal/.se-form-col defaults used elsewhere (e.g.
   SeFilterDrawer, and .se-form-col on the various New*Page forms). */
.se-modal-quickadd .mud-dialog {
    max-width: 560px;
}

.se-modal-quickadd .se-modal-header {
    padding: 26px 30px 20px;
}

.se-modal-quickadd .se-modal-body {
    padding: 24px 30px;
}

.se-modal-quickadd .se-modal-footer {
    padding: 18px 30px 26px;
}

.se-modal-quickadd .se-form-col {
    gap: 18px;
}

/* ─────────────────────────────────────────
   6. TOAST  (ISnackbar visual target)
   MudBlazor v6 doesn't expose a global "apply this CSS class to every
   snackbar" hook, so this targets .mud-snackbar directly — applies to
   every toast app-wide, which is what we want: one consistent toast
   style, not a per-page choice.
───────────────────────────────────────── */
.mud-snackbar {
    border-radius: var(--radius-md) !important;
    box-shadow: var(--shadow-md) !important;
    font-size: var(--dtext-sm) !important;
    font-weight: 500 !important;
}

/* ─────────────────────────────────────────
   7. EMPTY STATE  (SeEmptyState component)
───────────────────────────────────────── */
.se-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: clamp(36px, 5vw, 56px) 24px;
    gap: 6px;
}

.se-empty-icon {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: linear-gradient(155deg, var(--color-bg-muted), var(--color-border-light));
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: var(--sp-2);
}

    .se-empty-icon .material-symbols-rounded {
        font-size: 26px;
        color: var(--color-text-muted);
    }

    .se-empty-icon.se-empty-icon-error {
        background: var(--color-cancelled-bg);
    }

        .se-empty-icon.se-empty-icon-error .material-symbols-rounded {
            color: var(--color-cancelled);
        }

.se-empty-title {
    font-size: var(--dtext-md);
    font-weight: 700;
    color: var(--color-text);
}

.se-empty-subtitle {
    font-size: var(--dtext-sm);
    color: var(--color-text-muted);
    max-width: 360px;
}

.se-empty-action {
    margin-top: 10px;
}

/* ─────────────────────────────────────────
   8. FORM DISCIPLINE
   No width cap: every form section (simple fields and tabular content
   alike) fills .se-content's full width — consistent across all forms,
   by explicit product decision. (Previously this class capped at
   --shell-form-col-max as a reading-width guard, with a separate
   .se-form-wide class opting tabular sections out of that cap. Both are
   gone now — .se-form-col is the only container class, unrestricted,
   used everywhere. If a reading-width cap is wanted back later, this is
   the one place to reintroduce it — not per-page.)
───────────────────────────────────────── */
.se-form-col {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

/* NOTE: field-pairing in this app is actually done via .two-col-grid /
   .three-col-grid (app.css, shared with Mobile) — that's the convention
   in real use across every form. .se-form-row was defined here but never
   adopted; removed rather than kept as a second, unused pairing pattern. */

.se-form-actions {
    display: flex;
    gap: 10px;
    margin-top: 8px;
}

/* Submit-button loading state — every form's primary action button
   gets this instead of ad hoc disabling per page. */
.se-btn-primary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 22px;
    border-radius: var(--radius-sm);
    border: none;
    background: var(--color-primary);
    color: #fff;
    font-weight: 600;
    font-size: var(--dtext-sm);
    cursor: pointer;
    box-shadow: 0 1px 2px rgba(44,58,30,0.15), 0 2px 6px rgba(44,58,30,0.12);
    transition: filter var(--t-fast), box-shadow var(--t-fast), transform var(--t-fast);
}

    .se-btn-primary:hover:not(:disabled) {
        filter: brightness(0.96);
        box-shadow: 0 2px 4px rgba(44,58,30,0.18), 0 4px 12px rgba(44,58,30,0.16);
        transform: translateY(-1px);
    }

    .se-btn-primary:active:not(:disabled) {
        transform: translateY(0);
        box-shadow: 0 1px 2px rgba(44,58,30,0.15);
        filter: brightness(0.92);
    }

    .se-btn-primary:focus-visible {
        outline: 2px solid var(--color-gold);
        outline-offset: 2px;
    }

    .se-btn-primary:disabled {
        opacity: .65;
        cursor: default;
    }

    .se-btn-primary .mud-progress-circular {
        margin-right: 2px;
    }

/* Secondary/Cancel — same shape as .se-btn-primary, bordered/ghost look
   matching .se-icon-btn's outline convention instead of a filled color. */
.se-btn-secondary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 22px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--color-border);
    background: var(--color-bg-card);
    color: var(--color-text-soft);
    font-weight: 600;
    font-size: var(--dtext-sm);
    cursor: pointer;
    transition: background var(--t-fast), border-color var(--t-fast), color var(--t-fast), transform var(--t-fast);
}

    .se-btn-secondary:hover:not(:disabled) {
        background: var(--color-bg-muted);
        border-color: var(--color-primary-light);
        color: var(--color-text);
    }

    .se-btn-secondary:active:not(:disabled) {
        transform: translateY(0);
    }

    .se-btn-secondary:focus-visible {
        outline: 2px solid var(--color-primary);
        outline-offset: 2px;
    }

/* Compact modifier — for buttons living IN PAGE CONTENT (dashboard quick
   actions, panel-header actions, inline toolbars) rather than at the
   bottom of a form. .se-btn-primary/.se-btn-secondary's default size
   (10px/22px padding, double drop-shadow) is tuned for a form's single
   CTA — too tall and too "loud" for a row of everyday actions sitting
   in normal page flow. Same shape/colors, just denser: smaller padding,
   one flat shadow tier (shadow-xs) instead of the two-layer CTA shadow,
   smaller icon slot. Stack as a second class:
   class="se-btn-primary se-btn-compact". */
.se-btn-compact {
    padding: 9px 18px;
    font-size: var(--dtext-sm);
    gap: 7px;
    box-shadow: var(--shadow-xs);
}

    .se-btn-compact:hover:not(:disabled) {
        box-shadow: var(--shadow-sm);
        transform: translateY(-1px);
    }

    .se-btn-compact:active:not(:disabled) {
        box-shadow: var(--shadow-xs);
    }

    .se-btn-compact .material-symbols-rounded {
        font-size: 16px;
    }

.se-btn-secondary:disabled {
    opacity: .65;
    cursor: default;
}

/* Destructive action (Deactivate, Cancel Appointment, Mark No-Show, etc.)
   — outlined in the danger color rather than filled, so it doesn't
   visually outrank the actual primary action in the same bar. */
.se-btn-danger-outline {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 22px;
    border-radius: var(--radius-sm);
    border: 1px solid #C62828;
    background: var(--color-bg-card);
    color: #C62828;
    font-weight: 600;
    font-size: var(--dtext-sm);
    cursor: pointer;
    transition: background var(--t-fast), transform var(--t-fast);
}

    .se-btn-danger-outline:hover:not(:disabled) {
        background: rgba(198,40,40,0.06);
    }

    .se-btn-danger-outline:active:not(:disabled) {
        transform: translateY(0);
    }

    .se-btn-danger-outline:disabled {
        opacity: .65;
        cursor: default;
    }

/* ── Page footer — forms (Save/Cancel) and detail pages (Edit/
   Deactivate/Book Appointment, etc.) share this one bar.

   First attempt at this used position:sticky *inside* .se-content (the
   scrolling region), with a negative-margin trick to cancel out
   .se-content's own bottom padding. In practice that turned out fragile —
   it visibly broke (footer floating mid-page with a stray gap/empty card
   beneath it) once real form content pushed the math around. Rebuilt
   properly: the footer now renders through .NET 8's SectionOutlet/
   SectionContent into .se-page-footer-dock, a genuine flex-shrink:0
   SIBLING of .se-content inside .se-main (see AppShellLayout.razor) —
   not a CSS position trick living inside the scrolling area at all. No
   sticky, no negative margins, nothing to get subtly wrong: it's just
   docked below the scrollable content by ordinary flexbox, always
   visible, and it renders as zero-height when a page provides no footer
   content.

   .se-page-footer-dock matches .se-content's own padding/max-width/
   centering exactly, so the button row it contains always lines up
   horizontally with the content above it. ── */
.se-page-footer-dock {
    flex-shrink: 0;
    width: 100%;
    max-width: var(--shell-content-max);
    margin: 0 auto;
    padding: 0 clamp(18px, 2.4vw, 32px);
}

.se-page-footer {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 10px;
    padding: 14px 0;
    border-top: 1px solid var(--color-border);
    background: var(--color-bg-app);
}

/* Detail pages that pair a destructive action with a primary one
   (Deactivate ... Book Appointment) — pushes them to opposite ends
   instead of stacking everything on the right like a form's Save/Cancel. */
.se-page-footer-split {
    justify-content: space-between;
}

/* .se-page-footer-narrow removed — forms no longer use a capped reading
   width (.se-form-col has no max-width as of the "everything fills the
   container consistently" decision), so there's nothing narrower for
   the footer to match anymore. Every footer is full-width, right-aligned
   by default (.se-page-footer above) or split (.se-page-footer-split). */


/* ─────────────────────────────────────────
   9. MUDBLAZOR STRUCTURAL OVERRIDES
   Kill default Material chrome anywhere Mud components are used for
   plumbing (MudTable engine, MudForm validation, MudDialog focus
   trap) so nothing "looks Material" leaks through.
───────────────────────────────────────── */

/* MudTable used purely as a ServerData/sort engine — visually
   replaced by .se-col-head / .se-row via RowTemplate/HeaderContent,
   this just strips Mud's own table chrome so nothing double-renders. */
.se-mudtable-bare.mud-table {
    background: transparent;
    box-shadow: none;
}

.se-mudtable-bare .mud-table-container {
    overflow: visible;
}

.se-mudtable-bare .mud-table-toolbar,
.se-mudtable-bare .mud-table-pagination {
    display: none;
}
/* SePager replaces this */
.se-mudtable-bare thead.mud-table-head {
    display: none;
}
/* .se-col-head replaces this */
.se-mudtable-bare tbody .mud-table-row {
    display: table-row; /* row content itself is a .se-row grid inside a <td> */
}

.se-mudtable-bare td.mud-table-cell {
    border: none;
    padding: 0;
}

/* MudForm inputs — reshape outline style to match .se-input look
   (flat, olive-toned border/focus) instead of Material's default. */
.se-form-col .mud-input-outlined .mud-input-outlined-border {
    border-color: var(--color-border);
    border-radius: var(--radius-sm);
}

.se-form-col .mud-input-outlined.mud-shrink .mud-input-outlined-border,
.se-form-col .mud-input-outlined:hover .mud-input-outlined-border {
    border-color: var(--color-primary-light);
}

.se-form-col .mud-input-outlined.mud-input-focused .mud-input-outlined-border {
    border-color: var(--color-primary);
    border-width: 1.5px;
}

/* MudDatePicker used natively on Appointments (real calendar popover —
   worth using Mud's tested interaction model, not reimplementing) but
   reskinned to match .se- flat-input language instead of Material outline. */
.se-datepicker .mud-input-outlined-border {
    border-color: var(--color-border);
    border-radius: var(--radius-sm);
}

.se-datepicker .mud-input {
    font-size: var(--dtext-sm);
}

.se-datepicker .mud-input-adornment .mud-icon-root {
    color: var(--color-primary);
}

/* ─────────────────────────────────────────
   10. AUTH SCREENS (Login / OTP)
   Split-screen: form left, atmospheric brand panel right. Not a copy of
   any reference — original treatment using the salon's own palette/icon
   language (gradient icon mark carried over from Mobile's auth screens,
   so mobile/web read as the same product), with a soft abstract pattern
   on the right instead of literal marketing copy or a stat/sales pitch.
───────────────────────────────────────── */
.se-auth-shell {
    min-height: 100vh;
    display: flex;
}

.se-auth-left {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 40px;
    background: var(--color-bg-card);
}

.se-auth-form {
    width: 100%;
    max-width: 360px;
}

.se-auth-mark {
    width: 52px;
    height: 52px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 22px;
}

    .se-auth-mark img {
        width: 100%;
        height: 100%;
        object-fit: contain;
    }

.se-auth-title {
    font-size: var(--dtext-xl);
    font-weight: 800;
    color: var(--color-text);
    margin-bottom: 4px;
}

.se-auth-subtitle {
    font-size: var(--dtext-sm);
    color: var(--color-text-muted);
    margin-bottom: 26px;
    line-height: 1.5;
}

.se-auth-label {
    display: block;
    font-size: var(--dtext-xs);
    font-weight: 600;
    color: var(--color-text-soft);
    margin-bottom: 6px;
}

.se-auth-error {
    margin-top: 14px;
    padding: 12px 14px;
    background: var(--color-cancelled-bg);
    border-radius: var(--radius-md);
    border-left: 3px solid var(--color-cancelled);
}

.se-auth-error-title {
    font-size: var(--dtext-sm);
    font-weight: 700;
    color: var(--color-cancelled);
    display: flex;
    align-items: center;
    gap: 5px;
}

.se-auth-error-sub {
    font-size: var(--dtext-xs);
    color: var(--color-cancelled);
    margin-top: 4px;
    line-height: 1.5;
}

.se-auth-footer {
    margin-top: 28px;
    font-size: var(--dtext-xs);
    color: var(--color-text-muted);
    text-align: center;
}

/* ── Right panel — abstract atmosphere, no readable copy ── */
.se-auth-right {
    flex: 1;
    position: relative;
    overflow: hidden;
    background: linear-gradient(155deg, var(--color-primary-deeper), var(--color-primary-dark) 70%, var(--color-primary));
    display: none; /* shown only above a minimum width — see media query */
}

@media (min-width: 900px) {
    .se-auth-right {
        display: block;
    }
}

.se-auth-right-mark {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 340px;
    color: rgba(255,255,255,0.05);
    font-family: 'Material Symbols Rounded';
    user-select: none;
}

.se-auth-glow-a {
    position: absolute;
    width: 460px;
    height: 460px;
    border-radius: 50%;
    background: rgba(255,255,255,0.04);
    top: -140px;
    right: -140px;
}

.se-auth-glow-b {
    position: absolute;
    width: 320px;
    height: 320px;
    border-radius: 50%;
    background: rgba(201,168,76,0.07);
    bottom: -90px;
    left: -70px;
}

/* Floating ghosted UI chips — abstract shapes hinting at the product
   (a scheduled slot, a badge, a price) without being readable marketing
   copy or requiring live data. */
.se-auth-chip {
    position: absolute;
    background: rgba(255,255,255,0.06);
    border: 1px solid rgba(255,255,255,0.09);
    border-radius: var(--radius-md);
    backdrop-filter: blur(2px);
}

/* ── OTP input boxes ── */
.se-otp-row {
    display: flex;
    gap: 10px;
    margin-bottom: 22px;
}

.se-otp-box {
    width: 46px;
    height: 52px;
    text-align: center;
    font-size: 20px;
    font-weight: 700;
    border: 1.5px solid var(--color-border);
    border-radius: var(--radius-sm);
    background: var(--color-bg-input);
    color: var(--color-text);
    outline: none;
}

    .se-otp-box:focus {
        border-color: var(--color-primary);
    }

    .se-otp-box.filled {
        border-color: var(--color-primary-light);
        background: var(--color-bg-card-alt);
    }

.se-otp-row.shake {
    animation: se-shake 0.42s;
}

@keyframes se-shake {
    10%, 90% {
        transform: translateX(-2px);
    }

    20%, 80% {
        transform: translateX(3px);
    }

    30%, 50%, 70% {
        transform: translateX(-5px);
    }

    40%, 60% {
        transform: translateX(5px);
    }
}

.se-auth-back-link {
    font-size: var(--dtext-sm);
    color: var(--color-text-soft);
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 3px;
}

    .se-auth-back-link:hover {
        color: var(--color-primary-dark);
    }

.se-auth-resend-link {
    font-size: var(--dtext-sm);
    color: var(--color-primary);
    font-weight: 600;
    cursor: pointer;
}

    .se-auth-resend-link:hover {
        color: var(--color-primary-dark);
    }

/* ─────────────────────────────────────────
   11. SKELETON LOADING (SeRowSkeleton)
   Ported from Mobile's .skel-card shimmer — replaces the flat "Loading…"
   text / empty gray box several list pages used as a placeholder
   (audit finding: no page had a real loading skeleton on web before).
───────────────────────────────────────── */
@keyframes se-shimmer {
    0% {
        background-position: -300px 0;
    }

    100% {
        background-position: 300px 0;
    }
}

.se-skel {
    background: linear-gradient(90deg, var(--color-bg-muted) 25%, var(--color-border-light) 37%, var(--color-bg-muted) 63%);
    background-size: 600px 100%;
    animation: se-shimmer 1.4s ease-in-out infinite;
    border-radius: var(--radius-sm);
}

.se-skel-row {
    display: grid;
    grid-template-columns: var(--se-cols, 1fr);
    gap: var(--sp-3);
    align-items: center;
    padding: var(--sp-4) var(--sp-5);
    background: var(--color-bg-card);
    border: 1px solid var(--color-border-light);
    border-radius: var(--radius-md);
}

/* MudDialog backdrop tuned to match .se-modal-backdrop weight */
.mud-overlay {
    background-color: rgba(26, 36, 16, 0.45);
}

/* ─────────────────────────────────────────
   12. STAFF DETAIL CALENDAR — desktop refinement
   The base .staff-cal-* rules in app.css are Mobile's source (aspect-ratio:1
   cells sized for a ~380px phone screen). On a wide desktop viewport those
   cells stretch into huge empty squares with no visual polish. This block
   only applies >=900px so app.css / Mobile is never touched — it caps the
   card width, fixes cell height instead of aspect-ratio, and adds the
   hover/elevation/today treatment a desktop admin panel should have.
───────────────────────────────────────── */
@media (min-width: 900px) {
    .staff-cal-grid-wrap {
        padding: 22px 24px;
        border: 1px solid var(--color-border-light);
        border-radius: var(--radius-md);
        box-shadow: var(--shadow-sm);
    }

    .staff-cal-weekday-row {
        margin-bottom: 10px;
    }

    .staff-cal-weekday {
        font-size: 11px;
        letter-spacing: .05em;
    }

    .staff-cal-grid {
        gap: 6px;
    }

    .staff-cal-cell {
        aspect-ratio: unset;
        height: clamp(48px, 5.5vw, 76px);
        border-radius: 10px;
        transition: background-color .15s ease, box-shadow .15s ease, transform .1s ease;
    }

    .staff-cal-cell--blank {
        background: transparent;
    }

    .staff-cal-cell:not(.staff-cal-cell--blank):not(.selected):hover {
        background: var(--color-primary-light);
        box-shadow: var(--shadow-xs);
        transform: translateY(-1px);
    }

    .staff-cal-cell.selected {
        box-shadow: 0 3px 10px rgba(44, 58, 30, .22);
    }

    .staff-cal-daynum {
        font-size: 14px;
    }

        .staff-cal-daynum.today {
            text-decoration: none;
            color: var(--color-primary);
            font-weight: 800;
        }

    .staff-cal-cell:not(.selected) .staff-cal-daynum.today {
        position: relative;
    }

        .staff-cal-cell:not(.selected) .staff-cal-daynum.today::after {
            content: "";
            position: absolute;
            left: 50%;
            bottom: -7px;
            transform: translateX(-50%);
            width: 4px;
            height: 4px;
            border-radius: 50%;
            background: var(--color-primary);
        }

    .staff-cal-leave-dot {
        width: 7px;
        height: 7px;
        top: 4px;
        right: 4px;
        box-shadow: 0 0 0 2px var(--color-bg-card-alt);
    }

    .staff-cal-cell.selected .staff-cal-leave-dot {
        box-shadow: 0 0 0 2px var(--color-primary);
    }

    .staff-cal-count {
        font-size: 10.5px;
        min-width: 17px;
        height: 17px;
    }

    .staff-cal-legend {
        margin-top: 16px;
        padding-top: 14px;
        border-top: 1px solid var(--color-border-light);
        gap: 22px;
        font-size: 11.5px;
    }

    .staff-cal-legend-dot {
        width: 9px;
        height: 9px;
    }

    /* Month nav ("< Jul 2026 >") — give the icon buttons a real hover state
       instead of the flat default, and tighten the label spacing. */
    .section-header .icon-btn {
        border-radius: var(--radius-full);
        transition: background-color .15s ease;
    }

        .section-header .icon-btn:hover {
            background: var(--color-bg-muted);
        }
}
