@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&display=swap');

:root {
    --basketball-orange: #ef6c00;
    --basketball-orange-dark: #d95f00;
    --basketball-orange-soft: #fff3e8;
    --sidebar-bg: #071014;
    --sidebar-bg-2: #101820;
    --page-bg: #f5f7fb;
    --card-bg: #ffffff;
    --text-main: #111827;
    --text-muted: #6b7280;
    --border-soft: #e5e7eb;
    --success: #138a36;
    --danger: #c2410c;
    --shadow-soft: 0 10px 30px rgba(15, 23, 42, 0.08);
}

* {
    box-sizing: border-box;
}

html {
    font-size: 16px;
    min-height: 100%;
}

body {
    margin: 0;
    min-height: 100vh;
    background: var(--page-bg);
    color: var(--text-main);
    font-family: Inter, "Segoe UI", Arial, sans-serif;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    font-variant-numeric: tabular-nums;
}

a {
    text-decoration: none;
}

.portal-shell {
    min-height: 100vh;
    display: flex;
    background: var(--page-bg);
}

.portal-sidebar {
    width: 260px;
    min-height: 100vh;
    background: radial-gradient(circle at top right, rgba(239, 108, 0, 0.18), transparent 30%), linear-gradient(180deg, var(--sidebar-bg), var(--sidebar-bg-2));
    color: #ffffff;
    padding: 22px 18px;
    display: flex;
    flex-direction: column;
    position: sticky;
    top: 0;
}

.sidebar-brand {
    padding: 8px 8px 26px 8px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    margin-bottom: 18px;
}

.brand-mark {
    color: var(--basketball-orange);
    font-weight: 700;
    font-size: 18px;
    letter-spacing: 0.5px;
    line-height: 1;
}

.brand-title {
    color: var(--basketball-orange);
    font-weight: 700;
    font-size: 25px;
    line-height: 1.05;
}

.brand-subtitle {
    color: rgba(255, 255, 255, 0.64);
    font-size: 12px;
    margin-top: 8px;
    text-transform: uppercase;
    letter-spacing: 1.6px;
}

.sidebar-nav {
    display: flex;
    flex-direction: column;
    gap: 7px;
}

.sidebar-link {
    display: flex;
    align-items: center;
    gap: 12px;
    color: rgba(255, 255, 255, 0.78);
    padding: 13px 14px;
    border-radius: 12px;
    font-weight: 700;
    font-size: 14px;
    transition: all 0.16s ease;
}

    .sidebar-link:hover {
        color: #ffffff;
        background: rgba(255, 255, 255, 0.08);
    }

    .sidebar-link.active {
        color: #ffffff;
        background: linear-gradient(135deg, var(--basketball-orange), var(--basketball-orange-dark));
        box-shadow: 0 12px 24px rgba(239, 108, 0, 0.28);
    }

.sidebar-icon {
    width: 22px;
    display: inline-flex;
    justify-content: center;
}

.sidebar-footer {
    margin-top: auto;
    padding: 16px 10px 4px 10px;
    color: rgba(255, 255, 255, 0.62);
}

.sidebar-footer-title {
    color: rgba(255, 255, 255, 0.82);
    font-weight: 600;
    font-size: 13px;
}

.sidebar-footer-text {
    margin-top: 4px;
    font-size: 12px;
    line-height: 1.35;
}

.portal-main {
    flex: 1;
    min-width: 0;
}

.portal-topbar {
    height: 86px;
    background: #ffffff;
    border-bottom: 1px solid var(--border-soft);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 34px;
    position: sticky;
    top: 0;
    z-index: 10;
}

.page-kicker {
    color: var(--basketball-orange);
    font-size: 12px;
    text-transform: uppercase;
    font-weight: 700;
    letter-spacing: 1.4px;
    margin-bottom: 4px;
}

.page-title {
    font-size: 28px;
    font-weight: 700;
    margin: 0;
    color: var(--text-main);
}

.topbar-actions {
    display: flex;
    align-items: center;
    gap: 14px;
}

.user-pill {
    display: flex;
    align-items: center;
    gap: 9px;
    border: 1px solid var(--border-soft);
    padding: 9px 13px;
    border-radius: 999px;
    font-size: 13px;
    color: var(--text-main);
    background: #ffffff;
}

.user-dot {
    width: 9px;
    height: 9px;
    border-radius: 999px;
    background: var(--basketball-orange);
}

.logout-link {
    color: var(--basketball-orange);
    font-weight: 600;
    font-size: 13px;
}

    .logout-link:hover {
        color: var(--basketball-orange-dark);
    }

.portal-content {
    padding: 30px 34px 44px 34px;
}

.dashboard-hero {
    background: linear-gradient(135deg, rgba(7, 16, 20, 0.94), rgba(16, 24, 32, 0.88)), radial-gradient(circle at 85% 25%, rgba(239, 108, 0, 0.42), transparent 24%);
    border-radius: 24px;
    padding: 32px;
    color: #ffffff;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: var(--shadow-soft);
    overflow: hidden;
    position: relative;
}

    .dashboard-hero::after {
        content: "";
        position: absolute;
        right: -70px;
        bottom: -90px;
        width: 260px;
        height: 260px;
        border-radius: 999px;
        background: rgba(239, 108, 0, 0.16);
    }

.hero-eyebrow {
    color: #ffb26b;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    font-size: 12px;
    margin-bottom: 8px;
}

.dashboard-hero h2 {
    font-size: 34px;
    font-weight: 700;
    margin: 0 0 8px 0;
}

.dashboard-hero p {
    margin: 0;
    max-width: 650px;
    color: rgba(255, 255, 255, 0.74);
    font-size: 15px;
}

.hero-badge {
    position: relative;
    z-index: 1;
    background: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.16);
    border-radius: 22px;
    padding: 20px 26px;
    min-width: 170px;
    text-align: center;
    backdrop-filter: blur(8px);
}

.hero-badge-number {
    font-size: 36px;
    font-weight: 700;
    line-height: 1;
}

.hero-badge-label {
    margin-top: 8px;
    color: rgba(255, 255, 255, 0.72);
    font-size: 13px;
}

.stat-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 18px;
    margin-top: 22px;
}

.stat-card {
    background: var(--card-bg);
    border: 1px solid var(--border-soft);
    border-radius: 20px;
    padding: 24px;
    display: flex;
    gap: 18px;
    align-items: center;
    box-shadow: var(--shadow-soft);
}

.stat-icon {
    width: 54px;
    height: 54px;
    border-radius: 18px;
    background: var(--basketball-orange-soft);
    color: var(--basketball-orange);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 26px;
}

.stat-label {
    font-size: 12px;
    font-weight: 700;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.7px;
}

.stat-value {
    font-size: 31px;
    font-weight: 700;
    line-height: 1.1;
    margin-top: 2px;
}

.stat-link {
    margin-top: 8px;
    color: var(--basketball-orange);
    font-weight: 600;
    font-size: 13px;
}

.dashboard-grid {
    display: grid;
    grid-template-columns: 1.35fr 1fr;
    gap: 20px;
    margin-top: 22px;
}

.panel-card {
    background: var(--card-bg);
    border: 1px solid var(--border-soft);
    border-radius: 20px;
    padding: 22px;
    box-shadow: var(--shadow-soft);
}

.panel-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 20px;
    margin-bottom: 16px;
}

    .panel-header h3 {
        font-size: 17px;
        font-weight: 700;
        margin: 0;
    }

    .panel-header p {
        color: var(--text-muted);
        margin: 4px 0 0 0;
        font-size: 13px;
    }

.panel-action {
    color: var(--basketball-orange);
    font-weight: 700;
    font-size: 13px;
    white-space: nowrap;
}

.game-list,
.leader-list {
    display: flex;
    flex-direction: column;
}

.game-row {
    display: grid;
    grid-template-columns: 70px 1fr 90px 1fr 38px;
    gap: 12px;
    align-items: center;
    min-height: 48px;
    border-top: 1px solid var(--border-soft);
    font-size: 14px;
}

    .game-row:first-child,
    .leader-row:first-child {
        border-top: 0;
    }

.game-date {
    color: var(--text-muted);
    font-weight: 700;
}

.game-team,
.game-opponent {
    font-weight: 600;
}

.game-score {
    text-align: center;
    font-weight: 700;
}

.result-badge {
    width: 28px;
    height: 28px;
    border-radius: 999px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 12px;
}

    .result-badge.win {
        background: #e9f8ee;
        color: var(--success);
    }

.leader-row {
    display: grid;
    grid-template-columns: 44px 1fr auto;
    gap: 13px;
    align-items: center;
    min-height: 68px;
    border-top: 1px solid var(--border-soft);
}

.leader-avatar {
    width: 42px;
    height: 42px;
    border-radius: 999px;
    background: linear-gradient(135deg, var(--basketball-orange), #ffad66);
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 13px;
}

.leader-name {
    font-weight: 700;
}

.leader-meta {
    color: var(--text-muted);
    font-size: 12px;
    margin-top: 3px;
}

.leader-value {
    font-weight: 700;
    font-size: 17px;
}

.quick-actions {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 18px;
    margin-top: 22px;
}

.quick-action-card {
    display: flex;
    gap: 14px;
    align-items: center;
    background: #ffffff;
    border: 1px solid var(--border-soft);
    border-radius: 18px;
    padding: 18px;
    color: var(--text-main);
    box-shadow: var(--shadow-soft);
    transition: all 0.16s ease;
}

    .quick-action-card:hover {
        transform: translateY(-2px);
        color: var(--text-main);
        border-color: rgba(239, 108, 0, 0.35);
    }

    .quick-action-card span {
        font-size: 28px;
    }

    .quick-action-card strong {
        display: block;
        font-weight: 700;
    }

    .quick-action-card small {
        color: var(--text-muted);
    }

@media (max-width: 1180px) {
    .stat-grid,
    .quick-actions {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .dashboard-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 820px) {
    .portal-shell {
        flex-direction: column;
    }

    .portal-sidebar {
        width: 100%;
        min-height: auto;
        position: relative;
    }

    .sidebar-nav {
        display: grid;
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .sidebar-footer {
        display: none;
    }

    .portal-topbar {
        height: auto;
        padding: 18px;
        align-items: flex-start;
        gap: 12px;
        flex-direction: column;
    }

    .portal-content {
        padding: 18px;
    }

    .dashboard-hero {
        flex-direction: column;
        align-items: flex-start;
        gap: 20px;
    }

    .stat-grid,
    .quick-actions {
        grid-template-columns: 1fr;
    }

    .game-row {
        grid-template-columns: 60px 1fr;
        gap: 7px;
        padding: 12px 0;
    }

    .game-score,
    .game-opponent,
    .result-badge {
        grid-column: 2;
        text-align: left;
    }
}

/* Login page */

.login-page {
    min-height: 100vh;
    margin: 0;
    background: #080d12;
}

.login-shell {
    min-height: 100vh;
}

.login-hero {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: linear-gradient(180deg, rgba(7, 13, 18, 0.50), rgba(7, 13, 18, 0.86)), radial-gradient(circle at 50% 0%, rgba(255, 255, 255, 0.22), transparent 22%), radial-gradient(circle at 12% 12%, rgba(255, 255, 255, 0.28), transparent 9%), radial-gradient(circle at 88% 12%, rgba(255, 255, 255, 0.22), transparent 10%), linear-gradient(135deg, #121923, #05080c 60%, #1f1207);
    padding: 40px 20px;
    position: relative;
    overflow: hidden;
}

    .login-hero::before {
        content: "";
        position: absolute;
        left: -140px;
        bottom: -160px;
        width: 520px;
        height: 520px;
        border-radius: 999px;
        background: rgba(239, 108, 0, 0.18);
        filter: blur(4px);
    }

    .login-hero::after {
        content: "";
        position: absolute;
        right: -120px;
        top: 120px;
        width: 430px;
        height: 430px;
        border-radius: 999px;
        background: rgba(239, 108, 0, 0.12);
        filter: blur(6px);
    }

.login-brand {
    position: relative;
    z-index: 1;
    text-align: center;
    margin-bottom: 26px;
}

.login-brand-mark {
    color: var(--basketball-orange);
    font-size: 26px;
    font-weight: 700;
    letter-spacing: 1px;
    line-height: 1;
}

.login-brand-title {
    color: var(--basketball-orange);
    font-size: 46px;
    font-weight: 700;
    letter-spacing: 0.5px;
    line-height: 0.95;
}

.login-brand-domain {
    color: var(--basketball-orange);
    font-size: 24px;
    font-weight: 700;
    margin-top: 2px;
}

.login-tagline {
    margin-top: 14px;
    color: #ffffff;
    font-size: 15px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.7px;
}

.login-card {
    position: relative;
    z-index: 1;
    width: min(100%, 420px);
    background: rgba(255, 255, 255, 0.96);
    border: 1px solid rgba(255, 255, 255, 0.72);
    border-radius: 22px;
    padding: 30px;
    box-shadow: 0 24px 80px rgba(0, 0, 0, 0.34);
}

.login-card-header {
    text-align: center;
    margin-bottom: 24px;
}

    .login-card-header h1 {
        font-size: 24px;
        font-weight: 700;
        margin: 0;
        color: var(--text-main);
    }

    .login-card-header p {
        margin: 6px 0 0 0;
        color: var(--text-muted);
        font-size: 14px;
    }

.login-alert {
    background: #fff7ed;
    color: #9a3412;
    border: 1px solid #fed7aa;
    border-radius: 12px;
    padding: 11px 13px;
    font-size: 13px;
    font-weight: 700;
    margin-bottom: 16px;
}

.login-field {
    margin-bottom: 16px;
}

    .login-field label {
        display: block;
        font-size: 13px;
        font-weight: 600;
        color: var(--text-main);
        margin-bottom: 7px;
    }

    .login-field .form-control {
        height: 48px;
        border-radius: 12px;
        border: 1px solid #d8dde6;
        font-size: 14px;
    }

        .login-field .form-control:focus {
            border-color: var(--basketball-orange);
            box-shadow: 0 0 0 0.2rem rgba(239, 108, 0, 0.14);
        }

.login-options {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin: 4px 0 20px 0;
}

.remember-check {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--text-muted);
    font-size: 13px;
    font-weight: 700;
}

    .remember-check input {
        width: 16px;
        height: 16px;
        accent-color: var(--basketball-orange);
    }

.login-button {
    width: 100%;
    height: 50px;
    border: 0;
    border-radius: 12px;
    background: linear-gradient(135deg, var(--basketball-orange), var(--basketball-orange-dark));
    color: #ffffff;
    font-size: 14px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    box-shadow: 0 14px 30px rgba(239, 108, 0, 0.26);
}

    .login-button:hover {
        background: linear-gradient(135deg, #ff7a0a, var(--basketball-orange-dark));
    }

.login-footer {
    position: relative;
    z-index: 1;
    margin-top: 24px;
    color: rgba(255, 255, 255, 0.72);
    font-size: 13px;
    font-weight: 700;
}

@media (max-width: 640px) {
    .login-brand-title {
        font-size: 36px;
    }

    .login-tagline {
        font-size: 13px;
    }

    .login-card {
        padding: 24px;
    }
}

.field-validation-text {
    display: block;
    color: #b91c1c;
    font-size: 12px;
    font-weight: 700;
    margin-top: 6px;
}

.validation-summary-valid {
    display: none;
}

.validation-summary-errors {
    display: block;
}

.result-badge.neutral {
    background: #f3f4f6;
    color: #6b7280;
}

.empty-state {
    padding: 18px 0;
    color: var(--text-muted);
    font-size: 14px;
    font-weight: 700;
}

.page-intro {
    background: #ffffff;
    border: 1px solid var(--border-soft);
    border-radius: 22px;
    padding: 26px;
    box-shadow: var(--shadow-soft);
    margin-bottom: 20px;
}

.page-intro-kicker {
    color: var(--basketball-orange);
    font-size: 12px;
    text-transform: uppercase;
    font-weight: 700;
    letter-spacing: 1.4px;
    margin-bottom: 5px;
}

.page-intro h2 {
    font-size: 28px;
    font-weight: 700;
    margin: 0;
}

.page-intro p {
    color: var(--text-muted);
    margin: 6px 0 0 0;
}

.filter-card {
    background: #ffffff;
    border: 1px solid var(--border-soft);
    border-radius: 20px;
    padding: 18px;
    box-shadow: var(--shadow-soft);
    margin-bottom: 20px;
}

.filter-form {
    display: grid;
    grid-template-columns: minmax(240px, 1fr) 220px auto;
    gap: 14px;
    align-items: end;
}

.filter-field label {
    display: block;
    font-size: 12px;
    font-weight: 700;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.7px;
    margin-bottom: 7px;
}

.filter-field .form-control,
.filter-field .form-select {
    height: 46px;
    border-radius: 12px;
    border-color: var(--border-soft);
    font-weight: 700;
}

    .filter-field .form-control:focus,
    .filter-field .form-select:focus {
        border-color: var(--basketball-orange);
        box-shadow: 0 0 0 0.2rem rgba(239, 108, 0, 0.14);
    }

.filter-actions {
    display: flex;
    gap: 10px;
}

.btn-primary-orange,
.btn-secondary-soft {
    height: 46px;
    border-radius: 12px;
    padding: 0 18px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 14px;
    border: 0;
}

.btn-primary-orange {
    color: #ffffff;
    background: linear-gradient(135deg, var(--basketball-orange), var(--basketball-orange-dark));
}

    .btn-primary-orange:hover {
        color: #ffffff;
        background: linear-gradient(135deg, #ff7a0a, var(--basketball-orange-dark));
    }

.btn-secondary-soft {
    color: var(--text-main);
    background: #f3f4f6;
}

    .btn-secondary-soft:hover {
        color: var(--text-main);
        background: #e5e7eb;
    }

.team-card-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 18px;
}

.team-card {
    background: #ffffff;
    border: 1px solid var(--border-soft);
    border-radius: 22px;
    padding: 22px;
    box-shadow: var(--shadow-soft);
    transition: all 0.16s ease;
}

    .team-card:hover {
        transform: translateY(-2px);
        border-color: rgba(239, 108, 0, 0.34);
    }

.team-card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 18px;
}

.team-season {
    color: var(--basketball-orange);
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    margin-bottom: 5px;
}

.team-card h3 {
    margin: 0;
    font-size: 19px;
    font-weight: 700;
}

.team-record {
    min-width: 58px;
    height: 38px;
    border-radius: 999px;
    background: var(--basketball-orange-soft);
    color: var(--basketball-orange);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 14px;
}

.team-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 16px;
    min-height: 28px;
}

    .team-meta span {
        background: #f3f4f6;
        color: var(--text-muted);
        border-radius: 999px;
        padding: 6px 10px;
        font-size: 12px;
        font-weight: 600;
    }

.team-stats-row {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
    margin-top: 18px;
    padding-top: 18px;
    border-top: 1px solid var(--border-soft);
}

    .team-stats-row div {
        display: flex;
        flex-direction: column;
        gap: 3px;
    }

    .team-stats-row strong {
        font-size: 19px;
        font-weight: 700;
    }

    .team-stats-row small {
        color: var(--text-muted);
        font-weight: 600;
        font-size: 12px;
    }

.team-card-actions {
    display: flex;
    gap: 10px;
    margin-top: 20px;
}

.team-link {
    flex: 1;
    height: 38px;
    border-radius: 12px;
    background: #f3f4f6;
    color: var(--text-main);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 13px;
}

    .team-link:hover {
        color: var(--text-main);
        background: #e5e7eb;
    }

    .team-link.primary {
        background: var(--basketball-orange);
        color: #ffffff;
    }

        .team-link.primary:hover {
            color: #ffffff;
            background: var(--basketball-orange-dark);
        }

@media (max-width: 1180px) {
    .team-card-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 820px) {
    .filter-form {
        grid-template-columns: 1fr;
    }

    .team-card-grid {
        grid-template-columns: 1fr;
    }

    .filter-actions {
        flex-direction: column;
    }
}

.team-detail-hero {
    background: linear-gradient(135deg, rgba(7, 16, 20, 0.96), rgba(16, 24, 32, 0.9)), radial-gradient(circle at 86% 25%, rgba(239, 108, 0, 0.36), transparent 26%);
    color: #ffffff;
    border-radius: 24px;
    padding: 30px;
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    gap: 24px;
    box-shadow: var(--shadow-soft);
    margin-bottom: 22px;
}

.back-link {
    color: #ffb26b;
    font-size: 13px;
    font-weight: 700;
    display: inline-flex;
    margin-bottom: 18px;
}

    .back-link:hover {
        color: #ffffff;
    }

.team-detail-season {
    color: #ffb26b;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1.4px;
    margin-bottom: 6px;
}

.team-detail-hero h2 {
    font-size: 38px;
    font-weight: 700;
    margin: 0;
}

.team-detail-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 15px;
}

    .team-detail-meta span {
        background: rgba(255, 255, 255, 0.12);
        color: rgba(255, 255, 255, 0.88);
        border: 1px solid rgba(255, 255, 255, 0.12);
        border-radius: 999px;
        padding: 7px 11px;
        font-size: 12px;
        font-weight: 600;
    }

.team-detail-record {
    min-width: 138px;
    min-height: 112px;
    border-radius: 24px;
    background: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.14);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

    .team-detail-record div {
        font-size: 36px;
        font-weight: 700;
        line-height: 1;
    }

    .team-detail-record span {
        color: rgba(255, 255, 255, 0.72);
        margin-top: 8px;
        font-size: 13px;
        font-weight: 600;
    }

.team-summary-grid {
    margin-top: 0;
}

.stat-date {
    font-size: 26px;
}

.team-detail-grid {
    display: grid;
    grid-template-columns: 1.45fr 0.85fr;
    gap: 20px;
    margin-top: 22px;
}

.team-games-panel {
    margin-top: 22px;
}

.modern-table-wrap {
    width: 100%;
    overflow-x: auto;
}

.modern-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}

    .modern-table thead th {
        color: var(--text-muted);
        font-size: 12px;
        text-transform: uppercase;
        letter-spacing: 0.7px;
        font-weight: 700;
        border-bottom: 1px solid var(--border-soft);
        padding: 11px 10px;
        white-space: nowrap;
    }

    .modern-table tbody td {
        border-bottom: 1px solid var(--border-soft);
        padding: 13px 10px;
        vertical-align: middle;
    }

    .modern-table tbody tr:last-child td {
        border-bottom: 0;
    }

.strong-cell {
    font-weight: 700;
}

.jersey-cell {
    color: var(--basketball-orange);
    font-weight: 700;
}

.number-col {
    text-align: right;
}

.mini-result-badge {
    min-width: 28px;
    height: 28px;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 12px;
}

    .mini-result-badge.win {
        background: #e9f8ee;
        color: var(--success);
    }

    .mini-result-badge.neutral {
        background: #f3f4f6;
        color: #6b7280;
    }

@media (max-width: 1180px) {
    .team-detail-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 820px) {
    .team-detail-hero {
        flex-direction: column;
        align-items: flex-start;
    }

    .team-detail-record {
        width: 100%;
    }

    .team-detail-hero h2 {
        font-size: 30px;
    }
}

.player-table tbody tr:hover {
    background: #fffaf5;
}

.player-table .strong-cell {
    color: var(--text-main);
}

@media (max-width: 980px) {
    .player-table {
        min-width: 920px;
    }
}

.games-filter-form {
    display: grid;
    grid-template-columns: 145px minmax(170px, 1fr) minmax(210px, 1.15fr) 145px 145px 158px;
    gap: 10px;
    align-items: end;
    width: 100%;
}

    .games-filter-form .filter-field {
        min-width: 0;
    }

        .games-filter-form .filter-field .form-control,
        .games-filter-form .filter-field .form-select {
            width: 100%;
            min-width: 0;
        }

    .games-filter-form .filter-actions {
        display: flex;
        flex-wrap: nowrap;
        gap: 8px;
        align-self: end;
        margin: 0;
        white-space: nowrap;
    }

        .games-filter-form .filter-actions .btn-primary-orange,
        .games-filter-form .filter-actions .btn-secondary-soft {
            padding-left: 14px;
            padding-right: 14px;
        }

.games-table tbody tr:hover {
    background: #fffaf5;
}

.status-pill {
    display: inline-flex;
    align-items: center;
    min-height: 28px;
    border-radius: 999px;
    padding: 5px 10px;
    background: #f3f4f6;
    color: var(--text-muted);
    font-size: 12px;
    font-weight: 700;
}

.stats-status {
    display: inline-flex;
    align-items: center;
    min-height: 28px;
    border-radius: 999px;
    padding: 5px 10px;
    font-size: 12px;
    font-weight: 700;
}

    .stats-status.has-stats {
        background: #e9f8ee;
        color: var(--success);
    }

    .stats-status.no-stats {
        background: #fff3e8;
        color: var(--basketball-orange-dark);
    }

@media (max-width: 1050px) {
    .games-filter-form {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 820px) {
    .games-filter-form {
        grid-template-columns: 1fr;
    }

    .games-table {
        min-width: 940px;
    }
}

.table-action-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 30px;
    border-radius: 999px;
    padding: 5px 12px;
    background: var(--basketball-orange-soft);
    color: var(--basketball-orange);
    font-size: 12px;
    font-weight: 700;
}

    .table-action-link:hover {
        background: var(--basketball-orange);
        color: #ffffff;
    }

.game-detail-hero {
    background: linear-gradient(135deg, rgba(7, 16, 20, 0.96), rgba(16, 24, 32, 0.9)), radial-gradient(circle at 86% 25%, rgba(239, 108, 0, 0.36), transparent 26%);
    color: #ffffff;
    border-radius: 24px;
    padding: 30px;
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    gap: 24px;
    box-shadow: var(--shadow-soft);
    margin-bottom: 22px;
}

.game-detail-date {
    color: #ffb26b;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1.4px;
    margin-bottom: 6px;
}

.game-detail-hero h2 {
    font-size: 34px;
    font-weight: 700;
    margin: 0;
}

.game-detail-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 15px;
}

    .game-detail-meta span {
        background: rgba(255, 255, 255, 0.12);
        color: rgba(255, 255, 255, 0.88);
        border: 1px solid rgba(255, 255, 255, 0.12);
        border-radius: 999px;
        padding: 7px 11px;
        font-size: 12px;
        font-weight: 600;
    }

.game-result-card {
    min-width: 112px;
    min-height: 112px;
    border-radius: 24px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

    .game-result-card div {
        font-size: 42px;
        font-weight: 700;
        line-height: 1;
    }

    .game-result-card span {
        margin-top: 8px;
        font-size: 13px;
        font-weight: 600;
    }

    .game-result-card.win {
        background: #e9f8ee;
        color: var(--success);
    }

    .game-result-card.neutral {
        background: rgba(255, 255, 255, 0.12);
        color: #ffffff;
        border: 1px solid rgba(255, 255, 255, 0.14);
    }

.game-boxscore-panel {
    margin-top: 22px;
}

.boxscore-table tfoot td {
    border-top: 2px solid var(--border-soft);
    padding: 14px 10px;
    font-weight: 700;
    background: #fffaf5;
}

@media (max-width: 820px) {
    .game-detail-hero {
        flex-direction: column;
        align-items: flex-start;
    }

    .game-result-card {
        width: 100%;
    }

    .game-detail-hero h2 {
        font-size: 28px;
    }

    .boxscore-table {
        min-width: 680px;
    }
}

.panel-actions-row {
    display: flex;
    align-items: center;
    gap: 10px;
}

.admin-action {
    background: var(--basketball-orange);
    color: #ffffff;
}

    .admin-action:hover {
        background: var(--basketball-orange-dark);
        color: #ffffff;
    }

.admin-warning-card {
    background: #fff7ed;
    border: 1px solid rgba(239, 108, 0, 0.22);
    color: var(--text-main);
    border-radius: 18px;
    padding: 18px 20px;
    margin-bottom: 22px;
    box-shadow: var(--shadow-soft);
}

    .admin-warning-card strong {
        display: block;
        color: var(--basketball-orange-dark);
        font-size: 15px;
        font-weight: 700;
        margin-bottom: 4px;
    }

    .admin-warning-card p {
        margin: 0;
        color: var(--text-muted);
        font-weight: 700;
    }

.edit-stats-table .stat-edit-input {
    width: 72px;
    height: 38px;
    border: 1px solid var(--border-soft);
    border-radius: 10px;
    text-align: right;
    padding: 0 10px;
    font-weight: 700;
    color: var(--text-main);
    background: #f9fafb;
}

    .edit-stats-table .stat-edit-input:disabled {
        opacity: 1;
        cursor: not-allowed;
    }

.form-actions-row {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    margin-top: 20px;
}

.disabled-save-button {
    opacity: 0.55;
    cursor: not-allowed;
}

@media (max-width: 820px) {
    .panel-actions-row {
        width: 100%;
        flex-direction: column;
        align-items: stretch;
    }

    .form-actions-row {
        flex-direction: column;
    }

    .edit-stats-table {
        min-width: 720px;
    }
}

.success-alert {
    background: #e9f8ee;
    color: var(--success);
    border: 1px solid rgba(22, 163, 74, 0.22);
    border-radius: 14px;
    padding: 12px 14px;
    font-weight: 700;
    margin-bottom: 16px;
}

.validation-alert {
    background: #fef2f2;
    color: #b91c1c;
    border: 1px solid rgba(185, 28, 28, 0.22);
    border-radius: 14px;
    padding: 12px 14px;
    font-weight: 700;
    margin-bottom: 16px;
}

.reports-filter-form {
    grid-template-columns: 280px auto;
}

.leaderboard-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 22px;
}

.leaderboard-card {
    overflow: hidden;
}

.leaderboard-table tbody tr:hover {
    background: #fffaf5;
}

.rank-cell {
    width: 58px;
    color: var(--basketball-orange);
    font-weight: 700;
}

@media (max-width: 820px) {
    .reports-filter-form {
        grid-template-columns: 1fr;
    }

    .leaderboard-table {
        min-width: 780px;
    }
}

.standings-panel {
    margin-bottom: 22px;
}

.standings-table tbody tr:hover {
    background: #fffaf5;
}

.team-record-mini {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 58px;
    min-height: 28px;
    border-radius: 999px;
    background: var(--basketball-orange-soft);
    color: var(--basketball-orange);
    font-size: 12px;
    font-weight: 700;
}

@media (max-width: 820px) {
    .standings-table {
        min-width: 900px;
    }
}

.table-name-link {
    color: var(--text-main);
    font-weight: 700;
}

    .table-name-link:hover {
        color: var(--basketball-orange);
    }

.player-detail-hero {
    background: linear-gradient(135deg, rgba(7, 16, 20, 0.96), rgba(16, 24, 32, 0.9)), radial-gradient(circle at 86% 25%, rgba(239, 108, 0, 0.36), transparent 26%);
    color: #ffffff;
    border-radius: 24px;
    padding: 30px;
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    gap: 24px;
    box-shadow: var(--shadow-soft);
    margin-bottom: 22px;
}

.player-detail-kicker {
    color: #ffb26b;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1.4px;
    margin-bottom: 6px;
}

.player-detail-hero h2 {
    font-size: 38px;
    font-weight: 700;
    margin: 0;
}

.player-detail-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 15px;
}

    .player-detail-meta span,
    .player-detail-meta a {
        background: rgba(255, 255, 255, 0.12);
        color: rgba(255, 255, 255, 0.88);
        border: 1px solid rgba(255, 255, 255, 0.12);
        border-radius: 999px;
        padding: 7px 11px;
        font-size: 12px;
        font-weight: 600;
    }

        .player-detail-meta a:hover {
            color: #ffffff;
            background: rgba(239, 108, 0, 0.38);
        }

.player-jersey-card {
    min-width: 112px;
    min-height: 112px;
    border-radius: 24px;
    background: var(--basketball-orange);
    color: #ffffff;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

    .player-jersey-card div {
        font-size: 42px;
        font-weight: 700;
        line-height: 1;
    }

    .player-jersey-card span {
        margin-top: 8px;
        font-size: 13px;
        font-weight: 600;
    }

.player-game-log-panel {
    margin-top: 22px;
}

.player-game-log-table tbody tr:hover {
    background: #fffaf5;
}

@media (max-width: 820px) {
    .player-detail-hero {
        flex-direction: column;
        align-items: flex-start;
    }

    .player-jersey-card {
        width: 100%;
    }

    .player-detail-hero h2 {
        font-size: 30px;
    }

    .player-game-log-table {
        min-width: 940px;
    }
}

.reports-intro {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 18px;
}

.audit-table tbody tr:hover {
    background: #fffaf5;
}

.audit-change {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 72px;
    border-radius: 999px;
    background: #f3f4f6;
    color: var(--text-main);
    font-size: 12px;
    font-weight: 700;
    padding: 5px 9px;
}

@media (max-width: 820px) {
    .reports-intro {
        flex-direction: column;
        align-items: flex-start;
    }

    .audit-table {
        min-width: 1100px;
    }
}

.stats-second-row {
    margin-top: 22px;
}

.stats-team-panel {
    margin-top: 22px;
}

.stats-team-table tbody tr:hover {
    background: #fffaf5;
}

@media (max-width: 820px) {
    .stats-team-table {
        min-width: 920px;
    }
}

.dashboard-hero-actions {
    display: flex;
    gap: 12px;
    margin-top: 22px;
}

.hero-action-primary,
.hero-action-secondary {
    min-height: 42px;
    border-radius: 999px;
    padding: 10px 18px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    font-weight: 700;
}

.hero-action-primary {
    background: var(--basketball-orange);
    color: #ffffff;
}

    .hero-action-primary:hover {
        background: var(--basketball-orange-dark);
        color: #ffffff;
    }

.hero-action-secondary {
    background: rgba(255, 255, 255, 0.12);
    color: #ffffff;
    border: 1px solid rgba(255, 255, 255, 0.18);
}

    .hero-action-secondary:hover {
        background: rgba(255, 255, 255, 0.2);
        color: #ffffff;
    }

.stat-card-link {
    color: inherit;
}

    .stat-card-link:hover {
        color: inherit;
        transform: translateY(-2px);
        border-color: rgba(239, 108, 0, 0.34);
    }

.dashboard-game-link,
.dashboard-leader-link {
    color: inherit;
}

    .dashboard-game-link:hover,
    .dashboard-leader-link:hover {
        color: inherit;
        background: #fffaf5;
    }

.admin-quick-action {
    border-color: rgba(239, 108, 0, 0.34);
    background: #fff7ed;
}

@media (max-width: 820px) {
    .dashboard-hero-actions {
        flex-direction: column;
    }

    .hero-action-primary,
    .hero-action-secondary {
        width: 100%;
    }
}

.team-detail-side {
    display: flex;
    flex-direction: column;
    gap: 12px;
    align-items: stretch;
}

.team-admin-edit-link {
    min-height: 42px;
    border-radius: 999px;
    background: var(--basketball-orange);
    color: #ffffff;
    font-size: 13px;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 10px 16px;
}

    .team-admin-edit-link:hover {
        background: var(--basketball-orange-dark);
        color: #ffffff;
    }

.admin-team-link {
    background: #fff7ed;
    color: var(--basketball-orange);
}

    .admin-team-link:hover {
        background: var(--basketball-orange);
        color: #ffffff;
    }

.team-edit-panel {
    margin-top: 22px;
}

.team-edit-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
}

.form-field label {
    display: block;
    font-size: 12px;
    font-weight: 700;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.7px;
    margin-bottom: 7px;
}

.form-field .form-control {
    min-height: 46px;
    border-radius: 12px;
    border-color: var(--border-soft);
    font-weight: 600;
}

    .form-field .form-control:disabled {
        background: #f9fafb;
        color: var(--text-main);
        opacity: 1;
    }

.team-edit-summary {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px;
    margin-top: 20px;
}

    .team-edit-summary div {
        background: #fffaf5;
        border: 1px solid rgba(239, 108, 0, 0.16);
        border-radius: 16px;
        padding: 16px;
    }

    .team-edit-summary strong {
        display: block;
        color: var(--basketball-orange);
        font-size: 24px;
        font-weight: 700;
        line-height: 1;
    }

    .team-edit-summary span {
        display: block;
        color: var(--text-muted);
        font-size: 12px;
        font-weight: 600;
        margin-top: 6px;
    }

@media (max-width: 820px) {
    .team-detail-side {
        width: 100%;
    }

    .team-edit-grid {
        grid-template-columns: 1fr;
    }

    .team-edit-summary {
        grid-template-columns: 1fr;
    }
}

.field-validation {
    display: block;
    color: #b91c1c;
    font-size: 12px;
    font-weight: 600;
    margin-top: 6px;
}

.form-field .form-select {
    min-height: 46px;
    border-radius: 12px;
    border-color: var(--border-soft);
    font-weight: 600;
}

.danger-warning-card {
    background: #fef2f2;
    border: 1px solid rgba(185, 28, 28, 0.22);
    color: var(--text-main);
    border-radius: 18px;
    padding: 18px 20px;
    margin-bottom: 22px;
    box-shadow: var(--shadow-soft);
}

    .danger-warning-card strong {
        display: block;
        color: #b91c1c;
        font-size: 15px;
        font-weight: 700;
        margin-bottom: 4px;
    }

    .danger-warning-card p {
        margin: 0;
        color: var(--text-muted);
        font-weight: 700;
    }

.btn-danger-soft {
    height: 46px;
    border-radius: 12px;
    padding: 0 18px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 14px;
    border: 0;
    background: #fef2f2;
    color: #b91c1c;
}

    .btn-danger-soft:hover {
        background: #b91c1c;
        color: #ffffff;
    }

.archive-impact-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
}

    .archive-impact-grid div {
        border: 1px solid var(--border-soft);
        border-radius: 18px;
        padding: 18px;
        background: #ffffff;
    }

    .archive-impact-grid strong {
        display: block;
        font-size: 15px;
        font-weight: 700;
        margin-bottom: 10px;
    }

    .archive-impact-grid span {
        display: block;
        color: var(--text-muted);
        font-size: 13px;
        font-weight: 600;
        margin-top: 7px;
    }

.team-edit-actions-row {
    flex-wrap: wrap;
}

@media (max-width: 820px) {
    .archive-impact-grid {
        grid-template-columns: 1fr;
    }
}

.player-detail-side {
    display: flex;
    flex-direction: column;
    gap: 12px;
    align-items: stretch;
}

.player-edit-panel {
    margin-top: 22px;
}

@media (max-width: 820px) {
    .player-detail-side {
        width: 100%;
    }
}

.page-hero {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
}

@media (max-width: 820px) {
    .page-hero {
        flex-direction: column;
        align-items: stretch;
    }
}

.inactive-inline-badge {
    display: inline-flex;
    align-items: center;
    min-height: 22px;
    border-radius: 999px;
    padding: 3px 9px;
    margin-left: 8px;
    background: #f3f4f6;
    color: #6b7280;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.4px;
}

.inactive-table-row {
    background: #fafafa;
}

    .inactive-table-row td {
        color: #6b7280;
    }

.global-alert {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    border-radius: 18px;
    padding: 15px 18px;
    margin-bottom: 20px;
    box-shadow: var(--shadow-soft);
}

.global-alert-success {
    background: #ecfdf5;
    border: 1px solid rgba(16, 185, 129, 0.24);
    color: #065f46;
}

.global-alert-icon {
    width: 28px;
    height: 28px;
    min-width: 28px;
    border-radius: 999px;
    background: #10b981;
    color: #ffffff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 15px;
    font-weight: 700;
}

.global-alert strong {
    display: block;
    font-size: 13px;
    font-weight: 700;
    margin-bottom: 2px;
}

.global-alert span {
    display: block;
    color: #047857;
    font-size: 14px;
    font-weight: 600;
}

.access-denied-hero {
    background: linear-gradient(135deg, #1f2937, #111827);
    border-radius: 24px;
    padding: 30px;
    color: #ffffff;
    display: flex;
    align-items: center;
    gap: 20px;
    box-shadow: var(--shadow-soft);
    margin-bottom: 22px;
}

.access-denied-icon {
    width: 68px;
    height: 68px;
    min-width: 68px;
    border-radius: 22px;
    background: rgba(255, 255, 255, 0.12);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 34px;
}

.access-denied-hero h2 {
    margin: 4px 0 8px;
    font-size: 34px;
    font-weight: 700;
}

.access-denied-hero p {
    margin: 0;
    color: rgba(255, 255, 255, 0.78);
    font-weight: 700;
    max-width: 680px;
}

.access-denied-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
}

    .access-denied-card h3 {
        margin: 0 0 6px;
        font-size: 20px;
        font-weight: 700;
    }

    .access-denied-card p {
        margin: 0;
        color: var(--text-muted);
        font-weight: 700;
    }

@media (max-width: 820px) {
    .access-denied-hero {
        flex-direction: column;
        align-items: flex-start;
    }

    .access-denied-card {
        flex-direction: column;
        align-items: stretch;
    }
}

.global-alert-error {
    background: #fef2f2;
    border: 1px solid rgba(185, 28, 28, 0.24);
    color: #7f1d1d;
}

.global-alert-error-icon {
    background: #dc2626;
}

.global-alert-error span {
    color: #991b1b;
}

/* Stage 19A - GUI polish */

.page-hero {
    position: relative;
    overflow: hidden;
}

    .page-hero::after {
        content: "";
        position: absolute;
        right: -50px;
        top: -70px;
        width: 180px;
        height: 180px;
        border-radius: 999px;
        background: rgba(239, 108, 0, 0.08);
        pointer-events: none;
    }

    .page-hero > * {
        position: relative;
        z-index: 1;
    }

.team-admin-edit-link,
.btn-primary-orange,
.btn-secondary-soft,
.btn-danger-soft,
.panel-action,
.team-link,
.table-action-link {
    text-decoration: none;
}

.team-admin-edit-link,
.btn-primary-orange,
.btn-secondary-soft,
.btn-danger-soft {
    transition: transform 0.16s ease, box-shadow 0.16s ease, background 0.16s ease, color 0.16s ease;
}

    .team-admin-edit-link:hover,
    .btn-primary-orange:hover,
    .btn-secondary-soft:hover,
    .btn-danger-soft:hover {
        transform: translateY(-1px);
        box-shadow: 0 10px 24px rgba(15, 23, 42, 0.12);
    }

.filter-card {
    border: 1px solid rgba(229, 231, 235, 0.9);
}

.filter-form {
    align-items: end;
}

.filter-field label {
    margin-bottom: 7px;
}

.filter-actions {
    display: flex;
    gap: 10px;
    align-items: center;
}

.team-card,
.panel-card,
.stat-card,
.quick-action-card {
    transition: transform 0.16s ease, box-shadow 0.16s ease, border-color 0.16s ease;
}

    .team-card:hover,
    .panel-card:hover {
        transform: translateY(-2px);
        box-shadow: 0 16px 38px rgba(15, 23, 42, 0.11);
    }

.team-card-actions {
    gap: 8px;
    flex-wrap: wrap;
}

.team-link {
    min-height: 36px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.table-action-link {
    font-weight: 700;
    color: var(--basketball-orange);
}

    .table-action-link:hover {
        color: var(--basketball-orange-dark);
    }

.disabled-save-button {
    cursor: not-allowed;
    opacity: 0.72;
    box-shadow: none !important;
    transform: none !important;
}

.admin-help-card {
    background: #fff7ed;
    border: 1px solid rgba(239, 108, 0, 0.18);
    border-radius: 18px;
    padding: 16px 18px;
    margin-bottom: 20px;
    box-shadow: var(--shadow-soft);
}

    .admin-help-card strong {
        display: block;
        color: var(--basketball-orange);
        font-weight: 700;
        margin-bottom: 4px;
    }

    .admin-help-card p {
        margin: 0;
        color: var(--text-muted);
        font-size: 14px;
        font-weight: 700;
    }

.inactive-inline-badge {
    vertical-align: middle;
}

.inactive-card {
    background: #fafafa;
    border-color: #e5e7eb;
}

    .inactive-card .team-season,
    .inactive-card .team-meta,
    .inactive-card small {
        color: #6b7280;
    }

.list-summary-row {
    display: flex;
    justify-content: flex-end;
    margin: -4px 0 16px;
}

    .list-summary-row div {
        background: #ffffff;
        border: 1px solid var(--border-soft);
        border-radius: 999px;
        padding: 8px 14px;
        box-shadow: var(--shadow-soft);
        color: var(--text-muted);
        font-size: 13px;
        font-weight: 600;
    }

    .list-summary-row strong {
        color: var(--basketball-orange);
        margin-right: 4px;
    }

@media (max-width: 820px) {
    .filter-form {
        display: grid;
        grid-template-columns: 1fr;
        gap: 14px;
    }

    .filter-actions {
        width: 100%;
    }

        .filter-actions .btn-primary-orange,
        .filter-actions .btn-secondary-soft {
            flex: 1;
        }

    .team-card-actions {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .team-link {
        width: 100%;
    }

    .form-actions-row {
        flex-direction: column;
        align-items: stretch;
    }

        .form-actions-row a,
        .form-actions-row button {
            width: 100%;
        }
}

.inactive-card {
    background: #fafafa;
    border-color: #e5e7eb;
}

    .inactive-card .team-season,
    .inactive-card .team-meta,
    .inactive-card small {
        color: #6b7280;
    }

.list-summary-row {
    display: flex;
    justify-content: flex-end;
    margin: -4px 0 16px;
}

    .list-summary-row div {
        background: #ffffff;
        border: 1px solid var(--border-soft);
        border-radius: 999px;
        padding: 8px 14px;
        box-shadow: var(--shadow-soft);
        color: var(--text-muted);
        font-size: 13px;
        font-weight: 600;
    }

    .list-summary-row strong {
        color: var(--basketball-orange);
        margin-right: 4px;
    }

/* Stage 19B - Detail page polish */

.team-detail-hero,
.player-detail-hero,
.game-detail-hero {
    position: relative;
    overflow: hidden;
}

    .team-detail-hero::after,
    .player-detail-hero::after,
    .game-detail-hero::after {
        content: "";
        position: absolute;
        right: -85px;
        top: -85px;
        width: 230px;
        height: 230px;
        border-radius: 999px;
        background: rgba(239, 108, 0, 0.14);
        pointer-events: none;
    }

    .team-detail-hero > *,
    .player-detail-hero > *,
    .game-detail-hero > * {
        position: relative;
        z-index: 1;
    }

.team-detail-meta span,
.player-detail-meta span,
.player-detail-meta a,
.game-detail-meta span {
    min-height: 30px;
    display: inline-flex;
    align-items: center;
}

.team-detail-record,
.player-jersey-card,
.game-result-card {
    box-shadow: 0 16px 34px rgba(0, 0, 0, 0.18);
}

    .team-detail-record div,
    .player-jersey-card div,
    .game-result-card div {
        letter-spacing: -0.8px;
    }

.team-detail-grid,
.player-game-log-panel,
.game-boxscore-panel,
.team-games-panel,
.stats-team-panel {
    animation: detailFadeIn 0.18s ease-in;
}

@keyframes detailFadeIn {
    from {
        opacity: 0;
        transform: translateY(4px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.panel-card .modern-table tbody tr:hover {
    background: #fffaf5;
}

    .panel-card .modern-table tbody tr:hover .table-name-link {
        color: var(--basketball-orange);
    }

.modern-table-wrap {
    border-radius: 16px;
}

.modern-table thead th:first-child,
.modern-table tbody td:first-child,
.modern-table tfoot td:first-child {
    padding-left: 14px;
}

.modern-table thead th:last-child,
.modern-table tbody td:last-child,
.modern-table tfoot td:last-child {
    padding-right: 14px;
}

.team-edit-panel,
.player-game-log-panel,
.game-boxscore-panel,
.team-games-panel {
    border-color: rgba(229, 231, 235, 0.95);
}

.team-edit-actions-row {
    align-items: center;
}

.danger-warning-card,
.admin-warning-card {
    position: relative;
    overflow: hidden;
}

    .danger-warning-card::after,
    .admin-warning-card::after {
        content: "";
        position: absolute;
        right: -35px;
        top: -45px;
        width: 110px;
        height: 110px;
        border-radius: 999px;
        background: rgba(239, 108, 0, 0.08);
        pointer-events: none;
    }

    .danger-warning-card > *,
    .admin-warning-card > * {
        position: relative;
        z-index: 1;
    }

.archive-impact-grid {
    gap: 16px;
}

    .archive-impact-grid div {
        border-radius: 18px;
    }

    .archive-impact-grid strong {
        margin-bottom: 8px;
    }

    .archive-impact-grid span {
        line-height: 1.35;
    }

@media (max-width: 820px) {
    .team-detail-hero,
    .player-detail-hero,
    .game-detail-hero {
        padding: 24px;
    }

    .team-detail-meta,
    .player-detail-meta,
    .game-detail-meta {
        width: 100%;
    }

        .team-detail-meta span,
        .player-detail-meta span,
        .player-detail-meta a,
        .game-detail-meta span {
            width: 100%;
            justify-content: center;
        }

    .team-detail-record,
    .player-jersey-card,
    .game-result-card {
        min-height: 92px;
    }

        .team-detail-record div,
        .player-jersey-card div,
        .game-result-card div {
            font-size: 34px;
        }

    .panel-header {
        flex-direction: column;
        align-items: stretch;
    }

    .panel-actions-row {
        width: 100%;
    }

        .panel-actions-row a,
        .panel-actions-row button {
            width: 100%;
        }

    .archive-impact-grid {
        grid-template-columns: 1fr;
    }
}

/* Stage 19B - Team detail refinements */

.team-roster-table,
.team-recent-games-table {
    min-width: 760px;
}

.team-top-player-list .leader-row {
    border-radius: 14px;
    padding: 8px 10px;
}

    .team-top-player-list .leader-row:hover {
        background: #fffaf5;
    }

@media (max-width: 820px) {
    .team-roster-table,
    .team-recent-games-table {
        min-width: 820px;
    }
}

.archived-edit-alert {
    background: #f9fafb;
    border-color: #d1d5db;
    color: #4b5563;
}

/* Stage 22A - Stat correction missing-row marker */

.stat-player-cell {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.missing-stat-row-badge {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    padding: 4px 8px;
    background: #fff7ed;
    border: 1px solid #fed7aa;
    color: #c2410c;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.4px;
    white-space: nowrap;
}

/* Stage 22A - Stat correction summary */

.stat-correction-info {
    display: flex;
    flex-direction: column;
    gap: 4px;
    margin-bottom: 16px;
    padding: 12px 14px;
    border-radius: 16px;
    background: #fff7ed;
    border: 1px solid #fed7aa;
    color: #9a3412;
}

    .stat-correction-info strong {
        font-size: 14px;
        font-weight: 700;
    }

    .stat-correction-info span {
        font-size: 13px;
        color: #7c2d12;
    }

.close-game-card {
    display: flex;
    justify-content: space-between;
    gap: 18px;
    align-items: flex-end;
    margin-bottom: 18px;
    padding: 14px 16px;
    border-radius: 18px;
    background: #fffaf5;
    border: 1px solid #fed7aa;
}

    .close-game-card strong {
        font-size: 15px;
        font-weight: 700;
        color: #9a3412;
    }

    .close-game-card p {
        margin: 4px 0 0;
        font-size: 13px;
        color: #7c2d12;
    }

.close-game-score-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(120px, 150px));
    gap: 12px;
}

@media (max-width: 760px) {
    .close-game-card {
        flex-direction: column;
        align-items: stretch;
    }

    .close-game-score-grid {
        grid-template-columns: 1fr;
    }
}

/* Event entry */

.event-entry-section {
    background: #fffaf5;
    border: 1px solid rgba(239, 108, 0, 0.18);
    border-radius: 18px;
    padding: 18px;
    margin-bottom: 18px;
}

.event-optional-section {
    background: #f9fafb;
    border-color: #e5e7eb;
}

.event-section-title {
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--text-main);
    font-size: 15px;
    font-weight: 700;
    margin-bottom: 14px;
}

    .event-section-title span {
        width: 28px;
        height: 28px;
        border-radius: 999px;
        background: var(--basketball-orange);
        color: #ffffff;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        font-size: 13px;
        font-weight: 700;
    }

.event-entry-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
}

    .event-entry-grid .full-width {
        grid-column: 1 / -1;
    }

.event-required-field {
    background: #ffffff;
    border: 2px solid rgba(239, 108, 0, 0.28);
    border-radius: 16px;
    padding: 14px;
}

.event-input {
    width: 100%;
    min-height: 54px;
    background: #ffffff;
    border: 2px solid #d1d5db;
    border-radius: 14px;
    padding: 0 14px;
    color: var(--text-main);
    font-size: 15px;
    font-weight: 700;
}

    .event-input:focus {
        outline: none;
        border-color: var(--basketball-orange);
        box-shadow: 0 0 0 4px rgba(239, 108, 0, 0.16);
        background: #ffffff;
    }

.field-help {
    display: block;
    margin-top: 7px;
    color: var(--text-muted);
    font-size: 12px;
    font-weight: 600;
}

.event-button-grid {
    display: grid;
    grid-template-columns: repeat(7, minmax(120px, 1fr));
    gap: 10px;
}

.event-action-button {
    min-height: 54px;
    border: 0;
    border-radius: 14px;
    background: #ffffff;
    color: var(--text-main);
    box-shadow: inset 0 0 0 2px #e5e7eb;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.15s ease;
}

    .event-action-button:hover {
        background: var(--basketball-orange);
        color: #ffffff;
        box-shadow: inset 0 0 0 2px var(--basketball-orange);
        transform: translateY(-1px);
    }

    .event-action-button:focus {
        outline: none;
        box-shadow: 0 0 0 4px rgba(239, 108, 0, 0.20);
    }

@media (max-width: 1180px) {
    .event-button-grid {
        grid-template-columns: repeat(4, minmax(120px, 1fr));
    }
}

@media (max-width: 820px) {
    .event-entry-grid {
        grid-template-columns: 1fr;
    }

    .event-button-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

/* Login clarity */

.login-entry-section {
    background: #fffaf5;
    border: 1px solid rgba(239, 108, 0, 0.18);
    border-radius: 18px;
    padding: 16px;
    margin-bottom: 14px;
}

.login-optional-section {
    background: #f9fafb;
    border-color: #e5e7eb;
}

.login-section-title {
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--text-main);
    font-size: 14px;
    font-weight: 700;
    margin-bottom: 12px;
}

    .login-section-title span {
        width: 26px;
        height: 26px;
        border-radius: 999px;
        background: var(--basketball-orange);
        color: #ffffff;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        font-size: 12px;
        font-weight: 700;
    }

.login-input {
    min-height: 52px;
    border: 2px solid #d1d5db;
    border-radius: 14px;
    font-size: 15px;
    font-weight: 600;
}

    .login-input:focus {
        outline: none;
        border-color: var(--basketball-orange);
        box-shadow: 0 0 0 4px rgba(239, 108, 0, 0.16);
    }

/* Stats key */

.stats-key-panel {
    margin-top: 22px;
    padding: 16px 20px;
}

    .stats-key-panel .panel-header {
        margin-bottom: 10px;
    }

        .stats-key-panel .panel-header h3 {
            margin-bottom: 2px;
        }

        .stats-key-panel .panel-header p {
            margin: 0;
            font-size: 13px;
        }

.stats-key-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(180px, 1fr));
    gap: 8px 12px;
}

    .stats-key-grid div {
        background: #fffaf5;
        border: 1px solid rgba(239, 108, 0, 0.16);
        border-radius: 12px;
        padding: 8px 14px;
        min-height: 40px;
        display: flex;
        flex-direction: row;
        align-items: center;
        gap: 10px;
    }

    .stats-key-grid strong {
        flex: 0 0 auto;
        color: var(--text-main);
        font-size: 13px;
        font-weight: 700;
        line-height: 1;
    }

    .stats-key-grid span {
        color: var(--text-muted);
        font-size: 12px;
        font-weight: 600;
        line-height: 1.2;
    }

.stats-team-table {
    min-width: 1320px;
}

@media (max-width: 1180px) {
    .stats-key-grid {
        grid-template-columns: repeat(2, minmax(180px, 1fr));
    }
}

@media (max-width: 640px) {
    .stats-key-grid {
        grid-template-columns: 1fr;
    }
}

/* Basketball stats sheet */

.stats-sheet-table {
    min-width: 1560px;
}

.stats-sheet-panel {
    margin-top: 22px;
}

@media print {
    .site-sidebar,
    .site-header,
    .page-intro-actions,
    .panel-action,
    .btn-primary-orange,
    .btn-secondary-soft {
        display: none !important;
    }

    body {
        background: #ffffff !important;
    }

    .main-content,
    .content-shell {
        margin: 0 !important;
        padding: 0 !important;
        max-width: none !important;
    }

    .panel-card,
    .stats-key-panel,
    .stats-sheet-panel {
        box-shadow: none !important;
        border: 1px solid #d1d5db !important;
        break-inside: avoid;
    }

    .modern-table-wrap {
        overflow: visible !important;
    }

    .stats-sheet-table {
        min-width: 0 !important;
        font-size: 10px;
    }

    .stats-key-grid {
        grid-template-columns: repeat(4, minmax(120px, 1fr)) !important;
    }
}

/* Typography refinement - reserve heaviest weight for hero moments */

.brand-mark,
.brand-title,
.login-brand-mark,
.login-brand-title,
.login-brand-domain,
.hero-badge-number,
.stat-value,
.team-detail-record div,
.game-result-card div,
.player-jersey-card div,
.team-edit-summary strong {
    font-weight: 800;
}

/* Slightly tighter tracking on large display headings */

.page-title,
.page-intro h2,
.dashboard-hero h2,
.team-detail-hero h2,
.game-detail-hero h2,
.player-detail-hero h2,
.access-denied-hero h2 {
    letter-spacing: -0.5px;
}

/* Game detail action buttons */

.game-boxscore-panel .panel-actions-row {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    align-items: center;
    gap: 10px;
}

.game-boxscore-panel .panel-action {
    min-height: 42px;
    border-radius: 999px;
    padding: 10px 18px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    font-weight: 800;
    line-height: 1;
    white-space: nowrap;
    border: 1px solid rgba(17, 24, 39, 0.16);
    background: #ffffff;
    color: var(--text-main);
    box-shadow: 0 8px 18px rgba(15, 23, 42, 0.08);
    transition: all 0.16s ease;
}

    .game-boxscore-panel .panel-action:hover {
        transform: translateY(-1px);
        border-color: rgba(239, 108, 0, 0.36);
        background: #fffaf5;
        color: var(--basketball-orange);
    }

    .game-boxscore-panel .panel-action.admin-action {
        border-color: transparent;
        background: linear-gradient(135deg, var(--basketball-orange), var(--basketball-orange-dark));
        color: #ffffff;
        box-shadow: 0 10px 22px rgba(239, 108, 0, 0.24);
    }

        .game-boxscore-panel .panel-action.admin-action:hover {
            background: linear-gradient(135deg, #ff7a0a, var(--basketball-orange-dark));
            color: #ffffff;
        }

@media (max-width: 820px) {
    .game-boxscore-panel .panel-actions-row {
        justify-content: stretch;
    }

    .game-boxscore-panel .panel-action {
        width: 100%;
    }
}

/* Live Entry page */

.live-entry-intro {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    padding: 8px 14px;
    margin-bottom: 6px;
    min-height: 0;
}

    .live-entry-intro .page-intro-kicker {
        font-size: 9px;
        margin-bottom: 2px;
        letter-spacing: 1.1px;
    }

    .live-entry-intro h2 {
        font-size: 20px;
        line-height: 1.05;
        margin: 0;
    }

    .live-entry-intro p {
        font-size: 12px;
        margin: 3px 0 0 0;
    }

    .live-entry-intro .page-intro-actions {
        display: flex;
        gap: 6px;
    }

        .live-entry-intro .page-intro-actions a {
            min-height: 32px;
            padding: 0 12px;
            border-radius: 10px;
            font-size: 12px;
        }

.live-entry-shell {
    margin-top: 6px;
}

.live-entry-form {
    display: grid;
    grid-template-columns: 1fr;
    gap: 8px;
    align-items: start;
}

.live-main-panel,
.live-side-panel,
.live-recent-panel {
    overflow: hidden;
}

.live-main-panel {
    padding: 14px;
    border-radius: 16px;
}

.live-side-panel {
    display: block;
    padding: 10px;
    border-radius: 14px;
    margin-top: 0;
}

.live-main-panel .panel-header {
    margin-bottom: 0;
}

    .live-main-panel .panel-header h3,
    .live-side-panel .panel-header h3 {
        font-size: 14px;
    }

    .live-main-panel .panel-header p,
    .live-side-panel .panel-header p {
        display: none;
    }

.live-period-row {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 0;
}

.live-period-pill {
    cursor: pointer;
}

    .live-period-pill input {
        position: absolute;
        opacity: 0;
        pointer-events: none;
    }

    .live-period-pill span {
        min-width: 50px;
        min-height: 34px;
        border-radius: 999px;
        border: 1px solid var(--border-soft);
        background: #ffffff;
        color: var(--text-main);
        display: inline-flex;
        align-items: center;
        justify-content: center;
        font-weight: 800;
        font-size: 12px;
        box-shadow: 0 8px 18px rgba(15, 23, 42, 0.06);
    }

    .live-period-pill input:checked + span {
        background: linear-gradient(135deg, var(--basketball-orange), var(--basketball-orange-dark));
        color: #ffffff;
        border-color: transparent;
        box-shadow: 0 10px 22px rgba(239, 108, 0, 0.24);
    }

.live-selected-panel {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 8px;
    margin-bottom: 0;
}

    .live-selected-panel > div {
        background: #fffaf5;
        border: 1px solid rgba(239, 108, 0, 0.18);
        border-radius: 12px;
        padding: 8px 12px;
        display: flex;
        align-items: center;
        gap: 6px;
        min-height: 40px;
    }

    .live-selected-panel span {
        display: inline;
        color: var(--text-muted);
        font-size: 12px;
        font-weight: 900;
        text-transform: none;
        letter-spacing: 0;
        margin-bottom: 0;
        white-space: nowrap;
    }

    .live-selected-panel strong {
        display: inline;
        color: var(--text-main);
        font-size: 13px;
        font-weight: 900;
        white-space: nowrap;
    }

.live-error-text,
#selectedPlayerText.live-error-text {
    color: #b91c1c !important;
}

.live-section {
    margin-top: 0;
}

.live-section-title {
    color: var(--text-main);
    font-size: 13px;
    font-weight: 800;
    margin-bottom: 7px;
}

.live-player-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 6px;
}

.live-player-button {
    min-height: 50px;
    border: 1px solid var(--border-soft);
    border-radius: 12px;
    background: #ffffff;
    color: var(--text-main);
    padding: 6px 7px;
    text-align: left;
    cursor: pointer;
    box-shadow: 0 8px 20px rgba(15, 23, 42, 0.06);
    transition: all 0.16s ease;
}

    .live-player-button:hover {
        transform: translateY(-1px);
        border-color: rgba(239, 108, 0, 0.34);
        background: #fffaf5;
    }

    .live-player-button.selected {
        background: linear-gradient(135deg, var(--basketball-orange), var(--basketball-orange-dark));
        color: #ffffff;
        border-color: transparent;
        box-shadow: 0 12px 26px rgba(239, 108, 0, 0.26);
    }

    .live-player-button span {
        display: inline-flex;
        min-width: 24px;
        min-height: 20px;
        border-radius: 999px;
        background: var(--basketball-orange-soft);
        color: var(--basketball-orange);
        align-items: center;
        justify-content: center;
        font-size: 10px;
        font-weight: 900;
        margin-bottom: 2px;
    }

    .live-player-button.selected span {
        background: rgba(255, 255, 255, 0.2);
        color: #ffffff;
    }

    .live-player-button strong {
        display: block;
        font-size: 11px;
        font-weight: 800;
        line-height: 1.1;
    }

    .live-player-button small {
        display: none;
    }

    .live-player-button.selected small {
        color: rgba(255, 255, 255, 0.78);
    }

.live-event-groups {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
}

.live-event-group {
    background: #f9fafb;
    border: 1px solid var(--border-soft);
    border-radius: 12px;
    padding: 8px;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 6px;
}

.live-event-group-title {
    grid-column: 1 / -1;
    color: var(--text-muted);
    font-size: 10px;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 0.7px;
    margin-bottom: 0;
}

.live-event-button {
    min-height: 34px;
    border: 0;
    border-radius: 10px;
    background: #e5e7eb;
    color: var(--text-main);
    font-size: 11px;
    font-weight: 900;
    cursor: pointer;
    transition: all 0.16s ease;
}

    .live-event-button:hover {
        transform: translateY(-1px);
        filter: brightness(0.98);
    }

    .live-event-button.live-made {
        background: #dcfce7;
        color: #166534;
    }

    .live-event-button.live-missed {
        background: #fee2e2;
        color: #991b1b;
    }

    .live-event-button.live-warning {
        background: #ffedd5;
        color: #9a3412;
    }

.live-side-field {
    margin-bottom: 7px;
}

    .live-side-field label {
        display: block;
        color: var(--text-muted);
        font-size: 9px;
        font-weight: 900;
        text-transform: uppercase;
        letter-spacing: 0.7px;
        margin-bottom: 3px;
    }

    .live-side-field .form-select,
    .live-side-field .form-control {
        min-height: 31px;
        height: 31px;
        border-radius: 9px;
        border-color: var(--border-soft);
        font-size: 12px;
        font-weight: 700;
        padding-top: 4px;
        padding-bottom: 4px;
    }

    .live-side-field small {
        display: none;
    }

.live-recent-panel {
    margin-top: 12px;
    padding: 14px;
}

.live-recent-list {
    display: flex;
    flex-direction: column;
}

.live-recent-item {
    display: grid;
    grid-template-columns: 150px 1fr;
    gap: 8px;
    padding: 8px 0;
    border-top: 1px solid var(--border-soft);
}

    .live-recent-item:first-child {
        border-top: 0;
    }

    .live-recent-item strong {
        color: var(--basketball-orange);
        font-weight: 900;
        margin-right: 8px;
    }

    .live-recent-item span {
        font-weight: 800;
    }

    .live-recent-item small {
        display: block;
        color: var(--text-muted);
        font-size: 10px;
        font-weight: 700;
        margin-top: 3px;
    }

/* Live Entry court */

.live-court-panel {
    margin: 0;
    border: 1px solid rgba(239, 108, 0, 0.16);
    border-radius: 14px;
    background: #fffaf5;
    padding: 8px;
}

.live-court-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 8px;
    margin-bottom: 6px;
}

    .live-court-header strong {
        display: block;
        font-size: 13px;
        font-weight: 900;
        color: var(--text-main);
    }

    .live-court-header span {
        display: block;
        color: var(--text-muted);
        font-size: 10px;
        font-weight: 700;
        margin-top: 2px;
    }

.live-court-direction {
    display: flex;
    align-items: center;
    gap: 6px;
    color: var(--basketball-orange);
    font-weight: 900;
}

    .live-court-direction span {
        color: rgba(239, 108, 0, 0.55);
        font-size: 12px;
        margin: 0;
    }

    .live-court-direction strong {
        color: var(--basketball-orange);
        font-size: 12px;
    }

.switch-sides-button {
    border: 1px solid rgba(255, 255, 255, 0.75);
    background: rgba(255, 255, 255, 0.18);
    color: #ffffff;
    border-radius: 999px;
    padding: 5px 9px;
    font-size: 10px;
    font-weight: 800;
    cursor: pointer;
    white-space: nowrap;
}

    .switch-sides-button:hover {
        background: rgba(255, 255, 255, 0.28);
    }

.live-court {
    --court-line: 3px;
    --court-inset: 18px;
    position: relative;
    width: 100%;
    aspect-ratio: 1504 / 732;
    min-height: 255px;
    border: 6px solid #c97c22;
    border-radius: 14px;
    overflow: hidden;
    background: linear-gradient( 90deg, #d68c30 0%, #efb056 17%, #f7cb79 34%, #f7d48a 50%, #f7cb79 66%, #efb056 83%, #d68c30 100% ), repeating-linear-gradient( 0deg, rgba(255, 255, 255, 0.08) 0, rgba(255, 255, 255, 0.08) 2px, transparent 2px, transparent 34px );
    box-shadow: inset 0 0 0 4px #ffffff, inset 0 0 28px rgba(87, 42, 8, 0.16), 0 12px 26px rgba(15, 23, 42, 0.10);
}

    .live-court::before {
        content: "";
        position: absolute;
        inset: var(--court-inset);
        border: var(--court-line) solid #ffffff;
        pointer-events: none;
        z-index: 3;
    }

    .live-court::after {
        content: "";
        position: absolute;
        inset: 0;
        background: linear-gradient( 90deg, rgba(255, 255, 255, 0), rgba(255, 255, 255, 0.16), rgba(255, 255, 255, 0) );
        pointer-events: none;
        z-index: 1;
    }

.court-half-line,
.court-center-circle,
.court-center-dot,
.court-key,
.court-free-circle,
.court-restricted,
.court-backboard,
.court-hoop,
.court-arc,
.court-corner-three,
.court-zone {
    position: absolute;
    z-index: 4;
}

.court-half-line {
    top: var(--court-inset);
    bottom: var(--court-inset);
    left: 50%;
    width: var(--court-line);
    background: #ffffff;
    transform: translateX(-50%);
}

.court-center-circle {
    width: 12.2%;
    aspect-ratio: 1 / 1;
    border: var(--court-line) solid #ffffff;
    border-radius: 999px;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

.court-center-dot {
    width: 9px;
    height: 9px;
    border-radius: 999px;
    background: #ffffff;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

.court-key {
    width: 20.5%;
    height: 32%;
    border: var(--court-line) solid #ffffff;
    top: 50%;
    transform: translateY(-50%);
}

.court-key-left {
    left: var(--court-inset);
}

.court-key-right {
    right: var(--court-inset);
}

.court-free-circle {
    width: 13%;
    aspect-ratio: 1 / 1;
    top: 50%;
    transform: translateY(-50%);
}

.court-free-circle-left {
    left: calc(var(--court-inset) + 14.2%);
}

.court-free-circle-right {
    right: calc(var(--court-inset) + 14.2%);
}

.court-free-circle::before,
.court-free-circle::after {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: 999px;
}

.court-free-circle-left::before {
    border: var(--court-line) solid #ffffff;
    clip-path: inset(0 0 0 50%);
}

.court-free-circle-left::after {
    border: var(--court-line) dashed #ffffff;
    clip-path: inset(0 50% 0 0);
}

.court-free-circle-right::before {
    border: var(--court-line) solid #ffffff;
    clip-path: inset(0 50% 0 0);
}

.court-free-circle-right::after {
    border: var(--court-line) dashed #ffffff;
    clip-path: inset(0 0 0 50%);
}

.court-restricted {
    width: 7.4%;
    aspect-ratio: 1 / 1;
    border: var(--court-line) solid #ffffff;
    border-radius: 999px;
    top: 50%;
    transform: translateY(-50%);
}

.court-restricted-left {
    left: calc(var(--court-inset) + 2.5%);
    border-left-color: transparent;
}

.court-restricted-right {
    right: calc(var(--court-inset) + 2.5%);
    border-right-color: transparent;
}

.court-backboard {
    width: 5px;
    height: 16%;
    background: #ffffff;
    top: 50%;
    transform: translateY(-50%);
    box-shadow: 0 0 6px rgba(15, 23, 42, 0.14);
}

.court-backboard-left {
    left: calc(var(--court-inset) + 3.2%);
}

.court-backboard-right {
    right: calc(var(--court-inset) + 3.2%);
}

.court-hoop {
    width: 2.4%;
    aspect-ratio: 1 / 1;
    border: 3px solid var(--basketball-orange);
    border-radius: 999px;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.16);
}

.court-hoop-left {
    left: calc(var(--court-inset) + 5.6%);
}

.court-hoop-right {
    right: calc(var(--court-inset) + 5.6%);
}

.court-arc {
    width: 58%;
    height: 112%;
    border: var(--court-line) solid #ffffff;
    border-radius: 999px;
    top: 50%;
    transform: translateY(-50%);
}

.court-arc-left {
    left: -22.5%;
    clip-path: inset(12% 0 12% 57.2%);
}

.court-arc-right {
    right: -22.5%;
    clip-path: inset(12% 57.2% 12% 0);
}

.court-corner-three,
.court-corner-three-left-top,
.court-corner-three-left-bottom,
.court-corner-three-right-top,
.court-corner-three-right-bottom {
    display: none;
}

.court-zone {
    min-height: 24px;
    border: 1px solid rgba(255, 255, 255, 0.82);
    border-radius: 999px;
    background: rgba(128, 87, 43, 0.76);
    color: #ffffff;
    font-size: 9px;
    font-weight: 900;
    padding: 4px 7px;
    line-height: 1;
    box-shadow: 0 8px 18px rgba(15, 23, 42, 0.18);
    cursor: pointer;
    z-index: 6;
}

.court-click-marker {
    position: absolute;
    width: 20px;
    height: 20px;
    border: 3px solid #ffffff;
    border-radius: 999px;
    background: var(--basketball-orange);
    box-shadow: 0 0 0 5px rgba(239, 108, 0, 0.28), 0 8px 18px rgba(15, 23, 42, 0.28);
    transform: translate(-50%, -50%);
    opacity: 0;
    pointer-events: none;
    z-index: 50;
}

    .court-click-marker.visible {
        opacity: 1;
    }

.court-def-shade {
    position: absolute;
    top: 0;
    bottom: 0;
    width: 50%;
    background: rgba(7, 16, 20, 0.22);
    opacity: 0;
    pointer-events: none;
    z-index: 2;
    transition: opacity 0.16s ease;
}

    .court-def-shade.active {
        opacity: 1;
    }

.court-def-shade-left {
    left: 0;
    border-radius: 18px 0 0 18px;
}

.court-def-shade-right {
    right: 0;
    border-radius: 0 18px 18px 0;
}

.zone-left-basket-right-corner {
    left: 3%;
    top: 12%;
}

.zone-left-basket-right-wing {
    left: 15%;
    top: 25%;
}

.zone-left-basket-top-key {
    left: 29%;
    top: 50%;
    transform: translateY(-50%);
}

.zone-left-basket-paint {
    left: 8%;
    top: 50%;
    transform: translateY(-50%);
}

.zone-left-basket-left-wing {
    left: 15%;
    bottom: 25%;
}

.zone-left-basket-left-corner {
    left: 3%;
    bottom: 12%;
}

.zone-right-basket-left-corner {
    right: 3%;
    top: 12%;
}

.zone-right-basket-left-wing {
    right: 15%;
    top: 25%;
}

.zone-right-basket-top-key {
    right: 29%;
    top: 50%;
    transform: translateY(-50%);
}

.zone-right-basket-paint {
    right: 8%;
    top: 50%;
    transform: translateY(-50%);
}

.zone-right-basket-right-wing {
    right: 15%;
    bottom: 25%;
}

.zone-right-basket-right-corner {
    right: 3%;
    bottom: 12%;
}

@media (min-width: 1181px) {
    .live-main-panel {
        display: grid;
        grid-template-columns: minmax(0, 1fr) 560px;
        grid-template-areas:
            "header header"
            "period period"
            "selected selected"
            "players court"
            "events court"
            "optional court";
        column-gap: 12px;
        row-gap: 10px;
        align-items: start;
    }

        .live-main-panel > .panel-header {
            grid-area: header;
            margin-bottom: 0;
        }

        .live-main-panel > .live-period-row {
            grid-area: period;
        }

        .live-main-panel > .live-selected-panel {
            grid-area: selected;
        }

        .live-main-panel > .live-court-panel {
            grid-area: court;
            margin: 0;
        }

        .live-main-panel > .validation-alert {
            grid-column: 1 / -1;
            margin: 0;
        }

        .live-main-panel > section.live-section:nth-of-type(2) {
            grid-area: players;
        }

        .live-main-panel > section.live-section:nth-of-type(3) {
            grid-area: events;
        }

        .live-main-panel > .live-side-panel {
            grid-area: optional;
            width: 100%;
        }

        .live-main-panel > .live-side-panel {
            grid-area: optional;
            width: 100%;
            display: grid;
            grid-template-columns: 1fr 1fr 1.2fr;
            gap: 8px;
            align-items: end;
            padding: 8px;
            margin: 0;
            border-radius: 12px;
        }

    .live-side-panel .panel-header {
        display: none;
    }

    .live-side-field {
        margin-bottom: 0;
    }

        .live-side-field label,
        .live-side-field small {
            display: none;
        }

        .live-side-field .form-select,
        .live-side-field .form-control {
            height: 34px;
            min-height: 34px;
            font-size: 12px;
            border-radius: 9px;
        }

    .live-court {
        min-height: 310px;
    }

    .live-court-panel {
        padding: 10px;
    }

    .court-zone {
        font-size: 10px;
        padding: 5px 8px;
    }
}

@media (max-width: 1180px) {
    .live-entry-form {
        grid-template-columns: 1fr;
    }

    .live-player-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .live-main-panel {
        display: block;
    }

    .live-court-panel {
        margin: 10px 0;
    }

    .live-section {
        margin-top: 10px;
    }
}

@media (max-width: 820px) {
    .live-entry-intro {
        flex-direction: column;
        align-items: flex-start;
        padding: 18px;
    }

        .live-entry-intro .page-intro-actions {
            width: 100%;
            display: flex;
            flex-direction: column;
        }

            .live-entry-intro .page-intro-actions a {
                width: 100%;
            }

    .live-selected-panel,
    .live-event-groups {
        grid-template-columns: 1fr;
    }

    .live-player-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .live-player-button {
        min-height: 64px;
    }

    .live-event-button {
        min-height: 46px;
    }

    .live-court {
        --court-line: 2px;
        --court-inset: 12px;
        min-height: 260px;
        border-width: 7px;
        border-radius: 14px;
    }

    .court-center-dot {
        width: 7px;
        height: 7px;
    }

    .court-backboard {
        width: 4px;
    }

    .court-hoop {
        border-width: 2px;
    }

    .court-zone {
        min-height: 28px;
        font-size: 10px;
        padding: 5px 8px;
    }

    .court-click-marker {
        width: 18px;
        height: 18px;
    }

    .live-recent-item {
        grid-template-columns: 1fr;
    }

}

/* Reports filter compact horizontal layout */

.report-filter-row {
    display: grid;
    grid-template-columns: minmax(230px, 1fr) minmax(280px, 1.15fr) 230px;
    gap: 12px;
    align-items: stretch;
    width: 100%;
}

    .report-filter-row > .event-entry-section {
        margin: 0;
        min-width: 0;
        padding: 14px 16px;
    }

    .report-filter-row .event-section-title {
        margin-bottom: 10px;
    }

    .report-filter-row .event-entry-grid {
        grid-template-columns: 1fr;
        gap: 8px;
    }

    .report-filter-row .form-field {
        min-width: 0;
    }

    .report-filter-row .form-select {
        width: 100%;
        min-width: 0;
    }

.report-filter-actions {
    display: flex;
    flex-direction: column;
}

    .report-filter-actions .form-actions {
        display: flex;
        flex-wrap: nowrap;
        align-items: center;
        gap: 8px;
        margin: 0;
    }

    .report-filter-actions .btn-primary-orange,
    .report-filter-actions .btn-secondary-soft {
        padding-left: 14px;
        padding-right: 14px;
        white-space: nowrap;
    }

@media (max-width: 950px) {
    .report-filter-row {
        grid-template-columns: 1fr 1fr;
    }

    .report-filter-actions {
        grid-column: 1 / -1;
    }
}

@media (max-width: 820px) {
    .report-filter-row {
        grid-template-columns: 1fr;
    }

    .report-filter-actions {
        grid-column: auto;
    }

        .report-filter-actions .form-actions {
            flex-direction: column;
            align-items: stretch;
        }
}

/* Stats filter compact horizontal layout */

.stats-filter-row {
    display: grid;
    grid-template-columns: minmax(0, 2fr) minmax(300px, 1fr);
    gap: 16px;
    align-items: stretch;
    width: 100%;
}

    .stats-filter-row > .event-entry-section {
        margin: 0;
        min-width: 0;
    }

.stats-filter-team .event-entry-grid {
    grid-template-columns: 1fr;
}

.stats-filter-actions {
    display: flex;
    flex-direction: column;
}

    .stats-filter-actions .form-actions {
        display: flex;
        align-items: center;
        gap: 10px;
        margin-top: 0;
    }

@media (max-width: 900px) {
    .stats-filter-row {
        grid-template-columns: 1fr;
    }
}

/* Compact directory page hero */

.compact-directory-hero {
    min-height: auto;
    padding: 18px 24px;
    align-items: center;
}

.compact-directory-hero-copy {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.compact-directory-hero .hero-eyebrow {
    margin-bottom: 0;
}

.compact-directory-hero p {
    margin: 0;
}

@media (max-width: 820px) {
    .compact-directory-hero {
        align-items: flex-start;
        gap: 14px;
    }
}

/* Live Entry team selector */

.live-team-row {
    display: grid;
    grid-template-columns: repeat(2, minmax(180px, 1fr));
    gap: 12px;
    max-width: 720px;
}

.live-team-pill {
    width: 100%;
}

    .live-team-pill span {
        min-height: 54px;
        width: 100%;
        padding: 10px 18px;
        border-radius: 14px;
        font-size: 15px;
        font-weight: 800;
        text-align: center;
        border: 2px solid var(--border-soft);
        background: #ffffff;
        color: var(--text-main);
    }

    .live-team-pill input:checked + span {
        border-color: var(--basketball-orange);
        background: var(--basketball-orange);
        color: #ffffff;
        box-shadow: 0 10px 24px rgba(239, 108, 0, 0.24);
    }

    .live-team-pill span:hover {
        border-color: var(--basketball-orange);
    }

.live-selected-panel.has-team-step {
    grid-template-columns: repeat(5, minmax(0, 1fr));
}

.live-player-button[hidden] {
    display: none !important;
}

/* Opponent team colour scheme */
.live-entry-form.opponent-active {
    --opponent-accent: #4f46e5;
    --opponent-accent-dark: #3730a3;
    --opponent-accent-soft: #eef2ff;
}

    /* Selected opponent team button */
    .live-entry-form.opponent-active
    .live-team-pill input:checked + span {
        border-color: var(--opponent-accent);
        background: var(--opponent-accent);
        color: #fff;
        box-shadow: 0 10px 24px rgba(79, 70, 229, .24);
    }

    /* Main Live Entry panel */
    .live-entry-form.opponent-active .live-main-panel {
        border-color: rgba(79, 70, 229, .35);
        box-shadow: 0 18px 45px rgba(79, 70, 229, .10);
    }

    /* Section headings */
    .live-entry-form.opponent-active .live-section-title,
    .live-entry-form.opponent-active .live-court-header strong {
        color: var(--opponent-accent-dark);
    }

    /* Active roster badge */
    .live-entry-form.opponent-active #activeRosterName {
        background: var(--opponent-accent-soft);
        color: var(--opponent-accent-dark);
    }

    /* Selected opponent player */
    .live-entry-form.opponent-active .live-player-button.selected {
        border-color: var(--opponent-accent);
        background: var(--opponent-accent-soft);
        color: var(--opponent-accent-dark);
        box-shadow: 0 10px 24px rgba(79, 70, 229, .18);
    }

    /* Court direction controls */
    .live-entry-form.opponent-active .live-court-direction strong {
        color: var(--opponent-accent-dark);
    }

    .live-entry-form.opponent-active .switch-sides-button {
        border-color: var(--opponent-accent);
        color: var(--opponent-accent-dark);
    }

        .live-entry-form.opponent-active .switch-sides-button:hover {
            background: var(--opponent-accent-soft);
        }

    /* Selected court marker */
    .live-entry-form.opponent-active .court-click-marker {
        background: var(--opponent-accent);
        border-color: #fff;
        box-shadow: 0 0 0 4px rgba(79, 70, 229, .22);
    }

@media (max-width: 900px) {
    .live-selected-panel.has-team-step {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 640px) {
    .live-team-row {
        grid-template-columns: 1fr;
        max-width: none;
    }

    .live-selected-panel.has-team-step {
        grid-template-columns: 1fr;
    }
}

.live-recent-team {
    display: inline-flex;
    align-items: center;
    min-height: 24px;
    padding: 3px 9px;
    margin: 0 6px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 800;
}

    .live-recent-team.primary {
        background: var(--basketball-orange-soft);
        color: var(--basketball-orange-dark);
    }

    .live-recent-team.opponent {
        background: #eef2ff;
        color: #4338ca;
    }

.live-roster-warning {
    padding: 14px 16px;
    margin-bottom: 14px;
    border: 1px solid rgba(194, 65, 12, 0.24);
    border-radius: 14px;
    background: #fff7ed;
    color: #9a3412;
    font-size: 13px;
    font-weight: 700;
}

.live-player-section-title {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
}

    .live-player-section-title strong {
        display: inline-flex;
        align-items: center;
        min-height: 30px;
        padding: 5px 12px;
        border-radius: 999px;
        background: var(--basketball-orange-soft);
        color: var(--basketball-orange-dark);
        font-size: 12px;
        font-weight: 800;
    }

@media (max-width: 640px) {
    .live-player-section-title {
        align-items: flex-start;
        flex-direction: column;
    }
}

.live-event-button:disabled,
.live-event-button.submitting {
    opacity: 0.55;
    cursor: wait;
    pointer-events: none;
}

/* Teams filter: Team Type and Status on one row */

.teams-type-status-row {
    display: grid;
    grid-template-columns: minmax(170px, 1fr) 190px;
    gap: 18px;
    align-items: end;
    min-width: 390px;
}

.teams-status-field {
    min-width: 0;
}

@media (max-width: 820px) {
    .teams-type-status-row {
        grid-template-columns: 1fr;
        min-width: 0;
    }
}

/* Teams filter: keep actions on the top row */

.filter-form {
    grid-template-columns: minmax(390px, 1fr) minmax(190px, 220px) minmax(220px, 1fr) 150px auto;
    align-items: end;
}

.filter-actions {
    align-self: end;
    margin: 0;
}

/* Stats filter: compact single-row layout */

.stats-filter-row {
    display: grid;
    grid-template-columns: minmax(300px, 1.35fr) minmax(280px, 1fr) auto;
    gap: 14px;
    align-items: stretch;
    width: 100%;
}

    .stats-filter-row > .event-entry-section {
        min-width: 0;
        margin: 0;
        padding: 14px 16px;
    }

    .stats-filter-row .event-section-title {
        margin-bottom: 12px;
    }

    .stats-filter-row .event-entry-grid {
        grid-template-columns: 1fr;
        gap: 10px;
    }

.stats-filter-actions {
    min-width: 230px;
}

    .stats-filter-actions .form-actions {
        display: flex;
        flex-wrap: nowrap;
        gap: 10px;
        margin: 0;
        align-items: center;
    }

    .stats-filter-actions .btn-primary-orange,
    .stats-filter-actions .btn-secondary-soft {
        white-space: nowrap;
    }

@media (max-width: 1050px) {
    .stats-filter-row {
        grid-template-columns: 1fr 1fr;
    }

    .stats-filter-actions {
        grid-column: 1 / -1;
    }
}

@media (max-width: 820px) {
    .stats-filter-row {
        grid-template-columns: 1fr;
    }

    .stats-filter-actions {
        grid-column: auto;
        min-width: 0;
    }

        .stats-filter-actions .form-actions {
            flex-direction: column;
            align-items: stretch;
        }
}

/* Final Games filter desktop layout */

.games-filter-form {
    display: grid !important;
    grid-template-columns: 115px minmax(160px, 1fr) minmax(190px, 1.15fr) 150px 150px 150px !important;
    column-gap: 10px;
    row-gap: 10px;
    align-items: end;
    width: 100%;
}

    .games-filter-form > * {
        min-width: 0;
    }

    .games-filter-form .filter-field:first-child {
        width: 115px;
        min-width: 115px;
    }

    .games-filter-form .filter-field .form-control,
    .games-filter-form .filter-field .form-select {
        width: 100%;
        min-width: 0;
    }

    .games-filter-form .filter-actions {
        display: flex;
        flex-wrap: nowrap;
        gap: 8px;
        margin: 0;
        align-self: end;
        white-space: nowrap;
    }

        .games-filter-form .filter-actions .btn-primary-orange,
        .games-filter-form .filter-actions .btn-secondary-soft {
            padding-left: 13px;
            padding-right: 13px;
        }

@media (max-width: 900px) {
    .games-filter-form {
        grid-template-columns: 1fr 1fr !important;
    }
}

@media (max-width: 820px) {
    .games-filter-form {
        grid-template-columns: 1fr !important;
    }

        .games-filter-form .filter-field:first-child {
            width: auto;
            min-width: 0;
        }
}

/* Shared compact filter layout for Stats and Reports */

.stats-filter-row,
.report-filter-row {
    display: grid;
    grid-template-columns: 310px minmax(280px, 1fr) 270px;
    gap: 14px;
    align-items: stretch;
    width: 100%;
}

    .stats-filter-row > .event-entry-section,
    .report-filter-row > .event-entry-section {
        margin: 0;
        min-width: 0;
        padding: 14px 16px;
    }

    .stats-filter-row .event-section-title,
    .report-filter-row .event-section-title {
        margin-bottom: 10px;
    }

    .stats-filter-row .event-entry-grid,
    .report-filter-row .event-entry-grid {
        grid-template-columns: 1fr;
        gap: 8px;
    }

    .stats-filter-row .form-field,
    .report-filter-row .form-field {
        min-width: 0;
    }

    .stats-filter-row .form-select,
    .report-filter-row .form-select {
        width: 100%;
        min-width: 0;
    }

    /* Make the Team Type inner box smaller */

    .stats-filter-row > .event-entry-section:first-child .event-entry-grid,
    .report-filter-row > .event-entry-section:first-child .event-entry-grid {
        max-width: 260px;
    }

    .stats-filter-row > .event-entry-section:first-child .form-field,
    .report-filter-row > .event-entry-section:first-child .form-field {
        padding: 12px 14px;
    }

/* Keep Apply and Clear together */

.stats-filter-actions,
.report-filter-actions {
    display: flex;
    flex-direction: column;
}

    .stats-filter-actions .form-actions,
    .report-filter-actions .form-actions {
        display: flex;
        flex-wrap: nowrap;
        align-items: center;
        gap: 10px;
        margin: 0;
    }

    .stats-filter-actions .btn-primary-orange,
    .stats-filter-actions .btn-secondary-soft,
    .report-filter-actions .btn-primary-orange,
    .report-filter-actions .btn-secondary-soft {
        padding-left: 14px;
        padding-right: 14px;
        white-space: nowrap;
    }

@media (max-width: 1000px) {
    .stats-filter-row,
    .report-filter-row {
        grid-template-columns: 1fr 1fr;
    }

    .stats-filter-actions,
    .report-filter-actions {
        grid-column: 1 / -1;
    }
}

@media (max-width: 820px) {
    .stats-filter-row,
    .report-filter-row {
        grid-template-columns: 1fr;
    }

    .stats-filter-actions,
    .report-filter-actions {
        grid-column: auto;
    }

        .stats-filter-actions .form-actions,
        .report-filter-actions .form-actions {
            flex-direction: column;
            align-items: stretch;
        }

    .stats-filter-row > .event-entry-section:first-child .event-entry-grid,
    .report-filter-row > .event-entry-section:first-child .event-entry-grid {
        max-width: none;
    }
}

/* Players filter: compact desktop row */

.players-filter-form {
    display: grid;
    grid-template-columns: 180px minmax(190px, 1fr) minmax(210px, 1.15fr) 150px auto;
    gap: 14px;
    align-items: end;
    width: 100%;
}

    .players-filter-form > * {
        min-width: 0;
    }

    .players-filter-form .filter-field .form-control,
    .players-filter-form .filter-field .form-select {
        width: 100%;
        min-width: 0;
    }

    .players-filter-form .filter-actions {
        display: flex;
        flex-wrap: nowrap;
        gap: 8px;
        margin: 0;
        white-space: nowrap;
    }

        .players-filter-form .filter-actions .btn-primary-orange,
        .players-filter-form .filter-actions .btn-secondary-soft {
            padding-left: 14px;
            padding-right: 14px;
        }

@media (max-width: 1000px) {
    .players-filter-form {
        grid-template-columns: 1fr 1fr;
    }

        .players-filter-form .filter-actions {
            grid-column: 1 / -1;
        }
}

@media (max-width: 820px) {
    .players-filter-form {
        grid-template-columns: 1fr;
    }

        .players-filter-form .filter-actions {
            grid-column: auto;
            flex-direction: column;
        }
}

