:root {
    --m-red: #9f0f24;
    --m-red-deep: #5f0916;
    --m-gold: #b89652;
    --m-ink: #101921;
    --panel: rgba(20, 32, 43, 0.9);
    --panel-2: rgba(14, 24, 33, 0.88);
    --line: rgba(219, 231, 241, 0.12);
    --text: #edf3f8;
    --muted: #a9bac7;
    --ok: #2fae7a;
    --warn: #f2a43d;
    --bad: #ef5151;
    --m-accent: #c2a168;
}

* {
    box-sizing: border-box;
}

html,
body {
    margin: 0;
    min-height: 100%;
}

html {
    -webkit-text-size-adjust: 100%;
    text-size-adjust: 100%;
}

button,
input,
select,
textarea {
    font: inherit;
}

body {
    font-family: Cairo, Tahoma, sans-serif;
    color: var(--text);
    background:
        radial-gradient(circle at 82% 10%, rgba(159, 15, 36, 0.24), transparent 36%),
        radial-gradient(circle at 10% 90%, rgba(184, 150, 82, 0.13), transparent 34%),
        linear-gradient(124deg, #0d161d 0%, #132634 50%, #0d171f 100%);
    position: relative;
    overflow-x: hidden;
}

.bg-shape {
    position: fixed;
    z-index: 0;
    filter: blur(70px);
    opacity: 0.38;
    pointer-events: none;
}

.bg-shape-a {
    width: 440px;
    height: 440px;
    background: radial-gradient(circle, rgba(159, 15, 36, 0.64), transparent 70%);
    top: -100px;
    left: -100px;
}

.bg-shape-b {
    width: 390px;
    height: 390px;
    background: radial-gradient(circle, rgba(184, 150, 82, 0.42), transparent 70%);
    bottom: -120px;
    right: -90px;
}

.app-layout {
    position: relative;
    z-index: 2;
    display: grid;
    grid-template-columns: 290px 1fr;
    min-height: 100vh;
}

.sidebar {
    border-left: 1px solid var(--line);
    background: linear-gradient(176deg, rgba(98, 14, 30, 0.97), rgba(55, 9, 20, 0.98));
    padding: 24px 20px;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.brand {
    display: flex;
    align-items: center;
    gap: 14px;
}

.brand-logo {
    width: 62px;
    height: 62px;
    border-radius: 14px;
    object-fit: cover;
    border: 1px solid rgba(255, 255, 255, 0.25);
}

.brand-kicker {
    margin: 0;
    color: rgba(255, 255, 255, 0.8);
    font-size: 12px;
    letter-spacing: 1.5px;
    --m-red: #a3202d;
    --m-red-deep: #8f0e21;
    --m-gold: #f1c40f;
    --m-accent: #c2a168;
    margin: 2px 0 0;
    font-family: Teko, Cairo, sans-serif;
    font-size: 30px;
    line-height: 1;
    letter-spacing: 0.8px;
}

.side-nav {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.side-nav a {
    color: rgba(255, 255, 255, 0.86);
    text-decoration: none;
    padding: 11px 12px;
    border-radius: 10px;
    border: 1px solid transparent;
    transition: all 0.25s ease;
    display: block;
}

.side-nav a:hover,
.side-nav a.active {
    background: linear-gradient(135deg, var(--m-red), var(--m-red-deep)) !important;
    background: rgba(184, 150, 82, 0.12);
}

.sidebar-foot {
    margin-top: auto;
    border-top: 1px solid rgba(255, 255, 255, 0.15);
    padding-top: 18px;
}

.sidebar-foot p {
    margin: 0 0 10px;
    color: rgba(255, 255, 255, 0.84);
}

.identity-thumb {
    width: 100%;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.15);
    object-fit: cover;
    aspect-ratio: 16 / 10;
}

.content {
    padding: 26px;
    display: grid;
    gap: 16px;
    align-content: start;
}

.topbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
}

.topbar h2 {
    margin: 0;
    font-size: 30px;
    font-family: Teko, Cairo, sans-serif;
    letter-spacing: 0.8px;
}

.tagline {
    margin: 0;
    color: var(--muted);
    font-size: 13px;
}

.status-chip {
    border: 1px solid rgba(184, 150, 82, 0.46);
    background: rgba(184, 150, 82, 0.12);
    color: var(--m-gold);
    border-radius: 999px;
    padding: 7px 14px;
    white-space: nowrap;
}

.flash {
    border-radius: 12px;
    padding: 12px 14px;
    border: 1px solid transparent;
}

.flash-success {
    border-color: rgba(0, 191, 111, 0.35);
    background: rgba(0, 191, 111, 0.16);
    color: #b7ffd8;
}

.flash-error {
    border-color: rgba(239, 81, 81, 0.35);
    background: rgba(239, 81, 81, 0.16);
    color: #ffd4d4;
}

.panel {
    background: linear-gradient(170deg, var(--panel), var(--panel-2));
    border-radius: 16px;
    border: 1px solid var(--line);
    padding: 16px;
    box-shadow: 0 14px 34px rgba(2, 8, 14, 0.34);
}

.filter-panel {
    padding: 12px 16px;
}

.filter-toolbar {
    display: flex;
    gap: 15px;
    align-items: center;
}

.season-filter {
    display: flex;
    gap: 10px;
    align-items: center;
}

.season-filter-wide {
    flex: 1;
}

.season-filter-label {
    white-space: nowrap;
}

.season-filter label {
    color: var(--muted);
}

.season-filter select,
.season-filter button,
.opponent-search-form input,
.opponent-search-form button,
.upload-form input,
.upload-form select,
.upload-form textarea {
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: 10px;
    background: rgba(7, 17, 24, 0.72);
    color: var(--text);
    padding: 10px 12px;
    font-family: inherit;
}

.season-filter button,
.opponent-search-form button,
.submit-btn,
.btn-link {
    background: linear-gradient(130deg, var(--m-red), var(--m-red-deep));
    border: 1px solid rgba(184, 150, 82, 0.42);
    color: #fff;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.season-filter button:hover,
.opponent-search-form button:hover,
.submit-btn:hover,
.btn-link:hover {
    transform: translateY(-1px);
    box-shadow: 0 8px 22px rgba(95, 9, 22, 0.44);
}

.btn-export-pdf {
    background: linear-gradient(130deg, #ccb077, #ab8448);
    border: 1px solid rgba(184, 150, 82, 0.46);
    color: #1b2a36;
    border-radius: 10px;
    font-weight: 700;
    cursor: pointer;
    padding: 8px 14px;
    white-space: nowrap;
    transition: all 0.3s ease;
    box-shadow: 0 2px 10px rgba(184, 150, 82, 0.28);
}

.btn-export-pdf:hover {
    background: linear-gradient(130deg, #d4b77d, #b38d53) !important;
    box-shadow: 0 4px 16px rgba(184, 150, 82, 0.42);
    transform: translateY(-2px);
}

.btn-export-pdf:active {
    transform: translateY(0);
}

.btn-export-pdf.is-loading {
    opacity: 0.7;
    cursor: wait;
    pointer-events: none;
}

.stat-zoom-target {
    position: relative;
}

.stat-fullscreen-toggle {
    position: absolute;
    top: 10px;
    left: 10px;
    z-index: 5;
    border: 1px solid rgba(184, 150, 82, 0.45);
    background: rgba(6, 14, 20, 0.72);
    color: #e9f0f5;
    border-radius: 999px;
    padding: 4px 10px;
    font-size: 12px;
    line-height: 1.2;
    cursor: pointer;
    transition: background 0.25s ease, transform 0.2s ease;
}

.stat-fullscreen-toggle:hover {
    background: rgba(159, 15, 36, 0.42);
    transform: translateY(-1px);
}

.chart-panel .stat-fullscreen-toggle {
    top: 12px;
}

.stat-zoom-target:fullscreen,
.stat-zoom-target:-webkit-full-screen {
    width: 100%;
    height: 100%;
    margin: 0;
    padding: 20px;
    border-radius: 0;
    overflow: auto;
    background: linear-gradient(170deg, rgba(16, 28, 39, 0.98), rgba(11, 20, 30, 0.98));
}

.chart-panel:fullscreen canvas,
.chart-panel:-webkit-full-screen canvas,
.chart-panel.is-stat-fullscreen canvas {
    height: min(72vh, 760px) !important;
}

body.stat-fullscreen-open {
    overflow: hidden;
}

body.stat-fullscreen-open .is-stat-fullscreen {
    position: fixed !important;
    inset: 12px;
    z-index: 1200;
    margin: 0;
    overflow: auto;
    background: linear-gradient(170deg, rgba(16, 28, 39, 0.98), rgba(11, 20, 30, 0.98));
    border-color: rgba(184, 150, 82, 0.4);
}

body.stat-fullscreen-open .is-stat-fullscreen .stat-fullscreen-toggle {
    top: 14px;
    left: 14px;
    background: rgba(159, 15, 36, 0.62);
}

body.print-export-mode .bg-shape,
body.print-export-mode .sidebar,
body.print-export-mode .side-nav,
body.print-export-mode .sidebar-foot,
body.print-export-mode .filter-panel,
body.print-export-mode .btn-export-pdf,
body.print-export-mode .stat-fullscreen-toggle {
    display: none !important;
}

body.print-export-mode .app-layout {
    display: block !important;
}

body.print-export-mode .content {
    padding: 0 !important;
}

body.print-export-mode .panel {
    break-inside: avoid-page;
}

.kpi-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
}

.section-banner {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 12px;
    padding: 14px 16px;
    border-radius: 14px;
    border: 1px solid var(--line);
    background: linear-gradient(110deg, rgba(18, 30, 40, 0.9), rgba(11, 20, 28, 0.86));
}

.overview-banner {
    border-color: rgba(184, 150, 82, 0.36);
}

.attack-banner {
    border-color: rgba(159, 15, 36, 0.36);
}

.defense-banner {
    border-color: rgba(184, 150, 82, 0.3);
}

.section-kicker {
    margin: 0;
    color: var(--muted);
    font-size: 12px;
    letter-spacing: 1px;
    text-transform: uppercase;
}

.section-banner h3 {
    margin: 4px 0 0;
}

.section-banner span {
    color: #d5e1e9;
    font-size: 13px;
    text-align: left;
}

.kpi-card {
    border-radius: 14px;
    padding: 14px;
    border: 1px solid rgba(219, 231, 241, 0.11);
    background:
        radial-gradient(circle at 16% 20%, rgba(184, 150, 82, 0.14), transparent 45%),
        rgba(11, 22, 30, 0.9);
}

.kpi-card p {
    margin: 0;
    color: var(--muted);
    font-size: 13px;
}

.kpi-card h3 {
    margin: 8px 0 0;
    font-size: 30px;
    font-family: Teko, Cairo, sans-serif;
    line-height: 1;
    letter-spacing: 0.4px;
}

.kpi-card-advanced {
    position: relative;
    overflow: hidden;
}

.kpi-card-advanced::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.04), transparent 46%);
    pointer-events: none;
}

.kpi-card-advanced h3 {
    display: flex;
    align-items: end;
    gap: 8px;
    flex-wrap: wrap;
}

.kpi-card-advanced h3 small {
    font-size: 17px;
    color: #cbd8e1;
    font-family: Cairo, Tahoma, sans-serif;
    font-weight: 700;
}

.kpi-footnote {
    display: inline-block;
    margin-top: 8px;
    color: #c6d4df;
    font-size: 12px;
}

.attack-kpi-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.defense-kpi-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.attack-grid {
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}

.overview-grid,
.defense-grid {
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}

.leak-label {
    display: inline-block;
    margin-top: 8px;
    padding: 4px 8px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 700;
    border: 1px solid transparent;
}

.leak-good .leak-label {
    color: #b8ffd8;
    background: rgba(0, 191, 111, 0.18);
    border-color: rgba(0, 191, 111, 0.36);
}

.leak-caution .leak-label {
    color: #ffe2b0;
    background: rgba(242, 164, 61, 0.2);
    border-color: rgba(242, 164, 61, 0.38);
}

.leak-alert .leak-label {
    color: #ffd1d1;
    background: rgba(239, 81, 81, 0.2);
    border-color: rgba(239, 81, 81, 0.38);
}

.leak-neutral .leak-label {
    color: #d5e2ea;
    background: rgba(160, 174, 186, 0.18);
    border-color: rgba(160, 174, 186, 0.34);
}

.charts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 12px;
}

.chart-panel {
    display: grid;
    grid-template-rows: auto minmax(220px, 1fr) auto;
    gap: 10px;
    min-height: 360px;
}

.chart-panel h3 {
    margin: 0;
    font-size: 17px;
}

.chart-panel canvas {
    width: 100%;
    height: clamp(220px, 31vh, 300px) !important;
}

.chart-insight {
    margin: 0;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    padding-top: 10px;
    color: #c7d6e0;
    font-size: 13px;
    line-height: 1.5;
}

.panel-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
    margin-bottom: 12px;
}

.panel-head h3,
.panel h3 {
    margin: 0;
}

.table-wrap {
    overflow: auto;
    -webkit-overflow-scrolling: touch;
}

table {
    width: 100%;
    border-collapse: collapse;
    min-width: 640px;
}

thead th {
    text-align: right;
    color: #d2dce5;
    font-size: 13px;
    border-bottom: 1px solid var(--line);
    padding: 10px;
}

tbody td {
    padding: 10px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    color: #eaf1f6;
    font-size: 14px;
}

.empty-row {
    text-align: center;
    color: var(--muted);
    padding: 24px;
}

.pill {
    border-radius: 999px;
    padding: 5px 10px;
    border: 1px solid transparent;
    font-size: 12px;
    font-weight: 700;
}

.pill-win {
    color: #b6ffd8;
    background: rgba(0, 191, 111, 0.18);
    border-color: rgba(0, 191, 111, 0.36);
}

.pill-draw {
    color: #ffe4bd;
    background: rgba(242, 164, 61, 0.18);
    border-color: rgba(242, 164, 61, 0.36);
}

.pill-loss {
    color: #ffd0d0;
    background: rgba(239, 81, 81, 0.18);
    border-color: rgba(239, 81, 81, 0.36);
}

.pill-neutral {
    color: #e8edf2;
    background: rgba(173, 182, 192, 0.16);
    border-color: rgba(173, 182, 192, 0.3);
}

.btn-link {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 7px 12px;
    text-decoration: none;
    border-radius: 9px;
    font-size: 13px;
}

.upload-panel p {
    color: var(--muted);
}

.upload-form {
    display: grid;
    gap: 14px;
}

.opponents-layout {
    display: grid;
    gap: 12px;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.25fr);
}

.opponent-search-form {
    display: flex;
    gap: 10px;
    margin-bottom: 12px;
    align-items: center;
}

.opponent-search-form input {
    width: 100%;
}

.form-grid {
    display: grid;
    gap: 12px;
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.upload-form label {
    display: grid;
    gap: 8px;
    color: #d9e3ea;
    font-size: 14px;
}

.file-input-wrap input {
    padding: 8px;
}

.submit-btn {
    border-radius: 12px;
    padding: 12px 14px;
    font-size: 15px;
    font-weight: 700;
    width: fit-content;
}

.match-head-panel {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
}

.match-head-actions {
    display: flex;
    gap: 15px;
    align-items: center;
    flex-wrap: wrap;
}

.score-box {
    display: flex;
    align-items: center;
    gap: 10px;
    font-family: Teko, Cairo, sans-serif;
    font-size: 54px;
    line-height: 1;
    color: var(--m-gold);
    text-shadow: 0 8px 20px rgba(0, 0, 0, 0.35);
}

.score-box small {
    color: rgba(255, 255, 255, 0.55);
    font-size: 44px;
}

.heatmaps-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}

.heatmap-item {
    margin: 0;
    border: 1px solid var(--line);
    border-radius: 14px;
    overflow: hidden;
    background: rgba(10, 18, 25, 0.92);
}

.heatmap-item img {
    width: 100%;
    height: auto;
    display: block;
}

.heatmap-item figcaption {
    padding: 10px;
    color: var(--muted);
    font-size: 13px;
}

.meta-panel pre,
.error-box {
    max-height: 360px;
    overflow: auto;
    margin: 0;
    border-radius: 12px;
    padding: 12px;
    border: 1px solid var(--line);
    background: #0b141b;
    color: #d5e3eb;
    font-size: 12px;
    line-height: 1.5;
}

.json-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

@supports not (display: grid) {
    .app-layout,
    .kpi-grid,
    .charts-grid,
    .form-grid,
    .opponents-layout,
    .heatmaps-grid,
    .json-grid {
        display: flex;
        flex-wrap: wrap;
        gap: 12px;
    }

    .sidebar,
    .content,
    .kpi-card,
    .panel,
    .form-grid > *,
    .opponents-layout > * {
        width: 100%;
    }
}

@media (max-width: 1300px) {
    .charts-grid {
        grid-template-columns: 1fr 1fr;
    }

    .kpi-grid {
        grid-template-columns: 1fr 1fr;
    }

    .defense-kpi-grid {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 980px) {
    .app-layout {
        grid-template-columns: 1fr;
    }

    .topbar {
        flex-wrap: wrap;
        align-items: flex-start;
    }

    .filter-toolbar {
        flex-wrap: wrap;
        align-items: stretch;
    }

    .season-filter-wide {
        flex: 1 1 100%;
        flex-wrap: wrap;
    }

    .sidebar {
        border-left: 0;
        border-bottom: 1px solid var(--line);
    }

    .charts-grid,
    .json-grid,
    .heatmaps-grid,
    .form-grid,
    .opponents-layout {
        grid-template-columns: 1fr;
    }

    .kpi-grid,
    .defense-kpi-grid,
    .attack-kpi-grid {
        grid-template-columns: 1fr;
    }

    .content {
        padding: 14px;
    }

    .match-head-panel {
        flex-direction: column;
        align-items: flex-start;
    }

    .section-banner {
        flex-direction: column;
        align-items: flex-start;
    }

    .stat-fullscreen-toggle {
        top: 8px;
        left: 8px;
        padding: 3px 9px;
        font-size: 11px;
    }
}

@media print {
    body {
        background: #fff !important;
        color: #111 !important;
    }

    .bg-shape,
    .sidebar,
    .side-nav,
    .sidebar-foot,
    .filter-panel,
    .btn-export-pdf,
    .stat-fullscreen-toggle {
        display: none !important;
    }

    .app-layout {
        display: block !important;
    }

    .content {
        padding: 0 !important;
    }

    .panel {
        background: #fff !important;
        color: #111 !important;
        border: 1px solid #d9d9d9 !important;
        box-shadow: none !important;
        break-inside: avoid-page;
    }

    .panel * {
        color: #111 !important;
    }

    .chart-panel canvas {
        max-width: 100% !important;
        height: auto !important;
    }
}

/* Crimson Velocity refresh layer */
:root {
    --m-red: #a3202d;
    --m-red-deep: #8f0e21;
    --m-gold: #f1c40f;
    --m-ink: #131313;
    --panel: rgba(28, 27, 27, 0.88);
    --panel-2: rgba(22, 22, 22, 0.92);
    --line: rgba(89, 65, 64, 0.24);
    --text: #e5e2e1;
    --muted: #a99391;
    --ok: #1fb86e;
    --warn: #ffcb3b;
    --bad: #ee5463;
    --m-accent: #f1c40f;
}

body {
    font-family: Inter, Cairo, sans-serif;
    background:
        radial-gradient(circle at 78% 16%, rgba(163, 32, 45, 0.3), transparent 36%),
        radial-gradient(circle at 14% 80%, rgba(241, 196, 15, 0.1), transparent 30%),
        linear-gradient(180deg, #141414 0%, #131313 48%, #101010 100%);
}

h1,
h2,
h3,
.brand h1,
.topbar h2,
.section-banner h3,
.panel h3 {
    font-family: Manrope, Cairo, sans-serif;
    letter-spacing: 0.2px;
}

.tagline,
.brand-kicker,
.section-kicker,
.chart-insight,
.status-chip,
th,
.pill,
.kpi-footnote {
    font-family: "Space Grotesk", Cairo, sans-serif;
}

.bg-shape {
    opacity: 0.24;
    filter: blur(88px);
}

.app-layout {
    grid-template-columns: 304px 1fr;
}

.sidebar {
    background:
        linear-gradient(180deg, rgba(31, 20, 21, 0.98), rgba(23, 20, 20, 0.98)),
        radial-gradient(circle at 70% 0%, rgba(163, 32, 45, 0.18), transparent 40%);
    border-left: 1px solid rgba(89, 65, 64, 0.35);
    padding: 20px 16px;
    gap: 18px;
}

.brand {
    background: rgba(53, 53, 52, 0.36);
    border-radius: 12px;
    padding: 12px;
}

.brand-logo {
    border-radius: 10px;
    border: 1px solid rgba(241, 196, 15, 0.36);
    box-shadow: 0 0 0 1px rgba(163, 32, 45, 0.16) inset;
}

.brand-kicker {
    font-size: 11px;
    color: #bba7a4;
    letter-spacing: 1.8px;
}

.brand h1 {
    font-size: 27px;
    line-height: 1.05;
}

.brand-sub {
    margin: 4px 0 0;
    font-size: 11px;
    color: #f1c40f;
    letter-spacing: 1.6px;
    text-transform: uppercase;
}

.side-nav {
    margin-top: 6px;
    gap: 6px;
}

.side-nav a {
    display: flex;
    align-items: center;
    gap: 10px;
    border-radius: 10px;
    border: 0;
    background: transparent;
    color: #c5b7b5;
    padding: 11px 12px;
}

.side-nav a .material-symbols-outlined {
    font-size: 20px;
}

.side-nav a:hover,
.side-nav a.active {
    color: #ffffff;
    background: linear-gradient(130deg, rgba(163, 32, 45, 0.85), rgba(143, 14, 33, 0.85));
    box-shadow: 0 12px 22px rgba(163, 32, 45, 0.24);
}

.sidebar-foot {
    background: rgba(19, 19, 19, 0.52);
    border-top: 0;
    border-radius: 10px;
    padding: 12px;
}

.sidebar-foot p {
    color: #cbbfbe;
    margin: 0 0 8px;
    font-size: 12px;
}

.identity-thumb {
    border: 0;
    border-radius: 10px;
}

.content {
    padding: 24px;
    gap: 14px;
}

.topbar {
    position: sticky;
    top: 0;
    z-index: 10;
    padding: 14px 16px;
    border-radius: 12px;
    background: rgba(20, 20, 20, 0.82);
    backdrop-filter: blur(14px);
}

.topbar h2 {
    font-size: 33px;
}

.tagline {
    font-size: 11px;
    letter-spacing: 1.4px;
    color: #f1c40f;
    text-transform: uppercase;
}

.topbar-actions {
    display: flex;
    align-items: center;
    gap: 10px;
}

.status-chip {
    border: 0;
    padding: 9px 14px;
    font-size: 11px;
    letter-spacing: 1.2px;
    color: #f1c40f;
    background: rgba(241, 196, 15, 0.09);
}

.quick-tools {
    display: flex;
    align-items: center;
    gap: 6px;
}

.tool-btn {
    border: 0;
    width: 38px;
    height: 38px;
    border-radius: 10px;
    color: #d8d0cf;
    background: rgba(53, 53, 52, 0.65);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: transform 0.2s ease, background 0.2s ease;
}

.tool-btn:hover {
    transform: translateY(-1px);
    background: rgba(163, 32, 45, 0.76);
}

.panel {
    border: 0;
    border-radius: 12px;
    background:
        linear-gradient(180deg, rgba(30, 29, 29, 0.92), rgba(24, 24, 24, 0.96));
    box-shadow: 0 16px 34px rgba(6, 6, 6, 0.38);
}

.section-banner {
    border: 0;
    border-radius: 12px;
    background: rgba(28, 27, 27, 0.95);
}

.overview-banner {
    background:
        linear-gradient(92deg, rgba(31, 29, 29, 0.98), rgba(30, 29, 29, 0.95)),
        radial-gradient(circle at 90% 50%, rgba(163, 32, 45, 0.24), transparent 42%);
}

.attack-banner {
    background:
        linear-gradient(92deg, rgba(31, 29, 29, 0.98), rgba(30, 29, 29, 0.95)),
        radial-gradient(circle at 90% 50%, rgba(241, 196, 15, 0.18), transparent 42%);
}

.defense-banner {
    background:
        linear-gradient(92deg, rgba(31, 29, 29, 0.98), rgba(30, 29, 29, 0.95)),
        radial-gradient(circle at 90% 50%, rgba(163, 32, 45, 0.2), transparent 42%);
}

.section-kicker {
    color: #f1c40f;
    letter-spacing: 1.5px;
}

.section-banner span {
    color: #a79391;
}

.kpi-card {
    border: 0;
    border-radius: 12px;
    background: rgba(53, 53, 52, 0.48);
}

.kpi-card::before {
    display: none;
}

.kpi-card h3 {
    font-family: Manrope, Cairo, sans-serif;
    color: #f7f4f3;
}

.kpi-card small {
    color: #bfa4a1;
}

.chart-panel {
    background:
        linear-gradient(180deg, rgba(29, 29, 29, 0.9), rgba(20, 20, 20, 0.96));
}

.chart-panel h3 {
    margin-bottom: 14px;
}

.chart-panel canvas {
    min-height: 260px;
}

.chart-insight {
    color: #b0a09e;
}

.season-filter select,
.season-filter button,
.opponent-search-form input,
.opponent-search-form button,
.upload-form input,
.upload-form select,
.upload-form textarea {
    border: 0;
    border-radius: 9px;
    background: rgba(22, 22, 22, 0.95);
    color: #f3efee;
}

.season-filter select:focus,
.opponent-search-form input:focus,
.upload-form input:focus,
.upload-form select:focus,
.upload-form textarea:focus {
    outline: none;
    box-shadow: 0 2px 0 #f1c40f;
}

.season-filter button,
.opponent-search-form button,
.submit-btn,
.btn-link {
    border: 0;
    border-radius: 8px;
    background: linear-gradient(135deg, #a3202d, #8f0e21);
}

.btn-export-pdf {
    border: 0;
    border-radius: 8px;
    background: linear-gradient(135deg, #f1c40f, #d1a90a);
    color: #26191b;
}

.table-wrap {
    background: rgba(19, 19, 19, 0.6);
    border-radius: 10px;
}

thead th {
    color: #f1c40f;
    background: rgba(163, 32, 45, 0.2);
    border-bottom: 0;
}

tbody td {
    border-bottom: 1px solid rgba(89, 65, 64, 0.2);
}

tbody tr:hover {
    background: rgba(163, 32, 45, 0.1);
}

.pill {
    border: 0;
}

.pill-win {
    background: rgba(29, 128, 82, 0.26);
}

.pill-draw {
    background: rgba(241, 196, 15, 0.2);
}

.pill-loss {
    background: rgba(163, 32, 45, 0.28);
}

.match-head-panel {
    border: 0;
    background:
        linear-gradient(100deg, rgba(24, 24, 24, 0.96), rgba(43, 20, 23, 0.74));
}

.score-box {
    border: 0;
    background: rgba(53, 53, 52, 0.56);
}

.leak-good {
    box-shadow: inset 0 0 0 1px rgba(31, 184, 110, 0.45);
}

.leak-caution {
    box-shadow: inset 0 0 0 1px rgba(255, 203, 59, 0.4);
}

.leak-alert {
    box-shadow: inset 0 0 0 1px rgba(238, 84, 99, 0.48);
}

.heatmap-item {
    border: 0;
    border-radius: 10px;
    background: rgba(24, 24, 24, 0.95);
}

.heatmap-item figcaption {
    color: #b7a6a4;
}

.designs-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px;
}

.design-card {
    padding: 10px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.design-thumb-link {
    display: block;
    border-radius: 9px;
    overflow: hidden;
}

.design-thumb {
    width: 100%;
    aspect-ratio: 16 / 10;
    object-fit: cover;
    display: block;
    border-radius: 9px;
    background: rgba(20, 20, 20, 0.9);
}

.design-thumb-empty {
    display: flex;
    align-items: center;
    justify-content: center;
    color: #a79391;
    font-size: 13px;
}

.design-card-meta h3 {
    margin: 0;
    font-size: 18px;
}

.design-card-meta p {
    margin: 4px 0 10px;
    color: #a79391;
    font-size: 13px;
}

.design-card-actions {
    display: flex;
    justify-content: flex-start;
}

.screen-workspace {
    display: grid;
    grid-template-columns: 380px 1fr;
    gap: 14px;
    align-items: start;
}

.screen-control-panel {
    display: grid;
    gap: 12px;
}

.screen-control-panel h3 {
    margin: 0;
}

.screen-meta-grid {
    display: grid;
    gap: 10px;
}

.screen-meta-grid > div {
    background: rgba(53, 53, 52, 0.35);
    border-radius: 9px;
    padding: 10px;
    display: grid;
    gap: 2px;
}

.screen-meta-grid p {
    margin: 0;
    color: #a79391;
    font-size: 12px;
}

.screen-meta-grid strong {
    font-size: 20px;
    font-family: Manrope, Cairo, sans-serif;
}

.screen-meta-grid span {
    color: #c8b7b4;
    font-size: 12px;
}

.screen-meta-grid a {
    color: #f1c40f;
    text-decoration: none;
}

.screen-actions-row {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
}

.screen-actions-row .btn-link {
    text-align: center;
    padding: 9px 6px;
}

.screen-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.screen-tabs a {
    text-decoration: none;
    font-size: 12px;
    color: #d2c3c0;
    background: rgba(22, 22, 22, 0.86);
    border-radius: 999px;
    padding: 7px 10px;
}

.screen-tabs a.active,
.screen-tabs a:hover {
    color: #ffffff;
    background: linear-gradient(135deg, rgba(163, 32, 45, 0.92), rgba(143, 14, 33, 0.92));
}

.screen-frame-panel {
    padding: 8px;
}

.screen-frame {
    width: 100%;
    min-height: 80vh;
    border: 0;
    border-radius: 10px;
    background: #0f0f10;
}

.module-grid {
    display: grid;
    grid-template-columns: 1.05fr 1.35fr;
    gap: 14px;
}

.module-summary-panel,
.module-insights-panel,
.module-players-panel {
    display: grid;
    gap: 12px;
}

.module-summary-panel,
.module-insights-panel {
    align-content: start;
}

.module-kpi-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
}

.module-focus-points {
    margin: 0;
    padding: 0;
    list-style: none;
    display: grid;
    gap: 8px;
}

.module-focus-points li {
    border-radius: 8px;
    background: linear-gradient(95deg, rgba(163, 32, 45, 0.2), rgba(30, 28, 28, 0.72));
    padding: 8px 10px;
    color: #e2d8d6;
    font-size: 13px;
    border-right: 2px solid rgba(241, 196, 15, 0.6);
}

.module-kpi-item {
    border-radius: 9px;
    background: rgba(53, 53, 52, 0.38);
    padding: 10px;
    display: grid;
    gap: 4px;
}

.module-kpi-item p {
    margin: 0;
    font-size: 12px;
    color: #ad9795;
}

.module-kpi-item strong {
    font-size: 22px;
    font-family: Manrope, Cairo, sans-serif;
}

.module-kpi-item span {
    color: #f1c40f;
    font-size: 12px;
}

.module-filter-form {
    display: grid;
    gap: 8px;
}

.module-filter-form label {
    font-size: 12px;
    color: #bda8a5;
}

.module-filter-form select,
.module-filter-form button {
    border: 0;
    border-radius: 8px;
    background: rgba(22, 22, 22, 0.92);
    color: #f3efee;
    padding: 9px 10px;
}

.module-filter-form button {
    cursor: pointer;
    background: linear-gradient(135deg, #a3202d, #8f0e21);
}

.module-insights-list {
    margin: 0;
    padding: 0;
    list-style: none;
    display: grid;
    gap: 8px;
}

.module-insights-list li {
    border-radius: 8px;
    background: rgba(53, 53, 52, 0.38);
    padding: 8px 10px;
    color: #d9cfcd;
    line-height: 1.45;
}

.module-events-list {
    display: grid;
    gap: 8px;
    max-height: 360px;
    overflow: auto;
}

.module-board-panel,
.module-roster-panel,
.module-ops-panel {
    display: grid;
    gap: 10px;
}

.module-board-canvas {
    position: relative;
    min-height: 210px;
    border-radius: 10px;
    background:
        linear-gradient(180deg, rgba(22, 25, 24, 0.9), rgba(17, 19, 19, 0.95)),
        radial-gradient(circle at 50% 50%, rgba(241, 196, 15, 0.08), transparent 62%);
    overflow: hidden;
}

.module-board-canvas::before {
    content: "";
    position: absolute;
    inset: 10px;
    border: 1px solid rgba(89, 65, 64, 0.4);
    border-radius: 8px;
}

.board-zone {
    position: absolute;
    border-radius: 50%;
    filter: blur(20px);
}

.board-zone-a {
    width: 120px;
    height: 120px;
    right: 18%;
    top: 20%;
    background: rgba(163, 32, 45, 0.35);
}

.board-zone-b {
    width: 100px;
    height: 100px;
    right: 45%;
    top: 38%;
    background: rgba(241, 196, 15, 0.25);
}

.board-zone-c {
    width: 110px;
    height: 110px;
    left: 16%;
    bottom: 15%;
    background: rgba(163, 32, 45, 0.25);
}

.module-board-path {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
}

.module-board-note {
    margin: 0;
    color: #c5b6b3;
    font-size: 13px;
    line-height: 1.6;
}

.module-roster-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
}

.module-player-card {
    border-radius: 9px;
    background: rgba(53, 53, 52, 0.4);
    padding: 10px;
    display: grid;
    gap: 8px;
}

.module-player-card h4 {
    margin: 0;
    font-size: 14px;
    color: #f2eceb;
}

.module-player-metrics {
    display: grid;
    gap: 4px;
    font-size: 12px;
    color: #d0c2bf;
}

.module-recent-list {
    display: grid;
    gap: 8px;
}

.module-recent-item {
    display: grid;
    grid-template-columns: 1fr auto auto;
    gap: 8px;
    align-items: center;
    border-radius: 8px;
    background: rgba(22, 22, 22, 0.88);
    padding: 8px 10px;
    text-decoration: none;
    color: #dfd3d1;
}

.module-recent-item strong {
    font-size: 13px;
    color: #f3eceb;
}

.module-recent-item span {
    font-size: 12px;
    color: #bfaeab;
}

.module-recent-item em {
    font-style: normal;
    font-size: 11px;
    color: #f1c40f;
}

.module-primary-action {
    text-decoration: none;
    display: inline-flex;
    justify-content: center;
    align-items: center;
    border-radius: 8px;
    padding: 10px 12px;
    color: #fff;
    background: linear-gradient(135deg, #a3202d, #8f0e21);
}

.page-medical .module-primary-action {
    background: linear-gradient(135deg, #7e1220, #6a0f1b);
}

.page-scouting .module-primary-action,
.page-academy .module-primary-action {
    background: linear-gradient(135deg, #8f6f0f, #a7840f);
}

.page-warroom .module-primary-action {
    background: linear-gradient(135deg, #941826, #6f101d);
}

.individual-hero {
    display: grid;
    gap: 16px;
}

.individual-hero-top {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    align-items: start;
}

.individual-hero-sub {
    margin: 6px 0 0;
    color: #bcadaa;
    max-width: 720px;
}

.individual-select-form {
    min-width: 260px;
    display: grid;
    gap: 6px;
}

.individual-select-form label {
    color: #b8a5a3;
    font-size: 12px;
}

.individual-select-form select {
    border: 0;
    border-radius: 8px;
    background: rgba(22, 22, 22, 0.92);
    color: #f4efee;
    padding: 10px;
}

.individual-hero-stats {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 10px;
}

.individual-hero-stats article {
    background: rgba(53, 53, 52, 0.42);
    border-radius: 9px;
    padding: 10px;
    display: grid;
    gap: 2px;
}

.individual-hero-stats p {
    margin: 0;
    font-size: 12px;
    color: #af9f9c;
}

.individual-hero-stats strong {
    font-family: Manrope, Cairo, sans-serif;
    font-size: 26px;
    color: #f4efee;
}

.individual-hero-stats span {
    color: #f1c40f;
    font-size: 11px;
}

.individual-grid {
    display: grid;
    grid-template-columns: 1fr 1fr 0.9fr;
    gap: 14px;
}

.individual-card {
    display: grid;
    gap: 10px;
    align-content: start;
}

.individual-pitch {
    min-height: 260px;
    border-radius: 10px;
    position: relative;
    background: linear-gradient(180deg, rgba(18, 20, 20, 0.95), rgba(14, 15, 16, 0.95));
    overflow: hidden;
}

.individual-pitch::before {
    content: "";
    position: absolute;
    inset: 12px;
    border: 1px solid rgba(89, 65, 64, 0.36);
    border-radius: 8px;
}

.pitch-box {
    position: absolute;
    border: 1px solid rgba(89, 65, 64, 0.35);
}

.pitch-box-a {
    width: 70px;
    height: 130px;
    right: 26px;
    top: 66px;
}

.pitch-box-b {
    width: 70px;
    height: 130px;
    left: 26px;
    top: 66px;
}

.pitch-dot {
    position: absolute;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #f1c40f;
    box-shadow: 0 0 14px rgba(241, 196, 15, 0.8);
}

.pitch-dot.d1 { right: 38%; top: 34%; }
.pitch-dot.d2 { right: 44%; top: 54%; background: #a3202d; box-shadow: 0 0 12px rgba(163, 32, 45, 0.8); }
.pitch-dot.d3 { right: 30%; top: 43%; }
.pitch-dot.d4 { right: 52%; top: 60%; background: #a3202d; box-shadow: 0 0 12px rgba(163, 32, 45, 0.8); }
.pitch-dot.d5 { right: 34%; top: 67%; }

.individual-insights {
    align-content: start;
}

.command-grid {
    display: grid;
    grid-template-columns: 0.95fr 1.35fr;
    gap: 14px;
}

.command-export-panel,
.command-preview-panel,
.command-kpi-panel,
.command-feed-panel {
    display: grid;
    gap: 10px;
    align-content: start;
}

.command-form {
    display: grid;
    gap: 8px;
}

.command-form label {
    color: #bea9a7;
    font-size: 12px;
}

.command-form select {
    border: 0;
    border-radius: 8px;
    background: rgba(22, 22, 22, 0.94);
    color: #f4efee;
    padding: 10px;
}

.command-toggles {
    display: grid;
    gap: 6px;
    background: rgba(53, 53, 52, 0.32);
    border-radius: 8px;
    padding: 9px;
}

.command-toggles label {
    display: flex;
    align-items: center;
    gap: 7px;
    color: #ddd1cf;
    font-size: 13px;
}

.command-preview-sheet {
    border-radius: 10px;
    background: #f2f2f2;
    color: #1d1d1d;
    padding: 14px;
    min-height: 240px;
}

.command-preview-sheet p {
    margin: 0;
    font-size: 11px;
    color: #666;
}

.command-preview-sheet h4 {
    margin: 14px 0 10px;
    font-family: Manrope, Cairo, sans-serif;
    font-size: 30px;
    line-height: 1;
}

.command-preview-sheet ul {
    margin: 0;
    padding: 0;
    list-style: none;
    display: grid;
    gap: 6px;
    font-size: 14px;
}

/* Hybrid exact palette matching */
.page-hybrid {
    --hy-bg: #131313;
    --hy-surface-low: #1c1b1b;
    --hy-surface-highest: #353534;
    --hy-red: #a3202d;
    --hy-red-dark: #8f0e21;
    --hy-gold: #ebbf01;
    --hy-gold-soft: #ffdd74;
    --hy-text: #e5e2e1;
    --hy-muted: #e0bfbd;
    --hy-outline: #594140;
}

.page-hybrid body,
body.page-hybrid {
    background: #131313 !important;
    color: #e5e2e1;
}

.page-hybrid .content {
    gap: 18px;
}

.page-hybrid .section-banner {
    background: #1c1b1b !important;
    box-shadow: none !important;
    border: 0 !important;
}

.page-hybrid .panel {
    background: #1c1b1b !important;
    box-shadow: none !important;
    border: 0 !important;
}

.page-hybrid .panel::after,
.page-hybrid .section-banner::after,
.page-hybrid .kpi-card::after {
    display: none !important;
}

.hybrid-top-grid {
    display: grid;
    grid-template-columns: 1.45fr 0.7fr;
    gap: 14px;
}

.hybrid-main-chart {
    padding: 20px;
    border-radius: 12px;
}

.hybrid-title-row {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    align-items: start;
}

.hybrid-title-row h3 {
    margin: 0;
    color: #e5e2e1;
}

.hybrid-title-row p {
    margin: 6px 0 0;
    color: #e0bfbd;
    font-size: 13px;
}

.hybrid-legends {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.hybrid-legends span {
    color: #e0bfbd;
    font-size: 12px;
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

.dot {
    width: 9px;
    height: 9px;
    border-radius: 50%;
    display: inline-block;
}

.dot-red {
    background: #a3202d;
}

.dot-gold {
    background: #ffdd74;
}

.hybrid-chart-box {
    margin-top: 10px;
    border-radius: 10px;
    min-height: 330px;
    background: #201f1f;
    border: 1px solid rgba(89, 65, 64, 0.3);
    position: relative;
    overflow: hidden;
}

.hybrid-chart-box svg {
    width: 100%;
    height: 290px;
    display: block;
}

.hybrid-x-axis {
    display: flex;
    justify-content: space-between;
    color: #a88988;
    font-size: 11px;
    padding: 0 12px 8px;
}

.hybrid-alerts {
    display: grid;
    gap: 12px;
}

.hybrid-alert {
    padding: 14px;
    border-radius: 12px;
    border-right: 3px solid transparent !important;
}

.hybrid-alert h4 {
    margin: 0 0 8px;
    font-size: 15px;
}

.hybrid-alert p {
    margin: 0;
    color: #e0bfbd;
    font-size: 13px;
    line-height: 1.6;
}

.hybrid-alert div {
    margin-top: 10px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.hybrid-alert div span {
    font-size: 12px;
    font-weight: 700;
}

.hybrid-alert div small {
    font-size: 11px;
    background: #0e0e0e;
    color: #a88988;
    padding: 3px 8px;
    border-radius: 6px;
}

.hybrid-alert-red {
    border-right-color: #a3202d !important;
}

.hybrid-alert-red h4,
.hybrid-alert-red div span {
    color: #ffb3b1;
}

.hybrid-alert-gold {
    border-right-color: #ebbf01 !important;
}

.hybrid-alert-gold h4,
.hybrid-alert-gold div span {
    color: #ffdd74;
}

.hybrid-kpis {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 14px;
}

.hybrid-kpi-card {
    padding: 14px;
    border-radius: 12px;
    background: rgba(53, 53, 52, 0.6) !important;
}

.hybrid-kpi-card p {
    margin: 0 0 10px;
    font-size: 12px;
    color: #ebbf01;
}

.hybrid-kpi-card h3 {
    margin: 0;
    font-size: 36px;
    line-height: 1;
    color: #e5e2e1;
}

.hybrid-kpi-card h3 small {
    font-size: 14px;
    color: #a88988;
}

.hybrid-kpi-card span {
    margin-top: 8px;
    display: block;
    color: #e0bfbd;
    font-size: 12px;
}

.hybrid-bottom-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
}

.hybrid-events-panel,
.hybrid-heatmap-panel {
    padding: 16px;
}

.hybrid-events-list {
    display: grid;
    gap: 8px;
}

.hybrid-event-item {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 8px;
    padding: 9px;
    border-radius: 8px;
    background: #2a2a2a;
}

.hybrid-event-item span {
    color: #a88988;
    font-size: 12px;
}

.hybrid-event-item p {
    margin: 0;
    color: #e5e2e1;
    font-size: 13px;
}

.hybrid-heatmap-box {
    min-height: 260px;
    border-radius: 10px;
    position: relative;
    background: #1a2e1a;
    border: 1px solid rgba(255, 255, 255, 0.1);
    overflow: hidden;
}

.hybrid-heatmap-box .heat-lines {
    position: absolute;
    inset: 14px;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.hybrid-heatmap-box .heat-lines::before {
    content: "";
    position: absolute;
    left: 50%;
    top: 0;
    bottom: 0;
    border-left: 1px solid rgba(255, 255, 255, 0.2);
    transform: translateX(-50%);
}

.heat-layer {
    position: absolute;
    border-radius: 50%;
    filter: blur(35px);
}

.heat-red {
    width: 180px;
    height: 180px;
    right: 20%;
    top: 20%;
    background: rgba(163, 32, 45, 0.45);
}

.heat-gold {
    width: 210px;
    height: 210px;
    left: 20%;
    bottom: 8%;
    background: rgba(255, 221, 116, 0.38);
}

.heat-node {
    position: absolute;
    width: 9px;
    height: 9px;
    border-radius: 50%;
    background: #fff;
    box-shadow: 0 0 10px rgba(255, 255, 255, 0.9);
}

.heat-node.n1 {
    left: 52%;
    top: 32%;
}

.heat-node.n2 {
    left: 51%;
    bottom: 24%;
}

@media (max-width: 1100px) {
    .hybrid-top-grid,
    .hybrid-bottom-grid,
    .hybrid-kpis {
        grid-template-columns: 1fr;
    }
}

/* Global strict reference theme */
:root {
    --m-red: #a3202d;
    --m-red-deep: #8f0e21;
    --m-gold: #ebbf01;
    --m-ink: #131313;
    --panel: #1c1b1b;
    --panel-2: #1c1b1b;
    --line: rgba(89, 65, 64, 0.45);
    --text: #e5e2e1;
    --muted: #e0bfbd;
    --m-accent: #ebbf01;
}

body {
    background: #131313 !important;
    color: #e5e2e1 !important;
}

.bg-shape {
    display: none !important;
}

.app-layout {
    grid-template-columns: 256px 1fr !important;
}

.sidebar {
    background: #1c1b1b !important;
    border-left: 1px solid rgba(255, 255, 255, 0.06) !important;
    box-shadow: 20px 0 40px rgba(0, 0, 0, 0.45);
}

.brand {
    background: transparent !important;
}

.brand-kicker {
    color: #e0bfbd !important;
}

.brand h1 {
    color: #a3202d !important;
}

.brand-sub {
    color: #e0bfbd !important;
}

.content {
    background: #131313;
}

.topbar {
    background: #131313 !important;
    border: 0 !important;
    box-shadow: none !important;
    border-radius: 0 !important;
    padding-right: 0 !important;
    padding-left: 0 !important;
}

.topbar h2 {
    color: #a3202d;
    text-shadow: none !important;
}

.status-chip {
    background: rgba(163, 32, 45, 0.15) !important;
    color: #e5e2e1 !important;
    border: 1px solid rgba(163, 32, 45, 0.35);
}

.tool-btn {
    background: transparent !important;
    color: #e0bfbd !important;
}

.tool-btn:hover {
    background: #353534 !important;
    box-shadow: none !important;
}

.side-nav a {
    color: #e0bfbd !important;
    background: transparent !important;
}

.side-nav a:hover {
    background: #353534 !important;
    color: #fff !important;
}

.side-nav a.active {
    background: linear-gradient(135deg, #a3202d 0%, #8f0e21 100%) !important;
    color: #fff !important;
    border-right: 0 !important;
    box-shadow: none !important;
}

.panel,
.section-banner,
.kpi-card,
.chart-panel,
.module-kpi-item,
.module-focus-points li,
.module-insights-list li,
.module-event-item,
.module-player-card,
.module-recent-item,
.individual-hero-stats article,
.command-toggles {
    background: #1c1b1b !important;
    border: 0 !important;
    box-shadow: none !important;
}

.panel::after,
.section-banner::after,
.kpi-card::after {
    display: none !important;
}

.section-kicker,
.hybrid-kpi-card p,
.module-kpi-item span,
.module-event-item span,
.individual-hero-stats span {
    color: #ebbf01 !important;
}

.section-banner span,
.chart-insight,
.module-insights-list li,
.module-player-metrics,
.module-recent-item span,
.module-kpi-item p,
.hybrid-title-row p,
.hybrid-event-item p {
    color: #e0bfbd !important;
}

.btn-link,
.submit-btn,
.module-primary-action,
.command-form button,
.module-filter-form button {
    background: linear-gradient(135deg, #a3202d 0%, #8f0e21 100%) !important;
    box-shadow: none !important;
}

.btn-export-pdf {
    background: linear-gradient(135deg, #ebbf01 0%, #cea700 100%) !important;
    color: #231b00 !important;
    box-shadow: none !important;
}

thead th {
    background: #2a2a2a !important;
    color: #e0bfbd !important;
}

tbody tr:hover {
    background: #353534 !important;
}

.hybrid-grid-12 {
    display: grid;
    grid-template-columns: 1.45fr 0.7fr;
    gap: 14px;
}

.span-8,
.span-4 {
    min-width: 0;
}

@media (max-width: 1100px) {
    .app-layout {
        grid-template-columns: 1fr !important;
    }

    .hybrid-grid-12,
    .hybrid-kpis,
    .hybrid-bottom-grid {
        grid-template-columns: 1fr !important;
    }
}

/* Hybrid parity patch: top blocks + tactical events */
.page-hybrid .hybrid-alerts {
    gap: 14px;
}

.page-hybrid .hybrid-alert {
    background: #2a2a2a !important;
    border-radius: 10px;
    padding: 14px 15px;
    min-height: 118px;
    border-right-width: 2px !important;
    display: grid;
    align-content: start;
    gap: 8px;
}

.page-hybrid .hybrid-alert h4 {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin: 0;
    font-size: 14px;
    line-height: 1.35;
}

.page-hybrid .hybrid-alert-icon {
    font-size: 14px;
    opacity: 0.9;
}

.page-hybrid .hybrid-alert p {
    margin: 0;
    color: #d6cdcb;
    font-size: 12px;
    line-height: 1.6;
}

.page-hybrid .hybrid-alert div {
    margin-top: 0;
}

.page-hybrid .hybrid-alert div span {
    font-size: 12px;
}

.page-hybrid .hybrid-alert div small {
    font-size: 10px;
    background: #111;
    color: #b8abaa;
}

.page-hybrid .hybrid-kpis {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.page-hybrid .hybrid-kpi-card {
    background: #262626 !important;
    border-radius: 10px;
    padding: 14px 14px 12px;
    min-height: 112px;
    display: grid;
    align-content: start;
    gap: 8px;
}

.page-hybrid .hybrid-kpi-head {
    display: flex;
    justify-content: space-between;
    align-items: start;
    gap: 8px;
}

.page-hybrid .hybrid-kpi-head p {
    margin: 0;
    font-size: 11px;
    line-height: 1.2;
}

.page-hybrid .hybrid-kpi-icon {
    width: 22px;
    height: 22px;
    border-radius: 6px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    color: #1a1515;
}

.page-hybrid .hybrid-kpi-icon.heart {
    background: rgba(163, 32, 45, 0.35);
    color: #ffbfc4;
}

.page-hybrid .hybrid-kpi-icon.speed,
.page-hybrid .hybrid-kpi-icon.ball,
.page-hybrid .hybrid-kpi-icon.run {
    background: rgba(235, 191, 1, 0.28);
    color: #ffe27f;
}

.page-hybrid .hybrid-kpi-icon .material-symbols-outlined {
    font-size: 14px;
    line-height: 1;
}

.page-hybrid .hybrid-kpi-card h3 {
    margin: 0;
    font-size: 34px;
    font-weight: 700;
    line-height: 1;
    letter-spacing: 0.2px;
}

.page-hybrid .hybrid-kpi-card h3 small {
    font-size: 13px;
    color: #d5c8c7;
}

.page-hybrid .hybrid-kpi-card span {
    margin: 0;
    font-size: 12px;
    color: #f0e8e7;
}

.page-hybrid .hybrid-events-panel {
    background: #1f1f1f !important;
    border-radius: 10px;
}

.page-hybrid .hybrid-events-list {
    max-height: none;
    overflow: visible;
    display: grid;
    gap: 10px;
}

.page-hybrid .hybrid-event-item {
    display: grid;
    grid-template-columns: 22px 1fr auto;
    align-items: start;
    gap: 10px;
    background: #323232 !important;
    border-radius: 6px;
    padding: 10px 12px;
}

.page-hybrid .hybrid-event-item > span {
    color: #ded2d1;
    font-size: 12px;
    min-width: 26px;
    text-align: left;
}

.page-hybrid .event-icon {
    width: 18px;
    height: 18px;
    border-radius: 4px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-top: 1px;
}

.page-hybrid .event-icon .material-symbols-outlined {
    font-size: 13px;
    line-height: 1;
}

.page-hybrid .event-icon.warn {
    color: #f5b0b6;
}

.page-hybrid .event-icon.ok {
    color: #84efaf;
}

.page-hybrid .event-icon.note {
    color: #ffe27f;
}

.page-hybrid .event-copy {
    min-width: 0;
}

.page-hybrid .event-copy p {
    margin: 0;
    color: #ece5e5;
    font-size: 13px;
    line-height: 1.45;
}

.page-hybrid .event-copy small {
    display: block;
    margin-top: 2px;
    color: #bdb3b3;
    font-size: 10px;
    line-height: 1.4;
}

@media (max-width: 1100px) {
    .page-hybrid .hybrid-kpis {
        grid-template-columns: 1fr !important;
    }

    .page-hybrid .hybrid-alert {
        min-height: 0;
    }
}

/* Operational module layout for tactical/medical/scouting/setpieces/comparison/goalkeeper/warroom/academy/training */
.module-ops-page {
    display: grid;
    gap: 16px;
}

.module-ops-top-grid {
    display: grid;
    grid-template-columns: 1.45fr 0.7fr;
    gap: 14px;
}

.module-ops-main {
    display: grid;
    gap: 12px;
    align-content: start;
    padding: 16px;
}

.module-ops-alerts {
    display: grid;
    gap: 12px;
    align-content: start;
}

.module-ops-alert {
    background: #2a2a2a !important;
    border-radius: 10px;
    padding: 14px;
    min-height: 118px;
    border-right: 2px solid rgba(235, 191, 1, 0.55) !important;
    display: grid;
    gap: 7px;
    align-content: start;
}

.module-ops-alert h4 {
    margin: 0;
    font-size: 14px;
    color: #f2eaea;
}

.module-ops-alert p {
    margin: 0;
    font-size: 12px;
    line-height: 1.6;
    color: #d5c9c8;
}

.module-ops-alert div {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.module-ops-alert div strong {
    font-size: 20px;
    line-height: 1;
    color: #ffdd74;
}

.module-ops-alert div span {
    font-size: 11px;
    color: #b8a8a7;
}

.module-ops-kpis {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.module-ops-kpis .module-kpi-item {
    min-height: 106px;
    border-radius: 10px;
    background: #262626 !important;
    border: 1px solid rgba(163, 32, 45, 0.22);
}

.module-ops-kpis .module-kpi-item strong {
    font-size: 34px;
    line-height: 1;
}

.module-ops-bottom-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
}

.module-ops-bottom-grid-alt {
    grid-template-columns: 1.15fr 0.85fr 0.85fr;
}

.module-insights-panel,
.module-board-panel,
.module-players-panel,
.module-roster-panel,
.module-ops-panel {
    padding: 14px;
}

.module-events-list {
    max-height: 360px;
    overflow: auto;
    padding-left: 2px;
}

.module-event-item {
    grid-template-columns: auto 1fr;
    gap: 9px;
    border-radius: 7px;
    background: #323232 !important;
    padding: 9px 10px;
}

.module-event-item span {
    color: #ded2d1;
    font-size: 12px;
    min-width: 32px;
}

.module-event-item p {
    margin: 0;
    color: #ece4e4;
    font-size: 13px;
    line-height: 1.45;
}

.module-board-canvas {
    min-height: 250px;
}

.module-roster-grid {
    grid-template-columns: 1fr;
}

@media (max-width: 1200px) {
    .module-ops-bottom-grid-alt {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 1100px) {
    .module-ops-top-grid,
    .module-ops-bottom-grid,
    .module-ops-bottom-grid-alt,
    .module-ops-kpis {
        grid-template-columns: 1fr !important;
    }

    .module-ops-kpis .module-kpi-item strong {
        font-size: 30px;
    }
}

.module-quick-notes {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.module-quick-notes span {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    padding: 4px 10px;
    font-size: 11px;
    background: #353534;
    color: #ebbf01;
}

/* Per-page variants */
.module-variant-tactical .module-ops-alert {
    border-right-color: rgba(163, 32, 45, 0.85) !important;
}

.module-variant-tactical .module-ops-main {
    background: linear-gradient(160deg, rgba(28, 27, 27, 0.95), rgba(37, 22, 24, 0.92)) !important;
}

.module-variant-medical .module-ops-alert {
    border-right-color: rgba(124, 219, 156, 0.85) !important;
}

.module-variant-medical .module-kpi-item strong {
    color: #9ef0be;
}

.module-variant-medical .module-board-canvas {
    background:
        linear-gradient(180deg, rgba(16, 34, 24, 0.92), rgba(16, 24, 19, 0.95)),
        radial-gradient(circle at 50% 50%, rgba(124, 219, 156, 0.14), transparent 60%) !important;
}

.module-variant-scouting .module-ops-alert,
.module-variant-academy .module-ops-alert {
    border-right-color: rgba(235, 191, 1, 0.85) !important;
}

.module-variant-scouting .module-kpi-item strong,
.module-variant-academy .module-kpi-item strong {
    color: #ffdd74;
}

.module-variant-setpieces .module-ops-top-grid,
.module-variant-warroom .module-ops-top-grid {
    grid-template-columns: 1.2fr 0.9fr;
}

.module-variant-setpieces .module-ops-alert {
    border-right-color: rgba(255, 221, 116, 0.95) !important;
}

.module-variant-setpieces .module-event-item {
    background: linear-gradient(90deg, rgba(50, 50, 50, 0.95), rgba(62, 48, 23, 0.55)) !important;
}

.module-variant-comparison .module-ops-kpis {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.module-variant-comparison .module-kpi-item strong {
    color: #f2e5e4;
}

.module-variant-goalkeeper .module-board-canvas {
    background:
        linear-gradient(180deg, rgba(21, 28, 34, 0.92), rgba(16, 19, 23, 0.95)),
        radial-gradient(circle at 50% 50%, rgba(152, 207, 255, 0.12), transparent 60%) !important;
}

.module-variant-goalkeeper .module-ops-alert {
    border-right-color: rgba(152, 207, 255, 0.8) !important;
}

.module-variant-warroom .module-ops-main {
    background: linear-gradient(155deg, rgba(33, 20, 22, 0.96), rgba(20, 20, 21, 0.95)) !important;
}

.module-variant-warroom .module-ops-alert {
    border-right-color: rgba(163, 32, 45, 0.95) !important;
}

.module-variant-warroom .module-primary-action {
    background: linear-gradient(135deg, #8f0e21 0%, #600715 100%) !important;
}

.module-variant-training .module-kpi-item strong {
    color: #ffd86a;
}

.module-variant-training .module-board-canvas {
    background:
        linear-gradient(180deg, rgba(41, 34, 18, 0.9), rgba(21, 19, 16, 0.96)),
        radial-gradient(circle at 50% 50%, rgba(255, 216, 106, 0.14), transparent 60%) !important;
}

@media (max-width: 1100px) {
    .module-variant-comparison .module-ops-kpis {
        grid-template-columns: 1fr !important;
    }
}

/* Tactical page parity */
.tactical-page {
    display: grid;
    gap: 16px;
}

.tactical-match-header {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    gap: 12px;
    align-items: center;
    padding: 14px 16px;
}

.tactical-team-block {
    display: grid;
    gap: 2px;
}

.tactical-team-block strong {
    font-size: 18px;
}

.tactical-team-block small {
    color: #e0bfbd;
    font-size: 10px;
    letter-spacing: 0.12em;
}

.tactical-team-away {
    text-align: left;
}

.tactical-score-block {
    text-align: center;
    display: grid;
    gap: 4px;
}

.tactical-score-block b {
    font-size: 28px;
    line-height: 1;
}

.tactical-score-block span {
    color: #ebbf01;
    font-size: 11px;
}

.tactical-kpi-row {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 14px;
}

.tactical-kpi-card {
    padding: 14px;
    background: #2a2a2a !important;
    display: grid;
    gap: 6px;
}

.tactical-kpi-card p {
    margin: 0;
    color: #e0bfbd;
    font-size: 12px;
}

.tactical-kpi-card h3 {
    margin: 0;
    font-size: 34px;
}

.tactical-kpi-card h3 small {
    font-size: 13px;
}

.tactical-kpi-card span {
    color: #ebbf01;
    font-size: 11px;
}

.tactical-momentum-panel {
    padding: 18px;
}

.tactical-head-row {
    display: flex;
    justify-content: space-between;
    gap: 10px;
    align-items: end;
    margin-bottom: 10px;
}

.tactical-head-row h3 {
    margin: 0;
}

.tactical-head-row p {
    margin: 4px 0 0;
    color: #e0bfbd;
    font-size: 12px;
}

.tactical-legend {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.tactical-legend span {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 11px;
    color: #e0bfbd;
}

.tactical-momentum-bars {
    height: 260px;
    display: grid;
    grid-template-columns: repeat(19, minmax(0, 1fr));
    align-items: end;
    gap: 4px;
    background: #1c1b1b;
    border-radius: 10px;
    padding: 10px;
}

.tactical-momentum-bars .bar {
    border-radius: 2px 2px 0 0;
}

.tactical-momentum-bars .bar.red {
    background: linear-gradient(180deg, #a3202d, #8f0e21);
}

.tactical-momentum-bars .bar.gold {
    background: #ebbf01;
}

.tactical-axis {
    display: flex;
    justify-content: space-between;
    margin-top: 8px;
    color: #a88988;
    font-size: 11px;
}

.tactical-bottom-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px;
}

.tactical-story-card {
    padding: 14px;
    display: grid;
    gap: 10px;
}

.tactical-story-card h4 {
    margin: 0;
}

.tactical-heatmap-box {
    position: relative;
    min-height: 160px;
    border-radius: 10px;
    overflow: hidden;
    background: #163219;
}

.tactical-story-card p {
    margin: 0;
    color: #e0bfbd;
    font-size: 13px;
    line-height: 1.55;
}

.tactical-player-card .player-name {
    color: #ebbf01;
    font-weight: 700;
}

.tactical-player-card .player-metric-row {
    display: flex;
    justify-content: space-between;
    font-size: 12px;
}

.tactical-player-card .player-progress {
    background: #353534;
    border-radius: 999px;
    height: 5px;
    overflow: hidden;
}

.tactical-player-card .player-progress i {
    display: block;
    height: 100%;
    background: #ebbf01;
}

.tactical-video-card {
    align-content: space-between;
}

.tactical-cta {
    width: 100%;
}

/* Medical page parity */
.medical-page {
    display: grid;
    gap: 16px;
}

.medical-grid {
    display: grid;
    grid-template-columns: repeat(12, minmax(0, 1fr));
    gap: 14px;
}

.medical-injury-overview {
    grid-column: span 7;
    padding: 18px;
}

.medical-readiness {
    grid-column: span 5;
    padding: 18px;
    border-right: 3px solid #ebbf01;
}

.medical-recovery-programs {
    grid-column: span 8;
    padding: 18px;
}

.medical-timeline {
    grid-column: span 4;
    padding: 18px;
}

.medical-mini-kpis {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 8px;
}

.medical-mini-kpis div {
    background: #353534;
    border-radius: 8px;
    padding: 10px;
    display: grid;
    gap: 4px;
}

.medical-mini-kpis p {
    margin: 0;
    color: #bdb1b0;
    font-size: 11px;
}

.medical-mini-kpis strong {
    font-size: 24px;
}

.medical-bars {
    margin-top: 10px;
    height: 92px;
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    align-items: end;
    gap: 4px;
}

.medical-bars i {
    display: block;
    border-radius: 3px 3px 0 0;
    background: linear-gradient(180deg, #a3202d, #8f0e21);
}

.medical-readiness-list {
    display: grid;
    gap: 10px;
}

.medical-readiness-item {
    display: grid;
    gap: 5px;
}

.medical-readiness-item .name-row {
    display: flex;
    justify-content: space-between;
    font-size: 12px;
}

.medical-readiness-item .line,
.medical-program-card .line {
    background: #353534;
    border-radius: 999px;
    height: 5px;
    overflow: hidden;
}

.medical-readiness-item .line i,
.medical-program-card .line i {
    display: block;
    height: 100%;
    background: #ebbf01;
}

.medical-program-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
}

.medical-program-card {
    background: #353534;
    border-radius: 10px;
    padding: 12px;
    display: grid;
    gap: 8px;
}

.medical-program-card .title-row {
    display: flex;
    justify-content: space-between;
    gap: 10px;
}

.medical-program-card .title-row h4 {
    margin: 0;
    font-size: 15px;
}

.medical-program-card .title-row span {
    font-size: 10px;
    color: #ebbf01;
}

.medical-program-card p {
    margin: 0;
    color: #d5c9c8;
    font-size: 12px;
    line-height: 1.5;
}

.medical-program-card .prog-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.medical-program-card .prog-row b {
    color: #ebbf01;
}

.medical-program-card .prog-row small {
    color: #bfb2b1;
}

.medical-timeline-list {
    display: grid;
    gap: 8px;
}

.medical-timeline .timeline-item {
    border-radius: 8px;
    background: #353534;
    padding: 10px;
    display: grid;
    gap: 4px;
}

.medical-timeline .timeline-item b {
    color: #ebbf01;
    font-size: 12px;
}

.medical-timeline .timeline-item p {
    margin: 0;
    color: #d8cccb;
    font-size: 12px;
    line-height: 1.45;
}

@media (max-width: 1100px) {
    .tactical-kpi-row,
    .tactical-bottom-grid {
        grid-template-columns: 1fr;
    }

    .medical-grid {
        grid-template-columns: 1fr;
    }

    .medical-injury-overview,
    .medical-readiness,
    .medical-recovery-programs,
    .medical-timeline {
        grid-column: auto;
    }

    .medical-mini-kpis,
    .medical-program-grid {
        grid-template-columns: 1fr;
    }
}

/* War room page */
.warroom-page,
.academy-page,
.goalkeeper-page,
.training-page,
.scouting-page,
.comparison-page,
.setpieces-page {
    display: grid;
    gap: 16px;
}

.warroom-top-grid,
.setpieces-grid,
.goalkeeper-grid,
.scouting-grid,
.training-grid,
.academy-grid,
.comparison-grid,
.warroom-bottom-grid {
    display: grid;
    gap: 14px;
}

.warroom-top-grid {
    grid-template-columns: 1.3fr 0.7fr;
}

.warroom-command-panel,
.warroom-action-card,
.warroom-live-feed,
.warroom-decision-queue,
.academy-track-panel,
.academy-watchlist,
.goalkeeper-map,
.goalkeeper-events,
.training-load-chart,
.training-events,
.scouting-watchlist,
.scouting-insights,
.comparison-card,
.comparison-events,
.setpieces-board,
.setpieces-outcomes {
    padding: 14px;
}

.warroom-command-kpis {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
}

.warroom-command-kpis div {
    background: #2a2a2a;
    border-radius: 8px;
    padding: 10px;
    display: grid;
    gap: 4px;
}

.warroom-command-kpis p {
    margin: 0;
    color: #e0bfbd;
    font-size: 11px;
}

.warroom-command-kpis strong {
    font-size: 24px;
}

.warroom-scenarios {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
}

.warroom-scenarios button {
    border: 0;
    background: #353534;
    color: #e5e2e1;
    border-radius: 8px;
    padding: 9px 8px;
    font-size: 12px;
    cursor: pointer;
}

.warroom-action-card {
    background: #2a2a2a !important;
    display: grid;
    align-content: space-between;
    gap: 10px;
}

.warroom-action-card h4,
.warroom-action-card p {
    margin: 0;
}

.warroom-action-card p {
    color: #e0bfbd;
    font-size: 13px;
    line-height: 1.55;
}

.warroom-bottom-grid,
.setpieces-grid,
.goalkeeper-grid,
.training-grid,
.scouting-grid {
    grid-template-columns: 1fr 1fr;
}

/* Academy */
.academy-kpis {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 14px;
}

.academy-grid {
    grid-template-columns: 1.2fr 0.8fr;
}

.academy-chart {
    min-height: 260px;
    border-radius: 10px;
    background:
        radial-gradient(circle at 20% 70%, rgba(163, 32, 45, 0.32), transparent 45%),
        radial-gradient(circle at 70% 30%, rgba(235, 191, 1, 0.26), transparent 45%),
        #1c1b1b;
}

/* Comparison */
.comparison-grid {
    grid-template-columns: 1fr 1fr;
}

.comparison-card {
    background: #2a2a2a !important;
    display: grid;
    gap: 8px;
}

.comparison-card h4 {
    margin: 0;
    font-size: 18px;
    color: #ebbf01;
}

.comparison-metric {
    display: flex;
    justify-content: space-between;
    background: #353534;
    border-radius: 7px;
    padding: 8px 10px;
    font-size: 13px;
}

/* Responsive for new pages */
@media (max-width: 1100px) {
    .warroom-top-grid,
    .setpieces-grid,
    .goalkeeper-grid,
    .scouting-grid,
    .training-grid,
    .academy-grid,
    .comparison-grid,
    .warroom-bottom-grid,
    .academy-kpis,
    .warroom-command-kpis,
    .warroom-scenarios {
        grid-template-columns: 1fr !important;
    }
}

/* Pixel pass: War Room + Academy */
.warroom-px {
    gap: 18px;
}

.warroom-context {
    display: flex;
    justify-content: space-between;
    align-items: end;
    gap: 12px;
}

.warroom-context h3 {
    margin: 0;
    font-size: 36px;
    font-weight: 800;
    letter-spacing: -0.3px;
}

.warroom-context p {
    margin: 6px 0 0;
    color: #e0bfbd;
    font-size: 13px;
}

.warroom-meta {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    background: #1c1b1b;
    border-radius: 8px;
    padding: 8px 12px;
}

.warroom-meta .sep {
    width: 1px;
    height: 26px;
    background: rgba(255, 255, 255, 0.1);
}

.warroom-meta small {
    display: block;
    color: #a79a99;
    font-size: 10px;
    text-transform: uppercase;
}

.warroom-meta b {
    font-size: 15px;
    color: #ebbf01;
}

.warroom-kpi-trio {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px;
}

.wr-kpi {
    padding: 16px;
    background: #1c1b1b !important;
    border-right: 3px solid #a3202d;
    display: grid;
    gap: 10px;
}

.wr-kpi.kpi-gold {
    border-right-color: #ebbf01;
}

.wr-kpi.kpi-gold-soft {
    border-right-color: #d2a90d;
}

.wr-kpi-head span {
    color: #9f9391;
    font-size: 10px;
    letter-spacing: 0.11em;
    text-transform: uppercase;
}

.wr-split {
    display: flex;
    justify-content: space-between;
    gap: 10px;
}

.wr-split small {
    display: block;
    color: #9f9391;
    font-size: 10px;
}

.wr-split b {
    font-size: 30px;
    line-height: 1;
}

.wr-split b.mute {
    color: #9f9391;
}

.wr-line {
    height: 4px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.08);
    overflow: hidden;
}

.wr-line i {
    display: block;
    height: 100%;
    background: linear-gradient(90deg, #a3202d, #8f0e21);
}

.kpi-gold .wr-line i,
.kpi-gold-soft .wr-line i {
    background: #ebbf01;
}

.warroom-mid-grid {
    display: grid;
    grid-template-columns: 0.75fr 1.25fr;
    gap: 14px;
}

.wr-origin-card,
.wr-pitch-card,
.wr-watch-card,
.wr-advice-card {
    padding: 16px;
}

.wr-origin-card h4,
.wr-pitch-card h4,
.wr-watch-card h4,
.wr-advice-card h4 {
    margin: 0 0 12px;
}

.wr-origin-item {
    display: grid;
    grid-template-columns: auto auto;
    gap: 6px;
    align-items: center;
    margin-bottom: 12px;
}

.wr-origin-item span,
.wr-origin-item b {
    font-size: 12px;
}

.wr-origin-item b {
    justify-self: end;
}

.wr-origin-item div {
    grid-column: 1 / -1;
    height: 10px;
    border-radius: 2px;
    background: #353534;
    overflow: hidden;
}

.wr-origin-item div i {
    display: block;
    height: 100%;
    background: linear-gradient(90deg, #a3202d, #8f0e21);
}

.wr-origin-item.active div i {
    background: linear-gradient(90deg, #ebbf01, #cda700);
}

.wr-origin-card p {
    margin: 2px 0 0;
    color: #b5a8a7;
    font-size: 11px;
    line-height: 1.5;
    font-style: italic;
}

.wr-pitch {
    min-height: 390px;
    border-radius: 8px;
    background:
        linear-gradient(to bottom, rgba(255, 255, 255, 0.06) 1px, transparent 1px) 0 0/40px 40px,
        linear-gradient(to right, rgba(255, 255, 255, 0.06) 1px, transparent 1px) 0 0/40px 40px,
        rgba(26, 46, 26, 0.22);
    position: relative;
    overflow: hidden;
}

.wr-pitch .mark {
    position: absolute;
    font-size: 10px;
    border: 1px dashed rgba(235, 191, 1, 0.5);
    color: #ebbf01;
    border-radius: 8px;
    padding: 6px 8px;
    background: rgba(20, 20, 20, 0.5);
}

.wr-pitch .mark.m1 {
    top: 28%;
    right: 20%;
}

.wr-pitch .mark.m2 {
    bottom: 22%;
    left: 28%;
}

.warroom-bottom-grid-2 {
    display: grid;
    grid-template-columns: 1.3fr 0.7fr;
    gap: 14px;
}

.wr-watch-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
}

.wr-player-box {
    background: #2a2a2a;
    border-radius: 8px;
    padding: 10px;
    display: grid;
    gap: 8px;
}

.wr-player-box strong {
    font-size: 13px;
}

.wr-player-box .wr-mini {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 5px;
}

.wr-player-box .wr-mini span {
    font-size: 10px;
    background: #1c1b1b;
    border-radius: 5px;
    padding: 5px;
    text-align: center;
    color: #bcaeac;
}

.wr-player-box .wr-mini b {
    color: #ebbf01;
    display: block;
}

.wr-advice-card {
    background: rgba(163, 32, 45, 0.1) !important;
    border-right: 3px solid #a3202d;
    display: grid;
    align-content: start;
    gap: 10px;
}

.wr-advice-card ul {
    margin: 0;
    padding: 0;
    list-style: none;
    display: grid;
    gap: 8px;
}

.wr-advice-card li {
    color: #ece4e4;
    font-size: 13px;
    line-height: 1.5;
}

/* Academy pixel pass */
.academy-px {
    gap: 18px;
}

.academy-headline h3 {
    margin: 0;
    font-size: 28px;
    font-weight: 800;
}

.academy-headline p {
    margin: 4px 0 0;
    color: #b8abaa;
    font-size: 12px;
}

.academy-kpi-row {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 14px;
}

.academy-kpi {
    padding: 16px;
    background: #1c1b1b !important;
    position: relative;
    overflow: hidden !important;
}

.academy-kpi::before {
    content: "";
    position: absolute;
    width: 88px;
    height: 88px;
    border-radius: 50%;
    background: rgba(163, 32, 45, 0.15);
    top: -28px;
    left: -28px;
}

.academy-kpi p {
    margin: 0;
    font-size: 13px;
    color: #d0c3c2;
    position: relative;
}

.academy-kpi h4 {
    margin: 6px 0 0;
    font-size: 40px;
    line-height: 1;
    position: relative;
}

.academy-kpi h4 small {
    font-size: 20px;
}

.academy-kpi span {
    position: relative;
    color: #ebbf01;
    font-size: 11px;
    font-weight: 700;
}

.academy-main-grid {
    display: grid;
    grid-template-columns: 1fr 0.72fr;
    gap: 14px;
}

.academy-development,
.academy-watchlist,
.academy-upcoming,
.academy-notes {
    padding: 16px;
}

.academy-dev-plot {
    min-height: 400px;
    border-radius: 8px;
    position: relative;
    overflow: hidden;
    background:
        linear-gradient(to top, rgba(255, 255, 255, 0.08) 1px, transparent 1px) 0 0/100% 40px,
        linear-gradient(to right, rgba(255, 255, 255, 0.08) 1px, transparent 1px) 0 0/40px 100%,
        #1c1b1b;
}

.academy-dev-plot::before,
.academy-dev-plot::after {
    content: "";
    position: absolute;
    inset: 18px;
    border-radius: 8px;
    pointer-events: none;
}

.academy-dev-plot::before {
    background: linear-gradient(180deg, rgba(163, 32, 45, 0.32), transparent 70%);
    clip-path: polygon(0 74%, 18% 58%, 38% 65%, 60% 40%, 100% 10%, 100% 100%, 0 100%);
}

.academy-dev-plot::after {
    background: linear-gradient(180deg, rgba(235, 191, 1, 0.28), transparent 70%);
    clip-path: polygon(0 86%, 24% 82%, 50% 78%, 74% 60%, 100% 44%, 100% 100%, 0 100%);
}

.academy-watch-items {
    display: grid;
    gap: 8px;
}

.academy-watch-item {
    display: grid;
    grid-template-columns: 42px 1fr auto;
    gap: 8px;
    align-items: center;
    background: #2a2a2a;
    border-radius: 8px;
    padding: 8px;
}

.academy-watch-item .tag {
    width: 42px;
    height: 42px;
    border-radius: 7px;
    background: #353534;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #a3202d;
    font-weight: 800;
}

.academy-watch-item .copy strong {
    font-size: 13px;
}

.academy-watch-item .copy small {
    display: block;
    color: #b8abaa;
    font-size: 10px;
    margin-top: 2px;
}

.academy-watch-item b {
    color: #ebbf01;
    font-size: 16px;
}

.academy-footer-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
}

.academy-fixtures {
    display: grid;
    gap: 8px;
}

.academy-fixture-item {
    background: rgba(53, 53, 52, 0.4);
    border-radius: 8px;
    padding: 10px;
    display: grid;
    gap: 4px;
}

.academy-fixture-item .date {
    color: #ebbf01;
    font-size: 11px;
}

.academy-fixture-item .teams {
    font-size: 13px;
}

.academy-notes p {
    margin: 0;
    color: #e0bfbd;
    font-size: 13px;
    line-height: 1.6;
}

.academy-note-actions {
    margin-top: 10px;
    display: flex;
    gap: 8px;
}

.academy-note-actions button {
    border: 0;
    border-radius: 7px;
    padding: 8px 10px;
    font-size: 11px;
    color: #fff;
    background: #a3202d;
    cursor: pointer;
}

.academy-note-actions button:last-child {
    background: #353534;
}

@media (max-width: 1100px) {
    .warroom-context,
    .academy-headline {
        flex-direction: column;
        align-items: start;
    }

    .warroom-kpi-trio,
    .warroom-mid-grid,
    .warroom-bottom-grid-2,
    .wr-watch-grid,
    .academy-kpi-row,
    .academy-main-grid,
    .academy-footer-grid {
        grid-template-columns: 1fr !important;
    }
}

.module-event-item {
    border-radius: 8px;
    background: rgba(22, 22, 22, 0.86);
    padding: 8px 10px;
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 8px;
    align-items: start;
}

.module-event-item span {
    color: #f1c40f;
    font-size: 12px;
    white-space: nowrap;
}

.module-event-item p {
    margin: 0;
    color: #d7cbca;
    font-size: 13px;
}

@media (max-width: 980px) {
    .topbar {
        position: static;
    }

    .topbar-actions {
        width: 100%;
        justify-content: space-between;
    }

    .app-layout {
        grid-template-columns: 1fr;
    }

    .sidebar {
        border-left: 0;
    }

    .designs-grid {
        grid-template-columns: 1fr;
    }

    .screen-workspace {
        grid-template-columns: 1fr;
    }

    .module-grid {
        grid-template-columns: 1fr;
    }

    .module-roster-grid {
        grid-template-columns: 1fr;
    }

    .screen-actions-row {
        grid-template-columns: 1fr;
    }

    .module-kpi-grid {
        grid-template-columns: 1fr;
    }

    .individual-hero-top {
        flex-direction: column;
    }

    .individual-select-form {
        min-width: 0;
        width: 100%;
    }

    .individual-hero-stats {
        grid-template-columns: 1fr;
    }

    .individual-grid {
        grid-template-columns: 1fr;
    }

    .command-grid {
        grid-template-columns: 1fr;
    }

    .screen-frame {
        min-height: 68vh;
    }
}

/* Layout stability patch: prevent overlap and improve readability */
.content {
    display: flex !important;
    flex-direction: column;
    gap: 16px !important;
    align-items: stretch;
}

.topbar {
    position: static !important;
    z-index: 1 !important;
}

.panel,
.section-banner,
.kpi-card,
.chart-panel,
.hybrid-kpi-card,
.hybrid-alert,
.module-kpi-item,
.module-event-item,
.module-player-card,
.module-recent-item,
.individual-hero-stats article,
.command-toggles {
    border-radius: 12px;
    overflow: visible !important;
}

.panel::after,
.section-banner::after,
.kpi-card::after {
    display: none !important;
}

.kpi-grid,
.charts-grid,
.module-grid,
.module-kpi-grid,
.module-roster-grid,
.individual-grid,
.command-grid,
.hybrid-grid-12,
.hybrid-kpis,
.hybrid-bottom-grid {
    gap: 16px !important;
    align-items: start;
}

.kpi-grid > *,
.charts-grid > *,
.module-grid > *,
.module-kpi-grid > *,
.module-roster-grid > *,
.individual-grid > *,
.command-grid > *,
.hybrid-grid-12 > *,
.hybrid-kpis > *,
.hybrid-bottom-grid > * {
    min-width: 0;
}

.module-page,
.hybrid-page {
    display: grid;
    gap: 16px;
}

.hybrid-main-chart,
.hybrid-events-panel,
.hybrid-heatmap-panel {
    padding: 16px !important;
}

.hybrid-alerts {
    align-content: start;
}

.hybrid-chart-box,
.hybrid-heatmap-box {
    overflow: hidden !important;
}

.hybrid-events-list {
    max-height: 360px;
    overflow: auto;
    padding-left: 2px;
}

@media (max-width: 1100px) {
    .hybrid-grid-12,
    .hybrid-kpis,
    .hybrid-bottom-grid,
    .module-grid,
    .module-kpi-grid,
    .module-roster-grid,
    .charts-grid,
    .kpi-grid,
    .individual-grid,
    .command-grid {
        grid-template-columns: 1fr !important;
    }
}

.system-intro-panel {
    border: 1px solid rgba(184, 150, 82, 0.28);
    background: linear-gradient(160deg, rgba(22, 34, 45, 0.94), rgba(16, 26, 35, 0.92));
}

.system-intro-grid {
    display: grid;
    grid-template-columns: minmax(320px, 1fr) minmax(300px, 1fr);
    gap: 18px;
    align-items: start;
}

.system-intro-media h3,
.system-intro-copy h3 {
    margin: 0 0 6px;
    font-family: Teko, Cairo, sans-serif;
    font-size: 26px;
    letter-spacing: 0.6px;
}

.system-intro-media p,
.system-intro-copy p {
    margin: 0 0 8px;
    color: var(--muted);
    line-height: 1.55;
}

.system-intro-video {
    display: block;
    width: min(100%, 640px);
    height: auto;
    margin-inline: auto;
    object-fit: contain;
    border-radius: 14px;
    border: 1px solid rgba(255, 255, 255, 0.18);
    background: #05090d;
    box-shadow: 0 12px 28px rgba(6, 11, 17, 0.46);
}

.system-intro-kicker {
    margin: 0 0 6px;
    font-size: 12px;
    letter-spacing: 1.3px;
    text-transform: uppercase;
    color: var(--m-gold);
    font-weight: 700;
}

.system-intro-warning {
    margin-top: 10px;
    border: 1px solid rgba(242, 164, 61, 0.44);
    background: rgba(242, 164, 61, 0.12);
    border-radius: 10px;
    color: #ffd8a7 !important;
    padding: 10px 12px;
}

.system-detection-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
    margin: 14px 0 12px;
}

.system-detection-card {
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 12px;
    padding: 12px;
    background: linear-gradient(150deg, rgba(159, 15, 36, 0.14), rgba(184, 150, 82, 0.08));
}

.system-detection-card h4 {
    margin: 0 0 6px;
    font-size: 16px;
    color: #f7e6bf;
}

.system-detection-card p {
    margin: 0;
    font-size: 13px;
}

.system-flow-list {
    margin: 0;
    padding: 0 18px 0 0;
    display: grid;
    gap: 6px;
    color: #dde8f3;
}

.system-flow-list li {
    line-height: 1.5;
}

@media (max-width: 1100px) {
    .system-intro-grid {
        grid-template-columns: 1fr;
    }

    .system-detection-grid {
        grid-template-columns: 1fr;
    }

    .system-intro-video {
        width: 100%;
    }
}

/* Mobile sidebar stabilization */
@media (max-width: 980px) {
    .sidebar {
        padding: 14px 12px;
        gap: 12px;
    }

    .brand {
        gap: 10px;
    }

    .brand-logo {
        width: 48px;
        height: 48px;
        border-radius: 10px;
    }

    .brand h1 {
        margin: 0;
        font-size: 18px;
        line-height: 1.2;
    }

    .brand-sub {
        margin: 2px 0 0;
        font-size: 12px;
    }

    .side-nav {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 8px;
    }

    .side-nav a {
        min-height: 44px;
        display: flex;
        align-items: center;
        gap: 6px;
        padding: 10px;
        font-size: 13px;
        line-height: 1.2;
        overflow: hidden;
    }

    .side-nav a span:last-child {
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .sidebar-foot {
        margin-top: 6px;
        padding-top: 10px;
    }

    .identity-thumb {
        max-height: 86px;
        object-fit: cover;
    }
}

@media (max-width: 560px) {
    .side-nav {
        grid-template-columns: 1fr;
    }

    .topbar {
        gap: 8px;
    }

    .topbar h2 {
        font-size: 24px;
    }
}

/* Hosting-safe modern dashboard intro layout */
.page-dashboard .system-intro-panel {
    --intro-space: clamp(10px, 1.2vw, 16px);
    --intro-title: clamp(20px, 1.6vw, 26px);
    --intro-sub: clamp(12px, 0.95vw, 13px);
    --intro-card-title: clamp(13px, 0.95vw, 14px);
    --intro-card-text: clamp(11.5px, 0.85vw, 12.5px);
    border: 1px solid rgba(201, 167, 95, 0.34);
    background:
        radial-gradient(circle at 92% 8%, rgba(187, 141, 58, 0.12), transparent 42%),
        linear-gradient(160deg, rgba(18, 29, 38, 0.96), rgba(13, 22, 30, 0.95));
    border-radius: 18px;
    padding: var(--intro-space);
}

.page-dashboard .system-intro-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.08fr) minmax(0, 0.92fr);
    gap: 18px;
    align-items: stretch;
}

.page-dashboard .system-intro-media,
.page-dashboard .system-intro-copy {
    min-width: 0;
    display: flex;
    flex-direction: column;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 14px;
    background: linear-gradient(150deg, rgba(159, 15, 36, 0.08), rgba(184, 150, 82, 0.06));
    padding: var(--intro-space);
}

.page-dashboard .system-intro-media h3,
.page-dashboard .system-intro-copy h3 {
    margin: 0 0 calc(var(--intro-space) * 0.45);
    font-size: var(--intro-title);
    line-height: 1.05;
}

.page-dashboard .system-intro-media p,
.page-dashboard .system-intro-copy p {
    margin: 0 0 calc(var(--intro-space) * 0.65);
    font-size: var(--intro-sub);
    line-height: 1.55;
    color: #bfd0dc;
}

.page-dashboard .system-intro-video-frame {
    margin-top: auto;
    width: 100%;
    aspect-ratio: 16 / 9;
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.18);
    background: #060b0f;
    box-shadow: 0 14px 30px rgba(4, 9, 14, 0.5);
}

.page-dashboard .system-intro-video {
    display: block;
    width: 100% !important;
    height: 100% !important;
    max-width: none !important;
    object-fit: cover;
    background: #060b0f;
}

.page-dashboard .system-detection-grid {
    grid-template-columns: 1fr;
    gap: calc(var(--intro-space) * 0.5);
    margin: calc(var(--intro-space) * 0.5) 0;
}

.page-dashboard .system-detection-card {
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 12px;
    padding: 10px;
    background: rgba(12, 20, 27, 0.55);
}

.page-dashboard .system-detection-card h4 {
    margin: 0 0 4px;
    font-size: var(--intro-card-title);
}

.page-dashboard .system-detection-card p {
    margin: 0;
    font-size: var(--intro-card-text);
    line-height: 1.45;
}

.page-dashboard .system-flow-list {
    margin-top: auto;
    padding-top: calc(var(--intro-space) * 0.4);
    gap: 5px;
    font-size: var(--intro-card-text);
}

.mobile-menu-toggle,
.mobile-sidebar-close,
.mobile-sidebar-overlay {
    display: none;
}

.mobile-menu-toggle {
    border: 1px solid rgba(184, 150, 82, 0.46);
    background: rgba(184, 150, 82, 0.14);
    color: #f6d48e;
    border-radius: 10px;
    width: 40px;
    height: 40px;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

.mobile-sidebar-close {
    border: 1px solid rgba(255, 255, 255, 0.18);
    background: rgba(255, 255, 255, 0.08);
    color: #fff;
    border-radius: 10px;
    width: 36px;
    height: 36px;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    margin-inline-start: auto;
}

@media (max-width: 1200px) {
    .page-dashboard .system-intro-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 980px) {
    body.mobile-nav-open {
        overflow: hidden;
    }

    body.mobile-nav-open,
    body.mobile-nav-open .app-layout,
    body.mobile-nav-open .content,
    body.mobile-nav-open .sidebar,
    body.mobile-nav-open .sidebar * {
        filter: none !important;
        transform: none;
    }

    .mobile-menu-toggle {
        display: inline-flex;
    }

    .mobile-sidebar-close {
        display: inline-flex;
    }

    .mobile-sidebar-overlay {
        display: block;
        position: fixed;
        inset: 0;
        background: rgba(4, 8, 12, 0.5);
        -webkit-backdrop-filter: none;
        backdrop-filter: none;
        z-index: 20;
        opacity: 0;
        transition: opacity 0.2s ease;
        pointer-events: none;
    }

    body.mobile-nav-open .mobile-sidebar-overlay {
        opacity: 1;
        pointer-events: auto;
    }

    .sidebar {
        display: flex !important;
        position: fixed;
        top: 0;
        right: -340px;
        height: 100dvh;
        max-height: 100dvh;
        width: min(88vw, 320px);
        z-index: 30;
        border-left: 1px solid rgba(255, 255, 255, 0.12);
        border-bottom: 0;
        transform: none;
        transition: right 0.22s ease;
        background: #171212 !important;
        overflow-y: auto !important;
        overflow-x: hidden;
        -webkit-overflow-scrolling: touch;
        overscroll-behavior: contain;
        touch-action: auto;
        box-shadow: -8px 0 26px rgba(0, 0, 0, 0.34);
        will-change: right;
    }

    body.mobile-nav-open .sidebar {
        right: 0;
    }

    .app-layout {
        grid-template-columns: 1fr !important;
    }

    .content {
        padding: 10px !important;
        filter: none !important;
    }

    .topbar {
        backdrop-filter: none !important;
        -webkit-backdrop-filter: none !important;
        background: rgba(20, 20, 20, 0.96) !important;
    }

    .status-chip,
    .quick-tools {
        display: none;
    }

    .page-dashboard .system-intro-panel {
        --intro-title: 18px;
        --intro-sub: 12px;
        --intro-card-title: 12px;
        --intro-card-text: 11px;
    }

    .topbar-actions {
        margin-inline-start: auto;
    }

    .side-nav {
        display: flex !important;
        flex-direction: column;
        gap: 8px;
        overflow: visible !important;
    }

    .side-nav a {
        width: 100%;
        white-space: normal;
    }
}

@media (max-width: 560px) {
    .sidebar {
        width: min(90vw, 320px);
    }

    .page-dashboard .system-intro-panel {
        padding: 12px;
    }

    .page-dashboard .system-intro-media,
    .page-dashboard .system-intro-copy {
        padding: 10px;
    }

    .page-dashboard .system-intro-video-frame {
        border-radius: 10px;
    }
}

/* Simple mobile navigation replacement */
.mobile-simple-nav {
    display: none;
}

@media (max-width: 980px) {
    body.mobile-nav-open {
        overflow: auto !important;
    }

    .sidebar {
        display: none !important;
    }

    .mobile-sidebar-overlay,
    .mobile-sidebar-close {
        display: none !important;
    }

    .mobile-menu-toggle {
        display: inline-flex !important;
    }

    .mobile-simple-nav {
        display: none;
        border: 1px solid rgba(255, 255, 255, 0.12);
        border-radius: 12px;
        background: rgba(16, 24, 32, 0.97);
        padding: 8px;
        gap: 6px;
        max-height: min(62dvh, 460px);
        overflow-y: auto;
        overflow-x: hidden;
        -webkit-overflow-scrolling: touch;
        overscroll-behavior: contain;
    }

    body.mobile-nav-open .mobile-simple-nav {
        display: grid;
        grid-template-columns: 1fr;
    }

    .mobile-simple-nav a {
        text-decoration: none;
        color: #dbe7ef;
        border: 1px solid rgba(255, 255, 255, 0.1);
        border-radius: 10px;
        padding: 10px 12px;
        display: flex;
        align-items: center;
        gap: 8px;
        font-size: 13px;
        line-height: 1.3;
        background: rgba(255, 255, 255, 0.02);
    }

    .mobile-simple-nav a.active {
        background: linear-gradient(130deg, rgba(163, 32, 45, 0.85), rgba(143, 14, 33, 0.85));
        color: #fff;
        border-color: rgba(241, 196, 15, 0.32);
    }

    .topbar {
        backdrop-filter: none !important;
        -webkit-backdrop-filter: none !important;
    }

    .topbar-actions {
        margin-inline-start: auto;
    }

    .content {
        overflow: visible !important;
    }
}
