:root {
    --bg-color: #1a1a1a;
    --text-color: #e0e0e0;
    --primary-color: #4caf50;
    --primary-color-rgb: 76, 175, 80;
    --secondary-color: #2196f3;
    --accent-color: #ff9800;
    --card-bg: #2d2d2d;
    --border-color: #444;
    --text-muted: #888;
    --font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

html {
    height: 100%;
}

body {
    background-color: var(--bg-color);
    color: var(--text-color);
    font-family: var(--font-family);
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

body.app-shell-active {
    height: 100%;
    min-height: 100%;
    overflow: hidden;
}

#app {
    display: flex;
    flex-direction: column;
    flex: 1;
}

body.app-shell-active #app {
    height: 100vh;
    min-height: 100vh;
    max-height: 100vh;
    overflow: hidden;
}

header {
    background-color: #111;
    padding: 1rem;
    border-bottom: 2px solid var(--primary-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

header h1 {
    margin: 0;
    font-size: 1.5rem;
    color: white;
}

.top-nav ul {
    list-style: none;
    display: flex;
    gap: 1rem;
    margin: 0;
    padding: 0;
}

.top-nav a {
    color: var(--text-color);
    text-decoration: none;
    font-weight: bold;
}

.top-nav a:hover {
    color: white;
}

main {
    flex: 1;
    padding: 2rem;
    max-width: 1200px;
    margin: 0 auto;
    width: 100%;
}

footer {
    background-color: #111;
    padding: 1rem;
    text-align: center;
    font-size: 0.8rem;
    border-top: 1px solid var(--border-color);
}

/* App Shell Layout */
.app-shell {
    display: flex;
    flex-direction: column;
    height: 100vh;
    overflow: hidden;
}

body.app-shell-active .app-shell {
    height: 100vh;
    min-height: 100vh;
    max-height: 100vh;
}

.shell-header-container {
    flex-shrink: 0;
}

.shell-sidebar-overlay {
    display: none;
}

.shell-body {
    display: flex;
    flex: 1;
    overflow: hidden;
    min-height: 0;
}

.shell-sidebar-container {
    width: 240px;
    background-color: #111;
    border-right: 1px solid var(--border-color);
    flex-shrink: 0;
    overflow-y: auto;
}

.shell-content {
    flex: 1;
    padding: 2rem;
    overflow-y: auto;
    max-width: none;
    width: auto;
    margin: 0;
    min-width: 0;
    min-height: 0;
    box-sizing: border-box;
    background:
        radial-gradient(circle at top right, rgba(var(--primary-color-rgb), 0.12), transparent 34rem),
        radial-gradient(circle at bottom left, rgba(255, 179, 71, 0.06), transparent 30rem),
        linear-gradient(180deg, rgba(255, 255, 255, 0.025), transparent 42rem),
        var(--bg-color);
    background-attachment: local;
}

.shell-content>* {
    width: 100%;
    max-width: 1200px;
    margin-left: auto;
    margin-right: auto;
    box-sizing: border-box;
}

.shell-footer-container,
.app-footer {
    flex-shrink: 0;
    width: 100%;
    box-sizing: border-box;
}

/* Header Styles */
.app-header {
    background-color: #111;
    padding: 0.75rem 1.5rem;
    border-bottom: 2px solid var(--primary-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.header-brand h1 {
    margin: 0;
    font-size: 1.25rem;
    color: white;
}

.header-info {
    display: flex;
    gap: 1.5rem;
    font-size: 0.9rem;
}

.club-name {
    font-weight: bold;
    color: var(--accent-color);
}

.club-balance {
    padding: 0.18rem 0.55rem;
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.06);
    font-weight: 800;
    white-space: nowrap;
}

.club-balance.is-positive {
    color: var(--success-color, #4caf50);
}

.club-balance.is-negative {
    color: var(--error-color, #f44336);
}

.user-name {
    color: rgba(255, 255, 255, 0.72);
}

.logout-label-compact {
    display: none;
}

/* Sidebar Styles */
.app-sidebar {
    --sidebar-font-family: "Trebuchet MS", "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
    display: flex;
    flex-direction: column;
    height: 100%;
    position: relative;
    overflow: hidden;
    background:
        linear-gradient(rgba(18, 22, 20, 0.68), rgba(18, 22, 20, 0.98)),
        url("../../assets/sidebar-tactics.svg") right 1rem top 0.75rem / 100% auto no-repeat,
        linear-gradient(180deg, rgba(31, 45, 36, 0.96) 0%, rgba(18, 22, 20, 0.98) 58%, #111 100%),
        repeating-linear-gradient(90deg, rgba(255, 255, 255, 0.035) 0 1px, transparent 1px 42px);
    border-right: 1px solid rgba(114, 148, 124, 0.28);
    font-family: var(--sidebar-font-family);
}

.app-sidebar .sidebar-content,
.app-sidebar .sidebar-footer {
    position: relative;
    z-index: 1;
}

.app-sidebar .sidebar-content {
    flex: 1;
    overflow-y: auto;
    padding: 1rem 0 1rem;
}

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

.sidebar-club-card {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin: 0 0.85rem 1rem;
    padding: 0.85rem;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    background:
        linear-gradient(135deg, rgba(var(--primary-color-rgb), 0.2), rgba(255, 255, 255, 0.045)),
        rgba(10, 14, 12, 0.72);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

.club-crest {
    width: 2.65rem;
    height: 2.65rem;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
    color: #ffffff;
    font-weight: 900;
    letter-spacing: 0;
    background:
        radial-gradient(circle at 50% 42%, rgba(255, 255, 255, 0.18), transparent 42%),
        linear-gradient(145deg, #21683a, #12351f);
    border: 2px solid rgba(255, 255, 255, 0.65);
    box-shadow: 0 0 0 3px rgba(var(--primary-color-rgb), 0.16);
    overflow: hidden;
}

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

.club-crest.has-logo {
    background: transparent;
    border-color: rgba(255, 255, 255, 0.18);
    box-shadow: none;
}

.club-logo-frame {
    position: relative;
    display: inline-flex;
    flex: 0 0 auto;
}

.club-logo-stars {
    position: absolute;
    left: 50%;
    top: -1.12rem;
    transform: translateX(-50%);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.06rem;
    color: #f6d36b;
    font-size: 1.35rem;
    font-weight: 900;
    line-height: 1;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.42);
    pointer-events: none;
    white-space: nowrap;
}

.club-logo-frame--sidebar .club-logo-stars {
    top: -0.92rem;
    font-size: 1.05rem;
}

.club-logo-frame--overview .club-logo-stars,
.club-logo-frame--settings .club-logo-stars {
    top: -1.15rem;
    font-size: 1.4rem;
}

.club-logo-star-count {
    margin-left: 0.18rem;
    font-size: 0.78rem;
}

.club-card-copy {
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 0.12rem;
}

.club-card-copy strong,
.club-card-copy span {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.club-card-copy strong {
    color: #ffffff;
    font-size: 0.95rem;
    font-weight: 800;
    line-height: 1.15;
}

.club-card-copy span {
    color: rgba(255, 255, 255, 0.66);
    font-size: 0.76rem;
    font-weight: 700;
    line-height: 1.2;
}

.app-sidebar ul {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
}

.nav-item {
    display: flex;
    flex-direction: column;
}

.nav-link {
    display: flex;
    align-items: center;
    min-height: 2.85rem;
    padding: 0.62rem 0.85rem;
    margin: 0.1rem 0.65rem;
    color: var(--text-color);
    text-decoration: none;
    transition: all 0.2s;
    gap: 0.72rem;
    border-left: 3px solid transparent;
    border-radius: 7px;
    position: relative;
}

.nav-link:hover {
    background-color: rgba(255, 255, 255, 0.075);
    color: white;
}

.nav-link.active {
    background: rgba(255, 255, 255, 0.035);
    border-left-color: transparent;
    color: white;
    box-shadow: none;
}

.nav-link.active::before,
.nav-link.active::after {
    content: "";
    position: absolute;
    pointer-events: none;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.78);
    box-shadow:
        0 0 0 1px rgba(var(--primary-color-rgb), 0.12),
        0 0 8px rgba(var(--primary-color-rgb), 0.28);
}

.nav-link.active::before {
    left: 0.35rem;
    top: 0.52rem;
    bottom: 0.46rem;
    width: 2px;
    opacity: 0.86;
    transform: rotate(-1deg);
}

.nav-link.active::after {
    left: 2.8rem;
    right: 1.1rem;
    bottom: 0.38rem;
    height: 2px;
    opacity: 0.72;
    transform: rotate(-0.8deg);
}

.app-icon {
    width: 1.35rem;
    height: 1.35rem;
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: currentColor;
}

.app-icon svg {
    width: 100%;
    height: 100%;
    display: block;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.nav-label {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 0.95rem;
    font-weight: 800;
    line-height: 1.24;
    text-shadow: 0 0 0.35rem rgba(255, 255, 255, 0.08);
}

.nav-badge,
.nav-subtle-badge {
    margin-left: auto;
    min-width: 1.45rem;
    height: 1.45rem;
    padding: 0 0.35rem;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    line-height: 1;
}

.nav-badge {
    background: #d9534f;
    color: #fff;
    font-size: 0.78rem;
}

.nav-subtle-badge {
    min-width: 0;
    height: 1.35rem;
    border: 1px solid rgba(255, 255, 255, 0.14);
    color: rgba(255, 255, 255, 0.72);
    background: rgba(255, 255, 255, 0.06);
    font-size: 0.64rem;
    text-transform: uppercase;
    letter-spacing: 0;
}

.nav-link--match {
    margin-top: 0.55rem;
    background:
        linear-gradient(90deg, rgba(var(--primary-color-rgb), 0.18), rgba(255, 152, 0, 0.08)),
        rgba(255, 255, 255, 0.035);
    border-color: rgba(var(--primary-color-rgb), 0.55);
}

.nav-link--match::after {
    content: "";
    position: absolute;
    left: 0.85rem;
    right: 0.85rem;
    top: -0.38rem;
    border-top: 1px dashed rgba(255, 255, 255, 0.16);
}

/* Sidebar Widgets */
.sidebar-widgets {
    padding: 1rem 0.85rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    border-top: 1px solid rgba(255, 255, 255, 0.09);
    margin-top: 1rem;
}

.sidebar-widget h4 {
    margin: 0 0 0.5rem 0;
    font-size: 0.75rem;
    text-transform: uppercase;
    color: var(--text-muted);
    letter-spacing: 0;
    font-family: var(--sidebar-font-family);
    font-weight: 900;
}

/* Results Ticker */
.results-ticker {
    background: rgba(7, 10, 8, 0.68);
    border-radius: 4px;
    overflow: hidden;
    padding: 0.5rem 0;
    margin-bottom: 0.5rem;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.ticker-wrapper {
    width: 100%;
    overflow: hidden;
    white-space: nowrap;
}

.ticker-content {
    display: inline-block;
    padding-left: 100%;
    animation: ticker 10s linear infinite;
    font-size: 0.8rem;
    font-weight: bold;
    color: var(--accent-color);
}

@keyframes ticker {
    0% {
        transform: translate3d(0, 0, 0);
    }

    100% {
        transform: translate3d(-100%, 0, 0);
    }
}

.quick-table .widget-content {
    background: rgba(7, 10, 8, 0.68);
    border-radius: 4px;
    padding: 0.5rem;
    font-size: 0.85rem;
}

.table-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 0.4rem;
    padding: 0.25rem 0;
    border-bottom: 1px solid #222;
}

.table-row:last-child {
    border-bottom: none;
}

.table-row.highlight {
    color: white;
    font-weight: bold;
    background: rgba(var(--primary-color-rgb), 0.12);
    margin: 0 -0.25rem;
    padding-left: 0.25rem;
    padding-right: 0.25rem;
    border-radius: 4px;
}

.table-row .pos {
    width: 25px;
    color: var(--text-muted);
    flex: 0 0 auto;
}

.table-row .name {
    flex: 1;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.table-row .pts {
    font-weight: bold;
    flex: 0 0 auto;
}

.sidebar-widget.match-info {
    font-size: 0.85rem;
    flex: initial;
    text-align: left;
}

.match-section {
    margin-bottom: 0.75rem;
}

.match-section .label {
    display: block;
    font-size: 0.7rem;
    color: var(--text-muted);
    margin-bottom: 0.25rem;
    font-weight: 800;
}

.match-row {
    background: rgba(7, 10, 8, 0.68);
    padding: 0.48rem 0.6rem;
    border-radius: 4px;
    text-align: left;
    font-weight: 700;
    line-height: 1.35;
}

.matchday-card {
    padding: 0.15rem 0 0;
    border-radius: 0;
    background:
        linear-gradient(90deg, rgba(var(--primary-color-rgb), 0.28), transparent 72%) 0 0 / 100% 1px no-repeat;
}

.matchday-card .match-section:last-child {
    margin-bottom: 0;
}

.match-row-muted {
    color: rgba(255, 255, 255, 0.72);
}

/* Sidebar Footer */
.sidebar-footer {
    padding: 1rem;
    background: rgba(8, 10, 9, 0.86);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    font-size: 0.8rem;
}

.footer-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.5rem;
    margin-bottom: 0.85rem;
}

.footer-action {
    min-width: 0;
    min-height: 2.35rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    position: relative;
    padding: 0.35rem;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 7px;
    background: rgba(255, 255, 255, 0.045);
    color: rgba(255, 255, 255, 0.74);
    text-decoration: none;
    font-weight: 700;
    transition: color 0.2s, background-color 0.2s, border-color 0.2s;
}

.footer-action:hover,
.footer-action.active {
    background: rgba(var(--primary-color-rgb), 0.16);
    border-color: rgba(var(--primary-color-rgb), 0.32);
    color: #ffffff;
}

.footer-action .app-icon {
    width: 1.15rem;
    height: 1.15rem;
}

.footer-action .nav-badge {
    position: absolute;
    top: -0.45rem;
    right: -0.35rem;
    min-width: 1.25rem;
    height: 1.25rem;
    font-size: 0.68rem;
}

.footer-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.5rem;
}

.footer-row:last-child {
    margin-bottom: 0;
}

.game-time-link {
    color: inherit;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
}

.game-time-link:hover {
    color: var(--primary-color);
}

.footer-row.real-time {
    color: var(--text-muted);
    font-family: monospace;
    justify-content: center;
    margin-top: 0.5rem;
    font-size: 0.75rem;
}

.view-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.85rem;
    min-height: 220px;
    padding: 2rem;
    text-align: center;
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 10px;
}

.view-state-title {
    margin: 0;
    font-size: 1.25rem;
}

.view-state-message {
    margin: 0;
    max-width: 560px;
    color: var(--text-muted);
}

.view-state-actions {
    display: flex;
    justify-content: center;
    gap: 0.75rem;
    margin-top: 0.5rem;
}

.view-state-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 3rem;
    height: 3rem;
    border-radius: 999px;
    background: rgba(var(--primary-color-rgb), 0.15);
    color: var(--primary-color);
    font-size: 1.35rem;
    font-weight: 700;
}

.view-state-error .view-state-icon {
    background: rgba(244, 67, 54, 0.15);
    color: #f44336;
}

.view-state-empty .view-state-icon {
    background: rgba(255, 152, 0, 0.15);
    color: var(--accent-color);
}

.view-state-spinner {
    width: 2.2rem;
    height: 2.2rem;
    border: 3px solid rgba(255, 255, 255, 0.12);
    border-top-color: var(--primary-color);
    border-radius: 50%;
    animation: view-state-spin 0.9s linear infinite;
}

@keyframes view-state-spin {
    from {
        transform: rotate(0deg);
    }

    to {
        transform: rotate(360deg);
    }
}

/* Switch Toggle */
.switch {
    position: relative;
    display: inline-block;
    width: 34px;
    height: 20px;
}

.switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #444;
    transition: .4s;
}

.slider:before {
    position: absolute;
    content: "";
    height: 14px;
    width: 14px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    transition: .4s;
}

input:checked+.slider {
    background-color: var(--primary-color);
}

input:checked+.slider:before {
    transform: translateX(14px);
}

.slider.round {
    border-radius: 20px;
}

.slider.round:before {
    border-radius: 50%;
}

/* Light Mode Overrides */
body.light-mode {
    --bg-color: #f4f4f4;
    --card-bg: #ffffff;
    --text-color: #333333;
    --border-color: #dddddd;
    --text-muted: #666666;
}

body.light-mode .app-sidebar {
    background:
        linear-gradient(rgba(249, 251, 248, 0.78), rgba(249, 251, 248, 0.78)),
        url("../../assets/sidebar-tactics.svg") right 1rem top 0.75rem / 100% auto no-repeat,
        linear-gradient(180deg, #f9fbf8 0%, #eef5ee 58%, #ffffff 100%),
        repeating-linear-gradient(90deg, rgba(33, 104, 58, 0.045) 0 1px, transparent 1px 42px);
    border-right: 1px solid #d7e4d8;
}

body.light-mode .sidebar-club-card {
    background:
        linear-gradient(135deg, rgba(var(--primary-color-rgb), 0.12), rgba(255, 255, 255, 0.78)),
        #ffffff;
    border-color: #d7e4d8;
}

body.light-mode .club-crest.has-logo {
    border-color: rgba(15, 23, 42, 0.14);
}

body.light-mode .club-card-copy strong {
    color: #1f2937;
}

body.light-mode .club-card-copy span {
    color: #66736c;
}

body.light-mode .league-team-logo {
    color: #ffffff;
    border-color: rgba(15, 23, 42, 0.14);
}

body.light-mode .league-team-logo.has-logo {
    border-color: rgba(15, 23, 42, 0.12);
}

body.light-mode .club-balance {
    background: rgba(15, 23, 42, 0.04);
    border-color: rgba(15, 23, 42, 0.12);
}

body.light-mode .sidebar-footer {
    background-color: rgba(249, 251, 248, 0.92);
    border-top: 1px solid #d7e4d8;
}

body.light-mode .footer-action {
    background: rgba(255, 255, 255, 0.74);
    border-color: #d7e4d8;
    color: #54635a;
}

body.light-mode .footer-action:hover,
body.light-mode .footer-action.active {
    background: rgba(var(--primary-color-rgb), 0.12);
    border-color: rgba(var(--primary-color-rgb), 0.26);
    color: #18482a;
}

body.light-mode .match-row,
body.light-mode .results-ticker,
body.light-mode .quick-table .widget-content {
    background-color: rgba(255, 255, 255, 0.78);
    border-color: #ddd;
}

body.light-mode .match-row {
    color: #1f2937;
}

body.light-mode .match-row-muted {
    color: #526170;
}

body.light-mode .matchday-card {
    background: linear-gradient(90deg, rgba(var(--primary-color-rgb), 0.24), transparent 72%) 0 0 / 100% 1px no-repeat;
}

body.light-mode .match-view {
    color: #23303d;
}

body.light-mode .match-header.card,
body.light-mode .match-detail-stats-card {
    background: #ffffff !important;
    border-color: #d8e0e8 !important;
    color: #23303d;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
}

body.light-mode .match-detail-score-card {
    background: transparent !important;
    border-color: transparent !important;
    box-shadow: none !important;
}

body.light-mode .match-detail-kicker,
body.light-mode .match-detail-stat-label,
body.light-mode .match-detail-events-section h4 {
    color: #526170 !important;
}

body.light-mode .match-detail-stat-row,
body.light-mode .match-detail-info-row {
    border-bottom-color: #e3e9f0 !important;
}

.match-detail-stat-row-filterable {
    cursor: pointer;
    transition: background 0.16s ease;
}

.match-detail-stat-row {
    position: relative;
    overflow: hidden;
}

.match-detail-stat-row>* {
    position: relative;
    z-index: 1;
}

.match-detail-stat-row-balanced::before {
    content: '';
    position: absolute;
    inset: 0;
    z-index: 0;
    background:
        linear-gradient(90deg,
            rgba(220, 38, 38, 0.18) 0%,
            rgba(220, 38, 38, 0.18) var(--home-share, 50%),
            rgba(37, 99, 235, 0.18) var(--home-share, 50%),
            rgba(37, 99, 235, 0.18) 100%);
    opacity: 0.72;
    pointer-events: none;
}

.match-detail-stat-row-filterable:hover,
.match-detail-stat-row-filterable:focus-visible,
.match-detail-stat-row-filterable.is-active {
    background: rgba(var(--primary-color-rgb), 0.1);
    outline: none;
}

body.light-mode .match-detail-stat-row-filterable:hover,
body.light-mode .match-detail-stat-row-filterable:focus-visible,
body.light-mode .match-detail-stat-row-filterable.is-active {
    background: #eef7ef;
}

body.light-mode .match-detail-stat-row strong,
body.light-mode .match-detail-info-row strong,
body.light-mode .match-detail-score-card strong,
body.light-mode .match-header h2 {
    color: #1f2937;
}

body.light-mode .ticker-content {
    color: var(--secondary-color);
}

body.light-mode .nav-link:hover {
    background-color: rgba(var(--primary-color-rgb), 0.08);
    color: #1f5f35;
}

body.light-mode .nav-link.active {
    background: rgba(var(--primary-color-rgb), 0.055);
    color: #18482a;
    border-left-color: transparent;
}

body.light-mode .nav-link.active::before,
body.light-mode .nav-link.active::after {
    background: rgba(24, 72, 42, 0.48);
    box-shadow:
        0 0 0 1px rgba(var(--primary-color-rgb), 0.08),
        0 0 7px rgba(var(--primary-color-rgb), 0.18);
}

body.light-mode .nav-link--match {
    background:
        linear-gradient(90deg, rgba(var(--primary-color-rgb), 0.14), rgba(255, 152, 0, 0.08)),
        rgba(255, 255, 255, 0.64);
}

body.light-mode .nav-subtle-badge {
    background: rgba(var(--primary-color-rgb), 0.08);
    border-color: rgba(var(--primary-color-rgb), 0.18);
    color: #2f6842;
}

body.light-mode .module-tabs {
    border-bottom-color: rgba(31, 47, 36, 0.12);
    scrollbar-color: rgba(31, 47, 36, 0.24) transparent;
}

body.light-mode .module-tabs::before {
    background:
        linear-gradient(90deg, rgba(31, 47, 36, 0.18), transparent 72%),
        repeating-linear-gradient(90deg, rgba(31, 47, 36, 0.12) 0 8px, transparent 8px 15px);
}

body.light-mode .module-tabs>.tab-btn {
    color: #667582;
}

body.light-mode .module-tabs>.tab-btn:hover,
body.light-mode .module-tabs>.tab-btn:focus-visible,
body.light-mode .module-tabs>.tab-btn.active {
    background: transparent;
    color: #1f2f24;
}

body.light-mode .module-tabs>.tab-btn::after {
    background:
        linear-gradient(90deg, transparent 0 4%, rgba(31, 47, 36, 0.32) 4% 40%, rgba(31, 47, 36, 0.34) 40% 72%, rgba(31, 47, 36, 0.3) 72% 100%);
}

body.light-mode .shell-content {
    background:
        radial-gradient(circle at top right, rgba(var(--primary-color-rgb), 0.14), transparent 34rem),
        radial-gradient(circle at bottom left, rgba(255, 179, 71, 0.12), transparent 30rem),
        linear-gradient(180deg, rgba(255, 255, 255, 0.72), transparent 42rem),
        var(--bg-color);
}

body.light-mode .sidebar-widget h4 {
    color: #555;
    border-bottom-color: #ddd;
}

body.light-mode .table-row {
    border-bottom-color: #eee;
}

body.light-mode .table-row.highlight {
    background-color: rgba(var(--primary-color-rgb), 0.1);
    color: #18482a;
}

body.light-mode .table-row.highlight .name,
body.light-mode .table-row.highlight .pts {
    color: #18482a;
}

body.light-mode .app-table th {
    background-color: #f0f0f0;
    color: #333;
}

body.light-mode .app-table td {
    color: #333;
}

body.light-mode .progress-track {
    background-color: #ddd;
}

body.light-mode .form-input {
    background-color: #ffffff;
    color: #333;
    border-color: #ccc;
}

body.light-mode .btn-secondary {
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.94), rgba(241, 245, 249, 0.9));
    color: #263238;
    border-color: rgba(31, 41, 55, 0.14);
}

body.light-mode .btn-secondary:hover {
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(232, 238, 245, 0.96));
    border-color: rgba(var(--primary-color-rgb), 0.32);
    color: #173a24;
}

body.light-mode .btn {
    border-color: rgba(31, 41, 55, 0.13);
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(241, 245, 249, 0.9));
    color: #263238;
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.9),
        0 1px 2px rgba(15, 23, 42, 0.08);
}

body.light-mode .btn::after {
    background: rgba(31, 47, 36, 0.18);
}

body.light-mode .btn:hover,
body.light-mode .btn:focus-visible {
    border-color: rgba(var(--primary-color-rgb), 0.32);
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.95),
        0 8px 18px rgba(15, 23, 42, 0.1);
}

body.light-mode .btn-primary {
    color: #ffffff;
    background:
        linear-gradient(180deg,
            color-mix(in srgb, var(--primary-color) 86%, white),
            color-mix(in srgb, var(--primary-color) 78%, black));
    border-color: color-mix(in srgb, var(--primary-color) 70%, white);
}

body.light-mode .btn-danger {
    background:
        linear-gradient(180deg, rgba(220, 83, 83, 0.12), rgba(220, 83, 83, 0.06)),
        #ffffff;
    color: #b83232;
    border-color: rgba(220, 83, 83, 0.32);
}

body.light-mode .modal-content {
    background-color: #ffffff;
    color: #333;
}

body.light-mode .learnable-item {
    background-color: #f9f9f9;
    border-color: #eee;
}

body.light-mode table tr:hover,
body.light-mode .app-table tbody tr:hover,
body.light-mode tr:hover {
    background-color: #eceff3;
}

body.light-mode .app-table th.sortable:hover {
    background-color: #e6ebf1;
    color: var(--primary-color);
}

/* Module Surface */
.module-wrapper,
.module-surface,
.league-page,
.transfer-view {
    position: relative;
    border-radius: 12px;
}

.module-wrapper::before,
.module-surface::before,
.league-page::before,
.transfer-view::before {
    content: none;
}

/* Module Tabs */
.module-tabs {
    position: relative;
    display: flex;
    align-items: flex-end;
    gap: 0.35rem;
    margin: 0 0 1.25rem;
    padding: 0.25rem 0 0.55rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    overflow-x: auto;
    overflow-y: hidden;
    scrollbar-width: thin;
    scrollbar-color: rgba(255, 255, 255, 0.22) transparent;
}

.module-tabs::before {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0.22rem;
    height: 1px;
    background:
        linear-gradient(90deg, rgba(255, 255, 255, 0.28), transparent 72%),
        repeating-linear-gradient(90deg, rgba(255, 255, 255, 0.18) 0 8px, transparent 8px 15px);
    opacity: 0.55;
    pointer-events: none;
}

.module-tabs::-webkit-scrollbar {
    height: 4px;
}

.module-tabs::-webkit-scrollbar-track {
    background: transparent;
}

.module-tabs::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.22);
    border-radius: 999px;
}

.module-tabs>.tab-btn {
    position: relative;
    flex: 0 0 auto;
    min-width: max-content;
    padding: 0.72rem 0.85rem 0.7rem;
    background: transparent;
    border: 0;
    border-radius: 0;
    color: var(--text-muted);
    cursor: pointer;
    font-family: "Trebuchet MS", Arial, sans-serif;
    font-size: 0.88rem;
    font-weight: 900;
    letter-spacing: 0.02em;
    text-transform: uppercase;
    white-space: nowrap;
    transition: color 0.16s ease, transform 0.16s ease;
}

.module-tabs>.tab-btn::after {
    content: "";
    position: absolute;
    left: 0.65rem;
    right: 0.55rem;
    bottom: 0.12rem;
    height: 3px;
    border-radius: 999px;
    background:
        linear-gradient(90deg, transparent 0 4%, rgba(255, 255, 255, 0.74) 4% 40%, rgba(255, 255, 255, 0.76) 40% 72%, rgba(255, 255, 255, 0.72) 72% 100%);
    box-shadow: 0 0 10px rgba(255, 255, 255, 0.08);
    opacity: 0;
    transform: scaleX(0.72) rotate(-0.7deg);
    transform-origin: left center;
    transition: opacity 0.16s ease, transform 0.16s ease;
}

.module-tabs>.tab-btn:hover,
.module-tabs>.tab-btn:focus-visible {
    background: transparent;
    color: var(--text-color);
    outline: none;
    transform: translateY(-1px);
}

.module-tabs>.tab-btn.active {
    background: transparent;
    border-bottom: 0;
    color: var(--text-color);
}

.module-tabs>.tab-btn.active::after {
    opacity: 1;
    transform: scaleX(1) rotate(-0.7deg);
}

.module-tabs.sub-tabs,
.module-tabs-spaced,
.stadium-subtabs,
.transfer-subtabs {
    gap: 0.25rem;
    margin-bottom: 1rem;
    padding-bottom: 0.45rem;
    flex-wrap: wrap;
    overflow-x: visible;
}

.module-tabs.sub-tabs>.tab-btn,
.module-tabs-spaced>.tab-btn,
.stadium-subtabs>.tab-btn,
.transfer-subtabs>.tab-btn {
    min-width: 0;
    padding: 0.55rem 0.7rem;
    font-size: 0.78rem;
    letter-spacing: 0.015em;
}

.tab-content {
    animation: fadeIn 0.3s ease-in-out;
}

/* Messages */
.messages-inbox-card {
    padding: 0;
    overflow: hidden;
}

.messages-inbox-layout {
    display: grid;
    grid-template-columns: minmax(320px, 420px) minmax(0, 1fr);
    min-height: 620px;
}

.messages-list-pane {
    min-width: 0;
    border-right: 1px solid rgba(255, 255, 255, 0.08);
}

.messages-list-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.85rem;
    padding: 1rem 1.1rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.messages-muted-copy {
    color: var(--text-muted);
    font-size: 0.88rem;
    line-height: 1.35;
}

.messages-filter-panel {
    display: grid;
    gap: 0.65rem;
    padding: 0.9rem 1rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.messages-filter-row {
    display: flex;
    flex-wrap: wrap;
    gap: 0.45rem;
}

.messages-list-scroll {
    max-height: 560px;
    overflow: auto;
}

.messages-empty-list {
    padding: 1.1rem;
    color: var(--text-muted);
}

.messages-detail-pane {
    min-width: 0;
    padding: 1.2rem;
}

.messages-empty-detail {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100%;
    color: var(--text-muted);
}

.message-list-item {
    width: 100%;
    padding: 0.95rem 1rem;
    border: 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    background: transparent;
    color: inherit;
    text-align: left;
    cursor: pointer;
}

.message-list-item.active {
    background: rgba(255, 255, 255, 0.08);
}

.message-list-item-inner {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
}

.message-list-copy,
.messages-detail-title {
    min-width: 0;
}

.message-list-subject-row {
    display: flex;
    align-items: center;
    gap: 0.45rem;
    min-width: 0;
    margin-bottom: 0.25rem;
}

.message-list-subject-row strong {
    display: block;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.message-unread-dot {
    width: 0.55rem;
    height: 0.55rem;
    flex: 0 0 auto;
    border-radius: 999px;
    background: #5fbf74;
}

.message-list-sender {
    color: var(--text-muted);
    font-size: 0.88rem;
    line-height: 1.35;
    overflow-wrap: anywhere;
}

.message-list-date {
    flex: 0 0 auto;
    color: var(--text-muted);
    font-size: 0.82rem;
    white-space: nowrap;
}

.messages-detail {
    display: grid;
    gap: 1rem;
    min-height: 100%;
}

.messages-detail-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
}

.messages-detail-title h3 {
    overflow-wrap: anywhere;
}

.messages-detail-kicker {
    color: var(--text-muted);
    font-size: 0.82rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.messages-detail-sender,
.messages-detail-date,
.messages-read-state {
    color: var(--text-muted);
    font-size: 0.86rem;
    line-height: 1.4;
}

.messages-detail-date {
    flex: 0 0 auto;
    text-align: right;
}

.messages-detail-body {
    padding: 1rem 1.05rem;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.05);
    line-height: 1.6;
    overflow-wrap: anywhere;
    white-space: pre-wrap;
}

.messages-detail-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-top: auto;
}

.messages-detail-actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 0.75rem;
}

.messages-compose-card {
    max-width: 900px;
}

.messages-compose-head {
    margin-bottom: 1rem;
}

.messages-compose-form {
    display: grid;
    gap: 0.9rem;
}

.messages-field {
    display: grid;
    gap: 0.35rem;
}

.messages-recipient-field {
    position: relative;
    display: grid;
    gap: 0.45rem;
}

.messages-compose-actions {
    display: flex;
    justify-content: flex-end;
    gap: 0.75rem;
}

body.light-mode .messages-list-pane,
body.light-mode .messages-list-header,
body.light-mode .messages-filter-panel,
body.light-mode .message-list-item {
    border-color: rgba(15, 23, 42, 0.08);
}

body.light-mode .message-list-item.active {
    background: rgba(var(--primary-color-rgb), 0.08);
}

body.light-mode .messages-detail-body {
    background: rgba(15, 23, 42, 0.035);
}

/* Staff */
.staff-view {
    display: grid;
    gap: 1rem;
}

.staff-view--compact {
    --staff-accent: var(--primary-color);
}

.staff-compact-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
    padding: 1.25rem;
    border-bottom: 2px solid var(--primary-color);
    background: #0d0f10;
    color: #f7f7f7;
}

.staff-compact-header .staff-page-copy p,
.staff-compact-header .staff-page-copy span {
    color: rgba(247, 247, 247, 0.72);
}

.staff-summary-strip,
.staff-compact-grid,
.staff-role-section {
    display: grid;
    gap: 0.85rem;
}

.staff-summary-strip {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.staff-compact-grid {
    grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr));
}

.staff-role-section {
    padding-top: 0.35rem;
}

.staff-role-section-title {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    color: var(--staff-accent, var(--primary-color));
    font-size: 0.78rem;
    font-weight: 900;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.staff-role-section-title::after {
    content: "";
    flex: 1;
    height: 1px;
    background: var(--staff-border, rgba(255, 255, 255, 0.12));
}

.staff-compact-card,
.staff-compact-panel {
    position: relative;
    display: grid;
    gap: 0.85rem;
    padding: 1rem;
    border: 1px solid var(--staff-border, rgba(255, 255, 255, 0.1));
    border-radius: 8px;
    background: linear-gradient(160deg, var(--staff-bg-start, rgba(255, 255, 255, 0.06)), var(--staff-bg-end, rgba(255, 255, 255, 0.02)));
    box-shadow: 0 14px 30px rgba(10, 18, 28, 0.08);
}

.staff-compact-card {
    border-left: 3px solid var(--staff-accent, var(--primary-color));
}

.staff-compact-panel {
    border-left: 3px solid var(--staff-accent, var(--primary-color));
}

.staff-compact-card.is-empty {
    opacity: 0.78;
}

.staff-compact-card-head,
.staff-compact-line,
.staff-compact-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
}

.staff-compact-card-head {
    position: relative;
}

.staff-compact-card-head h3 {
    margin: 0.18rem 0 0;
    font-family: "Trebuchet MS", Arial, sans-serif;
    font-size: 1.05rem;
    letter-spacing: 0;
}

.staff-info-button {
    display: inline-grid;
    place-items: center;
    width: 2rem;
    height: 2rem;
    border: 1px solid var(--staff-border, rgba(255, 255, 255, 0.16));
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.08);
    color: var(--staff-accent, var(--primary-color));
    cursor: pointer;
    font-weight: 900;
}

.staff-info-popover {
    position: absolute;
    z-index: 20;
    top: 2.4rem;
    right: 0;
    display: grid;
    gap: 0.25rem;
    width: min(17rem, calc(100vw - 2rem));
    padding: 0.75rem 0.85rem;
    border: 1px solid var(--staff-border, rgba(255, 255, 255, 0.16));
    border-radius: 8px;
    background: #111618;
    color: rgba(255, 255, 255, 0.78);
    box-shadow: 0 18px 38px rgba(0, 0, 0, 0.28);
    font-size: 0.9rem;
    line-height: 1.35;
}

.staff-info-popover[hidden] {
    display: none;
}

.staff-info-popover strong {
    color: #fff;
}

.staff-compact-line {
    color: var(--text-muted);
    font-size: 0.92rem;
}

.staff-compact-line strong {
    color: var(--text-color);
}

.staff-info-copy {
    display: grid;
    gap: 0.25rem;
    padding: 0.75rem 0.8rem;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.06);
    color: var(--text-muted);
    font-size: 0.9rem;
    line-height: 1.35;
}

.staff-info-copy[hidden] {
    display: none;
}

.staff-info-copy strong {
    color: var(--text-color);
}

.staff-compact-actions {
    align-items: stretch;
    flex-wrap: wrap;
}

.staff-compact-actions .btn {
    flex: 1 1 9rem;
}

.staff-card-footnote {
    color: var(--text-muted);
    font-size: 0.82rem;
    line-height: 1.35;
}

.staff-page-hero,
.staff-module-hero,
.staff-panel,
.staff-specialist-card,
.staff-overview-card {
    border: 1px solid var(--staff-border, rgba(255, 255, 255, 0.1));
    background: linear-gradient(160deg, var(--staff-bg-start, rgba(255, 255, 255, 0.06)), var(--staff-bg-end, rgba(255, 255, 255, 0.02)));
    box-shadow: 0 16px 34px rgba(10, 18, 28, 0.08);
}

.staff-page-hero {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
    padding: 1.45rem;
    border-radius: 8px;
}

.staff-page-copy {
    max-width: 58rem;
}

.staff-page-copy span,
.staff-card-kicker,
.staff-active-area span,
.staff-note span,
.staff-metric span,
.staff-cost-chip span,
.staff-progress-copy span,
.staff-scout-header span,
.staff-report-row span,
.staff-active-assignment span {
    color: var(--text-muted);
    font-size: 0.78rem;
    font-weight: 800;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.staff-page-copy h2,
.staff-module-head h3,
.staff-panel-header h3,
.staff-specialist-header h3 {
    margin: 0.35rem 0 0;
    font-family: "Trebuchet MS", Arial, sans-serif;
    font-size: clamp(1.25rem, 2vw, 1.75rem);
    letter-spacing: 0;
}

.staff-page-copy p,
.staff-module-head p,
.staff-panel-header p,
.staff-specialist-header p,
.staff-overview-card p {
    margin: 0.55rem 0 0;
    color: var(--text-muted);
    line-height: 1.45;
}

.staff-active-area,
.staff-cost-chip {
    display: grid;
    gap: 0.28rem;
    min-width: 11rem;
    padding: 0.8rem 0.9rem;
    border: 1px solid var(--staff-border, rgba(255, 255, 255, 0.1));
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.06);
}

.staff-active-area strong,
.staff-cost-chip strong {
    color: var(--staff-accent, var(--primary-color));
}

.staff-tabs {
    margin-top: 0.25rem;
}

.staff-tab-content,
.staff-section,
.staff-overview,
.staff-card-list,
.staff-scout-list,
.staff-report-list {
    display: grid;
    gap: 1rem;
}

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

.staff-overview-card {
    display: grid;
    gap: 0.85rem;
    padding: 1.15rem;
    border-radius: 8px;
    color: var(--text-color);
    text-align: left;
    cursor: pointer;
    transition: transform 0.16s ease, border-color 0.16s ease, box-shadow 0.16s ease;
}

.staff-overview-card:hover,
.staff-overview-card:focus-visible {
    border-color: var(--staff-accent, var(--primary-color));
    box-shadow: 0 18px 38px rgba(10, 18, 28, 0.14);
    outline: none;
    transform: translateY(-2px);
}

.staff-overview-card>strong {
    font-family: "Trebuchet MS", Arial, sans-serif;
    font-size: 1.15rem;
    letter-spacing: 0;
}

.staff-card-action {
    color: var(--staff-accent, var(--primary-color));
    font-size: 0.88rem;
    font-weight: 900;
}

.staff-module-hero,
.staff-panel,
.staff-specialist-card {
    display: grid;
    gap: 1rem;
    padding: 1.25rem;
    border-radius: 8px;
}

.staff-module-head,
.staff-panel-header,
.staff-specialist-header,
.staff-scout-header,
.staff-report-row {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
}

.staff-module-head>div,
.staff-panel-header>div:first-child,
.staff-specialist-header>div:first-child {
    max-width: 52rem;
}

.staff-metric-grid,
.staff-card-metrics {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(10rem, 1fr));
    gap: 0.75rem;
}

.staff-metric {
    display: grid;
    gap: 0.25rem;
    min-width: 0;
    padding: 0.78rem 0.85rem;
    border: 1px solid var(--staff-border, rgba(255, 255, 255, 0.1));
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.06);
}

.staff-metric strong {
    color: var(--staff-accent, var(--primary-color));
    overflow-wrap: anywhere;
}

.staff-note {
    display: grid;
    gap: 0.28rem;
    padding: 0.85rem 0.9rem;
    border: 1px solid var(--staff-border, rgba(255, 255, 255, 0.1));
    border-radius: 8px;
    background: linear-gradient(145deg, var(--staff-bg-start, rgba(255, 255, 255, 0.06)), rgba(255, 255, 255, 0.03));
}

.staff-progress-row {
    display: grid;
    gap: 0.45rem;
}

.staff-progress-copy {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
}

.staff-progress-bar {
    height: 8px;
    overflow: hidden;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.1);
}

.staff-progress-bar>div {
    height: 100%;
    border-radius: inherit;
    background: var(--staff-accent, var(--primary-color));
}

.staff-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.staff-blocked,
.staff-ready {
    font-size: 0.88rem;
    font-weight: 800;
}

.staff-blocked {
    color: var(--text-muted);
}

.staff-ready {
    color: var(--staff-accent, var(--primary-color));
}

.staff-scout-card {
    display: grid;
    gap: 0.8rem;
    padding: 0.95rem;
    border: 1px solid var(--staff-border, rgba(255, 255, 255, 0.1));
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.055);
}

.staff-scout-compact-list,
.staff-scout-history-list {
    display: grid;
    gap: 0.75rem;
}

.staff-scout-compact-card {
    display: grid;
    gap: 0.75rem;
    padding: 0.85rem;
    border: 1px solid var(--staff-border, rgba(255, 255, 255, 0.1));
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.055);
}

.staff-scout-compact-head,
.staff-scout-history-row {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 0.75rem;
}

.staff-scout-compact-head>div,
.staff-scout-history-row>div {
    display: grid;
    gap: 0.22rem;
}

.staff-scout-compact-head span,
.staff-scout-history-row span,
.staff-scout-current span {
    color: var(--text-muted);
    font-size: 0.82rem;
}

.staff-scout-current {
    display: grid;
    gap: 0.3rem;
    padding: 0.72rem 0.8rem;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.06);
}

.staff-scout-current em {
    color: var(--text-muted);
    font-size: 0.86rem;
    font-style: normal;
}

.staff-scout-history {
    border-top: 1px solid var(--staff-border, rgba(255, 255, 255, 0.1));
    padding-top: 0.7rem;
}

.staff-scout-history summary {
    color: var(--staff-accent, var(--primary-color));
    cursor: pointer;
    font-weight: 900;
}

.staff-scout-history-list {
    margin-top: 0.7rem;
}

.staff-scout-history-row {
    align-items: center;
    padding: 0.68rem 0.75rem;
    border-radius: 8px;
    background: var(--bg-primary);
}

.staff-scout-header>div {
    display: grid;
    gap: 0.25rem;
}

.staff-scout-header>div:last-child {
    text-align: right;
}

.staff-scout-available,
.staff-empty {
    color: var(--text-muted);
    font-size: 0.92rem;
}

.staff-active-assignment {
    display: grid;
    gap: 0.3rem;
    padding: 0.75rem 0.85rem;
    border-radius: 8px;
    background: var(--bg-primary);
}

.staff-active-assignment em {
    color: var(--text-muted);
    font-size: 0.86rem;
    font-style: normal;
}

.staff-scout-reports {
    border-top: 1px solid var(--staff-border, rgba(255, 255, 255, 0.1));
    padding-top: 0.75rem;
}

.staff-scout-reports summary {
    color: var(--staff-accent, var(--primary-color));
    cursor: pointer;
    font-weight: 900;
}

.staff-report-list {
    margin-top: 0.7rem;
}

.staff-report-row {
    align-items: center;
    padding: 0.75rem;
    border-radius: 8px;
    background: var(--bg-primary);
}

.staff-report-row>div {
    display: grid;
    gap: 0.25rem;
}

body.light-mode .staff-page-hero,
body.light-mode .staff-module-hero,
body.light-mode .staff-panel,
body.light-mode .staff-specialist-card,
body.light-mode .staff-overview-card {
    box-shadow: 0 14px 28px rgba(15, 23, 42, 0.07);
}

body.light-mode .staff-active-area,
body.light-mode .staff-cost-chip,
body.light-mode .staff-metric,
body.light-mode .staff-scout-card,
body.light-mode .staff-scout-compact-card,
body.light-mode .staff-scout-current,
body.light-mode .staff-info-copy {
    background: rgba(255, 255, 255, 0.72);
}

body.light-mode .staff-compact-header,
body.light-mode .staff-info-popover {
    color: var(--text-color);
}

body.light-mode .staff-compact-header {
    border: 1px solid rgba(15, 23, 42, 0.08);
    border-bottom: 2px solid var(--primary-color);
    background: rgba(255, 255, 255, 0.86);
    color: var(--text-color);
    box-shadow: 0 14px 28px rgba(15, 23, 42, 0.07);
}

body.light-mode .staff-compact-header .staff-page-copy p,
body.light-mode .staff-compact-header .staff-page-copy span {
    color: var(--text-muted);
}

body.light-mode .staff-info-popover {
    border-color: rgba(15, 23, 42, 0.14);
    background: #ffffff;
    box-shadow: 0 18px 38px rgba(15, 23, 42, 0.18);
}

body.light-mode .staff-info-popover strong {
    color: var(--text-color);
}

@media (max-width: 900px) {

    .staff-page-hero,
    .staff-module-head,
    .staff-panel-header,
    .staff-specialist-header,
    .staff-scout-header,
    .staff-report-row {
        flex-direction: column;
    }

    .staff-scout-compact-head,
    .staff-scout-history-row {
        flex-direction: column;
    }

    .staff-overview-grid {
        grid-template-columns: 1fr;
    }

    .staff-summary-strip {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .staff-active-area,
    .staff-cost-chip {
        width: 100%;
        min-width: 0;
    }

    .staff-scout-header>div:last-child {
        text-align: left;
    }
}

@media (max-width: 640px) {

    .staff-page-hero,
    .staff-module-hero,
    .staff-panel,
    .staff-specialist-card,
    .staff-overview-card {
        padding: 1rem;
    }

    .staff-metric-grid,
    .staff-card-metrics,
    .staff-summary-strip {
        grid-template-columns: 1fr;
    }

    .staff-actions,
    .staff-actions .btn,
    .staff-report-row .btn,
    .staff-active-assignment .btn {
        width: 100%;
    }

    .staff-progress-copy {
        align-items: flex-start;
        flex-direction: column;
    }
}

.module-page-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1.1rem;
}

.module-page-header--compact {
    margin-bottom: 0.9rem;
}

.module-page-kicker {
    display: inline-block;
    margin-bottom: 0.28rem;
    color: var(--text-muted);
    font-size: 0.78rem;
    font-weight: 900;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.module-page-header h2 {
    margin: 0;
    color: var(--text-color);
    font-size: clamp(1.35rem, 2vw, 1.85rem);
    line-height: 1.12;
}

.module-page-header p {
    max-width: 44rem;
    margin: 0.45rem 0 0;
    color: var(--text-muted);
    line-height: 1.5;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* UI Components */
.btn {
    position: relative;
    justify-content: center;
    min-height: 2.35rem;
    padding: 0.56rem 0.95rem;
    border-radius: 6px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    color: var(--text-color);
    font: inherit;
    font-weight: 800;
    line-height: 1.15;
    text-decoration: none;
    letter-spacing: 0;
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.075), rgba(255, 255, 255, 0.025)),
        rgba(255, 255, 255, 0.045);
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.08),
        0 1px 0 rgba(0, 0, 0, 0.18);
    transition:
        transform 0.16s ease,
        border-color 0.16s ease,
        background 0.16s ease,
        box-shadow 0.16s ease,
        color 0.16s ease;
}

.btn::after {
    content: "";
    position: absolute;
    left: 0.55rem;
    right: 0.55rem;
    bottom: 0.25rem;
    height: 1px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.16);
    opacity: 0.45;
    pointer-events: none;
}

.btn:hover,
.btn:focus-visible {
    transform: translateY(-1px);
    border-color: rgba(var(--primary-color-rgb), 0.34);
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.1),
        0 8px 18px rgba(0, 0, 0, 0.18);
}

.btn:active {
    transform: translateY(0);
    box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.22);
}

.btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.btn-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
}

.btn-label {
    min-width: 0;
}

.btn-primary {
    background-color: var(--primary-color);
    background:
        linear-gradient(180deg,
            color-mix(in srgb, var(--primary-color) 88%, white),
            color-mix(in srgb, var(--primary-color) 76%, black));
    color: #ffffff;
    border-color: color-mix(in srgb, var(--primary-color) 78%, white);
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.18),
        0 8px 18px rgba(0, 0, 0, 0.2);
}

.btn-secondary {
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.075), rgba(255, 255, 255, 0.025)),
        rgba(255, 255, 255, 0.045);
    color: var(--text-color);
}

.btn-danger {
    background:
        linear-gradient(180deg, rgba(220, 83, 83, 0.18), rgba(220, 83, 83, 0.08)),
        rgba(255, 255, 255, 0.025);
    color: #ff9d9d;
    border-color: rgba(220, 83, 83, 0.42);
}

.btn-success {
    background:
        linear-gradient(180deg, rgba(76, 175, 80, 0.9), rgba(39, 126, 43, 0.92));
    color: #ffffff;
    border-color: rgba(139, 220, 143, 0.36);
}

.btn-primary:hover,
.btn-primary:focus-visible,
.btn-success:hover,
.btn-success:focus-visible {
    border-color: rgba(255, 255, 255, 0.34);
    filter: saturate(1.08);
}

.btn-danger:hover,
.btn-danger:focus-visible {
    background:
        linear-gradient(180deg, rgba(220, 83, 83, 0.28), rgba(220, 83, 83, 0.14)),
        rgba(255, 255, 255, 0.025);
    border-color: rgba(220, 83, 83, 0.62);
    color: #ffd1d1;
}

.btn-logout {
    background-color: transparent;
    border: 1px solid #f44336;
    color: #f44336;
}

.btn-logout:hover {
    background-color: #f44336;
    color: white;
}

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

.table-container {
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.table-container .app-table {
    min-width: 100%;
}

.app-table th {
    text-align: left;
    padding: 0.75rem;
    background-color: #222;
    border-bottom: 2px solid var(--border-color);
}

.app-table td {
    padding: 0.75rem;
    border-bottom: 1px solid var(--border-color);
}

#squad-table-container .app-table {
    min-width: 720px;
}

#sporttest-table-container .app-table {
    min-width: 620px;
}

.sporttest-comparison-layout,
#sporttest-table-container,
#sporttest-table-container .table-container {
    min-width: 0;
    max-width: 100%;
}

.sporttest-comparison-layout {
    display: grid;
    gap: 1rem;
}

.sporttest-control-panel {
    display: grid;
    gap: 0.85rem;
    padding: 1rem;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.035);
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.sporttest-control-panel p {
    margin: 0.28rem 0 0;
    color: var(--text-muted);
    line-height: 1.45;
}

.sporttest-group-row {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.sporttest-group-toggle {
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.04);
    color: var(--text-muted);
    cursor: pointer;
    font: inherit;
    font-size: 0.82rem;
    font-weight: 900;
    padding: 0.45rem 0.7rem;
}

.sporttest-group-toggle.active {
    border-color: rgba(255, 255, 255, 0.24);
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-color);
}

.sporttest-check-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(9rem, 1fr));
    gap: 0.55rem;
}

.sporttest-check {
    display: flex;
    align-items: center;
    gap: 0.45rem;
    min-width: 0;
    color: var(--text-color);
    font-size: 0.86rem;
    font-weight: 800;
}

.sporttest-check input {
    accent-color: var(--primary-color);
}

.sporttest-mobile-card-container {
    display: none;
}

.sporttest-mobile-card-list {
    display: grid;
    gap: 0.85rem;
}

.sporttest-mobile-card {
    display: grid;
    gap: 0.85rem;
    padding: 0.95rem;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.sporttest-mobile-card-name {
    padding: 0;
    border: 0;
    background: transparent;
    color: var(--text-color);
    cursor: pointer;
    font: inherit;
    font-weight: 900;
    text-align: left;
}

.sporttest-mobile-card-subline {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.45rem;
    margin-top: 0.35rem;
    color: var(--text-muted);
    font-size: 0.82rem;
}

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

.sporttest-mobile-test-cell {
    display: grid;
    gap: 0.18rem;
    min-width: 0;
    padding: 0.65rem;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.035);
    border: 1px solid rgba(255, 255, 255, 0.07);
}

.sporttest-mobile-test-cell span {
    color: var(--text-muted);
    font-size: 0.7rem;
    font-weight: 900;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

.sporttest-mobile-test-cell strong {
    color: var(--text-color);
    font-size: 1.05rem;
}

.sporttest-mobile-test-cell small {
    color: var(--text-muted);
    line-height: 1.3;
}

#sporttest-table-container {
    position: relative;
}

#sporttest-table-container .table-container {
    overflow-x: auto;
    overflow-y: visible;
    border: 1px solid var(--border-color);
    border-radius: 8px;
}

#sporttest-table-container .table-container::-webkit-scrollbar {
    height: 10px;
}

#sporttest-table-container .table-container::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.22);
    border-radius: 999px;
}

#sporttest-table-container .app-table th,
#sporttest-table-container .app-table td {
    white-space: nowrap;
}

#sporttest-table-container .app-table th:first-child,
#sporttest-table-container .app-table td:first-child {
    width: 190px;
    min-width: 190px;
    max-width: 190px;
}

#sporttest-table-container .app-table th:nth-child(2),
#sporttest-table-container .app-table td:nth-child(2) {
    position: sticky;
    left: 190px;
    width: 72px;
    min-width: 72px;
    max-width: 72px;
    z-index: 2;
}

#sporttest-table-container .app-table th:nth-child(2) {
    z-index: 3;
}

#sporttest-table-container .app-table td:nth-child(2) {
    background-color: var(--card-bg);
}

#sporttest-table-container .app-table td:first-child .squad-player-link {
    display: block;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
}

#squad-table-container .app-table th:first-child,
#squad-table-container .app-table td:first-child,
#sporttest-table-container .app-table th:first-child,
#sporttest-table-container .app-table td:first-child {
    position: sticky;
    left: 0;
    z-index: 2;
}

#squad-table-container .app-table th:first-child,
#sporttest-table-container .app-table th:first-child {
    z-index: 3;
}

#squad-table-container .app-table td:first-child,
#sporttest-table-container .app-table td:first-child {
    background-color: var(--card-bg);
}

body.light-mode #squad-table-container .app-table td:first-child,
body.light-mode #sporttest-table-container .app-table td:first-child,
body.light-mode #sporttest-table-container .app-table td:nth-child(2) {
    background-color: #fff;
}

.badge {
    padding: 0.2rem 0.5rem;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: bold;
}

.badge-info {
    background-color: var(--secondary-color);
    color: white;
}

.badge-success {
    background-color: var(--primary-color);
    color: white;
}

.badge-warning {
    background-color: var(--accent-color);
    color: white;
}

.badge-danger {
    background-color: #f44336;
    color: white;
}

.progress-container {
    margin: 0.5rem 0;
}

.progress-track {
    height: 8px;
    background-color: #333;
    border-radius: 4px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background-color: var(--primary-color);
    transition: width 0.3s ease;
}

.app-table th.sortable {
    cursor: pointer;
    user-select: none;
    position: relative;
    padding-right: 20px;
}

.app-table th.sortable:hover {
    background-color: #444;
    color: var(--primary-color);
}

.app-table th.sortable::after {
    content: '↕';
    position: absolute;
    right: 8px;
    opacity: 0.3;
    font-size: 0.8rem;
}

.app-table th.sortable:hover::after {
    opacity: 1;
}

/* Modal Styles */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.modal-container {
    background-color: var(--card-bg);
    border-radius: 8px;
    width: 90%;
    max-width: 600px;
    max-height: 90vh;
    border: 1px solid var(--border-color);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.5);
    display: flex;
    flex-direction: column;
    box-sizing: border-box;
    overflow: hidden;
}

.modal-header {
    padding: 1rem 1.5rem;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h3 {
    margin: 0;
    color: white;
}

#modal-close {
    background: none;
    border: none;
    color: var(--text-color);
    font-size: 1.5rem;
    cursor: pointer;
}

/* Toast Styles */
#toast-container {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    z-index: 2000;
}

.toast {
    background-color: #333;
    color: white;
    padding: 1rem 1.5rem;
    border-radius: 4px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    min-width: 250px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    animation: toast-in 0.3s ease-out;
    border-left: 4px solid var(--secondary-color);
}

.toast-danger {
    border-left-color: #f44336;
}

.toast-success {
    border-left-color: #4caf50;
}

.toast-warning {
    border-left-color: var(--accent-color);
}

.toast-close {
    background: none;
    border: none;
    color: white;
    font-size: 1.2rem;
    cursor: pointer;
    margin-left: 1rem;
    opacity: 0.7;
}

.toast-close:hover {
    opacity: 1;
}

@keyframes toast-in {
    from {
        transform: translateX(100%);
        opacity: 0;
    }

    to {
        transform: translateX(0);
        opacity: 1;
    }
}

.toast-hiding {
    transform: translateX(100%);
    opacity: 0;
    transition: all 0.3s ease-in;
}

/* Squad View Specifics */
.team-module,
.squad-view {
    display: grid;
    gap: 1rem;
}

.team-tab-content {
    min-width: 0;
}

.teams-hero {
    --teams-hero-accent: #9ed64f;
    --teams-hero-accent-soft: rgba(158, 214, 79, 0.18);
    position: relative;
    overflow: hidden;
    min-width: 0;
    border: 1px solid rgba(160, 210, 80, 0.18);
    border-radius: 18px;
    background:
        radial-gradient(circle at 76% 34%, rgba(139, 190, 72, 0.16), transparent 34%),
        radial-gradient(circle at 16% 0%, rgba(255, 255, 255, 0.07), transparent 28%),
        linear-gradient(135deg, rgba(255, 255, 255, 0.055), rgba(255, 255, 255, 0.018)),
        color-mix(in srgb, var(--card-bg) 86%, #071008);
    box-shadow: 0 22px 60px rgba(0, 0, 0, 0.35);
    padding: clamp(1.35rem, 3vw, 2.15rem) clamp(1.15rem, 3vw, 2.25rem) 0;
}

.teams-hero::before {
    content: "";
    position: absolute;
    inset: 0;
    background-image: url("../../assets/Bg_Mannschaft.psd.png");
    background-repeat: no-repeat;
    background-position: center right 12%;
    background-size: auto 92%;
    opacity: 1;
    mask-image: linear-gradient(90deg, transparent 0%, black 36%, black 76%, transparent 100%);
    -webkit-mask-image: linear-gradient(90deg, transparent 0%, black 36%, black 76%, transparent 100%);
    pointer-events: none;
}

.teams-hero::after {
    content: "";
    position: absolute;
    inset: 0;
    background:
        linear-gradient(90deg, rgba(7, 12, 10, 0.82), rgba(7, 12, 10, 0.4) 48%, rgba(7, 12, 10, 0.74) 100%),
        linear-gradient(180deg, transparent 0%, rgba(0, 0, 0, 0.18) 100%);
    pointer-events: none;
}

.teams-hero__content {
    position: relative;
    z-index: 1;
    display: grid;
    grid-template-columns: minmax(18rem, 1fr) minmax(22rem, 30rem);
    gap: clamp(1.35rem, 4vw, 2.4rem);
    align-items: start;
}

.teams-hero__copy {
    min-width: 0;
}

.teams-hero__eyebrow,
.teams-hero__control-label {
    color: var(--teams-hero-accent);
    font-size: 0.76rem;
    font-weight: 900;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.teams-hero__title {
    margin: 0.85rem 0 0.7rem;
    color: rgba(255, 255, 255, 0.94);
    font-size: clamp(2.35rem, 5vw, 4.4rem);
    line-height: 0.96;
    letter-spacing: 0;
}

.teams-hero__description {
    max-width: 35rem;
    margin: 0;
    color: rgba(255, 255, 255, 0.68);
    font-size: clamp(1rem, 1.4vw, 1.12rem);
    line-height: 1.55;
}

.team-context-panel {
    display: grid;
    gap: 0.55rem;
    min-width: min(100%, 24rem);
}

.teams-hero__controls {
    justify-self: end;
    width: min(100%, 30rem);
    min-width: 0;
    padding: 1rem;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 14px;
    background: rgba(5, 10, 8, 0.46);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05), 0 18px 34px rgba(0, 0, 0, 0.2);
    backdrop-filter: blur(6px);
}

.team-context-controls {
    display: flex;
    align-items: flex-end;
    gap: 0.75rem;
    min-width: 0;
}

.team-context-select {
    min-width: 0;
    flex: 1 1 14rem;
    border-color: rgba(158, 214, 79, 0.2);
    background-color: rgba(0, 0, 0, 0.24);
}

.team-create-btn {
    flex: 0 0 auto;
    white-space: nowrap;
}

.teams-hero__create-btn {
    border-color: rgba(158, 214, 79, 0.28);
    background: rgba(158, 214, 79, 0.12);
    color: rgba(241, 255, 223, 0.96);
}

.teams-hero-tabs {
    position: relative;
    z-index: 1;
    display: flex;
    gap: clamp(1rem, 3vw, 2.25rem);
    margin: clamp(2rem, 5vw, 3.8rem) 0 0;
    padding: 1.15rem 0 0.95rem;
    border-top: 1px solid rgba(255, 255, 255, 0.075);
    overflow-x: auto;
    overflow-y: hidden;
    scrollbar-width: thin;
    -webkit-overflow-scrolling: touch;
}

.teams-hero-tabs .tab-btn {
    position: relative;
    flex: 0 0 auto;
    min-height: 2rem;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
    color: rgba(255, 255, 255, 0.56);
    font-size: 0.78rem;
    font-weight: 900;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    box-shadow: none;
}

.teams-hero-tabs .tab-btn::after {
    content: none;
}

.teams-hero-tabs .tab-btn:hover,
.teams-hero-tabs .tab-btn:focus-visible {
    color: rgba(255, 255, 255, 0.82);
    background: transparent;
}

.teams-hero-tabs .tab-btn.active {
    color: #c9f36b;
    background: transparent;
    box-shadow: none;
}

.teams-hero-tabs .tab-btn.active::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: -0.95rem;
    height: 3px;
    border-radius: 999px;
    background: var(--teams-hero-accent);
    box-shadow: 0 0 14px rgba(158, 214, 79, 0.55);
}

body.light-mode .teams-hero {
    border-color: rgba(126, 178, 66, 0.24);
    background:
        radial-gradient(circle at 76% 34%, rgba(139, 190, 72, 0.16), transparent 34%),
        radial-gradient(circle at 16% 0%, rgba(255, 255, 255, 0.07), transparent 28%),
        linear-gradient(135deg, rgba(255, 255, 255, 0.055), rgba(255, 255, 255, 0.018)),
        #101711;
}

body.light-mode .teams-hero-tabs>.tab-btn {
    color: rgba(255, 255, 255, 0.56);
}

body.light-mode .teams-hero-tabs>.tab-btn:hover,
body.light-mode .teams-hero-tabs>.tab-btn:focus-visible {
    color: rgba(255, 255, 255, 0.82);
}

body.light-mode .teams-hero-tabs>.tab-btn.active {
    color: #c9f36b;
}

body.light-mode .teams-hero-tabs>.tab-btn::after {
    content: none;
    background: var(--teams-hero-accent);
}

body.light-mode .teams-hero-tabs>.tab-btn.active::after {
    content: "";
}

.team-overview {
    display: grid;
    gap: 1rem;
}

.team-empty-team-state .empty-state {
    min-height: 260px;
    border: 1px solid rgba(255, 255, 255, 0.09);
    border-radius: 8px;
    background:
        linear-gradient(135deg, rgba(255, 255, 255, 0.055), rgba(255, 255, 255, 0.018)),
        rgba(255, 255, 255, 0.025);
}

body.light-mode .team-empty-team-state .empty-state {
    border-color: rgba(31, 41, 55, 0.08);
    background:
        linear-gradient(135deg, rgba(255, 255, 255, 0.88), rgba(247, 250, 252, 0.74)),
        #ffffff;
}

.team-assigned-squad {
    display: grid;
    gap: 1rem;
}

.team-coach-view {
    display: grid;
    gap: 1rem;
}

.team-head-coach-card {
    display: grid;
    gap: 1rem;
    padding: 1rem;
    border: 1px solid rgba(255, 255, 255, 0.09);
    border-left: 3px solid rgba(var(--primary-color-rgb), 0.78);
    border-radius: 8px;
    background:
        linear-gradient(135deg, rgba(var(--primary-color-rgb), 0.11), rgba(255, 255, 255, 0.025)),
        rgba(255, 255, 255, 0.035);
}

.team-head-coach-card h2 {
    margin: 0.25rem 0 0;
}

.team-head-coach-card p {
    margin: 0.35rem 0 0;
    color: var(--text-muted);
}

.team-head-coach-meta {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 0.55rem;
}

.team-head-coach-detail-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.75rem;
}

.team-head-coach-detail {
    display: grid;
    gap: 0.3rem;
    padding: 0.8rem 0.9rem;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.035);
}

.team-head-coach-detail span {
    color: var(--text-muted);
    font-size: 0.82rem;
    font-weight: 800;
    text-transform: uppercase;
}

.team-head-coach-detail strong {
    color: var(--text-color);
    line-height: 1.35;
}

.team-head-coach-detail small {
    color: var(--text-muted);
    line-height: 1.45;
}

.team-head-coach-meta span {
    padding: 0.6rem 0.7rem;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.035);
    color: var(--text-muted);
    font-weight: 700;
}

.team-coach-rule-note {
    display: grid;
    gap: 0.25rem;
    padding: 0.8rem 0.9rem;
    border: 1px solid rgba(240, 171, 0, 0.28);
    border-radius: 8px;
    background: rgba(240, 171, 0, 0.09);
}

.team-coach-rule-note strong {
    color: #ffd36a;
}

.team-coach-rule-note span {
    color: var(--text-muted);
    line-height: 1.45;
}

.team-head-coach-actions {
    display: flex;
    justify-content: flex-end;
    gap: 0.65rem;
    flex-wrap: wrap;
}

.team-coach-empty-state {
    display: grid;
    gap: 1rem;
}

.team-coach-market-modal {
    max-width: 760px;
}

.team-coach-market-list {
    display: grid;
    gap: 0.7rem;
    margin: 1rem 0;
    max-height: min(46vh, 420px);
    overflow: auto;
    padding-right: 0.25rem;
}

.team-coach-market-card {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    align-items: center;
    padding: 0.85rem;
    border: 1px solid rgba(255, 255, 255, 0.09);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.035);
}

.team-coach-market-card div {
    display: grid;
    gap: 0.25rem;
    min-width: 0;
}

.team-coach-market-card strong {
    color: var(--text-color);
}

.team-coach-market-card span,
.team-coach-market-card small {
    color: var(--text-muted);
    line-height: 1.4;
}

.coach-profile-hidden {
    grid-template-columns: 1fr;
}

.grid.layout-grid-two-equal.coach-profile-hidden {
    grid-template-columns: minmax(0, 1fr);
}

.coach-profile-hidden .coach-profile-card {
    display: none;
}

.team-assigned-player-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
    gap: 0.8rem;
}

.team-assigned-player-card {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 0.75rem;
    padding: 0.9rem;
    border: 1px solid rgba(255, 255, 255, 0.09);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.035);
}

.team-assigned-player-card div {
    display: grid;
    gap: 0.25rem;
    min-width: 0;
}

.team-assigned-player-card strong {
    color: var(--text-color);
    overflow-wrap: anywhere;
}

.team-assigned-player-card span,
.team-assigned-player-card small {
    color: var(--text-muted);
}

.team-assign-modal {
    max-width: 700px;
}

.team-assign-player-list {
    display: grid;
    gap: 0.55rem;
    max-height: min(46vh, 420px);
    overflow: auto;
    margin: 1rem 0;
    padding-right: 0.25rem;
}

.team-assign-warning {
    display: grid;
    gap: 0.25rem;
    margin: 0.95rem 0 0;
    padding: 0.8rem 0.9rem;
    border-radius: 8px;
    border: 1px solid rgba(240, 171, 0, 0.34);
    background: rgba(240, 171, 0, 0.1);
    color: var(--text-color);
}

.team-assign-warning[hidden] {
    display: none;
}

.team-assign-warning strong {
    color: #ffd36a;
}

.team-assign-warning span,
.team-assign-warning small {
    color: var(--text-muted);
}

.team-assign-warning.tone-danger {
    border-color: rgba(220, 83, 83, 0.42);
    background: rgba(220, 83, 83, 0.12);
}

.team-assign-warning.tone-danger strong {
    color: #ff9d9d;
}

.team-assign-warning.tone-info {
    border-color: rgba(72, 150, 220, 0.34);
    background: rgba(72, 150, 220, 0.1);
}

.team-assign-warning.tone-info strong {
    color: #9fcfff;
}

.team-assign-player-row {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.035);
    cursor: pointer;
}

.team-assign-player-row>span:first-of-type {
    flex: 1 1 auto;
}

.team-assign-role {
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 6.2rem;
    padding: 0.18rem 0.48rem;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    font-size: 0.72rem;
    font-weight: 900;
    text-transform: uppercase;
}

.team-assign-role.tone-success {
    color: #9fe3a2;
    background: rgba(76, 175, 80, 0.13);
    border-color: rgba(76, 175, 80, 0.3);
}

.team-assign-role.tone-warning {
    color: #ffd36a;
    background: rgba(240, 171, 0, 0.13);
    border-color: rgba(240, 171, 0, 0.3);
}

.team-assign-role.tone-muted {
    color: var(--text-muted);
    background: rgba(255, 255, 255, 0.035);
}

.team-assign-player-row input {
    flex: 0 0 auto;
    width: 1rem;
    height: 1rem;
    accent-color: var(--primary-color);
}

.team-assign-player-row span {
    display: grid;
    gap: 0.18rem;
    min-width: 0;
}

.team-assign-player-row strong {
    color: var(--text-color);
}

.team-assign-player-row small {
    color: var(--text-muted);
}

body.light-mode .team-assigned-player-card,
body.light-mode .team-assign-player-row {
    border-color: rgba(31, 41, 55, 0.08);
    background: rgba(255, 255, 255, 0.78);
}

body.light-mode .team-head-coach-card {
    border-color: rgba(31, 41, 55, 0.08);
    border-left-color: rgba(var(--primary-color-rgb), 0.78);
    background:
        linear-gradient(135deg, rgba(var(--primary-color-rgb), 0.08), rgba(255, 255, 255, 0.92)),
        #ffffff;
}

body.light-mode .team-head-coach-meta span {
    border-color: rgba(31, 41, 55, 0.08);
    background: rgba(255, 255, 255, 0.8);
}

body.light-mode .team-head-coach-detail {
    border-color: rgba(31, 41, 55, 0.08);
    background: rgba(255, 255, 255, 0.8);
}

body.light-mode .team-coach-market-card {
    border-color: rgba(31, 41, 55, 0.08);
    background: rgba(255, 255, 255, 0.78);
}

body.light-mode .team-coach-rule-note strong {
    color: #8a5a00;
}

body.light-mode .team-status-pill.tone-success {
    color: #1f6f32;
}

body.light-mode .team-status-pill.tone-warning {
    color: #8a5a00;
}

body.light-mode .team-status-pill.tone-danger {
    color: #a92f2f;
}

body.light-mode .team-status-pill.tone-info {
    color: #255f94;
}

body.light-mode .team-assign-role.tone-success {
    color: #1f6f32;
}

body.light-mode .team-assign-role.tone-warning {
    color: #8a5a00;
}

.team-overview-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 30rem), 1fr));
    gap: 1rem;
    min-width: 0;
}

.team-card {
    --team-card-accent: #9ed64f;
    --team-card-glow: rgba(150, 210, 70, 0.16);
    --team-card-bg: url("../../assets/Mannschaft_BG.png");
    display: grid;
    align-content: start;
    gap: 1.25rem;
    position: relative;
    overflow: hidden;
    min-height: 260px;
    padding: clamp(1.25rem, 2.4vw, 1.75rem);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-left: 3px solid var(--team-card-accent);
    border-radius: 18px;
    background:
        linear-gradient(135deg, rgba(255, 255, 255, 0.055), rgba(255, 255, 255, 0.018)),
        #111613;
    box-shadow: 0 18px 45px rgba(0, 0, 0, 0.28);
    color: var(--text-color);
    text-align: left;
    cursor: pointer;
    min-width: 0;
    transition: border-color 0.18s ease, box-shadow 0.18s ease, transform 0.18s ease;
}

.team-card::before {
    content: "";
    position: absolute;
    inset: 0;
    background-image: var(--team-card-bg);
    background-repeat: no-repeat;
    background-position: right center;
    background-size: auto 92%;
    opacity: 0.24;
    pointer-events: none;
    transition: opacity 0.18s ease;
}

.team-card::after {
    content: "";
    position: absolute;
    inset: 0;
    background:
        linear-gradient(90deg, rgba(10, 12, 12, 0.94) 0%, rgba(10, 12, 12, 0.76) 48%, rgba(10, 12, 12, 0.3) 100%),
        radial-gradient(circle at 82% 38%, var(--team-card-glow), transparent 38%);
    pointer-events: none;
}

.team-card>* {
    position: relative;
    z-index: 1;
}

.team-card--main {
    --team-card-accent: #9ed64f;
    --team-card-glow: rgba(150, 210, 70, 0.18);
    --team-card-bg: url("../../assets/Mannschaft_BG.png");
    border-color: rgba(150, 210, 70, 0.42);
    border-left-color: var(--team-card-accent);
}

.team-card--pending {
    --team-card-accent: #6eb4ff;
    --team-card-glow: rgba(90, 160, 230, 0.16);
    --team-card-bg: url("../../assets/Mannschaft_BG.png");
    border-color: rgba(90, 160, 230, 0.42);
    border-left-color: var(--team-card-accent);
}

.team-card:hover,
.team-card.active {
    border-color: rgba(255, 255, 255, 0.22);
    border-left-color: var(--team-card-accent);
    box-shadow: 0 22px 55px rgba(0, 0, 0, 0.36), 0 0 26px color-mix(in srgb, var(--team-card-accent) 16%, transparent);
}

.team-card:hover::before,
.team-card.active::before {
    opacity: 0.32;
}

.team-card__bg {
    display: none;
}

.team-card__header {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
}

.team-card__crest {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
    width: 3rem;
    height: 3rem;
    border: 1px solid color-mix(in srgb, var(--team-card-accent) 34%, transparent);
    border-radius: 14px;
    background: color-mix(in srgb, var(--team-card-accent) 12%, rgba(255, 255, 255, 0.035));
    color: rgba(255, 255, 255, 0.9);
    font-size: 1.05rem;
    font-weight: 900;
    box-shadow: 0 0 22px color-mix(in srgb, var(--team-card-accent) 14%, transparent);
    overflow: hidden;
}

.team-card__crest.has-logo {
    padding: 0.24rem;
    background: rgba(255, 255, 255, 0.08);
}

.team-card__crest img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.team-card__identity {
    display: grid;
    gap: 0.45rem;
    min-width: 0;
}

.team-card__type {
    color: var(--team-card-accent);
    font-size: 0.78rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.team-card__badge {
    display: inline-flex;
    align-items: center;
    justify-self: start;
    min-height: 1.65rem;
    padding: 0.32rem 0.72rem;
    border-radius: 999px;
    border: 1px solid currentColor;
    background: rgba(255, 255, 255, 0.055);
    color: var(--team-card-accent);
    font-size: 0.74rem;
    font-weight: 800;
    text-transform: uppercase;
}

.team-card__badge--success {
    color: #9fe3a2;
}

.team-card__badge--info {
    color: #9fcfff;
}

.team-card__main {
    display: grid;
    gap: 1rem;
    min-width: 0;
}

.team-card__title {
    margin: 0;
    color: rgba(255, 255, 255, 0.92);
    font-size: clamp(2rem, 3vw, 3.2rem);
    line-height: 1;
    overflow-wrap: anywhere;
}

.team-card__details {
    display: grid;
    gap: 0.62rem;
    color: rgba(255, 255, 255, 0.76);
    font-size: 0.94rem;
}

.team-card__details>span {
    display: flex;
    align-items: center;
    gap: 0.55rem;
    min-width: 0;
    overflow-wrap: anywhere;
}

.team-card__detail-icon,
.team-card__stat-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
    width: 1.65rem;
    height: 1.65rem;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.065);
    color: color-mix(in srgb, var(--team-card-accent) 82%, white);
    font-size: 0.62rem;
    font-weight: 900;
    overflow: hidden;
}

.team-card__detail-icon img,
.team-card__stat-icon img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.team-card__stats {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    margin-top: auto;
    padding: 1rem 1.1rem;
    border: 1px solid rgba(255, 255, 255, 0.09);
    border-radius: 12px;
    background: rgba(0, 0, 0, 0.24);
    backdrop-filter: blur(6px);
}

.team-card__stat {
    display: flex;
    align-items: center;
    gap: 0.7rem;
    min-width: 0;
    padding: 0 0.85rem;
    border-right: 1px solid rgba(255, 255, 255, 0.08);
}

.team-card__stat:first-child {
    padding-left: 0;
}

.team-card__stat:last-child {
    padding-right: 0;
    border-right: 0;
}

.team-card__stat>span:last-child {
    display: grid;
    gap: 0.18rem;
    min-width: 0;
}

.team-card__stat-value {
    color: rgba(255, 255, 255, 0.92);
    font-size: 1.05rem;
    font-weight: 800;
    line-height: 1.1;
    overflow-wrap: anywhere;
}

.team-card__stat-label {
    color: rgba(255, 255, 255, 0.58);
    font-size: 0.74rem;
    line-height: 1.2;
}

.team-create-modal {
    max-width: 620px;
    width: min(92vw, 620px);
    max-height: 88vh;
    overflow: auto;
    padding: 1.35rem;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 10px;
    background:
        linear-gradient(145deg, rgba(42, 42, 42, 0.98), rgba(22, 24, 25, 0.98)),
        var(--card-bg);
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.52);
}

.team-create-modal .modal-close {
    float: right;
    width: 2rem;
    height: 2rem;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-color);
    cursor: pointer;
}

.team-create-modal .modal-title {
    margin: 0.35rem 0 0.55rem;
}

.team-create-modal .modal-copy {
    max-width: 48rem;
    color: var(--text-muted);
    line-height: 1.5;
}

.team-create-modal .modal-actions {
    display: flex;
    justify-content: flex-end;
    gap: 0.65rem;
    flex-wrap: wrap;
}

.team-create-fact-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.75rem;
    margin: 1rem 0;
}

.team-create-fact-grid>div {
    display: grid;
    gap: 0.25rem;
    padding: 0.85rem;
    border: 1px solid rgba(255, 255, 255, 0.09);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.04);
}

.team-create-fact-grid span,
.team-create-rules {
    color: var(--text-muted);
}

.team-create-fact-grid strong {
    color: var(--text-color);
}

.team-create-rules {
    display: grid;
    gap: 0.55rem;
    margin: 0 0 1.15rem;
    padding-left: 1.1rem;
    line-height: 1.5;
}

body.light-mode .team-card {
    border-color: rgba(255, 255, 255, 0.12);
    border-left-color: var(--team-card-accent);
    background:
        linear-gradient(135deg, rgba(255, 255, 255, 0.055), rgba(255, 255, 255, 0.018)),
        #111613;
    box-shadow: 0 18px 45px rgba(15, 23, 42, 0.22);
}

body.light-mode .team-card:hover,
body.light-mode .team-card.active {
    border-color: rgba(255, 255, 255, 0.24);
    border-left-color: var(--team-card-accent);
    box-shadow: 0 22px 55px rgba(15, 23, 42, 0.28), 0 0 26px color-mix(in srgb, var(--team-card-accent) 14%, transparent);
}

body.light-mode .team-create-fact-grid>div {
    border-color: rgba(31, 41, 55, 0.1);
    background: rgba(248, 250, 252, 0.9);
}

body.light-mode .team-create-modal {
    border-color: rgba(31, 41, 55, 0.1);
    background:
        linear-gradient(145deg, rgba(255, 255, 255, 0.98), rgba(245, 248, 252, 0.98)),
        #ffffff;
    box-shadow: 0 24px 60px rgba(15, 23, 42, 0.22);
}

body.light-mode .team-create-modal .modal-close {
    border-color: rgba(31, 41, 55, 0.12);
    background: rgba(15, 23, 42, 0.04);
}

.squad-top-cards {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1rem;
    margin-bottom: 0.35rem;
}

.squad-summary-card {
    display: grid;
    align-content: start;
    gap: 0.35rem;
    min-height: 0;
}

.squad-summary-card h3 {
    margin-bottom: 0.25rem;
    color: var(--text-color);
    font-size: 0.95rem;
}

.stats-card-note {
    margin-top: 0.5rem;
    color: var(--text-muted);
    font-size: 0.86rem;
    line-height: 1.45;
}

.stats-card .value.tone-warning {
    color: #f0ab00;
}

.stats-card .value.tone-danger {
    color: #dc5353;
}

.squad-content-card {
    overflow: hidden;
}

.squad-mobile-card-container {
    display: none;
}

.squad-mobile-card-list {
    display: grid;
    gap: 0.85rem;
}

.squad-mobile-card {
    display: grid;
    gap: 0.85rem;
    padding: 0.95rem;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.squad-mobile-card-top {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 0.8rem;
}

.squad-mobile-card-headline {
    display: grid;
    gap: 0.42rem;
    min-width: 0;
}

.squad-mobile-card-name {
    padding: 0;
    margin: 0;
    border: 0;
    background: transparent;
    color: var(--text-color);
    font: inherit;
    font-size: 1rem;
    font-weight: 900;
    text-align: left;
    cursor: pointer;
    overflow-wrap: anywhere;
}

.squad-mobile-card-name:hover,
.squad-mobile-card-name:focus-visible {
    color: var(--primary-color);
    outline: none;
}

.squad-mobile-card-subline {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.45rem;
    color: var(--text-muted);
    font-size: 0.84rem;
}

.squad-mobile-position,
.squad-mobile-status {
    display: inline-flex;
    align-items: center;
    min-height: 1.35rem;
    padding: 0.18rem 0.45rem;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.09);
    color: var(--text-color);
    font-size: 0.75rem;
    font-weight: 900;
    line-height: 1;
}

.squad-mobile-status {
    color: var(--text-muted);
    font-weight: 800;
}

.squad-mobile-fitness {
    flex: 0 0 auto;
    font-weight: 900;
    white-space: nowrap;
}

.squad-mobile-card-meta {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.7rem;
}

.squad-mobile-card-row {
    display: grid;
    gap: 0.18rem;
    min-width: 0;
}

.squad-mobile-card-row span {
    color: var(--text-muted);
    font-size: 0.72rem;
    font-weight: 900;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

.squad-mobile-card-row strong {
    min-width: 0;
    color: var(--text-color);
    font-size: 0.94rem;
    line-height: 1.35;
    overflow-wrap: anywhere;
}

.squad-mobile-card-row small {
    font-size: 0.76rem;
    font-weight: 800;
}

.squad-mobile-card-actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.6rem;
}

.squad-mobile-card-actions .btn {
    justify-content: center;
    width: 100%;
}

.sporttest-score-chip {
    display: inline-flex;
    align-items: center;
    justify-content: flex-end;
    gap: 0.45rem;
    font-weight: 700;
    white-space: nowrap;
}

.sporttest-score-chip small {
    color: var(--text-muted);
    font-weight: 500;
}

.sporttest-summary-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.85rem;
}

.sporttest-summary-card {
    padding: 0.9rem 1rem;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.sporttest-summary-card strong {
    display: block;
    margin-bottom: 0.25rem;
    font-size: 1.05rem;
}

.sporttest-summary-card span {
    color: var(--text-muted);
    font-size: 0.88rem;
}

.stat-item {
    display: flex;
    justify-content: space-between;
    padding: 0.5rem 0;
    border-bottom: 1px solid #333;
}

.stat-item:last-child {
    border-bottom: none;
}

.stat-item .label {
    color: #aaa;
    font-size: 0.9rem;
}

.stat-item .value {
    font-weight: bold;
    color: var(--text-color);
}

body.light-mode .sporttest-summary-card {
    background: #f8fafc;
    border-color: #d8e0e8;
}

body.light-mode .sporttest-control-panel,
body.light-mode .sporttest-mobile-card,
body.light-mode .sporttest-mobile-test-cell {
    background: #f8fafc;
    border-color: #d8e0e8;
}

body.light-mode .sporttest-group-toggle {
    background: #ffffff;
    border-color: #d8e0e8;
}

body.light-mode .sporttest-group-toggle.active {
    background: #eef4ef;
    border-color: rgba(31, 47, 36, 0.18);
    color: #1f2f24;
}

body.light-mode .squad-mobile-card {
    background: #f8fafc;
    border-color: #d8e0e8;
}

body.light-mode .squad-mobile-position,
body.light-mode .squad-mobile-status {
    background: rgba(15, 23, 42, 0.04);
    border-color: rgba(15, 23, 42, 0.08);
}

body.light-mode .stat-item {
    border-bottom-color: #d8e0e8;
}

.youth-view .sidebar-cards,
.youth-view .sidebar-cards h3,
.youth-view .sidebar-cards .stat-item,
.youth-view .sidebar-cards .stat-item .label,
.youth-view .sidebar-cards .stat-item .value,
.youth-view .sidebar-cards label {
    color: var(--text-color);
}

.pos-cell {
    width: 60px;
    text-align: center;
}

.skill-cell {
    width: 150px;
}

.loading-spinner {
    text-align: center;
    padding: 3rem;
    font-size: 1.2rem;
    color: white;
}

.error-state {
    text-align: center;
    padding: 3rem;
    border-color: #f44336;
}

.transient-banner {
    margin-bottom: 1.5rem;
    padding: 1rem 1.25rem;
    border: 1px solid rgba(255, 152, 0, 0.45);
    border-left: 4px solid var(--accent-color);
    border-radius: 8px;
    background: rgba(255, 152, 0, 0.12);
}

.transient-banner-title {
    margin-bottom: 0.35rem;
    font-weight: bold;
    color: #ffd18a;
}

.transient-banner-text {
    margin: 0;
    color: var(--text-color);
    line-height: 1.45;
}

.transient-banner-actions {
    margin-top: 0.9rem;
}

.setup-status-card.is-ready {
    border-left: 4px solid var(--primary-color);
    padding-left: 1rem;
}

.setup-status-card.is-incomplete {
    border-left: 4px solid var(--accent-color);
    padding-left: 1rem;
}

.setup-checklist {
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
}

.setup-check-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.setup-check-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 56px;
    padding: 0.15rem 0.45rem;
    border-radius: 999px;
    font-size: 0.72rem;
    font-weight: bold;
    background: rgba(255, 255, 255, 0.08);
}

body.light-mode .transient-banner {
    background: rgba(255, 152, 0, 0.12);
    border-color: rgba(255, 152, 0, 0.35);
}

body.light-mode .transient-banner-title {
    color: #a35400;
}

/* League View Specifics */
.own-team-row {
    background-color: rgba(76, 175, 80, 0.1);
    border-left: 4px solid var(--primary-color);
}

.form-indicator {
    display: inline-block;
    width: 20px;
    height: 20px;
    line-height: 20px;
    text-align: center;
    border-radius: 3px;
    font-size: 0.75rem;
    font-weight: bold;
    margin-right: 3px;
    color: white;
}

.form-W {
    background-color: #26a65b;
}

.form-D {
    background-color: var(--accent-color);
}

.form-L {
    background-color: #f44336;
}

/* Match View Specifics */
.live-pulse {
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% {
        opacity: 1;
    }

    50% {
        opacity: 0.5;
    }

    100% {
        opacity: 1;
    }
}

.event-goal {
    border-left: 4px solid var(--primary-color);
}

.event-card-yellow {
    border-left: 4px solid #ffeb3b;
}

.event-card-red {
    border-left: 4px solid #f44336;
}

.modal-body {
    padding: 1.5rem;
    overflow-y: auto;
    max-height: calc(90vh - 82px);
    min-height: 0;
    box-sizing: border-box;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.form-input {
    padding: 0.75rem;
    border-radius: 4px;
    border: 1px solid var(--border-color);
    background-color: #222;
    color: var(--text-color);
}

.form-input:focus {
    outline: none;
    border-color: var(--primary-color);
}

/* Common UI Components */
.card {

    background-color: var(--card-bg);
    border-radius: 8px;
    padding: 1.5rem;
    margin-bottom: 1rem;
    border: 1px solid var(--border-color);
}

table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 1rem;
}

th,
td {
    padding: 0.75rem;
    text-align: left;
    border-bottom: 1px solid var(--border-color);
}

th {
    background-color: #333;
    color: white;
}

tr:hover {
    background-color: #383838;
}

/* Badges */
.badge {
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: bold;
    text-transform: uppercase;
}

.badge-pos {
    background-color: #444;
    color: var(--accent-color);
    border: 1px solid var(--accent-color);
}

/* Finance View */
.finance-summary {
    display: flex;
    justify-content: space-around;
    text-align: center;
    margin-bottom: 2rem;
}

.summary-item {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.finance-details {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
}

.total-row {
    display: flex;
    justify-content: space-between;
    padding: 1rem;
    background-color: #333;
    border-radius: 4px;
    margin-top: 1rem;
}

@media (max-width: 768px) {
    .finance-details {
        grid-template-columns: 1fr;
    }
}

/* Match View */
.match-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 2rem;
    background: linear-gradient(180deg, #222 0%, #111 100%);
    border-bottom: 3px solid var(--primary-color);
    margin-bottom: 2rem;
}

.team {
    flex: 1;
    text-align: center;
}

.team-logo {
    font-size: 3rem;
    margin-bottom: 0.5rem;
}

.match-info {
    flex: 1;
    text-align: center;
}

.match-detail-score-card,
.match-detail-stats-card {
    background: var(--card-bg);
}

.match-center-heading {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 1rem;
    flex-wrap: wrap;
    color: var(--text-muted);
    font-size: 0.82rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.match-center-heading>div:last-child {
    text-align: right;
}

.match-detail-score-card {
    width: 100%;
    max-width: 100%;
    min-height: 18rem;
    align-content: center;
    padding-top: 2.35rem !important;
    border-color: transparent !important;
    background: transparent !important;
    box-shadow: none !important;
}

.match-detail-score-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(8rem, auto) minmax(0, 1fr);
    align-items: start;
    gap: clamp(1rem, 4vw, 4rem);
    width: 100%;
    max-width: 100%;
    justify-items: stretch;
    overflow: hidden;
}

.match-detail-team-title {
    display: grid;
    justify-items: center;
    align-content: start;
    gap: 0.9rem;
    min-width: 0;
    max-width: 100%;
    text-align: center;
}

.match-detail-team-logo {
    width: clamp(4.5rem, 8vw, 7rem);
    height: clamp(4.5rem, 8vw, 7rem);
    max-width: 100%;
    border-radius: 50%;
    overflow: hidden;
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    display: grid;
    place-items: center;
}

.match-detail-team-logo img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    padding: 0.25rem;
}

.match-detail-team-logo-empty {
    opacity: 0.35;
}

.match-detail-team-name {
    min-width: 0;
    width: min(100%, 16rem);
    max-width: 16rem;
    color: var(--text-primary);
    font-size: clamp(1.35rem, 3vw, 2.45rem);
    font-weight: 500;
    line-height: 1.08;
    overflow: hidden;
}

.match-detail-team-name-text {
    display: inline-block;
    max-width: 100%;
    overflow-wrap: anywhere;
    vertical-align: top;
}

.match-detail-score-center {
    display: grid;
    justify-items: center;
    align-content: start;
    gap: 0.15rem;
    min-width: 0;
    max-width: 100%;
    color: var(--text-primary);
}

.match-detail-score-center strong {
    font-size: clamp(2.4rem, 6vw, 4.8rem);
    font-weight: 500;
    line-height: 0.95;
}

.match-detail-result-highlights {
    display: grid;
    gap: 0.28rem;
    width: min(100%, 62rem);
    justify-self: center;
    padding-top: 1.25rem;
}

.match-detail-result-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(4.5rem, auto) minmax(0, 1fr);
    align-items: center;
    gap: 0.75rem;
    font-size: 0.95rem;
}

.match-detail-result-row span {
    min-width: 0;
    overflow-wrap: anywhere;
}

.match-detail-result-row strong {
    text-align: center;
    font-size: 1.03rem;
}

.match-detail-result-row-home span:first-child {
    text-align: right;
}

.match-detail-result-row-away span:last-child {
    text-align: left;
}

.match-detail-halftime-marker {
    text-align: center;
    color: var(--text-primary);
    font-size: 1.05rem;
    font-weight: 400;
    line-height: 1.2;
    padding: 0.15rem 0;
}

.match-detail-lineup-card {
    min-width: 0;
}

.match-detail-lineup-pitch {
    --match-lineup-dot-size: 16px;
    --match-lineup-dot-edge: 20px;
    position: relative;
    width: 100%;
    max-width: 54rem;
    aspect-ratio: 16 / 9;
    justify-self: center;
    overflow: hidden;
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    background: #285c38;
}

.match-detail-lineup-pitch-image {
    position: absolute;
    left: 50%;
    top: 50%;
    width: 56.25%;
    height: 177.78%;
    object-fit: fill;
    display: block;
    transform: translate(-50%, -50%) rotate(90deg);
    transform-origin: center;
}

.match-detail-lineup-pitch-shade {
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, rgba(10, 26, 12, 0.10), rgba(10, 26, 12, 0.02) 50%, rgba(10, 26, 12, 0.10));
}

@keyframes matchTeamNameScroll {

    0%,
    18% {
        transform: translateX(0);
    }

    55%,
    75% {
        transform: translateX(var(--team-name-scroll-distance, -2rem));
    }

    100% {
        transform: translateX(0);
    }
}

.match-detail-stat-row:last-child,
.match-detail-info-row:last-child {
    border-bottom-color: transparent !important;
}

.match-score {
    font-size: 3.5rem;
    font-weight: bold;
    letter-spacing: 5px;
}

.match-minute {
    font-size: 1.5rem;
    color: var(--accent-color);
    font-weight: bold;
}

.live-pulse {
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% {
        opacity: 1;
    }

    50% {
        opacity: 0.5;
    }

    100% {
        opacity: 1;
    }
}

.match-content {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 2rem;
}

.ticker-list {
    max-height: 400px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.ticker-item {
    padding: 0.75rem;
    background-color: #333;
    border-radius: 4px;
    display: flex;
    gap: 1rem;
    align-items: center;
    border-left: 4px solid transparent;
}

.event-goal {
    border-left-color: var(--primary-color);
    background-color: #2e3d2e;
}

.event-yellow-card {
    border-left-color: #ffd700;
}

.event-red-card {
    border-left-color: #f44336;
}

.event-minute {
    font-weight: bold;
    min-width: 30px;
}

.match-ticker-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
    margin-bottom: 1rem;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 0.75rem;
}

.match-ticker-head h3 {
    margin: 0;
}

.match-event-filter {
    display: inline-flex;
    gap: 0.25rem;
    padding: 0.2rem;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.03);
}

.match-event-filter-btn {
    border: 0;
    border-radius: 6px;
    padding: 0.42rem 0.68rem;
    background: transparent;
    color: var(--text-muted);
    cursor: pointer;
    font-size: 0.85rem;
    font-weight: 700;
}

.match-event-filter-btn.active,
.match-event-filter-btn:hover {
    background: var(--accent-color);
    color: var(--bg-primary);
}

.match-event-list {
    display: grid;
    gap: 0.5rem;
}

.match-event-item {
    display: grid;
    gap: 0.38rem;
    padding: 0.65rem 0.75rem;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.04);
    border-left: 4px solid var(--border-color);
}

.match-event-meta {
    display: grid;
    grid-template-columns: 3.4rem minmax(7rem, 1fr) 4.2rem;
    align-items: center;
    gap: 0.55rem;
    color: var(--text-muted);
    font-size: 0.74rem;
    font-weight: 800;
    letter-spacing: 0.02em;
    text-transform: uppercase;
}

.match-event-tabs .match-event-list {
    position: relative;
}

.match-event-tabs .match-event-list::before {
    content: '';
    position: absolute;
    top: 0;
    bottom: 0;
    left: 50%;
    width: 1px;
    background: var(--border-color);
    opacity: 0.55;
    transform: translateX(-50%);
}

.match-event-tabs .match-event-item {
    position: relative;
    z-index: 1;
    width: min(46%, 34rem);
}

.match-event-tabs .match-event-item.side-home {
    justify-self: start;
}

.match-event-tabs .match-event-item.side-away {
    justify-self: end;
    border-left-width: 0;
    border-right: 4px solid #ff6b6b;
    text-align: right;
}

.match-event-tabs .match-event-item.side-away .match-event-meta {
    grid-template-columns: 4.2rem minmax(7rem, 1fr) 3.4rem;
}

.match-event-tabs .match-event-item.side-neutral {
    justify-self: center;
    width: min(70%, 36rem);
    text-align: center;
}

.match-event-item.side-home {
    border-left-color: #4f8cff;
}

.match-event-item.side-away {
    border-left-color: #ff6b6b;
}

.match-event-item.side-neutral {
    border-left-color: var(--text-muted);
}

.match-event-item.importance-highlight {
    background: rgba(255, 255, 255, 0.07);
}

.match-event-item .event-minute {
    color: var(--accent-color);
    min-width: 0;
}

.match-event-item .event-team-badge,
.match-event-item .event-icon {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    min-height: 1.55rem;
    border-radius: 999px;
    font-size: 0.72rem;
    font-weight: 800;
    line-height: 1;
}

.match-event-item .event-team-badge {
    background: rgba(255, 255, 255, 0.08);
    color: var(--text-color);
}

.match-event-item.side-home .event-team-badge {
    background: rgba(79, 140, 255, 0.18);
    color: #9fc0ff;
}

.match-event-item.side-away .event-team-badge {
    background: rgba(255, 107, 107, 0.18);
    color: #ffb0b0;
}

.match-event-item .event-icon {
    background: rgba(255, 255, 255, 0.06);
    color: var(--text-muted);
}

.match-event-item .event-text {
    min-width: 0;
    overflow-wrap: anywhere;
    font-size: 0.94rem;
    line-height: 1.38;
}

body.light-mode .match-event-item {
    background: #f8fafc;
    border-color: #d8e0e8;
    color: #23303d;
}

body.light-mode .match-event-item.importance-highlight {
    background: #eef4fb;
}

body.light-mode .match-event-item.side-home {
    border-left-color: #2f6fd6;
}

body.light-mode .match-event-item.side-away {
    border-left-color: #d84f4f;
}

body.light-mode .match-event-tabs .match-event-list::before {
    background: #ccd5df;
}

body.light-mode .match-event-tabs .match-event-item.side-away {
    border-right-color: #d84f4f;
}

body.light-mode .match-event-item.side-neutral {
    border-left-color: #6b7785;
}

body.light-mode .match-event-item .event-minute {
    color: var(--primary-color);
}

body.light-mode .match-event-item .event-team-badge {
    background: #e8edf4;
    color: #263241;
}

body.light-mode .match-event-item.side-home .event-team-badge {
    background: #dbe9ff;
    color: #174d9b;
}

body.light-mode .match-event-item.side-away .event-team-badge {
    background: #ffe1e1;
    color: #9d2929;
}

body.light-mode .match-event-item .event-icon {
    background: #e8edf4;
    color: #526170;
}

.match-event-tabs,
.match-detail-event-block {
    display: grid;
    gap: 0.65rem;
    width: 100%;
    min-width: 0;
}

.match-event-tabs>input {
    display: none;
}

.match-event-tab-buttons {
    display: inline-flex;
    width: fit-content;
    gap: 0.25rem;
    padding: 0.2rem;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.03);
}

.match-event-tab-buttons label {
    border-radius: 6px;
    padding: 0.45rem 0.7rem;
    color: var(--text-muted);
    cursor: pointer;
    font-size: 0.85rem;
    font-weight: 700;
}

.match-event-active-filter {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    padding: 0.5rem 0.65rem;
    border: 1px solid rgba(var(--primary-color-rgb), 0.28);
    border-radius: 8px;
    background: rgba(var(--primary-color-rgb), 0.08);
    color: var(--text-muted);
    font-size: 0.86rem;
}

.match-event-active-filter[hidden] {
    display: none;
}

.match-event-filter-clear {
    border: 0;
    border-radius: 6px;
    padding: 0.35rem 0.55rem;
    background: rgba(var(--primary-color-rgb), 0.16);
    color: var(--text-color);
    cursor: pointer;
    font-weight: 700;
}

.match-event-tabs input:nth-of-type(1):checked~.match-event-tab-buttons label:nth-of-type(1),
.match-event-tabs input:nth-of-type(2):checked~.match-event-tab-buttons label:nth-of-type(2),
.match-event-tabs input:nth-of-type(3):checked~.match-event-tab-buttons label:nth-of-type(3),
.match-event-tab-buttons label:hover {
    background: var(--accent-color);
    color: var(--bg-primary);
}

body.light-mode .match-event-filter,
body.light-mode .match-event-tab-buttons {
    background: #f3f6fa;
    border-color: #d5dde7;
}

body.light-mode .match-event-filter-btn,
body.light-mode .match-event-tab-buttons label {
    color: #526170;
}

body.light-mode .match-event-filter-btn.active,
body.light-mode .match-event-filter-btn:hover,
body.light-mode .match-event-tabs input:nth-of-type(1):checked~.match-event-tab-buttons label:nth-of-type(1),
body.light-mode .match-event-tabs input:nth-of-type(2):checked~.match-event-tab-buttons label:nth-of-type(2),
body.light-mode .match-event-tabs input:nth-of-type(3):checked~.match-event-tab-buttons label:nth-of-type(3),
body.light-mode .match-event-tab-buttons label:hover {
    background: var(--primary-color);
    color: #ffffff;
}

.match-event-tab-panel {
    display: none;
    width: 100%;
    min-width: 0;
}

.match-event-tabs input:nth-of-type(1):checked~.match-event-tab-highlights,
.match-event-tabs input:nth-of-type(2):checked~.match-event-tab-all,
.match-event-tabs input:nth-of-type(3):checked~.match-event-tab-players {
    display: block;
}

@media (max-width: 760px) {
    .match-player-tab {
        grid-template-columns: 1fr !important;
    }
}

.match-view {
    width: 100%;
    max-width: 1180px;
    margin: 0 auto;
    min-width: 0;
}

.match-view .match-center-card.card {
    width: 100%;
    min-width: 0;
    box-sizing: border-box;
    overflow: hidden;
    margin-bottom: 0;
}

.match-detail-shell {
    display: grid;
    gap: 1rem;
    width: 100%;
    max-width: none;
    margin: 0 auto;
    min-width: 0;
}

.match-detail-events-section,
.match-detail-events-section>div,
.match-event-tab-highlights,
.match-event-tab-all,
.match-event-list,
.match-event-timeline {
    width: 100%;
    min-width: 0;
    box-sizing: border-box;
}

.match-event-timeline {
    justify-self: stretch;
}

.match-timeline-event-row.is-hidden-by-filter {
    display: none !important;
}

.match-detail-action-row:empty {
    display: none;
}

.match-detail-event-block details {
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 0.7rem;
    background: rgba(255, 255, 255, 0.02);
}

.match-detail-event-block summary {
    cursor: pointer;
    font-weight: 700;
    color: var(--text-muted);
    margin-bottom: 0.55rem;
}

@media (max-width: 760px) {
    .match-center-heading {
        align-items: flex-start;
    }

    .match-center-heading>div:last-child {
        text-align: left;
    }

    .match-detail-score-card {
        min-height: 14rem;
        padding: 1.35rem 0.55rem 1rem !important;
        justify-items: center;
    }

    .match-detail-score-grid {
        grid-template-columns: minmax(0, 1fr) minmax(3.6rem, auto) minmax(0, 1fr);
        gap: clamp(0.3rem, 2.4vw, 0.75rem);
        width: min(100%, 34rem);
        margin-inline: auto;
    }

    .match-detail-team-logo {
        width: clamp(2.85rem, 17vw, 4.1rem);
        height: clamp(2.85rem, 17vw, 4.1rem);
    }

    .match-detail-team-name {
        width: 100%;
        max-width: min(30vw, 7.5rem);
        font-size: 1.15rem;
        white-space: nowrap;
    }

    .match-detail-team-name-text {
        max-width: none;
        overflow-wrap: normal;
        white-space: nowrap;
    }

    .match-detail-team-name.is-overflowing .match-detail-team-name-text {
        animation: matchTeamNameScroll 7s ease-in-out infinite;
    }

    .match-detail-score-center strong {
        font-size: clamp(1.8rem, 9vw, 2.1rem);
    }

    .match-detail-result-row {
        grid-template-columns: minmax(0, 1fr) minmax(3.4rem, auto) minmax(0, 1fr);
        gap: 0.45rem;
        font-size: 0.82rem;
    }

    .match-detail-lineup-card {
        padding: 0.8rem !important;
    }

    .match-detail-lineup-pitch {
        --match-lineup-dot-size: clamp(12px, 4vw, 16px);
        --match-lineup-dot-edge: clamp(14px, 4vw, 20px);
        aspect-ratio: 16 / 9;
        height: auto;
        min-height: 0;
        max-height: none;
    }

    .match-event-tabs .match-event-list::before {
        left: 0.25rem;
    }

    .match-event-tabs .match-event-item,
    .match-event-tabs .match-event-item.side-neutral {
        width: calc(100% - 1rem);
        justify-self: end;
    }

    .match-event-tabs .match-event-item.side-away {
        border-left: 4px solid #ff6b6b;
        border-right-width: 0;
        text-align: left;
    }

    .match-event-tabs .match-event-item.side-away .match-event-meta {
        grid-template-columns: 3.4rem minmax(7rem, 1fr) 4.2rem;
    }
}

@media (max-width: 420px) {
    .match-detail-score-card {
        padding-inline: 0.4rem !important;
    }

    .match-detail-score-grid {
        grid-template-columns: minmax(0, 1fr) minmax(3.1rem, auto) minmax(0, 1fr);
        gap: 0.25rem;
    }

    .match-detail-team-title {
        gap: 0.55rem;
    }

    .match-detail-team-logo {
        width: clamp(2.45rem, 15vw, 3.25rem);
        height: clamp(2.45rem, 15vw, 3.25rem);
    }

    .match-detail-team-name {
        max-width: min(28vw, 6.4rem);
        font-size: 1rem;
    }

    .match-detail-score-center strong {
        font-size: clamp(1.55rem, 8.5vw, 1.9rem);
    }
}

/* Tactic View */
.tactic-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-top: 20px;
}

.position-row {
    display: flex;
    align-items: center;
    margin-bottom: 10px;
    gap: 10px;
}

.pos-label {
    width: 50px;
    font-weight: bold;
    color: white;
}

.player-select,
.bench-select {
    flex: 1;
    padding: 8px;
    background-color: #333;
    color: white;
    border: 1px solid #444;
    border-radius: 4px;
}

.formation-selector {
    display: flex;
    align-items: center;
    gap: 10px;
}

.button-group {
    display: flex;
    gap: 10px;
}

@media (max-width: 768px) {
    .tactic-grid {
        grid-template-columns: 1fr;
    }
}

.action-buttons {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

/* Settings & Forms */
.settings-section {
    animation: fadeIn 0.3s ease-out;
}

.club-design-grid {
    display: grid;
    grid-template-columns: minmax(260px, 0.8fr) minmax(320px, 1.2fr);
    gap: 1.25rem;
    margin-top: 1.5rem;
}

.club-logo-upload-target {
    position: relative;
    display: flex;
    align-items: center;
    gap: 1rem;
    min-height: 124px;
    padding: 1rem;
    border: 1px dashed var(--border-color);
    border-radius: 8px;
    color: inherit;
    cursor: pointer;
    transition: border-color 0.2s ease, background 0.2s ease;
}

.club-logo-upload-target:hover,
.club-logo-upload-target:focus-within,
.club-logo-upload-target.has-pending-logo {
    border-color: var(--primary-color);
    background: rgba(var(--primary-color-rgb), 0.06);
}

.club-logo-upload-target input {
    position: absolute;
    width: 1px;
    height: 1px;
    opacity: 0;
    pointer-events: none;
}

.settings-logo-preview {
    width: 76px;
    height: 76px;
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
    font-weight: 800;
    color: var(--bg-color);
    background: linear-gradient(135deg, var(--primary-color), color-mix(in srgb, var(--primary-color) 55%, white));
    box-shadow: 0 12px 24px rgba(var(--primary-color-rgb), 0.2);
    overflow: hidden;
}

.settings-logo-preview.has-logo {
    background: transparent;
    box-shadow: none;
}

.settings-logo-preview img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.settings-logo-copy {
    display: grid;
    gap: 0.25rem;
}

.settings-logo-copy span {
    color: var(--text-muted);
    font-size: 0.86rem;
}

.club-logo-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.65rem;
    margin-top: 0.9rem;
}

.club-logo-crop-panel {
    display: grid;
    grid-template-columns: 132px 1fr;
    gap: 1rem;
    align-items: center;
    margin-top: 1rem;
    padding: 0.85rem;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.03);
}

.club-logo-crop-stage {
    width: 132px;
    height: 132px;
    border-radius: 22px;
    overflow: hidden;
    background:
        linear-gradient(45deg, rgba(255, 255, 255, 0.08) 25%, transparent 25% 75%, rgba(255, 255, 255, 0.08) 75%),
        linear-gradient(45deg, rgba(255, 255, 255, 0.08) 25%, transparent 25% 75%, rgba(255, 255, 255, 0.08) 75%);
    background-position: 0 0, 8px 8px;
    background-size: 16px 16px;
}

.club-logo-crop-stage img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.club-logo-crop-controls {
    display: grid;
    gap: 0.7rem;
}

.club-logo-crop-controls input[type="range"] {
    width: 100%;
    accent-color: var(--primary-color);
}

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

.club-name-form {
    display: grid;
    gap: 1rem;
}

.club-branding-field {
    display: grid;
    gap: 0.45rem;
    color: var(--text-muted);
    font-size: 0.86rem;
}

.club-branding-field input[type="color"] {
    width: 100%;
    height: 42px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    background: var(--card-bg);
    cursor: pointer;
}

.club-branding-preview {
    grid-column: 1 / -1;
    display: flex;
    align-items: center;
    gap: 1rem;
    min-height: 108px;
    padding: 1rem;
    border-radius: 8px;
}

.club-branding-preview>div:last-child {
    display: grid;
    gap: 0.25rem;
}

.club-branding-preview span {
    color: var(--text-muted);
    font-size: 0.86rem;
}

.form-group {
    margin-bottom: 1rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
    color: var(--text-muted);
}

.form-control {
    border-radius: 4px;
    transition: border-color 0.2s;
}

.form-control:focus {
    outline: none;
    border-color: var(--primary-color) !important;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Pending Upgrades - Improve contrast for badge and progress bar */
.pending-upgrades .badge {
    background: var(--primary-color);
    color: #fff !important;
    font-weight: bold;
    border: 1px solid #fff;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.15);
}

.pending-upgrades .text-muted {
    color: #fff !important;
    opacity: 0.85;
}

.pending-upgrades .progress-bar {
    background: #222 !important;
}

.pending-upgrades .fill {
    background: #fff !important;
}

body.light-mode .pending-upgrades .badge {
    background: var(--primary-color);
    color: #222 !important;
    border: 1px solid #222;
}

body.light-mode .pending-upgrades .text-muted {
    color: #222 !important;
}

body.light-mode .pending-upgrades .progress-bar {
    background: #eee !important;
}

body.light-mode .pending-upgrades .fill {
    background: var(--primary-color) !important;
}

/* Shared Layout Utilities */
.layout-stack-md {
    margin-bottom: 2rem;
}

.layout-grid-two {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
}

.layout-grid-sidebar {
    display: grid;
    grid-template-columns: 1fr 3fr;
    gap: 2rem;
}

.tab-strip {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
}

.tab-strip-bordered {
    border-bottom: 1px solid var(--border-color);
}

.button-row-top {
    margin-top: 1.5rem;
}

.sub-tab-btn {
    padding: 0.5rem 1rem;
    font-size: 0.9rem;
}

.text-reset-top {
    margin-top: 0;
}

/* Club Module */
.club-overview-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
}

/* Infrastructure Module */
.infra-tabs {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
}

.stadium-summary {
    cursor: pointer;
}

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

.infra-summary-card {
    position: relative;
    min-height: 31rem;
    perspective: 1200px;
    transform-style: preserve-3d;
    cursor: pointer;
    outline: none;
}

.infra-summary-card:hover .infra-summary-card-inner,
.infra-summary-card:focus-visible .infra-summary-card-inner {
    transform: translateY(-2px);
}

.infra-summary-card.is-flipped:hover .infra-summary-card-inner,
.infra-summary-card.is-flipped:focus-visible .infra-summary-card-inner {
    transform: translateY(-2px) rotateY(180deg);
}

.infra-summary-card:focus-visible .infra-summary-face {
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--infra-accent) 42%, transparent);
}

.infra-summary-card:hover .infra-summary-face,
.infra-summary-card:focus-visible .infra-summary-face {
    outline: 1px solid var(--infra-accent);
    outline-offset: 0;
}

.infra-summary-card-inner {
    position: relative;
    width: 100%;
    height: 100%;
    min-height: inherit;
    transform-style: preserve-3d;
    -webkit-transform-style: preserve-3d;
    transition: transform 0.42s ease;
}

.infra-summary-card.is-flipped .infra-summary-card-inner {
    transform: rotateY(180deg);
}

.infra-summary-face {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    gap: 0.85rem;
    padding: 1rem;
    overflow: hidden;
    border: 1px solid var(--infra-border);
    border-radius: 8px;
    background:
        linear-gradient(180deg,
            color-mix(in srgb, var(--infra-accent) 24%, var(--card-bg)) 0%,
            color-mix(in srgb, var(--infra-accent) 12%, var(--card-bg)) 48%,
            var(--card-bg) 100%);
    box-shadow: 0 16px 34px rgba(10, 18, 28, 0.08);
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
    transform-style: preserve-3d;
    -webkit-transform-style: preserve-3d;
}

.infra-summary-front {
    transform: rotateY(0deg) translateZ(1px);
    z-index: 2;
}

.infra-summary-back {
    transform: rotateY(180deg) translateZ(1px);
    z-index: 1;
}

.infra-summary-card.is-flipped .infra-summary-front {
    z-index: 1;
}

.infra-summary-card.is-flipped .infra-summary-back {
    z-index: 2;
}

.infra-summary-top,
.infra-back-header,
.infra-summary-metrics,
.infra-card-progress>div:first-child,
.infra-back-details>div,
.infra-requirements-compact>div {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
}

.infra-summary-title,
.infra-back-header {
    min-width: 0;
}

.infra-summary-title {
    display: flex;
    align-items: center;
    gap: 0.65rem;
}

.infra-summary-title h3,
.infra-back-header h3 {
    margin: 0;
    min-width: 0;
    overflow-wrap: anywhere;
    font-size: 1.02rem;
    letter-spacing: 0;
}

.infra-title-dossier {
    min-width: 0;
}

.infra-title-dossier h3 {
    margin: 0.1rem 0 0;
}

.infra-summary-subtitle {
    display: block;
    margin-top: 0.2rem;
    color: var(--text-primary);
    font-size: 0.9rem;
    font-weight: 800;
    line-height: 1.2;
    overflow-wrap: anywhere;
}

.infra-summary-icon {
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2rem;
    height: 2rem;
    border-radius: 999px;
    border: 1px solid var(--infra-border);
    color: var(--infra-accent);
    background: color-mix(in srgb, var(--infra-accent) 14%, transparent);
    font-size: 0.72rem;
    font-weight: 800;
}

.infra-summary-card[data-infra-card="stadium"] .infra-summary-icon {
    font-size: 1.12rem;
    line-height: 1;
    padding-bottom: 0.04rem;
}

.infra-level-badge {
    flex: 0 0 auto;
    padding: 0.32rem 0.52rem;
    border-radius: 999px;
    border: 1px solid var(--infra-border);
    color: var(--infra-accent);
    font-size: 0.78rem;
    font-weight: 800;
}

.infra-image-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 10.2rem;
    aspect-ratio: 16 / 10;
    border: 1px dashed color-mix(in srgb, var(--infra-accent) 48%, transparent);
    border-radius: 6px;
    background:
        linear-gradient(135deg, color-mix(in srgb, var(--infra-accent) 18%, transparent), transparent 58%),
        color-mix(in srgb, var(--bg-secondary) 86%, transparent);
    color: var(--text-muted);
    font-size: 0.82rem;
    font-weight: 700;
    text-transform: uppercase;
}

.infra-card-image {
    overflow: hidden;
    border-style: solid;
    padding: 0;
    background: color-mix(in srgb, var(--infra-accent) 10%, var(--bg-secondary));
}

.infra-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.infra-summary-metrics {
    align-items: stretch;
}

.infra-summary-metrics>div,
.infra-card-progress,
.infra-back-details,
.infra-back-info,
.infra-requirements-compact {
    border: 1px solid var(--infra-border);
    border-radius: 6px;
    background: rgba(255, 255, 255, 0.055);
}

.infra-summary-metrics>div {
    flex: 1 1 0;
    min-width: 0;
    padding: 0.72rem;
}

.infra-summary-metrics span,
.infra-card-progress span,
.infra-back-header span,
.infra-back-details span,
.infra-back-info span,
.infra-requirements-compact span {
    display: block;
    color: var(--text-muted);
    font-size: 0.76rem;
}

.infra-summary-metrics span {
    font-size: 0.72rem;
    font-weight: 900;
    letter-spacing: 0;
    text-transform: uppercase;
    line-height: 1.15;
    overflow-wrap: anywhere;
}

.infra-summary-metrics strong,
.infra-back-details strong,
.infra-back-info strong,
.infra-requirements-compact strong {
    display: block;
    margin-top: 0.18rem;
    color: var(--infra-accent);
    font-size: 1rem;
    font-weight: 800;
    line-height: 1.2;
    overflow-wrap: anywhere;
}

.infra-card-progress {
    display: grid;
    gap: 0.55rem;
    padding: 0.72rem;
}

.infra-card-progress .progress-bar {
    height: 0.55rem;
}

.infra-card-action {
    width: 100%;
    margin-top: auto;
}

.infra-back-benefits {
    display: grid;
    gap: 0.55rem;
}

.infra-back-benefits>div {
    display: grid;
    grid-template-columns: 0.42rem 1fr;
    gap: 0.5rem;
    align-items: start;
}

.infra-back-benefits>div>span {
    width: 0.42rem;
    height: 0.42rem;
    margin-top: 0.38rem;
    border-radius: 999px;
    background: var(--infra-accent);
}

.infra-back-benefits strong {
    color: var(--text-primary);
    font-size: 0.86rem;
    line-height: 1.35;
}

.infra-back-details,
.infra-back-info,
.infra-requirements-compact {
    display: grid;
    gap: 0.45rem;
    padding: 0.72rem;
}

.infra-back-info strong {
    color: var(--text-primary);
    font-size: 0.84rem;
    line-height: 1.38;
}

.infra-stadium-capacity-list {
    gap: 0.58rem;
}

.infra-detail-shell {
    display: grid;
    gap: 1rem;
}

.infra-back-btn {
    justify-self: start;
}

.infra-training-detail {
    gap: 1rem;
}

.infra-training-hero,
.infra-youth-hero,
.infra-analysis-hero,
.infra-training-panel {
    border: 1px solid var(--infra-border);
    border-radius: 8px;
    background:
        linear-gradient(160deg,
            color-mix(in srgb, var(--infra-accent) 18%, var(--card-bg)) 0%,
            var(--card-bg) 100%);
    box-shadow: 0 16px 34px rgba(10, 18, 28, 0.08);
}

.infra-training-hero,
.infra-youth-hero,
.infra-analysis-hero {
    display: grid;
    grid-template-columns: minmax(16rem, 0.95fr) minmax(0, 1.35fr);
    gap: 1rem;
    padding: 1rem;
    align-items: stretch;
}

.infra-training-hero-media,
.infra-youth-hero-media,
.infra-analysis-hero-media {
    min-height: 18rem;
    overflow: hidden;
    border-radius: 7px;
    border: 1px solid var(--infra-border);
    background: color-mix(in srgb, var(--infra-accent) 10%, var(--bg-secondary));
}

.infra-training-hero-media img,
.infra-youth-hero-media img,
.infra-analysis-hero-media img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.infra-training-hero-copy,
.infra-youth-hero-copy,
.infra-analysis-hero-copy {
    display: grid;
    align-content: center;
    gap: 1rem;
    min-width: 0;
    padding: 0.35rem;
}

.infra-training-hero-copy h2,
.infra-youth-hero-copy h2,
.infra-analysis-hero-copy h2 {
    margin: 0.08rem 0 0;
    font-size: clamp(1.6rem, 3vw, 2.45rem);
    line-height: 1.05;
    letter-spacing: 0;
}

.infra-training-status-row {
    display: flex;
    flex-wrap: wrap;
    gap: 0.55rem;
    align-items: center;
}

.infra-training-status-row span,
.infra-training-status-row strong,
.infra-training-status-row em {
    display: inline-flex;
    min-height: 2rem;
    align-items: center;
    padding: 0.35rem 0.62rem;
    border-radius: 999px;
    border: 1px solid var(--infra-border);
    background: color-mix(in srgb, var(--infra-accent) 10%, transparent);
    color: var(--text-primary);
    font-size: 0.82rem;
    font-style: normal;
    font-weight: 850;
}

.infra-training-status-row strong {
    color: var(--infra-accent);
}

.infra-training-metrics,
.infra-training-upgrade-layout {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.7rem;
}

.infra-training-quick-links {
    display: flex;
    flex-wrap: wrap;
    gap: 0.55rem;
}

.infra-training-metric-card {
    display: grid;
    gap: 0.22rem;
    min-width: 0;
    padding: 0.85rem 0.95rem;
    border-radius: 8px;
    border: 1px solid var(--infra-border);
    background: rgba(255, 255, 255, 0.04);
}

.infra-training-metric-card span,
.infra-training-benefit-list span,
.infra-training-staff-list span,
.infra-training-empty-note {
    color: var(--text-muted);
    font-size: 0.78rem;
    font-weight: 800;
}

.infra-training-metric-card strong {
    color: var(--infra-accent);
    font-size: 0.98rem;
    overflow-wrap: anywhere;
}

.infra-training-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.2fr) minmax(18rem, 0.8fr);
    gap: 1rem;
}

.infra-training-panel {
    display: grid;
    gap: 0.85rem;
    padding: 1rem;
}

.infra-training-benefit-list,
.infra-training-staff-list {
    display: grid;
    gap: 0.55rem;
}

.infra-training-benefit-list>div,
.infra-training-staff-list>div {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 0.75rem;
    padding: 0.72rem 0.78rem;
    border-radius: 8px;
    border: 1px solid var(--infra-border);
    background: rgba(255, 255, 255, 0.035);
}

.infra-training-benefit-list>div {
    justify-content: flex-start;
}

.infra-training-benefit-list>div>span {
    flex: 0 0 auto;
    width: 0.45rem;
    height: 0.45rem;
    margin-top: 0.42rem;
    border-radius: 999px;
    background: var(--infra-accent);
}

.infra-training-benefit-list strong,
.infra-training-staff-list strong {
    font-size: 0.9rem;
    line-height: 1.35;
}

.infra-training-staff-list strong {
    color: var(--infra-accent);
    text-align: right;
}

.infra-training-construction {
    background: linear-gradient(135deg, rgba(214, 143, 52, 0.16), color-mix(in srgb, var(--infra-accent) 8%, var(--card-bg)));
}

.infra-training-construction .progress-bar {
    height: 10px;
}

.infra-training-upgrade .section-split {
    align-items: flex-start;
}

body.light-mode .infra-training-hero,
body.light-mode .infra-youth-hero,
body.light-mode .infra-analysis-hero,
body.light-mode .infra-training-panel {
    background:
        linear-gradient(160deg,
            color-mix(in srgb, var(--infra-accent) 10%, var(--card-bg)) 0%,
            var(--card-bg) 100%);
}

body.light-mode .infra-training-metric-card,
body.light-mode .infra-training-benefit-list>div,
body.light-mode .infra-training-staff-list>div {
    background: rgba(255, 255, 255, 0.72);
}

.infra-youth-hero-stage {
    display: grid;
    place-content: center;
    text-align: center;
    background:
        radial-gradient(circle at center, color-mix(in srgb, var(--infra-accent) 18%, transparent), transparent 58%),
        color-mix(in srgb, var(--infra-accent) 10%, var(--bg-secondary));
}

.infra-youth-hero-stage span {
    color: var(--text-muted);
    font-size: 0.8rem;
    font-weight: 900;
    text-transform: uppercase;
}

.infra-youth-hero-stage strong {
    color: var(--infra-accent);
    font-size: 2.4rem;
    line-height: 1.05;
}

.infra-lock-note {
    margin-bottom: 1.25rem;
    padding: 1rem 1.2rem;
    border: 1px solid rgba(214, 143, 52, 0.28);
    border-radius: 8px;
    background: linear-gradient(160deg, rgba(214, 143, 52, 0.1), rgba(214, 143, 52, 0.03));
}

.infra-lock-note div {
    margin-top: 0.35rem;
    color: var(--text-muted);
}

body.light-mode .infra-summary-metrics>div,
body.light-mode .infra-card-progress,
body.light-mode .infra-back-details,
body.light-mode .infra-back-info,
body.light-mode .infra-requirements-compact {
    background: rgba(255, 255, 255, 0.68);
}

body.light-mode .infra-summary-face {
    background:
        linear-gradient(180deg,
            color-mix(in srgb, var(--infra-accent) 14%, var(--card-bg)) 0%,
            color-mix(in srgb, var(--infra-accent) 7%, var(--card-bg)) 48%,
            var(--card-bg) 100%);
}

@media (max-width: 1180px) {
    .infra-overview-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .infra-training-hero,
    .infra-youth-hero,
    .infra-analysis-hero,
    .infra-training-grid {
        grid-template-columns: 1fr;
    }

    .infra-training-hero-media,
    .infra-youth-hero-media,
    .infra-analysis-hero-media {
        min-height: 15rem;
    }
}

@media (max-width: 680px) {
    .infra-overview-grid {
        grid-template-columns: 1fr;
    }

    .infra-summary-card {
        min-height: 32rem;
    }

    .infra-summary-metrics {
        flex-direction: column;
    }

    .infra-training-hero,
    .infra-youth-hero,
    .infra-analysis-hero {
        padding: 0.75rem;
    }

    .infra-training-hero-copy h2,
    .infra-youth-hero-copy h2,
    .infra-analysis-hero-copy h2 {
        font-size: 1.45rem;
    }

    .infra-training-metrics,
    .infra-training-upgrade-layout {
        grid-template-columns: 1fr;
    }

    .infra-training-quick-links .btn {
        flex: 1 1 12rem;
    }

    .infra-training-benefit-list>div,
    .infra-training-staff-list>div,
    .infra-training-upgrade .section-split {
        flex-direction: column;
        align-items: flex-start;
    }

    .infra-training-staff-list strong {
        text-align: left;
    }
}

.stadium-summary-link {
    color: var(--primary-color);
    font-size: 0.9rem;
}

.pending-upgrades-card {
    margin-top: 2rem;
    border-left: 4px solid var(--primary-color);
}

.pending-item {
    padding: 1rem;
    background: var(--bg-secondary);
    margin-top: 0.5rem;
    border-radius: 4px;
}

.pending-item-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.5rem;
}

.pending-item-title {
    display: block;
}

.pending-item-time {
    font-size: 0.9rem;
}

.pending-progress-badge {
    background: var(--primary-color);
    color: white;
    padding: 0.2rem 0.6rem;
    border-radius: 10px;
    font-size: 0.8rem;
}

.progress-track {
    height: 6px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 3px;
    overflow: hidden;
}

.progress-track-fill {
    height: 100%;
    background: var(--primary-color);
    transition: width 0.3s ease;
}

.stadium-stands-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.5rem;
}

.stand-option {
    background: var(--bg-secondary);
    padding: 0.75rem;
    border-radius: 4px;
}

.stand-option-title {
    font-size: 0.9rem;
}

.stand-option-level {
    font-size: 0.8rem;
    margin: 0.25rem 0;
}

.stand-option-max {
    font-size: 0.8rem;
}

.stadium-upgrade-btn {
    margin-top: 0.5rem;
    padding: 0.25rem 0.5rem;
    font-size: 0.8rem;
}

/* Youth Module */
.youth-tabs {
    margin-bottom: 1.5rem;
}

.youth-section-header {
    margin-bottom: 1rem;
}

.youth-overview-card {
    display: flex;
    justify-content: space-between;
    gap: 1.25rem;
    padding: 1.15rem;
    margin-bottom: 1rem;
    border-left: 3px solid rgba(var(--primary-color-rgb), 0.72);
    background:
        linear-gradient(135deg, rgba(var(--primary-color-rgb), 0.12), transparent 44%),
        var(--card-bg);
}

.youth-overview-main {
    min-width: 240px;
}

.youth-overview-main h3 {
    margin: 0.12rem 0 0;
}

.youth-overview-main p {
    max-width: 36rem;
    margin: 0.45rem 0 0;
    color: var(--text-muted);
    line-height: 1.5;
}

.youth-overview-metrics {
    align-self: stretch;
    min-width: min(100%, 520px);
}

.youth-tabs .tab-btn {
    gap: 0.35rem;
}

.youth-tabs .tab-btn span {
    color: var(--text-muted);
    font-size: 0.78rem;
    font-weight: 700;
}

.youth-layout-grid {
    display: grid;
    grid-template-columns: minmax(245px, 0.34fr) minmax(0, 1fr);
    gap: 1rem;
    align-items: start;
}

.youth-side-panel {
    display: grid;
    gap: 1rem;
}

.youth-main-panel {
    min-width: 0;
}

.youth-control-card,
.youth-player-panel {
    padding: 1rem;
}

.youth-focus-control {
    display: grid;
    gap: 0.55rem;
    margin-top: 0.9rem;
}

.youth-focus-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.youth-focus-row label {
    margin: 0;
    color: inherit;
    font-weight: 700;
}

.youth-focus-row select {
    width: auto;
    min-width: 170px;
    margin-left: auto;
}

.youth-focus-actions {
    display: flex;
    justify-content: flex-end;
}

.youth-table-desktop {
    min-width: 0;
}

.youth-player-card-list {
    display: none;
}

.youth-player-card {
    display: grid;
    gap: 0.8rem;
    padding: 0.9rem;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    background:
        linear-gradient(135deg, rgba(var(--primary-color-rgb), 0.08), transparent 52%),
        var(--bg-card);
}

.youth-player-card-head {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 0.75rem;
}

.youth-player-name {
    padding: 0;
    border: 0;
    background: none;
    color: var(--text-color);
    cursor: pointer;
    font: inherit;
    font-weight: 800;
    text-align: left;
}

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

.youth-player-card-grid div {
    display: grid;
    gap: 0.1rem;
    padding: 0.6rem;
    border: 1px solid rgba(var(--primary-color-rgb), 0.16);
    border-radius: 8px;
    background: rgba(var(--primary-color-rgb), 0.06);
}

.youth-player-card-grid span {
    color: var(--text-muted);
    font-size: 0.75rem;
}

.youth-player-card-grid strong {
    color: var(--text-color);
    font-size: 0.92rem;
    line-height: 1.2;
}

.youth-player-card-actions {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    min-height: 2rem;
}

.youth-standby-card {
    margin-top: 1rem;
}

/* Sponsor Module */
.sponsor-view {
    display: grid;
    gap: 1rem;
}

.sponsor-stack,
.sponsor-card,
.sponsor-offers {
    display: grid;
    gap: 1rem;
}

.sponsor-section-header {
    margin-bottom: 0;
}

.sponsor-overview-card {
    display: flex;
    justify-content: space-between;
    gap: 1.25rem;
    padding: 1.15rem;
    border-left: 3px solid rgba(var(--primary-color-rgb), 0.72);
    background:
        linear-gradient(135deg, rgba(var(--primary-color-rgb), 0.12), transparent 44%),
        var(--card-bg);
}

.sponsor-overview-main {
    min-width: 240px;
}

.sponsor-overview-main h3 {
    margin: 0.12rem 0 0;
}

.sponsor-overview-main p {
    max-width: 36rem;
    margin: 0.45rem 0 0;
    color: var(--text-muted);
    line-height: 1.5;
}

.sponsor-overview-metrics {
    align-self: stretch;
    min-width: min(100%, 520px);
}

.sponsor-tab-row {
    overflow-x: auto;
    padding-bottom: 0.25rem;
}

.sponsor-tab-btn {
    flex: 0 0 auto;
}

.sponsor-header {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    align-items: flex-start;
}

.sponsor-active,
.sponsor-offer,
.sponsor-empty {
    padding: 0.95rem 1rem;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    background:
        linear-gradient(135deg, rgba(var(--primary-color-rgb), 0.07), transparent 52%),
        var(--bg-card);
}

.sponsor-active {
    display: grid;
    gap: 0.45rem;
}

.sponsor-offer {
    display: grid;
    gap: 0.65rem;
}

.sponsor-empty {
    border-style: dashed;
    color: var(--text-muted);
}

.sponsor-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.55rem;
    color: var(--text-muted);
    font-size: 0.9rem;
}

.sponsor-meta span,
.sponsor-chip {
    display: inline-flex;
    align-items: center;
    min-height: 1.65rem;
    padding: 0.22rem 0.55rem;
    border: 1px solid rgba(var(--primary-color-rgb), 0.18);
    border-radius: 999px;
    background: rgba(var(--primary-color-rgb), 0.07);
}

.sponsor-bonus-list {
    display: grid;
    gap: 0.4rem;
    margin-top: 0.25rem;
}

.sponsor-bonus-row {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    padding: 0.45rem 0;
    border-top: 1px solid rgba(var(--primary-color-rgb), 0.12);
    font-size: 0.92rem;
}

.sponsor-bonus-row:first-child {
    border-top: 0;
}

.sponsor-bonus-row span {
    color: var(--text-muted);
}

.sponsor-bonus-row strong {
    text-align: right;
}

.sponsor-offers-head {
    display: grid;
    gap: 0.1rem;
    margin-top: 0.25rem;
}

.sponsor-offers-head h3 {
    margin: 0;
}

.sponsor-offer-actions {
    display: flex;
    justify-content: flex-end;
}

.sponsor-expectations {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 0.75rem;
    align-items: end;
    margin-top: 0.45rem;
}

.sponsor-expectations label {
    min-width: 0;
    display: grid;
    gap: 0.28rem;
    color: var(--text-muted);
    font-size: 0.84rem;
    font-weight: 700;
}

.sponsor-expectations select {
    width: 100%;
    min-height: 38px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 0.45rem 0.55rem;
    background: var(--bg-card);
    color: var(--text-color);
}

.sponsor-stepper {
    display: grid;
    grid-template-columns: 34px minmax(0, 1fr) 34px;
    width: 100%;
    min-width: 0;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    overflow: hidden;
    background: var(--bg-card);
}

.sponsor-stepper input {
    width: 100%;
    min-width: 0;
    height: 38px;
    border: 0;
    border-left: 1px solid var(--border-color);
    border-right: 1px solid var(--border-color);
    text-align: center;
    background: transparent;
    color: var(--text-color);
    font: inherit;
    appearance: textfield;
}

.sponsor-stepper input::-webkit-outer-spin-button,
.sponsor-stepper input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.sponsor-stepper button {
    width: 34px;
    height: 38px;
    border: 0;
    background: transparent;
    color: var(--text-color);
    cursor: pointer;
    font-weight: 800;
    font-size: 1rem;
    line-height: 1;
}

.sponsor-stepper button:hover {
    background: rgba(var(--primary-color-rgb), 0.1);
}

.stat-item-top-gap {
    margin-top: 1rem;
}

/* Training Module */
.module-tabs-spaced {
    margin-bottom: 1.5rem;
}

.training-section-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 1rem;
}

.training-header-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    justify-content: flex-end;
}

.btn-compact {
    min-height: 2.15rem;
    padding: 0.35rem 0.7rem;
    font-size: 0.82rem;
}

.layout-grid-main {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 2rem;
}

.card-stack-sm {
    margin-bottom: 1.5rem;
}

.metric-center {
    text-align: center;
    margin: 1rem 0;
}

.metric-value-lg {
    font-size: 2.5rem;
    font-weight: bold;
    color: var(--primary-color);
}

.metric-caption {
    font-size: 0.9rem;
    color: var(--text-muted);
}

.panel-muted {
    background: var(--bg-light);
    padding: 1rem;
    border-radius: 4px;
}

.panel-success {
    background: var(--success-bg, #1a3d1a);
    padding: 1rem;
    border-radius: 4px;
    text-align: center;
}

.panel-success-title {
    font-weight: bold;
    color: var(--success-color);
}

.stack-sm {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.section-split {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

.title-reset {
    margin: 0;
}

.weight-summary {
    font-size: 0.875rem;
}

.training-weights-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    margin-bottom: 2rem;
}

.weight-item {
    background: var(--bg-light);
    padding: 0.75rem;
    border-radius: 4px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.header-mobile-nav {
    display: none;
}

.mobile-menu-btn {
    display: inline-flex;
    flex-direction: column;
    justify-content: center;
    gap: 0.25rem;
    width: 2.75rem;
    height: 2.75rem;
    padding: 0;
    border: 1px solid rgba(255, 255, 255, 0.16);
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.04);
    cursor: pointer;
}

.mobile-menu-btn-line {
    width: 1.15rem;
    height: 2px;
    border-radius: 999px;
    background: #fff;
    margin: 0 auto;
}

.weight-item-label {
    font-weight: 500;
}

.inline-form-row {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.number-input-compact {
    width: 60px;
    padding: 0.2rem;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    background: var(--bg-card);
    color: var(--text-color);
    text-align: right;
}

.section-divider-top {
    border-top: 1px solid var(--border-color);
    padding-top: 1.5rem;
}

.template-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 0.75rem;
    margin-top: 1rem;
}

.range-input-full {
    width: 100%;
    margin: 1rem 0;
}

.metric-inline-strong {
    text-align: center;
    font-weight: bold;
}

.help-text-sm {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-top: 0.5rem;
}

.help-text-md {
    font-size: 0.9rem;
    color: var(--text-muted);
    margin-bottom: 1.5rem;
}

.training-plan-view {
    display: grid;
    gap: 1rem;
}

.training-empty-card {
    padding: 1.25rem;
}

.training-empty-card p {
    color: var(--text-muted);
    margin: 0.5rem 0 0;
}

.training-empty-meta {
    display: grid;
    gap: 0.15rem;
    margin-top: 1rem;
    padding: 1rem;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    background: rgba(var(--primary-color-rgb), 0.07);
}

.training-empty-meta span,
.training-empty-meta small {
    color: var(--text-muted);
}

.training-empty-meta strong {
    font-size: 1.75rem;
    line-height: 1;
    color: var(--primary-color);
}

.training-overview-card {
    display: flex;
    justify-content: space-between;
    gap: 1.25rem;
    padding: 1.15rem;
    border-left: 3px solid rgba(var(--primary-color-rgb), 0.72);
    background:
        linear-gradient(135deg, rgba(var(--primary-color-rgb), 0.12), transparent 44%),
        var(--card-bg);
}

.training-overview-main {
    min-width: 220px;
}

.training-template-intro {
    max-width: 54rem;
    margin: 0.45rem 0 0;
    color: var(--text-muted);
    line-height: 1.5;
}

.training-overview-main h3,
.training-card-head h3 {
    margin: 0.12rem 0 0;
}

.training-chip-row {
    display: flex;
    flex-wrap: wrap;
    gap: 0.45rem;
    margin-top: 0.8rem;
}

.training-chip {
    display: inline-flex;
    align-items: center;
    min-height: 1.75rem;
    padding: 0.25rem 0.6rem;
    border: 1px solid rgba(var(--primary-color-rgb), 0.28);
    border-radius: 999px;
    background: rgba(var(--primary-color-rgb), 0.1);
    color: var(--text-color);
    font-size: 0.78rem;
    font-weight: 700;
}

.training-overview-metrics,
.training-quality-list {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 0.55rem;
}

.training-quality-list {
    grid-template-columns: 1fr;
}

.training-metric {
    display: grid;
    gap: 0.12rem;
    min-width: 0;
    padding: 0.65rem;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.035);
}

.training-metric span,
.training-metric small {
    color: var(--text-muted);
    font-size: 0.76rem;
}

.training-metric strong {
    color: var(--text-color);
    font-size: 1.05rem;
    line-height: 1.15;
}

.training-plan-grid {
    display: grid;
    grid-template-columns: minmax(245px, 0.36fr) minmax(0, 1fr);
    gap: 1rem;
    align-items: start;
}

.training-side-panel {
    display: grid;
    gap: 1rem;
}

.training-control-card,
.training-assignment-card {
    padding: 1rem;
}

.training-card-head {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 0.75rem;
    margin-bottom: 0.85rem;
}

.training-intensity-current {
    margin-top: 0.75rem;
}

.btn-full-width {
    width: 100%;
}

.list-scroll-md {
    max-height: 600px;
    overflow-y: auto;
}

.training-assignment-table thead th {
    position: sticky;
    top: 0;
    z-index: 1;
    background: #1f242b;
    color: var(--text-color);
    border-bottom: 1px solid var(--border-color);
}

.training-assignment-table td {
    vertical-align: middle;
}

.training-assignment-table td:first-child {
    min-width: 160px;
}

.training-assignment-table td:first-child small {
    display: block;
    margin-top: 0.15rem;
    color: var(--text-muted);
    font-size: 0.76rem;
}

.training-player-card-list,
.training-history-card-list {
    display: none;
}

.training-player-card,
.training-history-player-card {
    display: grid;
    gap: 0.75rem;
    padding: 0.85rem;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.035);
}

.training-player-card-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 0.75rem;
}

.training-player-card-head strong {
    display: block;
}

.training-player-card-head small,
.training-player-card-field span,
.training-player-card-meta span,
.training-history-week-card span {
    color: var(--text-muted);
    font-size: 0.78rem;
}

.training-player-card-meta,
.training-player-card-field {
    display: grid;
    gap: 0.35rem;
}

.training-history-week-list {
    display: grid;
    gap: 0.45rem;
}

.training-history-week-card {
    display: grid;
    gap: 0.15rem;
    padding: 0.55rem;
    border-radius: 7px;
    background: rgba(255, 255, 255, 0.04);
}

.training-history-week-card.is-empty {
    opacity: 0.75;
}

.training-fitness-cell {
    white-space: nowrap;
}

.training-fitness-cell .fitness-status {
    font-weight: 700;
}

.training-fitness-cell .fitness-status small {
    color: var(--text-muted);
    font-weight: 600;
}

.select-dark {
    width: 100%;
    padding: 0.4rem;
    border-radius: 4px;
    border: 1px solid var(--border-color);
    background: #2a2a2a;
    color: #ffffff;
    cursor: pointer;
}

.select-dark option {
    background: #2a2a2a;
    color: #ffffff;
}

.option-highlight {
    font-weight: bold;
}

body.light-mode .training-assignment-table thead th {
    background: linear-gradient(180deg, #f7f9fc 0%, #edf2f7 100%);
    color: #223043;
    border-bottom: 1px solid #d7e0ea;
}

body.light-mode .select-dark {
    background: #ffffff;
    color: #223043;
    border-color: #cfd8e3;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.05);
}

body.light-mode .select-dark option,
body.light-mode .select-dark optgroup {
    background: #ffffff;
    color: #223043;
}

body.light-mode .training-overview-card {
    background:
        linear-gradient(135deg, rgba(var(--primary-color-rgb), 0.1), transparent 46%),
        #ffffff;
}

body.light-mode .training-metric {
    background: rgba(15, 23, 42, 0.035);
    border-color: rgba(15, 23, 42, 0.08);
}

body.light-mode .training-player-card,
body.light-mode .training-history-player-card,
body.light-mode .training-history-week-card {
    background: rgba(15, 23, 42, 0.035);
}

.player-intensity-row {
    display: grid;
    gap: 0.5rem;
    min-width: 185px;
}

.player-intensity-control {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
    flex-grow: 1;
}

.player-intensity-select {
    flex-grow: 1;
}

.player-intensity-display {
    font-size: 0.8rem;
    min-width: 120px;
    color: var(--text-muted);
}

.player-intensity-standard {
    font-size: 0.8rem;
    color: var(--text-muted);
}

.training-template-view,
.training-history-view {
    display: grid;
    gap: 1rem;
}

.training-template-grid {
    display: grid;
    grid-template-columns: minmax(245px, 0.34fr) minmax(0, 1fr);
    gap: 1rem;
    align-items: start;
}

.training-template-category-list {
    display: grid;
    gap: 0.55rem;
}

.training-template-editor-card,
.training-history-card {
    padding: 1rem;
}

.training-weight-status {
    display: inline-flex;
    margin-top: 0.35rem;
    font-weight: 700;
}

.training-weight-status.is-valid {
    color: var(--success-color);
}

.training-weight-status.is-invalid {
    color: var(--error-color);
}

.training-weight-card {
    border-radius: 8px;
}

.training-template-picker {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid var(--border-color);
}

.training-template-button-grid {
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
}

.training-unlock-note {
    display: grid;
    gap: 0.25rem;
    padding: 0.8rem;
    border: 1px solid rgba(var(--primary-color-rgb), 0.22);
    border-radius: 8px;
    background: rgba(var(--primary-color-rgb), 0.08);
}

.training-unlock-note span,
.training-info-note p {
    color: var(--text-muted);
}

.training-unlock-note.is-complete {
    border-color: rgba(76, 175, 80, 0.28);
    background: rgba(76, 175, 80, 0.08);
}

.training-history-table {
    min-width: 760px;
}

.training-history-table td:first-child {
    min-width: 170px;
}

.training-history-table td:first-child small {
    display: inline-flex;
    margin-top: 0.25rem;
}

.training-info-note {
    display: grid;
    gap: 0.25rem;
    margin-top: 1rem;
    padding: 0.9rem;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.035);
}

.training-info-note p {
    margin: 0;
}

.history-cell {
    min-height: 2.2rem;
    padding: 0.35rem 0.5rem;
    border-radius: 7px;
    background: rgba(255, 255, 255, 0.04);
}

body.light-mode .training-info-note,
body.light-mode .history-cell {
    background: rgba(15, 23, 42, 0.035);
}

@media (max-width: 980px) {

    .training-overview-card,
    .youth-overview-card,
    .sponsor-overview-card {
        flex-direction: column;
    }

    .training-overview-metrics,
    .youth-overview-metrics,
    .sponsor-overview-metrics {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .training-plan-grid,
    .youth-layout-grid {
        grid-template-columns: 1fr;
    }

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

@media (max-width: 720px) {
    .training-section-header {
        flex-direction: column;
        align-items: stretch;
    }

    .training-header-actions {
        justify-content: flex-start;
    }

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

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

    .training-assignment-card {
        padding: 0.85rem;
    }

    .player-training-list,
    .history-list {
        display: none;
    }

    .training-player-card-list,
    .training-history-card-list {
        display: grid;
        gap: 0.75rem;
    }

    .training-template-editor-card,
    .training-history-card {
        padding: 0.85rem;
    }

    .training-weights-grid {
        grid-template-columns: 1fr;
    }

    .youth-overview-metrics {
        grid-template-columns: 1fr;
        min-width: 0;
    }

    .sponsor-overview-metrics {
        grid-template-columns: 1fr;
        min-width: 0;
    }

    .youth-tabs {
        overflow-x: auto;
        padding-bottom: 0.25rem;
    }

    .youth-tabs .tab-btn {
        flex: 0 0 auto;
    }

    .youth-control-card,
    .youth-player-panel {
        padding: 0.85rem;
    }

    .youth-table-desktop {
        display: none;
    }

    .youth-player-card-list {
        display: grid;
        gap: 0.75rem;
    }

    .youth-focus-row {
        align-items: stretch;
    }

    .youth-focus-row select {
        width: 100%;
        margin-left: 0;
    }

    .youth-focus-actions {
        justify-content: flex-start;
    }

    .sponsor-card,
    .sponsor-active,
    .sponsor-offer,
    .sponsor-empty {
        padding: 0.85rem;
    }

    .sponsor-bonus-row,
    .sponsor-offer-actions {
        flex-direction: column;
        align-items: stretch;
    }

    .sponsor-bonus-row strong {
        text-align: left;
    }

    .sponsor-expectations {
        grid-template-columns: 1fr;
    }

}

.template-category-btn {
    padding: 0.75rem 1rem;
    text-align: left;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.template-category-btn.is-locked {
    opacity: 0.5;
    cursor: not-allowed;
}

.template-select-btn.active {
    border-color: var(--primary-color);
    background: rgba(var(--primary-color-rgb), 0.12);
    color: #ffffff;
    box-shadow: inset 0 0 0 1px rgba(var(--primary-color-rgb), 0.28);
}

.template-category-title {
    font-weight: bold;
}

.template-category-desc {
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-top: 0.25rem;
}

.template-category-state {
    font-size: 1.2rem;
}

.info-box {
    margin-top: 2rem;
    padding: 1rem;
    background: var(--bg-light);
    border-radius: 4px;
}

.info-box-title {
    margin-top: 0;
}

.history-cell {
    font-size: 0.85rem;
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.empty-inline-note {
    padding: 1rem;
    text-align: center;
    color: var(--text-muted);
}

.locked-note {
    padding: 2rem;
    text-align: center;
    color: var(--text-muted);
}

.locked-note-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.locked-note-title {
    font-size: 1.1rem;
    font-weight: bold;
    margin-bottom: 0.5rem;
}

/* Tactic Module */
.tactic-analysis-card {
    margin-bottom: 2rem;
}

.opponent-scout-card {
    position: relative;
    overflow: hidden;
    padding: 1rem;
    border-radius: 8px;
    border-left: 3px solid rgba(var(--primary-color-rgb), 0.75);
    background:
        linear-gradient(135deg, rgba(var(--primary-color-rgb), 0.12), transparent 42%),
        var(--card-bg);
}

.opponent-scout-header,
.opponent-scout-hero,
.opponent-timeline-row {
    display: flex;
    align-items: center;
    gap: 0.85rem;
}

.opponent-scout-header {
    justify-content: space-between;
    margin-bottom: 0.9rem;
}

.opponent-scout-header h3 {
    margin: 0.1rem 0 0;
}

.opponent-scout-hero {
    align-items: stretch;
    padding: 0.9rem;
    border: 1px solid rgba(255, 255, 255, 0.09);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.035);
}

.opponent-crest {
    width: 54px;
    min-width: 54px;
    height: 54px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    border: 1px solid rgba(var(--primary-color-rgb), 0.45);
    background: rgba(var(--primary-color-rgb), 0.16);
    color: var(--text-color);
    font-weight: 800;
}

.opponent-scout-main {
    min-width: 0;
    flex: 1;
}

.opponent-scout-label,
.opponent-history-title {
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--text-muted);
    font-weight: 700;
}

.opponent-scout-name {
    margin-top: 0.15rem;
    font-size: 1.2rem;
    font-weight: 800;
}

.opponent-chip-row,
.opponent-form-strip {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
    margin-top: 0.55rem;
}

.opponent-chip,
.opponent-formation-pill {
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 999px;
    padding: 0.18rem 0.55rem;
    font-size: 0.78rem;
    color: var(--text-muted);
    background: rgba(255, 255, 255, 0.04);
    white-space: nowrap;
}

.opponent-scout-metrics {
    display: grid;
    grid-template-columns: repeat(3, minmax(64px, 1fr));
    gap: 0.45rem;
    min-width: 230px;
}

.opponent-scout-metrics div {
    display: grid;
    gap: 0.15rem;
    padding: 0.55rem;
    border-radius: 7px;
    background: rgba(0, 0, 0, 0.16);
}

.opponent-scout-metrics span {
    font-size: 0.72rem;
    color: var(--text-muted);
}

.opponent-scout-metrics strong {
    font-size: 1rem;
}

.opponent-history {
    display: grid;
    gap: 0.8rem;
    margin-top: 0.9rem;
}

.opponent-history-group,
.opponent-timeline {
    display: grid;
    gap: 0.45rem;
}

.opponent-timeline-row {
    min-height: 44px;
    padding: 0.45rem 0.55rem;
    border-radius: 7px;
    border: 1px solid rgba(255, 255, 255, 0.075);
    background: rgba(255, 255, 255, 0.025);
}

.opponent-week {
    width: 2.5rem;
    color: var(--text-muted);
    font-size: 0.78rem;
    font-weight: 700;
}

.opponent-result-badge,
.opponent-form-dot {
    display: inline-grid;
    place-items: center;
    width: 1.65rem;
    height: 1.65rem;
    border-radius: 50%;
    font-size: 0.74rem;
    font-weight: 800;
}

.opponent-result-badge.is-win,
.opponent-form-dot.is-win {
    background: rgba(34, 197, 94, 0.17);
    color: #57d98a;
}

.opponent-result-badge.is-draw,
.opponent-form-dot.is-draw {
    background: rgba(148, 163, 184, 0.18);
    color: #cbd5e1;
}

.opponent-result-badge.is-loss,
.opponent-form-dot.is-loss {
    background: rgba(239, 68, 68, 0.18);
    color: #ff8d8d;
}

.opponent-result-badge.is-neutral,
.opponent-form-dot.is-neutral {
    background: rgba(var(--primary-color-rgb), 0.14);
    color: var(--text-muted);
}

.opponent-match-summary {
    min-width: 0;
    flex: 1;
    display: grid;
    gap: 0.05rem;
}

.opponent-match-summary span {
    color: var(--text-muted);
    font-size: 0.82rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.opponent-empty-note {
    margin-top: 0.85rem;
    color: var(--text-muted);
    font-size: 0.9rem;
}

body.light-mode .opponent-scout-card {
    background:
        linear-gradient(135deg, rgba(var(--primary-color-rgb), 0.1), transparent 42%),
        rgba(255, 255, 255, 0.88);
}

body.light-mode .opponent-scout-hero,
body.light-mode .opponent-timeline-row {
    border-color: rgba(31, 41, 55, 0.08);
    background: rgba(255, 255, 255, 0.72);
}

body.light-mode .opponent-scout-metrics div {
    background: rgba(31, 41, 55, 0.045);
}

@media (max-width: 760px) {

    .opponent-scout-header,
    .opponent-scout-hero,
    .opponent-timeline-row {
        align-items: stretch;
    }

    .opponent-scout-header,
    .opponent-scout-hero {
        flex-direction: column;
    }

    .opponent-scout-metrics {
        min-width: 0;
        width: 100%;
    }

    .opponent-timeline-row {
        display: grid;
        grid-template-columns: auto auto 1fr;
    }

    .opponent-formation-pill,
    .opponent-timeline-row .opponent-match-link {
        grid-column: 3;
        justify-self: start;
    }

    .opponent-match-summary span {
        white-space: normal;
    }
}

.layout-grid-two-equal {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
}

.analysis-layout {
    display: flex;
    gap: 1rem;
    align-items: flex-start;
}

.analysis-sidebar {
    flex: 0 0 200px;
}

.analysis-main {
    flex: 1;
}

.form-label-sm {
    font-size: 0.85rem;
}

.label-block {
    display: block;
    margin-bottom: 0.5rem;
}

.select-full {
    width: 100%;
}

.analysis-result {
    min-height: 120px;
}

.placeholder-muted {
    opacity: 0.6;
    text-align: center;
    padding: 2rem;
}

.formation-selector-block {
    margin-bottom: 1.5rem;
}

.select-formation {
    padding: 0.5rem;
    width: 100%;
    max-width: 200px;
}

.subtle-caption {
    font-size: 0.65rem;
    opacity: 0.6;
    margin-top: 0.25rem;
}

.lineup-list,
.bench-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.lineup-list {
    margin-bottom: 1rem;
}

.tactic-slot-card .preference-row {
    align-items: flex-start;
    gap: 0.75rem;
}

.lineup-workspace {
    display: grid;
    gap: 1rem;
}

.lineup-matchday-header {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 1rem;
    padding: 1rem;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    background: linear-gradient(135deg, rgba(var(--primary-color-rgb), 0.12), rgba(255, 255, 255, 0.035));
}

.lineup-matchday-header h3 {
    margin: 0.15rem 0 0;
    color: var(--text-color);
    font-size: 1.12rem;
}

.lineup-eyebrow {
    color: var(--text-muted);
    font-size: 0.72rem;
    font-weight: 900;
    letter-spacing: 0;
    text-transform: uppercase;
}

.lineup-status-bar {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.lineup-status-pill {
    display: grid;
    gap: 0.08rem;
    min-width: 74px;
    padding: 0.45rem 0.58rem;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    background: rgba(0, 0, 0, 0.08);
}

.lineup-status-pill span {
    color: var(--text-muted);
    font-size: 0.68rem;
    font-weight: 800;
}

.lineup-status-pill strong {
    color: var(--text-color);
    font-size: 0.9rem;
}

.lineup-status-pill.is-ok {
    border-color: rgba(34, 197, 94, 0.35);
    background: rgba(34, 197, 94, 0.09);
}

.lineup-status-pill.is-warn {
    border-color: rgba(245, 158, 11, 0.42);
    background: rgba(245, 158, 11, 0.1);
}

.lineup-workspace-grid {
    display: grid;
    grid-template-columns: minmax(360px, 1.08fr) minmax(330px, 0.92fr);
    gap: 1rem;
    align-items: start;
}

.lineup-pitch-panel,
.lineup-side-panel {
    border: 1px solid var(--border-color);
    border-radius: 8px;
    background: var(--card-bg);
}

.lineup-pitch-panel {
    display: grid;
    gap: 1rem;
    padding: 1rem;
}

.lineup-toolbar {
    display: grid;
    grid-template-columns: minmax(220px, 1fr) minmax(190px, 0.72fr);
    gap: 0.85rem;
    align-items: start;
}

.lineup-preset-control,
.lineup-formation-control {
    display: grid;
    gap: 0.45rem;
    align-items: start;
    margin-bottom: 0;
}

.lineup-preset-buttons {
    display: flex;
    gap: 0.45rem;
    flex-wrap: wrap;
}

.lineup-formation-control .select-formation {
    max-width: none;
}

.lineup-pitch-area {
    min-width: 0;
}

.lineup-pitch-board {
    position: relative;
    width: 100%;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 8px;
    background: #285c38;
    box-shadow: inset 0 0 0 2px rgba(255, 255, 255, 0.05), 0 18px 40px rgba(0, 0, 0, 0.16);
}

.pitch-slot-marker {
    position: absolute;
    width: 116px;
    transform: translate(-50%, -50%);
    text-align: center;
    cursor: pointer;
    transition: transform 160ms ease, filter 160ms ease;
}

.pitch-slot-marker:hover,
.pitch-slot-marker:focus-visible {
    filter: brightness(1.08);
    outline: none;
    transform: translate(-50%, -50%) scale(1.04);
}

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

.lineup-action-row .btn {
    width: 100%;
    justify-content: center;
}

.lineup-side-panel {
    display: grid;
    gap: 0;
    overflow: hidden;
}

.lineup-side-section {
    display: grid;
    gap: 0.85rem;
    padding: 1rem;
    border-bottom: 1px solid var(--border-color);
}

.lineup-side-section:last-child {
    border-bottom: 0;
}

.lineup-section-head {
    display: grid;
    gap: 0.18rem;
}

.lineup-section-head h3 {
    margin: 0;
    color: var(--text-color);
    font-size: 0.98rem;
}

.lineup-section-head p {
    margin: 0;
    color: var(--text-muted);
    font-size: 0.78rem;
    line-height: 1.35;
}

.lineup-side-section .preference-card,
.lineup-side-section .position-row {
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.035);
}

body.light-mode .lineup-matchday-header {
    background: linear-gradient(135deg, rgba(var(--primary-color-rgb), 0.1), rgba(255, 255, 255, 0.78));
}

body.light-mode .lineup-status-pill,
body.light-mode .lineup-side-section .preference-card,
body.light-mode .lineup-side-section .position-row {
    background: rgba(255, 255, 255, 0.78);
}

@media (max-width: 1180px) {
    .lineup-workspace-grid {
        grid-template-columns: 1fr;
    }

    .lineup-side-panel {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 720px) {
    .lineup-matchday-header {
        align-items: stretch;
        flex-direction: column;
    }

    .lineup-status-bar {
        justify-content: stretch;
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .lineup-toolbar,
    .lineup-action-row {
        grid-template-columns: 1fr;
    }

    .pitch-slot-marker {
        width: 86px;
        font-size: 0.86rem;
    }
}

.real-value-btn {
    width: 34px;
    height: 30px;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    background: rgba(var(--primary-color-rgb), 0.08);
    color: var(--text-color);
    font-size: 0.72rem;
    font-weight: 800;
    line-height: 1;
    cursor: pointer;
    flex: 0 0 auto;
}

.real-value-btn:hover,
.real-value-btn:focus-visible {
    border-color: var(--primary-color);
    color: var(--primary-color);
    outline: none;
}

.real-value-modal {
    width: min(920px, calc(100vw - 2rem));
    max-height: 86vh;
    overflow-y: auto;
    padding: 1.5rem;
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    color: var(--text-color);
}

.real-value-modal-head,
.real-value-select-row,
.real-value-header-grid,
.real-value-row,
.real-value-bar-meta,
.real-value-legend {
    display: flex;
    align-items: center;
}

.real-value-modal-head,
.real-value-select-row,
.real-value-bar-meta,
.real-value-legend {
    justify-content: space-between;
}

.real-value-close {
    width: 32px;
    height: 32px;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    background: var(--bg-color);
    color: var(--text-muted);
    cursor: pointer;
}

.real-value-close:hover,
.real-value-close:focus-visible {
    color: var(--text-color);
    border-color: var(--primary-color);
    outline: none;
}

.real-value-select-row {
    gap: 1rem;
    padding: 0.85rem 0;
    border-top: 1px solid var(--border-color);
    border-bottom: 1px solid var(--border-color);
}

.real-value-select {
    max-width: 320px;
}

.real-value-slot-label {
    margin-left: 0.5rem;
    font-weight: 700;
}

.real-value-header-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 48px minmax(0, 1fr);
    gap: 0.75rem;
    margin: 1rem 0;
}

.real-value-player {
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 0.85rem;
    background: var(--bg-color);
}

.real-value-player.is-a {
    border-left: 4px solid var(--secondary-color);
}

.real-value-player.is-b {
    border-left: 4px solid var(--primary-color);
}

.real-value-player-name {
    font-weight: 800;
    color: var(--text-color);
}

.real-value-player-meta,
.real-value-base,
.real-value-legend {
    color: var(--text-muted);
}

.real-value-vs {
    display: grid;
    place-items: center;
    font-weight: 900;
    color: var(--text-muted);
}

.real-value-rows {
    display: grid;
    gap: 1rem;
    margin-bottom: 1rem;
}

.real-value-competency-block {
    display: grid;
    gap: 0.55rem;
    padding: 0.85rem;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    background: rgba(0, 0, 0, 0.08);
}

.real-value-competency-title {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 1rem;
    padding-bottom: 0.4rem;
    border-bottom: 1px solid var(--border-color);
}

.real-value-competency-title span {
    font-weight: 800;
}

.real-value-competency-title small {
    color: var(--text-muted);
    font-size: 0.72rem;
    font-weight: 600;
}

.real-value-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 150px minmax(0, 1fr);
    gap: 1rem;
}

.real-value-subrow {
    align-items: center;
}

.real-value-subrow.is-sporttest {
    padding: 0.45rem;
    border-radius: 6px;
    background: rgba(var(--primary-color-rgb), 0.07);
}

.real-value-subrow.is-sporttest .real-value-bar-track {
    height: 18px;
}

.real-value-subrow.is-sporttest .real-value-attr-label span {
    font-size: 0.94rem;
}

.real-value-subrow.is-analysis {
    opacity: 0.78;
}

.real-value-subrow.is-uncertain {
    opacity: 0.58;
}

.real-value-attr-label {
    align-self: center;
    text-align: center;
    font-weight: 700;
    font-size: 0.86rem;
}

.real-value-attr-label span,
.real-value-attr-label small {
    display: block;
}

.real-value-attr-label small {
    margin-top: 0.2rem;
    color: var(--text-muted);
    font-size: 0.68rem;
    font-weight: 600;
}

.real-value-bar-cell {
    display: grid;
    gap: 0.35rem;
}

.real-value-bar-meta {
    font-size: 0.78rem;
    font-weight: 800;
}

.real-value-bar-empty {
    min-height: 32px;
    display: grid;
    place-items: center;
    color: var(--text-muted);
    font-size: 0.78rem;
}

.real-value-loss {
    color: #f97316;
    font-weight: 800;
}

.real-value-bar-track {
    position: relative;
    height: 14px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.08);
    overflow: hidden;
}

.real-value-bar-potential,
.real-value-bar-actual {
    position: absolute;
    inset: 0 auto 0 0;
    border-radius: inherit;
}

.real-value-bar-potential {
    background: #d4d4d8;
    opacity: 0.5;
}

.real-value-bar-actual {
    background: var(--secondary-color);
}

.real-value-bar-cell.is-b .real-value-bar-actual {
    background: var(--primary-color);
}

.real-value-bar-cell.is-neutral .real-value-bar-actual,
.real-value-bar-cell.is-uncertain .real-value-bar-actual {
    background: #9ca3af;
}

.real-value-bar-cell.is-uncertain .real-value-bar-potential {
    opacity: 0.28;
}

.real-value-legend {
    gap: 1rem;
    flex-wrap: wrap;
    margin-bottom: 1rem;
    font-size: 0.78rem;
}

.real-value-legend span {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
}

.real-value-legend i {
    width: 28px;
    height: 8px;
    border-radius: 999px;
    display: inline-block;
}

.real-value-legend-potential {
    background: #d4d4d8;
    opacity: 0.5;
}

.real-value-legend-actual {
    background: linear-gradient(90deg, var(--secondary-color), var(--primary-color));
}

.button-pair {
    display: flex;
    gap: 0.5rem;
}

.button-slot {
    flex: 1;
}

.stack-lg {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

@media (max-width: 540px) {
    .layout-grid-two-equal {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .analysis-layout {
        flex-direction: column;
    }

    .analysis-sidebar {
        flex: 1 1 auto;
        width: 100%;
    }

    .button-pair {
        flex-direction: column;
    }

    .select-formation {
        max-width: none;
    }

    .real-value-modal {
        padding: 1rem;
    }

    .real-value-select-row,
    .real-value-modal-head {
        align-items: flex-start;
    }

    .real-value-select-row {
        flex-direction: column;
    }

    .real-value-select {
        max-width: none;
        width: 100%;
    }

    .real-value-header-grid {
        grid-template-columns: 1fr;
    }

    .real-value-vs {
        min-height: 24px;
    }

    .real-value-row {
        grid-template-columns: 1fr;
        gap: 0.4rem;
    }

    .real-value-competency-title {
        flex-direction: column;
        gap: 0.15rem;
    }

    .real-value-attr-label {
        order: -1;
        text-align: left;
    }
}

.card-padded-center {
    text-align: center;
    padding: 3rem;
}

.card-muted-title {
    color: var(--text-muted);
}

.coach-card {
    background: var(--bg-color);
    border: 1px solid var(--border-color);
    padding: 1rem;
    border-radius: 4px;
}

.coach-name {
    font-weight: bold;
    font-size: 1.1rem;
    margin-bottom: 0.5rem;
}

.coach-meta {
    font-size: 0.85rem;
    opacity: 0.7;
    margin-bottom: 0.75rem;
}

.coach-divider {
    padding-top: 0.75rem;
    border-top: 1px solid var(--border-color);
}

.coach-training-actions {
    margin-top: 1rem;
}

.preference-stack {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    margin-bottom: 2rem;
}

.preference-card {
    background: var(--bg-color);
    border: 1px solid var(--border-color);
    padding: 0.75rem;
    border-radius: 4px;
}

.preference-row {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 1rem;
}

.preference-title {
    font-size: 0.85rem;
    font-weight: bold;
}

.preference-desc {
    font-size: 0.7rem;
    opacity: 0.7;
}

.position-row-tight {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.slot-badge {
    width: 40px;
    text-align: center;
}

.slot-select {
    flex: 1;
}

.module-tabs-top {
    margin-top: 1rem;
}

.coach-save-actions {
    margin-top: 1.5rem;
}

.coach-matchplan-card {
    position: relative;
    overflow: hidden;
    display: grid;
    gap: 1rem;
    box-sizing: border-box;
    max-width: 100%;
    padding: 1rem;
    border-left: 3px solid rgba(var(--primary-color-rgb), 0.78);
    background:
        linear-gradient(135deg, rgba(var(--primary-color-rgb), 0.11), transparent 34%),
        linear-gradient(180deg, rgba(255, 255, 255, 0.055), rgba(255, 255, 255, 0.025));
}

.coach-profile-hidden .coach-matchplan-card {
    width: 100%;
}

.coach-matchplan-card::before {
    content: "";
    position: absolute;
    inset: 0;
    pointer-events: none;
    opacity: 0.16;
    background:
        radial-gradient(circle at 82% 18%, rgba(255, 255, 255, 0.9) 0 2px, transparent 3px),
        radial-gradient(circle at 74% 40%, rgba(255, 255, 255, 0.75) 0 2px, transparent 3px),
        radial-gradient(circle at 90% 62%, rgba(255, 255, 255, 0.75) 0 2px, transparent 3px),
        linear-gradient(140deg, transparent 67%, rgba(255, 255, 255, 0.45) 68%, transparent 70%),
        linear-gradient(28deg, transparent 72%, rgba(255, 255, 255, 0.38) 73%, transparent 75%);
}

.coach-matchplan-card>* {
    position: relative;
    z-index: 1;
}

.coach-matchplan-card>h3:first-child,
.coach-matchplan-card h3.button-row-top {
    margin: 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
}

.coach-matchplan-card>h3:first-child::after {
    content: "Matchplan";
    padding: 0.28rem 0.55rem;
    border: 1px solid rgba(var(--primary-color-rgb), 0.35);
    border-radius: 999px;
    color: var(--primary-color);
    font-size: 0.72rem;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 0;
}

.coach-matchplan-card .coach-meta {
    max-width: 680px;
    margin-bottom: 0;
    opacity: 1;
    color: var(--text-muted);
    line-height: 1.45;
}

.coach-matchplan-card .preference-stack {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
    gap: 0.75rem;
    min-width: 0;
}

.coach-matchplan-card .preference-card {
    position: relative;
    min-height: 124px;
    padding: 0.9rem;
    border: 1px solid rgba(255, 255, 255, 0.09);
    border-radius: 8px;
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.065), rgba(255, 255, 255, 0.028));
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05);
    transition: border-color 160ms ease, transform 160ms ease, background 160ms ease;
    min-width: 0;
}

.coach-matchplan-card .preference-card::before {
    content: "";
    position: absolute;
    left: 0.9rem;
    right: 0.9rem;
    top: 0.7rem;
    height: 2px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.14);
}

.coach-matchplan-card .preference-card:has(input:checked) {
    border-color: rgba(var(--primary-color-rgb), 0.55);
    background:
        linear-gradient(180deg, rgba(var(--primary-color-rgb), 0.16), rgba(255, 255, 255, 0.035));
}

.coach-matchplan-card .preference-card:hover {
    transform: translateY(-1px);
}

.coach-matchplan-card .preference-row {
    min-height: 100%;
    gap: 0.85rem;
    align-items: flex-start;
}

.coach-matchplan-card .preference-title {
    margin-top: 0.4rem;
    padding-right: 0.35rem;
    color: var(--text-color);
    font-size: 0.95rem;
    line-height: 1.25;
}

.coach-matchplan-card .preference-desc {
    margin-top: 0.35rem;
    color: var(--text-muted);
    font-size: 0.82rem;
    line-height: 1.42;
    opacity: 1;
}

.coach-matchplan-card input[type="checkbox"] {
    width: 42px;
    height: 24px;
    flex: 0 0 auto;
    appearance: none;
    border: 1px solid rgba(255, 255, 255, 0.22);
    border-radius: 999px;
    background: rgba(0, 0, 0, 0.22);
    cursor: pointer;
    position: relative;
    margin-top: 0.35rem;
}

.coach-matchplan-card input[type="checkbox"]::after {
    content: "";
    position: absolute;
    top: 3px;
    left: 3px;
    width: 16px;
    height: 16px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.72);
    transition: transform 160ms ease, background 160ms ease;
}

.coach-matchplan-card input[type="checkbox"]:checked {
    border-color: rgba(var(--primary-color-rgb), 0.85);
    background: rgba(var(--primary-color-rgb), 0.45);
}

.coach-matchplan-card input[type="checkbox"]:checked::after {
    transform: translateX(18px);
    background: #ffffff;
}

.coach-matchplan-card .coach-save-actions {
    display: flex;
    justify-content: flex-end;
    margin-top: 0.25rem;
}

body.light-mode .coach-matchplan-card {
    border-color: rgba(31, 41, 55, 0.08);
    border-left-color: rgba(var(--primary-color-rgb), 0.78);
    background:
        linear-gradient(135deg, rgba(var(--primary-color-rgb), 0.12), transparent 34%),
        rgba(255, 255, 255, 0.82);
}

body.light-mode .coach-matchplan-card .preference-card {
    border-color: rgba(31, 41, 55, 0.08);
    background: rgba(255, 255, 255, 0.72);
}

body.light-mode .coach-matchplan-card .preference-card:has(input:checked) {
    border-color: rgba(var(--primary-color-rgb), 0.55);
    background: rgba(var(--primary-color-rgb), 0.1);
}

body.light-mode .coach-matchplan-card input[type="checkbox"] {
    border-color: rgba(31, 41, 55, 0.18);
    background: rgba(31, 41, 55, 0.08);
}

@media (max-width: 980px) {
    .coach-matchplan-card .preference-stack {
        grid-template-columns: 1fr;
    }

    .coach-matchplan-card .preference-card {
        min-height: 112px;
    }
}

.muted-cell-center {
    color: var(--text-muted);
    text-align: center;
}

.analysis-chip-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.analysis-chip {
    background: var(--bg-color);
    padding: 0.35rem 0.75rem;
    border-radius: 4px;
    border: 1px solid var(--border-color);
    font-size: 0.85rem;
}

.analysis-player-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.5rem;
    background: var(--bg-color);
    border: 1px solid var(--border-color);
    border-radius: 4px;
}

.analysis-player-rank {
    font-weight: bold;
    opacity: 0.6;
    width: 20px;
}

.analysis-player-meta {
    opacity: 0.7;
}

.analysis-progress-track {
    width: 100px;
}

.analysis-score {
    color: var(--primary-color);
    min-width: 45px;
    text-align: right;
}

.modal-title {
    margin-bottom: 1rem;
    color: var(--text-color);
}

.modal-copy {
    font-size: 0.9rem;
    opacity: 0.8;
    margin-bottom: 1.5rem;
    color: var(--text-color);
}

.modal-action-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.modal-action-button {
    width: 100%;
    padding: 1rem;
    text-align: left;
}

.modal-action-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-action-heading {
    font-size: 1.1rem;
    display: block;
    margin-bottom: 0.25rem;
}

.modal-action-subtext {
    font-size: 0.85rem;
    opacity: 0.8;
}

.modal-action-icon {
    font-size: 1.5rem;
}

.modal-close-full {
    width: 100%;
    margin-top: 2rem;
}

.modal-note-warning {
    background: rgba(255, 152, 0, 0.1);
    border: 1px solid #ff9800;
    padding: 1rem;
    border-radius: 4px;
    margin-bottom: 1.5rem;
    color: #ff9800;
    font-size: 0.85rem;
}

.modal-note-info {
    background: rgba(33, 150, 243, 0.1);
    border: 1px solid #2196f3;
    padding: 1rem;
    border-radius: 4px;
    margin-bottom: 1.5rem;
    font-size: 0.85rem;
}

.modal-note-info strong {
    color: #2196f3;
}

.modal-card {
    background: var(--bg-color);
    border: 1px solid var(--border-color);
    padding: 1.5rem;
    border-radius: 8px;
    margin-bottom: 1.5rem;
}

.modal-card-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.modal-metric-label {
    font-size: 0.75rem;
    opacity: 0.7;
    margin-bottom: 0.25rem;
}

.modal-metric-value-primary {
    font-size: 1.5rem;
    font-weight: bold;
    color: var(--primary-color);
}

.modal-metric-value-success {
    font-size: 1.5rem;
    font-weight: bold;
    color: var(--success-color);
}

.modal-divider {
    margin: 1rem 0;
    border: 0;
    border-top: 1px solid var(--border-color);
}

.modal-stat-row {
    display: flex;
    justify-content: space-between;
}

.modal-stat-row-spaced {
    margin-bottom: 0.5rem;
}

.modal-stat-label {
    opacity: 0.8;
}

.modal-action-buttons {
    display: flex;
    gap: 1rem;
}

.modal-action-grow {
    flex: 1;
}

.learnable-item {
    background: var(--bg-color);
    border: 1px solid var(--border-color);
    padding: 1rem;
    border-radius: 4px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.learnable-item-copy {
    flex: 1;
}

.learnable-item-title {
    display: block;
    color: var(--text-color);
}

.learnable-item-subtext {
    font-size: 0.75rem;
    opacity: 0.7;
    color: var(--text-color);
}

.modal-empty-copy {
    text-align: center;
    opacity: 0.5;
    color: var(--text-color);
}

.dev-panel-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.dev-badge {
    display: inline-flex;
    align-items: center;
    padding: 0.35rem 0.75rem;
    border-radius: 999px;
    background: rgba(var(--primary-color-rgb), 0.15);
    color: var(--primary-color);
    font-size: 0.85rem;
    font-weight: 700;
}

.dev-stats-grid,
.dev-tools-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1rem;
}

.dev-tools-grid {
    margin-top: 1rem;
}

.dev-section {
    margin-top: 1.5rem;
}

.dev-section-header {
    margin-bottom: 1rem;
}

.dev-section-header h3 {
    margin: 0 0 0.35rem 0;
}

.dev-stat-card,
.dev-tool-card {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.dev-stat-label {
    color: var(--text-muted);
    font-size: 0.85rem;
}

.dev-stat-value {
    font-size: 1.35rem;
}

.dev-tool-input-row {
    display: flex;
    gap: 0.75rem;
    align-items: center;
    flex-wrap: wrap;
}

.dev-tool-stack {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.dev-finance-block {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.dev-field-label {
    font-size: 0.9rem;
    font-weight: 700;
}

.dev-number-input {
    min-width: 180px;
    max-width: 220px;
}

.dev-number-input-full {
    min-width: 100%;
    max-width: 100%;
}

.dev-current-value {
    padding: 0.75rem 0.9rem;
    border-radius: 10px;
    background: rgba(var(--primary-color-rgb), 0.12);
    color: var(--text-color);
    font-weight: 600;
}

.dev-select-row {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 1rem;
    padding: 0.75rem 0.9rem;
    border: 1px solid var(--border-color);
    border-radius: 10px;
    background: var(--bg-secondary);
}

.dev-select-copy {
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
}

.dev-select-actions {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    align-items: stretch;
    flex-wrap: wrap;
    width: 100%;
}

.dev-level-select {
    width: 100%;
}

.dev-pending-card {
    margin-top: 1rem;
}

.dev-pending-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 1rem;
    margin-bottom: 1rem;
}

.dev-upgrade-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.dev-upgrade-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    padding: 0.9rem 1rem;
    border: 1px solid var(--border-color);
    border-radius: 10px;
    background: var(--bg-secondary);
}

.dev-upgrade-copy {
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
}

.dev-upgrade-actions {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.dev-upgrade-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    color: var(--text-muted);
    font-size: 0.85rem;
}

.dev-empty-note {
    padding: 1rem;
    border: 1px dashed var(--border-color);
    border-radius: 10px;
    color: var(--text-muted);
    text-align: center;
}

.dev-match-lab-controls {
    display: grid;
    grid-template-columns: repeat(3, minmax(160px, 1fr)) auto auto;
    gap: 0.75rem;
    align-items: end;
}

.dev-match-lab-result {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.dev-match-lab-score {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    gap: 1rem;
    align-items: center;
    padding: 1rem;
    border: 1px solid var(--border-color);
    border-radius: 10px;
    background: var(--bg-secondary);
}

.dev-match-lab-score span:last-child {
    text-align: right;
}

.dev-match-lab-score strong {
    font-size: 1.6rem;
}

.dev-match-lab-kpis {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 0.75rem;
}

.dev-match-lab-columns {
    display: grid;
    grid-template-columns: minmax(280px, 1fr) minmax(320px, 1fr);
    gap: 1rem;
    align-items: start;
}

.dev-match-lab-events,
.dev-match-lab-json {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.dev-match-lab-event {
    display: grid;
    grid-template-columns: 52px 120px 1fr;
    gap: 0.75rem;
    align-items: start;
    padding: 0.75rem;
    border: 1px solid var(--border-color);
    border-radius: 10px;
    background: var(--bg-secondary);
}

.dev-match-lab-event p {
    margin: 0;
}

.dev-match-lab-json pre {
    max-height: 620px;
    overflow: auto;
    margin: 0;
    padding: 1rem;
    border: 1px solid var(--border-color);
    border-radius: 10px;
    background: var(--bg-secondary);
    color: var(--text-color);
    font-size: 0.82rem;
    white-space: pre-wrap;
}

.dev-player-toolbar {
    display: grid;
    grid-template-columns: 2fr repeat(3, minmax(120px, 1fr)) auto;
    gap: 0.75rem;
    align-items: center;
}

.dev-player-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.dev-pagination {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-top: 1rem;
}

.dev-player-row {
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    padding: 0.85rem 1rem;
    border-radius: 10px;
    border: 1px solid var(--border-color);
    background: var(--bg-secondary);
    color: var(--text-color);
    cursor: pointer;
    text-align: left;
}

.dev-player-row.is-active {
    border-color: var(--primary-color);
    background: rgba(var(--primary-color-rgb), 0.12);
}

.dev-player-row-main,
.dev-player-row-meta {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

@media (max-width: 900px) {

    .dev-match-lab-controls,
    .dev-match-lab-columns,
    .dev-match-lab-event {
        grid-template-columns: 1fr;
    }

    .dev-match-lab-score {
        grid-template-columns: 1fr;
        text-align: left;
    }

    .dev-match-lab-score span:last-child {
        text-align: left;
    }

    .dev-player-toolbar {
        grid-template-columns: 1fr;
    }
}

/* Stadium Module */
.stadium-view-stack {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.stadium-hero-card {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 1.5rem;
}

.stadium-eyebrow {
    margin: 0 0 0.35rem 0;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--text-muted);
}

.stadium-hero-meta {
    min-width: 180px;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 0.5rem;
}

.stadium-hero-balance-value {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary-color);
}

.stadium-stat-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 1rem;
    margin-top: 1rem;
}

.stadium-stat-card,
.stadium-detail-card,
.stadium-enhancement-card,
.stadium-tier-card,
.stadium-corner-card,
.stadium-slider-card {
    background: var(--bg-color);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    padding: 1rem;
}

.stadium-stat-value {
    font-size: 1.65rem;
    font-weight: 700;
    color: var(--primary-color);
}

.stadium-stat-label {
    margin-top: 0.35rem;
    color: var(--text-muted);
    font-size: 0.9rem;
}

.stadium-stand-list,
.stadium-extension-list,
.stadium-detail-table,
.stadium-config-stack {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.stadium-stand-row,
.stadium-extension-item,
.stadium-tier-row,
.stadium-away-preview {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    align-items: flex-start;
}

.stadium-stand-row-meta {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 0.25rem;
}

.stadium-detail-card-header,
.stadium-enhancement-top,
.stadium-tier-card-header,
.stadium-slider-header,
.stadium-stand-picker-top,
.stadium-stand-picker-bottom {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    align-items: flex-start;
}

.stadium-stand-selector-grid,
.stadium-enhancement-grid,
.stadium-corner-grid,
.stadium-detail-grid,
.stadium-upgrade-grid {
    display: grid;
    gap: 1rem;
}

.stadium-stand-selector-grid,
.stadium-enhancement-grid,
.stadium-corner-grid {
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.stadium-detail-grid {
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
}

.stadium-upgrade-grid {
    grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
    margin-top: 1rem;
}

.stadium-stand-picker {
    width: 100%;
    text-align: left;
    padding: 1rem;
    border-radius: 10px;
    border: 1px solid var(--border-color);
    background: var(--bg-color);
    color: var(--text-color);
    cursor: pointer;
    transition: border-color 0.2s ease, transform 0.2s ease, background 0.2s ease;
}

.stadium-stand-picker:hover {
    transform: translateY(-1px);
    border-color: var(--primary-color);
}

.stadium-stand-picker.is-active,
.stadium-location-btn.is-active {
    border-color: var(--primary-color);
    background: rgba(var(--primary-color-rgb), 0.12);
    color: #ffffff;
    box-shadow: inset 0 0 0 1px rgba(var(--primary-color-rgb), 0.3);
}

.stadium-status-open {
    color: var(--primary-color);
    font-weight: 700;
}

.stadium-status-done {
    color: #8bc34a;
    font-weight: 700;
}

.stadium-detail-balance {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
}

.stadium-tier-capacity {
    font-weight: 700;
}

.stadium-upgrade-option {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.35rem;
    min-height: 120px;
}

.stadium-location-picker {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.stadium-location-btn {
    border: 1px solid transparent;
    background: var(--bg-color);
    color: var(--text-color);
}

.stadium-slider-metric {
    text-align: right;
}

.stadium-config-actions {
    display: flex;
    justify-content: flex-end;
}

.stadium-inline-note {
    padding: 0.85rem 1rem;
    border: 1px dashed var(--border-color);
    border-radius: 10px;
    color: var(--text-muted);
    background: rgba(255, 255, 255, 0.03);
}

@media (max-width: 768px) {

    .stadium-hero-card,
    .stadium-slider-header,
    .stadium-away-preview {
        flex-direction: column;
        align-items: flex-start;
    }

    .stadium-hero-meta,
    .stadium-stand-row-meta,
    .stadium-detail-balance,
    .stadium-slider-metric {
        align-items: flex-start;
        text-align: left;
    }
}

.dashboard-overview {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.club-overview {
    position: relative;
}

.club-overview::before {
    content: none;
}

.overview-hero {
    display: flex;
    justify-content: space-between;
    gap: 1.5rem;
    align-items: flex-start;
}

.club-branded-hero {
    --club-brand-primary: var(--primary-color);
    --club-brand-secondary: var(--card-bg);
    --club-pattern-color: #ffffff;
    position: relative;
    overflow: hidden;
    background:
        linear-gradient(135deg,
            color-mix(in srgb, var(--club-brand-primary) 22%, var(--card-bg)),
            color-mix(in srgb, var(--club-brand-secondary) 62%, var(--card-bg)));
}

.club-branded-hero.pattern-stripes {
    background:
        repeating-linear-gradient(90deg,
            color-mix(in srgb, var(--club-pattern-color) 12%, transparent) 0 14px,
            transparent 14px 32px),
        linear-gradient(135deg,
            color-mix(in srgb, var(--club-brand-primary) 25%, var(--card-bg)),
            color-mix(in srgb, var(--club-brand-secondary) 64%, var(--card-bg)));
}

.club-branded-hero.pattern-diagonal {
    background:
        repeating-linear-gradient(135deg,
            color-mix(in srgb, var(--club-pattern-color) 13%, transparent) 0 10px,
            transparent 10px 28px),
        linear-gradient(135deg,
            color-mix(in srgb, var(--club-brand-primary) 25%, var(--card-bg)),
            color-mix(in srgb, var(--club-brand-secondary) 64%, var(--card-bg)));
}

.club-branded-hero.frame-line {
    border-color: color-mix(in srgb, var(--club-brand-primary) 68%, var(--border-color));
}

.club-branded-hero.frame-double {
    box-shadow:
        inset 0 0 0 2px color-mix(in srgb, var(--club-brand-primary) 78%, white),
        inset 0 0 0 5px color-mix(in srgb, var(--club-brand-secondary) 55%, transparent);
}

.overview-hero-main {
    display: flex;
    justify-content: space-between;
    gap: 1.5rem;
    flex: 1;
    align-items: center;
    flex-wrap: wrap;
}

.overview-club-mark {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.overview-club-logo-link {
    display: inline-flex;
    color: inherit;
    text-decoration: none;
    border-radius: 22px;
}

.overview-club-logo-link:focus-visible {
    outline: 2px solid var(--primary-color);
    outline-offset: 3px;
}

.overview-club-logo {
    width: 68px;
    height: 68px;
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--bg-color);
    background: linear-gradient(135deg, var(--primary-color), color-mix(in srgb, var(--primary-color) 55%, white));
    box-shadow: 0 12px 24px rgba(var(--primary-color-rgb), 0.22);
    overflow: hidden;
}

.overview-club-logo img {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: cover;
}

.overview-club-logo.has-logo {
    background: transparent;
    box-shadow: none;
}

.overview-meta-line {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-top: 0.45rem;
    color: var(--text-muted);
    font-size: 0.92rem;
}

.overview-next-match {
    min-width: 220px;
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}

.overview-hero-actions {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.club-logo-upload-btn {
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

.club-logo-upload-btn input {
    position: absolute;
    inset: 0;
    opacity: 0;
    pointer-events: none;
}

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

.league-page {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.league-hero {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.league-hero-top {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 1rem;
}

.league-title {
    margin: 0.2rem 0 0;
}

.league-subtitle {
    margin-top: 0.45rem;
    color: var(--text-muted);
}

.league-toolbar {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 0.85rem;
}

.league-select-field {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}

.league-select-field span {
    color: var(--text-muted);
    font-size: 0.82rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.league-select-field select {
    width: 100%;
    min-height: 42px;
    border-radius: 10px;
    border: 1px solid var(--border-color);
    background: var(--bg-secondary);
    color: var(--text-color);
    padding: 0.7rem 0.85rem;
}

.league-tabs {
    margin-top: 0;
}

.league-tab-panel {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.league-panel-head {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    gap: 1rem;
}

.league-panel-head h3 {
    margin-bottom: 0.2rem;
}

.league-panel-head p {
    color: var(--text-muted);
}

.league-select-field-compact {
    min-width: 220px;
}

.league-zone-legend {
    display: flex;
    flex-wrap: wrap;
    gap: 0.6rem;
}

.league-zone-chip {
    display: inline-flex;
    align-items: center;
    padding: 0.35rem 0.75rem;
    border-radius: 999px;
    font-size: 0.82rem;
    font-weight: 600;
}

.league-zone-chip.promotion {
    background: rgba(38, 166, 91, 0.16);
    color: #2b7a46;
}

.league-zone-chip.relegation {
    background: rgba(255, 179, 71, 0.16);
    color: #9a5b00;
}

.league-zone-chip.danger {
    background: rgba(220, 83, 83, 0.16);
    color: #a43737;
}

.league-table-shell .app-table {
    min-width: 980px;
}

.league-team-cell {
    display: inline-flex;
    align-items: center;
    gap: 0.55rem;
    min-width: 0;
}

.league-team-logo {
    width: 1.65rem;
    height: 1.65rem;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
    overflow: hidden;
    color: #ffffff;
    font-size: 0.63rem;
    font-weight: 900;
    background: linear-gradient(145deg, #21683a, #12351f);
    border: 1px solid rgba(255, 255, 255, 0.24);
}

.league-team-logo.has-logo {
    background: transparent;
    border-color: rgba(255, 255, 255, 0.16);
}

.league-team-logo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.league-standings-table td:first-child,
.league-standings-table th:first-child {
    font-weight: 700;
}

.league-row.zone-promotion td:first-child {
    box-shadow: inset 4px 0 0 #26a65b;
}

.league-row.zone-relegation td:first-child {
    box-shadow: inset 4px 0 0 #ffb347;
}

.league-row.zone-danger td:first-child {
    box-shadow: inset 4px 0 0 #dc5353;
}

.league-club-link {
    padding: 0;
    margin: 0;
    border: none;
    background: none;
    box-shadow: none;
    color: inherit;
    font: inherit;
    font-weight: 700;
    cursor: pointer;
}

.league-club-link:hover {
    color: var(--primary-color);
}

.league-player-link {
    padding: 0;
    margin: 0;
    border: none;
    background: none;
    box-shadow: none;
    color: inherit;
    font: inherit;
    cursor: pointer;
    text-align: left;
}

.league-player-link:hover {
    color: var(--primary-color);
}

.league-form-link {
    border: none;
    cursor: pointer;
}

.league-form-link:hover {
    filter: brightness(0.96);
}

.league-fixtures-nav {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.league-fixture-current {
    color: var(--text-muted);
    font-weight: 600;
}

.league-fixture-arrow {
    width: 2rem;
    height: 2rem;
    border-radius: 999px;
    border: 1px solid var(--border-color);
    background: var(--bg-secondary);
    color: var(--text-color);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    line-height: 1;
    padding: 0;
}

.league-fixture-arrow:hover:not(:disabled) {
    border-color: var(--primary-color);
    color: var(--primary-color);
}

.league-fixture-arrow:disabled {
    opacity: 0.45;
    cursor: default;
}

.league-fixtures-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.league-matchday-card.is-next {
    border-color: rgba(var(--primary-color-rgb), 0.4);
}

.league-matchday-card {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.05);
    box-shadow: none;
    padding-left: 0;
    padding-right: 0;
}

body.light-mode .league-matchday-card {
    background: #fcfdff;
    border-color: rgba(15, 23, 42, 0.08);
}

.league-matchday-head {
    margin-bottom: 1rem;
    text-align: center;
    padding: 0.8rem 1rem;
    border-radius: 12px;
    background: rgba(var(--primary-color-rgb), 0.08);
}

.league-matchday-head h4 {
    margin: 0;
    color: inherit;
}

body.light-mode .league-matchday-head {
    background: rgba(var(--primary-color-rgb), 0.1);
}

.league-match-list {
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
}

.league-match-row {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    gap: 0.75rem;
    align-items: center;
    padding: 0.85rem 1rem;
    border: none;
    border-radius: 0;
    background: transparent;
}

.league-match-row:nth-child(even) {
    background: rgba(255, 255, 255, 0.025);
    border-radius: 8px;
}

.league-match-row.is-own-match {
    background: transparent;
    border-radius: 0;
}

body.light-mode .league-match-row:nth-child(even) {
    background: rgba(15, 23, 42, 0.035);
}

.league-match-team.home {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.85rem;
    text-align: right;
}

.league-match-team.away {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.85rem;
    text-align: left;
}

.league-match-team-main {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.league-match-team.home .league-match-team-main,
.league-match-team.home .league-match-team-form {
    justify-content: flex-end;
}

.league-match-team.home .league-match-team-main {
    order: 2;
}

.league-match-team.home .league-match-team-form {
    order: 1;
}

.league-match-team.away .league-match-team-main,
.league-match-team.away .league-match-team-form {
    justify-content: flex-start;
}

.league-match-team.away .league-match-team-main {
    order: 1;
}

.league-match-team.away .league-match-team-form {
    order: 2;
}

.league-team-rank {
    color: var(--text-muted);
    font-size: 0.9rem;
    font-weight: 700;
    min-width: 1.5rem;
}

.league-match-team-form {
    display: flex;
    flex-wrap: wrap;
    gap: 0.25rem;
    flex-shrink: 0;
}

.league-match-score {
    min-width: 76px;
    text-align: center;
    font-weight: 700;
}

.league-match-score-btn {
    border: 1px solid transparent;
    background: rgba(var(--primary-color-rgb), 0.06);
    color: inherit;
    cursor: pointer;
    padding: 0.48rem 0.65rem;
    border-radius: 8px;
    min-height: 44px;
    display: inline-grid;
    place-items: center;
    line-height: 1.1;
}

.league-match-score-btn:hover {
    color: var(--primary-color);
    background: rgba(var(--primary-color-rgb), 0.08);
    border-color: rgba(var(--primary-color-rgb), 0.25);
}

.league-match-score-mobile {
    display: none;
}

.league-match-team.is-own-club,
.league-match-team.is-own-club .league-club-link,
.league-match-team.is-own-club strong {
    color: var(--primary-color);
    font-weight: 800;
}

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

.league-stats-summary {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
    gap: 0.75rem;
}

.league-stat-summary-card {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    padding: 0.85rem 1rem;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    background: var(--bg-secondary);
}

.league-stat-summary-card span {
    color: var(--text-muted);
    font-size: 0.82rem;
}

.league-stat-summary-card strong {
    font-size: 1.3rem;
    line-height: 1.15;
}

.league-stat-card h4,
.league-info-grid h4 {
    margin-bottom: 0.85rem;
}

.league-info-block {
    display: flex;
    flex-direction: column;
    gap: 0.7rem;
}

.league-info-line {
    padding: 0.75rem 0.9rem;
    border-radius: 10px;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
}

.league-profile-list {
    display: grid;
    gap: 0.55rem;
}

.league-profile-row {
    display: grid;
    grid-template-columns: minmax(120px, 0.8fr) minmax(0, 1fr);
    gap: 0.9rem;
    align-items: center;
    padding: 0.55rem 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.league-profile-row:last-child {
    border-bottom: none;
}

.league-profile-row span {
    color: var(--text-muted);
    font-size: 0.9rem;
}

.league-profile-row strong {
    color: var(--text-color);
}

.league-info-wide {
    grid-column: span 2;
}

.league-tree-card {
    overflow: hidden;
}

.league-tree {
    display: grid;
    gap: 0.55rem;
    padding: 0.35rem 0;
    overflow-x: auto;
}

.league-tree-tier {
    display: grid;
    grid-template-columns: minmax(160px, 1fr) minmax(170px, 0.75fr);
    gap: 1rem;
    align-items: center;
    min-width: min(640px, 100%);
    padding: 0.35rem 0.55rem;
    border-radius: 8px;
}

.league-tree-tier.is-selected {
    background: rgba(38, 166, 91, 0.12);
    outline: 1px solid rgba(38, 166, 91, 0.35);
}

.league-tree-boxes {
    display: grid;
    grid-template-columns: repeat(var(--groups), clamp(22px, 4.4vw, 34px));
    justify-content: center;
    gap: 0.32rem;
    align-items: center;
}

.league-tree-box {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: clamp(22px, 4.4vw, 34px);
    height: clamp(22px, 4vw, 30px);
    border: 2px solid var(--text-color);
    border-radius: 4px;
    color: var(--text-color);
    background: var(--card-bg);
    font-weight: 800;
    line-height: 1;
}

.league-tree-more,
.league-tree-infinity {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 34px;
    height: 30px;
    color: var(--text-muted);
    font-weight: 800;
}

.league-tree-label {
    display: flex;
    align-items: baseline;
    gap: 0.55rem;
    white-space: nowrap;
}

.league-tree-label span {
    color: var(--text-muted);
    font-size: 0.82rem;
}

.league-tree-label strong {
    font-size: 1rem;
}

.league-tree-tier.is-selected .league-tree-box,
.league-tree-tier.is-selected .league-tree-label strong,
.league-tree-tier.is-selected .league-tree-infinity {
    color: #26a65b;
    border-color: #26a65b;
}

.league-stats-table-container .app-table {
    min-width: 420px;
}

body.light-mode .league-zone-chip.promotion {
    background: rgba(38, 166, 91, 0.12);
    color: #1f5f35;
}

body.light-mode .league-zone-chip.relegation {
    background: rgba(255, 179, 71, 0.18);
    color: #8a4d00;
}

body.light-mode .league-zone-chip.danger {
    background: rgba(220, 83, 83, 0.14);
    color: #8f2f2f;
}

@media (max-width: 1100px) {
    .league-toolbar {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 768px) {
    .league-panel-head {
        flex-direction: column;
        align-items: stretch;
    }

    .league-toolbar {
        grid-template-columns: 1fr;
    }

    .league-info-wide {
        grid-column: span 1;
    }

    .league-profile-row {
        grid-template-columns: 1fr;
        gap: 0.2rem;
    }

    .league-tree {
        overflow-x: visible;
    }

    .league-tree-tier {
        grid-template-columns: 1fr;
        min-width: 0;
        gap: 0.4rem;
        padding: 0.55rem 0.35rem;
    }

    .league-tree-boxes {
        justify-content: start;
        grid-template-columns: repeat(var(--groups), minmax(18px, 1fr));
        gap: 0.18rem;
    }

    .league-tree-box {
        width: 100%;
        min-width: 18px;
        height: 24px;
        font-size: 0.72rem;
        border-width: 1px;
    }

    .league-tree-label {
        white-space: normal;
        justify-content: space-between;
        gap: 0.45rem;
    }

    .league-stats-grid,
    .league-info-grid {
        grid-template-columns: 1fr;
    }

    .league-match-row {
        grid-template-columns: minmax(64px, 76px) minmax(0, 1fr);
        grid-template-rows: auto auto;
        align-items: stretch;
        gap: 0.2rem 0.75rem;
        text-align: left;
        padding: 0.7rem 0.85rem;
    }

    .league-match-team.home,
    .league-match-team.away {
        display: flex;
        align-items: center;
        min-width: 0;
        text-align: left;
    }

    .league-match-team.home {
        grid-column: 2;
        grid-row: 1;
    }

    .league-match-team.away {
        grid-column: 2;
        grid-row: 2;
    }

    .league-match-score {
        grid-column: 1;
        grid-row: 1 / 3;
        min-width: 64px;
        width: 100%;
        min-height: 64px;
        align-self: stretch;
    }

    .league-match-score-btn {
        padding: 0.55rem 0.45rem;
        border-color: rgba(var(--primary-color-rgb), 0.18);
    }

    .league-match-team.home .league-match-team-main,
    .league-match-team.away .league-match-team-main {
        justify-content: flex-start;
        order: initial;
        width: 100%;
        min-width: 0;
    }

    .league-match-team-form {
        display: none;
    }

    .league-team-rank {
        display: none;
    }

    .league-team-cell {
        width: 100%;
        min-width: 0;
    }

    .league-team-cell span:last-child {
        min-width: 0;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .league-match-score-desktop {
        display: none;
    }

    .league-match-score-mobile {
        display: grid;
        gap: 0.55rem;
        justify-items: center;
        font-size: 1.05rem;
        font-weight: 800;
    }

    .league-match-score-mobile.is-time {
        gap: 0;
        font-size: 0.9rem;
    }
}

.overview-metric-card {
    --tile-status: var(--primary-color);
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
    min-height: 176px;
    overflow: hidden;
    border-color: rgba(var(--primary-color-rgb), 0.18);
    background:
        radial-gradient(circle at top right, rgba(var(--primary-color-rgb), 0.12), transparent 42%),
        var(--card-bg);
    transition: transform 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease;
}

.overview-metric-card::before {
    content: "";
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 3px;
    background: color-mix(in srgb, var(--tile-status) 78%, var(--primary-color));
}

.overview-metric-card::after {
    content: none;
}

.overview-metric-card[role="button"]:hover,
.overview-metric-card[role="button"]:focus-visible {
    transform: translateY(-2px);
    border-color: rgba(var(--primary-color-rgb), 0.38);
    box-shadow: 0 14px 28px rgba(0, 0, 0, 0.16);
    outline: none;
}

.overview-metric-card.status-success {
    --tile-status: #38b86c;
}

.overview-metric-card.status-warning {
    --tile-status: #f0ab00;
}

.overview-metric-card.status-danger {
    --tile-status: #dc5353;
}

.overview-metric-card.status-info {
    --tile-status: #3b82f6;
}

.overview-card-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    position: relative;
    z-index: 2;
    text-shadow: 0 1px 16px rgba(0, 0, 0, 0.28);
}

.overview-card-head h3 {
    font-size: 0.92rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.overview-status-badge {
    border-radius: 999px;
    padding: 0.22rem 0.5rem;
    font-size: 0.72rem;
    line-height: 1;
    font-weight: 800;
    color: color-mix(in srgb, var(--tile-status) 78%, white);
    background: color-mix(in srgb, var(--tile-status) 13%, transparent);
    border: 1px solid color-mix(in srgb, var(--tile-status) 28%, transparent);
    white-space: nowrap;
}

.overview-tile-watermark {
    position: absolute;
    right: 0.8rem;
    bottom: 0.3rem;
    font-size: 4.6rem;
    line-height: 1;
    font-weight: 900;
    color: rgba(var(--primary-color-rgb), 0.06);
    pointer-events: none;
    font-family: "Trebuchet MS", Arial, sans-serif;
}

.overview-tile-art {
    position: absolute;
    top: 0.75rem;
    right: 0.75rem;
    bottom: 0.75rem;
    width: min(64%, 18rem);
    background-position: right center;
    background-repeat: no-repeat;
    background-size: contain;
    opacity: 0.5;
    pointer-events: none;
    z-index: 0;
}

.overview-tile-art::before {
    content: none;
}

.overview-tile-icon {
    width: 2rem;
    height: 2rem;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
    font-weight: 900;
    color: color-mix(in srgb, var(--tile-status) 82%, white);
    background: color-mix(in srgb, var(--tile-status) 14%, transparent);
    border: 1px solid color-mix(in srgb, var(--tile-status) 30%, transparent);
}

.overview-card-head::before,
.overview-card-body::before,
.overview-card-foot::before {
    content: "";
    position: absolute;
    inset: -0.35rem -0.45rem;
    border-radius: 10px;
    background: radial-gradient(ellipse at left center, rgba(0, 0, 0, 0.34), rgba(0, 0, 0, 0.16) 56%, transparent 80%);
    filter: blur(2px);
    pointer-events: none;
    z-index: -1;
}

.overview-card-body {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    position: relative;
    z-index: 2;
    text-shadow: 0 1px 16px rgba(0, 0, 0, 0.25);
}

.overview-card-foot {
    margin-top: auto;
    position: relative;
    z-index: 2;
    text-shadow: 0 1px 16px rgba(0, 0, 0, 0.22);
}

.overview-metric {
    font-size: 1.85rem;
    font-weight: 800;
    line-height: 1.1;
}

.overview-kicker-label {
    color: var(--text-muted);
    font-size: 0.86rem;
}

.overview-mini-stats,
.overview-list-inline {
    display: flex;
    flex-direction: column;
    gap: 0.45rem;
    color: var(--text-muted);
    font-size: 0.86rem;
}

.overview-content-grid {
    display: grid;
    grid-template-columns: 1.2fr 0.8fr;
    gap: 1rem;
}

.overview-action-list,
.overview-event-list,
.overview-summary-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.overview-tasks-card {
    position: relative;
    overflow: hidden;
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.025), transparent 48%),
        var(--card-bg);
}

.overview-tasks-card::before {
    content: "";
    position: absolute;
    left: 1rem;
    right: 1rem;
    top: 3.35rem;
    height: 1px;
    background: linear-gradient(90deg, rgba(255, 255, 255, 0.3), transparent);
    opacity: 0.7;
    pointer-events: none;
}

.overview-tasks-card .section-split {
    position: relative;
    padding-bottom: 0.45rem;
}

.overview-tasks-card .overview-action-list {
    gap: 0.25rem;
}

.overview-tasks-card .overview-action-list.is-quiet {
    margin-top: -0.15rem;
}

.overview-action-item {
    position: relative;
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    align-items: flex-start;
    padding: 0.9rem 1rem;
    border-radius: 14px;
    border: 1px solid var(--border-color);
    background: color-mix(in srgb, var(--panel-bg, #111) 88%, white);
}

.overview-action-item.tone-warning {
    border-color: rgba(240, 171, 0, 0.45);
    background: rgba(240, 171, 0, 0.08);
}

.overview-action-item.tone-danger {
    border-color: rgba(220, 38, 38, 0.4);
    background: rgba(220, 38, 38, 0.08);
}

.overview-action-item.tone-info {
    border-color: rgba(59, 130, 246, 0.4);
    background: rgba(59, 130, 246, 0.08);
}

.overview-action-item.tone-success {
    border-color: rgba(34, 197, 94, 0.35);
    background: rgba(34, 197, 94, 0.08);
}

.overview-action-item p {
    color: var(--text-muted);
}

.overview-tasks-card .overview-action-item {
    padding: 0.82rem 0 0.82rem 1.2rem;
    border: 0;
    border-bottom: 1px dashed rgba(255, 255, 255, 0.12);
    border-radius: 0;
    background: transparent;
}

.overview-tasks-card .overview-action-list.is-quiet .overview-action-item {
    padding-top: 0.45rem;
    padding-bottom: 0.2rem;
    border-bottom: 0;
}

.overview-tasks-card .overview-action-list.is-quiet .overview-action-item p {
    margin-bottom: 0;
}

.overview-tasks-card .overview-action-item::before {
    content: "";
    position: absolute;
    left: 0.1rem;
    top: 1.08rem;
    width: 0.46rem;
    height: 0.46rem;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.48);
    box-shadow: 0 0 0 2px rgba(var(--primary-color-rgb), 0.08);
}

.overview-tasks-card .overview-action-item:last-child {
    border-bottom: 0;
}

.overview-tasks-card .overview-action-item strong {
    display: inline;
    background-image: linear-gradient(90deg, rgba(var(--primary-color-rgb), 0.35), rgba(255, 255, 255, 0.05));
    background-repeat: no-repeat;
    background-size: 100% 2px;
    background-position: 0 100%;
}

.overview-event-item,
.overview-summary-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 0.8rem 0.9rem;
    border-radius: 12px;
    background: color-mix(in srgb, var(--panel-bg, #111) 92%, white);
    border: 1px solid var(--border-color);
}

.overview-facts-list {
    gap: 0;
    border-top: 1px solid rgba(var(--primary-color-rgb), 0.22);
}

.overview-fact-row {
    padding: 0.88rem 0;
    border: 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.09);
    border-radius: 0;
    background: transparent;
}

.overview-fact-row:last-child {
    border-bottom: 0;
}

.overview-fact-row>span:first-child {
    color: var(--text-muted);
    font-size: 0.84rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.overview-fact-row .btn {
    padding: 0.34rem 0.62rem;
    min-height: 0;
    border-radius: 999px;
    font-size: 0.78rem;
}

.overview-fact-row.is-clickable {
    cursor: pointer;
    transition: background 0.18s ease, padding-inline 0.18s ease;
}

.overview-fact-row.is-clickable:hover,
.overview-fact-row.is-clickable:focus-visible {
    padding-left: 0.55rem;
    padding-right: 0.55rem;
    background: rgba(var(--primary-color-rgb), 0.06);
    outline: none;
}

body.light-mode .overview-action-item,
body.light-mode .overview-event-item,
body.light-mode .overview-summary-row {
    background: #f8fafc;
    color: #23303d;
    border-color: #d8e0e8;
}

body.light-mode .overview-fact-row {
    background: transparent;
    border-bottom-color: rgba(15, 23, 42, 0.1);
}

body.light-mode .overview-metric-card {
    background:
        radial-gradient(circle at top right, rgba(var(--primary-color-rgb), 0.12), transparent 42%),
        #ffffff;
    box-shadow: 0 8px 22px rgba(15, 23, 42, 0.05);
}

body.light-mode .overview-tile-watermark {
    color: rgba(var(--primary-color-rgb), 0.075);
}

body.light-mode .overview-card-head,
body.light-mode .overview-card-body,
body.light-mode .overview-card-foot {
    text-shadow: 0 1px 14px rgba(255, 255, 255, 0.72);
}

body.light-mode .overview-card-head::before,
body.light-mode .overview-card-body::before,
body.light-mode .overview-card-foot::before {
    background: radial-gradient(ellipse at left center, rgba(255, 255, 255, 0.78), rgba(255, 255, 255, 0.42) 56%, transparent 80%);
}

body.light-mode .overview-tasks-card {
    background:
        linear-gradient(180deg, rgba(var(--primary-color-rgb), 0.035), transparent 52%),
        #ffffff;
}

body.light-mode .overview-tasks-card::before {
    background: linear-gradient(90deg, rgba(15, 23, 42, 0.16), transparent);
}

body.light-mode .overview-tasks-card .overview-action-item {
    background: transparent;
    border-bottom-color: rgba(15, 23, 42, 0.1);
}

body.light-mode .overview-tasks-card .overview-action-item::before {
    background: rgba(var(--primary-color-rgb), 0.5);
    box-shadow: 0 0 0 2px rgba(var(--primary-color-rgb), 0.08);
}

body.light-mode .overview-action-item p,
body.light-mode .overview-action-item strong,
body.light-mode .overview-event-item,
body.light-mode .overview-summary-row {
    color: #23303d;
}

body.light-mode .overview-action-item.tone-warning {
    border-color: rgba(240, 171, 0, 0.38);
    background: #fff4db;
}

body.light-mode .overview-action-item.tone-danger {
    border-color: rgba(220, 38, 38, 0.3);
    background: #fde8e8;
}

body.light-mode .overview-action-item.tone-info {
    border-color: rgba(59, 130, 246, 0.28);
    background: #eaf3ff;
}

body.light-mode .overview-action-item.tone-success {
    border-color: rgba(34, 197, 94, 0.28);
    background: #e9f9ef;
}

.overview-summary-inline {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    flex-wrap: wrap;
    gap: 0.65rem;
}

.overview-manager-word-inline {
    flex: 1;
    min-width: min(100%, 260px);
}

.overview-manager-word-inline #manager-word-display {
    flex: 1 1 220px;
}

.overview-manager-word-inline #manager-word-actions {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.overview-manager-word-inline textarea {
    width: 100%;
    min-width: 220px;
}

.overview-league-feed-card {
    position: relative;
    overflow: hidden;
}

.overview-league-feed-card::before {
    content: "";
    position: absolute;
    inset: 0;
    background:
        linear-gradient(90deg, rgba(var(--primary-color-rgb), 0.08), transparent 42%),
        radial-gradient(circle at top right, rgba(255, 255, 255, 0.06), transparent 30%);
    pointer-events: none;
}

.overview-league-feed-card>* {
    position: relative;
}

.overview-event-item {
    justify-content: flex-start;
    align-items: flex-start;
    gap: 0.9rem;
    background: rgba(255, 255, 255, 0.035);
}

.overview-event-badge {
    min-width: 6.6rem;
    padding: 0.28rem 0.45rem;
    border-radius: 6px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    background: rgba(255, 255, 255, 0.06);
    color: var(--text-primary);
    font-size: 0.72rem;
    font-weight: 900;
    line-height: 1;
    text-align: center;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.overview-event-item.type-transfer .overview-event-badge {
    border-color: rgba(56, 189, 248, 0.32);
    background: rgba(56, 189, 248, 0.12);
}

.overview-event-item.type-injury .overview-event-badge {
    border-color: rgba(248, 113, 113, 0.34);
    background: rgba(248, 113, 113, 0.12);
}

.overview-event-item.type-suspension .overview-event-badge,
.overview-event-item.type-relegation .overview-event-badge {
    border-color: rgba(251, 146, 60, 0.36);
    background: rgba(251, 146, 60, 0.13);
}

.overview-event-item.type-league .overview-event-badge {
    border-color: rgba(34, 197, 94, 0.32);
    background: rgba(34, 197, 94, 0.12);
}

.overview-event-item.type-promotion .overview-event-badge,
.overview-event-item.type-champion .overview-event-badge,
.overview-event-item.type-cup .overview-event-badge {
    border-color: rgba(250, 204, 21, 0.36);
    background: rgba(250, 204, 21, 0.13);
}

.overview-event-item.type-club .overview-event-badge {
    border-color: rgba(var(--primary-color-rgb), 0.34);
    background: rgba(var(--primary-color-rgb), 0.12);
}

.overview-event-copy {
    display: grid;
    gap: 0.22rem;
    min-width: 0;
}

.overview-event-copy strong {
    color: var(--text-primary);
    font-size: 0.95rem;
}

.overview-event-copy p {
    margin: 0;
    color: var(--text-muted);
    line-height: 1.45;
}

.overview-event-copy span {
    color: var(--text-muted);
    font-size: 0.78rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

body.light-mode .overview-league-feed-card::before {
    background:
        linear-gradient(90deg, rgba(var(--primary-color-rgb), 0.08), transparent 42%),
        radial-gradient(circle at top right, rgba(var(--primary-color-rgb), 0.08), transparent 30%);
}

body.light-mode .overview-event-item {
    background: #f8fafc;
}

body.light-mode .overview-event-badge,
body.light-mode .overview-event-copy strong {
    color: #23303d;
}

.player-sporttest-history {
    display: grid;
    gap: 1rem;
    min-width: 0;
}

.player-sporttest-controls {
    display: grid;
    gap: 0.75rem;
}

.player-sporttest-view-tabs,
.player-sporttest-test-toggles {
    display: flex;
    flex-wrap: wrap;
    gap: 0.45rem;
}

.player-sporttest-view-tabs button,
.player-sporttest-test-toggles button {
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.045);
    color: var(--text-color);
    cursor: pointer;
    font: inherit;
    font-size: 0.82rem;
    font-weight: 700;
    padding: 0.42rem 0.72rem;
}

.light-mode .player-sporttest-view-tabs button,
.light-mode .player-sporttest-test-toggles button {
    background: rgba(15, 23, 42, 0.035);
    border-color: rgba(15, 23, 42, 0.1);
}

.player-sporttest-view-tabs button.active,
.player-sporttest-test-toggles button.active {
    background: rgba(var(--primary-color-rgb), 0.2);
    border-color: rgba(var(--primary-color-rgb), 0.55);
    color: #fff;
}

.light-mode .player-sporttest-view-tabs button.active,
.light-mode .player-sporttest-test-toggles button.active {
    color: #12351b;
}

.player-sporttest-chart {
    display: block;
    width: 100%;
    max-width: 100%;
    min-height: 220px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    overflow: visible;
}

.light-mode .player-sporttest-chart {
    background: rgba(15, 23, 42, 0.025);
    border-color: rgba(15, 23, 42, 0.08);
}

.player-sporttest-grid {
    stroke: rgba(255, 255, 255, 0.08);
    stroke-width: 1;
}

.player-sporttest-grid.is-major {
    stroke: rgba(255, 255, 255, 0.15);
}

.light-mode .player-sporttest-grid {
    stroke: rgba(15, 23, 42, 0.08);
}

.light-mode .player-sporttest-grid.is-major {
    stroke: rgba(15, 23, 42, 0.16);
}

.player-sporttest-axis {
    stroke: var(--text-muted, #888);
    stroke-width: 1.2;
}

.player-sporttest-line {
    fill: none;
    stroke-width: 3;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.player-sporttest-point {
    stroke-width: 2;
    cursor: crosshair;
    transition: r 0.14s ease, stroke-width 0.14s ease;
}

.player-sporttest-point-group:hover .player-sporttest-point {
    stroke-width: 3;
}

.player-sporttest-tooltip {
    opacity: 0;
    pointer-events: none;
}

.player-sporttest-point-group:hover .player-sporttest-tooltip {
    opacity: 1;
}

.player-sporttest-tooltip rect {
    fill: rgba(10, 14, 18, 0.94);
    stroke: rgba(255, 255, 255, 0.22);
    stroke-width: 1;
}

.light-mode .player-sporttest-tooltip rect {
    fill: rgba(255, 255, 255, 0.98);
    stroke: rgba(15, 23, 42, 0.16);
}

.player-sporttest-tooltip text {
    fill: #fff;
    font-size: 16px;
    font-weight: 900;
}

.light-mode .player-sporttest-tooltip text {
    fill: #1f2937;
}

.player-sporttest-scale-label,
.player-sporttest-axis-label {
    fill: var(--text-muted, #888);
    font-size: 11px;
    font-weight: 700;
}

.player-sporttest-legend {
    display: flex;
    flex-wrap: wrap;
    gap: 0.65rem 1rem;
    color: var(--text-muted, #888);
    font-size: 0.82rem;
    font-weight: 700;
}

.player-sporttest-legend span {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
}

.player-sporttest-legend i {
    width: 0.72rem;
    height: 0.72rem;
    border-radius: 999px;
    display: inline-block;
}

.transfer-view .module-tabs {
    flex-wrap: wrap;
}

.transfer-market-head {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 1rem;
    flex-wrap: wrap;
}

.transfer-market-wealth {
    text-align: right;
    min-width: 12rem;
}

.transfer-leaderboard-panel {
    display: grid;
    gap: 1rem;
}

.transfer-leaderboard-copy {
    margin: 0.35rem 0 0;
    color: var(--text-muted, #666);
    line-height: 1.45;
    max-width: 48rem;
}

.transfer-leaderboard-view-pill {
    display: grid;
    gap: 0.18rem;
    justify-items: end;
    padding: 0.7rem 0.85rem;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.045);
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.light-mode .transfer-leaderboard-view-pill {
    background: rgba(15, 23, 42, 0.035);
    border-color: rgba(15, 23, 42, 0.08);
}

.transfer-leaderboard-view-pill span {
    color: var(--text-muted, #666);
    font-size: 0.74rem;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    font-weight: 800;
}

.transfer-leaderboard-view-pill strong {
    color: var(--text-color);
    font-size: 1.05rem;
    line-height: 1.25;
}

.transfer-leaderboard-tabs {
    gap: 0.5rem;
    flex-wrap: wrap;
}

.transfer-leaderboard-player-link,
.transfer-leaderboard-club-link {
    padding: 0;
    margin: 0;
    border: none;
    background: none;
    box-shadow: none;
    color: inherit;
    cursor: pointer;
    text-align: left;
    font: inherit;
}

.transfer-leaderboard-player-link {
    font-weight: 800;
    overflow-wrap: anywhere;
}

.transfer-leaderboard-club-link {
    display: inline-flex;
    min-width: 0;
}

.transfer-leaderboard-club-label {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    min-width: 0;
}

.transfer-leaderboard-club-label span {
    overflow-wrap: anywhere;
}

.transfer-leaderboard-club-logo {
    width: 1.35rem;
    height: 1.35rem;
    border-radius: 50%;
    object-fit: cover;
    border: 1px solid var(--border-color, #444);
    flex: 0 0 auto;
}

.transfer-leaderboard-rank {
    display: inline-grid;
    place-items: center;
    min-width: 2rem;
    height: 2rem;
    padding: 0 0.35rem;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    background: rgba(255, 255, 255, 0.055);
    color: var(--text-color);
    font-weight: 900;
    line-height: 1;
}

.light-mode .transfer-leaderboard-rank {
    background: rgba(15, 23, 42, 0.04);
    border-color: rgba(15, 23, 42, 0.1);
}

.transfer-leaderboard-rank.is-top-1 {
    background: #f6c343;
    color: #3a2a00;
    border-color: #c89419;
}

.transfer-leaderboard-rank.is-top-2 {
    background: #d9dee7;
    color: #28313f;
    border-color: #a8b0bd;
}

.transfer-leaderboard-rank.is-top-3 {
    background: #c8844a;
    color: #fff7ef;
    border-color: #9e6230;
}

.transfer-leaderboard-row.is-top-1 {
    background: linear-gradient(90deg, rgba(246, 195, 67, 0.16), transparent);
}

.transfer-leaderboard-row.is-top-2 {
    background: linear-gradient(90deg, rgba(174, 184, 198, 0.16), transparent);
}

.transfer-leaderboard-row.is-top-3 {
    background: linear-gradient(90deg, rgba(200, 132, 74, 0.14), transparent);
}

.transfer-leaderboard-card-top {
    display: flex;
    justify-content: space-between;
    gap: 0.85rem;
    align-items: flex-start;
}

.transfer-leaderboard-card-title {
    display: flex;
    gap: 0.7rem;
    min-width: 0;
}

.transfer-leaderboard-card-title>div {
    min-width: 0;
}

.transfer-leaderboard-card-club {
    margin-top: 0.35rem;
    color: var(--text-muted, #666);
}

.transfer-leaderboard-card-value {
    white-space: nowrap;
    font-size: 0.98rem;
}

.transfer-leaderboard-card-meta {
    display: flex;
    gap: 0.55rem;
    flex-wrap: wrap;
    align-items: center;
    color: var(--text-muted, #666);
    font-weight: 700;
}

.transfer-toolbar-row {
    display: flex;
    justify-content: flex-end;
    margin: 1rem 0 0.85rem;
}

.transfer-toolbar-actions {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.transfer-filter-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 0.75rem;
    margin-bottom: 1rem;
}

.transfer-filter-field {
    display: grid;
    gap: 0.25rem;
    min-width: 0;
}

.transfer-filter-skill-field {
    gap: 0.35rem;
}

.transfer-filter-field .input,
.transfer-filter-field select,
.transfer-filter-field input {
    width: 100%;
    min-width: 0;
}

.transfer-filter-toggle-row {
    display: flex;
    justify-content: flex-end;
    margin: -0.15rem 0 1rem;
}

.transfer-filter-toggle {
    display: inline-flex;
    align-items: center;
    gap: 0.55rem;
    flex-wrap: wrap;
}

.transfer-market-card-container {
    display: none;
}

.transfer-mobile-card-container {
    display: none;
}

.transfer-market-card-list {
    display: grid;
    gap: 0.85rem;
}

.transfer-mobile-card-list {
    display: grid;
    gap: 0.85rem;
}

.transfer-market-card {
    display: grid;
    gap: 0.85rem;
    padding: 0.95rem;
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.light-mode .transfer-market-card {
    background: #f9fbff;
    border-color: rgba(15, 23, 42, 0.08);
}

.transfer-market-card-top {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 0.85rem;
}

.transfer-market-card-headline {
    min-width: 0;
    display: grid;
    gap: 0.45rem;
}

.transfer-market-card-name {
    padding: 0;
    margin: 0;
    border: none;
    background: none;
    box-shadow: none;
    color: inherit;
    cursor: pointer;
    text-align: left;
    font-size: 1.04rem;
    font-weight: 800;
}

.transfer-market-card-subline {
    display: flex;
    align-items: center;
    gap: 0.55rem;
    flex-wrap: wrap;
    color: var(--text-muted, #666);
}

.transfer-market-card-value {
    display: grid;
    gap: 0.18rem;
    text-align: right;
    flex-shrink: 0;
}

.transfer-market-card-offer {
    color: var(--text-muted, #666);
    font-size: 0.82rem;
    font-weight: 700;
}

.transfer-market-card-offer::before {
    content: "Angebot ";
    font-weight: 600;
}

.transfer-market-card-value-label,
.transfer-market-card-skill-label {
    font-size: 0.72rem;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: var(--text-muted, #666);
}

.transfer-market-card-skills {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.65rem;
}

.transfer-market-card-skill {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 0.6rem;
    padding: 0.65rem 0.75rem;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.07);
}

.light-mode .transfer-market-card-skill {
    background: rgba(15, 23, 42, 0.03);
    border-color: rgba(15, 23, 42, 0.08);
}

.transfer-market-card-status {
    display: grid;
    gap: 0.28rem;
}

.transfer-market-card-actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.65rem;
}

.transfer-market-card-action-slot .btn {
    width: 100%;
    justify-content: center;
}

.transfer-market-empty-card {
    padding: 1rem;
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
    color: var(--text-muted, #666);
}

.light-mode .transfer-market-empty-card {
    background: #f9fbff;
    border-color: rgba(15, 23, 42, 0.08);
}

.transfer-mobile-card,
.transfer-mobile-empty-card {
    padding: 0.95rem;
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.light-mode .transfer-mobile-card,
.light-mode .transfer-mobile-empty-card {
    background: #f9fbff;
    border-color: rgba(15, 23, 42, 0.08);
}

.transfer-mobile-empty-card {
    color: var(--text-muted, #666);
}

.transfer-mobile-card {
    display: grid;
    gap: 0.85rem;
}

.transfer-mobile-card-top {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 0.8rem;
}

.transfer-mobile-card-headline {
    display: grid;
    gap: 0.4rem;
    min-width: 0;
}

.transfer-mobile-card-name {
    padding: 0;
    margin: 0;
    border: none;
    background: none;
    box-shadow: none;
    color: inherit;
    cursor: pointer;
    text-align: left;
    font-size: 1.02rem;
    font-weight: 800;
}

.transfer-mobile-card-subline {
    display: flex;
    align-items: center;
    gap: 0.55rem;
    flex-wrap: wrap;
    color: var(--text-muted, #666);
    font-size: 0.88rem;
}

.transfer-mobile-card-status-pill {
    flex-shrink: 0;
    padding: 0.36rem 0.62rem;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.08);
    font-size: 0.78rem;
    font-weight: 800;
}

.light-mode .transfer-mobile-card-status-pill {
    background: rgba(15, 23, 42, 0.04);
    border-color: rgba(15, 23, 42, 0.08);
}

.transfer-mobile-card-meta {
    display: grid;
    gap: 0.55rem;
}

.transfer-mobile-card-row {
    display: grid;
    gap: 0.2rem;
}

.transfer-mobile-card-row span {
    font-size: 0.74rem;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: var(--text-muted, #666);
}

.transfer-mobile-card-row strong {
    font-size: 0.94rem;
    line-height: 1.35;
}

.transfer-mobile-card-note {
    font-size: 0.78rem;
    color: var(--text-muted, #666);
    line-height: 1.4;
}

.transfer-mobile-card-value {
    font-size: 0.94rem;
    line-height: 1.35;
    font-weight: 700;
}

.transfer-mobile-card-actions {
    display: grid;
    gap: 0.65rem;
}

.transfer-mobile-card-actions .btn {
    width: 100%;
    justify-content: center;
}

.transfer-subtabs {
    flex-wrap: wrap;
}

.transfer-subtabs .tab-btn,
.transfer-view .module-tabs .tab-btn {
    white-space: normal;
    text-align: center;
}

@media (max-width: 1024px) {

    .transfer-market-table-container .app-table th:nth-child(7),
    .transfer-market-table-container .app-table td:nth-child(7) {
        display: none;
    }
}

@media (max-width: 1100px) {

    .squad-top-cards,
    .sporttest-summary-grid {
        grid-template-columns: 1fr;
    }

    .overview-dashboard-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .overview-content-grid {
        grid-template-columns: 1fr;
    }

    .transfer-filter-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media (max-width: 900px) {

    .transfer-market-table-container .app-table th:nth-child(4),
    .transfer-market-table-container .app-table td:nth-child(4) {
        display: none;
    }

    .app-header {
        gap: 0.65rem;
        padding: 0.55rem 0.8rem;
        flex-wrap: nowrap;
        min-height: 58px;
    }

    .header-mobile-nav {
        display: block;
        order: 0;
    }

    .header-brand {
        order: 1;
        flex: 1 1 auto;
        min-width: 0;
    }

    .header-brand h1 {
        font-size: 0.95rem;
        line-height: 1.1;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    .header-info {
        order: 2;
        flex: 0 1 auto;
        min-width: 0;
        width: auto;
        gap: 0.45rem;
        justify-content: flex-end;
        flex-wrap: nowrap;
        font-size: 0.8rem;
    }

    .header-actions {
        order: 3;
        margin-left: 0;
        flex: 0 0 auto;
    }

    .club-name {
        max-width: 8.5rem;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    .club-balance {
        max-width: 7.5rem;
        overflow: hidden;
        text-overflow: ellipsis;
        padding: 0.16rem 0.45rem;
    }

    .user-name {
        display: none;
    }

    .btn-logout {
        padding: 0.36rem 0.55rem;
        min-height: 34px;
        border-radius: 10px;
        font-size: 0.78rem;
        line-height: 1;
    }

    .logout-label-full {
        display: none;
    }

    .logout-label-compact {
        display: inline;
    }

    .shell-sidebar-overlay {
        position: fixed;
        inset: 0;
        background: rgba(0, 0, 0, 0.52);
        opacity: 0;
        pointer-events: none;
        transition: opacity 0.22s ease;
        z-index: 70;
        display: block;
    }

    .shell-sidebar-container {
        position: fixed;
        top: 0;
        left: 0;
        bottom: 0;
        width: min(84vw, 320px);
        max-width: 320px;
        transform: translateX(-100%);
        transition: transform 0.24s ease;
        z-index: 80;
        box-shadow: 0 18px 42px rgba(0, 0, 0, 0.36);
    }

    .app-shell.sidebar-open .shell-sidebar-container {
        transform: translateX(0);
    }

    .app-shell.sidebar-open .shell-sidebar-overlay {
        opacity: 1;
        pointer-events: auto;
    }

    .shell-content {
        padding: 1rem;
    }

    .overview-hero {
        flex-direction: column;
        gap: 1rem;
        width: 100%;
    }

    .overview-hero-main {
        width: 100%;
        align-items: flex-start;
    }

    .overview-hero-actions {
        justify-content: flex-start;
    }

    .club-design-grid,
    .club-branding-form {
        grid-template-columns: 1fr;
    }

    .club-logo-crop-panel {
        grid-template-columns: 1fr;
    }

    .transfer-market-wealth {
        text-align: left;
        min-width: 0;
    }

    .transfer-toolbar-row {
        justify-content: flex-start;
    }

    .transfer-toolbar-actions {
        justify-content: flex-start;
        width: 100%;
    }

    .transfer-filter-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .teams-hero__content {
        grid-template-columns: 1fr;
        gap: 1.25rem;
    }

    .teams-hero__controls {
        justify-self: stretch;
        width: 100%;
    }

    .teams-hero {
        padding-top: 1.35rem;
    }

    .teams-hero::before {
        background-position: center right -2rem;
        background-size: auto 78%;
        opacity: 0.18;
    }

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

    .team-card__stat:nth-child(2) {
        padding-right: 0;
        border-right: 0;
    }

    .team-card__stat:nth-child(3) {
        padding-left: 0;
    }

    .team-context-controls {
        flex-direction: column;
        align-items: stretch;
    }

    .team-context-panel,
    .team-context-select,
    .team-create-btn {
        width: 100%;
    }

    .team-card {
        gap: 1.05rem;
    }

    .team-card__stats {
        margin-top: 0.25rem;
    }

    .messages-inbox-layout {
        grid-template-columns: 1fr;
        min-height: 0;
    }

    .messages-list-pane {
        border-right: 0;
        border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    }

    .messages-list-scroll {
        max-height: 360px;
    }

    .messages-empty-detail {
        min-height: 12rem;
    }

    .messages-detail-footer {
        align-items: stretch;
        flex-direction: column;
    }

    .messages-detail-actions {
        justify-content: flex-start;
    }
}

@media (max-width: 640px) {

    .squad-table-container {
        display: none;
    }

    .squad-mobile-card-container {
        display: block;
    }

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

    .squad-mobile-card-meta {
        grid-template-columns: 1fr;
    }

    .squad-mobile-card-actions {
        grid-template-columns: 1fr;
    }

    .sporttest-check-grid,
    .sporttest-mobile-test-grid {
        grid-template-columns: 1fr;
    }

    .team-overview-grid,
    .team-create-fact-grid {
        grid-template-columns: 1fr;
    }

    .teams-hero {
        border-radius: 14px;
        padding: 1rem 1rem 0;
    }

    .teams-hero::before {
        background-position: center right -4rem;
        background-size: auto 74%;
        opacity: 0.14;
    }

    .teams-hero::after {
        background: linear-gradient(90deg, rgba(7, 12, 10, 0.9), rgba(7, 12, 10, 0.72));
    }

    .teams-hero__title {
        font-size: clamp(2rem, 13vw, 3rem);
        line-height: 1;
        overflow-wrap: anywhere;
    }

    .teams-hero__description {
        font-size: 0.96rem;
    }

    .teams-hero__controls {
        padding: 0.85rem;
    }

    .teams-hero-tabs {
        gap: 1rem;
        margin-top: 1.5rem;
        padding-bottom: 0.85rem;
    }

    .teams-hero-tabs .tab-btn {
        font-size: 0.74rem;
    }

    .team-card {
        min-height: 0;
        padding: 1.25rem;
        border-radius: 14px;
    }

    .team-card::before {
        background-position: center right -4rem;
        background-size: auto 72%;
        opacity: 0.18;
    }

    .team-card::after {
        background:
            linear-gradient(90deg, rgba(10, 12, 12, 0.96) 0%, rgba(10, 12, 12, 0.82) 100%),
            radial-gradient(circle at 82% 38%, var(--team-card-glow), transparent 42%);
    }

    .team-card__title {
        font-size: clamp(1.75rem, 11vw, 2.45rem);
    }

    .team-card__header {
        gap: 0.8rem;
    }

    .team-card__crest {
        width: 2.65rem;
        height: 2.65rem;
        border-radius: 12px;
    }

    .team-card__type {
        font-size: 0.72rem;
    }

    .team-card__badge {
        max-width: 100%;
        font-size: 0.68rem;
        white-space: normal;
    }

    .team-card__details {
        font-size: 0.88rem;
    }

    .team-card__stats {
        grid-template-columns: 1fr;
        padding: 0.15rem 1rem;
    }

    .team-card__stat,
    .team-card__stat:first-child,
    .team-card__stat:nth-child(3),
    .team-card__stat:last-child {
        padding: 0.85rem 0;
        border-right: 0;
        border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    }

    .team-card__stat:last-child {
        border-bottom: 0;
    }

    .transfer-market-table-container .app-table th:nth-child(9),
    .transfer-market-table-container .app-table td:nth-child(9) {
        display: none;
    }

    #interest-table-container .app-table,
    #bid-table-container .app-table,
    #contract-table-container .app-table,
    #my-transfer-table-container .app-table,
    #incoming-loan-table-container .app-table,
    #recent-transfer-table-container .app-table,
    #transfer-leaderboard-table-container .app-table {
        display: none;
    }

    .transfer-mobile-card-container,
    .transfer-market-card-container {
        display: block;
    }

    .sporttest-table-container {
        display: none;
    }

    .sporttest-mobile-card-container {
        display: block;
    }

    .header-info {
        display: none;
    }

    .header-actions {
        width: auto;
        margin-left: auto;
    }

    .header-actions .btn-logout {
        width: auto;
        padding: 0.34rem 0.5rem;
        min-width: 0;
    }

    .shell-content {
        padding: 0.85rem;
    }

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

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

    .transfer-leaderboard-card-value {
        white-space: normal;
    }

    .transfer-leaderboard-view-pill {
        justify-items: start;
        text-align: left;
        width: 100%;
        min-width: 0;
    }

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

    .overview-club-mark {
        width: 100%;
        align-items: flex-start;
        gap: 0.85rem;
    }

    .overview-club-mark h2 {
        overflow-wrap: anywhere;
    }

    .overview-meta-line {
        gap: 0.45rem;
        font-size: 0.84rem;
    }

    .overview-meta-line span {
        flex: 1 1 100%;
    }

    .overview-metric-card {
        min-width: 0;
    }

    .module-tabs {
        margin-left: -0.15rem;
        margin-right: -0.15rem;
        padding-left: 0.15rem;
        padding-right: 0.15rem;
    }

    .module-tabs>.tab-btn {
        padding-inline: 0.72rem;
        font-size: 0.82rem;
    }

    .messages-list-header,
    .messages-detail-header,
    .message-list-item-inner {
        flex-direction: column;
        align-items: stretch;
    }

    .messages-list-header .btn {
        width: 100%;
        justify-content: center;
    }

    .messages-list-scroll {
        max-height: none;
    }

    .messages-detail-pane {
        padding: 1rem;
    }

    .message-list-date,
    .messages-detail-date {
        text-align: left;
        white-space: normal;
    }

    .messages-filter-row .message-filter-btn {
        flex: 1 1 calc(50% - 0.45rem);
        min-width: 0;
    }

    .messages-detail-actions,
    .messages-compose-actions {
        display: grid;
        grid-template-columns: 1fr;
    }

    .messages-detail-actions .btn,
    .messages-compose-actions .btn {
        width: 100%;
        justify-content: center;
    }

    .overview-mini-stats,
    .overview-list-inline {
        gap: 0.5rem;
    }

    .overview-action-item,
    .overview-event-item,
    .overview-summary-row {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.7rem;
    }

    .overview-event-badge {
        min-width: 0;
    }

    .overview-summary-inline {
        justify-content: flex-start;
        width: 100%;
    }

    .overview-summary-inline .btn {
        width: 100%;
    }

    .overview-action-item .btn {
        width: 100%;
    }

    .player-sporttest-view-tabs button,
    .player-sporttest-test-toggles button {
        flex: 1 1 calc(50% - 0.45rem);
        min-width: 0;
    }

    .transfer-tabs-card .module-tabs,
    .transfer-subtabs {
        gap: 0.4rem;
    }

    .transfer-tabs-card .tab-btn,
    .transfer-subtabs .tab-btn {
        flex: 1 1 calc(50% - 0.4rem);
        min-width: 0;
        padding: 0.75rem 0.9rem;
    }

    .transfer-filter-grid {
        grid-template-columns: 1fr;
    }

    .transfer-toolbar-actions {
        flex-direction: column;
        align-items: stretch;
    }

    .transfer-toolbar-actions .btn {
        justify-content: center;
        width: 100%;
    }

    .transfer-filter-toggle-row {
        justify-content: flex-start;
    }

    .transfer-market-table-container {
        display: none;
    }

    .transfer-market-card-container {
        display: block;
    }

    .transfer-market-card-top {
        flex-direction: column;
    }

    .transfer-market-card-value {
        text-align: left;
    }

    .transfer-market-card-skills,
    .transfer-market-card-actions {
        grid-template-columns: 1fr;
    }

    .transfer-leaderboard-tabs .tab-btn {
        flex: 1 1 calc(50% - 0.4rem);
        min-width: 0;
    }
}

@media (max-width: 420px) {
    .teams-hero {
        margin-inline: -0.15rem;
        padding: 0.9rem 0.85rem 0;
    }

    .teams-hero__title {
        font-size: clamp(1.8rem, 14vw, 2.45rem);
    }

    .teams-hero__controls {
        padding: 0.75rem;
        border-radius: 12px;
    }

    .team-context-select,
    .team-create-btn {
        min-height: 2.65rem;
        font-size: 0.88rem;
    }

    .teams-hero-tabs {
        margin-top: 1.15rem;
        gap: 0.9rem;
        padding-top: 0.9rem;
    }

    .teams-hero-tabs .tab-btn {
        font-size: 0.7rem;
    }

    .teams-hero-tabs .tab-btn.active::after {
        bottom: -0.88rem;
    }

    .team-card {
        margin-inline: -0.15rem;
        padding: 1rem;
        gap: 0.95rem;
    }

    .team-card__title {
        font-size: clamp(1.6rem, 12vw, 2.1rem);
    }

    .team-card__detail-icon,
    .team-card__stat-icon {
        width: 1.5rem;
        height: 1.5rem;
        border-radius: 7px;
    }

    .team-card__stats {
        padding-inline: 0.85rem;
    }

    .team-card__stat {
        gap: 0.6rem;
    }

    .team-card__stat-value {
        font-size: 0.98rem;
    }
}