:root {
    color-scheme: light;
    --bg: #edf4fb;
    --surface: rgba(255, 255, 255, 0.94);
    --surface-2: #f7faff;
    --surface-dark: #142847;
    --surface-dark-2: #1d3964;
    --text: #1b2f46;
    --text-on-dark: #eef4ff;
    --muted: #64748b;
    --muted-on-dark: rgba(238, 244, 255, 0.72);
    --line: rgba(130, 148, 175, 0.2);
    --line-dark: rgba(255, 255, 255, 0.1);
    --accent: #1f6feb;
    --accent-2: #55a3ff;
    --success: #1f8a70;
    --error: #c14f4f;
    --shadow: 0 18px 42px rgba(29, 54, 92, 0.09);
    --shadow-strong: 0 26px 72px rgba(29, 54, 92, 0.14);
}

* { box-sizing: border-box; }
html {
    scroll-behavior: smooth;
}
body {
    margin: 0;
    font-family: "Aptos", "Segoe UI Variable", "Segoe UI", system-ui, sans-serif;
    color: var(--text);
    background:
        radial-gradient(circle at top right, rgba(85, 163, 255, 0.2), transparent 24%),
        radial-gradient(circle at 0 0, rgba(31, 111, 235, 0.08), transparent 26%),
        linear-gradient(180deg, #f9fbff 0%, var(--bg) 100%);
}

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

.brand-block {
    display: grid;
    gap: 4px;
}

.app-frame {
    display: grid;
    grid-template-columns: 292px minmax(0, 1fr);
    min-height: 100vh;
}

.sidebar {
    position: sticky;
    top: 0;
    align-self: start;
    min-height: 100vh;
    padding: 24px 18px 18px;
    color: var(--text);
    background:
        radial-gradient(circle at top right, rgba(85, 163, 255, 0.16), transparent 26%),
        linear-gradient(180deg, rgba(255, 255, 255, 0.96) 0%, rgba(248, 251, 255, 0.96) 100%);
    border-right: 1px solid var(--line);
    box-shadow: var(--shadow-strong);
}

.sidebar-brand {
    display: grid;
    grid-template-columns: 72px minmax(0, 1fr);
    gap: 14px;
    align-items: center;
    padding: 12px 12px 18px;
}

.sidebar-brand-copy {
    display: grid;
    gap: 6px;
    min-width: 0;
}

.brand-logo {
    display: block;
    object-fit: cover;
    box-shadow: 0 10px 24px rgba(31, 111, 235, 0.16);
}

.brand-logo-sidebar {
    width: 72px;
    height: 72px;
    border-radius: 18px;
}

.brand-logo-auth {
    width: 92px;
    height: 92px;
    border-radius: 22px;
}

.sidebar-brand h1 {
    margin: 0;
    font-size: 1.4rem;
    line-height: 1.1;
    letter-spacing: -.04em;
}

.sidebar-brand p {
    margin: 0;
    color: var(--muted);
    line-height: 1.4;
}

.sidebar-card {
    margin: 6px 8px 18px;
    padding: 14px;
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.72);
    border: 1px solid var(--line);
    backdrop-filter: blur(12px);
}

.sidebar-card span {
    display: block;
    font-size: .75rem;
    text-transform: uppercase;
    letter-spacing: .12em;
    color: var(--accent-2);
    font-weight: 700;
}

.sidebar-card strong {
    display: block;
    margin-top: 7px;
    font-size: 1rem;
    color: var(--text);
}

.sidebar-card p {
    margin: 6px 0 0;
    color: var(--muted);
    font-size: .88rem;
}

.sidebar-footer {
    margin-top: auto;
    padding: 16px 8px 8px;
    border-top: 1px solid var(--line);
}

.sidebar-logout {
    width: 100%;
}

.workspace {
    min-width: 0;
    padding: 14px 28px 40px;
}

.workspace-login {
    min-height: 100vh;
    display: grid;
    place-items: center;
    padding: 28px;
}

.app-shell {
    max-width: 1320px;
    margin: 0 auto;
    padding: 24px 24px 40px;
}

.top-card {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 18px;
    margin-top: 0;
    border-radius: 30px;
    padding: 20px 24px;
    background:
        radial-gradient(circle at top right, rgba(85, 163, 255, 0.14), transparent 24%),
        var(--surface);
}

.top-card-brand {
    display: flex;
    align-items: center;
    gap: 16px;
    min-width: 0;
}

.brand-logo-header {
    width: 72px;
    height: 72px;
    border-radius: 18px;
    box-shadow: 0 14px 30px rgba(31, 111, 235, 0.14);
    flex: 0 0 auto;
}

.top-card-copy {
    display: grid;
    gap: 4px;
    min-width: 0;
}

.top-card-copy h1 {
    margin: 0;
    font-size: 1.52rem;
    line-height: 1.08;
    letter-spacing: -.04em;
}

.top-card-copy p {
    margin: 0;
    color: var(--muted);
}

.top-card-actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 10px;
}

.nav-strip {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
    margin-top: 16px;
    padding: 14px 16px;
}

.nav-strip a {
    display: inline-flex;
    align-items: center;
    padding: 10px 14px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.82);
    border: 1px solid var(--line);
    color: var(--text);
    font-weight: 700;
    transition: transform .15s ease, background .15s ease, border-color .15s ease, color .15s ease;
}

.nav-strip a:hover {
    transform: translateY(-1px);
    background: rgba(255, 255, 255, 0.96);
    border-color: rgba(31, 111, 235, 0.18);
}

.nav-strip a.active {
    background: linear-gradient(135deg, rgba(31, 111, 235, 0.14), rgba(85, 163, 255, 0.18));
    border-color: rgba(31, 111, 235, 0.24);
    color: var(--accent);
    box-shadow: 0 10px 24px rgba(31, 111, 235, 0.12);
}

.app-shell .workspace {
    padding: 18px 0 0;
}

.app-shell .footer-note {
    border-top: 1px solid var(--line);
}

.topbar h1, .panel h2, .auth-card h1 { margin: 0; }
.topbar p, .panel p, .auth-card p { margin: 4px 0 0; color: var(--muted); }
.eyebrow {
    text-transform: uppercase;
    letter-spacing: .14em;
    font-size: .74rem;
    color: var(--accent-2);
    font-weight: 700;
}

.nav {
    display: grid;
    gap: 8px;
    margin-top: 10px;
}

.nav-vertical {
    grid-auto-rows: min-content;
}

.nav a {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 12px 14px;
    border: 1px solid transparent;
    border-radius: 16px;
    background: transparent;
    color: var(--text);
    transition: transform .15s ease, background .15s ease, border-color .15s ease;
}
.nav a:hover {
    transform: translateX(2px);
    background: rgba(31, 111, 235, 0.06);
    border-color: rgba(31, 111, 235, 0.14);
}
.nav a.active {
    background: linear-gradient(135deg, rgba(31, 111, 235, 0.12), rgba(85, 163, 255, 0.14));
    border-color: rgba(31, 111, 235, 0.18);
    color: var(--accent);
}
.nav .muted {
    color: var(--muted);
}

.shell {
    max-width: 1240px;
    margin: 0 auto;
}

.grid {
    display: grid;
    gap: 14px;
}
.portal-grid {
    display: grid;
    gap: 18px;
    grid-template-columns: minmax(0, 1fr);
    align-items: start;
}
.portal-grid > *,
.dashboard-grid > *,
.games-layout > *,
.detail-toggle,
.panel,
.auth-card,
.table-shell {
    min-width: 0;
}
.games-layout {
    display: grid;
    gap: 18px;
}
.games-layout .detail-panel {
    position: static;
    top: auto;
}
.cards {
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    margin-bottom: 12px;
}
.card, .panel, .auth-card {
    border: 1px solid var(--line);
    background: var(--surface);
    backdrop-filter: blur(18px);
    box-shadow: var(--shadow);
}
.card {
    border-radius: 20px;
    padding: 16px 18px;
}
.card span { color: var(--muted); font-size: .92rem; display: block; }
.card strong { font-size: 1.7rem; display: block; margin-top: 8px; letter-spacing: -.04em; }

.stats-cards .card:nth-child(1) strong { color: var(--accent); }
.stats-cards .card:nth-child(2) strong { color: var(--success); }
.stats-cards .card:nth-child(3) strong { color: var(--accent-2); }
.stats-cards .card:nth-child(4) strong { color: var(--error); }
.stats-cards .card:nth-child(5) strong { color: var(--accent); }

.panel, .auth-card {
    border-radius: 28px;
    padding: 24px;
    margin-top: 18px;
    overflow: hidden;
}

.auth-card {
    position: relative;
    isolation: isolate;
    max-width: 620px;
    width: 100%;
    margin: 0 auto;
}

.auth-card::before {
    content: "";
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at top right, rgba(85, 163, 255, 0.16), transparent 30%),
        radial-gradient(circle at bottom left, rgba(31, 111, 235, 0.08), transparent 28%);
    pointer-events: none;
    z-index: -1;
}

.auth-brand {
    display: flex;
    justify-content: center;
    margin-bottom: 20px;
}

.auth-header {
    display: grid;
    gap: 6px;
}

.auth-header h1 {
    font-size: clamp(2.1rem, 4vw, 2.8rem);
    letter-spacing: -.04em;
}

.auth-highlights {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
    margin-top: 12px;
}

.auth-highlights div {
    padding: 14px;
    border-radius: 18px;
    border: 1px solid rgba(130, 148, 175, 0.14);
    background: rgba(255, 255, 255, 0.72);
}

.auth-highlights strong {
    display: block;
    font-size: .95rem;
    margin-bottom: 4px;
}

.auth-highlights span {
    color: var(--muted);
    font-size: .88rem;
    line-height: 1.35;
}

.auth-note {
    margin-top: 10px;
    font-size: .9rem;
    color: var(--muted);
}

.section-head {
    display: flex;
    justify-content: space-between;
    align-items: end;
    gap: 14px;
    margin-bottom: 16px;
}

.club-toolbar {
    display: grid;
    gap: 14px;
    margin-bottom: 16px;
}

.club-search {
    display: flex;
    flex-wrap: wrap;
    align-items: end;
    gap: 10px;
}

.club-search label {
    flex: 1 1 320px;
}

.club-search input[type="search"] {
    width: 100%;
}

.club-search .button {
    min-width: 120px;
}

.club-metrics {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
}

.club-metrics div {
    padding: 12px 0 0;
    border-top: 1px solid var(--line);
}

.club-metrics span {
    display: block;
    font-size: .75rem;
    text-transform: uppercase;
    letter-spacing: .12em;
    color: var(--muted);
    font-weight: 700;
}

.club-metrics strong {
    display: block;
    margin-top: 6px;
    font-size: 1.55rem;
    letter-spacing: -.03em;
}

table {
    width: 100%;
    border-collapse: collapse;
    min-width: 100%;
}
th, td {
    padding: 13px 12px;
    text-align: left;
    border-bottom: 1px solid var(--line);
    vertical-align: top;
}
th {
    font-size: .84rem;
    text-transform: uppercase;
    letter-spacing: .06em;
    color: var(--muted);
}

.table-shell {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    border: 1px solid rgba(130, 148, 175, 0.14);
    border-radius: 22px;
    background: rgba(255, 255, 255, 0.58);
}

.table-shell table {
    min-width: 760px;
}

.club-table {
    min-width: 760px;
}

.club-table td:first-child a {
    color: inherit;
}

.table-title {
    font-weight: 700;
    letter-spacing: -.01em;
}

.table-subtitle {
    color: var(--muted);
    font-size: .88rem;
    margin-top: 3px;
}

.player-row {
    display: flex;
    align-items: center;
    gap: 12px;
}

.player-row-photo {
    width: 42px;
    height: 42px;
    border-radius: 15px;
    overflow: hidden;
    flex: 0 0 auto;
    border: 1px solid var(--line);
    background: var(--surface-2);
    display: grid;
    place-items: center;
    font-size: .82rem;
    font-weight: 800;
    color: var(--accent);
}

.player-row-photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.players-table tr.is-selected td {
    background: rgba(31, 111, 235, 0.05);
}

.row-actions {
    text-align: right;
    vertical-align: middle;
    width: 1%;
    white-space: nowrap;
}

.text-link {
    display: inline-flex;
    align-items: center;
    min-height: 32px;
    padding: 4px 10px;
    border-radius: 999px;
    background: rgba(31, 111, 235, 0.08);
    font-weight: 700;
    line-height: 1;
    cursor: pointer;
}

.text-link:hover {
    background: rgba(31, 111, 235, 0.14);
}

.badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 6px 10px;
    border-radius: 999px;
    font-size: .8rem;
    font-weight: 700;
    background: var(--surface-2);
    color: var(--muted);
    min-width: 78px;
}
.badge.active,
.badge.good {
    background: rgba(31, 138, 112, 0.12);
    color: var(--success);
}
.badge.inactive,
.badge.archived,
.badge.watch,
.badge.recovery {
    background: rgba(85, 163, 255, 0.12);
    color: var(--accent-2);
}
.badge.injured,
.badge.error {
    background: rgba(193, 79, 79, 0.12);
    color: var(--error);
}

.badge.draft {
    background: rgba(130, 148, 175, 0.12);
    color: var(--muted);
}

.badge.published {
    background: rgba(31, 111, 235, 0.12);
    color: var(--accent);
}

.badge.closed {
    background: rgba(47, 107, 69, 0.12);
    color: var(--success);
}

.badge.cancelled {
    background: rgba(164, 70, 59, 0.12);
    color: var(--error);
}

.badge.available {
    background: rgba(47, 107, 69, 0.12);
    color: var(--success);
}

.badge.unavailable {
    background: rgba(164, 70, 59, 0.12);
    color: var(--error);
}

.hero {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    align-items: start;
    gap: 14px;
    margin-top: 0;
    margin-bottom: 18px;
}

.hero h2 {
    margin-top: 0;
    font-size: clamp(1.8rem, 3vw, 2.6rem);
    letter-spacing: -.04em;
    line-height: 1.04;
}

.hero-copy {
    max-width: 860px;
}

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.hero-actions-panel {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
    margin-top: 4px;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
}

.dashboard-hero-panel {
    display: none;
}

.hero-summary-list {
    display: none;
}

.hero-summary-item {
    display: none;
}

.hero-summary-item span {
    display: block;
    font-size: .75rem;
    text-transform: uppercase;
    letter-spacing: .12em;
    color: var(--muted);
    font-weight: 700;
}

.hero-summary-item strong {
    display: block;
    font-size: 1.08rem;
    letter-spacing: -.02em;
}

.hero-summary-item p {
    margin: 0;
    color: var(--muted);
    font-size: .92rem;
    line-height: 1.45;
}

.hero-actions form {
    margin: 0;
}

.dashboard-strip {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px;
    margin-top: 18px;
}

.dashboard-strip-item {
    border: 1px solid var(--line);
    background: rgba(255,255,255,0.76);
    border-radius: 22px;
    padding: 16px 18px;
    box-shadow: 0 14px 30px rgba(21, 32, 27, 0.05);
}

.dashboard-strip-item span {
    display: block;
    font-size: .75rem;
    text-transform: uppercase;
    letter-spacing: .12em;
    color: var(--accent-2);
    font-weight: 700;
}

.dashboard-strip-item strong {
    display: block;
    margin-top: 6px;
    font-size: 1.05rem;
}

.dashboard-strip-item p {
    margin-top: 6px;
    font-size: .92rem;
}

.dashboard-grid {
    display: none;
}

.dashboard-facts {
    display: none;
}

.dashboard-fact {
    padding: 16px;
    border-radius: 20px;
    background: var(--surface-2);
    border: 1px solid rgba(130, 148, 175, 0.1);
}

.dashboard-fact span {
    display: block;
    font-size: .76rem;
    text-transform: uppercase;
    letter-spacing: .12em;
    color: var(--muted);
    font-weight: 700;
}

.dashboard-fact strong {
    display: block;
    margin-top: 8px;
    font-size: 1.12rem;
    letter-spacing: -.02em;
}

.dashboard-fact p {
    margin: 6px 0 0;
    color: var(--muted);
    font-size: .92rem;
    line-height: 1.45;
}

.dashboard-main,
.dashboard-tile {
    border: 1px solid var(--line);
    background: var(--surface);
    border-radius: 24px;
    box-shadow: var(--shadow);
}

.dashboard-main {
    padding: 22px;
    background:
        radial-gradient(circle at top right, rgba(31, 111, 235, 0.08), transparent 26%),
        var(--surface);
}

.dashboard-main-header {
    display: flex;
    align-items: start;
    justify-content: space-between;
    gap: 12px;
}

.dashboard-main h3 {
    margin: 6px 0 0;
    font-size: 1.35rem;
    letter-spacing: -.03em;
}

.dashboard-pill {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 8px 12px;
    border-radius: 999px;
    background: rgba(31, 111, 235, 0.12);
    color: var(--accent);
    font-weight: 800;
    font-size: .8rem;
    white-space: nowrap;
    text-decoration: none;
}

.dashboard-pill.is-active {
    background: rgba(31, 111, 235, 0.16);
    color: var(--accent);
    box-shadow: inset 0 0 0 1px rgba(31, 111, 235, 0.16);
}

.chip-row {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 16px;
}

.checkbox-row {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 14px;
    border-radius: 14px;
    border: 1px solid var(--line);
    background: rgba(255,255,255,0.92);
}

.checkbox-row input {
    width: auto;
    margin: 0;
    flex: 0 0 auto;
}

.checkbox-row span {
    margin: 0;
    color: var(--text);
}

.form-actions form {
    margin: 0;
}

.dashboard-stat-line {
    margin-top: 18px;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
}

.dashboard-stat-line div {
    padding: 14px;
    border-radius: 18px;
    background: var(--surface-2);
    border: 1px solid rgba(130, 148, 175, 0.1);
}

.dashboard-stat-line span,
.dashboard-tile span {
    display: block;
    font-size: .76rem;
    text-transform: uppercase;
    letter-spacing: .12em;
    color: var(--muted);
    font-weight: 700;
}

.dashboard-stat-line strong {
    display: block;
    margin-top: 8px;
    font-size: 1.8rem;
    letter-spacing: -.04em;
}

.dashboard-side {
    display: grid;
    gap: 14px;
}

.dashboard-tile {
    padding: 18px;
}

.dashboard-tile strong {
    display: block;
    margin-top: 6px;
    font-size: 1.05rem;
}

.dashboard-tile p {
    margin-top: 6px;
    font-size: .92rem;
}

.insight-grid {
    display: none;
}

.insight-card {
    padding: 18px;
    border-radius: 22px;
    background: rgba(255, 255, 255, 0.74);
    border: 1px solid rgba(117, 131, 123, 0.14);
    box-shadow: 0 14px 30px rgba(21, 32, 27, 0.05);
}

.insight-card span {
    display: block;
    font-size: .76rem;
    text-transform: uppercase;
    letter-spacing: .12em;
    color: var(--muted);
    font-weight: 700;
}

.insight-card strong {
    display: block;
    margin-top: 8px;
    font-size: 1.35rem;
    letter-spacing: -.03em;
}

.insight-card p {
    margin: 8px 0 0;
    color: var(--muted);
    font-size: .92rem;
    line-height: 1.45;
}

.insight-badge {
    display: inline-flex;
    align-items: center;
    margin-top: 10px;
    padding: 7px 10px;
    border-radius: 999px;
    background: rgba(29, 93, 78, 0.12);
    color: var(--accent);
    font-weight: 700;
    font-size: .8rem;
    text-transform: uppercase;
    letter-spacing: .05em;
}

.chart-list {
    display: grid;
    gap: 14px;
}

.chart-item {
    padding: 16px;
    border-radius: 20px;
    background: var(--surface-2);
    border: 1px solid rgba(117, 131, 123, 0.12);
}

.chart-item-head {
    display: flex;
    justify-content: space-between;
    align-items: start;
    gap: 12px;
    margin-bottom: 10px;
}

.chart-item-head strong {
    font-size: 1.2rem;
    letter-spacing: -.03em;
    color: var(--accent);
}

.chart-track {
    height: 12px;
    background: rgba(117, 131, 123, 0.12);
    border-radius: 999px;
    overflow: hidden;
}

.chart-fill {
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(90deg, var(--accent), #3d8b6f);
}

.chart-meta {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    margin-top: 8px;
    font-size: .88rem;
    color: var(--muted);
}

.report-insights {
    margin-top: 18px;
}

.button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: auto;
    min-width: 140px;
    padding: 12px 16px;
    border-radius: 999px;
    border: 1px solid var(--accent);
    background: linear-gradient(135deg, var(--accent), #2f7df5);
    color: white;
    font-weight: 700;
    cursor: pointer;
    box-shadow: 0 12px 26px rgba(31, 111, 235, 0.16);
}

.button.secondary {
    border-color: var(--line);
    background: rgba(255,255,255,0.9);
    color: var(--text);
    box-shadow: none;
}

.button.danger {
    border-color: var(--error);
    background: var(--error);
}

.portal-grid .detail-panel {
    position: static;
    top: auto;
}

.detail-toggle {
    padding: 0;
    overflow: hidden;
}

.detail-toggle > summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 20px 24px;
    cursor: pointer;
    list-style: none;
    font-weight: 700;
    color: var(--text);
}

.detail-toggle > summary::-webkit-details-marker {
    display: none;
}

.detail-toggle-summary-copy {
    display: grid;
    gap: 4px;
    min-width: 0;
}

.detail-toggle-summary-title {
    font-size: 1.1rem;
    line-height: 1.2;
}

.detail-toggle-summary-hint {
    color: var(--muted);
    font-weight: 400;
    font-size: .92rem;
}

.detail-toggle[open] > summary {
    border-bottom: 1px solid var(--line);
}

.detail-toggle-body {
    padding: 24px;
}

.player-photo-card {
    display: grid;
    grid-template-columns: 120px minmax(0, 1fr);
    gap: 16px;
    align-items: center;
    padding: 16px;
    margin-top: 14px;
    border: 1px solid var(--line);
    border-radius: 20px;
    background: linear-gradient(180deg, rgba(255,255,255,0.9), rgba(246,241,231,0.92));
}

.player-photo {
    width: 120px;
    height: 120px;
    border-radius: 24px;
    overflow: hidden;
    background: var(--surface-2);
    border: 1px solid var(--line);
    display: grid;
    place-items: center;
}

.player-photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.player-photo-empty {
    color: var(--muted);
    font-weight: 700;
    letter-spacing: .08em;
    text-transform: uppercase;
}

.player-photo-meta h3 {
    margin: 4px 0 2px;
    font-size: 1.2rem;
}

.player-photo-meta p {
    margin: 0;
}

.player-photo-note {
    margin-top: 8px;
    color: var(--muted);
    font-size: .92rem;
}

.summary-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
    margin-top: 18px;
}

.summary-grid div {
    padding: 14px;
    border-radius: 16px;
    background: var(--surface-2);
    border: 1px solid rgba(117, 131, 123, 0.08);
}

.summary-grid span {
    display: block;
    font-size: .8rem;
    color: var(--muted);
    text-transform: uppercase;
    letter-spacing: .05em;
}

.summary-grid strong {
    display: block;
    margin-top: 6px;
    font-size: 1.5rem;
}

.detail-summary {
    margin-top: 18px;
    padding-top: 18px;
    border-top: 1px solid var(--line);
}

.detail-summary p {
    margin: 0 0 8px;
    color: var(--text);
}

.detail-summary p:last-child {
    margin-bottom: 0;
}

.empty-state {
    padding: 24px;
    border-radius: 20px;
    background: var(--surface-2);
    border: 1px dashed var(--line);
}

.empty-state h3 {
    margin: 0 0 6px;
}

.banner {
    border-radius: 16px;
    padding: 12px 14px;
    margin-bottom: 14px;
    border: 1px solid transparent;
    box-shadow: 0 10px 20px rgba(31, 36, 33, 0.04);
}
.invite-banner {
    display: grid;
    gap: 12px;
}
.invite-banner-copy strong {
    display: block;
    font-size: 1rem;
    margin-bottom: 4px;
}
.invite-banner-copy p {
    margin: 0;
}
.invite-banner-link {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 10px;
    align-items: center;
}
.invite-banner-link input {
    margin: 0;
    background: rgba(255,255,255,0.96);
}
.invite-copy-button {
    min-width: 160px;
}
.banner.success {
    background: rgba(31, 138, 112, 0.12);
    color: var(--success);
    border-color: rgba(31, 138, 112, 0.22);
}
.banner.error {
    background: rgba(193, 79, 79, 0.12);
    color: var(--error);
    border-color: rgba(193, 79, 79, 0.24);
}

.banner.info {
    background: rgba(31, 111, 235, 0.10);
    color: var(--accent);
    border-color: rgba(31, 111, 235, 0.18);
}

.footer-note {
    margin-top: 18px;
    padding: 14px 16px;
    border-top: 1px solid var(--line);
    color: var(--muted);
    font-size: .9rem;
}

.form-grid {
    display: grid;
    gap: 14px;
    margin-top: 18px;
}
.form-grid.columns-2 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}
.form-grid .full {
    grid-column: 1 / -1;
}
label span {
    display: block;
    margin-bottom: 6px;
    font-size: .9rem;
    color: var(--muted);
}
input, select, button {
    width: 100%;
    padding: 12px 14px;
    border-radius: 14px;
    border: 1px solid var(--line);
    font: inherit;
}
input, select, textarea {
    background: rgba(255,255,255,0.92);
    transition: border-color .15s ease, box-shadow .15s ease, transform .15s ease;
}
input:focus, select:focus, textarea:focus {
    outline: none;
    border-color: rgba(31, 111, 235, 0.36);
    box-shadow: 0 0 0 4px rgba(31, 111, 235, 0.08);
}
textarea {
    width: 100%;
    resize: vertical;
    min-height: 112px;
    padding: 12px 14px;
    border-radius: 14px;
    border: 1px solid var(--line);
    font: inherit;
}
button {
    border: 0;
    background: var(--accent);
    color: white;
    font-weight: 700;
    cursor: pointer;
}
button:hover {
    filter: brightness(1.04);
}

.form-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
}

.form-actions .button {
    width: auto;
}

.game-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 16px;
}

.game-actions form {
    margin: 0;
}

.response-card {
    max-width: 760px;
}

.response-hero {
    display: grid;
    gap: 10px;
}

.response-hero h1 {
    margin: 0;
    font-size: clamp(1.7rem, 4vw, 2.35rem);
    line-height: 1.05;
}

.response-hero p {
    margin: 0;
    max-width: 60ch;
    color: var(--muted);
    font-size: 1rem;
}

.response-hero-note {
    display: grid;
    gap: 4px;
    padding: 12px 14px;
    border-radius: 16px;
    background: rgba(29, 93, 78, 0.08);
    border: 1px solid rgba(29, 93, 78, 0.14);
}

.response-hero-note span {
    font-size: .74rem;
    text-transform: uppercase;
    letter-spacing: .12em;
    color: var(--muted);
    font-weight: 700;
}

.response-hero-note strong {
    font-size: .98rem;
    line-height: 1.45;
}

.response-summary {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
    margin-top: 18px;
}

.response-summary article {
    padding: 14px;
    border-radius: 18px;
    background: rgba(255,255,255,0.68);
    border: 1px solid rgba(117, 131, 123, 0.14);
}

.response-summary span {
    display: block;
    font-size: .76rem;
    text-transform: uppercase;
    letter-spacing: .12em;
    color: var(--muted);
    font-weight: 700;
}

.response-summary strong {
    display: block;
    margin-top: 6px;
    font-size: 1.04rem;
}

.response-summary p {
    margin: 6px 0 0;
    font-size: .92rem;
}

.response-choice-grid {
    display: grid;
    gap: 10px;
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.response-choice {
    display: grid;
    gap: 8px;
    padding: 14px;
    border-radius: 18px;
    border: 1px solid var(--line);
    background: rgba(255,255,255,0.7);
    cursor: pointer;
}

.response-choice:has(input:checked) {
    border-color: rgba(31, 90, 75, 0.45);
    box-shadow: 0 0 0 4px rgba(31, 90, 75, 0.08);
    background: rgba(255,255,255,0.92);
}

.response-choice:focus-within {
    border-color: rgba(31, 90, 75, 0.45);
    box-shadow: 0 0 0 4px rgba(31, 90, 75, 0.08);
}

.response-choice input {
    width: auto;
    margin: 0;
}

.response-choice strong {
    display: block;
}

.response-choice span {
    color: var(--muted);
}

.response-form {
    margin-top: 18px;
    padding-top: 4px;
    border-top: 1px solid rgba(117, 131, 123, 0.10);
}

.response-confirmation {
    margin-top: 14px;
}

.compact-field {
    display: grid;
    gap: 6px;
}

.compact-field span {
    margin-bottom: 0;
}

.callup-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

@media (max-width: 1080px) {
    .app-frame {
        grid-template-columns: 1fr;
    }

    .sidebar {
        position: static;
        min-height: auto;
        border-right: 0;
        border-bottom: 1px solid var(--line);
        padding-bottom: 18px;
    }

    .nav-vertical {
        grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    }

    .sidebar-footer {
        padding-top: 12px;
    }

    .portal-grid {
        grid-template-columns: 1fr;
    }

    .portal-grid .detail-panel {
        position: static;
        top: auto;
    }

    .auth-highlights,
    .dashboard-strip {
        grid-template-columns: 1fr;
    }

    .dashboard-grid {
        grid-template-columns: 1fr;
    }

    .dashboard-stat-line {
        grid-template-columns: 1fr;
    }

    .club-metrics {
        grid-template-columns: 1fr;
    }

    .dashboard-facts {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 720px) {
    .workspace {
        padding: 12px 16px 32px;
    }
    .sidebar {
        padding-left: 14px;
        padding-right: 14px;
    }
    .nav a {
        padding: 10px 13px;
    }
    .form-grid.columns-2 {
        grid-template-columns: 1fr;
    }
    .section-head {
        align-items: start;
        flex-direction: column;
    }
    .portal-grid {
        grid-template-columns: 1fr;
    }
    .table-shell table,
    .club-table {
        min-width: 0;
        table-layout: auto;
        width: 100%;
    }
    th,
    td {
        padding: 10px 8px;
        overflow-wrap: anywhere;
    }
    .row-actions {
        white-space: nowrap;
        width: 1%;
    }
    .text-link {
        min-width: 0;
        white-space: nowrap;
    }
    code {
        white-space: normal;
        word-break: break-word;
    }
    .cards {
        grid-template-columns: 1fr;
    }
    .card strong {
        font-size: 1.75rem;
    }
    .hero {
        align-items: start;
        flex-direction: column;
    }
    .hero h2 {
        font-size: 1.55rem;
    }
    .hero-actions {
        width: 100%;
    }
    .hero-actions > * {
        flex: 1 1 100%;
    }
    .hero-actions-panel {
        width: 100%;
    }
    .button {
        width: 100%;
        min-width: 0;
    }
    .table-shell {
        border-radius: 16px;
    }

    .club-search {
        align-items: stretch;
    }

    .club-search label {
        flex-basis: 100%;
    }

    .club-search .button {
        width: 100%;
    }

    .club-metrics {
        gap: 10px;
    }

    .player-photo-card {
        grid-template-columns: 1fr;
    }
    .player-photo {
        width: 100%;
        height: 220px;
    }
    .summary-grid {
        grid-template-columns: 1fr;
    }
    .auth-card {
        padding: 18px;
    }
    .invite-banner-link {
        grid-template-columns: 1fr;
    }
    .invite-copy-button {
        width: 100%;
        min-width: 0;
    }
}

@media (max-width: 480px) {
    .workspace {
        padding-left: 12px;
        padding-right: 12px;
    }
    .cards {
        grid-template-columns: 1fr;
    }
    .panel, .auth-card {
        padding: 18px;
        border-radius: 22px;
    }
    .player-row {
        gap: 10px;
    }
    .player-row-photo {
        width: 38px;
        height: 38px;
        border-radius: 13px;
    }
}

@media (max-width: 720px) {
    .response-summary,
    .response-choice-grid {
        grid-template-columns: 1fr;
    }

    .response-card {
        padding: 18px 16px;
    }
}

@media (max-width: 1080px) {
    .app-shell {
        padding: 20px 16px 32px;
    }

    .top-card {
        flex-direction: column;
        align-items: stretch;
    }

    .top-card-actions {
        justify-content: flex-start;
    }

    .hero {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 720px) {
    .app-shell {
        padding: 14px 12px 28px;
    }

    .top-card {
        padding: 16px;
        border-radius: 24px;
    }

    .top-card-brand {
        align-items: flex-start;
    }

    .brand-logo-header {
        width: 60px;
        height: 60px;
        border-radius: 16px;
    }

    .top-card-copy h1 {
        font-size: 1.25rem;
    }

    .top-card-actions .button {
        width: 100%;
        min-width: 0;
    }

    .nav-strip {
        padding: 12px;
    }

    .nav-strip a {
        flex: 1 1 calc(50% - 10px);
        justify-content: center;
    }

    .hero-actions-panel {
        padding: 14px;
    }

    .panel,
    .auth-card {
        padding: 18px;
        border-radius: 22px;
    }

    .button {
        width: 100%;
        min-width: 0;
    }
}

@media (max-width: 480px) {
    .nav-strip a {
        flex-basis: 100%;
    }

    .card strong {
        font-size: 1.8rem;
    }
}

@media print {
    :root {
        --bg: #ffffff;
        --surface: #ffffff;
        --surface-2: #ffffff;
        --text: #000000;
        --muted: #333333;
        --line: #d0d0d0;
        --accent: #000000;
        --accent-2: #000000;
        --success: #000000;
        --error: #000000;
        --shadow: none;
        --shadow-strong: none;
    }

    body {
        background: #ffffff !important;
    }

    .sidebar,
    .hero-actions,
    .game-actions,
    .form-actions,
    .archive-form,
    nav,
    .footer-note,
    button,
    a.button,
    .banner,
    .table-shell .row-actions {
        display: none !important;
    }

    .app-frame,
    .workspace,
    .panel,
    .print-sheet {
        padding: 0 !important;
        margin: 0 !important;
        border: 0 !important;
        box-shadow: none !important;
        background: #ffffff !important;
    }

    .workspace {
        width: 100%;
    }

    .print-sheet {
        display: grid;
        gap: 16px;
    }

    .print-header {
        display: flex;
        justify-content: space-between;
        gap: 16px;
        align-items: start;
        border-bottom: 1px solid var(--line);
        padding-bottom: 12px;
    }

    .print-header h2 {
        margin: 4px 0 4px;
    }

    .print-status {
        padding: 8px 12px;
        border: 1px solid var(--line);
        border-radius: 999px;
        font-weight: 700;
        white-space: nowrap;
    }

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

    .print-card,
    .print-notes,
    .print-section {
        border: 1px solid var(--line);
        border-radius: 16px;
        padding: 14px;
    }

    .print-card span,
    .print-notes span {
        display: block;
        font-size: .76rem;
        text-transform: uppercase;
        letter-spacing: .12em;
        color: var(--muted);
        font-weight: 700;
        margin-bottom: 6px;
    }

    .print-card strong {
        display: block;
        font-size: 1rem;
    }

    .print-section h3 {
        margin: 0 0 10px;
    }

    .print-empty {
        margin: 0;
        color: var(--muted);
    }

    .print-list {
        display: grid;
        gap: 8px;
    }

    .print-list-item {
        display: flex;
        justify-content: space-between;
        gap: 12px;
        border-top: 1px solid var(--line);
        padding-top: 8px;
    }

    .print-list-item strong {
        flex: 0 0 auto;
    }

    .print-list-item span {
        color: var(--muted);
        text-align: right;
    }

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

    .print-subgroup + .print-subgroup {
        margin-top: 12px;
    }

    .print-table {
        width: 100%;
        border-collapse: collapse;
    }

    .print-table th,
    .print-table td {
        padding: 10px 8px;
        border-bottom: 1px solid var(--line);
    }

    @page {
        size: A4 portrait;
        margin: 12mm;
    }
}
