/* ============================================================================
   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); }
/* 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);
}


/* ----- 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-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--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;
}
