/* ============================================================================
   TipsChampions - Sports Betting Platform for Friends & Family

   @package     TipsChampions
   @subpackage  Theme: Stadium Glass
   @version     1.1
   @since       May 2026
   @license     Proprietary

   @file        public/assets/css/themes/12-stadium-glass.css
   @description Third active theme on top of the v2 UI primitive layer.
                Direction #01 from design-overhaul/mockups/ — frosted-glass
                panels over a dusk-to-pitch-green radial gradient, lime accent
                (#C8FF5C), Inter + DM Mono type stack.

                The file is split into two SECTIONS:
                  1. --tc-* token overrides (palette / radii / shadow / type)
                  2. Theme-only decorations (gradient body, glass backdrop
                     filters on primitives, navbar restyle, cosmetic overlays).

                Only loaded when the user's theme preference resolves to
                'stadium-glass'. The conditional <link> + Google Fonts preconnect
                lives in views/layouts/app.php, gated on `$theme === 'stadium-glass'`.

   LOAD ORDER (after _base.css):
     1. bootstrap.min.css   (CDN)
     2. app.css             (legacy variables + Bootstrap augmentation)
     3. dark-theme.css      (overrides at [data-theme="dark"], inert here)
     4. responsive-fixes.css
     5. _base.css           (token defaults + every .ui-* rule)
     6. THIS FILE           (stadium-glass token overrides + decorations)

   CONVENTIONS:
   - Selector form: bare `[data-theme="stadium-glass"]`, matching dark-theme.css.
     The data-theme attribute lives on the <html> element (views/layouts/app.php),
     so neither `body[...]` nor `html[...]` prefixes are needed.
   - Every visual property in the override block reads a literal value;
     theme-only decorations may reference --tc-* tokens.
   - Position medals (--tc-gold / --tc-silver / --tc-bronze) inherit from
     _base.css defaults; the mockup uses --tc-accent for #1 emphasis directly.

   SECTIONS:
     1. Token contract overrides
     2. Theme-only decorations (body gradient, glass surfaces, cosmetic overlays)
     3. Bootstrap-layer restyle — buttons, form controls, flash alerts,
        typography. Only consumed by the secondary pages that still render
        default view markup inside the shell (nav/footer restyles retired in
        Phase 10.4 — the layout shell emits its own chrome; see Section 6).
     4. Primitive (.ui-*) refinements for default-view pages on this theme.
     6. Heavy-theme chrome (.tc-* classes) used by the layout shell.
     7. Heavy-theme page library (.sg-* generics) shared by the rebuilt
        per-page views under views/themes/stadium-glass/.
   ============================================================================ */


/* ============================================================================
   SECTION 1 — TOKEN CONTRACT OVERRIDES
   ============================================================================ */

[data-theme="stadium-glass"] {

    /* ---- Surface --------------------------------------------------------- */
    --tc-bg:               #0A1228;
    --tc-bg-elevated:      rgba(255, 255, 255, 0.08);
    --tc-bg-sunken:        rgba(255, 255, 255, 0.04);
    --tc-bg-hover:         rgba(255, 255, 255, 0.12);
    --tc-bg-active:        rgba(255, 255, 255, 0.14);
    --tc-bg-highlight:     rgba(200, 255, 92, 0.10);

    /* ---- Foreground / text ---------------------------------------------- */
    --tc-fg:               #F5F7FA;
    --tc-fg-dim:           #A6B3C4;
    --tc-fg-muted:         #6E7A8C;
    --tc-fg-on-accent:     #0A1228;

    /* ---- Accent (lime) -------------------------------------------------- */
    --tc-accent:           #C8FF5C;
    --tc-accent-hover:     #D6FF70;
    --tc-accent-soft:      rgba(200, 255, 92, 0.14);
    --tc-accent-fg:        #0A1228;

    /* ---- Semantic ------------------------------------------------------- */
    /* Mockup uses lime for positive deltas (+pts, "exact") — fold success
       into the accent palette so .ui-stat--success / .ui-badge--success
       feel native to the theme. */
    --tc-success:          #C8FF5C;
    --tc-success-soft:     rgba(200, 255, 92, 0.14);
    --tc-success-fg:       #0A1228;

    --tc-warning:          #FFB454;
    --tc-warning-soft:     rgba(255, 180, 84, 0.18);
    --tc-warning-fg:       #0A1228;

    --tc-danger:           #FF6B6B;
    --tc-danger-soft:      rgba(255, 107, 107, 0.18);
    --tc-danger-fg:        #ffffff;

    --tc-info:             #6DD3FF;
    --tc-info-soft:        rgba(109, 211, 255, 0.18);
    --tc-info-fg:          #0A1228;

    /* ---- Structure ------------------------------------------------------ */
    --tc-border:           rgba(255, 255, 255, 0.14);
    --tc-border-strong:    rgba(255, 255, 255, 0.24);

    --tc-radius-md:        1.125rem;    /* 18px — glass panel default */
    --tc-radius-lg:        1.5rem;      /* 24px — hero panels */

    --tc-shadow-card:      0 10px 30px rgba(0, 0, 0, 0.25),
                           inset 0 1px 0 rgba(255, 255, 255, 0.08);
    --tc-shadow-card-hover:0 12px 32px rgba(0, 0, 0, 0.40),
                           inset 0 1px 0 rgba(255, 255, 255, 0.10);
    --tc-shadow-floating:  0 20px 60px rgba(0, 0, 0, 0.45);

    /* ---- Type ----------------------------------------------------------- */
    --tc-font-body:        'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    --tc-font-display:     'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    --tc-font-mono:        'DM Mono', SFMono-Regular, Menlo, Monaco, Consolas, 'Liberation Mono', 'Courier New', monospace;
}


/* ============================================================================
   SECTION 2 — THEME-ONLY DECORATIONS
   ============================================================================
   These are the non-token-cascadable bits — multi-stop gradient backgrounds,
   backdrop-filter blur, cosmetic overlays. They consume --tc-* tokens where
   they can; the body-gradient stops are literal because the gradient is the
   theme's defining surface (no equivalent token in the contract).
   ============================================================================ */


/* ----- Body: layered dusk → pitch-green gradient + base font -------------- */
/* Solid base colour on the <html> element (it carries data-theme). The body
   gradient below uses background-attachment:fixed, which iOS does NOT paint in
   the top safe-area / status-bar region until a scroll repaint — exposing the
   browser-default WHITE html background as a block at the top of the standalone
   app (it vanishes once you scroll). Painting html navy removes that white and
   also backs any overscroll bounce. (§44) */
[data-theme="stadium-glass"] {
    background-color: #0A1228;
}

[data-theme="stadium-glass"] body {
    background:
        radial-gradient(ellipse 80% 60% at 50% 100%, #0F3D2E 0%, transparent 60%),
        radial-gradient(ellipse 100% 80% at 50% 0%,   #14233F 0%, #0A1228 60%),
        linear-gradient(180deg, #0A1430 0%, #0A1228 50%, #08251A 100%);
    background-attachment: fixed;
    color: var(--tc-fg);
    font-family: var(--tc-font-body);
    font-feature-settings: 'tnum' 1;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    min-height: 100vh;
    position: relative;
}

/* Faint noise overlay — fixed full-viewport SVG turbulence at 3% opacity.
   pointer-events:none so it never blocks clicks; z-index 0 to sit behind
   .navbar + main content (both of which establish their own stacking). */
[data-theme="stadium-glass"] body::before {
    content: '';
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 0;
    opacity: 0.03;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='200' height='200'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='1'/%3E%3C/svg%3E");
}

/* Soft floating lime spotlight — top-right corner, 60vw blurred radial. */
[data-theme="stadium-glass"] body::after {
    content: '';
    position: fixed;
    top: -20%;
    right: -20%;
    width: 60vw;
    height: 60vw;
    pointer-events: none;
    z-index: 0;
    background: radial-gradient(circle, rgba(200, 255, 92, 0.06) 0%, transparent 60%);
    filter: blur(40px);
}

/* Lift Bootstrap's main content + navbar above the overlays. */
[data-theme="stadium-glass"] .navbar,
[data-theme="stadium-glass"] main,
[data-theme="stadium-glass"] footer {
    position: relative;
    z-index: 1;
}


/* ----- Frosted-glass treatment on every primitive surface ----------------- */
/* The token override already swaps surface bg to rgba(255,255,255,0.08).
   This block adds the backdrop blur that makes the glass effect "land". */
[data-theme="stadium-glass"] .ui-card,
[data-theme="stadium-glass"] .ui-stat,
[data-theme="stadium-glass"] .ui-match-row,
[data-theme="stadium-glass"] .ui-alert-banner,
[data-theme="stadium-glass"] .ui-table-wrap,
[data-theme="stadium-glass"] .ui-modal .modal-content {
    backdrop-filter: blur(20px) saturate(160%);
    -webkit-backdrop-filter: blur(20px) saturate(160%);
}

/* ----- .ui-accordion on glass -------------------------------------------- */
/* app.css (global, unscoped) sets .accordion-button / .accordion-body
   background-color DIRECTLY off legacy tokens (--tc-bg-surface = white on glass,
   --tc-primary = blue), which beats the --bs-accordion-* variables the primitive
   sets. So override the surfaces DIRECTLY here, at a higher specificity, with the
   SOLID glass palette (#16213F panel / #101A35 sunken header — the §28 modal
   approach) so nothing renders white. (§51 follow-up) */
[data-theme="stadium-glass"] .ui-accordion .accordion-item,
[data-theme="stadium-glass"] .ui-accordion .accordion-button,
[data-theme="stadium-glass"] .ui-accordion .accordion-body {
    background-color: #16213F;
    color: var(--tc-fg);
}
/* Expanded ("folded out") header: sunken panel, lime title, and square bottom
   corners so it joins flush with the body below. Only the header (the "main
   accordion") goes lime — the revealed answer text keeps the normal readable
   --tc-fg set in the rule above. */
[data-theme="stadium-glass"] .ui-accordion .accordion-button:not(.collapsed) {
    background-color: #101A35;
    color: var(--tc-accent);
    border-bottom-left-radius: 0;
    border-bottom-right-radius: 0;
}

/* The dark-theme rule at _base.css:229 adds an inset highlight specific to
   the dark colour space — undo it for stadium-glass so the glass card's own
   shadow (--tc-shadow-card, declared above) reads cleanly. */
[data-theme="stadium-glass"] .ui-card {
    box-shadow: var(--tc-shadow-card);
    border-color: var(--tc-border);
}


/* ----- Text-selection ---------------------------------------------------- */
[data-theme="stadium-glass"] ::selection {
    background: var(--tc-accent);
    color: var(--tc-bg);
}


/* ============================================================================
   SECTION 3 — BOOTSTRAP-LAYER RESTYLE (secondary CSS-only pages)
   ============================================================================
   The heavy-theme layout shell (views/layouts/themes/stadium-glass.php) now
   emits its own chrome (.tc-nav pill, .tc-main wrapper, .tc-footer) for EVERY
   page on this theme, so the old Bootstrap .navbar / footer.bg-light /
   main.flex-grow-1 restyles are dead and were retired in Phase 10.4.

   What remains here only matters for the ~16 secondary user-facing pages
   (auth, settings, help, legal, profile, notifications, and the CSS-only
   group/betting sub-pages) that still render with DEFAULT view markup inside
   the shell's <main class="tc-main">: Bootstrap buttons, form controls, flash
   alerts, and typography. The shell's own nav/dropdown chrome is styled in
   Section 6.
   ============================================================================ */


/* ----- Raw Bootstrap modals ---------------------------------------------- */
/* The Quick Bet modal (/betting/matches) and the Confirm Your Bet partial
   (/betting/match) are raw Bootstrap modals, NOT ui/modal primitives, so
   without this they render as default white modals on glass. Theme the chrome
   to match ui/modal, and tone the inner light surfaces. */
/* NOTE: use SOLID glass-palette surfaces here, not the --tc-bg-* tokens. Those
   tokens are translucent (rgba white 0.04–0.08) and only read as solid on the
   ui/modal primitive, which also gets a backdrop-filter blur. A raw modal has
   no blur, so translucent surfaces show the dimmed page through it. */
[data-theme="stadium-glass"] .modal-content {
    background: #16213F;
    color: var(--tc-fg);
    border: 1px solid var(--tc-border);
    border-radius: var(--tc-radius-md);
}
[data-theme="stadium-glass"] .modal-header,
[data-theme="stadium-glass"] .modal-footer {
    border-color: var(--tc-border);
    background: #101A35;
}
/* Override the Bootstrap-blue .bg-primary header band to a neutral glass band
   (matches the ui/modal primitive's sunken header; the white title/icon read
   fine on it). */
[data-theme="stadium-glass"] .modal-header.bg-primary {
    background: #101A35 !important;
}
[data-theme="stadium-glass"] .modal-title { color: var(--tc-fg); }
/* §65: Bootstrap's .btn-close SVG is near-black — invert it so the close "×"
   reads on the dark glass modal chrome (matches .btn-close-white). */
[data-theme="stadium-glass"] .modal .btn-close {
    filter: invert(1) grayscale(100%) brightness(200%);
}
/* Inner light surfaces (bg-light boxes, .card.bg-light score/odds tiles). */
[data-theme="stadium-glass"] .modal .bg-light {
    background-color: #101A35 !important;
    color: var(--tc-fg);
}

/* ----- Buttons → btn-lime / btn-ghost shape ------------------------------ */
/* Pill geometry on every button across the app — mockup uses 999px pills
   everywhere. */
[data-theme="stadium-glass"] .btn {
    border-radius: 999px;
    font-weight: 500;
    transition: transform 0.15s ease, box-shadow 0.15s ease,
                background 0.15s ease, color 0.15s ease;
}
[data-theme="stadium-glass"] .btn-sm {
    padding: 0.45rem 0.95rem;
    font-size: 0.82rem;
}

/* Primary → btn-lime */
[data-theme="stadium-glass"] .btn-primary {
    background: var(--tc-accent);
    border-color: var(--tc-accent);
    color: var(--tc-accent-fg);
    padding: 0.65rem 1.3rem;
    font-weight: 600;
    box-shadow: 0 8px 24px rgba(200, 255, 92, 0.25),
                inset 0 1px 0 rgba(255, 255, 255, 0.4);
}
[data-theme="stadium-glass"] .btn-primary:hover {
    background: var(--tc-accent-hover);
    border-color: var(--tc-accent-hover);
    color: var(--tc-accent-fg);
    transform: translateY(-1px);
    box-shadow: 0 12px 28px rgba(200, 255, 92, 0.35);
}
[data-theme="stadium-glass"] .btn-primary:focus,
[data-theme="stadium-glass"] .btn-primary:active,
[data-theme="stadium-glass"] .btn-primary.active {
    background: var(--tc-accent-hover) !important;
    border-color: var(--tc-accent-hover) !important;
    color: var(--tc-accent-fg) !important;
    box-shadow: 0 0 0 4px var(--tc-accent-soft) !important;
}

/* Secondary / outline / ghost → glass pill */
[data-theme="stadium-glass"] .btn-secondary,
[data-theme="stadium-glass"] .btn-outline-secondary,
[data-theme="stadium-glass"] .btn-outline-light,
[data-theme="stadium-glass"] .btn-outline-primary {
    background: var(--tc-bg-elevated);
    border: 1px solid var(--tc-border);
    color: var(--tc-fg);
    padding: 0.6rem 1.15rem;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
}
[data-theme="stadium-glass"] .btn-secondary:hover,
[data-theme="stadium-glass"] .btn-outline-secondary:hover,
[data-theme="stadium-glass"] .btn-outline-light:hover,
[data-theme="stadium-glass"] .btn-outline-primary:hover {
    background: var(--tc-bg-hover);
    border-color: var(--tc-border-strong);
    color: var(--tc-fg);
}

/* Semantic buttons inherit pill geometry but keep their token colours */
[data-theme="stadium-glass"] .btn-success {
    background: var(--tc-success);
    border-color: var(--tc-success);
    color: var(--tc-success-fg);
}
[data-theme="stadium-glass"] .btn-danger {
    background: var(--tc-danger);
    border-color: var(--tc-danger);
    color: var(--tc-danger-fg);
}
[data-theme="stadium-glass"] .btn-warning {
    background: var(--tc-warning);
    border-color: var(--tc-warning);
    color: var(--tc-warning-fg);
}


/* ----- Form controls → tc-input shape ------------------------------------ */
[data-theme="stadium-glass"] .form-control,
[data-theme="stadium-glass"] .form-select {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--tc-border);
    border-radius: 12px;
    color: var(--tc-fg);
    padding: 0.85rem 1rem;
    font-family: var(--tc-font-body);
}
[data-theme="stadium-glass"] .form-control::placeholder {
    color: var(--tc-fg-muted);
}
/* The closed .form-select is themed above, but the OPEN <option> list is an
   OS-rendered popup that defaults to white — force a dark surface so it stays
   readable, and swap Bootstrap's dark caret for a light one. */
[data-theme="stadium-glass"] .form-select option,
[data-theme="stadium-glass"] .form-select optgroup {
    background-color: #101A35;
    color: #F5F7FA;
}
[data-theme="stadium-glass"] .form-select {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='%23F5F7FA'%3e%3cpath d='M7.247 11.14 2.451 5.658C1.885 5.013 2.345 4 3.204 4h9.592a1 1 0 0 1 .753 1.659l-4.796 5.48a1 1 0 0 1-1.506 0z'/%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 0.75rem center;
    background-size: 14px 11px;
    padding-right: 2.25rem;
}
[data-theme="stadium-glass"] .form-control:focus,
[data-theme="stadium-glass"] .form-select:focus {
    background: rgba(255, 255, 255, 0.08);
    border-color: var(--tc-accent);
    color: var(--tc-fg);
    box-shadow: 0 0 0 4px var(--tc-accent-soft);
    outline: none;
}
/* Raw Bootstrap list groups (e.g. the /betting/matches round lists) default to
   a solid white surface — theme them so rows don't render as bright strips on
   the glass background (the dark theme already has equivalent rules). */
[data-theme="stadium-glass"] .list-group {
    border-radius: var(--tc-radius-md);
}
[data-theme="stadium-glass"] .list-group-item {
    background-color: transparent;
    border-color: var(--tc-border);
    color: var(--tc-fg);
}
[data-theme="stadium-glass"] .list-group-item-action:hover,
[data-theme="stadium-glass"] .list-group-item-action:focus {
    background-color: rgba(255, 255, 255, 0.05);
    color: var(--tc-fg);
}

[data-theme="stadium-glass"] .form-label {
    color: var(--tc-fg-dim);
    font-size: 0.78rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.06em;
}
[data-theme="stadium-glass"] .form-check-input {
    background-color: rgba(255, 255, 255, 0.06);
    border-color: var(--tc-border);
}
[data-theme="stadium-glass"] .form-check-input:checked {
    background-color: var(--tc-accent);
    border-color: var(--tc-accent);
}
[data-theme="stadium-glass"] .form-check-input:focus {
    box-shadow: 0 0 0 3px var(--tc-accent-soft);
    border-color: var(--tc-accent);
}


/* ----- Flash-message banners (raw Bootstrap .alert, not ui-alert-banner) - */
[data-theme="stadium-glass"] .alert-success {
    background: var(--tc-success-soft);
    border-color: var(--tc-success);
    color: var(--tc-fg);
}
[data-theme="stadium-glass"] .alert-danger {
    background: var(--tc-danger-soft);
    border-color: var(--tc-danger);
    color: var(--tc-fg);
}
[data-theme="stadium-glass"] .alert-warning {
    background: var(--tc-warning-soft);
    border-color: var(--tc-warning);
    color: var(--tc-fg);
}
[data-theme="stadium-glass"] .alert-info {
    background: var(--tc-info-soft);
    border-color: var(--tc-info);
    color: var(--tc-fg);
}


/* ----- Typography defaults ----------------------------------------------- */
[data-theme="stadium-glass"] h1,
[data-theme="stadium-glass"] h2,
[data-theme="stadium-glass"] h3,
[data-theme="stadium-glass"] h4,
[data-theme="stadium-glass"] h5,
[data-theme="stadium-glass"] h6 {
    font-family: var(--tc-font-display);
    font-weight: 700;
    letter-spacing: -0.02em;
    color: var(--tc-fg);
}
[data-theme="stadium-glass"] h1 {
    font-size: clamp(1.8rem, 3.2vw, 2.6rem);
    line-height: 1.15;
    letter-spacing: -0.04em;
}
[data-theme="stadium-glass"] h2 {
    font-size: clamp(1.3rem, 2vw, 1.6rem);
    font-weight: 600;
}
[data-theme="stadium-glass"] h3 {
    font-size: 1.1rem;
    font-weight: 600;
}

/* Bootstrap text-muted on light-bg surfaces → re-tint for dark glass */
[data-theme="stadium-glass"] .text-muted {
    color: var(--tc-fg-dim) !important;
}


/* ============================================================================
   SECTION 4 — PRIMITIVE REFINEMENTS
   ============================================================================
   The base `.ui-*` rules in _base.css are designed for the light/dark themes.
   On stadium-glass the primitives need bigger numbers, slightly tighter
   letter-spacing, and the lime accent showing through on the "hero" stat.
   These overrides nudge the primitives toward the mockup's visual rhythm
   without touching either the primitive partials or the view markup.
   ============================================================================ */


/* ----- .ui-stat ----------------------------------------------------------- */
/* Mockup's .stat-tile uses a 2.4rem value with weight 600 and letter-spacing
   -0.03em. The base ui-stat uses 1.75rem at weight 700. Resize via tokens
   so .ui-stat--compact (used on the dashboard) still scales down properly. */
[data-theme="stadium-glass"] {
    --tc-fs-stat:    2.4rem;
    --tc-fs-stat-sm: 1.6rem;
}
[data-theme="stadium-glass"] .ui-stat {
    padding: 1.4rem 1.5rem;
}
[data-theme="stadium-glass"] .ui-stat__value {
    font-weight: 600;
    letter-spacing: -0.03em;
    line-height: 1.05;
}
[data-theme="stadium-glass"] .ui-stat__label {
    font-size: 0.78rem;
    letter-spacing: 0.06em;
    font-weight: 500;
}
[data-theme="stadium-glass"] .ui-stat__subtitle {
    font-size: 0.82rem;
}
/* The "accent" tile in the mockup paints its big number lime — match that
   for tone="primary" which the dashboard uses on Total Points. */
[data-theme="stadium-glass"] .ui-stat--primary .ui-stat__value {
    color: var(--tc-accent);
}
[data-theme="stadium-glass"] .ui-stat--compact {
    padding: 1rem 1.1rem;
}


/* ----- .ui-card ---------------------------------------------------------- */
/* The mockup uses a section-header ABOVE the card rather than a card-header
   inside it. The dashboard view keeps the header-inside-card pattern; we
   make the header read like a section heading: heavier weight, slightly
   smaller, and the right-side action link picks up the lime hover state. */
[data-theme="stadium-glass"] .ui-card__header {
    background: transparent;
    border-bottom: 1px solid var(--tc-border);
    padding: 1.1rem 1.4rem;
    font-size: 0.95rem;
    font-weight: 600;
    letter-spacing: -0.01em;
}
[data-theme="stadium-glass"] .ui-card__header h4,
[data-theme="stadium-glass"] .ui-card__header h5,
[data-theme="stadium-glass"] .ui-card__header h6 {
    font-weight: 600;
    letter-spacing: -0.01em;
    margin: 0;
}
[data-theme="stadium-glass"] .ui-card__header .btn {
    font-size: 0.82rem;
    padding: 0.35rem 0.85rem;
}
[data-theme="stadium-glass"] .ui-card__footer {
    background: transparent;
    border-top: 1px solid var(--tc-border);
}
/* Card body padding matches mockup's 1.6rem-1.8rem rhythm. */
[data-theme="stadium-glass"] .ui-card__body {
    padding: 1.4rem 1.6rem;
}


/* ----- .ui-list-row ------------------------------------------------------ */
/* Tighten the list-row vertical spacing; align trailing values with the
   mono number style from the mockup (e.g. "641 pts" in mini-rank). */
[data-theme="stadium-glass"] .ui-list-row {
    padding: 0.7rem 1.1rem;
    border-bottom-color: rgba(255, 255, 255, 0.06);
}
[data-theme="stadium-glass"] .ui-list-row__title {
    font-weight: 500;
}
[data-theme="stadium-glass"] .ui-list-row__trailing {
    font-family: var(--tc-font-mono);
    font-size: 0.85rem;
    color: var(--tc-fg-dim);
}
[data-theme="stadium-glass"] .ui-list-row__trailing .fw-bold,
[data-theme="stadium-glass"] .ui-list-row__trailing strong,
[data-theme="stadium-glass"] .ui-list-row__trailing b {
    color: var(--tc-fg);
    font-weight: 600;
}


/* ----- .ui-match-row ----------------------------------------------------- */
/* Upcoming match list in the dashboard uses match-row--compact. Tighten its
   kickoff line + crest size to match the mockup's compact rows. */
[data-theme="stadium-glass"] .ui-match-row {
    border-color: var(--tc-border);
}
[data-theme="stadium-glass"] .ui-match-row__kickoff {
    font-family: var(--tc-font-mono);
    font-size: 0.74rem;
    color: var(--tc-fg-dim);
}
[data-theme="stadium-glass"] .ui-match-row__score {
    font-family: var(--tc-font-mono);
    font-weight: 600;
}
[data-theme="stadium-glass"] .ui-match-row__name {
    font-weight: 500;
}


/* ----- .ui-table --------------------------------------------------------- */
/* Glass-ify the table chrome — sunken header background reads wrong on
   glass; replace with a hairline-only sunken treatment. */
[data-theme="stadium-glass"] .ui-table th {
    background: transparent;
    border-bottom: 1px solid var(--tc-border);
    font-size: 0.74rem;
    letter-spacing: 0.08em;
    color: var(--tc-fg-dim);
}
[data-theme="stadium-glass"] .ui-table td {
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}
[data-theme="stadium-glass"] .ui-table--hover tbody tr:hover {
    background: rgba(255, 255, 255, 0.03);
}


/* ----- .ui-badge --------------------------------------------------------- */
/* Make position badges read crisp on glass — the soft-bg variants are
   designed for light/dark surfaces and lose contrast against translucent
   cards. Add a 1px hairline so they hold their shape. */
[data-theme="stadium-glass"] .ui-badge {
    border: 1px solid rgba(255, 255, 255, 0.08);
}


/* ----- .dashboard-hub-cta ------------------------------------------------ */
/* The dashboard's hub-cta uses a token gradient that, on stadium-glass,
   becomes lime-on-lime — visually flat. Layer a subtle dusk-blue glow on
   one corner so the CTA reads as a "lit-up" panel matching the mockup
   stadium feel, without changing the gradient's lime identity. */
[data-theme="stadium-glass"] .dashboard-hub-cta {
    background:
        radial-gradient(circle at 20% 20%, rgba(20, 35, 63, 0.35) 0%, transparent 50%),
        linear-gradient(135deg, var(--tc-accent), var(--tc-accent-hover));
    box-shadow: 0 12px 32px rgba(200, 255, 92, 0.25),
                inset 0 1px 0 rgba(255, 255, 255, 0.4);
}
[data-theme="stadium-glass"] .dashboard-hub-cta .bg-dark {
    background: rgba(10, 18, 40, 0.75) !important;
}
[data-theme="stadium-glass"] .dashboard-hub-cta .btn-dark {
    background: rgba(10, 18, 40, 0.85);
    border-color: rgba(10, 18, 40, 0.85);
    color: var(--tc-fg);
}
[data-theme="stadium-glass"] .dashboard-hub-cta .btn-dark:hover {
    background: rgba(10, 18, 40, 1);
    color: var(--tc-accent);
}


/* ----- Page hero (h1 + .text-muted lede) --------------------------------- */
/* Dashboard's "Welcome back, …" header uses `h1.h3` + `p.text-muted`.
   Bootstrap's `.h3` utility clamps the h1 to 1.75rem — too small for the
   mockup's display-feel. Lift it back up. */
[data-theme="stadium-glass"] h1.h3 {
    font-size: clamp(1.6rem, 2.8vw, 2.2rem);
    font-weight: 700;
    letter-spacing: -0.03em;
    line-height: 1.1;
}


/* ----- Bootstrap row gutters on glass ------------------------------------ */
/* The `.row.g-3` and `.row.g-4` rows on dashboard sometimes inherit
   visible row backgrounds via Bootstrap's column-fill — verify the
   columns stay transparent. */
[data-theme="stadium-glass"] .row > [class*="col-"] {
    background: transparent;
}


/* ============================================================================
   SECTION 6 — HEAVY-THEME CHROME (.tc-* classes)
   ============================================================================
   Used by the layout shell at views/layouts/themes/stadium-glass.php (Phase
   10.2). These rules are NOT scoped under [data-theme="stadium-glass"] —
   the layout shell only emits this markup when the theme is active, so
   the rules can be unscoped (also cheaper selectors).

   Ported verbatim where possible from
   design-overhaul/mockups/01-stadium-glass/assets/styles.css with `--tc-*`
   tokens swapped in for the mockup's `--lime` / `--text-dim` / etc.
   ============================================================================ */


/* ----- Container ---------------------------------------------------------- */
.container-tc {
    max-width: 1320px;
    margin: 0 auto;
    padding: 0 20px;
    position: relative;
    z-index: 1;
}


/* ----- Pill nav ---------------------------------------------------------- */
.tc-nav {
    position: sticky;
    top: 12px;
    z-index: 50;
    margin: 12px auto 0;
    max-width: 1320px;
    padding: 0 16px;
}
.tc-nav-inner {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 10px 18px;
    background: rgba(10, 18, 40, 0.55);
    backdrop-filter: blur(24px) saturate(180%);
    -webkit-backdrop-filter: blur(24px) saturate(180%);
    border: 1px solid var(--tc-border);
    border-radius: 999px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.4),
                inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

/* Brand */
.tc-brand {
    display: flex;
    align-items: center;
    gap: 0.55rem;
    font-weight: 700;
    letter-spacing: -0.01em;
    font-size: 0.95rem;
    color: var(--tc-fg);
    text-decoration: none;
    flex-shrink: 0;
}
.tc-brand:hover { color: var(--tc-fg); }
.tc-brand-mark {
    font-size: 1.4rem;
    line-height: 1;
    filter: drop-shadow(0 4px 14px rgba(200, 255, 92, 0.18));
}
.tc-brand-text { letter-spacing: -0.02em; }

/* Links list */
.tc-links {
    display: flex;
    align-items: center;
    gap: 4px;
    margin: 0 auto;
    list-style: none;
    padding: 0;
}
.tc-links li { margin: 0; }
.tc-links a {
    display: inline-block;
    padding: 7px 14px;
    border-radius: 999px;
    font-size: 0.88rem;
    color: var(--tc-fg-dim);
    font-weight: 500;
    text-decoration: none;
    transition: background var(--tc-dur-fast) var(--tc-ease-out),
                color      var(--tc-dur-fast) var(--tc-ease-out);
}
.tc-links a:hover {
    background: var(--tc-bg-hover);
    color: var(--tc-fg);
}
.tc-links a.active {
    background: var(--tc-accent-soft);
    color: var(--tc-accent);
    box-shadow: inset 0 0 0 1px rgba(200, 255, 92, 0.22);
}

/* Right-side controls */
.tc-nav-right {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-shrink: 0;
}

.tc-nav-icon {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    border-radius: 999px;
    color: var(--tc-fg-dim);
    text-decoration: none;
    transition: background var(--tc-dur-fast) var(--tc-ease-out),
                color      var(--tc-dur-fast) var(--tc-ease-out);
}
.tc-nav-icon:hover {
    background: var(--tc-bg-hover);
    color: var(--tc-fg);
}
/* Active state — used by the standalone Admin icon when on an /admin page (§53). */
.tc-nav-icon.active {
    color: var(--tc-accent);
    background: var(--tc-accent-soft);
}
.tc-nav-icon i { font-size: 1.05rem; }

.tc-bell-badge {
    position: absolute;
    top: 2px;
    right: 2px;
    min-width: 16px;
    height: 16px;
    padding: 0 4px;
    background: var(--tc-danger);
    color: #fff;
    font-size: 0.6rem;
    font-weight: 700;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
}

.tc-avatar {
    width: 34px;
    height: 34px;
    border-radius: 999px;
    background: linear-gradient(135deg, #ffb454, #ff6b6b);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-weight: 600;
    font-size: 1.05rem;
    line-height: 1;
    border: 1px solid var(--tc-border-strong);
    text-decoration: none;
    cursor: pointer;
}
.tc-avatar:hover { color: #fff; filter: brightness(1.08); }

/* Guest CTAs */
.tc-nav-cta {
    display: inline-flex;
    align-items: center;
    padding: 0.45rem 0.95rem;
    border-radius: 999px;
    font-size: 0.85rem;
    font-weight: 600;
    text-decoration: none;
    transition: background var(--tc-dur-fast) var(--tc-ease-out),
                transform  var(--tc-dur-fast) var(--tc-ease-out);
}
.tc-nav-cta--ghost {
    background: rgba(255, 255, 255, 0.06);
    color: var(--tc-fg);
    border: 1px solid var(--tc-border);
}
.tc-nav-cta--ghost:hover {
    background: var(--tc-bg-hover);
    color: var(--tc-fg);
}
.tc-nav-cta--primary {
    background: var(--tc-accent);
    color: var(--tc-accent-fg);
    box-shadow: 0 6px 18px rgba(200, 255, 92, 0.25),
                inset 0 1px 0 rgba(255, 255, 255, 0.4);
}
.tc-nav-cta--primary:hover {
    background: var(--tc-accent-hover);
    color: var(--tc-accent-fg);
    transform: translateY(-1px);
}


/* ----- Notification + avatar dropdown menus ------------------------------ */
/* The shell uses Bootstrap dropdown JS but needs the menus to read on the
   dark glass surface. Restyle Bootstrap's default white menus. */
[data-theme="stadium-glass"] .tc-nav-right .dropdown-menu,
[data-theme="stadium-glass"] .notification-dropdown-menu {
    background: rgba(20, 35, 63, 0.95);
    backdrop-filter: blur(20px) saturate(160%);
    -webkit-backdrop-filter: blur(20px) saturate(160%);
    border: 1px solid var(--tc-border);
    color: var(--tc-fg);
    border-radius: var(--tc-radius-md);
    margin-top: 8px;
    box-shadow: var(--tc-shadow-floating);
}
[data-theme="stadium-glass"] .tc-nav-right .dropdown-item {
    color: var(--tc-fg);
}
[data-theme="stadium-glass"] .tc-nav-right .dropdown-item:hover,
[data-theme="stadium-glass"] .tc-nav-right .dropdown-item:focus {
    background: var(--tc-bg-hover);
    color: var(--tc-accent);
}
[data-theme="stadium-glass"] .tc-nav-right .dropdown-divider {
    border-top-color: var(--tc-border);
}

/* ----- Notification dropdown (§130) ------------------------------------- */
/* Glass-native menu mirroring the /notifications .notification-row design:
   icon chip, unread accent rail + soft wash + dot, head/list/foot bands. */
[data-theme="stadium-glass"] .notification-dropdown-menu.sg-notif {
    width: 360px;
    max-width: calc(100vw - 1.5rem);
    /* §130.5: cap the whole menu to the viewport so the footer never gets
       pushed to (or off) the screen edge when there are many notifications. */
    max-height: calc(100vh - 5rem);
    padding: 0;
    overflow: hidden;
    /* §130.1: fully opaque so page content doesn't shine through. */
    background: #14233f;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
}
/* When Bootstrap opens the menu, lay it out as a flex column so the head + foot
   are pinned (flex:0 0 auto) and only .sg-notif__list scrolls. */
[data-theme="stadium-glass"] .notification-dropdown-menu.sg-notif.show {
    display: flex;
    flex-direction: column;
}
.sg-notif__head {
    flex: 0 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.8rem 1rem;
    border-bottom: 1px solid var(--tc-border);
}
.sg-notif__heading {
    font-weight: 700;
    font-size: 0.9rem;
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
}
.sg-notif__heading i { color: var(--tc-accent); }

.sg-notif__list { flex: 1 1 auto; min-height: 0; max-height: 340px; overflow-y: auto; }

.sg-notif__item {
    display: flex;
    gap: 0.7rem;
    padding: 0.7rem 1rem;
    border-bottom: 1px solid var(--tc-border);
    border-left: 3px solid transparent;
    text-decoration: none;
    color: var(--tc-fg);
    transition: background var(--tc-dur-fast) var(--tc-ease-out);
}
.sg-notif__item:last-child { border-bottom: none; }
.sg-notif__item:hover { background: var(--tc-bg-hover); color: var(--tc-fg); }
.sg-notif__item.is-unread {
    /* §130.3: keep the accent rail (+ dot + bold title); skip the wash. */
    border-left-color: var(--tc-accent);
}
.sg-notif__item:hover .sg-notif__title { color: var(--tc-accent); }  /* §130.4 */

.sg-notif__icon {
    position: relative;
    width: 38px;
    height: 38px;
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: var(--tc-bg-sunken);
    border-radius: 999px;
    font-size: 1rem;
}
.sg-notif__dot {
    position: absolute;
    top: 0;
    right: 0;
    width: 9px;
    height: 9px;
    background: var(--tc-danger);
    border-radius: 50%;
    border: 2px solid var(--tc-bg-elevated);
}

.sg-notif__body { min-width: 0; flex-grow: 1; display: flex; flex-direction: column; gap: 2px; }
.sg-notif__row { display: flex; justify-content: space-between; align-items: baseline; gap: 0.5rem; }
.sg-notif__title {
    font-weight: 600;
    font-size: 0.85rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.sg-notif__item.is-unread .sg-notif__title { font-weight: 700; }
.sg-notif__time { font-size: 0.7rem; color: var(--tc-fg-muted); white-space: nowrap; flex-shrink: 0; }
.sg-notif__msg {
    font-size: 0.78rem;
    color: var(--tc-fg-dim);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.sg-notif__empty {
    text-align: center;
    padding: 1.8rem 1rem;
    color: var(--tc-fg-dim);
}
.sg-notif__empty i { font-size: 1.8rem; opacity: 0.5; display: block; margin-bottom: 0.4rem; }
.sg-notif__empty p { margin: 0; font-size: 0.82rem; }

.sg-notif__foot {
    flex: 0 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.85rem 1rem;  /* §130.2: more vertical breathing room */
    border-top: 1px solid var(--tc-border);
}
.sg-notif__link {
    background: none;
    border: none;
    padding: 0;
    font-size: 0.8rem;
    color: var(--tc-fg-dim);
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    cursor: pointer;
}
.sg-notif__link:hover { color: var(--tc-accent); }
.sg-notif__link--accent { color: var(--tc-accent); font-weight: 600; }


/* ----- Main content wrapper --------------------------------------------- */
.tc-main {
    position: relative;
    z-index: 1;
    padding: 1.4rem 0 2rem;
    max-width: 1320px;
    margin: 0 auto;
    padding-left: 20px;
    padding-right: 20px;
}


/* ----- Footer ------------------------------------------------------------ */
/* app.css:329 emits `footer { background-color: var(--tc-footer-bg) }` (no
   theme scope, cascades through to all themes). Without an explicit
   `background: transparent` here that legacy cream colour bleeds onto
   the stadium-glass page and reads as a white slab over the gradient.
   The mockup's footer is text-on-gradient — match that. */
.tc-footer {
    position: relative;
    z-index: 1;
    margin-top: 4rem;
    padding: 2rem 20px 2.5rem;
    background: transparent;
    border-top: 1px solid var(--tc-border);
    color: var(--tc-fg-muted);
    font-size: 0.82rem;
    text-align: center;
    max-width: 1320px;
    margin-left: auto;
    margin-right: auto;
}
.tc-footer-links {
    margin-top: 0.6rem;
}
.tc-footer-links a {
    color: var(--tc-fg-dim);
    margin: 0 0.6rem;
    text-decoration: none;
}
.tc-footer-links a:hover { color: var(--tc-accent); }
.tc-footer-links .sep { color: var(--tc-fg-muted); }
.tc-footer-meta {
    margin-top: 0.5rem;
    font-family: var(--tc-font-mono);
    font-size: 0.74rem;
    opacity: 0.7;
}


/* ----- Responsive: collapse links into a hamburger on narrow viewports --- */
/* The inline .tc-links row is hidden <=860px; the primary links are reached
   via the .tc-nav-burger hamburger dropdown instead (added §47 — previously
   the links just vanished on mobile / iPhone portrait with no replacement). */
.tc-nav-burger { display: none; }   /* desktop: inline links cover it */
@media (max-width: 860px) {
    .tc-links { display: none; }
    .tc-nav-burger { display: inline-flex; }
    .tc-nav-inner { padding: 8px 12px 8px 14px; }
    /* With the inline links hidden, push the burger/bell/avatar cluster to the
       right edge (on desktop the centred .tc-links auto-margins do this). (§50) */
    .tc-nav-right { margin-left: auto; }
}


/* ============================================================================
   SECTION 7 — HEAVY-THEME PAGE LIBRARY (.sg-* classes)
   ============================================================================
   Shared building blocks consumed by the per-page rebuilds at
   views/themes/stadium-glass/<area>/<page>.php. Page-specific layout
   (e.g. .sg-lb-grid, .sg-your-position) lives inline in each view's
   <style> block; this section only carries the generics:

     - .sg-panel        glass frosted surface base
     - .sg-btn          ghost / lime button shapes
     - .sg-chip         meta pill in headers
     - .sg-tab-bar      segmented control
     - .sg-tag          small inline label (e.g. "you")
     - .sg-num          tabular-nums helper (+ tone variants)
     - .sg-page-header  shared header layout
     - .sg-breadcrumb   text crumbs above page title
     - .sg-page-title   h1 with mockup spacing/scale
     - .sg-chips        flex row of .sg-chips
   ============================================================================ */


/* ----- Glass panel base -------------------------------------------------- */
.sg-panel {
    background: var(--tc-bg-elevated);
    backdrop-filter: blur(20px) saturate(160%);
    -webkit-backdrop-filter: blur(20px) saturate(160%);
    border: 1px solid var(--tc-border);
    border-radius: var(--tc-radius-md);
    box-shadow: var(--tc-shadow-card);
    overflow: hidden;
}
.sg-panel--strong {
    backdrop-filter: blur(28px) saturate(180%);
    -webkit-backdrop-filter: blur(28px) saturate(180%);
    border-color: var(--tc-border-strong);
    border-radius: var(--tc-radius-lg);
    box-shadow: var(--tc-shadow-floating),
                inset 0 1px 0 rgba(255, 255, 255, 0.12);
}
.sg-panel--accent {
    border-color: var(--tc-accent);
    box-shadow: 0 0 0 1px var(--tc-accent-soft),
                var(--tc-shadow-card);
}
.sg-panel--info {
    border-color: var(--tc-info);
    background: linear-gradient(135deg, var(--tc-info-soft), var(--tc-bg-elevated));
}


/* ----- Buttons ----------------------------------------------------------- */
.sg-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    padding: 0.55rem 1.1rem;
    border-radius: 999px;
    font-size: 0.88rem;
    font-weight: 600;
    text-decoration: none;
    border: 1px solid transparent;
    cursor: pointer;
    transition: background var(--tc-dur-fast) var(--tc-ease-out),
                transform  var(--tc-dur-fast) var(--tc-ease-out),
                color      var(--tc-dur-fast) var(--tc-ease-out);
    white-space: nowrap;
}
.sg-btn--sm    { padding: 0.4rem 0.85rem; font-size: 0.82rem; }
.sg-btn--ghost {
    background: rgba(255, 255, 255, 0.06);
    color: var(--tc-fg);
    border-color: var(--tc-border);
}
.sg-btn--ghost:hover {
    background: var(--tc-bg-hover);
    color: var(--tc-fg);
    border-color: var(--tc-border-strong);
}
.sg-btn--lime {
    background: var(--tc-accent);
    color: var(--tc-accent-fg);
    box-shadow: 0 6px 18px rgba(200, 255, 92, 0.25),
                inset 0 1px 0 rgba(255, 255, 255, 0.4);
}
.sg-btn--lime:hover {
    background: var(--tc-accent-hover);
    color: var(--tc-accent-fg);
    transform: translateY(-1px);
}


/* ----- Chip (meta pill in page headers) ---------------------------------- */
.sg-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.32rem 0.75rem;
    background: var(--tc-bg-elevated);
    border: 1px solid var(--tc-border);
    border-radius: 999px;
    font-size: 0.78rem;
    color: var(--tc-fg-dim);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
}
.sg-chip i { font-size: 0.85rem; }
.sg-chip--quiet { background: transparent; border-color: transparent; }

/* ----- .sg-show-block — section block shared by /groups/show and
   /groups/statistics (§129; promoted from the show.php inline <style> so both
   pages use the same component). .sg-panel supplies the frosted surface; the
   block zeroes its padding and lets the head + body manage their own. Full-bleed
   bodies (tables/lists) sit directly; padded bodies use .sg-show-block__body. */
.sg-show-block { padding: 0; }
.sg-show-block__head {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    padding: 1.1rem 1.4rem 0.7rem;
    flex-wrap: wrap;
    gap: 0.5rem;
}
.sg-show-block__title {
    font-size: 1rem;
    font-weight: 600;
    margin: 0;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}
.sg-show-block__title i { color: var(--tc-accent); }
.sg-show-block__hint {
    font-weight: 400;
    color: var(--tc-fg-muted);
    font-size: 0.78rem;
    margin-left: 0.3rem;
}
.sg-show-block__link {
    font-size: 0.85rem;
    color: var(--tc-fg-dim);
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
}
.sg-show-block__link:hover { color: var(--tc-accent); }
/* Padded body for statistics sections; padding == --tc-space-5 so a nested
   .statistics-edge-list (negative margin of the same size) cancels out and
   tables/lists go edge-to-edge, matching the full-bleed blocks on show. */
.sg-show-block__body { padding: var(--tc-space-5); }
.sg-chips { display: flex; flex-wrap: wrap; gap: 0.4rem; align-items: center; }


/* ----- Segmented tab bar ------------------------------------------------- */
.sg-tab-bar {
    display: inline-flex;
    background: var(--tc-bg-elevated);
    border: 1px solid var(--tc-border);
    padding: 4px;
    border-radius: 999px;
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    gap: 2px;
}
.sg-tab-btn {
    background: transparent;
    border: none;
    color: var(--tc-fg-dim);
    padding: 0.45rem 1.1rem;
    border-radius: 999px;
    font-size: 0.86rem;
    font-weight: 500;
    cursor: pointer;
    transition: background var(--tc-dur-fast) var(--tc-ease-out),
                color      var(--tc-dur-fast) var(--tc-ease-out);
}
.sg-tab-btn:hover:not(.is-active):not(:disabled) {
    color: var(--tc-fg);
    background: var(--tc-bg-hover);
}
.sg-tab-btn.is-active {
    background: var(--tc-accent);
    color: var(--tc-accent-fg);
    font-weight: 600;
}
.sg-tab-btn:disabled,
.sg-tab-btn.is-disabled {
    opacity: 0.45;
    cursor: not-allowed;
    pointer-events: none;
}
/* Tabs can be rendered as <a> links (round filtering) — kill the underline. */
a.sg-tab-btn { text-decoration: none; }


/* ----- Inline tag (small label e.g. "you", or status pill) -------------- */
/* One unified shape serves both the tiny "you" marker (leaderboard / show)
   and the status pills (betting index / match-recap). */
.sg-tag {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    padding: 2px 7px;
    border-radius: 4px;
    font-family: var(--tc-font-mono);
    font-size: 0.64rem;
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    line-height: 1.4;
    white-space: nowrap;
    vertical-align: 1px;
}
.sg-tag--lime,
.sg-tag--success { background: var(--tc-accent-soft);  color: var(--tc-accent);  }
.sg-tag--warning { background: var(--tc-warning-soft); color: var(--tc-warning); }
.sg-tag--danger  { background: var(--tc-danger-soft);  color: var(--tc-danger);  }
.sg-tag--info    { background: var(--tc-info-soft);    color: var(--tc-info);    }
.sg-tag--neutral { background: rgba(255, 255, 255, 0.06); color: var(--tc-fg-muted); }


/* ----- Numeric helpers --------------------------------------------------- */
.sg-num {
    font-family: var(--tc-font-mono);
    font-variant-numeric: tabular-nums;
    font-feature-settings: 'tnum' 1;
}
.sg-num--lime    { color: var(--tc-accent); }
.sg-num--warning { color: var(--tc-warning); }
.sg-num--danger  { color: var(--tc-danger); }
.sg-num--dim     { color: var(--tc-fg-muted); }


/* ----- Page header (breadcrumb + title + chips + actions) --------------- */
.sg-page-header {
    display: flex;
    gap: 1.5rem;
    align-items: flex-end;
    justify-content: space-between;
    flex-wrap: wrap;
    margin: 2rem 0 1.6rem;
}
.sg-page-header__main { min-width: 0; flex: 1 1 360px; }
.sg-page-header__actions {
    display: flex;
    gap: 0.6rem;
    align-items: center;
    flex-shrink: 0;
}

.sg-breadcrumb {
    font-family: var(--tc-font-mono);
    font-size: 0.78rem;
    color: var(--tc-fg-muted);
    margin-bottom: 0.6rem;
}
.sg-breadcrumb a {
    color: var(--tc-fg-dim);
    text-decoration: none;
}
.sg-breadcrumb a:hover { color: var(--tc-accent); }
.sg-breadcrumb .sep { color: var(--tc-fg-muted); margin: 0 0.4rem; }
.sg-breadcrumb .current { color: var(--tc-fg); }

.sg-page-title {
    font-size: clamp(1.6rem, 3vw, 2.2rem);
    font-weight: 700;
    letter-spacing: -0.03em;
    line-height: 1.1;
    margin: 0 0 0.7rem;
    color: var(--tc-fg);
}

@media (max-width: 720px) {
    .sg-page-header { align-items: flex-start; }
    .sg-page-header__actions { width: 100%; }
}


/* ----- CTA strip (centered button row under a page) --------------------- */
.sg-cta-strip {
    display: flex;
    gap: 0.7rem;
    margin: 1.6rem 0;
    justify-content: center;
    flex-wrap: wrap;
}


/* ----- Banner (urgent / warning / closed strip) ------------------------- */
.sg-banner {
    display: flex;
    align-items: center;
    gap: 0.9rem;
    padding: 0.9rem 1.2rem;
    border-radius: var(--tc-radius-md);
    border-left: 4px solid var(--tc-accent);
    background: var(--tc-accent-soft);
    color: var(--tc-fg);
    margin-bottom: 1.4rem;
}
.sg-banner i { font-size: 1.2rem; flex-shrink: 0; }
.sg-banner strong { font-weight: 600; }
.sg-banner > div { flex: 1; }
.sg-banner--danger  { background: var(--tc-danger-soft);  border-left-color: var(--tc-danger);  }
.sg-banner--warning { background: var(--tc-warning-soft); border-left-color: var(--tc-warning); }
.sg-banner--pulse   { animation: sg-banner-pulse 2s ease-in-out infinite; }
@keyframes sg-banner-pulse {
    0%, 100% { box-shadow: 0 0 0 0 var(--tc-danger-soft); }
    50%      { box-shadow: 0 0 0 6px transparent; }
}


/* ----- Info "empty / nothing here" callout ------------------------------ */
.sg-bh-empty {
    display: flex;
    gap: 0.9rem;
    align-items: center;
    padding: 1.2rem 1.5rem;
    border-left: 4px solid var(--tc-info);
    background: var(--tc-info-soft);
    border-radius: var(--tc-radius-md);
    margin-bottom: 1.4rem;
}
.sg-bh-empty__icon { font-size: 1.6rem; color: var(--tc-info); flex-shrink: 0; }
.sg-bh-empty strong { display: block; margin-bottom: 0.2rem; }
.sg-bh-empty > div { flex: 1; color: var(--tc-fg-dim); font-size: 0.92rem; }
.sg-bh-empty > div strong { color: var(--tc-fg); }


/* ----- Empty state (no data) -------------------------------------------- */
.sg-empty {
    text-align: center;
    padding: 2.5rem 1rem;
    color: var(--tc-fg-dim);
}
.sg-empty__icon {
    font-size: 2.5rem;
    color: var(--tc-fg-muted);
    display: block;
    margin-bottom: 0.8rem;
}
.sg-empty p { margin: 0; }


/* ----- Stat tile + 3-up grid + section header --------------------------- */
.sg-dash-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
    margin-bottom: 2rem;
}
@media (max-width: 720px) { .sg-dash-stats { grid-template-columns: 1fr; } }

.sg-stat-tile {
    padding: 1.4rem 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
    position: relative;
    overflow: hidden;
}
.sg-stat-tile__lbl {
    font-size: 0.78rem;
    color: var(--tc-fg-dim);
    text-transform: uppercase;
    letter-spacing: 0.06em;
    font-weight: 500;
}
.sg-stat-tile__num {
    font-size: 2.4rem;
    font-weight: 600;
    line-height: 1.05;
    letter-spacing: -0.03em;
    color: var(--tc-fg);
}
.sg-stat-tile__meta { font-size: 0.82rem; color: var(--tc-fg-dim); }
.sg-stat-tile--accent  .sg-stat-tile__num { color: var(--tc-accent); }
.sg-stat-tile--warning .sg-stat-tile__num { color: var(--tc-warning); }
.sg-stat-tile--danger  .sg-stat-tile__num { color: var(--tc-danger); }

.sg-dash-section-head {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    margin: 2rem 0 1rem;
    gap: 1rem;
}
.sg-dash-section-head h2 {
    font-size: 1.25rem;
    font-weight: 600;
    letter-spacing: -0.01em;
    margin: 0;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}
.sg-dash-section-head h2 i { color: var(--tc-accent); }
.sg-dash-section-head__link {
    color: var(--tc-fg-dim);
    text-decoration: none;
    font-size: 0.86rem;
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    flex-shrink: 0;
}
.sg-dash-section-head__link:hover { color: var(--tc-accent); }


/* ----- Leaderboard / standings table ------------------------------------ */
.sg-lb-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
}
.sg-lb-table th,
.sg-lb-table td {
    padding: 0.9rem 1.1rem;
    text-align: left;
    font-size: 0.92rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    vertical-align: middle;
}
.sg-lb-table th {
    font-size: 0.74rem;
    font-weight: 500;
    color: var(--tc-fg-dim);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    background: transparent;
}
.sg-lb-table tbody tr:last-child td { border-bottom: none; }
.sg-lb-table tbody tr:hover td { background: rgba(255, 255, 255, 0.03); }
.sg-lb-table td.num,
.sg-lb-table th.num {
    text-align: right;
    font-family: var(--tc-font-mono);
    font-variant-numeric: tabular-nums;
}
.sg-lb-table__rank-col { width: 4rem; }
.sg-lb-table__row--me td {
    background: linear-gradient(90deg, var(--tc-accent-soft), transparent 65%);
}
.sg-lb-table__row--me td:first-child {
    box-shadow: inset 3px 0 0 var(--tc-accent);
}
@media (max-width: 640px) {
    .sg-lb-table__hide-sm { display: none; }
    .sg-lb-table th,
    .sg-lb-table td { padding: 0.8rem 0.6rem; font-size: 0.86rem; }
}


/* ----- Rank cell (medal-toned position in a standings row) -------------- */
.sg-rank-cell {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-family: var(--tc-font-mono);
    font-weight: 500;
}
.sg-rank-cell__crown { color: var(--tc-accent); font-size: 0.95rem; }
.sg-rank-cell__num   { font-size: 1.05rem; color: var(--tc-fg); }
.sg-rank-cell--gold    { color: var(--tc-gold);   font-weight: 700; }
.sg-rank-cell--silver  { color: var(--tc-silver); font-weight: 700; }
.sg-rank-cell--bronze  { color: var(--tc-bronze); font-weight: 700; }
.sg-rank-cell--neutral { color: var(--tc-fg-dim); }


/* ----- Member cell (avatar + name + @handle) ---------------------------- */
.sg-member {
    display: inline-flex;
    align-items: center;
    gap: 0.7rem;
    text-decoration: none;
    color: var(--tc-fg);
}
.sg-member:hover { color: var(--tc-accent); }
.sg-member__avatar {
    flex: 0 0 auto;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid var(--tc-border);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
}
.sg-member__name { font-weight: 500; line-height: 1.2; }
.sg-member__handle {
    color: var(--tc-fg-muted);
    font-size: 0.78rem;
    font-family: var(--tc-font-mono);
    margin-left: 0.2rem;
}


/* ----- Sidebar card (group stats / quick links / info) ------------------ */
.sg-side-card { padding: 1.3rem 1.4rem; }
.sg-side-card__title {
    font-size: 0.78rem;
    font-weight: 500;
    color: var(--tc-fg-dim);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin: 0 0 1rem;
    display: flex;
    align-items: center;
    gap: 0.4rem;
}
.sg-side-card__title i { color: var(--tc-accent); }
.sg-side-card__hr {
    border: none;
    border-top: 1px solid var(--tc-border);
    margin: 1rem 0;
}
.sg-side-card__kv {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    padding: 0.35rem 0;
    font-size: 0.88rem;
}
.sg-side-card__kv-lbl { color: var(--tc-fg-dim); }
.sg-side-card__kv-val {
    font-family: var(--tc-font-mono);
    font-weight: 600;
    color: var(--tc-fg);
}
.sg-side-card__body {
    font-size: 0.85rem;
    color: var(--tc-fg-dim);
    line-height: 1.55;
    margin: 0;
}
.sg-side-card__body strong { color: var(--tc-fg); }

.sg-side-stats {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.8rem 1rem;
}
.sg-side-stat {
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
}
.sg-side-stat__lbl {
    font-size: 0.7rem;
    color: var(--tc-fg-muted);
    text-transform: uppercase;
    letter-spacing: 0.06em;
}
.sg-side-stat__num {
    font-family: var(--tc-font-mono);
    font-variant-numeric: tabular-nums;
    font-size: 1.4rem;
    font-weight: 600;
    color: var(--tc-fg);
    letter-spacing: -0.02em;
}


/* ============================================================================
   Shared quick-bet modal pieces (§57). Hoisted from the betting-hub view's
   scoped <style> so the dashboard quick-bet modal matches the hub exactly.
   ============================================================================ */
.sg-qb-odd { background: rgba(255, 255, 255, 0.06); border: 1px solid var(--tc-border); border-radius: 8px; padding: 0.5rem 0.9rem; text-align: center; min-width: 75px; }
.sg-qb-odd__lbl { font-size: 0.7rem; color: var(--tc-fg-dim); text-transform: uppercase; letter-spacing: 0.06em; }
.sg-qb-odd__val { font-size: 1.1rem; font-weight: 600; color: var(--tc-fg); margin-top: 2px; }
.sg-qb-score { background: rgba(255, 255, 255, 0.04); border-radius: var(--tc-radius-md); padding: 1rem; display: flex; align-items: center; justify-content: center; gap: 1rem; margin-bottom: 1rem; }
.sg-qb-score__input { width: 72px; height: 56px; background: rgba(255, 255, 255, 0.04); border: 1px solid var(--tc-border); border-radius: 10px; text-align: center; font-family: var(--tc-font-mono); font-size: 1.75rem; font-weight: 700; color: var(--tc-fg); -moz-appearance: textfield; }
.sg-qb-score__input::-webkit-outer-spin-button, .sg-qb-score__input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.sg-qb-score__input:focus { outline: none; border-color: var(--tc-accent); background: rgba(200, 255, 92, 0.05); box-shadow: 0 0 0 3px var(--tc-accent-soft); }
.sg-qb-score__dash { font-size: 1.6rem; color: var(--tc-fg-muted); font-family: var(--tc-font-mono); }
.sg-qb-score__lbl { display: block; margin-top: 0.3rem; font-size: 0.72rem; color: var(--tc-fg-dim); text-transform: uppercase; letter-spacing: 0.06em; }
.sg-qb-quick { display: flex; flex-wrap: wrap; gap: 0.3rem; justify-content: center; margin-bottom: 0.9rem; }
.sg-qb-quick__btn { padding: 0.3rem 0.7rem; background: rgba(255, 255, 255, 0.04); border: 1px solid var(--tc-border); border-radius: 999px; font-family: var(--tc-font-mono); font-size: 0.78rem; font-weight: 600; color: var(--tc-fg-dim); cursor: pointer; transition: background var(--tc-dur-fast), color var(--tc-dur-fast); }
.sg-qb-quick__btn:hover { background: var(--tc-bg-hover); color: var(--tc-fg); }
.sg-qb-quick__btn.active { background: var(--tc-accent); border-color: var(--tc-accent); color: var(--tc-accent-fg); }
.sg-qb-deadline { padding: 0.6rem 0.85rem; border-radius: 8px; background: var(--tc-warning-soft); color: var(--tc-fg); font-size: 0.85rem; }


/* ============================================================================
   SECTION 8 — DASHBOARD (glass) (§63)
   Hoisted from the dashboard view so /dev/primitives can render these blocks
   (bets-due rows, group cards, latest-bets/settled cards, shortcuts). Single
   source of truth for the dashboard components.
   ============================================================================ */
.sg-dash-hero { margin: 2rem 0 1.4rem; }
.sg-dash-hero__title { font-size: clamp(1.8rem, 3.2vw, 2.6rem); font-weight: 700; letter-spacing: -0.04em; line-height: 1.1; margin: 0 0 0.3rem; color: var(--tc-fg); }
.sg-dash-hero__sub { color: var(--tc-fg-dim); font-size: 1.05rem; margin: 0; }
.sg-dash-section-head h2 i { color: var(--tc-accent); margin-right: 0.4rem; }

/* §66: warm yellow wash so the "Bets due" rows read as action-needed vs normal
   panels. The tint is a RESTING background on each row (not hover-only), so it
   shows on touch devices where there's no hover. */
/* §75: panel and base row neutralised so the three match-deadline states
   (normal / closing soon / closing now) read distinctly. Special-bet rows
   keep their warm "due" framing — they aren't part of the three-state system. */
.sg-due { padding: 0; max-height: 21rem; overflow-y: auto; }
.sg-due::-webkit-scrollbar { width: 8px; }
.sg-due::-webkit-scrollbar-thumb { background: var(--tc-border); border-radius: 8px; }
.sg-due__row { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: 0.85rem 1.3rem; border-bottom: 1px solid var(--tc-border); background: transparent; color: var(--tc-fg); text-decoration: none; }
.sg-due__row:last-child { border-bottom: none; }
.sg-due__row:hover { background: var(--tc-bg-hover); color: var(--tc-fg); }
/* Special-bet rows (tournament winner etc.) — soft amber, unchanged feel. */
.sg-due__row--special { background: rgba(255, 180, 84, 0.10); }
.sg-due__row--special:hover { background: rgba(255, 180, 84, 0.20); color: var(--tc-fg); }
/* §75 — match-deadline states. */
.sg-due__row--soon { background: rgba(255, 180, 84, 0.14); }
.sg-due__row--soon:hover { background: rgba(255, 180, 84, 0.22); }
.sg-due__row--now  { background: rgba(255, 107, 107, 0.18); }
.sg-due__row--now:hover  { background: rgba(255, 107, 107, 0.28); }
.sg-due__row.is-done { opacity: 0.65; }
/* §76: the "Closes in …" indicator inside .sg-due__meta uses the shared
   .sg-tag pill (sg-tag--neutral/warning/danger). The earlier .sg-due__pfx
   rules were retired. */
/* §68: "Coming up" — neutral compact list of further-out fixtures. */
.sg-coming { padding: 0; }
.sg-coming__row { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: 0.7rem 1.3rem; border-bottom: 1px solid rgba(255,255,255,0.06); color: var(--tc-fg); text-decoration: none; }
.sg-coming__row:last-child { border-bottom: none; }
.sg-coming__row:hover { background: rgba(255,255,255,0.03); color: var(--tc-fg); }
.sg-coming__teams { font-weight: 500; min-width: 0; }
.sg-coming__meta { font-size: 0.8rem; text-align: right; flex-shrink: 0; }
@media (max-width: 560px) { .sg-coming__meta { display: none; } }
.sg-due__info { min-width: 0; }
.sg-due__teams { font-weight: 500; }
.sg-due__vs { color: var(--tc-fg-muted); font-size: 0.82rem; font-weight: 400; }
.sg-due__meta { display: block; font-size: 0.8rem; margin-top: 0.15rem; }
.sg-due__stage { display: inline-block; font-size: 0.66rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.05em; color: var(--tc-accent); background: var(--tc-accent-soft); border-radius: 6px; padding: 0.1rem 0.4rem; margin-right: 0.4rem; vertical-align: middle; }
.sg-due__place { flex-shrink: 0; }
.sg-due__done { color: var(--tc-accent); font-family: var(--tc-font-mono); font-size: 0.9rem; flex-shrink: 0; }

/* §146: per-group bet-status chips on the /betting/hub match rows — placed
   (lime wash ✓) vs missing (warning outline) vs missed (closed, dim). */
.hub-row-groups { display: inline-flex; flex-wrap: wrap; gap: 0.25rem; vertical-align: middle; }
.hub-grp {
    display: inline-flex;
    align-items: center;
    gap: 0.22rem;
    font-size: 0.68rem;
    font-weight: 600;
    padding: 0.12rem 0.45rem;
    border-radius: 999px;
    border: 1px solid var(--tc-border);
    color: var(--tc-fg-dim);
    white-space: nowrap;
    line-height: 1.4;
}
.hub-grp i { font-size: 0.72rem; }
.hub-grp.is-placed { color: var(--tc-accent); background: var(--tc-accent-soft); border-color: transparent; }
.hub-grp.is-open { color: var(--tc-warning); border-color: var(--tc-warning); }
.hub-grp.is-missed { color: var(--tc-fg-muted); }

/* §154: "Your groups" empty state — the .sg-panel card only supplied the
   frosted surface (no padding), so the icon/heading/buttons sat flush in the
   top-left and read as unfinished. Give it a centred layout with a lime-washed
   icon badge, comfortable padding and centred actions. */
.sg-dash-empty {
    text-align: center;
    padding: 2.75rem 1.5rem 2.5rem;
}
.sg-dash-empty__icon {
    width: 4rem;
    height: 4rem;
    margin: 0 auto 1.15rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    line-height: 1;
    border-radius: 50%;
    background: var(--tc-accent-soft);
    box-shadow: inset 0 0 0 1px var(--tc-border);
}
.sg-dash-empty h3 {
    margin: 0 0 0.45rem;
    font-size: 1.18rem;
    font-weight: 700;
    color: var(--tc-fg);
}
.sg-dash-empty p {
    margin: 0 auto 1.5rem;
    max-width: 25rem;
    color: var(--tc-fg-dim);
    font-size: 0.92rem;
    line-height: 1.5;
}
.sg-dash-empty__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.6rem;
    justify-content: center;
}

.sg-gperf-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 1rem; }
.sg-gperf { padding: 1.3rem 1.4rem; display: flex; flex-direction: column; gap: 1rem; height: 100%; }
.sg-gperf__head { display: flex; justify-content: space-between; align-items: flex-start; gap: 0.8rem; }
.sg-gperf__title { font-weight: 600; font-size: 1.05rem; color: var(--tc-fg); text-decoration: none; }
.sg-gperf__title:hover { color: var(--tc-accent); }
/* §72: owner/manager marker beside the group name. */
.sg-gperf__owner { color: var(--tc-warning); font-size: 0.8em; margin-left: 0.15rem; vertical-align: middle; }
.sg-gperf__sub { color: var(--tc-fg-dim); font-size: 0.82rem; margin-top: 0.2rem; }
.sg-gperf__rank { text-align: right; flex-shrink: 0; }
.sg-gperf__rank-num { font-size: 1.7rem; font-weight: 700; line-height: 1; color: var(--tc-accent); }
.sg-gperf__rank-lbl { display: block; font-size: 0.7rem; color: var(--tc-fg-dim); text-transform: uppercase; letter-spacing: 0.06em; }
.sg-gperf__stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0.5rem; padding: 0.8rem 0; border-top: 1px solid var(--tc-border); border-bottom: 1px solid var(--tc-border); }
.sg-gperf__stat { text-align: center; }
.sg-gperf__stat-num { font-size: 1.2rem; font-weight: 700; display: block; line-height: 1.1; }
.sg-gperf__stat-lbl { font-size: 0.72rem; color: var(--tc-fg-dim); text-transform: uppercase; letter-spacing: 0.05em; }
/* §97: bet-coverage line under the stat grid — placed/open + specials. */
/* §135: the group-card readout (due · missing · open) is one line of chips.
   Due is the accent-filled chip (most important); missing/open are neutral
   outlined chips; the "No due bets" / all-placed states are muted. */
.sg-gperf__cover { display: flex; flex-wrap: wrap; align-items: center; gap: 0.4rem 0.7rem; padding: 0.6rem 0 0.15rem; }
/* §149: zero-height full-width flex break — drops missing/open onto their own
   line beneath the due badge without stretching the (lime) due pill. */
.sg-gperf__cover-break { flex-basis: 100%; width: 100%; height: 0; margin: 0; }
/* §140: plain-text variant — missing / open on the /dashboard cards are text,
   not badges (the due stays a badge). */
.sg-gperf__cover-txt { display: inline-flex; align-items: center; gap: 0.3rem; font-size: 0.78rem; color: var(--tc-fg-dim); }
.sg-gperf__cover-txt i { color: var(--tc-fg-muted); font-size: 0.78rem; }
.sg-gperf__cover-txt .sg-num { color: var(--tc-fg); font-weight: 600; }
.sg-gperf__cover-txt.is-complete,
.sg-gperf__cover-txt.is-complete i { color: var(--tc-accent); }
/* §142: group emoji as a small lime-washed badge in front of the name. */
.sg-gperf__emoji {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.7rem;
    height: 1.7rem;
    border-radius: 7px;
    background: var(--tc-accent-soft);
    font-size: 0.95rem;
    line-height: 1;
    vertical-align: middle;
    margin-right: 0.15rem;
}
.sg-gperf__cover-item {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    font-size: 0.76rem;
    font-weight: 600;
    padding: 0.24rem 0.62rem;
    border-radius: 999px;
    background: var(--tc-bg-elevated);
    border: 1px solid var(--tc-border);
    color: var(--tc-fg-dim);
}
.sg-gperf__cover-item i { color: var(--tc-fg-muted); font-size: 0.78rem; }
.sg-gperf__cover-item .sg-num { color: var(--tc-fg); }
.sg-gperf__cover-item.is-complete,
.sg-gperf__cover-item.is-complete i { color: var(--tc-accent); }
/* §136: when anything is due, the due badge is a solid lime fill so it really
   stands out; the no-due state stays muted (.sg-gperf__cover-item--clear). */
.sg-gperf__cover-item--due {
    color: var(--tc-accent-fg);
    background: var(--tc-accent);
    border-color: transparent;
    font-weight: 700;
}
.sg-gperf__cover-item--due i,
.sg-gperf__cover-item--due .sg-num { color: var(--tc-accent-fg); }
.sg-gperf__cover-item--clear,
.sg-gperf__cover-item--clear i { color: var(--tc-fg-muted); font-weight: 500; }
.sg-gperf__foot { display: flex; align-items: center; justify-content: space-between; gap: 0.6rem; margin-top: auto; }
.sg-gperf__foot .sg-gperf__links { margin-left: auto; }  /* §135: due moved into the chips line above */
/* §126: the due indicator is a pill/chip (mirrors .sg-chip) on both /dashboard
   and /groups, rather than bare text. */
.sg-gperf__due { font-size: 0.78rem; font-weight: 600; color: var(--tc-accent); text-decoration: none; display: inline-flex; align-items: center; gap: 0.3rem; padding: 0.26rem 0.7rem; border-radius: 999px; background: var(--tc-bg-elevated); border: 1px solid var(--tc-border); }
.sg-gperf__due--clear { color: var(--tc-fg-muted); font-weight: 500; }
.sg-gperf__links { display: inline-flex; gap: 0.3rem; }
.sg-gperf__links a { position: relative; width: 30px; height: 30px; border-radius: 999px; display: inline-flex; align-items: center; justify-content: center; color: var(--tc-fg-dim); background: rgba(255,255,255,0.05); border: 1px solid var(--tc-border); text-decoration: none; font-size: 0.85rem; }
.sg-gperf__links a:hover { color: var(--tc-accent); background: var(--tc-bg-hover); }
.sg-gperf--cta { align-items: center; justify-content: center; flex-direction: row; gap: 0.7rem; text-decoration: none; color: var(--tc-fg-dim); }
.sg-gperf--cta:hover { color: var(--tc-accent); background: var(--tc-bg-hover); }
.sg-gperf__cta-icon { width: 38px; height: 38px; border-radius: 999px; background: var(--tc-accent-soft); color: var(--tc-accent); display: inline-flex; align-items: center; justify-content: center; }
.sg-gperf__cta-text { font-weight: 600; }

.sg-settled-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 0.6rem; }
/* Compact enough to fit two cards per half-width column (§62 squeeze). */
.sg-settled-card { padding: 0.7rem 0.85rem; text-decoration: none; color: var(--tc-fg); display: block; border-left: 3px solid transparent; transition: transform var(--tc-dur-fast), background var(--tc-dur-fast); }
.sg-settled-card:hover { color: var(--tc-fg); background: var(--tc-bg-hover); transform: translateY(-1px); }
.sg-settled-card__top { display: flex; align-items: center; justify-content: space-between; gap: 0.5rem; }
.sg-settled-card__teams { font-weight: 600; font-size: 0.9rem; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sg-settled-card__pts { font-weight: 700; white-space: nowrap; flex-shrink: 0; }
.sg-settled-card__pick { font-weight: 700; white-space: nowrap; color: var(--tc-info); flex-shrink: 0; }
.sg-settled-card__foot { display: flex; align-items: center; justify-content: space-between; gap: 0.5rem; margin-top: 0.4rem; font-size: 0.74rem; }
.sg-settled-card__foot > span:first-child { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sg-settled-card__group { text-align: right; flex-shrink: 0; max-width: 45%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sg-settled-card--bet { border-left-color: var(--tc-info); }
.sg-settled-card--result { border-left-color: var(--tc-accent); }
/* §72: latest-bet lifecycle status pill (placed-open / awaiting result /
   awaiting settlement / settled). */
.sg-settled-card__status { display: inline-flex; align-items: center; gap: 0.3rem; font-weight: 600; }
.sg-settled-card__status i { font-size: 0.9em; }
.sg-settled-card__status--open    { color: var(--tc-info); }
.sg-settled-card__status--result  { color: var(--tc-warning); }
.sg-settled-card__status--settle  { color: var(--tc-fg-dim); }
.sg-settled-card__status--settled { color: var(--tc-accent); }

.sg-dash-twocol { display: grid; grid-template-columns: 1fr 1fr; gap: 1.5rem; align-items: start; }
@media (max-width: 900px) { .sg-dash-twocol { grid-template-columns: 1fr; } }
.sg-dash-col { min-width: 0; }
/* §62: each section shows its cards in two columns; collapse to one on phones. */
.sg-dash-col .sg-settled-grid { grid-template-columns: repeat(2, 1fr); }
@media (max-width: 520px) { .sg-dash-col .sg-settled-grid { grid-template-columns: 1fr; } }
.sg-dash-mini-empty { padding: 1.1rem 1.2rem; color: var(--tc-fg-dim); font-size: 0.9rem; }

.sg-shortcuts { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; align-items: start; }
@media (max-width: 900px) { .sg-shortcuts { grid-template-columns: 1fr; } }
.sg-shortcut { padding: 1.2rem 1.3rem; }
.sg-shortcut__title { font-size: 0.95rem; font-weight: 600; margin: 0 0 0.8rem; display: flex; align-items: center; gap: 0.5rem; }
.sg-shortcut__title i { color: var(--tc-accent); }
.sg-shortcut__row { display: flex; align-items: center; justify-content: space-between; gap: 0.6rem; padding: 0.6rem 0; border-bottom: 1px solid rgba(255,255,255,0.05); text-decoration: none; color: var(--tc-fg); }
.sg-shortcut__row:last-child { border-bottom: none; }
.sg-shortcut__row:hover .sg-shortcut__row-main { color: var(--tc-accent); }
.sg-shortcut__row-main { font-weight: 500; }
.sg-shortcut__row-sub { font-size: 0.78rem; }
.sg-shortcut__badge { flex-shrink: 0; font-size: 0.7rem; font-weight: 600; color: var(--tc-accent); background: var(--tc-accent-soft); border-radius: 999px; padding: 0.15rem 0.55rem; }
.sg-shortcut__act { display: flex; align-items: center; gap: 0.6rem; padding: 0.55rem 0; border-bottom: 1px solid rgba(255,255,255,0.05); font-size: 0.88rem; color: var(--tc-fg); text-decoration: none; }
.sg-shortcut__act:last-child { border-bottom: none; }
.sg-shortcut__act:hover { color: var(--tc-fg); }
.sg-shortcut__act:hover .sg-shortcut__act-text strong { color: var(--tc-accent); }
.sg-shortcut__act-emoji { flex-shrink: 0; font-size: 1.1rem; }
.sg-shortcut__act-text { flex: 1; min-width: 0; }
.sg-shortcut__act-time { flex-shrink: 0; font-size: 0.74rem; }
.sg-shortcut__empty { margin: 0; font-size: 0.88rem; }

.sg-toast { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%) translateY(20px); background: #101A35; color: var(--tc-fg); border: 1px solid var(--tc-border); border-radius: 999px; padding: 0.6rem 1.2rem; font-size: 0.9rem; z-index: 1080; box-shadow: 0 10px 40px rgba(0,0,0,0.45); opacity: 0; pointer-events: none; transition: opacity .2s, transform .2s; }
.sg-toast.is-show { opacity: 1; transform: translateX(-50%) translateY(0); }
.sg-toast--ok { border-color: rgba(200,255,92,0.4); }
.sg-toast--err { border-color: rgba(255,107,107,0.5); }


/* ============================================================================
   §69 — Betting match item (.sg-bet-item): the shared ui/match-row visual +
   inline score inputs + Place/Update. Used by /betting/matches open list and
   shown on /dev/primitives, so the match-row layout is identical everywhere.
   ============================================================================ */
.sg-bet-list { display: flex; flex-direction: column; }
.sg-bet-item { padding: 0.9rem 1.1rem; border-bottom: 1px solid var(--tc-border); border-left: 3px solid transparent; }
.sg-bet-item:last-child { border-bottom: none; }
.sg-bet-item.is-placed { border-left-color: var(--tc-accent); }
.sg-bet-item--due { background: var(--tc-warning-soft); border-left-color: var(--tc-warning); }
.sg-bet-controls { display: flex; align-items: center; gap: 0.5rem; justify-content: flex-end; margin-top: 0.7rem; }
.sg-bet-members { margin-right: auto; font-size: 0.8rem; color: var(--tc-fg-dim); }
.sg-bet-score {
    width: 48px; height: 40px; text-align: center; background: #101A35;
    border: 1px solid var(--tc-border); border-radius: 8px; color: var(--tc-fg);
    font-family: var(--tc-font-mono); font-size: 1.1rem; -moz-appearance: textfield;
}
.sg-bet-score::-webkit-outer-spin-button, .sg-bet-score::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.sg-bet-score:focus { outline: none; border-color: var(--tc-accent); box-shadow: 0 0 0 3px var(--tc-accent-soft); }
.sg-bet-controls__sep { color: var(--tc-fg-muted); font-family: var(--tc-font-mono); }
.sg-bet-submit { white-space: nowrap; }

/* ============================================================================
   §70 — Hub match grid (SHARED): the betting-hub match-item layout + the
   rows/tiles/cards/detail density system, round tabs, view-density toggle and
   quick-bet modal. Moved out of betting/hub.php's page-local <style> so both
   /betting/hub and /betting/matches render identical match items. Catalogued
   on /dev/primitives. Hub-only chrome (stats row, group multi-select chip bar)
   stays page-local in hub.php.
   ============================================================================ */

/* ----- View-density toggle -------------------------------------------- */
.sg-view-toggle {
    display: inline-flex;
    background: var(--tc-bg-elevated);
    border: 1px solid var(--tc-border);
    border-radius: 999px;
    padding: 3px;
}
.sg-view-toggle__btn {
    background: transparent;
    border: none;
    color: var(--tc-fg-dim);
    padding: 0.35rem 0.7rem;
    border-radius: 999px;
    cursor: pointer;
    transition: background var(--tc-dur-fast), color var(--tc-dur-fast);
}
.sg-view-toggle__btn:hover { color: var(--tc-fg); }
.sg-view-toggle__btn.active {
    background: var(--tc-accent);
    color: var(--tc-accent-fg);
}

/* ----- Matches container ---------------------------------------------- */
.sg-hub-matches { padding: 0; margin-bottom: 1.4rem; }
.sg-hub-matches__head {
    padding: 1rem 1.4rem;
    border-bottom: 1px solid var(--tc-border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}
.sg-hub-matches__title {
    font-size: 1rem;
    font-weight: 600;
    margin: 0;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}
.sg-hub-matches__title i { color: var(--tc-accent); }
.sg-hub-matches__count {
    color: var(--tc-accent);
    font-weight: 600;
    font-size: 0.95rem;
}

/* ----- Round tabs ----------------------------------------------------- */
.sg-hub-tabs {
    display: flex;
    gap: 0.3rem;
    flex-wrap: nowrap;
    overflow-x: auto;
    padding: 0.7rem 1rem;
    border-bottom: 1px solid var(--tc-border);
    background: rgba(255, 255, 255, 0.02);
}
.sg-hub-tab {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.4rem 0.85rem;
    border-radius: 999px;
    background: transparent;
    border: 1px solid var(--tc-border);
    color: var(--tc-fg-dim);
    font-size: 0.82rem;
    font-weight: 500;
    cursor: pointer;
    white-space: nowrap;
    transition: background var(--tc-dur-fast), color var(--tc-dur-fast), border-color var(--tc-dur-fast);
}
.sg-hub-tab:hover {
    background: var(--tc-bg-hover);
    color: var(--tc-fg);
}
.sg-hub-tab.is-active,
.sg-hub-tab.btn-primary {
    background: var(--tc-accent);
    color: var(--tc-accent-fg);
    border-color: var(--tc-accent);
    font-weight: 600;
}
.sg-hub-tab__badge {
    font-family: var(--tc-font-mono);
    font-size: 0.7rem;
    padding: 1px 7px;
    border-radius: 999px;
    background: rgba(0, 0, 0, 0.45);
    color: #fff;
}
.sg-hub-tab__badge.bg-success {
    background: var(--tc-accent) !important;
    color: var(--tc-accent-fg) !important;
}
.sg-hub-tab__badge.bg-light  { background: rgba(0, 0, 0, 0.45) !important; }
.sg-hub-tab__badge.text-dark { color: #fff !important; }

/* ----- "Who's bet" roster (§96, /betting/match) ----------------------- */
/* Bigger named avatars; members who've placed get an accent ring + check so
   they read at a glance against the pending (dashed) ones. */
.sg-bettors {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem 1.1rem;
    margin-top: 0.9rem;
}
.sg-bettor {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.4rem;
    width: 4.2rem;
}
.sg-bettor__av {
    position: relative;
    width: 48px; height: 48px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.08);
    border: 2px solid rgba(10, 18, 40, 0.6);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1.3rem;
    color: var(--tc-fg);
}
.sg-bettor--placed .sg-bettor__av {
    border-color: var(--tc-accent);
    box-shadow: 0 0 0 3px var(--tc-accent-soft);
}
.sg-bettor__check {
    position: absolute;
    right: -3px; bottom: -3px;
    width: 19px; height: 19px;
    border-radius: 50%;
    background: var(--tc-accent);
    color: var(--tc-accent-fg);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.7rem;
    border: 2px solid var(--tc-bg);
}
.sg-bettor--pending .sg-bettor__av {
    background: rgba(255, 255, 255, 0.04);
    color: var(--tc-fg-muted);
    border-style: dashed;
    opacity: 0.85;
}
.sg-bettor__name {
    max-width: 100%;
    font-size: 0.72rem;
    color: var(--tc-fg-dim);
    text-align: center;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.sg-bettor--pending .sg-bettor__name { color: var(--tc-fg-muted); }

/* ----- The .hub-grid + match items ------------------------------------ */
.hub-grid { display: grid; gap: 0; }

/* Rows view — compact horizontal layout with odds in the middle. */
.hub-grid[data-view="rows"] {
    grid-template-columns: 1fr;
}
.hub-grid[data-view="rows"] .hub-match-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.7rem 1rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    background: transparent;
    border-left: 3px solid transparent;
    border-top: none;
    border-right: none;
    border-radius: 0;
    box-shadow: none !important;
    transition: background var(--tc-dur-fast);
}
.hub-grid[data-view="rows"] .hub-match-item:hover    { background: rgba(255, 255, 255, 0.03); }
.hub-grid[data-view="rows"] .hub-match-item:last-child { border-bottom: none; }
.hub-grid[data-view="rows"] .hub-match-item.is-placed       { border-left-color: var(--tc-accent); background: transparent; }
.hub-grid[data-view="rows"] .hub-match-item.hub-match-item--urgent {
    background: transparent !important;
    border-color: transparent !important;
    border-left: 3px solid var(--tc-danger) !important;
}

.hub-grid[data-view="rows"] .hub-match-row { flex: 1; min-width: 0; }
.hub-grid[data-view="rows"] .ui-match-row {
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
    display: flex;
    align-items: center;
    gap: 0.6rem;
    grid-template-columns: none;
    grid-template-areas: none;
}
.hub-grid[data-view="rows"] .ui-match-row__team {
    flex: 1;
    min-width: 0;
    order: unset;
}
.hub-grid[data-view="rows"] .ui-match-row__team--home { order: 1; }
.hub-grid[data-view="rows"] .ui-match-row__center     { order: 2; }
.hub-grid[data-view="rows"] .ui-match-row__team--away { order: 3; }
.hub-grid[data-view="rows"] .ui-match-row__odds       { order: 4; }

.hub-grid[data-view="rows"] .ui-match-row__deadline { display: none; }
.hub-grid[data-view="rows"] .ui-match-row__crest    { width: 22px; height: 22px; font-size: 0.65rem; }
.hub-grid[data-view="rows"] .ui-match-row__name     {
    font-size: 0.88rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1.2;
}
.hub-grid[data-view="rows"] .ui-match-row__kickoff  { font-size: 0.7rem; line-height: 1.2; }
.hub-grid[data-view="rows"] .ui-match-row__vs       { font-size: 0.78rem; line-height: 1.2; }
.hub-grid[data-view="rows"] .ui-match-row__center   {
    min-width: 64px;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0;
    flex-shrink: 0;
}

.hub-grid[data-view="rows"] .ui-match-row__odds {
    grid-column: auto;
    margin-top: 0;
    display: inline-flex;
    gap: 0.2rem;
    flex-shrink: 0;
    align-items: center;
}
.hub-grid[data-view="rows"] .ui-match-row__odd {
    flex-direction: row;
    align-items: center;
    gap: 3px;
    padding: 2px 6px;
    min-width: auto;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--tc-border);
    border-radius: 4px;
    font-size: 0.72rem;
    line-height: 1;
}
.hub-grid[data-view="rows"] .ui-match-row__odd-label { display: none; }
.hub-grid[data-view="rows"] .ui-match-row__odd-value { font-size: 0.72rem; line-height: 1; }

.hub-grid[data-view="rows"] .hub-match-controls     { display: flex; align-items: center; gap: 0.3rem; flex-shrink: 0; }
.hub-grid[data-view="rows"] .hub-score-input        { width: 38px; height: 30px; font-size: 0.82rem; padding: 0 0.2rem; }
.hub-grid[data-view="rows"] .hub-match-controls .btn {
    padding: 0.25rem 0.5rem;
    font-size: 0.78rem;
}
.hub-grid[data-view="rows"] .hub-btn-text { display: none; }
.hub-grid[data-view="rows"] .hub-status-badge,
.hub-grid[data-view="rows"] .sg-hub-status   { font-size: 0.64rem; padding: 1px 6px; }
.hub-grid[data-view="rows"] .sg-hub-controls__sep { font-size: 0.78rem; }

@media (max-width: 768px) {
    .hub-grid[data-view="rows"] .ui-match-row__odds { display: none; }
}

/* Tiles / Cards / Detail: allow team names to wrap, constrained to the grid column. */
.hub-grid[data-view="tiles"] .ui-match-row,
.hub-grid[data-view="cards"] .ui-match-row,
.hub-grid[data-view="detail"] .ui-match-row {
    grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
}
.hub-grid[data-view="tiles"] .ui-match-row__name,
.hub-grid[data-view="cards"] .ui-match-row__name,
.hub-grid[data-view="detail"] .ui-match-row__name {
    white-space: normal;
    overflow: visible;
    text-overflow: clip;
    word-break: break-word;
    overflow-wrap: anywhere;
    line-height: 1.25;
    max-width: 100%;
}

.hub-grid[data-view="tiles"] .ui-match-row__center,
.hub-grid[data-view="cards"] .ui-match-row__center,
.hub-grid[data-view="detail"] .ui-match-row__center {
    min-width: 64px;
    gap: 2px;
}
.hub-grid[data-view="tiles"] .ui-match-row__deadline,
.hub-grid[data-view="cards"] .ui-match-row__deadline,
.hub-grid[data-view="detail"] .ui-match-row__deadline {
    display: none;
}

/* The deadline footer — visible in tiles + cards only. */
.hub-match-footer { display: none; }
.hub-grid[data-view="tiles"] .hub-match-footer,
.hub-grid[data-view="cards"] .hub-match-footer {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    font-size: 0.78rem;
    color: var(--tc-fg-dim);
    font-family: var(--tc-font-mono);
    padding: 0.2rem 0;
}
.hub-match-footer i { font-size: 0.82rem; color: var(--tc-fg-muted); }
.hub-match-footer__lbl  { color: var(--tc-fg-muted); }
.hub-match-footer__time { color: var(--tc-accent); font-weight: 600; }

/* Tiles view — vertical stack inside each tile; 3-col at xl, 2-col at lg. */
.hub-grid[data-view="tiles"] {
    grid-template-columns: 1fr;
    gap: 0.7rem;
    padding: 0.7rem;
}
@media (min-width: 768px)  { .hub-grid[data-view="tiles"] { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 1280px) { .hub-grid[data-view="tiles"] { grid-template-columns: repeat(3, minmax(0, 1fr)); } }

.hub-grid[data-view="tiles"] .hub-match-item {
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
    padding: 0.85rem 0.95rem;
    background: var(--tc-bg-elevated);
    backdrop-filter: blur(20px) saturate(160%);
    -webkit-backdrop-filter: blur(20px) saturate(160%);
    border: 1px solid var(--tc-border);
    border-radius: var(--tc-radius-md);
    transition: transform var(--tc-dur-fast), border-color var(--tc-dur-fast);
}
.hub-grid[data-view="tiles"] .hub-match-item:hover {
    transform: translateY(-1px);
    border-color: var(--tc-border-strong);
}
.hub-grid[data-view="tiles"] .hub-match-row { width: 100%; min-width: 0; }
.hub-grid[data-view="tiles"] .hub-match-controls {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    flex-wrap: wrap;
}
.hub-grid[data-view="tiles"] .hub-score-input { width: 48px; height: 38px; font-size: 1rem; font-weight: 600; }
.hub-grid[data-view="tiles"] .hub-btn-text { display: inline; }
.hub-grid[data-view="tiles"] .ui-match-row__odds { display: none; }

/* Cards view */
.hub-grid[data-view="cards"] {
    grid-template-columns: 1fr;
    gap: 1rem;
    padding: 1rem;
}
@media (min-width: 768px)  { .hub-grid[data-view="cards"] { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 1200px) { .hub-grid[data-view="cards"] { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.hub-grid[data-view="cards"] .hub-match-item {
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
    padding: 1.1rem;
    background: var(--tc-bg-elevated);
    backdrop-filter: blur(20px) saturate(160%);
    -webkit-backdrop-filter: blur(20px) saturate(160%);
    border: 1px solid var(--tc-border);
    border-radius: var(--tc-radius-md);
    box-shadow: var(--tc-shadow-card);
    transition: transform var(--tc-dur-fast), border-color var(--tc-dur-fast);
}
.hub-grid[data-view="cards"] .hub-match-item:hover {
    transform: translateY(-2px);
    border-color: var(--tc-border-strong);
}
.hub-grid[data-view="cards"] .hub-match-controls {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    flex-wrap: wrap;
}
.hub-grid[data-view="cards"] .hub-score-input { width: 60px; height: 48px; font-size: 1.35rem; font-weight: 700; }
.hub-grid[data-view="cards"] .hub-btn-text { display: inline; }

/* Detail view — 2-col, vertical stack per match WITH the .hub-match-meta block. */
.hub-grid[data-view="detail"] {
    grid-template-columns: 1fr;
    gap: 0.9rem;
    padding: 0.9rem;
}
@media (min-width: 900px) {
    .hub-grid[data-view="detail"] { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
.hub-grid[data-view="detail"] .hub-match-item {
    display: flex;
    flex-direction: column;
    gap: 0.7rem;
    padding: 1rem 1.1rem;
    background: var(--tc-bg-elevated);
    backdrop-filter: blur(20px) saturate(160%);
    -webkit-backdrop-filter: blur(20px) saturate(160%);
    border: 1px solid var(--tc-border);
    border-radius: var(--tc-radius-md);
    box-shadow: var(--tc-shadow-card);
    transition: transform var(--tc-dur-fast), border-color var(--tc-dur-fast);
}
.hub-grid[data-view="detail"] .hub-match-item:hover {
    transform: translateY(-1px);
    border-color: var(--tc-border-strong);
}
.hub-grid[data-view="detail"] .hub-match-row { width: 100%; min-width: 0; }
.hub-grid[data-view="detail"] .hub-match-controls {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.45rem;
    flex-wrap: wrap;
    padding-top: 0.1rem;
}
.hub-grid[data-view="detail"] .hub-score-input { width: 50px; height: 40px; font-size: 1.05rem; font-weight: 600; }
.hub-grid[data-view="detail"] .hub-btn-text { display: inline; }

/* Meta block — only renders in detail view. */
.hub-match-meta { display: none; }
.hub-grid[data-view="detail"] .hub-match-meta {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    padding: 0.6rem 0;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}
.hub-match-meta__row {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
}
.hub-match-meta__chip {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    padding: 2px 8px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--tc-border);
    border-radius: 999px;
    font-family: var(--tc-font-mono);
    font-size: 0.7rem;
    color: var(--tc-fg-dim);
}
.hub-match-meta__chip i { font-size: 0.78rem; }
.hub-match-meta__chip--urgent {
    background: var(--tc-danger-soft);
    border-color: var(--tc-danger);
    color: var(--tc-danger);
}
.hub-match-meta__chip--quiet {
    background: transparent;
    border-color: transparent;
    padding-left: 0;
    padding-right: 0;
}
.hub-match-meta__chip--deadline {
    background: transparent;
    border-color: transparent;
    padding-left: 0;
    padding-right: 0;
    color: var(--tc-fg-dim);
}
.hub-match-meta__chip--deadline.hub-match-meta__chip--urgent {
    background: var(--tc-danger-soft);
    border-color: var(--tc-danger);
    padding-left: 8px;
    padding-right: 8px;
}
.hub-match-meta__chip-lbl  { color: var(--tc-fg-muted); }
.hub-match-meta__chip-time {
    color: var(--tc-accent);
    font-weight: 600;
    margin-left: 0.15rem;
}
.hub-match-meta__chip--urgent .hub-match-meta__chip-lbl,
.hub-match-meta__chip--urgent .hub-match-meta__chip-time {
    color: var(--tc-danger);
}
.hub-match-meta__groups {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
}
.hub-match-meta__group {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 3px 9px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--tc-border);
    border-radius: 999px;
    font-size: 0.74rem;
    color: var(--tc-fg-dim);
}
.hub-match-meta__group.is-placed {
    background: var(--tc-accent-soft);
    border-color: rgba(200, 255, 92, 0.4);
    color: var(--tc-accent);
}
.hub-match-meta__group i { font-size: 0.78rem; }
.hub-match-meta__group-bet {
    font-family: var(--tc-font-mono);
    font-weight: 600;
}

/* Match item state markers */
.hub-match-item.is-placed { border-color: var(--tc-accent); box-shadow: 0 0 0 1px var(--tc-accent-soft); }
.hub-match-item--urgent {
    border-color: var(--tc-danger) !important;
    background: var(--tc-danger-soft);
}
.hub-grid[data-view="tiles"] .hub-match-item--urgent,
.hub-grid[data-view="cards"] .hub-match-item--urgent,
.hub-grid[data-view="detail"] .hub-match-item--urgent {
    animation: sg-hub-urgent-pulse 2.4s ease-in-out infinite;
}
@keyframes sg-hub-urgent-pulse {
    0%, 100% { box-shadow: 0 0 0 0 rgba(255, 107, 107, 0.45); }
    50%      { box-shadow: 0 0 0 6px rgba(255, 107, 107, 0); }
}

/* Score-inputs */
.hub-score-input,
.sg-hub-score {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--tc-border);
    border-radius: 8px;
    color: var(--tc-fg);
    text-align: center;
    font-family: var(--tc-font-mono);
    -moz-appearance: textfield;
}
.hub-score-input::-webkit-outer-spin-button,
.hub-score-input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.hub-score-input:focus,
.sg-hub-score:focus {
    outline: none;
    border-color: var(--tc-accent);
    background: rgba(200, 255, 92, 0.05);
    box-shadow: 0 0 0 3px var(--tc-accent-soft);
}
.sg-hub-controls__sep { color: var(--tc-fg-muted); font-family: var(--tc-font-mono); }

/* Bootstrap btn state overrides for the submit + quick-bet */
.sg-hub-controls .btn,
.sg-hub-quick {
    border-radius: 999px;
    padding: 0.35rem 0.7rem;
    font-size: 0.82rem;
    font-weight: 600;
    border-width: 1px;
}
.sg-hub-controls .btn-primary {
    background: var(--tc-accent);
    border-color: var(--tc-accent);
    color: var(--tc-accent-fg);
}
.sg-hub-controls .btn-primary:hover {
    background: var(--tc-accent-hover);
    border-color: var(--tc-accent-hover);
    color: var(--tc-accent-fg);
}
.sg-hub-controls .btn-outline-success {
    background: var(--tc-accent-soft);
    border-color: var(--tc-accent);
    color: var(--tc-accent);
}
.sg-hub-controls .btn-outline-warning {
    background: rgba(255, 180, 84, 0.12);
    border-color: var(--tc-warning);
    color: var(--tc-warning);
}
.sg-hub-controls .btn-outline-warning:hover {
    background: var(--tc-warning-soft);
    color: var(--tc-warning);
}

/* Hub status badge */
.hub-status-badge,
.sg-hub-status {
    display: inline-flex;
    align-items: center;
    padding: 3px 8px;
    border-radius: 999px;
    font-family: var(--tc-font-mono);
    font-size: 0.7rem;
    font-weight: 600;
}
.hub-status-badge.bg-success { background: var(--tc-accent); color: var(--tc-accent-fg) !important; }
.hub-status-badge.bg-secondary { background: rgba(255, 255, 255, 0.08); color: var(--tc-fg-dim) !important; }

/* ----- Quick-bet modal odds + score blocks ---------------------------- */
.sg-qb-odd {
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid var(--tc-border);
    border-radius: 8px;
    padding: 0.5rem 0.9rem;
    text-align: center;
    min-width: 75px;
}
.sg-qb-odd__lbl {
    font-size: 0.7rem;
    color: var(--tc-fg-dim);
    text-transform: uppercase;
    letter-spacing: 0.06em;
}
.sg-qb-odd__val {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--tc-fg);
    margin-top: 2px;
}

.sg-qb-score {
    background: rgba(255, 255, 255, 0.04);
    border-radius: var(--tc-radius-md);
    padding: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 1rem;
}
.sg-qb-score__input {
    width: 72px;
    height: 56px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--tc-border);
    border-radius: 10px;
    text-align: center;
    font-family: var(--tc-font-mono);
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--tc-fg);
    -moz-appearance: textfield;
}
.sg-qb-score__input::-webkit-outer-spin-button,
.sg-qb-score__input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.sg-qb-score__input:focus {
    outline: none;
    border-color: var(--tc-accent);
    background: rgba(200, 255, 92, 0.05);
    box-shadow: 0 0 0 3px var(--tc-accent-soft);
}
.sg-qb-score__dash {
    font-size: 1.6rem;
    color: var(--tc-fg-muted);
    font-family: var(--tc-font-mono);
}
.sg-qb-score__lbl {
    display: block;
    margin-top: 0.3rem;
    font-size: 0.72rem;
    color: var(--tc-fg-dim);
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

.sg-qb-quick {
    display: flex;
    flex-wrap: wrap;
    gap: 0.3rem;
    justify-content: center;
    margin-bottom: 0.9rem;
}
.sg-qb-quick__btn {
    padding: 0.3rem 0.7rem;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--tc-border);
    border-radius: 999px;
    font-family: var(--tc-font-mono);
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--tc-fg-dim);
    cursor: pointer;
    transition: background var(--tc-dur-fast), color var(--tc-dur-fast);
}
.sg-qb-quick__btn:hover {
    background: var(--tc-bg-hover);
    color: var(--tc-fg);
}
.sg-qb-quick__btn.active {
    background: var(--tc-accent);
    border-color: var(--tc-accent);
    color: var(--tc-accent-fg);
}

.sg-qb-deadline {
    padding: 0.6rem 0.85rem;
    border-radius: 8px;
    background: var(--tc-warning-soft);
    color: var(--tc-fg);
    font-size: 0.85rem;
}
