/* =====================================================
   serveup — App Stylesheet
   Colour theme: Roland-Garros clay court palette, modernized.
   Brand (retained):
     Primary green  : #00503c  (RG forest green / nav / labels)
     Primary orange : #cc4e0e  (RG terracotta / buttons / accents)
   Canvas (modernized — feature 012 UX migration, Step A1):
     Background     : #f4f1ea  (soft parchment-tinted canvas)
     Surface        : #ffffff  (crisp white cards / inputs)
     Border         : #e6ded0  (warm hairline)
   ===================================================== */

/* ---------- Reset & Base ---------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
    /* --- Retained brand palette (green + terracotta) --- */
    --color-accent:    #cc4e0e;   /* RG terracotta orange — primary CTAs */
    --color-accent-2:  #00503c;   /* RG forest green — secondary / labels */
    --color-accent-2-dark: #033629; /* RG deep green — headings, btn hover, hero */
    --color-nav-bg:    #00503c;   /* RG deep green — nav bar */
    --color-nav-text:  #f0ebe3;

    /* --- Modernized canvas (cooler, cleaner than the old clay-sand) --- */
    --color-bg:        #f4f1ea;   /* soft parchment-tinted canvas */
    --color-surface:   #ffffff;   /* crisp white cards / inputs */
    --color-surface-2: #faf7f1;   /* subtly raised surface */
    --color-border:    #e6ded0;   /* warm hairline border */
    --color-border-2:  #d8cdb8;   /* stronger divider */
    --color-text:      #1c1612;   /* near-black warm */
    --color-muted:     #6b5a45;   /* mid warm-brown */

    /* --- Matrix summary footer tiers (cool neutral surfaces, tinted
           with the RG green accent — consistent with the swimlane tint,
           replacing the former warm-brown parchment bands) --- */
    --color-summary:       #f2f4f1;   /* base totals band */
    --color-summary-total: #e8eee9;   /* emphasised "total games" band */
    --color-summary-hours: #eef2ef;   /* WMP hours band */

    /* --- Status colours (+ tinted backgrounds for Phase B) --- */
    --color-danger:    #d1442a;
    --color-danger-bg: #fbe6e1;
    --color-warn:      #b45309;
    --color-warn-bg:   #fbeddb;
    --color-success:   #157a1b;   /* success green — confirmations */
    --color-success-bg:#e6f4e6;

    /* --- Radius scale --- */
    --radius-sm:       8px;
    --radius:          10px;
    --radius-lg:       14px;

    /* --- Elevation (for Phase B cards/nav) --- */
    --shadow-sm:       0 1px 2px rgba(28, 22, 18, 0.06),
                       0 1px 3px rgba(28, 22, 18, 0.05);
    --shadow:          0 4px 12px rgba(28, 22, 18, 0.08),
                       0 2px 4px rgba(28, 22, 18, 0.05);
    --shadow-lg:       0 12px 32px rgba(28, 22, 18, 0.14);

    /* --- Typography & motion --- */
    --font:            'Inter', system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
    --font-heading:    'Inter', system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
    --transition:      0.18s cubic-bezier(0.4, 0, 0.2, 1);

    /* --- Layout (folded in from the former second :root block) --- */
    --nav-height:      52px;
    --sidebar-width:   220px;
}

html, body {
    background: var(--color-bg);
    color: var(--color-text);
    font-family: var(--font, system-ui, sans-serif);
    font-size: 15px;
    line-height: 1.6;
    min-height: 100vh;
}

html.sidebar-open,
body.sidebar-open {
    overflow: hidden;
}

a { color: var(--color-accent); text-decoration: none; }
a:hover { text-decoration: underline; }

/* ---------- Navigation ---------- */
.nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 0 1.5rem;
    height: var(--nav-height);
    background: linear-gradient(135deg, var(--color-nav-bg) 0%, #033a2c 100%);
    box-shadow: var(--shadow-sm);
    position: sticky;
    top: 0;
    z-index: 100;
}
.nav__brand {
    display: inline-flex;
    align-items: center;
    gap: 0.55rem;
    font-size: 1.2rem;
    font-weight: 700;
    letter-spacing: -0.02em;
    color: #fff;
    text-decoration: none;
}
.nav__brand:hover { text-decoration: none; color: #fff; }
.nav__brand-logo {
    width: 30px;
    height: 30px;
    border-radius: 9px;
    background: var(--color-accent);
    display: grid;
    place-items: center;
    box-shadow: inset 0 0 0 2px rgba(255,255,255,0.15);
    flex-shrink: 0;
}
.nav__brand-img { display: block; width: 20px; height: 20px; }

/* Active-season indicator (persistent season context, feature 012) */
.nav__active-season {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.3rem 0.75rem;
    background: rgba(255,255,255,0.16);
    border-radius: 999px;
    font-size: 0.85rem;
    min-width: 0;
    /* Center in the nav bar independent of brand (left) / user menu (right). */
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    max-width: 50%;
}
.nav__active-season::before {
    content: "";
    width: 7px;
    height: 7px;
    flex-shrink: 0;
    border-radius: 50%;
    background: var(--color-accent);
    box-shadow: 0 0 0 3px rgba(204,78,14,0.28);
}
.nav__active-season-label {
    color: rgba(240,235,227,0.6);
    text-transform: uppercase;
    letter-spacing: 0.03em;
    font-size: 0.7rem;
    white-space: nowrap;
}
.nav__active-season-name {
    color: var(--color-nav-text);
    font-weight: 600;
    max-width: 12rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.nav__active-season-name:hover { color: #e87040; text-decoration: none; }
@media (max-width: 768px) {
    /* On narrow screens the toggle + brand + user icon leave no room to safely
       absolute-center; fall back to normal flow so nothing overlaps the brand. */
    .nav__active-season {
        position: static;
        left: auto;
        transform: none;
        margin: 0 auto;
        gap: 0.35rem;
        padding: 0.15rem 0.45rem;
        max-width: 40%;
    }
    .nav__active-season-label { display: none; }
    .nav__active-season-name { max-width: 7rem; }
}
.nav__links { display: flex; align-items: center; gap: 1.25rem; }
.nav__links a { color: var(--color-nav-text); font-size: 0.9rem; font-weight: 500; }
.nav__links a:hover { color: var(--color-accent); text-decoration: none; }
.nav__user { color: rgba(240,235,227,0.65); font-size: 0.875rem; }
.nav__lang { display: flex; align-items: center; gap: 0.4rem; }
.nav__lang-link { display: inline-flex; opacity: 0.7; transition: opacity 0.15s, box-shadow 0.15s; }
.nav__lang-link:hover { opacity: 1; }
.nav__lang-link .fi { width: 1.35rem; height: 1.35rem; border-radius: 3px; box-shadow: 0 0 0 1px rgba(0,0,0,0.15); }

/* ---------- Main layout ---------- */
.main-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem 1.5rem;
}

/* ---------- App body (sidebar + content) ---------- */
.app-body {
    display: flex;
    align-items: flex-start;
    min-height: calc(100vh - 52px);
}

/* ---------- Sidebar ---------- */
.sidebar {
    width: var(--sidebar-width);
    flex-shrink: 0;
    background: var(--color-surface);
    border-right: 1px solid var(--color-border);
    padding: 1.25rem 0.85rem;
    position: sticky;
    top: var(--nav-height);
    max-height: calc(100vh - var(--nav-height));
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 1.4rem;
}

/* ---------- Sidebar active-season context card ---------- */
.sidebar__season {
    padding: 0.85rem 0.9rem;
    border-radius: var(--radius);
    background: linear-gradient(135deg, var(--color-surface) 0%, var(--color-surface-2) 100%);
    border: 1px solid var(--color-border);
    box-shadow: var(--shadow-sm);
}
.sidebar__season-label {
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--color-muted);
}
.sidebar__season-name {
    display: flex;
    align-items: center;
    gap: 0.45rem;
    margin-top: 0.2rem;
    font-weight: 700;
    color: var(--color-accent-2);
    font-size: 1.02rem;
}
.sidebar__season-name::before {
    content: "";
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--color-accent);
    box-shadow: 0 0 0 3px rgba(204, 78, 14, 0.2);
    flex: 0 0 8px;
}

.sidebar__mobile-header {
    display: none;
}

.sidebar__mobile-title {
    font-size: 0.82rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--color-accent-2);
}

.sidebar__mobile-close {
    display: none;
    align-items: center;
    justify-content: center;
    width: 2rem;
    height: 2rem;
    border: none;
    border-radius: 999px;
    background: var(--color-surface-2);
    color: var(--color-text);
    cursor: pointer;
    font-size: 1.4rem;
    line-height: 1;
}

.sidebar__mobile-close:hover {
    background: var(--color-border);
}

.sidebar-backdrop {
    display: none;
}

.app-body .main-content {
    flex: 1;
    min-width: 0;
}

.sidebar__section {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.sidebar__section-label {
    font-size: 0.68rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.09em;
    color: var(--color-muted);
    padding: 0 0.65rem 0.4rem;
}

.sidebar__link {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    padding: 0.55rem 0.65rem;
    border-radius: var(--radius-sm);
    font-size: 0.92rem;
    font-weight: 500;
    color: var(--color-text);
    text-decoration: none;
    position: relative;
    transition: background var(--transition), color var(--transition);
}

.sidebar__icon {
    width: 18px;
    height: 18px;
    flex: 0 0 18px;
    color: var(--color-muted);
    transition: color var(--transition);
}

.sidebar__link:hover {
    background: var(--color-surface-2);
    color: var(--color-text);
    text-decoration: none;
}

.sidebar__link--active {
    background: var(--color-success-bg);
    color: var(--color-accent-2);
    font-weight: 650;
}

.sidebar__link--active .sidebar__icon {
    color: var(--color-accent-2);
}

.sidebar__link--active::before {
    content: "";
    position: absolute;
    left: -0.85rem;
    top: 50%;
    transform: translateY(-50%);
    width: 3px;
    height: 60%;
    border-radius: 0 3px 3px 0;
    background: var(--color-accent-2);
}

.sidebar__link--active:hover {
    color: var(--color-accent-2);
    background: var(--color-success-bg);
}

.sidebar__link--disabled {
    color: var(--color-muted);
    opacity: 0.5;
    pointer-events: none;
    cursor: default;
}

/* ---------- Page header ---------- */
.page-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1.5rem;
}
.page-title {
    font-size: 1.75rem;
    font-weight: 700;
    letter-spacing: -0.5px;
    color: var(--color-accent-2-dark);
}

/* ---------- Cards ---------- */
.card {
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
    padding: 1.35rem 1.5rem;
    margin-bottom: 1rem;
    box-shadow: var(--shadow-sm);
}
/* Public upcoming-session preview: light-yellow card, inheriting the app
   body font so session lines wrap on word boundaries, not mid-word. */
.preview-box {
    background: #fff9db;
    margin-bottom: 0.75rem;
}
/* Title matches the login card's field-label size so the top gap is identical. */
.preview-box .card__title {
    font-size: 0.8rem;
}
.preview-box ul {
    list-style: none;
    margin: 0;
    padding: 0;
}
.preview-box li {
    font-size: 0.9rem;
}
.preview-box li + li {
    margin-top: 0.15rem;
}
/* Small-print data timestamp: the box is a daily snapshot, not live. */
.preview-cache-hint {
    margin-top: 0.35rem;
    font-size: 0.72rem;
    color: var(--color-muted);
}
/* Opt-in hover lift for clickable cards (e.g. season list). Non-interactive
   content cards stay static. */
.card--interactive {
    transition: transform var(--transition, 0.18s ease),
                box-shadow var(--transition, 0.18s ease),
                border-color var(--transition, 0.18s ease);
}
.card--interactive:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow);
    border-color: var(--color-border-2);
}
.card__title {
    font-size: 1.05rem;
    font-weight: 700;
    letter-spacing: -0.01em;
    margin-bottom: 0.75rem;
    color: var(--color-accent-2);
}

/* Responsive card grid (ported from the POC `.poc-grid`, tokenized).
   Fills available width with equal columns, min 300px each, collapsing to a
   single column on narrow viewports. Grid children shed the stacked-card
   `margin-bottom` since the grid `gap` handles spacing. */
.card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1.1rem;
}
.card-grid > .card { margin-bottom: 0; }

/* Card sub-elements for tile layouts (ported from `.poc-card__*`). */
.card__top {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 0.75rem;
}
/* A card title used as a tile heading (in a grid tile) drops the block
   bottom-margin and reads slightly larger. */
.card-grid .card__title { margin-bottom: 0; font-size: 1.1rem; }
.card__meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem 0.9rem;
    color: var(--color-muted);
    font-size: 0.86rem;
    margin-top: 0.6rem;
}
.card__meta-item { display: inline-flex; align-items: center; gap: 0.3rem; }
.card__footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.6rem;
    margin-top: 0.85rem;
    padding-top: 0.85rem;
    border-top: 1px solid var(--color-border);
}
.card__cost { font-size: 0.9rem; font-weight: 600; color: var(--color-muted); }

/* ---------- Manual pages ---------- */
.manual-page {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.manual-hero {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.5rem;
    padding: 2rem;
    overflow: hidden;
    border: 1px solid rgba(0, 80, 60, 0.28);
    border-radius: 22px;
    background:
        radial-gradient(circle at top right, rgba(204, 78, 14, 0.28), transparent 34%),
        linear-gradient(135deg, #f8f0e4 0%, #ead6bd 52%, #d7b487 100%);
    box-shadow: 0 18px 38px rgba(60, 30, 10, 0.16);
}

.manual-hero--admin {
    background:
        radial-gradient(circle at top right, rgba(0, 80, 60, 0.22), transparent 34%),
        linear-gradient(135deg, #f8f0e4 0%, #e6d3ba 52%, #cfa26f 100%);
}

.manual-kicker {
    margin-bottom: 0.45rem;
    color: var(--color-accent);
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.manual-hero__title {
    margin: 0;
    color: var(--color-accent-2-dark);
    font-size: clamp(2rem, 4vw, 3.15rem);
    font-weight: 800;
    letter-spacing: -0.06em;
    line-height: 1;
}

.manual-hero__text {
    max-width: 56rem;
    margin-top: 0.9rem;
    color: #2a2119;
    font-size: 1.08rem;
}

.manual-hero__hint {
    max-width: 48rem;
    margin-top: 0.55rem;
    color: var(--color-muted);
}

.manual-hero__badge {
    display: grid;
    place-items: center;
    min-width: 9rem;
    min-height: 9rem;
    padding: 1rem;
    border: 1px solid rgba(0, 80, 60, 0.18);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.38);
    color: var(--color-accent-2);
    text-align: center;
    box-shadow: inset 0 0 0 8px rgba(255, 255, 255, 0.22);
}

.manual-hero__badge span {
    display: block;
    font-size: 2rem;
}

.manual-hero__badge strong {
    display: block;
    margin-top: 0.35rem;
    font-size: 0.82rem;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

.manual-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1rem;
}

.manual-page .card {
    position: relative;
    height: 100%;
    margin-bottom: 0;
    border-color: rgba(176, 138, 94, 0.7);
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.38), rgba(255, 255, 255, 0)),
        var(--color-surface);
    box-shadow: 0 10px 24px rgba(60, 30, 10, 0.12);
}

.manual-page .card::before {
    content: "";
    position: absolute;
    inset: 0 auto 0 0;
    width: 5px;
    border-radius: var(--radius-lg) 0 0 var(--radius-lg);
    background: linear-gradient(180deg, var(--color-accent), var(--color-accent-2));
}

.manual-page .card__title {
    font-size: 1.15rem;
    font-weight: 800;
    letter-spacing: -0.02em;
}

.manual-page .card p {
    color: #3f3227;
}

.manual-page .card > ul {
    display: grid;
    gap: 0.6rem;
    margin: 1rem 0 1rem 0.1rem;
    padding-left: 1.1rem;
}

.manual-page .card > ul li::marker {
    color: var(--color-accent);
}

.manual-page .card h3 {
    display: inline-flex;
    align-items: center;
    margin: 0.9rem 0 0.35rem;
    padding: 0.18rem 0.55rem;
    border-radius: 999px;
    background: rgba(0, 80, 60, 0.10);
    color: var(--color-accent-2);
    font-size: 0.76rem;
    font-weight: 800;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

.manual-video-card {
    display: grid;
    grid-template-columns: minmax(0, 0.95fr) minmax(18rem, 1.25fr);
    gap: 1.25rem;
    align-items: center;
    padding: 1.25rem;
    border: 1px solid rgba(0, 80, 60, 0.24);
    border-radius: 22px;
    background: linear-gradient(135deg, var(--color-accent-2-dark) 0%, var(--color-accent-2) 52%, #1e6a55 100%);
    color: #f8f0e4;
    box-shadow: 0 18px 38px rgba(0, 40, 30, 0.25);
}

.manual-video-card .manual-kicker,
.manual-video-card h2,
.manual-video-card p {
    color: #f8f0e4;
}

.manual-video-card h2 {
    margin-bottom: 0.6rem;
    font-size: 1.45rem;
    line-height: 1.15;
}

.manual-video-card p {
    opacity: 0.86;
}

.manual-download-button {
    margin-top: 1rem;
}

.manual-video-frame {
    overflow: hidden;
    border: 1px solid rgba(248, 240, 228, 0.24);
    border-radius: 16px;
    background: #111;
    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.28);
}

.manual-video-frame video {
    display: block;
    width: 100%;
    max-height: 420px;
    background: #111;
}

@media (max-width: 900px) {
    .manual-grid,
    .manual-video-card {
        grid-template-columns: 1fr;
    }

    .manual-hero {
        align-items: flex-start;
    }
}

@media (max-width: 640px) {
    .manual-hero {
        flex-direction: column;
        padding: 1.35rem;
    }

    .manual-hero__badge {
        min-width: 100%;
        min-height: auto;
        border-radius: 16px;
    }
}

/* ---------- Tables ---------- */
.table-wrap {
    overflow-x: auto;
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
}
.session-matrix-wrap {
    max-height: 70vh;
    overflow-y: auto;
}
.session-matrix-wrap > table {
    border-collapse: separate;
    border-spacing: 0;
}
.session-matrix-wrap thead th {
    position: sticky;
    top: 0;
    z-index: 3;
    background: var(--color-surface-2);
}
.session-matrix-wrap thead .swimlane {
    /* The column stripe is translucent; headers need an opaque layer over player markers. */
    background: var(--color-surface-2);
}
table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9rem;
}
th {
    text-align: left;
    padding: 0.7rem 1rem;
    background: var(--color-surface-2);
    color: var(--color-accent-2);
    font-weight: 700;
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    border-bottom: 1px solid var(--color-border);
}
td {
    padding: 0.7rem 1rem;
    border-bottom: 1px solid var(--color-border);
    vertical-align: middle;
}
tr:last-child td { border-bottom: none; }
tr:hover td { background: var(--color-surface-2); }
.td-num { text-align: right; font-variant-numeric: tabular-nums; }

/* ---------- Badges ---------- */
.badge {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.2rem 0.6rem;
    border-radius: 999px;
    font-size: 0.75rem;
    font-weight: 650;
    letter-spacing: 0.01em;
    line-height: 1.4;
}
.badge::before {
    content: "";
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: currentColor;
    opacity: 0.9;
}
.badge--green  { background: var(--color-success-bg);   color: var(--color-success); }
.badge--blue   { background: rgba(29,78,137,0.12);      color: #1d4e89; }
.badge--purple { background: rgba(90,50,120,0.12);      color: #5a2d82; }
.badge--red    { background: var(--color-danger-bg);    color: var(--color-danger); }
.badge--yellow { background: var(--color-warn-bg);      color: var(--color-warn); }
.badge--grey   { background: #efe9dd;                   color: var(--color-muted); }

/* ---------- Buttons ---------- */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    padding: 0.5rem 1rem;
    border-radius: var(--radius-sm);
    font-family: inherit;
    font-size: 0.875rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    border: 1px solid transparent;
    text-decoration: none;
}
.btn--primary        { background: var(--color-accent); color: #fff; box-shadow: var(--shadow-sm); }
.btn--primary:hover  { background: #ab3d10; text-decoration: none; color: #fff; transform: translateY(-1px); box-shadow: var(--shadow); }
.btn--secondary      { background: var(--color-accent-2); color: #fff; }
.btn--secondary:hover{ background: var(--color-accent-2-dark); text-decoration: none; color: #fff; transform: translateY(-1px); box-shadow: var(--shadow); }
.btn--danger         { background: var(--color-danger); color: #fff; box-shadow: var(--shadow-sm); }
.btn--danger:hover   { background: #991b1b; text-decoration: none; color: #fff; transform: translateY(-1px); box-shadow: var(--shadow); }
.btn--ghost          { background: transparent; color: var(--color-muted); border: 1px solid var(--color-border); }
.btn--ghost:hover    { color: var(--color-text); background: var(--color-surface-2); border-color: var(--color-border-2); text-decoration: none; }
.btn--sm             { padding: 0.35rem 0.7rem; font-size: 0.8rem; }
.btn--outline        { background: var(--color-surface); color: var(--color-text); border: 1px solid var(--color-border-2); }
.btn--outline:hover  { background: var(--color-surface-2); color: var(--color-text); border-color: var(--color-muted); text-decoration: none; }
.btn--icon {
    justify-content: center;
    width: 2rem;
    height: 2rem;
    padding: 0;
    border-radius: 0.6rem;
}
.btn--icon svg,
.btn--icon img {
    width: 1.25rem;
    height: 1.25rem;
    object-fit: contain;
    flex-shrink: 0;
}
.btn--icon.btn--sm {
    width: 1.85rem;
    height: 1.85rem;
}
.btn--icon--file svg {
    width: 1.5rem;
    height: 1.5rem;
}
.csv-file-icon .st0 {
    fill: currentColor;
    fill-rule: evenodd;
    clip-rule: evenodd;
}
.btn--icon-label {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}
.action-icons {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
}

/* ---------- Forms ---------- */
.form-group { margin-bottom: 1rem; }
.form-group label { display: block; font-size: 0.8rem; font-weight: 600; margin-bottom: 0.4rem; color: var(--color-muted); letter-spacing: 0.01em; }
.form-control {
    width: 100%;
    padding: 0.55rem 0.8rem;
    background: var(--color-surface);
    border: 1px solid var(--color-border-2);
    border-radius: var(--radius-sm);
    color: var(--color-text);
    font-family: inherit;
    font-size: 0.9rem;
    transition: var(--transition);
}
.form-control::placeholder { color: var(--color-muted); opacity: 0.7; }
.form-control:hover { border-color: var(--color-muted); }
.form-control:focus { outline: none; border-color: var(--color-accent); box-shadow: 0 0 0 3px var(--color-danger-bg); }
.form-row { display: flex; gap: 1rem; flex-wrap: wrap; }
.form-row .form-group { flex: 1; min-width: 180px; }
.form-error { color: var(--color-danger); font-size: 0.8rem; margin-top: 0.3rem; }

/* ---------- Alerts ---------- */
.alert {
    display: flex;
    align-items: flex-start;
    gap: 0.55rem;
    padding: 0.75rem 1rem;
    border: 1px solid transparent;
    border-radius: var(--radius-sm);
    margin-bottom: 1rem;
    font-size: 0.9rem;
}
.alert--warn   { background: var(--color-warn-bg);    border-color: rgba(180,83,9,0.28);  color: #7c3a05; }
.alert--error  { background: var(--color-danger-bg);  border-color: rgba(209,68,42,0.30); color: #8a2517; }
.alert--info   { background: var(--color-surface-2);  border-color: var(--color-border-2); color: #014030; }
.alert--success{ background: var(--color-success-bg); border-color: rgba(21,122,27,0.28); color: #0d5411; }

/* ---------- Confirmation modal ---------- */
body.confirm-open {
    overflow: hidden;
}

.confirm-modal[hidden] {
    display: none !important;
}

.confirm-modal {
    position: fixed;
    inset: 0;
    z-index: 1200;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.25rem;
}

.confirm-modal__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(28, 22, 18, 0.56);
}

.confirm-modal__dialog {
    position: relative;
    width: min(30rem, 100%);
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    box-shadow: 0 18px 45px rgba(28, 22, 18, 0.24);
    padding: 1.35rem;
}

.confirm-modal__header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 0.75rem;
    margin-bottom: 0.75rem;
}

.confirm-modal__title {
    margin: 0;
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--color-accent-2);
}

.confirm-modal__close {
    border: none;
    background: transparent;
    color: var(--color-muted);
    cursor: pointer;
    font-size: 1.35rem;
    line-height: 1;
    padding: 0.1rem;
}

.confirm-modal__close:hover,
.confirm-modal__close:focus-visible {
    color: var(--color-text);
    outline: none;
}

.confirm-modal__message {
    margin: 0 0 0.85rem;
    color: var(--color-text);
}

.confirm-modal__context[hidden] {
    display: none !important;
}

.confirm-modal__context:not([hidden]) {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0.15rem;
    margin: 0 0 1rem;
    padding: 0.85rem 1rem;
    border-radius: var(--radius);
    background: rgba(0, 80, 60, 0.06);
    border: 1px solid rgba(176, 138, 94, 0.55);
}

.confirm-modal__context-label {
    margin: 0;
    font: inherit;
    font-size: 0.78rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--color-muted);
}

.confirm-modal__context-value {
    margin: 0 0 0.55rem;
    font: inherit;
    font-size: 0.95rem;
    color: var(--color-text);
    font-weight: 600;
    line-height: 1.35;
    word-break: break-word;
}

.confirm-modal__context-value:last-child {
    margin-bottom: 0;
}

.confirm-modal__actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 0.6rem;
}

/* ---------- Empty state ---------- */
.empty-state {
    text-align: center;
    padding: 3.5rem 1.5rem;
    background: var(--color-surface);
    border: 1px dashed var(--color-border-2);
    border-radius: var(--radius);
    color: var(--color-muted);
}
.empty-state__title { font-size: 1.15rem; font-weight: 700; color: var(--color-text); margin-bottom: 0.4rem; }
.empty-state__body  { font-size: 0.9rem; max-width: 420px; margin: 0 auto 1.25rem; }

/* ---------- HTMX indicators ---------- */
.htmx-indicator { opacity: 0; transition: opacity 0.2s; }
.htmx-request .htmx-indicator { opacity: 1; }

/* ---------- Utility ---------- */
.text-muted  { color: var(--color-muted); }
.text-danger { color: var(--color-danger); }
.text-accent { color: var(--color-accent); }
.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.gap-1 { gap: 0.5rem; }
.flex { display: flex; }
.flex-center { display: flex; align-items: center; }
.justify-between { justify-content: space-between; }

/* ---------- Table row states ---------- */
.row--warning td { background: rgba(180,83,9,0.06); }
.row--success td { background: rgba(0,80,60,0.06); }
.text-right { text-align: right; }

/* ---------- Generator details/summary ---------- */
.generator-details { padding: 1rem 1.5rem; }
.generator-details[open] { padding-bottom: 1.5rem; }
.generator-summary {
    cursor: pointer;
    user-select: none;
    list-style: none;
    display: flex;
    align-items: center;
    gap: 0.4rem;
    margin-bottom: 0;
    color: var(--color-accent-2);
    font-weight: 600;
}
.generator-summary::before {
    content: '▶';
    font-size: 0.65rem;
    color: var(--color-accent);
    transition: transform var(--transition);
}
details[open] > .generator-summary::before { transform: rotate(90deg); }
.generator-summary::-webkit-details-marker { display: none; }

/* ---------- Player-matrix columns (session table) ---------- */
.player-matrix-th {
    text-align: center;
    padding: 0.5rem 0.3rem;
    font-size: 0.7rem;
    min-width: 2.2rem;
    max-width: 3rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.player-matrix-td {
    text-align: center;
    padding: 0.4rem 0.2rem;
    width: 2.2rem;
    min-width: 2.2rem;
}

/* ---------- Session row coloring by match type ---------- */
.session-matrix-wrap .session-row--singles td {
    background: rgba(122, 143, 58, 0.10);
}

.session-matrix-wrap .session-row--doubles td {
    background: rgba(204, 78, 14, 0.08);
}

/* Compact columns (Court / Match / Type) */
.col-compact {
    width: 1px;               /* shrink-to-fit: takes only as much as its content */
    white-space: nowrap;
    padding-left: 0.4rem;
    padding-right: 0.4rem;
    text-align: center;
}

/* Fixed-width roster columns: DATE fits "dd.MM.yy" (8 chars), TIME fits "19h-21h" with room so the last char is not clipped by the swimlane. */
.col-date,
.col-time {
    white-space: nowrap;
    overflow: hidden;
    font-variant-numeric: tabular-nums;
    padding-left: 0.4rem;
    padding-right: 0.4rem;
}
.col-date {
    width: 8ch;
    min-width: 8ch;
    max-width: 8ch;
}
.col-time {
    width: 8ch;
    min-width: 8ch;
    max-width: 8ch;
    text-align: center;
}

.col-notes {
    width: 10ch;              /* compact notes column; full text opens in a tap-to-open dialog */
    min-width: 10ch;
    max-width: 10ch;
    white-space: nowrap;
    padding-left: 0.4rem;
    padding-right: 0.4rem;
}

.season-note-cell {
    /* Truncated preview only — the full note opens in the notes dialog. */
    width: 10ch;
    min-width: 10ch;
    max-width: 10ch;
    padding-left: 0.4rem;
    padding-right: 0.4rem;
}

.season-note {
    display: block;
    max-width: 10ch;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    vertical-align: middle;
}

button.season-note-btn {
    background: none;
    border: 0;
    margin: 0;
    padding: 0.55rem 0;      /* enlarges the touch target without stretching the column */
    font: inherit;
    color: inherit;
    text-align: left;
    cursor: pointer;
    min-height: 2.75rem;     /* ~44px touch target */
}

button.season-note-btn:hover,
button.season-note-btn:focus-visible {
    text-decoration: underline;
    text-underline-offset: 2px;
    outline: none;
}

button.season-note-btn:focus-visible {
    outline: 2px solid var(--color-accent);
    outline-offset: 1px;
    border-radius: 2px;
}

/* Full note text inside the dialog: wrap and scroll within the dialog. */
#app-note-message {
    white-space: pre-wrap;
    word-break: break-word;
    max-height: 50vh;
    overflow-y: auto;
}

#app-note-context {
    margin: 0 0 0.85rem;
    font-size: 0.8rem;
    color: var(--color-muted);
}

/* ---------- Player swimlane vertical tracking ---------- */
.swimlane {
    border-left: 1px solid #dcc9b0;
    border-right: 1px solid #dcc9b0;
}
.swimlane:nth-child(odd) {
    background: rgba(0,80,60,0.03);
}
thead .swimlane {
    border-top: 2px solid var(--color-border);
}
tfoot .swimlane {
    border-bottom: 2px solid var(--color-border);
}
/* Substitute player columns get a subtle dashed border */
.player-sub {
    border-left-style: dashed;
    border-right-style: dashed;
}

/* Historic rows stay readable while remaining visually distinct from the active schedule. */
.session-matrix-wrap .session-row--past td {
    background: #67625d;
    color: #e6e1da;
}

.session-matrix-wrap .session-row--past td.text-muted {
    color: #e6e1da;
}

/* Player Lock: this state must override the swimlane stripe without affecting the marker's own palette. */
.player-matrix-td.player-locked-cell,
.session-matrix-wrap .player-matrix-td.player-locked-cell {
    background: rgba(29, 78, 137, 0.12);
}

/* Blocking stays visible over the match-type stripe. */
.player-matrix-td.player-blocked-cell,
.session-matrix-wrap .player-matrix-td.player-blocked-cell {
    background-color: #f5c1ba;
    background-image: repeating-linear-gradient(
        135deg,
        rgba(177, 38, 26, 0.24) 0,
        rgba(177, 38, 26, 0.24) 2px,
        transparent 2px,
        transparent 5px
    );
}

.player-matrix-td.player-blocked-cell.player-locked-cell,
.session-matrix-wrap .player-matrix-td.player-blocked-cell.player-locked-cell {
    box-shadow: inset 0 0 0 2px #1d4e89;
}

/* ---------- Colored circle markers with initials ---------- */
.alloc-marker {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.35rem;
    height: 1.35rem;
    min-width: 1.35rem;
    border-radius: 50%;
    padding: 0;
    font-size: 0.58rem;
    font-weight: 800;
    line-height: 1;
    letter-spacing: 0;
    vertical-align: middle;
    text-transform: uppercase;
    text-align: center;
    font-variant-numeric: tabular-nums;
    font-family: "Avenir Next", "Segoe UI", sans-serif;
    border: 1px solid rgba(28,22,18,0.14);
    box-shadow: inset 0 -1px 0 rgba(28,22,18,0.10);
}

.marker-tone-1 { background: var(--color-accent); color: #fdf6ee; }
.marker-tone-2 { background: var(--color-accent-2); color: #f5ede0; }
.marker-tone-3 { background: #b66a2c; color: #fff7ee; }
.marker-tone-4 { background: #d8b07c; color: #2d2016; }
.marker-tone-5 { background: #8c5a32; color: #fff4e6; }
.marker-tone-6 { background: #7a8f3a; color: #fffaf0; }

/* Legacy alloc-dot kept for compatibility */
.alloc-dot {
    display: inline-block;
    width: 0.55rem;
    height: 0.55rem;
    border-radius: 50%;
    background: var(--color-accent);
    vertical-align: middle;
}

/* ---------- Summary rows ---------- */
.summary-title-row td {
    background: transparent;
    border: 0;
    padding-top: 1rem;
    padding-bottom: 0.35rem;
}

.summary-title-cell {
    font-family: var(--font-heading, system-ui, sans-serif);
    font-size: 1rem;
    color: var(--color-accent-2);
    letter-spacing: 0.03em;
    border-top: 2px solid rgba(140, 90, 50, 0.22);
}

.summary-row td {
    background: var(--color-summary);
    border-bottom: 1px solid var(--color-border);
    font-weight: 650;
    font-size: 0.8rem;
}

.summary-row--total td {
    background: var(--color-summary-total);
}

.summary-row--hours td {
    background: var(--color-summary-hours);
}

/* Summary bands must read as one solid horizontal band: override the
   .swimlane:nth-child(odd) column stripe (higher specificity) so every
   player column matches the row background instead of alternating. */
.summary-row td.swimlane:nth-child(odd),
.summary-row td.swimlane:nth-child(even) {
    background: var(--color-summary);
}
.summary-row--total td.swimlane:nth-child(odd),
.summary-row--total td.swimlane:nth-child(even) {
    background: var(--color-summary-total);
}
.summary-row--hours td.swimlane:nth-child(odd),
.summary-row--hours td.swimlane:nth-child(even) {
    background: var(--color-summary-hours);
}

.summary-label {
    text-align: left;
    color: var(--color-accent-2);
    text-transform: uppercase;
    font-size: 0.75rem;
    letter-spacing: 0.04em;
}
.summary-cell {
    text-align: center;
    font-variant-numeric: tabular-nums;
    color: var(--color-text);
}

.inactive-player {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
}

.inactive-player__icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 0.95rem;
    height: 0.95rem;
    border-radius: 999px;
    border: 1px solid rgba(180, 83, 9, 0.35);
    background: rgba(180, 83, 9, 0.12);
    color: var(--color-warn);
    font-size: 0.68rem;
    line-height: 1;
    font-weight: 700;
}

.inactive-player__label {
    color: var(--color-warn);
    font-size: 0.75rem;
    font-weight: 600;
}

.inactive-player--muted {
    color: var(--color-muted);
}

.inactive-player--muted .inactive-player__icon {
    width: 0.82rem;
    height: 0.82rem;
    font-size: 0.62rem;
}

.inactive-player-checkbox {
    opacity: 0.76;
}

.players-filter-form {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.players-filter-form__checkbox {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    color: var(--color-text);
    font-weight: 500;
}

/* ---------- Action bar / quick links ---------- */
/* Buttons size to their content (icon + label) for the compact, airy header
   treatment adopted from the 012 look-and-feel POC — no forced fixed width. */
.action-bar { flex-wrap: wrap; align-items: center; }
.quick-links { flex-wrap: wrap; }
.action-bar .btn--icon,
.quick-links .btn--icon { min-width: 0; }

.nav__user-dropdown { position: relative; }
.nav__user-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 2.1rem;
    height: 2.1rem;
    border-radius: 50%;
    background: rgba(255,255,255,0.18);
    border: none;
    cursor: pointer;
    color: #fff;
    transition: background var(--transition);
}
.nav__user-icon:hover { background: rgba(255,255,255,0.32); }
.nav__dropdown-menu {
    position: absolute;
    top: 100%;
    right: 0;
    margin-top: 0.6rem;
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
    box-shadow: var(--shadow-lg);
    min-width: 190px;
    display: none;
    z-index: 200;
    overflow: hidden;
}
.nav__dropdown-menu--open { display: block; }
.nav__dropdown-header { padding: 0.75rem 1rem; }
.nav__dropdown-username { font-weight: 600; color: var(--color-accent-2); font-size: 0.9rem; }
.nav__dropdown-divider { height: 1px; background: var(--color-border); margin: 0; }
.nav__dropdown-lang { padding: 0.5rem 0; }
.nav__dropdown-lang a {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    color: var(--color-text);
    font-size: 0.875rem;
}
.nav__dropdown-lang a:hover { background: rgba(204,78,14,0.08); text-decoration: none; }
.nav__dropdown-lang .fi { width: 1.25rem; height: 1.25rem; border-radius: 3px; }
.nav__dropdown-item {
    display: block;
    width: 100%;
    padding: 0.6rem 1rem;
    color: var(--color-text);
    font-size: 0.875rem;
    background: none;
    border: none;
    text-align: left;
    cursor: pointer;
}
.nav__dropdown-item:hover { background: rgba(204,78,14,0.08); text-decoration: none; color: var(--color-text); }
.nav__dropdown-item--btn { font-family: inherit; font-size: inherit; }
/* Override .nav__links a color for dropdown anchor items */
.nav__dropdown-menu a.nav__dropdown-item { color: var(--color-text); text-decoration: none; }

/* ---------- Mobile nav hamburger toggle ---------- */
.nav__toggle {
    display: none;
    flex-direction: column;
    justify-content: center;
    gap: 4px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.4rem;
    z-index: 101;
}
.nav__toggle span {
    display: block;
    width: 22px;
    height: 2.5px;
    background: var(--color-nav-text);
    border-radius: 2px;
    transition: transform 0.2s, opacity 0.2s;
}
.nav__toggle--open span:nth-child(1) { transform: translateY(6.5px) rotate(45deg); }
.nav__toggle--open span:nth-child(2) { opacity: 0; }
.nav__toggle--open span:nth-child(3) { transform: translateY(-6.5px) rotate(-45deg); }

/* ---------- Welcome / Login page centering ---------- */
.login-body {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
}
.login-container {
    width: 100%;
    max-width: 480px;
    text-align: center;
    padding: 1rem;
    margin: 0 auto;
}

/* ---------- Responsive — small screens ---------- */
@media (max-width: 768px) {
    /* — Nav — */
    .nav {
        padding: 0.6rem 1rem;
    }
    .nav__toggle { display: flex; }
    .nav__lang { margin-top: 0.25rem; }

    /* — Sidebar drawer — */
    .app-body {
        display: block;
    }
    .sidebar {
        position: fixed;
        top: var(--nav-height);
        left: 0;
        bottom: 0;
        width: min(18rem, calc(100vw - 2.5rem));
        max-height: none;
        z-index: 190;
        transform: translateX(-100%);
        transition: transform 0.2s ease;
        box-shadow: 18px 0 36px rgba(28,22,18,0.22);
    }
    .sidebar--mobile-open {
        transform: translateX(0);
    }
    .sidebar__mobile-header {
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 0.75rem;
        padding: 0 1rem 0.9rem;
        border-bottom: 1px solid var(--color-border);
    }
    .sidebar__mobile-close {
        display: inline-flex;
    }
    .sidebar-backdrop {
        display: block;
        position: fixed;
        inset: var(--nav-height) 0 0 0;
        z-index: 180;
        border: none;
        background: rgba(28, 22, 18, 0.42);
        opacity: 1;
        transition: opacity 0.2s ease;
    }
    .sidebar-backdrop[hidden] {
        display: block !important;
        opacity: 0;
        pointer-events: none;
    }

    /* — Main layout — */
    .main-content {
        padding: 1rem 0.75rem;
        width: 100%;
    }

    /* — Page header — */
    .page-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.75rem;
    }
    .page-title {
        font-size: 1.35rem;
    }

    /* — Cards — */
    .card {
        padding: 1rem;
        border-radius: var(--radius);
    }

    /* — Forms — */
    .form-row {
        flex-direction: column;
        gap: 0;
    }
    .form-row .form-group {
        min-width: unset;
        width: 100%;
    }

    /* — Tables — */
    .table-wrap {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        margin: 0 -0.5rem;
        padding: 0 0.5rem;
    }
    .session-matrix-wrap {
        max-height: 60svh;
    }
    table { font-size: 0.82rem; }
    th { font-size: 0.72rem; padding: 0.45rem 0.5rem; }
    td { padding: 0.45rem 0.5rem; }

    /* — Button groups — */
    .flex.gap-1 {
        flex-wrap: wrap;
        gap: 0.4rem;
    }
    .btn { font-size: 0.8rem; padding: 0.4rem 0.75rem; }
    .btn--sm { font-size: 0.75rem; padding: 0.2rem 0.5rem; }
    .btn--icon,
    .btn--icon.btn--sm {
        width: 2rem;
        height: 2rem;
        padding: 0;
    }

    /* — Season show: quick links — */
    .flex.gap-1.mt-2.mb-2 {
        flex-wrap: wrap;
    }

    /* — Season show: admin header buttons — */
    .page-header .flex.gap-1 {
        flex-wrap: wrap;
        gap: 0.35rem;
    }

    /* — Player matrix columns tighter on mobile — */
    .player-matrix-th {
        font-size: 0.6rem;
        padding: 0.35rem 0.15rem;
        min-width: 1.8rem;
        max-width: 2.2rem;
    }
    .player-matrix-td {
        padding: 0.3rem 0.1rem;
        width: 1.8rem;
        min-width: 1.8rem;
    }
    .alloc-marker {
        width: 1.1rem;
        height: 1.1rem;
        min-width: 1.1rem;
        font-size: 0.48rem;
    }

    /* — Generator details — */
    .generator-details { padding: 0.75rem 1rem; }

    /* — Players page: inline forms — */
    td[style*="white-space:nowrap"] { white-space: normal !important; }
    td form[style*="display:inline"] { display: block; margin-bottom: 0.3rem; }
    td form input.form-control[style*="width:120px"] { width: 100% !important; display: block !important; margin-bottom: 0.3rem; }

    /* — Payments page: tfoot layout — */
    .card tfoot td { font-size: 0.8rem; }

    /* — Audit overlay — */
    #audit-overlay > div { width: 96vw !important; padding: 1rem !important; }

    /* — Confirmation modal — */
    .confirm-modal {
        padding: 0.75rem;
    }
    .confirm-modal__dialog {
        width: 100%;
        padding: 1rem;
    }
    .confirm-modal__actions {
        flex-direction: column-reverse;
        align-items: stretch;
    }
    .confirm-modal__actions .btn {
        width: 100%;
        justify-content: center;
    }
    /* — Empty state — */
    .empty-state { padding: 2rem 1rem; }

    /* — Badges — */
    .badge { font-size: 0.68rem; padding: 0.1rem 0.4rem; }

    /* — Welcome / login page — */
    .login-container { padding: 0.75rem !important; }
}

/* ---------- Responsive — very small screens (< 480px) ---------- */
@media (max-width: 480px) {
    .main-content { padding: 0.75rem 0.5rem; }
    .sidebar {
        width: calc(100vw - 1.25rem);
    }
    .page-title { font-size: 1.15rem; }
    .card { padding: 0.75rem; }
    table { font-size: 0.78rem; }
    th { font-size: 0.68rem; padding: 0.35rem 0.35rem; }
    td { padding: 0.35rem 0.35rem; }

    /* Tighter matrix */
    .player-matrix-th { font-size: 0.55rem; min-width: 1.5rem; max-width: 1.8rem; padding: 0.3rem 0.1rem; }
    .player-matrix-td { width: 1.5rem; min-width: 1.5rem; padding: 0.25rem 0.05rem; }
    .alloc-marker { width: 0.95rem; height: 0.95rem; min-width: 0.95rem; font-size: 0.42rem; }

    /* Stack season card content vertically */
    .flex-center.justify-between {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }
}
