/* ═══════════════════════════════════════════════════════════════
   Squadmaster UI Component Library
   ═══════════════════════════════════════════════════════════════
   Two themes: LIGHT (default) and DARK (via .ui-theme-dark).

   Light = operational pages (profile, groups, matches, admin).
   Dark  = marketing / premium (home, checkout, hero sections).

   All components respect CSS custom properties so they adapt
   automatically when wrapped in the appropriate theme class.
   ═══════════════════════════════════════════════════════════════ */


/* ──────────────────────────────────────────────────────────────
   0. DESIGN TOKENS
   ────────────────────────────────────────────────────────────── */

/* Light theme (default) */
.ui-page {
    --ui-bg:          #f4f7fb;
    --ui-bg-soft:     #eef3f9;
    --ui-surface:     #ffffff;
    --ui-surface-alt: #f9fbfd;
    --ui-border:      #d7e0ea;
    --ui-border-soft: rgba(148,163,184,0.26);
    --ui-text:        #0f172a;
    --ui-text-soft:   #334155;
    --ui-muted:       #64748b;
    --ui-green:       #057a3e;
    --ui-green-soft:  rgba(5,122,62,0.10);
    --ui-blue:        #0375B4;
    --ui-blue-soft:   rgba(3,117,180,0.10);
    --ui-accent-bar:  linear-gradient(90deg, rgba(5,122,62,0.95), rgba(2,132,199,0.7));
    --ui-shadow:      0 10px 24px rgba(15,23,42,0.08);
    --ui-shadow-lg:   0 22px 54px rgba(15,23,42,0.08);
    --ui-radius:      1rem;
    --ui-radius-lg:   1.15rem;
    --ui-radius-sm:   0.65rem;
    --ui-radius-pill: 999px;
    --ui-font:        "Poppins", "Segoe UI", system-ui, sans-serif;
    --ui-font-display:"Staatliches", cursive;
    --ui-transition:  0.18s ease;
    background: linear-gradient(180deg, var(--ui-bg) 0%, var(--ui-bg-soft) 100%);
    color: var(--ui-text);
    font-family: var(--ui-font);
}

/* Dark theme modifier */
.ui-theme-dark {
    --ui-bg:          #171a1d;
    --ui-bg-soft:     #1b1f24;
    --ui-surface:     #202428;
    --ui-surface-alt: #23282d;
    --ui-border:      #2f353b;
    --ui-border-soft: rgba(255,255,255,0.06);
    --ui-text:        #f4f4f5;
    --ui-text-soft:   #d4d4d8;
    --ui-muted:       #9ca3af;
    --ui-green:       #44d62c;
    --ui-green-soft:  rgba(68,214,44,0.12);
    --ui-blue:        #60a5fa;
    --ui-blue-soft:   rgba(96,165,250,0.12);
    --ui-accent-bar:  linear-gradient(90deg, rgba(68,214,44,0.85), rgba(59,130,246,0.7));
    --ui-shadow:      0 10px 24px rgba(0,0,0,0.22);
    --ui-shadow-lg:   0 22px 54px rgba(0,0,0,0.28);
    background:
        radial-gradient(900px 420px at 8% -20%, rgba(68,214,44,0.10), transparent 55%),
        radial-gradient(860px 380px at 92% -10%, rgba(59,130,246,0.10), transparent 50%),
        var(--ui-bg);
}


/* ──────────────────────────────────────────────────────────────
   1. LAYOUT & CONTAINERS
   ────────────────────────────────────────────────────────────── */

.ui-container {
    width: min(1200px, calc(100vw - 32px));
    margin: 0 auto;
}

.ui-container-narrow {
    width: min(800px, calc(100vw - 32px));
    margin: 0 auto;
}

.ui-section {
    padding: 3rem 0;
}

.ui-section + .ui-section {
    border-top: 1px solid color-mix(in srgb, var(--ui-border) 60%, transparent);
}

.ui-grid-12 {
    display: grid;
    gap: 1rem;
    grid-template-columns: repeat(12, minmax(0, 1fr));
}
.ui-col-3  { grid-column: span 3; }
.ui-col-4  { grid-column: span 4; }
.ui-col-6  { grid-column: span 6; }
.ui-col-8  { grid-column: span 8; }
.ui-col-12 { grid-column: span 12; }


/* ──────────────────────────────────────────────────────────────
   2. CARD / PANEL  (the most reused component)
   ────────────────────────────────────────────────────────────── */

.ui-card {
    position: relative;
    border-radius: var(--ui-radius);
    border: 1px solid var(--ui-border);
    background: linear-gradient(180deg, var(--ui-surface) 0%, var(--ui-surface-alt) 100%);
    box-shadow: var(--ui-shadow);
    padding: 1.15rem;
    overflow: hidden;
}

/* Optional top accent bar — add .ui-card-accent for the green→blue stripe */
.ui-card-accent::before {
    content: "";
    position: absolute;
    inset: 0 0 auto;
    height: 3px;
    background: var(--ui-accent-bar);
    pointer-events: none;
}

/* Larger padded variant for hero-like panels */
.ui-card-lg {
    border-radius: var(--ui-radius-lg);
    padding: 1.5rem 1.6rem;
    box-shadow: var(--ui-shadow-lg);
}

/* Flush/compact card for nested or tight spaces */
.ui-card-flush {
    padding: 0.85rem 0.95rem;
}

/* Dark card — dark-surfaced panel for embedding in light pages (dashboards, scorecards) */
.ui-card-dark {
    border-radius: var(--ui-radius);
    border: 1px solid #2f353b;
    background: linear-gradient(155deg, #1b1f24 0%, #202428 52%, #23282d 100%);
    box-shadow: var(--ui-shadow-lg);
    padding: 1.15rem;
    overflow: hidden;
    color: #f4f4f5;
}
.ui-card-dark .ui-label {
    color: #9ca3af;
}
.ui-card-dark .ui-label::after {
    background: linear-gradient(90deg, #2f353b, transparent);
}
.ui-card-dark .ui-copy,
.ui-card-dark .ui-copy-sm {
    color: #9ca3af;
}

/* Inner tile for dark cards — lighter inset surface (stats, metrics) */
.ui-card-dark-tile {
    border-radius: var(--ui-radius-sm);
    border: 1px solid #2f353b;
    background: rgba(255,255,255,0.04);
    padding: 0.65rem 0.55rem;
    text-align: center;
}
.ui-card-dark-tile-label {
    display: block;
    font-size: 0.64rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: #9ca3af;
}
.ui-card-dark-tile-value {
    display: block;
    margin-top: 0.18rem;
    font-size: 1.55rem;
    font-weight: 900;
    line-height: 1;
    color: #f4f4f5;
}
.ui-card-dark-tile-sub {
    display: block;
    margin-top: 0.12rem;
    font-size: 0.72rem;
    font-weight: 600;
    color: #9ca3af;
}

/* Faint pitch-style grid overlay — add .ui-card-grid to a .ui-card */
.ui-card-grid {
    position: relative;
    overflow: hidden;
}
.ui-card-grid::after {
    content: "";
    position: absolute;
    inset: 0;
    background:
        repeating-linear-gradient(
            90deg,
            transparent,
            transparent 59px,
            rgba(148, 163, 184, 0.07) 59px,
            rgba(148, 163, 184, 0.07) 60px
        ),
        repeating-linear-gradient(
            0deg,
            transparent,
            transparent 59px,
            rgba(148, 163, 184, 0.07) 59px,
            rgba(148, 163, 184, 0.07) 60px
        );
    pointer-events: none;
    z-index: 0;
}
.ui-card-grid > * {
    position: relative;
    z-index: 1;
}


/* ──────────────────────────────────────────────────────────────
   3. TYPOGRAPHY HELPERS
   ────────────────────────────────────────────────────────────── */

/* Section label — uppercase kicker text with trailing divider line */
.ui-label {
    margin: 0 0 0.35rem;
    display: flex;
    align-items: center;
    gap: 0.65rem;
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--ui-muted);
}
.ui-label::after {
    content: "";
    flex: 1;
    height: 1px;
    background: linear-gradient(90deg, var(--ui-border), transparent);
}

/* Heading scale */
.ui-h1 {
    margin: 0;
    font-size: clamp(2.4rem, 5.5vw, 4.2rem);
    font-weight: 900;
    letter-spacing: -0.04em;
    line-height: 1.08;
    color: var(--ui-text);
}
.ui-h2 {
    margin: 0;
    font-size: clamp(1.6rem, 3.2vw, 2.4rem);
    font-weight: 900;
    letter-spacing: -0.03em;
    line-height: 1.1;
    color: var(--ui-text);
}
.ui-h3 {
    margin: 0;
    font-size: clamp(1.15rem, 2vw, 1.5rem);
    font-weight: 800;
    letter-spacing: -0.01em;
    color: var(--ui-text);
}
.ui-h4 {
    margin: 0;
    font-size: 1rem;
    font-weight: 800;
    color: var(--ui-text);
}

/* Body copy */
.ui-copy {
    margin: 0.4rem 0 0;
    color: var(--ui-muted);
    font-size: 0.92rem;
    line-height: 1.55;
    max-width: 58rem;
}
.ui-copy-sm {
    margin: 0.3rem 0 0;
    color: var(--ui-muted);
    font-size: 0.82rem;
    line-height: 1.45;
}


/* ──────────────────────────────────────────────────────────────
   4. BUTTONS
   ────────────────────────────────────────────────────────────── */

.ui-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.45rem;
    min-height: 42px;
    padding: 0.6rem 1.05rem;
    border-radius: 0.72rem;
    font-family: var(--ui-font);
    font-size: 0.88rem;
    font-weight: 800;
    line-height: 1;
    text-decoration: none;
    cursor: pointer;
    border: 1px solid transparent;
    transition: transform var(--ui-transition), box-shadow var(--ui-transition), background-color var(--ui-transition);
}
.ui-btn:hover { transform: translateY(-1px); }

/* Primary — green CTA */
.ui-btn-primary {
    background: linear-gradient(135deg, var(--ui-green) 0%, color-mix(in srgb, var(--ui-green) 78%, #000) 100%);
    color: #fff;
    border-color: color-mix(in srgb, var(--ui-green) 60%, transparent);
    box-shadow: 0 8px 18px color-mix(in srgb, var(--ui-green) 22%, transparent);
}
.ui-btn-primary:hover {
    box-shadow: 0 12px 24px color-mix(in srgb, var(--ui-green) 30%, transparent);
}

/* Secondary — outlined */
.ui-btn-secondary {
    background: color-mix(in srgb, var(--ui-surface) 95%, transparent);
    color: var(--ui-text);
    border-color: var(--ui-border);
}
.ui-btn-secondary:hover {
    background: color-mix(in srgb, var(--ui-surface) 88%, transparent);
    border-color: color-mix(in srgb, var(--ui-border) 70%, var(--ui-text));
}

/* Danger — destructive */
.ui-btn-danger {
    background: linear-gradient(135deg, #dc2626 0%, #b91c1c 100%);
    color: #fff;
    border-color: rgba(220,38,38,0.45);
    box-shadow: 0 8px 18px rgba(220,38,38,0.18);
}

/* Blue info / premium */
.ui-btn-blue {
    background: linear-gradient(135deg, #0284c7 0%, #0ea5e9 100%);
    color: #fff;
    border-color: rgba(14,165,233,0.45);
    box-shadow: 0 8px 16px rgba(14,165,233,0.22);
}

/* Ghost — transparent background */
.ui-btn-ghost {
    background: transparent;
    color: var(--ui-muted);
    border-color: var(--ui-border);
}
.ui-btn-ghost:hover {
    color: var(--ui-text);
    border-color: color-mix(in srgb, var(--ui-border) 60%, var(--ui-text));
}

/* Small button */
.ui-btn-sm {
    min-height: 34px;
    padding: 0.4rem 0.75rem;
    font-size: 0.78rem;
    border-radius: 0.55rem;
}

/* Large (hero CTA) */
.ui-btn-lg {
    min-height: 48px;
    padding: 0.85rem 1.25rem;
    font-size: 0.96rem;
}


/* ──────────────────────────────────────────────────────────────
   5. CHIPS & BADGES
   ────────────────────────────────────────────────────────────── */

/* ------- 5a. Base chip ------- */
.ui-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    border-radius: var(--ui-radius-pill);
    padding: 0.2rem 0.55rem;
    font-size: 0.75rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    white-space: nowrap;
    border: 1px solid transparent;
}

/* ------- 5b. Status chips (translucent tinted fill) ------- */
.ui-chip-green {
    background: rgba(5,122,62,0.12);
    color: #166534;
    border-color: rgba(5,122,62,0.28);
}
.ui-chip-blue {
    background: rgba(3,117,180,0.13);
    color: #075985;
    border-color: rgba(3,117,180,0.3);
}
.ui-chip-red {
    background: rgba(220,38,38,0.12);
    color: #991b1b;
    border-color: rgba(220,38,38,0.28);
}
.ui-chip-amber {
    background: rgba(255,206,0,0.22);
    color: #854d0e;
    border-color: rgba(224,182,0,0.4);
}
.ui-chip-slate {
    background: rgba(30,41,59,0.07);
    color: #334155;
    border-color: rgba(30,41,59,0.18);
}
.ui-chip-teal {
    background: rgba(13,148,136,0.14);
    color: #115e59;
    border-color: rgba(13,148,136,0.32);
}
.ui-chip-purple {
    background: rgba(168,85,247,0.14);
    color: #6b21a8;
    border-color: rgba(168,85,247,0.32);
}

/* Locked / disabled state — dashed border, muted fill */
.ui-chip-locked {
    background: rgba(148,163,184,0.12);
    color: #475569;
    border: 1px dashed rgba(100,116,139,0.5);
}

/* Dark theme chip overrides — translucent glow style */
.ui-theme-dark .ui-chip-green {
    background: rgba(68,214,44,0.14);
    color: #86efac;
    border-color: rgba(68,214,44,0.32);
}
.ui-theme-dark .ui-chip-blue {
    background: rgba(96,165,250,0.14);
    color: #93c5fd;
    border-color: rgba(96,165,250,0.3);
}
.ui-theme-dark .ui-chip-red {
    background: rgba(239,68,68,0.14);
    color: #fca5a5;
    border-color: rgba(239,68,68,0.3);
}
.ui-theme-dark .ui-chip-amber {
    background: rgba(251,191,36,0.16);
    color: #fde68a;
    border-color: rgba(251,191,36,0.35);
}
.ui-theme-dark .ui-chip-slate {
    background: rgba(148,163,184,0.12);
    color: #94a3b8;
    border-color: rgba(148,163,184,0.25);
}
.ui-theme-dark .ui-chip-teal {
    background: rgba(20,184,166,0.14);
    color: #5eead4;
    border-color: rgba(20,184,166,0.3);
}
.ui-theme-dark .ui-chip-purple {
    background: rgba(168,85,247,0.16);
    color: #d8b4fe;
    border-color: rgba(168,85,247,0.32);
}
.ui-theme-dark .ui-chip-locked {
    background: rgba(100,116,139,0.1);
    color: #64748b;
    border-color: rgba(100,116,139,0.35);
}


/* ------- 5c. Role badges — distinct per role ------- */
.ui-role {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.25rem;
    border-radius: var(--ui-radius-pill);
    padding: 0.2rem 0.55rem;
    font-size: 0.72rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    white-space: nowrap;
    border: 1px solid transparent;
}
.ui-role-admin {
    background: rgba(14,165,233,0.14);
    color: #0c4a6e;
    border-color: rgba(14,165,233,0.4);
}
.ui-role-creator {
    background: rgba(255,206,0,0.18);
    color: #854d0e;
    border-color: rgba(224,182,0,0.5);
}
.ui-role-standard {
    background: rgba(30,41,59,0.06);
    color: #1f2937;
    border-color: rgba(30,41,59,0.16);
}
.ui-role-managed {
    background: rgba(217,119,6,0.13);
    color: #92400e;
    border-color: rgba(217,119,6,0.38);
}

/* Dark overrides for roles */
.ui-theme-dark .ui-role-admin {
    background: rgba(56,189,248,0.14);
    color: #7dd3fc;
    border-color: rgba(56,189,248,0.32);
}
.ui-theme-dark .ui-role-creator {
    background: rgba(250,204,21,0.14);
    color: #fde68a;
    border-color: rgba(250,204,21,0.35);
}
.ui-theme-dark .ui-role-standard {
    background: rgba(148,163,184,0.1);
    color: #94a3b8;
    border-color: rgba(148,163,184,0.22);
}
.ui-theme-dark .ui-role-managed {
    background: rgba(251,146,60,0.14);
    color: #fdba74;
    border-color: rgba(251,146,60,0.3);
}


/* ------- 5d. Rating chips — wider, numeric-friendly ------- */
.ui-rating {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.35rem;
    border-radius: 0.55rem;
    padding: 0.4rem 0.45rem;
    font-size: 0.92rem;
    font-weight: 700;
    color: #1f2937;
    border: 1px solid transparent;
    min-width: 52px;
    text-align: center;
}
.ui-rating-gk {
    background: rgba(255,206,0,0.22);
    border-color: rgba(224,182,0,0.4);
}
.ui-rating-outfield {
    background: rgba(3,117,180,0.14);
    border-color: rgba(3,117,180,0.35);
}
.ui-rating-date {
    background: rgba(38,34,40,0.08);
    border-color: rgba(38,34,40,0.24);
}
.ui-rating-form {
    background: rgba(16,185,129,0.15);
    border-color: rgba(16,185,129,0.38);
}
.ui-rating-form-all {
    background: rgba(168,85,247,0.14);
    border-color: rgba(168,85,247,0.35);
}
.ui-rating-locked {
    background: rgba(148,163,184,0.12);
    border: 1px dashed rgba(100,116,139,0.45);
    color: #64748b;
    font-size: 0.72rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}


/* ------- 5e. Floating chip — live-activity indicator ------- */
.ui-floating-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    padding: 0.48rem 0.75rem;
    border-radius: 0.9rem;
    border: 1px solid var(--ui-border);
    background: color-mix(in srgb, var(--ui-surface) 96%, transparent);
    color: var(--ui-text);
    font-size: 0.78rem;
    font-weight: 700;
    box-shadow: 0 8px 22px rgba(15,23,42,0.12);
}
/* Live dot */
.ui-floating-chip::before {
    content: "";
    flex-shrink: 0;
    width: 0.48rem;
    height: 0.48rem;
    border-radius: 999px;
    background: var(--ui-green);
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--ui-green) 14%, transparent);
    animation: ui-pulse 2.5s ease-in-out infinite;
}
@keyframes ui-pulse {
    0%, 100% { box-shadow: 0 0 0 3px color-mix(in srgb, var(--ui-green) 14%, transparent); }
    50%      { box-shadow: 0 0 0 6px color-mix(in srgb, var(--ui-green) 6%, transparent); }
}
/* Dark floating chip */
.ui-theme-dark .ui-floating-chip {
    background: rgba(32,36,40,0.95);
    border-color: #3a4047;
    box-shadow: 0 10px 28px rgba(0,0,0,0.24);
}


/* ------- 5f. Result pills — win/draw/loss ------- */
.ui-result {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.35em;
    min-width: 42px;
    border-radius: 0.55rem;
    padding: 0.22rem 0.65rem;
    font-size: 0.67rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    border: 1px solid transparent;
    backdrop-filter: blur(4px);
}
.ui-result-win {
    background: linear-gradient(135deg, rgba(5,150,105,0.15) 0%, rgba(16,185,129,0.10) 100%);
    color: #10b981;
    border-color: rgba(16,185,129,0.35);
    box-shadow: 0 1px 4px rgba(5,150,105,0.10);
}
.ui-result-draw {
    background: linear-gradient(135deg, rgba(217,119,6,0.15) 0%, rgba(245,158,11,0.10) 100%);
    color: #f59e0b;
    border-color: rgba(245,158,11,0.35);
    box-shadow: 0 1px 4px rgba(217,119,6,0.10);
}
.ui-result-loss {
    background: linear-gradient(135deg, rgba(220,38,38,0.15) 0%, rgba(239,68,68,0.10) 100%);
    color: #ef4444;
    border-color: rgba(239,68,68,0.30);
    box-shadow: 0 1px 4px rgba(220,38,38,0.10);
}


/* ------- 5g. Kicker — announcement banner above headings ------- */
.ui-kicker {
    display: inline-flex;
    align-items: center;
    min-height: 2rem;
    padding: 0.28rem 0.68rem;
    border-radius: 0.55rem;
    background: var(--ui-green-soft);
    border: 1px solid color-mix(in srgb, var(--ui-green) 22%, transparent);
    color: var(--ui-green);
    font-size: 0.78rem;
    font-weight: 800;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}


/* ──────────────────────────────────────────────────────────────
   6. DATA GRID  (definition-list dt/dd pairs)
   ────────────────────────────────────────────────────────────── */

.ui-data-grid {
    display: grid;
    grid-template-columns: minmax(130px, 38%) minmax(0, 1fr);
    border: 1px solid var(--ui-border-soft);
    border-radius: 0.9rem;
    overflow: hidden;
}
.ui-data-grid dt,
.ui-data-grid dd {
    margin: 0;
    padding: 0.78rem 0.9rem;
    font-size: 0.92rem;
    min-height: 50px;
    display: flex;
    align-items: center;
    box-sizing: border-box;
}
.ui-data-grid dt {
    background: var(--ui-green);
    color: #fff;
    font-weight: 700;
    font-size: 0.82rem;
}
.ui-data-grid dd {
    background: color-mix(in srgb, var(--ui-surface) 94%, var(--ui-bg));
    color: var(--ui-blue);
    font-weight: 700;
}

/* Dark variant — for blue/navy grids */
.ui-data-grid-dark dt {
    background: linear-gradient(135deg, #0f172a 0%, #16263c 100%);
    color: #f8fafc;
    font-size: 0.78rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}
.ui-data-grid-dark dd {
    background: #ffffff;
    color: #0f172a;
    font-weight: 700;
}


/* ──────────────────────────────────────────────────────────────
   7. ATTRIBUTE GRID  (2×3 score grid from profile pages)
   ────────────────────────────────────────────────────────────── */

.ui-attr-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0.65rem;
}
.ui-attr-row {
    display: grid;
    grid-template-columns: 42% 8% 42% 8%;
    border: 1px solid var(--ui-border-soft);
    border-radius: 0.75rem;
    overflow: hidden;
    background: color-mix(in srgb, var(--ui-surface) 96%, var(--ui-bg));
}
.ui-attr-row dt,
.ui-attr-row dd {
    margin: 0;
    min-height: 46px;
    padding: 0.62rem 0.72rem;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.92rem;
    box-sizing: border-box;
}
.ui-attr-row dt {
    background: #0b88cc;
    color: #fff;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}
.ui-attr-row dt.ui-attr-gk {
    background: linear-gradient(135deg, #fde047 0%, #facc15 100%);
    color: #111827;
    border: 1px solid rgba(202,138,4,0.45);
}
.ui-attr-row dt.ui-attr-outfield {
    background: linear-gradient(135deg, #0ea5a4 0%, #0f766e 100%);
    color: #f8fafc;
}
.ui-attr-row dd {
    background: color-mix(in srgb, var(--ui-surface) 93%, #eef2ff);
    color: var(--ui-text);
    font-weight: 800;
}


/* ──────────────────────────────────────────────────────────────
   8. PITCH DIAGRAM  (playing positions visualisation)
   ────────────────────────────────────────────────────────────── */

.ui-pitch {
    position: relative;
    border: 1px solid #86efac;
    border-radius: 0.7rem;
    background:
        linear-gradient(90deg, rgba(255,255,255,0.14), rgba(255,255,255,0.14)),
        repeating-linear-gradient(0deg, #15803d, #15803d 28px, #166534 28px, #166534 56px);
    padding: 0.6rem 0.55rem;
    overflow: hidden;
    user-select: none;
}
/* Inner field outline */
.ui-pitch::before {
    content: "";
    position: absolute;
    inset: 0.45rem;
    border: 2px solid rgba(220,252,231,0.7);
    border-radius: 0.45rem;
    pointer-events: none;
}
/* Centre circle */
.ui-pitch::after {
    content: "";
    position: absolute;
    left: 50%; top: 50%;
    width: 86px; height: 86px;
    transform: translate(-50%, -50%);
    border: 2px solid rgba(220,252,231,0.65);
    border-radius: 999px;
    pointer-events: none;
}
.ui-pitch-row {
    min-height: 80px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 0.36rem;
}
.ui-pitch-center-line {
    height: 1px;
    border-top: 2px dashed rgba(187,247,208,0.75);
    margin: 0.38rem 0 0.5rem;
}
.ui-pitch-center-spot {
    position: absolute;
    left: 50%; top: 50%;
    width: 8px; height: 8px;
    transform: translate(-50%, -50%);
    border-radius: 999px;
    background: rgba(220,252,231,0.85);
    pointer-events: none;
    z-index: 1;
}
.ui-pitch-penalty {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    width: min(220px, 76%);
    height: 38px;
    border: 2px solid rgba(220,252,231,0.58);
    border-radius: 0.25rem;
    pointer-events: none;
}
.ui-pitch-penalty-top    { top: 0.45rem; border-bottom: 0; }
.ui-pitch-penalty-bottom { bottom: 0.45rem; border-top: 0; }

/* Position dots */
.ui-pos-dot {
    width: 64px; height: 64px;
    border-radius: 999px;
    border: 4px solid rgba(255,255,255,0.8);
    background: #ff2d2d;
    position: relative;
    cursor: pointer;
    transition: transform 0.14s ease, box-shadow 0.14s ease;
}
.ui-pos-dot:hover {
    transform: scale(1.06);
    box-shadow: 0 4px 14px rgba(0,0,0,0.3);
}
.ui-pos-dot.can-play  { background: #fbbf24; }
.ui-pos-dot.preferred { background: #41ea36; }
.ui-pos-dot > span {
    position: absolute;
    left: 50%; top: 50%;
    transform: translate(-50%, -50%);
    margin: 0;
    color: #fff;
    font-size: 0.78rem;
    font-family: var(--ui-font);
    font-weight: 900;
    text-transform: uppercase;
    white-space: nowrap;
    letter-spacing: 0.07em;
    line-height: 1;
    text-shadow: 0 1px 3px rgba(15,23,42,0.7);
    background: rgba(15,23,42,0.58);
    border: 1px solid rgba(255,255,255,0.35);
    border-radius: 999px;
    padding: 0.28rem 0.58rem;
    pointer-events: none;
}

/* Position key/legend box */
.ui-pos-legend {
    display: grid;
    gap: 0.28rem;
    padding: 0.65rem 0.78rem;
    border-radius: 0.85rem;
    background: color-mix(in srgb, var(--ui-surface) 96%, var(--ui-bg));
    border: 1px solid var(--ui-border-soft);
}
.ui-pos-legend > div {
    display: flex;
    align-items: center;
    gap: 0.42rem;
}
.ui-pos-legend .swatch {
    width: 16px; height: 16px;
    display: inline-block;
    border-radius: 2px;
    border: 1px solid rgba(255,255,255,0.25);
}
.ui-pos-legend .swatch-pref  { background: #41ea36; }
.ui-pos-legend .swatch-can   { background: #fbbf24; }
.ui-pos-legend .swatch-no    { background: #ff2d2d; }
.ui-pos-legend label {
    color: var(--ui-text-soft);
    font-size: 0.88rem;
    font-weight: 700;
}


/* ──────────────────────────────────────────────────────────────
   9. MATCH CARD  (dark card for upcoming/past matches)
   ────────────────────────────────────────────────────────────── */

.ui-match-card {
    position: relative;
    border-radius: var(--ui-radius);
    color: #fff;
    background: linear-gradient(155deg, #0f172a 0%, #1a2740 100%);
    border: 1px solid rgba(255,255,255,0.08);
    overflow: hidden;
    transition: transform 0.22s ease, box-shadow 0.22s ease;
}
.ui-match-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 14px 28px rgba(15,23,42,0.3);
}
/* Accent top bar */
.ui-match-card::before {
    content: "";
    position: absolute;
    inset: 0 0 auto;
    height: 3px;
    background: var(--ui-accent-bar);
    pointer-events: none;
}
/* Decorative background circle */
.ui-match-card::after {
    content: "";
    position: absolute;
    bottom: -30px; right: -30px;
    width: 110px; height: 110px;
    border: 14px solid rgba(255,255,255,0.04);
    border-radius: 50%;
    pointer-events: none;
}
.ui-match-card-upcoming {
    background: linear-gradient(155deg, #0b1a0f 0%, #0f1f1a 60%, #0f172a 100%);
    border-color: rgba(34,197,94,0.2);
    box-shadow: 0 4px 16px rgba(5,122,62,0.18);
}
.ui-match-card-upcoming:hover {
    box-shadow: 0 14px 28px rgba(5,122,62,0.25);
}
.ui-match-card-cancelled::before {
    background: linear-gradient(90deg, rgba(239,68,68,0.85), rgba(249,115,22,0.7));
}


/* ──────────────────────────────────────────────────────────────
   10. FORM ELEMENTS
   ────────────────────────────────────────────────────────────── */

.ui-input,
.ui-select {
    width: 100%;
    padding: 0.68rem 0.85rem;
    border: 1px solid var(--ui-border);
    border-radius: var(--ui-radius-sm);
    background: var(--ui-surface);
    color: var(--ui-text);
    font-family: var(--ui-font);
    font-size: 0.92rem;
    font-weight: 500;
    transition: border-color var(--ui-transition), box-shadow var(--ui-transition);
    box-sizing: border-box;
}
.ui-input:focus,
.ui-select:focus {
    outline: none;
    border-color: var(--ui-green);
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--ui-green) 14%, transparent);
}
.ui-input::placeholder {
    color: var(--ui-muted);
}

.ui-field-label {
    display: block;
    margin-bottom: 0.35rem;
    color: var(--ui-text-soft);
    font-size: 0.84rem;
    font-weight: 700;
}

/* Dark form field variant */
.ui-theme-dark .ui-input,
.ui-theme-dark .ui-select {
    background: rgba(255,255,255,0.04);
    border-color: var(--ui-border);
    color: var(--ui-text);
}
.ui-theme-dark .ui-input:focus,
.ui-theme-dark .ui-select:focus {
    border-color: rgba(68,214,44,0.45);
    box-shadow: 0 0 0 3px rgba(68,214,44,0.1);
}


/* ──────────────────────────────────────────────────────────────
   11. METRIC CARD (stats dashboard)
   ────────────────────────────────────────────────────────────── */

.ui-metric {
    border-radius: 0.85rem;
    padding: 0.85rem 0.95rem;
    background: linear-gradient(155deg, #0f172a 0%, #1a2740 100%);
    color: #f8fafc;
}
.ui-metric-label {
    margin: 0;
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    opacity: 0.8;
}
.ui-metric-value {
    margin: 0.3rem 0 0;
    font-size: 1.55rem;
    font-weight: 900;
    line-height: 1;
}
.ui-metric-sub {
    margin: 0.2rem 0 0;
    font-size: 0.8rem;
    opacity: 0.75;
}

/* Light metric variant */
.ui-metric-light {
    background: linear-gradient(180deg, var(--ui-surface) 0%, var(--ui-surface-alt) 100%);
    border: 1px solid var(--ui-border);
    color: var(--ui-text);
}


/* ──────────────────────────────────────────────────────────────
   12. MEMBER ROW  (group member list item)
   ────────────────────────────────────────────────────────────── */

.ui-member-row {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 0.9rem;
    padding: 1rem;
    background: linear-gradient(180deg, var(--ui-surface) 0%, color-mix(in srgb, var(--ui-surface) 96%, var(--ui-bg)) 100%);
    border: 1px solid var(--ui-border-soft);
    border-radius: 0.95rem;
    transition: box-shadow var(--ui-transition), border-color var(--ui-transition);
}
.ui-member-row:hover {
    border-color: rgba(14,116,144,0.28);
    box-shadow: 0 10px 20px rgba(15,23,42,0.08);
}


/* ──────────────────────────────────────────────────────────────
   13. INVITE PANEL  (action panel with structured form layout)
   ────────────────────────────────────────────────────────────── */

.ui-invite-panel {
    position: relative;
    border: 1px solid rgba(134,239,172,0.55);
    background: linear-gradient(180deg, #ffffff 0%, #f7fdf9 100%);
    box-shadow: 0 10px 24px rgba(5,122,62,0.07);
    border-radius: var(--ui-radius);
    padding: 1.05rem 1.15rem 1.1rem;
    overflow: hidden;
}
/* Top accent bar */
.ui-invite-panel::before {
    content: "";
    position: absolute;
    inset: 0 0 auto;
    height: 3px;
    background: linear-gradient(90deg, rgba(5,122,62,0.9), rgba(2,132,199,0.6));
    border-radius: var(--ui-radius) var(--ui-radius) 0 0;
    pointer-events: none;
}

.ui-invite-heading {
    margin: 0.1rem 0 0;
    font-size: 0.84rem;
    font-weight: 800;
    color: #0f172a;
    letter-spacing: 0.03em;
    text-transform: uppercase;
}
.ui-invite-heading i {
    margin-right: 0.3rem;
    color: #057a3e;
}

.ui-invite-hint {
    margin: 0.35rem 0 0;
    font-size: 0.8rem;
    color: #64748b;
    line-height: 1.42;
}

.ui-invite-form {
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
    margin-top: 0.7rem;
}

.ui-invite-field {
    display: flex;
    flex-direction: column;
    gap: 0.22rem;
}
.ui-invite-field label {
    display: block;
    font-size: 0.72rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: #475569;
}

.ui-invite-input {
    width: 100%;
    height: 2.35rem;
    border: 1px solid rgba(148,163,184,0.5);
    border-radius: 0.5rem;
    padding: 0 0.65rem;
    background: #fff;
    color: #0f172a;
    font-family: var(--ui-font);
    font-size: 0.88rem;
    font-weight: 500;
    transition: border-color var(--ui-transition), box-shadow var(--ui-transition);
    box-sizing: border-box;
}
.ui-invite-input:focus {
    outline: none;
    border-color: #057a3e;
    box-shadow: 0 0 0 3px rgba(5,122,62,0.1);
}
.ui-invite-input::placeholder {
    color: #94a3b8;
}

.ui-invite-email-row {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 0.55rem;
    align-items: end;
}

/* Success feedback */
.ui-invite-result {
    margin-top: 0.65rem;
    padding: 0.5rem 0.7rem;
    border-radius: 0.5rem;
    font-size: 0.82rem;
    font-weight: 600;
    line-height: 1.42;
    background: #f0fdf4;
    border: 1px solid rgba(134,239,172,0.6);
    color: #166534;
}
.ui-invite-result i { margin-right: 0.3rem; }

/* Warning feedback */
.ui-invite-result-warn {
    background: #fffbeb;
    border-color: rgba(251,191,36,0.5);
    color: #92400e;
}


/* ──────────────────────────────────────────────────────────────
   14. PERFORMANCE HERO CARD  (dark premium rating display)
   ────────────────────────────────────────────────────────────── */

.ui-perf-hero {
    position: relative;
    overflow: hidden;
    border: 1px solid rgba(16,185,129,0.3);
    border-radius: 1.25rem;
    background:
        radial-gradient(circle at 88% 50%, rgba(16,185,129,0.22) 0%, transparent 52%),
        radial-gradient(circle at 15% 85%, rgba(5,150,105,0.1) 0%, transparent 45%),
        linear-gradient(135deg, #0f172a 0%, #111f14 100%);
    box-shadow: 0 24px 48px rgba(0,0,0,0.32), 0 0 0 1px rgba(16,185,129,0.1);
    padding: 1.4rem 1.5rem 1.6rem;
    color: #f1f5f9;
}

/* Rating ring + pill */
.ui-rating-ring {
    width: clamp(140px, 18vw, 168px);
    height: clamp(140px, 18vw, 168px);
    border-radius: 999px;
    border: 2px solid rgba(16,185,129,0.38);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 0 0 7px rgba(16,185,129,0.07), 0 0 44px rgba(16,185,129,0.22);
}
.ui-rating-pill {
    width: clamp(112px, 15vw, 140px);
    height: clamp(112px, 15vw, 140px);
    border-radius: 999px;
    border: 2px solid rgba(255,255,255,0.12);
    background:
        radial-gradient(circle at 30% 28%, rgba(255,255,255,0.22), rgba(255,255,255,0.02) 48%),
        linear-gradient(145deg, #047857 0%, #059669 55%, #10b981 100%);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    box-shadow: inset 0 2px 6px rgba(255,255,255,0.18), 0 14px 30px rgba(5,122,62,0.45);
}
.ui-rating-value {
    font-size: clamp(1.8rem, 3vw, 2.3rem);
    font-weight: 900;
    color: #fff;
    letter-spacing: -0.03em;
    line-height: 1;
}
.ui-rating-denom {
    font-size: 0.6rem;
    font-weight: 700;
    color: rgba(255,255,255,0.72);
    text-transform: uppercase;
    letter-spacing: 0.06em;
    margin-top: 0.2rem;
}

/* No-data variants */
.ui-rating-ring.no-data {
    border-color: rgba(148,163,184,0.3);
    box-shadow: 0 0 0 7px rgba(148,163,184,0.05), 0 0 24px rgba(15,23,42,0.25);
}
.ui-rating-pill.no-data {
    background:
        radial-gradient(circle at 30% 28%, rgba(255,255,255,0.15), rgba(255,255,255,0.02) 46%),
        linear-gradient(145deg, #1e293b 0%, #334155 58%, #475569 100%);
    border-color: rgba(255,255,255,0.08);
    box-shadow: inset 0 2px 4px rgba(255,255,255,0.08), 0 8px 20px rgba(0,0,0,0.3);
}


/* ------- 14b. Performance section helpers ------- */
.ui-perf-inner {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    margin-top: 0.75rem;
    flex-wrap: wrap;
}
.ui-perf-text { flex: 1; min-width: 160px; }
.ui-perf-hero .ui-label { color: #34d399; }
.ui-perf-hero h3 {
    margin: 0.35rem 0 0;
    color: #ffffff;
    font-family: 'Poppins', ui-sans-serif, system-ui, sans-serif;
    font-size: clamp(1.1rem, 1.5vw, 1.3rem);
    font-weight: 700;
    text-transform: none;
}
.ui-perf-hero .ui-copy-sm { color: #cbd5e1; }
.ui-perf-hero .ui-chip { margin-top: 0.65rem; }
.ui-perf-metrics {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.62rem;
    margin-top: 1rem;
}
.ui-perf-details {
    border: 1px solid var(--ui-border-soft);
    border-radius: 0.6rem;
    background: #f8fafc;
    margin-top: 0.5rem;
}
.ui-perf-details > summary {
    list-style: none;
    cursor: pointer;
    padding: 0.65rem 0.85rem;
    font-size: 0.82rem;
    font-weight: 700;
    color: var(--ui-text);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    transition: background 0.15s ease;
    border-radius: 0.6rem;
}
.ui-perf-details > summary:hover {
    background: rgba(15, 23, 42, 0.04);
}
.ui-perf-details > summary::after {
    content: "\f078";
    font-family: "Font Awesome 5 Free";
    font-weight: 900;
    font-size: 0.68rem;
    color: var(--ui-muted);
    transition: transform 0.2s ease;
    flex-shrink: 0;
}
.ui-perf-details > summary::-webkit-details-marker { display: none; }
.ui-perf-details[open] > summary {
    border-bottom: 1px solid var(--ui-border-soft);
    border-radius: 0.6rem 0.6rem 0 0;
    padding-bottom: 0.65rem;
}
.ui-perf-details[open] > summary::after {
    transform: rotate(180deg);
}
.ui-perf-details > .ui-table {
    margin: 0;
    border: 0;
    border-radius: 0 0 0.6rem 0.6rem;
}
.ui-perf-details > .recent-form-detail {
    padding: 0.55rem 0.85rem 0.85rem;
}
.ui-perf-empty { margin: 0; color: var(--ui-muted); font-size: 0.88rem; font-weight: 600; }

/* ------- 14d. Premium expired / locked panel ------- */
.ui-premium-locked {
    border: 1px solid var(--ui-border);
    background: linear-gradient(180deg, var(--ui-surface) 0%, var(--ui-surface-alt) 100%);
    box-shadow: var(--ui-shadow);
    border-radius: var(--ui-radius);
    padding: 1.6rem 1.4rem;
    text-align: center;
}
.ui-premium-locked .ui-premium-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 2.8rem;
    height: 2.8rem;
    margin: 0 auto 0.85rem;
    border-radius: 50%;
    background: var(--ui-green-soft);
    color: var(--ui-green);
    font-size: 1.15rem;
}
.ui-premium-locked h2 {
    font-family: var(--ui-font);
    font-size: 1.1rem;
    font-weight: 800;
    color: var(--ui-text);
    margin: 0 0 0.3rem;
    letter-spacing: -0.01em;
}
.ui-premium-locked .ui-premium-sub {
    color: var(--ui-muted);
    font-size: 0.84rem;
    margin: 0 0 1rem;
    line-height: 1.45;
}
.ui-premium-locked .ui-premium-features {
    list-style: none;
    padding: 0;
    margin: 0 auto 1.15rem;
    display: inline-block;
    text-align: left;
}
.ui-premium-locked .ui-premium-features li {
    color: var(--ui-text-soft);
    font-size: 0.82rem;
    padding: 0.25rem 0;
}
.ui-premium-locked .ui-premium-features li::before {
    content: '\f00c';
    font-family: 'Font Awesome 5 Free';
    font-weight: 900;
    color: var(--ui-green);
    margin-right: 0.55rem;
    font-size: 0.72rem;
}
.ui-premium-locked .ui-premium-pricing {
    background: color-mix(in srgb, var(--ui-bg-soft) 80%, var(--ui-green-soft));
    border: 1px solid var(--ui-border);
    border-radius: var(--ui-radius-sm);
    padding: 0.55rem 0.85rem;
    margin: 0 auto 1.15rem;
    max-width: 26rem;
    font-size: 0.8rem;
    color: var(--ui-muted);
}
.ui-premium-locked .ui-premium-pricing strong {
    color: var(--ui-text);
}

/* ------- 14c. Performance responsive ------- */
@media (max-width: 680px) {
    .ui-perf-inner { justify-content: center; text-align: center; }
    .ui-perf-hero h3 { text-align: center; }
    .ui-perf-metrics { grid-template-columns: 1fr; }
}


──────────────────────────────────────────────────────────────
   15. DANGER ZONE  (destructive action panel)
   ────────────────────────────────────────────────────────────── */

.ui-danger-zone {
    border: 1px solid rgba(244,63,94,0.2);
    background:
        radial-gradient(circle at top right, rgba(251,113,133,0.18), transparent 55%),
        linear-gradient(180deg, #fffaf9 0%, #fff1f2 100%);
    box-shadow: 0 18px 38px rgba(127,29,29,0.08);
    border-radius: var(--ui-radius);
    padding: 1.15rem 1.2rem;
}
.ui-theme-dark .ui-danger-zone {
    background:
        radial-gradient(circle at top right, rgba(239,68,68,0.12), transparent 55%),
        linear-gradient(180deg, #1c1012 0%, #1a1214 100%);
    border-color: rgba(239,68,68,0.18);
}


/* ──────────────────────────────────────────────────────────────
   16. PHOTO CONTAINER  (profile image display)
   ────────────────────────────────────────────────────────────── */

.ui-photo-container {
    border: 1px solid var(--ui-border-soft);
    border-radius: 0.9rem;
    background: linear-gradient(180deg, color-mix(in srgb, var(--ui-surface) 96%, transparent) 0%, color-mix(in srgb, var(--ui-bg) 96%, transparent) 100%);
    padding: 1rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 220px;
}

.ui-photo-img {
    width: 210px;
    max-width: 100%;
    height: 220px;
    border-radius: 0.75rem;
    border: 1px solid rgba(148,163,184,0.3);
    box-shadow: 0 8px 18px rgba(15,23,42,0.14);
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

.ui-shirt {
    width: 190px;
    height: 120px;
    position: relative;
    overflow: hidden;
    background-size: 103% auto;
    background-position: center -16px;
    background-repeat: no-repeat;
    filter: saturate(1.05) contrast(1.03);
}
.ui-shirt .ui-shirt-name {
    position: absolute;
    top: 18px;
    left: 50%;
    transform: translateX(-50%);
    width: 108px;
    overflow: hidden;
    text-align: center;
    margin: 0;
    color: #ffffff;
    font-family: var(--ui-font-display);
    font-size: 0.82rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    line-height: 1;
    text-shadow: 0 1px 2px rgba(15,23,42,0.55);
    white-space: nowrap;
    text-overflow: ellipsis;
}


/* ──────────────────────────────────────────────────────────────
   17. TABLE (simple data table)
   ────────────────────────────────────────────────────────────── */

.ui-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.88rem;
    color: var(--ui-text);
}
.ui-table th {
    text-align: left;
    padding: 0.55rem 0.65rem;
    border-bottom: 2px solid var(--ui-border);
    font-weight: 800;
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--ui-muted);
}
.ui-table td {
    padding: 0.6rem 0.65rem;
    border-bottom: 1px solid color-mix(in srgb, var(--ui-border) 60%, transparent);
}
.ui-table tbody tr:hover {
    background: color-mix(in srgb, var(--ui-surface) 90%, var(--ui-bg));
}
.ui-table tfoot td {
    font-weight: 700;
    border-top: 2px solid #334155;
    border-bottom: none;
}
.ui-table-compact { font-size: 0.82rem; }
.ui-table-compact th,
.ui-table-compact td { padding: 0.42rem 0.55rem; }
.ui-table-compact th { font-size: 0.72rem; }


/* ──────────────────────────────────────────────────────────────
   18. VIEW TOGGLE (segmented pill control)
   ────────────────────────────────────────────────────────────── */

.ui-toggle {
    display: inline-flex;
    gap: 0.35rem;
    border: 1px solid var(--ui-border-soft);
    border-radius: var(--ui-radius-pill);
    background: color-mix(in srgb, var(--ui-surface) 85%, transparent);
    padding: 0.24rem;
}
.ui-toggle-btn {
    border: 0;
    border-radius: var(--ui-radius-pill);
    padding: 0.38rem 0.72rem;
    font-size: 0.74rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--ui-muted);
    background: transparent;
    cursor: pointer;
    transition: all var(--ui-transition);
}
.ui-toggle-btn.is-active {
    background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
    color: #f8fafc;
    box-shadow: 0 8px 14px rgba(15,23,42,0.2);
}


/* ──────────────────────────────────────────────────────────────
   19. UTILITY HELPERS
   ────────────────────────────────────────────────────────────── */

.ui-flex   { display: flex; }
.ui-gap-xs { gap: 0.35rem; }
.ui-gap-sm { gap: 0.55rem; }
.ui-gap-md { gap: 0.85rem; }
.ui-gap-lg { gap: 1.25rem; }
.ui-wrap   { flex-wrap: wrap; }
.ui-items-center { align-items: center; }
.ui-justify-between { justify-content: space-between; }
.ui-mt-sm  { margin-top: 0.55rem; }
.ui-mt-md  { margin-top: 1rem; }
.ui-mt-lg  { margin-top: 1.5rem; }
.ui-mb-sm  { margin-bottom: 0.55rem; }
.ui-mb-md  { margin-bottom: 1rem; }

/* Decorative background blobs (for light page backgrounds) */
.ui-decor::before,
.ui-decor::after {
    content: "";
    position: absolute;
    pointer-events: none;
    z-index: 0;
    border-radius: 999px;
}
.ui-decor::before {
    width: 18rem; height: 18rem;
    top: -6rem; left: -7rem;
    background: radial-gradient(circle, rgba(16,185,129,0.12) 0%, transparent 70%);
}
.ui-decor::after {
    width: 16rem; height: 16rem;
    right: -6rem; bottom: -7rem;
    background: radial-gradient(circle, rgba(14,165,233,0.12) 0%, transparent 72%);
}
.ui-decor > * { position: relative; z-index: 1; }


/* ──────────────────────────────────────────────────────────────
   20. RESPONSIVE BREAKPOINTS
   ────────────────────────────────────────────────────────────── */

@media (max-width: 980px) {
    .ui-col-3, .ui-col-4 { grid-column: span 6; }
    .ui-col-8 { grid-column: span 12; }
}

@media (max-width: 680px) {
    .ui-col-3, .ui-col-4, .ui-col-6, .ui-col-8 { grid-column: span 12; }

    .ui-attr-row {
        grid-template-columns: 1fr 1fr;
    }
    .ui-pos-dot {
        width: 56px; height: 56px;
    }
    .ui-pos-dot > span {
        font-size: 0.68rem;
        padding: 0.22rem 0.42rem;
    }
    .ui-pitch-row {
        min-height: 64px;
    }
}
