:root {
    --bg: #f7f8fb;
    --panel: #ffffff;
    --text: #172033;
    --muted: #667085;
    --line: #d9dee8;
    --accent: #0d766e;
    --accent-dark: #0a5f59;
    --danger: #b42318;
    --warn: #b54708;
    --font-sans: "Manrope", "Inter", "Segoe UI Variable Text", "Segoe UI", "Noto Sans", Arial, sans-serif;
    --font-display: "Nunito Sans", "Manrope", "Segoe UI Variable Display", "Segoe UI", Arial, sans-serif;
    --font-ui: "Inter", "Segoe UI Variable Text", "Segoe UI", Arial, sans-serif;
}

* { box-sizing: border-box; }
html { scrollbar-gutter: stable; }
body {
    margin: 0;
    background: var(--bg);
    color: var(--text);
    font-family: var(--font-sans);
    font-size: 15px;
    line-height: 1.55;
    font-optical-sizing: auto;
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}
a { color: var(--accent-dark); text-decoration: none; }
a:hover { text-decoration: underline; }
.topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px clamp(16px, 4vw, 48px);
    background: #ffffff;
    border-bottom: 1px solid var(--line);
    position: sticky;
    top: 0;
    z-index: 10;
}
.topbar-main {
    display: flex;
    align-items: center;
    gap: 12px;
}
.brand {
    color: var(--text);
    font-family: var(--font-display);
    font-size: 18px;
    font-weight: 850;
    line-height: 1.1;
}
.topbar-back {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    min-height: 34px;
    padding: 7px 10px;
    border: 0;
    border-radius: 7px;
    background: transparent;
    color: #536184;
    font-family: var(--font-ui);
    font-size: 13px;
    font-weight: 700;
    line-height: 1;
    cursor: pointer;
    white-space: nowrap;
    transition: background 0.16s ease, color 0.16s ease;
}
.topbar-back svg {
    width: 17px;
    height: 17px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
}
.topbar-back:hover {
    background: #eef8f7;
    color: var(--accent-dark);
}
.topbar-back:focus-visible {
    outline: 2px solid #67c8bb;
    outline-offset: 2px;
}
.nav { display: flex; align-items: center; gap: 18px; }
.nav-recent { position: relative; }
.nav a,
.nav-recent summary,
.nav-logout {
    color: var(--accent-dark);
    font-family: var(--font-ui);
    font-size: 14px;
    font-weight: 700;
    line-height: 1.3;
}
.nav a {
    padding: 12px 14px;
    border-radius: 4px;
}
.nav a.active {
    background: #eef8f7;
    color: var(--accent-dark);
}
.nav-recent summary {
    display: flex;
    align-items: center;
    gap: 7px;
    padding: 12px 14px;
    border-radius: 4px;
    cursor: pointer;
    list-style: none;
    white-space: nowrap;
}
.nav-recent summary::-webkit-details-marker { display: none; }
.nav-recent summary::after {
    content: "";
    width: 7px;
    height: 7px;
    margin-top: -4px;
    border-right: 1.5px solid currentColor;
    border-bottom: 1.5px solid currentColor;
    transform: rotate(45deg);
    transition: transform 0.16s ease, margin 0.16s ease;
}
.nav-recent[open] summary::after {
    margin-top: 4px;
    transform: rotate(225deg);
}
.nav-recent.active summary,
.nav-recent[open] summary {
    background: #eef8f7;
}
.logout-form {
    display: flex;
    align-items: center;
    margin: 0;
}
.nav-logout {
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-height: 0;
    padding: 0;
    line-height: 1.3;
}
.nav-logout svg {
    width: 19px;
    height: 19px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
}
.nav .nav-user-player {
    display: inline-flex;
    align-items: center;
    min-height: 42px;
    padding: 10px 14px;
    border-radius: 4px;
    background: #eef8f7;
    color: var(--accent-dark);
    font-family: var(--font-ui);
    font-size: 14px;
    font-weight: 750;
    line-height: 1.3;
    white-space: nowrap;
}
.nav a.nav-user-player:hover {
    background: #dff3f0;
    text-decoration: none;
}
.nav-user-player.is-disabled {
    cursor: default;
    opacity: .72;
}
.nav-menu {
    position: absolute;
    right: 0;
    top: calc(100% + 6px);
    display: grid;
    min-width: 280px;
    padding: 8px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #ffffff;
    box-shadow: 0 12px 30px rgba(23, 32, 51, 0.12);
    z-index: 20;
}
.nav-menu a,
.nav-menu span {
    display: grid;
    gap: 2px;
    padding: 8px 10px;
}
.nav-menu a strong {
    overflow: hidden;
    color: var(--text);
    font-size: 13px;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.nav-menu a small {
    color: var(--muted);
    font-size: 11px;
}
.nav-menu .nav-menu-all {
    margin-top: 4px;
    border-top: 1px solid var(--line);
    color: var(--accent-dark);
    text-align: center;
}
.container { width: min(1180px, calc(100% - 32px)); margin: 28px auto 60px; }
.page-head {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 18px;
    margin-bottom: 28px;
}
.eyebrow {
    margin: 0 0 6px;
    color: var(--accent-dark);
    font-family: var(--font-ui);
    font-size: 13px;
    font-weight: 800;
    line-height: 1.35;
}
h1, h2 {
    margin: 0;
    font-family: var(--font-display);
    font-weight: 850;
    line-height: 1.12;
}
h1 { font-size: 34px; max-width: 760px; }
h2 { font-size: 23px; margin-bottom: 12px; }
.actions, .row-actions { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.page-head .actions { justify-content: flex-end; }
.section-title-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 12px;
}
.section-title-row h2 {
    margin-bottom: 0;
}
.section-more-link {
    font-family: var(--font-ui);
    font-weight: 800;
}
.clickable-row {
    cursor: pointer;
}
.clickable-row:hover td {
    background: #eef8f7;
}
.dashboard-head {
    grid-template-columns: 1fr;
    align-items: flex-start;
    gap: 16px;
    margin-bottom: 36px;
}
.dashboard-actions {
    width: 100%;
    flex-wrap: nowrap;
    justify-content: flex-start;
}
.page-head .dashboard-actions {
    justify-content: flex-start;
}
.dashboard-actions .button {
    min-width: 170px;
    white-space: nowrap;
}
.dashboard-section {
    margin-bottom: 44px;
}
.button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 40px;
    padding: 9px 14px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #ffffff;
    color: var(--text);
    font-family: var(--font-ui);
    font-size: 14px;
    font-weight: 750;
    line-height: 1.25;
    cursor: pointer;
}
.button.primary { background: var(--accent); border-color: var(--accent); color: #ffffff; }
.button.primary:hover { background: var(--accent-dark); text-decoration: none; }
.button.accent {
    border-color: #99f6e4;
    background: #e6fffb;
    color: var(--accent-dark);
    box-shadow: inset 0 0 0 1px rgba(13, 118, 110, 0.08);
}
.button.accent:hover {
    border-color: var(--accent);
    background: #ccfbf1;
    text-decoration: none;
}
.button.compact {
    min-width: 64px;
    min-height: 36px;
    padding: 7px 12px;
}
.analysis-actions {
    gap: 8px;
}
.analysis-actions .button.accent {
    font-weight: 850;
}
.button.danger { background: var(--danger); border-color: var(--danger); color: #ffffff; }
.button.wide { width: 100%; }
.button:disabled { opacity: 0.55; cursor: not-allowed; }
.danger-link { color: var(--danger); }
.stats-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
    margin: 20px 0 28px;
}
.recent-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
    margin-bottom: 32px;
}
.recent-match {
    position: relative;
    display: grid;
    min-height: 102px;
    padding: 18px 84px 18px 18px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #ffffff;
}
.recent-match-main {
    display: grid;
    align-content: center;
    gap: 6px;
}
.recent-match-main:hover { text-decoration: none; }
.recent-match span { color: var(--muted); }
.recent-match-analyzer {
    font-family: var(--font-ui);
    font-size: 13px;
    font-weight: 750;
}
.recent-match-actions {
    position: absolute;
    top: 8px;
    right: 8px;
    display: flex;
    align-items: center;
    gap: 4px;
    z-index: 2;
}
.recent-match-delete {
    margin: 0;
}
.recent-match-edit,
.recent-match-delete button {
    display: grid;
    place-items: center;
    width: 30px;
    height: 30px;
    border: 1px solid transparent;
    border-radius: 8px;
    background: transparent;
    color: var(--danger);
    font-size: 17px;
    cursor: pointer;
}
.recent-match-edit {
    color: var(--accent-dark);
}
.recent-match-edit:hover {
    border-color: #99f6e4;
    background: #f0fdfa;
    text-decoration: none;
}
.recent-match-delete button:hover {
    border-color: #fecdca;
    background: #fef3f2;
}
.metric {
    background: var(--panel);
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 18px;
}
.metric span {
    display: block;
    color: var(--accent-dark);
    font-family: var(--font-display);
    font-size: 31px;
    font-weight: 850;
    line-height: 1.08;
    font-variant-numeric: tabular-nums;
}
.metric p { margin: 5px 0 0; color: var(--muted); }
.protocol-summary-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px;
    margin: 20px 0 28px;
}
.summary-metric small {
    display: block;
    margin-top: 8px;
    color: var(--muted);
    font-size: 14px;
}
.table-wrap { overflow-x: auto; background: var(--panel); border: 1px solid var(--line); border-radius: 8px; }
table { width: 100%; border-collapse: collapse; min-width: 760px; }
th, td { padding: 12px 14px; text-align: left; border-bottom: 1px solid var(--line); vertical-align: top; }
th {
    background: #fbfcfe;
    color: var(--muted);
    font-family: var(--font-ui);
    font-size: 13px;
    font-weight: 800;
    line-height: 1.35;
}
td { font-size: 14px; }
tr:last-child td { border-bottom: 0; }
.dashboard-table {
    border-collapse: separate;
    border-spacing: 0;
    table-layout: fixed;
}
.dashboard-table th,
.dashboard-table td {
    padding: 14px 22px;
    vertical-align: middle;
}
.dashboard-table .col-name { width: 32%; }
.dashboard-table .col-number { width: 14%; }
.dashboard-table .col-actions { width: 32%; }
.tournaments-table .col-name { width: 28%; }
.tournaments-table .col-teams { width: 20%; }
.tournaments-table .col-number { width: 12%; }
.tournaments-table .col-date { width: 24%; }
.tournaments-table .col-actions { width: 16%; }
.dashboard-table .number-cell,
.dashboard-table .date-cell {
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
}
.dashboard-table .row-actions {
    justify-content: flex-end;
    gap: 14px;
    white-space: nowrap;
}
.dashboard-table th:last-child {
    text-align: right;
}
.empty {
    padding: 22px;
    border: 1px dashed var(--line);
    border-radius: 8px;
    background: #ffffff;
    color: var(--muted);
}
.hidden { display: none !important; }
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}
.messages { margin-bottom: 16px; }
.message {
    padding: 12px 14px;
    border-radius: 8px;
    background: #ecfdf3;
    border: 1px solid #abefc6;
}
.form-panel, .filter-panel {
    display: grid;
    gap: 14px;
    background: var(--panel);
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 18px;
}
.form-panel { max-width: 720px; }
.match-form { max-width: 980px; }
.match-form-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
}
.match-form-section {
    display: grid;
    gap: 10px;
    padding-top: 4px;
}
.match-form-section h2 { margin: 0; font-size: 18px; }
.section-label-row { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.participant-picker {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 6px;
}
.participant-card {
    position: relative;
    display: grid;
    grid-template-columns: auto 1fr;
    grid-template-areas: "number name";
    align-items: center;
    gap: 8px;
    min-height: 36px;
    padding: 5px 8px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fff;
    cursor: pointer;
    transition: border-color .15s ease, background .15s ease, box-shadow .15s ease;
}
.participant-card input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}
.participant-card strong { grid-area: number; color: var(--accent); font-size: 14px; }
.participant-card span { grid-area: name; font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.participant-card:has(input:checked) {
    border-color: var(--accent);
    background: #eef8f7;
    box-shadow: inset 0 0 0 1px var(--accent);
}
.match-score-line {
    display: flex;
    align-items: center;
    width: fit-content;
    gap: 6px;
}
.match-form .match-score-line input {
    width: 56px;
    max-width: 56px;
    min-height: 56px;
    height: 56px;
    padding: 4px;
    border: 1px solid #111827;
    border-radius: 4px;
    text-align: center;
    font: 800 18px var(--font-ui);
    -moz-appearance: textfield;
}
.match-score-line input::-webkit-outer-spin-button,
.match-score-line input::-webkit-inner-spin-button { margin: 0; -webkit-appearance: none; }
.score-divider { font: 800 18px/56px var(--font-ui); color: var(--muted); }
.set-score-picker {
    display: grid;
    grid-template-columns: repeat(5, 104px);
    column-gap: 16px;
    row-gap: 10px;
}
.set-score-card {
    display: grid;
    gap: 5px;
    justify-items: center;
    width: 104px;
}
.set-score-card > span { color: var(--muted); font: 750 13px var(--font-ui); }
.set-score-line {
    display: flex;
    align-items: center;
    gap: 4px;
}
.set-score-line .score-divider {
    font-size: 14px;
    line-height: 38px;
}
.match-form .set-score-line input {
    width: 38px;
    max-width: 38px;
    min-height: 38px;
    height: 38px;
    padding: 4px;
    border: 1px solid #111827;
    border-radius: 4px;
    text-align: center;
    font: 800 13px var(--font-ui);
    -moz-appearance: textfield;
}
.set-score-line input::-webkit-outer-spin-button,
.set-score-line input::-webkit-inner-spin-button { margin: 0; -webkit-appearance: none; }
.form-panel.compact { max-width: none; align-content: start; }
#action-form {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}
#action-form h2,
#action-form .advanced-fields,
#action-form .quick-status,
#action-form .wide {
    grid-column: 1 / -1;
}
.action-highlight-row {
    align-self: end;
    min-height: 40px;
}
#action-form label span,
.score-form label span {
    color: var(--muted);
    font-size: 13px;
}
label {
    display: grid;
    gap: 6px;
    font-family: var(--font-ui);
    font-size: 14px;
    font-weight: 750;
    line-height: 1.35;
}
input, select, textarea {
    width: 100%;
    min-height: 40px;
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 8px 10px;
    font-family: var(--font-sans);
    font-size: 14px;
    line-height: 1.35;
    background: #ffffff;
}
textarea { resize: vertical; }
.check-row { display: flex; align-items: center; gap: 10px; }
.check-row input { width: auto; min-height: auto; }
.field-error { color: var(--danger); font-weight: 400; }
.required-mark { color: var(--danger); margin-left: 3px; }
@media (max-width: 760px) {
    .match-form-grid { grid-template-columns: 1fr; }
    .set-score-picker { grid-template-columns: repeat(5, 104px); overflow-x: auto; padding-bottom: 4px; }
}
@media (max-width: 420px) {
    .match-score-line { max-width: 100%; }
    .set-score-picker { grid-template-columns: repeat(5, 104px); }
}
.filters-inline { display: flex; gap: 10px; margin-bottom: 14px; }
.filters-inline a {
    padding: 8px 12px;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: #ffffff;
    font-family: var(--font-ui);
    font-size: 14px;
    font-weight: 750;
}
.filters-inline .active { background: var(--accent); color: #ffffff; border-color: var(--accent); }
.analysis-layout {
    display: grid;
    grid-template-columns: minmax(0, 2.25fr) minmax(300px, 0.65fr);
    gap: 20px;
    margin-bottom: 28px;
}
.video-panel {
    background: var(--panel);
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 14px;
}
video {
    width: 100%;
    aspect-ratio: 16 / 9;
    max-height: 720px;
    background: #111827;
    border-radius: 8px;
    object-fit: contain;
}
.external-video-wrap {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    background: #111827;
    border-radius: 8px;
}
.external-video-wrap iframe {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    border: 0;
}
.video-empty { min-height: 240px; display: grid; place-items: center; text-align: center; }
.video-controls { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 12px; }
.set-score-form {
    gap: 10px;
    margin-top: 12px;
}
.set-score-controls {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    align-items: flex-start;
    justify-content: stretch;
    column-gap: 12px;
    overflow-x: visible;
}
.play-actions {
    display: grid;
    gap: 8px;
}
.play-actions #play-toggle {
    width: 112px;
}
.play-actions #complete-current-set {
    display: grid;
    gap: 0;
    width: 112px;
    min-height: 50px;
    padding: 6px 10px;
    line-height: 1.1;
}
.video-time-card {
    display: grid;
    gap: 6px;
    width: 224px;
    min-width: 0;
    padding: 12px 10px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fbfcfe;
    font-family: var(--font-ui);
    font-weight: 750;
    font-variant-numeric: tabular-nums;
}
.manual-timecode {
    display: grid;
    grid-template-columns: auto minmax(74px, 96px);
    align-items: center;
    gap: 8px;
    font-size: 12px;
}
.manual-timecode input {
    min-height: 32px;
    padding: 4px 8px;
}
.set-end-times {
    display: grid;
    gap: 4px;
    max-width: 100%;
    color: var(--muted);
    font-size: 13px;
    font-weight: 700;
    white-space: nowrap;
}
.set-end-times strong {
    color: var(--accent-dark);
}
.set-switcher {
    display: flex;
    flex-wrap: nowrap;
    align-items: flex-start;
    justify-content: flex-start;
    gap: 12px;
    padding-left: 4px;
    overflow-x: visible;
    max-width: 100%;
    min-width: 0;
}
.set-switcher .button {
    flex: 0 0 auto;
    min-width: 76px;
    min-height: 50px;
    padding: 9px 10px;
}
.set-switcher .set-pending {
    border-color: var(--danger);
}
.set-switcher .set-completed {
    border-color: var(--accent);
}
.set-switcher .active {
    background: #eef8f7;
    color: var(--accent-dark);
}
.hotkey-panel {
    margin-top: 14px;
    padding-top: 14px;
    border-top: 1px solid var(--line);
}
.hotkey-panel h2 { font-size: 18px; margin-bottom: 10px; }
.hotkey-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
}
kbd {
    display: inline-flex;
    min-width: 28px;
    justify-content: center;
    padding: 2px 7px;
    border: 1px solid var(--line);
    border-bottom-width: 2px;
    border-radius: 6px;
    background: #fbfcfe;
    font-family: var(--font-ui);
    font-size: 13px;
    font-weight: 850;
    line-height: 1.25;
}
.muted { color: var(--muted); margin: 8px 0 0; }
.score-panel {
    background: var(--panel);
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 14px 16px;
    margin-bottom: 22px;
}
.section-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 12px;
}
.score-panel .section-head h2 { font-size: 24px; }
.score-panel .section-head p { margin: 4px 0 0; }
.score-form { display: grid; gap: 8px; }
.score-row {
    display: grid;
    grid-template-columns: minmax(100px, 0.7fr) minmax(130px, 1fr) minmax(130px, 1fr) minmax(140px, auto) auto;
    gap: 10px;
    align-items: center;
    padding: 10px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fbfcfe;
}
.score-row label { gap: 4px; }
.score-row input { min-height: 34px; padding: 6px 9px; }
.set-score-card {
    position: relative;
    display: grid;
    grid-template-columns: 1fr;
    align-items: start;
    min-width: 76px;
    width: 76px;
    padding: 0;
    border: 0;
    background: transparent;
    gap: 6px;
}
.set-score-card .set-select-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    width: 76px;
    justify-self: stretch;
}
.set-status-mark {
    display: inline-grid;
    place-items: center;
    min-width: 11px;
    font-size: 12px;
    font-weight: 950;
    line-height: 1;
}
.set-pending .set-status-mark {
    color: var(--danger);
}
.set-completed .set-status-mark,
.set-select-button.active .set-status-mark {
    color: var(--accent-dark);
}
.set-score-window {
    position: relative;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
    align-items: center;
    gap: 2px;
    width: 76px;
    min-height: 50px;
    padding: 7px 8px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #ffffff;
    box-shadow: 0 8px 18px rgba(23, 32, 51, 0.07);
}
.set-score-window input {
    min-height: 0;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
    font-family: var(--font-ui);
    font-size: 15px;
    font-weight: 800;
    line-height: 1;
    text-align: center;
    font-variant-numeric: tabular-nums;
    -moz-appearance: textfield;
}
.set-score-window input::-webkit-outer-spin-button,
.set-score-window input::-webkit-inner-spin-button {
    margin: 0;
    -webkit-appearance: none;
}
.score-divider {
    color: var(--muted);
    font-family: var(--font-ui);
    font-size: 15px;
    font-weight: 900;
    line-height: 1;
}
.set-delete-button {
    position: absolute;
    top: -7px;
    right: -7px;
    display: grid;
    place-items: center;
    width: 20px;
    height: 20px;
    border: 1px solid transparent;
    border-radius: 8px;
    background: #ffffff;
    color: var(--danger);
    font-family: var(--font-ui);
    font-size: 14px;
    font-weight: 900;
    line-height: 1;
    cursor: pointer;
}
.set-delete-button:hover {
    border-color: #fecdca;
    background: #fef3f2;
}
.final-score { background: #eef8f7; }
.final-score {
    grid-template-columns: minmax(100px, 0.7fr) minmax(130px, 1fr) minmax(130px, 1fr) minmax(140px, auto) auto;
}
.final-score::after {
    content: "";
}
.score-complete {
    min-height: 34px;
    justify-content: flex-start;
    font-weight: 700;
}
.score-row .button {
    min-height: 34px;
    padding: 7px 10px;
}
.advanced-fields {
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 10px 12px;
    background: #fbfcfe;
}
.advanced-fields-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
    margin-top: 10px;
}
.advanced-fields summary, .hotkey-panel summary {
    cursor: pointer;
    font-family: var(--font-display);
    font-weight: 800;
}
.quick-status {
    padding: 10px 12px;
    border-radius: 8px;
    background: #eef8f7;
    color: var(--accent-dark);
    font-family: var(--font-ui);
    font-weight: 750;
}
.form-status {
    padding: 10px 12px;
    border-radius: 8px;
    border: 1px solid #abefc6;
    background: #ecfdf3;
    color: #067647;
    font-family: var(--font-ui);
    font-weight: 800;
}
.form-status.error {
    border-color: #fecdca;
    background: #fef3f2;
    color: var(--danger);
}
.auth-panel {
    width: min(420px, 100%);
    margin: 48px auto;
}
.auth-panel .button {
    width: 100%;
}
.auth-panel .field-error {
    margin: 0;
}
.time-link {
    border: 0;
    background: transparent;
    color: var(--accent-dark);
    font-family: var(--font-ui);
    font-size: inherit;
    line-height: inherit;
    font-weight: 750;
    cursor: pointer;
    padding: 0;
}
.link-button {
    border: 0;
    background: transparent;
    padding: 0;
    font-family: var(--font-ui);
    font-size: inherit;
    line-height: inherit;
    cursor: pointer;
}
.selected-row {
    outline: 2px solid var(--accent);
    outline-offset: -2px;
    background: #eef8f7;
}
.inline-confirm {
    display: inline-flex;
    flex-wrap: wrap;
    gap: 6px;
}
.inline-confirm .button {
    min-height: 30px;
    padding: 5px 8px;
    font-size: 13px;
}
.action-filters th { padding: 6px 8px; }
.action-filters select {
    min-height: 32px;
    padding: 4px 6px;
    font-size: 13px;
}
.filtered-out { display: none; }
.protocol-wrap { overflow-x: auto; }
.protocol-wrap table {
    min-width: 0;
    table-layout: fixed;
}
.protocol-set-table {
    min-width: 980px;
}
.protocol-player-col { width: 22%; }
.protocol-set-col { width: 3.7%; }
.protocol-stat-col { width: 3.95%; }
.protocol-table th,
.protocol-table td {
    text-align: center;
    padding: 7px 5px;
    font-size: 13px;
    line-height: 1.25;
    overflow-wrap: anywhere;
    font-variant-numeric: tabular-nums;
}
.protocol-table th {
    border-bottom: 2px solid #0f172a;
    overflow-wrap: normal;
    word-break: normal;
}
.protocol-table .group-end {
    border-right: 3px solid #0f172a;
}
.protocol-table .player-head,
.protocol-table td:first-child {
    text-align: left;
    border-right: 3px solid #0f172a;
}
.protocol-table .total-row td {
    background: #eef8f7;
    font-weight: 800;
}
.badge {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 999px;
    background: #fff4e5;
    color: var(--warn);
    font-family: var(--font-ui);
    font-size: 12px;
    font-weight: 800;
}
.filter-panel {
    max-width: none;
    grid-template-columns: repeat(4, minmax(160px, 1fr));
    align-items: end;
    margin-bottom: 20px;
}
.report-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px;
}

.container:has(.players-shell) {
    width: min(1880px, calc(100% - 28px));
    height: calc(100dvh - 92px);
    margin-top: 10px;
    margin-bottom: 10px;
    overflow: hidden;
}
.players-shell {
    display: grid;
    grid-template-columns: 350px minmax(0, 1fr);
    gap: 16px;
    align-items: stretch;
    height: 100%;
    min-height: 0;
}
.players-sidebar,
.player-profile-card,
.player-analysis-filters,
.player-card-section {
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #ffffff;
}
.players-sidebar {
    display: grid;
    grid-template-rows: auto auto auto minmax(0, 1fr);
    gap: 8px;
    height: 100%;
    min-height: 0;
    padding: 12px 14px;
    overflow: hidden;
}
.players-sidebar-title-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    min-width: 0;
}
.players-sidebar-head h1 {
    flex: 0 1 auto;
    font-size: 27px;
    line-height: 1;
    max-width: none;
}
.players-sidebar-head p {
    margin: 5px 0 0;
    color: var(--muted);
    font-size: 12.5px;
    line-height: 1.3;
}
.players-reset-button {
    flex: 0 0 auto;
    margin-left: auto;
    min-height: 30px;
    padding: 5px 10px;
    border-radius: 7px;
    font-size: 12px;
    line-height: 1.2;
    white-space: nowrap;
}
.players-filter-form {
    display: grid;
    gap: 6px;
}
.players-filter-form label span,
.player-analysis-filters label span {
    color: var(--muted);
    font-size: 11px;
    font-weight: 800;
}
.players-filter-form label {
    gap: 4px;
    font-size: 13px;
}
.players-filter-form input,
.players-filter-form select {
    min-height: 32px;
    padding: 5px 10px;
    font-size: 13px;
}
.players-filter-form .button {
    min-height: 32px;
    padding: 6px 12px;
}
.players-found {
    color: var(--muted);
    font-family: var(--font-ui);
    font-size: 12px;
    font-weight: 750;
}
.player-list-panel {
    display: grid;
    align-content: start;
    gap: 6px;
    min-height: 0;
    overflow-y: auto;
    padding-right: 4px;
    scrollbar-gutter: stable;
}
.player-list-card {
    display: grid;
    grid-template-columns: 52px minmax(0, 1fr);
    grid-template-areas:
        "number name"
        "number meta"
        "number meta";
    column-gap: 12px;
    row-gap: 5px;
    min-height: 72px;
    padding: 9px 10px;
    border: 1px solid #e4e9f2;
    border-radius: 8px;
    background: #ffffff;
    color: var(--text);
}
.player-list-card:hover {
    border-color: #99f6e4;
    background: #f0fdfa;
    text-decoration: none;
}
.player-list-card.active {
    border-color: #5eead4;
    background: #ecfdf9;
    box-shadow: inset 0 0 0 1px #99f6e4;
}
.player-number,
.player-number-large {
    display: grid;
    place-items: center;
    border: 1px solid #cfe8e7;
    border-radius: 8px;
    background: linear-gradient(180deg, #f5fffd, #eff7f7);
    color: var(--accent-dark);
    font-family: var(--font-display);
    font-weight: 900;
    font-variant-numeric: tabular-nums;
}
.player-number {
    grid-area: number;
    align-self: center;
    width: 38px;
    height: 38px;
    font-size: 18px;
}
.player-list-name {
    grid-area: name;
    align-self: end;
    min-width: 0;
    overflow: hidden;
    color: var(--text);
    font-size: 13px;
    font-weight: 850;
    line-height: 1.3;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.player-list-meta {
    grid-area: meta;
    display: grid;
    align-self: start;
    gap: 4px;
    min-width: 0;
    color: #53627a;
    font-size: 12px;
    line-height: 1.25;
}
.player-list-team {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.player-role-line {
    display: inline-flex;
    align-items: center;
    min-width: 0;
    gap: 6px;
    line-height: 1.25;
}
.role-icon {
    display: inline-grid;
    place-items: center;
    flex: 0 0 auto;
    width: 14px;
    height: 14px;
    color: #53627a;
}
.role-icon svg {
    width: 100%;
    height: 100%;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}
.role-setter { color: #2563eb; }
.role-outside { color: #0f766e; }
.role-opposite { color: #d97706; }
.role-middle { color: #7c3aed; }
.role-libero { color: #0891b2; }
.role-defensive_specialist { color: #475467; }
.role-universal { color: #ca8a04; }
.player-workspace {
    display: grid;
    grid-template-rows: auto auto auto auto auto;
    align-content: start;
    gap: 8px;
    min-width: 0;
    min-height: 0;
    overflow: hidden;
}
.player-profile-card {
    display: grid;
    grid-template-columns: 82px minmax(0, 1fr) auto;
    gap: 24px;
    align-items: center;
    min-height: 126px;
    padding: 14px 24px 0;
}
.player-number-large {
    width: 82px;
    height: 76px;
    font-size: 34px;
}
.player-profile-main {
    min-width: 0;
}
.player-profile-main h2 {
    margin-bottom: 8px;
    font-size: 22px;
}
.player-tags,
.player-profile-stats,
.player-tabs,
.player-profile-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 16px;
}
.player-tags {
    gap: 8px;
    color: #53627a;
    font-family: var(--font-ui);
    font-size: 12px;
    font-weight: 750;
}
.player-tag-icon {
    display: inline-flex;
    align-items: center;
    width: 13px;
    height: 13px;
    color: #53627a;
}
.player-tag-icon svg,
.player-action-button svg,
.metric-icon svg {
    width: 100%;
    height: 100%;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}
.player-tags strong {
    padding: 4px 10px;
    border-radius: 999px;
    font-size: 12px;
}
.status-active {
    background: #dffbea;
    color: #067647;
}
.status-inactive {
    background: #f2f4f7;
    color: #475467;
}
.player-profile-stats {
    margin-top: 10px;
    color: #53627a;
    font-family: var(--font-ui);
    font-size: 12px;
}
.player-tabs {
    margin-top: 12px;
    gap: 28px;
}
.player-tabs a {
    padding-bottom: 9px;
    border-bottom: 2px solid transparent;
    color: var(--text);
    font-family: var(--font-ui);
    font-size: 13px;
    font-weight: 850;
}
.player-tabs a.active {
    border-color: var(--accent);
    color: var(--accent-dark);
}
.player-profile-actions {
    justify-content: flex-end;
    gap: 12px;
}
.player-action-button {
    gap: 8px;
    min-height: 36px;
    padding: 8px 13px;
    white-space: nowrap;
}
.player-action-button svg {
    width: 15px;
    height: 15px;
}
.player-analysis-filters {
    display: grid;
    grid-template-columns: minmax(145px, 0.9fr) minmax(150px, 1fr) minmax(220px, 1.45fr) minmax(145px, 0.9fr) minmax(214px, 1.25fr);
    gap: 26px;
    align-items: end;
    padding: 11px 16px;
}
.player-analysis-filters label {
    gap: 4px;
}
.player-analysis-filters input,
.player-analysis-filters select {
    min-height: 34px;
    padding: 6px 10px;
    font-size: 12px;
}
.date-range-field {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
}
.player-card-section {
    min-height: 0;
    padding: 10px 16px;
}
.player-card-section h2 {
    margin-bottom: 12px;
    font-size: 15px;
}
.section-title-row.compact h2 {
    margin-bottom: 0;
    font-size: 15px;
}
.section-title-row.compact {
    margin-bottom: 4px;
}
.player-metric-grid {
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 10px;
}
.player-metric {
    display: flex;
    align-items: center;
    gap: 8px;
    min-height: 38px;
    padding: 5px 9px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #ffffff;
}
.player-metric small {
    display: block;
    color: #53627a;
    font-size: 10px;
    font-weight: 800;
    line-height: 1.22;
}
.player-metric strong {
    display: block;
    color: var(--text);
    font-family: var(--font-display);
    font-size: 18px;
    font-weight: 900;
    line-height: 1.05;
}
.metric-icon {
    display: grid;
    place-items: center;
    flex: 0 0 auto;
    width: 28px;
    height: 28px;
    border-radius: 8px;
    padding: 7px;
    font-weight: 900;
}
.metric-icon.green { background: #dcfae6; color: #079455; }
.metric-icon.blue { background: #e0f2fe; color: #1570ef; }
.metric-icon.red { background: #fee4e2; color: #f04438; }
.metric-icon.amber { background: #fef0c7; color: #f79009; }
.metric-icon.violet { background: #ebe9fe; color: #6938ef; }
.player-skill-grid {
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 12px;
    align-items: stretch;
    padding: 2px 0 6px;
}
#skill-stats {
    display: flex;
    flex-direction: column;
    padding: 12px 16px 16px;
    overflow: hidden;
}
#skill-stats h2 {
    margin-bottom: 14px;
}
.skill-card {
    box-sizing: border-box;
    min-height: 132px;
    padding: 11px 12px 10px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #ffffff;
}
.skill-card h3 {
    margin: 0 0 7px;
    font-size: 13px;
    line-height: 1.25;
}
.skill-row {
    display: flex;
    justify-content: space-between;
    gap: 10px;
    padding: 2px 0;
    color: #344054;
    font-size: 11.5px;
    line-height: 1.24;
}
.skill-row strong {
    color: var(--text);
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
}
.skill-row strong.accent {
    color: var(--accent-dark);
}
.player-bottom-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    align-self: start;
    min-height: 0;
    overflow: hidden;
}
.player-bottom-grid .player-card-section {
    display: flex;
    flex-direction: column;
    gap: 6px;
    height: 146px;
    padding: 8px 14px;
    overflow: hidden;
}
.player-table-wrap {
    flex: 1 1 auto;
    min-height: 0;
    overflow-x: auto;
    overflow-y: auto;
    scrollbar-gutter: stable;
}
.player-mini-table {
    width: 100%;
    min-width: 0;
    table-layout: auto;
}
.player-mini-table th,
.player-mini-table td {
    padding: 4px 6px;
    font-size: 10px;
    white-space: nowrap;
}
.highlight-list {
    display: flex;
    flex: 1 1 auto;
    flex-direction: column;
    gap: 4px;
    min-height: 0;
    overflow-y: auto;
    padding-right: 2px;
    scrollbar-gutter: stable;
}
.highlight-list .empty {
    padding: 10px 14px;
    font-size: 11px;
    line-height: 1.35;
}
.highlight-row {
    display: grid;
    grid-template-columns: 22px 46px minmax(170px, 1fr) minmax(150px, 220px) 76px;
    align-items: center;
    gap: 8px;
    min-height: 26px;
    padding: 2px 7px;
    border: 1px solid #e4e9f2;
    border-radius: 8px;
    color: var(--text);
    font-size: 11px;
    line-height: 1.2;
}
.highlight-row > * {
    align-self: center;
}
.highlight-row:hover {
    border-color: #99f6e4;
    background: #f0fdfa;
    text-decoration: none;
}
.highlight-row span:not(.play-dot),
.highlight-row small {
    display: flex;
    align-items: center;
    min-height: 20px;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.highlight-row small {
    color: #53627a;
    font-size: 10.5px;
    line-height: 1.2;
}
.highlight-row strong {
    display: flex;
    align-items: center;
    min-height: 20px;
    font-size: 11px;
    font-weight: 850;
    line-height: 1;
}
.play-dot {
    display: grid;
    place-items: center;
    box-sizing: border-box;
    width: 20px;
    height: 20px;
    min-width: 20px;
    min-height: 20px;
    aspect-ratio: 1 / 1;
    align-self: center;
    justify-self: center;
    border: 2px solid var(--text);
    border-radius: 999px;
    background: #ffffff;
    color: transparent;
    font-size: 0;
    line-height: 1;
    overflow: hidden;
}
.play-dot::before {
    content: "";
    width: 7px;
    height: 8px;
    margin-left: 2px;
    background: var(--text);
    clip-path: polygon(0 0, 100% 50%, 0 100%);
}
.compact-empty {
    padding: 14px;
}

main > section { margin-bottom: 32px; }
main > section:last-child { margin-bottom: 0; }

@media (max-width: 1320px) {
    .player-analysis-filters {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media (max-width: 1180px) {
    .players-shell {
        grid-template-columns: 1fr;
    }
    .players-sidebar {
        position: static;
        max-height: none;
    }
    .player-profile-card {
        grid-template-columns: 84px minmax(0, 1fr);
    }
    .player-number-large {
        width: 84px;
        height: 78px;
    }
    .player-profile-actions {
        grid-column: 1 / -1;
        justify-content: flex-start;
    }
    .player-bottom-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 900px) {
    .page-head { grid-template-columns: 1fr; align-items: flex-start; }
    .page-head .actions { justify-content: flex-start; }
    .dashboard-actions { flex-wrap: wrap; }
    .dashboard-actions .button { flex: 1 1 180px; }
    .topbar { align-items: flex-start; flex-direction: column; }
    .video-controls { align-items: flex-start; }
    .set-score-controls { grid-template-columns: 1fr; }
    .set-score-card { width: 76px; min-width: 76px; }
    .set-score-window { width: 76px; min-width: 0; }
    .set-switcher { width: 100%; flex-wrap: wrap; }
    .video-time-card { width: 100%; }
    .analysis-layout, .report-grid, .stats-grid, .protocol-summary-grid, .filter-panel, .hotkey-grid, .score-row, .recent-grid, #action-form, .advanced-fields-grid, .player-metric-grid, .player-skill-grid, .player-analysis-filters { grid-template-columns: 1fr; }
    .player-profile-card {
        grid-template-columns: 1fr;
        padding: 16px;
    }
    .highlight-row {
        grid-template-columns: 32px 58px minmax(0, 1fr);
    }
    .highlight-row small {
        grid-column: 3;
    }
    .nav { flex-wrap: wrap; }
    .nav-menu { left: 0; right: auto; }
    .section-head { flex-direction: column; }
    h1 { font-size: 28px; }
}

/* Вложенная страница статистики игрока. */
.container:has(.player-statistics-page) {
    width: min(1900px, calc(100% - 28px));
    margin-top: 14px;
}
.player-statistics-page {
    display: grid;
    grid-template-columns: 232px minmax(0, 1fr);
    gap: 18px;
    align-items: start;
}
.stats-player-rail {
    position: sticky;
    top: 84px;
    min-width: 0;
    padding: 4px 10px 18px 0;
    border-right: 1px solid var(--line);
}
.stats-back-link {
    display: inline-flex;
    margin: 0 0 18px 8px;
    color: #53627a;
    font-family: var(--font-ui);
    font-size: 13px;
    font-weight: 750;
}
.stats-player-identity {
    display: grid;
    grid-template-columns: 68px minmax(0, 1fr);
    gap: 12px;
    align-items: center;
    padding: 0 8px 18px;
}
.stats-player-number {
    display: grid;
    place-items: center;
    width: 68px;
    height: 68px;
    border: 1px solid #bfe3df;
    border-radius: 50%;
    background: #eefaf8;
    color: var(--accent-dark);
    font-family: var(--font-display);
    font-size: 32px;
    font-weight: 900;
}
.stats-player-identity h1 {
    overflow: visible;
    font-size: 23px;
    line-height: 1.12;
    overflow-wrap: normal;
}
.stats-player-identity p {
    margin: 6px 0 0;
    color: #53627a;
    font-size: 15px;
    line-height: 1.25;
}
.stats-player-meta {
    display: grid;
    gap: 15px;
    margin: 0;
    padding: 0 16px 22px 28px;
    border-bottom: 1px solid #edf0f5;
}
.stats-player-meta div {
    display: grid;
    gap: 3px;
}
.stats-player-meta dt {
    color: #7a8699;
    font-size: 12px;
    line-height: 1.25;
    font-weight: 750;
}
.stats-player-meta dd {
    margin: 0;
    color: #344054;
    font-size: 16px;
    line-height: 1.3;
    font-weight: 750;
}
.stats-status {
    color: #667085;
}
.stats-status.active {
    padding: 3px 8px;
    border-radius: 999px;
    background: #dcfae6;
    color: #067647;
}
.stats-player-nav {
    display: grid;
    gap: 6px;
    padding-top: 16px;
}
.stats-player-nav a {
    display: flex;
    align-items: center;
    gap: 14px;
    min-height: 46px;
    padding: 10px 16px;
    border-left: 2px solid transparent;
    border-radius: 0 7px 7px 0;
    color: #344054;
    font-family: var(--font-ui);
    font-size: 16px;
    font-weight: 800;
}
.stats-player-nav a:hover {
    background: #f5f8fa;
    text-decoration: none;
}
.stats-player-nav a.active {
    border-left-color: var(--accent);
    background: #eaf7f5;
    color: var(--accent-dark);
}
.stats-player-nav svg,
.stats-selection-bar svg,
.stats-export-button svg {
    width: 15px;
    height: 15px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
}
.stats-player-nav svg {
    width: 18px;
    height: 18px;
}
.stats-workspace {
    min-width: 0;
}
.stats-page-title {
    margin: 0 0 12px;
    font-size: 22px;
}
.stats-filter-panel,
.stats-panel,
.stats-metrics article,
.stats-skill-card {
    border: 1px solid #dfe4ec;
    border-radius: 7px;
    background: #fff;
}
.stats-filter-panel {
    display: grid;
    grid-template-columns: repeat(4, minmax(140px, 1fr)) minmax(178px, auto);
    gap: 8px 14px;
    align-items: end;
    padding: 8px 12px;
}
.stats-filter-panel > label,
.stats-period label {
    display: grid;
    gap: 4px;
}
.stats-filter-panel label > span,
.stats-check-select summary > span {
    color: #53627a;
    font-family: var(--font-ui);
    font-size: 10px;
    font-weight: 800;
}
.stats-filter-panel select,
.stats-filter-panel input[type="date"] {
    width: 100%;
    min-height: 30px;
    padding: 5px 9px;
    border: 1px solid #d9dee8;
    border-radius: 5px;
    background: #fff;
    color: var(--text);
    font: 750 12px/1.2 var(--font-ui);
}
.stats-filter-panel [hidden] {
    display: none !important;
}
.stats-check-select {
    position: relative;
}
.stats-check-select summary {
    display: grid;
    gap: 4px;
    min-height: 30px;
    padding: 0 9px 5px;
    border: 1px solid #d9dee8;
    border-radius: 5px;
    background: #fff;
    cursor: pointer;
    list-style: none;
}
.stats-check-select summary::-webkit-details-marker { display: none; }
.stats-check-select summary strong {
    overflow: hidden;
    color: var(--text);
    font: 750 12px/1.2 var(--font-ui);
    text-overflow: ellipsis;
    white-space: nowrap;
}
.stats-check-select[open] > div {
    position: absolute;
    z-index: 30;
    top: calc(100% + 4px);
    left: 0;
    display: grid;
    min-width: 190px;
    max-height: 230px;
    overflow: auto;
    padding: 7px;
    border: 1px solid #d9dee8;
    border-radius: 7px;
    background: #fff;
    box-shadow: 0 12px 30px rgba(23, 32, 51, .14);
}
.stats-check-select[open] > div.wide-options { min-width: 340px; }
.stats-check-select > div label {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 5px 6px;
    color: #344054;
    font-size: 10px;
    white-space: nowrap;
}
.stats-period {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    grid-column: span 2;
}
.stats-filter-actions {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
    grid-column: -2 / -1;
}
.stats-filter-actions .button {
    min-width: 86px;
    min-height: 30px;
    padding: 6px 13px;
    font-size: 12px;
}
.stats-selection-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    min-height: 40px;
    color: #53627a;
    font: 700 10px/1.3 var(--font-ui);
}
.stats-selection-bar > span {
    display: inline-flex;
    align-items: center;
    gap: 5px;
}
.stats-selection-bar > span svg { color: var(--accent); }
.stats-export-actions {
    display: flex;
    align-items: center;
    gap: 7px;
}
.stats-export-button {
    gap: 7px;
    min-height: 29px;
    padding: 5px 12px;
    font-size: 10px;
}
.stats-metrics {
    display: grid;
    grid-template-columns: 1fr;
    gap: 9px;
    margin-bottom: 9px;
}
.stats-metrics article {
    display: grid;
    grid-template-rows: auto 1fr;
    align-items: stretch;
    min-height: 68px;
    padding: 10px 14px;
}
.stats-metrics h3 {
    margin: 0 0 8px;
    color: #344054;
    font: 850 12px/1.1 var(--font-ui);
    text-align: center;
    text-transform: uppercase;
}
.stats-metric-items {
    display: grid;
    grid-template-columns: repeat(3, max-content);
    align-items: center;
    justify-content: center;
    width: 100%;
    min-width: 0;
}
.stats-metric-items > span {
    display: flex;
    align-items: baseline;
    min-height: 28px;
    gap: 10px;
    padding: 0 28px;
    border-left: 1px solid #e4e7ec;
    white-space: nowrap;
}
.stats-metric-items > span:first-child {
    padding-left: 0;
    border-left: 0;
}
.stats-metric-items > span:last-child {
    padding-right: 0;
}
.stats-metric-icon {
    display: grid;
    place-items: center;
    flex: 0 0 auto;
    width: 28px;
    height: 28px;
    border-radius: 8px;
    background: #eef7f6;
    color: var(--accent);
}
.stats-metric-icon.negative { background: #fff1f0; color: #e5484d; }
.stats-metric-icon svg {
    width: 18px;
    height: 18px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
}
.stats-metrics small,
.stats-metrics strong,
.stats-metrics em {
    display: inline-block;
}
.stats-metrics small {
    color: #667085;
    font-size: 12px;
    font-style: normal;
    font-weight: 800;
    line-height: 1;
}
.stats-metrics strong {
    font: 900 24px/.95 var(--font-display);
}
.stats-metrics em {
    color: #667085;
    font-size: 11px;
    font-style: normal;
    font-weight: 850;
    line-height: 1;
}
.positive { color: #079455 !important; }
.negative { color: #e5484d !important; }
.warning { color: #f79009 !important; }
.stats-skill-grid {
    display: grid;
    grid-template-columns: 1fr 1.08fr 1fr 1.22fr 1fr;
    gap: 9px;
    margin-bottom: 9px;
}
.stats-skill-card {
    display: flex;
    flex-direction: column;
    min-width: 0;
    min-height: 150px;
    padding: 9px 12px 8px;
}
.stats-skill-card h3,
.stats-panel h3 {
    margin: 0 0 8px;
    color: #172033;
    font: 850 14px/1.2 var(--font-ui);
}
.stats-skill-total,
.stats-skill-row {
    display: grid;
    align-items: center;
    color: #53627a;
    font-size: 11.5px;
}
.stats-skill-total {
    grid-template-columns: 1fr auto;
    padding-bottom: 5px;
}
.stats-skill-total strong { color: var(--text); }
.stats-skill-row {
    grid-template-columns: minmax(70px, 1.3fr) 24px minmax(38px, .8fr) 28px;
    gap: 6px;
    padding: 2px 0;
}
.stats-skill-row b,
.stats-skill-row em {
    color: #344054;
    font-size: 11px;
    font-style: normal;
    font-variant-numeric: tabular-nums;
    text-align: right;
}
.stats-progress {
    height: 3px;
    overflow: hidden;
    background: #e9edf2;
}
.stats-progress i {
    display: block;
    height: 100%;
    min-width: 3px;
    background: var(--accent);
}
.stats-progress i.negative { background: #f04438; }
.stats-progress i.warning { background: #f79009; }
.stats-progress i.neutral { background: #667085; }
.stats-table-row {
    display: grid;
    grid-template-columns: 1fr;
    gap: 8px;
    margin-bottom: 10px;
}
.stats-panel {
    min-width: 0;
    padding: 9px 10px;
}
.stats-table-row .stats-panel {
    --stats-table-head-height: 38px;
    --stats-table-row-height: 37px;
    --stats-table-scroll-bottom-space: 12px;
    height: calc(9px + 18px + 14px + var(--stats-table-head-height) + var(--stats-table-row-height) * 4 + var(--stats-table-scroll-bottom-space) + 10px);
    overflow: hidden;
}
.stats-table-scroll {
    height: calc(100% - 21px);
    overflow: auto;
    scrollbar-gutter: stable;
}
.stats-panel table {
    width: 100%;
    min-width: 0;
    table-layout: fixed;
    border-collapse: collapse;
    font-family: var(--font-ui);
    font-size: 12px;
}
.stats-panel th,
.stats-panel td {
    overflow: hidden;
    padding: 7px 3px;
    border-bottom: 1px solid #edf0f5;
    font-size: 12px;
    line-height: 1.25;
    text-align: left;
    text-overflow: ellipsis;
    vertical-align: middle;
    white-space: nowrap;
}
.stats-panel tbody tr {
    height: var(--stats-table-row-height);
}
.stats-panel th {
    position: sticky;
    z-index: 2;
    top: 0;
    background: #fff;
    color: #667085;
    font-size: 11px;
    font-weight: 800;
    line-height: 1.15;
    height: var(--stats-table-head-height);
    white-space: normal;
}
.stats-panel td { color: #344054; }
.stats-panel td strong { font-size: inherit; }
.stats-scope-panel h3 {
    flex: 0 0 auto;
    justify-content: flex-start;
    gap: 8px;
    margin-bottom: 14px;
    font-size: 15px;
}
.stats-scope-panel {
    display: flex;
    flex-direction: column;
    min-height: 0;
}
.stats-scope-panel .stats-chart-select {
    max-width: 120px;
    font-size: 12px;
}
.stats-scope-panel .stats-chart-state {
    flex: 1 1 auto;
    min-height: 0;
    overflow: hidden;
}
.stats-scope-panel .stats-table-scroll {
    height: calc(var(--stats-table-head-height) + var(--stats-table-row-height) * 4);
    max-height: calc(var(--stats-table-head-height) + var(--stats-table-row-height) * 4);
    margin-bottom: var(--stats-table-scroll-bottom-space);
    overflow-x: hidden;
    overflow-y: auto;
    scroll-padding-bottom: var(--stats-table-scroll-bottom-space);
}
.stats-table-matches th:nth-child(1) { width: 6.5%; }
.stats-table-matches th:nth-child(2) { width: 9%; }
.stats-table-matches th:nth-child(3) { width: 12%; }
.stats-table-matches th:nth-child(4) { width: 6.5%; }
.stats-table-matches th:nth-child(5) { width: 8%; }
.stats-table-matches th:nth-child(6) { width: 7%; }
.stats-table-matches th:nth-child(7) { width: 6.5%; }
.stats-table-matches th:nth-child(8) { width: 8%; }
.stats-table-matches th:nth-child(9) { width: 8%; }
.stats-table-matches th:nth-child(10) { width: 8.5%; }
.stats-table-matches th:nth-child(11) { width: 12%; }
.stats-table-matches th:nth-child(12) { width: 8%; }
.stats-table-sets th:nth-child(1) { width: 6%; }
.stats-table-sets th:nth-child(2) { width: 8.5%; }
.stats-table-sets th:nth-child(3) { width: 11%; }
.stats-table-sets th:nth-child(4) { width: 6%; }
.stats-table-sets th:nth-child(5) { width: 6%; }
.stats-table-sets th:nth-child(6) { width: 7.5%; }
.stats-table-sets th:nth-child(7) { width: 6.5%; }
.stats-table-sets th:nth-child(8) { width: 6.5%; }
.stats-table-sets th:nth-child(9) { width: 8%; }
.stats-table-sets th:nth-child(10) { width: 8%; }
.stats-table-sets th:nth-child(11) { width: 8.5%; }
.stats-table-sets th:nth-child(12) { width: 10%; }
.stats-table-sets th:nth-child(13) { width: 7.5%; }
.stats-panel .clickable-row { cursor: pointer; }
.stats-chart-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    grid-auto-rows: minmax(250px, auto);
    gap: 12px;
    align-items: stretch;
}
.stats-chart-card {
    display: flex;
    flex-direction: column;
    min-height: 250px;
    min-width: 0;
}
.stats-distribution { order: 1; }
.stats-average-card { order: 2; }
.stats-error-card { order: 3; }
.stats-trend-card { order: 4; }
.stats-chart-card h3 {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    min-width: 0;
}
.stats-chart-card h3 > select { flex: 0 0 auto; }
.stats-chart-card h3 span {
    color: #667085;
    font-size: 7.5px;
    font-weight: 700;
    white-space: nowrap;
}
.stats-chart-select {
    width: auto;
    max-width: min(190px, 45%);
    min-height: 24px;
    padding: 3px 18px 3px 7px;
    border: 1px solid #d9dee8;
    border-radius: 4px;
    background-color: #fff;
    color: #344054;
    font: 750 9px/1.2 var(--font-ui);
}
.stats-line-chart {
    display: block;
    width: 100%;
    height: 156px;
    overflow: visible;
}
.stats-line-chart .grid {
    fill: none;
    stroke: #e6e9ef;
    stroke-width: 1;
    stroke-dasharray: 2 3;
}
.stats-line-chart polyline {
    fill: none;
    stroke: var(--accent);
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}
.stats-line-chart circle { fill: var(--accent); }
.stats-line-chart text {
    fill: #344054;
    font: 700 8px var(--font-ui);
    text-anchor: middle;
}
.stats-line-chart text.axis { fill: #667085; font-weight: 600; }
.stats-line-chart text.axis-y { text-anchor: end; }
.stats-chart-legend {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    min-height: 12px;
    margin: -3px 0 1px;
    color: #667085;
    font-size: 10px;
    line-height: 1;
}
.stats-chart-legend span {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    white-space: nowrap;
}
.stats-chart-legend i {
    display: inline-block;
    width: 6px;
    height: 6px;
    border-radius: 1px;
}
.stats-chart-legend.error-legend {
    gap: 8px;
    justify-content: flex-start;
    flex-wrap: wrap;
    overflow: visible;
}
.stats-chart-legend.error-legend span { font-size: 9px; }
.stats-chart-legend.trend-legend {
    justify-content: center;
    flex-wrap: nowrap;
    width: 100%;
    gap: 18px;
    margin: 1px 0 4px;
    overflow: visible;
    line-height: 1.25;
}
.stats-chart-legend.trend-legend span {
    flex: 0 0 auto;
    min-width: 0;
    font-size: 12.5px;
    font-weight: 800;
}
.stats-chart-legend.trend-legend i {
    width: 9px;
    height: 9px;
    border-radius: 50%;
}
.stats-chart-state {
    flex: 1 1 auto;
    min-height: 0;
}
.stats-empty-chart {
    display: grid;
    place-items: center;
    min-height: 156px;
    margin: 0;
    color: #667085;
    font-size: 11px;
    text-align: center;
}
.stats-bars {
    display: flex;
    align-items: flex-end;
    justify-content: space-around;
    gap: 6px;
    height: 156px;
    padding: 8px 5px 0;
    border-bottom: 1px solid #dfe4ec;
    background: repeating-linear-gradient(to bottom, transparent 0, transparent 31px, #edf0f5 32px);
}
.stats-bar-item {
    display: grid;
    align-items: end;
    justify-items: center;
    height: 100%;
    min-width: 20px;
}
.stats-bar-item b {
    color: #344054;
    font-size: 9px;
}
.stats-bar-item small {
    color: #667085;
    font-size: 8.5px;
    line-height: 1;
}
.stats-stacked {
    display: flex;
    flex-direction: column-reverse;
    justify-content: flex-start;
    width: 18px;
}
.stats-stacked i { display: block; width: 100%; }
.bar-positive { background: #36b79b; }
.bar-negative { background: #ef4444; }
.error-bars .stats-stacked { flex-direction: column-reverse; }
.stats-match-bars {
    display: flex;
    align-items: stretch;
    justify-content: flex-start;
    gap: 12px;
    height: 196px;
    padding: 6px 2px 4px;
    overflow-x: auto;
    overflow-y: visible;
    background: linear-gradient(to bottom, transparent calc(100% - 52px), #dfe4ec calc(100% - 52px), #dfe4ec calc(100% - 50px), transparent calc(100% - 50px));
}
.stats-match-bar-group {
    display: grid;
    grid-template-rows: minmax(122px, 1fr) 52px;
    align-items: end;
    justify-items: center;
    width: 96px;
    min-width: 96px;
    height: 100%;
}
.stats-match-bar-columns {
    display: flex;
    align-items: flex-end;
    justify-content: center;
    gap: 3px;
    width: 100%;
    height: 144px;
}
.stats-match-bar {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-end;
    justify-items: center;
    width: 21px;
    height: 140px;
}
.stats-match-bar b {
    display: block;
    margin-bottom: 3px;
    color: #172033;
    font: 900 14px/1 var(--font-ui);
}
.stats-match-bar i {
    display: block;
    width: 21px;
    min-height: 0;
    border-radius: 1px 1px 0 0;
}
.stats-match-bar-group small {
    display: grid;
    align-content: start;
    justify-items: center;
    width: 96px;
    min-height: 52px;
    padding-top: 8px;
    padding-bottom: 4px;
    overflow: visible;
    color: #667085;
    font: 850 11.5px/1.25 var(--font-ui);
    text-align: center;
}
.stats-match-bar-group small span {
    color: #344054;
    font-size: 11.5px;
    line-height: 1.25;
}
.stats-match-bar-group small em {
    display: block;
    width: 100%;
    margin-top: 2px;
    overflow: hidden;
    color: #667085;
    font-style: normal;
    line-height: 1.25;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.stats-average-card {
    min-height: 250px;
}
.stats-average-card h3 {
    margin-bottom: 8px;
}
.stats-average-card .average-select {
    max-width: 88px;
    min-height: 30px;
    padding: 4px 24px 4px 9px;
    border-color: #cfd6e3;
    color: #0b1b3a;
    font-size: 11px;
}
.stats-average-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    grid-template-rows: repeat(2, minmax(0, 1fr));
    flex: 1 1 auto;
    min-height: 188px;
    overflow: hidden;
}
.stats-average-item {
    display: grid;
    grid-template-columns: 46px minmax(0, 1fr);
    align-items: center;
    column-gap: 10px;
    min-width: 0;
    padding: 12px 16px;
}
.stats-average-item:nth-child(odd) { border-right: 1px solid #e5e9f0; }
.stats-average-item:nth-child(-n + 2) { border-bottom: 1px solid #e5e9f0; }
.stats-average-icon {
    display: grid;
    place-items: center;
    width: 40px;
    height: 40px;
    border: 1px solid #dce7e7;
    border-radius: 50%;
    background: #f7fbfb;
    color: #087f6f;
}
.stats-average-icon svg {
    width: 28px;
    height: 28px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
}
.stats-average-copy {
    display: grid;
    min-width: 0;
}
.stats-average-copy strong {
    overflow: hidden;
    color: #0b1b3a;
    font: 900 16px/1.1 var(--font-ui);
    text-overflow: ellipsis;
    white-space: nowrap;
}
.stats-average-copy b {
    margin-top: 3px;
    color: #0b1b3a;
    font: 950 34px/1 var(--font-display);
    letter-spacing: 0;
}
.stats-average-copy small {
    margin-top: 4px;
    overflow: hidden;
    color: #475467;
    font: 750 11.5px/1.2 var(--font-ui);
    text-overflow: ellipsis;
    white-space: nowrap;
}
.stats-type-chart {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    align-items: stretch;
    width: 100%;
    flex: 1 1 auto;
    min-height: 190px;
    margin-top: 2px;
}
.stats-type-bars {
    display: grid;
    grid-template-columns: repeat(6, 88px);
    justify-content: center;
    align-items: end;
    gap: 8px;
    width: 100%;
    min-height: 190px;
    padding: 10px 1px 0;
    background: linear-gradient(to bottom, transparent calc(100% - 32px), #dfe4ec calc(100% - 32px), #dfe4ec calc(100% - 30px), transparent calc(100% - 30px));
}
.stats-type-bar-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-end;
    height: 100%;
    min-width: 0;
}
.stats-type-bar-stack {
    display: flex;
    flex: 1 1 auto;
    flex-direction: column;
    align-items: center;
    justify-content: flex-end;
    min-height: 0;
}
.stats-type-bar-item b {
    display: block;
    margin-bottom: 6px;
    color: #172033;
    font: 900 16px/1 var(--font-ui);
}
.stats-type-bar-item i {
    display: block;
    width: 76px;
    min-height: 0;
    border-radius: 1px 1px 0 0;
}
.stats-type-bar-item small {
    display: block;
    min-height: 31px;
    padding-top: 8px;
    overflow: hidden;
    max-width: 100%;
    color: #344054;
    font: 850 13.5px/1.05 var(--font-ui);
    text-align: center;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.stats-ring-row {
    display: grid;
    grid-template-columns: minmax(0, 3fr) minmax(190px, 2fr);
    gap: 4px;
    align-items: center;
    justify-items: center;
    flex: 1 1 auto;
    min-height: 190px;
}
.stats-ring {
    position: relative;
    display: grid;
    place-items: center;
    width: min(190px, 100%);
    max-width: 190px;
    aspect-ratio: 1;
    border-radius: 50%;
}
.stats-ring::after {
    content: "";
    position: absolute;
    width: 58%;
    height: 58%;
    border-radius: 50%;
    background: #fff;
}
.stats-ring > span {
    position: relative;
    z-index: 1;
    width: 54%;
    color: #667085;
    font-size: 12px;
    line-height: 1.05;
    text-align: center;
}
.stats-ring > span strong {
    display: block;
    margin-top: 1px;
    color: var(--text);
    font: 900 32px/1.05 var(--font-display);
}
.stats-legend {
    display: grid;
    justify-self: start;
    width: min(325px, 100%);
    gap: 10px;
    transform: translateX(-10px);
}
.stats-legend span {
    display: grid;
    grid-template-columns: 10px minmax(104px, 1fr) minmax(72px, auto);
    column-gap: 8px;
    align-items: center;
    color: #344054;
    font-size: 13.5px;
    font-weight: 800;
}
.stats-legend i {
    width: 9px;
    height: 9px;
    border-radius: 50%;
}
.stats-legend strong { white-space: nowrap; }

@media (max-width: 1500px) {
    .stats-metrics { grid-template-columns: 1fr; }
    .stats-skill-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 1050px) {
    .player-statistics-page { grid-template-columns: 1fr; }
    .stats-player-rail { position: static; border-right: 0; border-bottom: 1px solid var(--line); }
    .stats-player-meta { grid-template-columns: repeat(4, 1fr); }
    .stats-player-nav { grid-template-columns: repeat(4, 1fr); }
    .stats-player-nav a { justify-content: center; border-left: 0; border-bottom: 2px solid transparent; border-radius: 7px 7px 0 0; }
    .stats-player-nav a.active { border-bottom-color: var(--accent); }
    .stats-filter-panel { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .stats-filter-actions { grid-column: auto; }
    .stats-table-row { grid-template-columns: 1fr; }
    .stats-set-panel { grid-column: auto; }
}
@media (max-width: 720px) {
    .container:has(.player-statistics-page) { width: min(100% - 20px, 1900px); }
    .stats-player-meta { grid-template-columns: 1fr 1fr; }
    .stats-player-nav { grid-template-columns: 1fr 1fr; }
    .stats-filter-panel,
    .stats-metrics,
    .stats-skill-grid,
    .stats-chart-grid { grid-template-columns: 1fr; }
    .stats-chart-grid { grid-auto-rows: auto; }
    .stats-ring-row {
        grid-template-columns: 1fr;
        gap: 14px;
    }
    .stats-type-bars {
        grid-template-columns: repeat(3, minmax(82px, 1fr));
        height: auto;
        min-height: 220px;
    }
    .stats-period { grid-column: auto; }
    .stats-filter-actions { justify-content: stretch; }
    .stats-filter-actions > * { flex: 1; }
}

/* Dashboard redesign: light operational workspace from the approved MVP reference. */
.dashboard-symbols {
    position: absolute;
    width: 0;
    height: 0;
    overflow: hidden;
}
.dashboard-page {
    background: #ffffff;
    color: #07133f;
    font-family: var(--font-ui);
}
.dashboard-page > .container {
    width: calc(100% - 54px);
    max-width: none;
    margin: 20px auto 32px;
}
.dashboard-hero {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 24px;
    margin-bottom: 20px;
}
.dashboard-hero h1 {
    color: #07133f;
    font: 900 25px/1.15 var(--font-display);
    letter-spacing: -.25px;
}
.dashboard-hero p {
    margin: 6px 0 0;
    color: #536184;
    font-size: 14px;
}
.dashboard-quick-actions { display: flex; gap: 18px; }
.dashboard-quick-actions .button {
    gap: 10px;
    min-width: 180px;
    min-height: 44px;
    padding: 10px 20px;
    border-color: #d7deea;
    border-radius: 7px;
    color: #07133f;
    font-size: 14px;
    font-weight: 850;
    box-shadow: 0 1px 3px rgba(17, 31, 69, .04);
}
.dashboard-quick-actions .button.primary {
    border-color: #0d766e;
    background: #0d766e;
    color: #ffffff;
    box-shadow: 0 8px 18px rgba(13, 118, 110, .18);
}
.dashboard-quick-actions .button.primary:hover {
    border-color: #0a5f59;
    background: #0a5f59;
    color: #ffffff;
    text-decoration: none;
}
.dashboard-quick-actions svg,
.dashboard-page .dashboard-panel h2 svg,
.overview-list svg,
.team-stat-icon svg,
.activity-icon svg,
.play-button svg,
.resume-row em svg,
.activity-more svg {
    width: 18px;
    height: 18px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.7;
    stroke-linecap: round;
    stroke-linejoin: round;
}
.dashboard-layout {
    display: grid;
    grid-template-columns: 345px minmax(0, 1fr);
    gap: 24px;
    align-items: start;
}
.dashboard-sidebar { display: grid; gap: 10px; }
.dashboard-main { display: grid; gap: 14px; min-width: 0; }
.dashboard-panel {
    min-width: 0;
    overflow: visible;
    border: 1px solid #dde3ed;
    border-radius: 8px;
    background: #fff;
    box-shadow: 0 1px 3px rgba(17, 31, 69, .025);
}
.dashboard-page .dashboard-panel > h2,
.dashboard-page .panel-title-row h2 {
    margin: 0;
    color: #07133f;
    font: 900 17px/1.2 var(--font-display);
}
.dashboard-page .dashboard-panel > h2 {
    display: flex;
    align-items: center;
    gap: 10px;
    min-height: 38px;
    padding: 10px 16px 8px;
    border-bottom: 1px solid #e7ebf2;
    font-size: 15px;
}
.panel-compact-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    min-height: 38px;
    padding: 10px 16px 8px;
    border-bottom: 1px solid #e7ebf2;
}
.dashboard-page .panel-compact-heading h2 {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 0;
    color: #07133f;
    font: 900 15px/1.2 var(--font-display);
}
.panel-compact-heading a {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    color: #008a78;
    font-size: 11px;
    font-weight: 850;
    white-space: nowrap;
}
.panel-compact-heading a:hover {
    color: #006f63;
    text-decoration: none;
}
.panel-compact-heading svg {
    width: 18px;
    height: 18px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.7;
    stroke-linecap: round;
    stroke-linejoin: round;
}
.panel-compact-heading a svg { width: 14px; height: 14px; stroke-width: 2; }
.panel-heading-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    min-height: 58px;
    padding: 14px 30px;
    border-bottom: 1px solid #e7ebf2;
}
.dashboard-page .panel-heading-row h2 {
    margin: 0;
    color: #07133f;
    font: 900 24px/1.15 var(--font-display);
}
.panel-more-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    min-height: 32px;
    color: #008a78;
    font-size: 16px;
    font-weight: 850;
}
.panel-more-link:hover {
    color: #006f63;
    text-decoration: none;
}
.panel-more-link svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }
.dashboard-page .dashboard-panel > h2 svg { color: #07133f; }
.overview-list { padding: 6px 12px 10px; }
.overview-list a {
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 29px;
    padding: 3px 4px;
    color: #07133f;
    font-size: 13px;
    font-weight: 700;
}
.overview-list a:hover { color: #008a78; text-decoration: none; }
.overview-list span { display: inline-flex; align-items: center; gap: 12px; }
.overview-list svg { width: 17px; height: 17px; }
.overview-list strong { font-size: 13px; font-variant-numeric: tabular-nums; }
.compact-list { padding: 0 10px; }
.resume-row {
    position: relative;
    display: grid;
    gap: 2px;
    min-height: 52px;
    padding: 9px 93px 8px 0;
    border-bottom: 1px solid #e7ebf2;
    color: #07133f;
}
.resume-row:last-child { border-bottom: 0; }
.resume-row:hover { text-decoration: none; }
.resume-row > strong { overflow: hidden; font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
.resume-row > span { color: #536184; font-size: 11px; white-space: nowrap; }
.resume-row em {
    position: absolute;
    top: 50%;
    right: 0;
    display: inline-flex;
    align-items: center;
    gap: 3px;
    color: #008a78;
    font-size: 10.5px;
    font-style: normal;
    font-weight: 800;
    transform: translateY(-50%);
}
.resume-row em svg { width: 15px; height: 15px; }
.team-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 8px;
    min-height: 56px;
    padding: 8px 0;
    border-bottom: 1px solid #e7ebf2;
}
.team-row:last-child { border-bottom: 0; }
.team-row > div { display: grid; align-content: center; }
.team-row strong { overflow: hidden; font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
.team-row span { color: #536184; font-size: 11px; }
.team-row > div:last-child { justify-items: end; }
.team-row a { color: #008a78; font-size: 10.5px; font-weight: 800; line-height: 1.45; }
.team-stats-list { padding: 0 12px 8px; }
.team-stat-row {
    display: grid;
    grid-template-columns: minmax(90px, 1fr) minmax(142px, 1.25fr);
    align-items: center;
    gap: 6px 10px;
    min-height: 57px;
    padding: 8px 0;
    border-bottom: 1px solid #e7ebf2;
    color: #07133f;
}
.team-stat-row:last-child { border-bottom: 0; }
.team-stat-row:hover { text-decoration: none; }
.team-stat-name { display: flex; align-items: center; gap: 9px; min-width: 0; }
.team-stat-name strong { overflow: hidden; font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }
.team-stat-icon {
    display: grid;
    place-items: center;
    flex: 0 0 auto;
    width: 22px;
    height: 22px;
    border: 1px solid #93d8ce;
    border-radius: 4px;
    color: #008a78;
}
.team-stat-icon svg { width: 14px; height: 14px; }
.team-stat-values { display: grid; grid-template-columns: 1fr 1fr auto; gap: 5px; align-items: center; }
.team-stat-values small { color: #536184; font-size: 9px; white-space: nowrap; }
.team-stat-values b { font-size: 10px; }
.team-stat-track { grid-column: 2; height: 2px; margin-top: -3px; background: #dce4eb; }
.team-stat-track i { display: block; height: 100%; background: #31b574; }
.recent-matches-panel { overflow: visible; }
.panel-title-row {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 20px;
    padding: 17px 20px 0;
}
.team-filter select {
    min-width: 165px;
    min-height: 32px;
    padding: 6px 34px 6px 12px;
    border: 1px solid #d7deea;
    border-radius: 6px;
    background: #fff;
    color: #07133f;
    font: 750 12px/1.2 var(--font-ui);
}
.match-tabs { display: flex; margin: 12px 20px 16px; }
.match-tabs a {
    min-height: 32px;
    padding: 7px 15px;
    border: 1px solid #d7deea;
    border-right: 0;
    background: #fff;
    color: #07133f;
    font-size: 12px;
    font-weight: 750;
}
.match-tabs a:first-child { border-radius: 6px 0 0 6px; }
.match-tabs a:last-child { border-right: 1px solid #d7deea; border-radius: 0 6px 6px 0; }
.match-tabs a:hover { text-decoration: none; background: #f7fafc; }
.match-tabs a.active { border-color: #009d8a; background: #f2fbf9; color: #007f70; }
.match-tabs a.active + a { border-left-color: #009d8a; }
.matches-table-wrap {
    margin: 0 20px 16px;
    overflow: visible;
    border: 1px solid #dde3ed;
    border-radius: 7px;
}
.matches-table {
    width: 100%;
    min-width: 900px;
    table-layout: fixed;
    border-collapse: separate;
    border-spacing: 0;
}
.matches-table th,
.matches-table td {
    padding: 13px 16px;
    border-bottom: 1px solid #e7ebf2;
    color: #07133f;
    font-size: 14px;
    line-height: 1.3;
    vertical-align: middle;
}
.matches-table th {
    height: 46px;
    background: #fbfcfe;
    color: #536184;
    font-size: 13px;
    font-weight: 800;
}
.matches-table tr:last-child td { border-bottom: 0; }
.matches-table tbody tr:hover td { background: #fbfefd; }
.matches-table th:nth-child(1) { width: 12%; }
.matches-table th:nth-child(2) { width: 23%; }
.matches-table th:nth-child(3) { width: 15%; }
.matches-table th:nth-child(4) { width: 14%; }
.matches-table th:nth-child(5) { width: 13%; }
.matches-table th:nth-child(6) { width: 23%; }
.matches-table td > small,
.matches-table td time { display: block; }
.matches-table td small { color: #536184; font-size: 12px; }
.matches-table td:first-child { font-variant-numeric: tabular-nums; white-space: nowrap; }
.matches-table td:first-child time { display: inline; margin-right: 9px; }
.matches-table td:first-child small { display: inline; }
.matches-table th:nth-child(6),
.matches-table td:nth-child(6) { text-align: center; }
.match-actions-cell { padding-right: 16px !important; padding-left: 16px !important; }
.match-actions {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    width: 100%;
}
.match-name { display: block; overflow: hidden; color: #07133f; font-weight: 850; text-overflow: ellipsis; white-space: nowrap; }
.match-name:hover { color: #008a78; text-decoration: none; }
.muted-cell { color: #536184 !important; }
.score { display: block; font-size: 16px; line-height: 1.1; }
.match-status { color: #007f70; font-weight: 800; white-space: nowrap; }
.match-status.not_started { color: #536184; }
.table-action {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 142px;
    width: 142px;
    min-width: 142px;
    max-width: 142px;
    min-height: 34px;
    padding: 7px 10px;
    border: 1px solid #d7deea;
    border-radius: 5px;
    color: #07133f;
    font-size: 13px;
    font-weight: 850;
    white-space: nowrap;
}
.table-action:hover { border-color: #009d8a; color: #007f70; text-decoration: none; }
.row-menu { position: relative; flex: 0 0 auto; }
.row-menu summary {
    display: grid;
    place-items: center;
    width: 34px;
    height: 34px;
    border: 1px solid transparent;
    border-radius: 5px;
    list-style: none;
    color: #07133f;
    cursor: pointer;
}
.row-menu[open] summary,
.row-menu summary:hover {
    border-color: #07133f;
    background: #fff;
}
.row-menu summary::-webkit-details-marker { display: none; }
.row-menu summary svg { width: 18px; height: 18px; fill: currentColor; }
.row-menu[open] > div {
    position: absolute;
    z-index: 30;
    top: 38px;
    right: 0;
    display: grid;
    min-width: 210px;
    padding: 8px;
    border: 1px solid #d7deea;
    border-radius: 7px;
    background: #fff;
    box-shadow: 0 12px 30px rgba(17, 31, 69, .14);
}
.row-menu[open] a {
    min-height: 36px;
    padding: 9px 12px;
    border-radius: 4px;
    color: #07133f;
    font-family: var(--font-ui);
    font-size: 13px;
    font-weight: 700;
    line-height: 1.25;
    text-align: left;
    white-space: nowrap;
}
.row-menu[open] a:hover { background: #f3f8f8; text-decoration: none; }
.row-menu[open] a.danger-link { color: var(--danger); }
.dashboard-bottom-grid { display: grid; grid-template-columns: minmax(0, 2fr) minmax(300px, 1fr); gap: 24px; }
.highlights-panel { overflow: hidden; }
.highlights-panel .panel-heading-row {
    min-height: 52px;
    padding: 12px 30px;
}
.highlights-panel .panel-heading-row h2 {
    font: 900 17px/1.2 var(--font-display);
}
.highlights-panel .panel-more-link {
    min-height: 28px;
    font-size: 13px;
}
.highlights-panel .panel-more-link svg {
    width: 16px;
    height: 16px;
}
.highlight-list-compact { display: grid; }
.highlight-row-compact {
    display: grid;
    grid-template-columns: 30px 52px 70px minmax(96px, 118px) minmax(160px, 1fr) auto 16px;
    grid-template-areas:
        "play time date player action badge arrow"
        "play time date player context badge arrow";
    grid-template-rows: auto auto;
    align-items: center;
    gap: 2px 10px;
    min-height: 46px;
    padding: 7px 30px;
    border-bottom: 1px solid #e0e6ef;
    color: #07133f;
}
.highlight-row-compact:last-child { border-bottom: 0; }
.highlight-row-compact:hover {
    background: #fbfefd;
    text-decoration: none;
}
.highlight-row-compact:focus-visible {
    outline: 3px solid rgba(0, 157, 138, .22);
    outline-offset: -3px;
}
.highlight-play {
    grid-area: play;
    display: grid;
    place-items: center;
    width: 28px;
    height: 28px;
    border: 1px solid #009d8a;
    border-radius: 7px;
    color: #07133f;
    transition: background .15s ease, border-color .15s ease;
}
.highlight-row-compact:hover .highlight-play { background: #eefaf8; border-color: #008a78; }
.highlight-play svg { width: 13px; height: 13px; fill: currentColor; stroke: none; transform: translateX(1px); }
.highlight-time {
    grid-area: time;
    color: #07133f;
    font-size: 11px;
    font-weight: 900;
    line-height: 1.2;
    white-space: nowrap;
    font-variant-numeric: tabular-nums;
    align-self: center;
}
.highlight-date {
    grid-area: date;
    color: #536184;
    font-size: 11px;
    font-weight: 500;
    line-height: 1.2;
    white-space: nowrap;
    align-self: center;
}
.highlight-player {
    grid-area: player;
    display: inline-grid;
    grid-template-columns: auto minmax(0, 1fr);
    align-items: center;
    gap: 7px;
    min-width: 0;
    align-self: center;
}
.highlight-player b {
    display: inline-grid;
    place-items: center;
    min-width: 24px;
    height: 24px;
    padding: 0 6px;
    border-radius: 7px;
    background: #e1f7f4;
    color: #008a78;
    font-size: 11px;
    font-weight: 900;
}
.highlight-player strong,
.highlight-action {
    overflow: hidden;
    min-width: 0;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.highlight-player strong { font-size: 11px; font-weight: 900; }
.highlight-action {
    grid-area: action;
    display: inline-flex;
    align-items: baseline;
    align-content: center;
    gap: 5px;
    color: #07133f;
    font-size: 11px;
    line-height: 1.12;
    justify-self: start;
    align-self: center;
}
.highlight-action strong,
.highlight-action span,
.highlight-action i {
    overflow: hidden;
    min-width: 0;
    text-overflow: ellipsis;
    white-space: nowrap;
    align-self: start;
}
.highlight-action strong { font-weight: 850; }
.highlight-action span { font-weight: 500; }
.highlight-action i {
    flex: 0 0 auto;
    color: #07133f;
    font-style: normal;
    font-weight: 500;
}
.highlight-context {
    grid-area: context;
    overflow: hidden;
    color: #66708f;
    font-size: 10.5px;
    line-height: 1.2;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.highlight-result-badge {
    grid-area: badge;
    justify-self: end;
    display: inline-flex;
    align-items: center;
    min-height: 24px;
    padding: 4px 10px;
    border: 1px solid #d7deea;
    border-radius: 7px;
    font-size: 10.5px;
    font-weight: 750;
    white-space: nowrap;
    align-self: center;
}
.highlight-result-badge.positive { border-color: #b9dfb8; background: #eaf8e8; color: #1f8f3a; }
.highlight-result-badge.error { border-color: #fac7c7; background: #fff1f1; color: #d32f2f; }
.highlight-result-badge.poor { border-color: #ffd7ba; background: #fff4eb; color: #e85b16; }
.highlight-result-badge.neutral { border-color: #d7deea; background: #f7f8fb; color: #667085; }
.highlight-chevron {
    grid-area: arrow;
    display: grid;
    place-items: center;
    color: #8993aa;
    align-self: center;
}
.highlight-chevron svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.highlight-empty-state {
    display: grid;
    gap: 6px;
    padding: 28px 34px;
    color: #66708f;
}
.highlight-empty-state strong { color: #07133f; font-size: 16px; }
.highlight-empty-state span { font-size: 14px; }
.activity-panel { position: relative; padding-bottom: 32px; }
.activity-list { padding: 0 14px; }
.activity-panel > h2 { font-size: 16px !important; }
.activity-row {
    display: grid;
    grid-template-columns: 22px minmax(0, 1fr) auto;
    gap: 8px;
    align-items: center;
    min-height: 46px;
    padding: 7px 0;
    border-bottom: 1px solid #e7ebf2;
    color: #07133f;
}
.activity-row:hover { text-decoration: none; }
.activity-icon {
    display: grid;
    place-items: center;
    width: 18px;
    height: 18px;
    border: 1px solid #2da9e8;
    border-radius: 4px;
    color: #168ad0;
}
.activity-row.analysis .activity-icon { border-color: #f7a825; color: #e99300; }
.activity-row.highlight .activity-icon { border-color: #55bd83; color: #2aa968; }
.activity-icon svg { width: 12px; height: 12px; }
.activity-row > span:nth-child(2) { display: grid; min-width: 0; }
.activity-row strong { overflow: hidden; font-size: 11.5px; text-overflow: ellipsis; white-space: nowrap; }
.activity-row small { overflow: hidden; color: #536184; font-size: 10.5px; text-overflow: ellipsis; white-space: nowrap; }
.activity-row time {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: #536184;
    font-size: 10px;
    font-weight: 700;
    white-space: nowrap;
}
.activity-date { color: #7a869f; font-weight: 650; }
.activity-time { color: #536184; }
.activity-more {
    position: absolute;
    right: 15px;
    bottom: 8px;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    color: #008a78;
    font-size: 11.5px;
    font-weight: 800;
}
.activity-more svg { width: 15px; height: 15px; }
.dashboard-empty { margin: 0; padding: 18px; color: #667085; font-size: 12px; text-align: center; }
.dashboard-empty.compact { padding: 14px 6px; }

@media (max-width: 1280px) {
    .dashboard-page .nav > a,
    .dashboard-page .nav-logout { padding-right: 11px; padding-left: 11px; }
    .dashboard-layout { grid-template-columns: 300px minmax(0, 1fr); gap: 16px; }
    .dashboard-quick-actions { gap: 10px; }
    .dashboard-quick-actions .button { min-width: 150px; }
    .dashboard-bottom-grid { gap: 16px; }
    .panel-heading-row { min-height: 54px; padding: 12px 24px; }
    .dashboard-page .panel-heading-row h2 { font-size: 19px; }
    .panel-more-link { font-size: 15px; }
    .highlights-panel .panel-heading-row { min-height: 50px; padding: 11px 24px; }
    .dashboard-page .highlights-panel .panel-heading-row h2 { font-size: 17px; }
    .highlights-panel .panel-more-link { font-size: 13px; }
    .highlight-row-compact {
        grid-template-columns: 30px 52px 66px minmax(90px, 110px) minmax(150px, 1fr) auto 16px;
        gap: 2px 9px;
        padding: 7px 24px;
    }
    .highlight-action,
    .highlight-player strong,
    .highlight-time,
    .highlight-date { font-size: 11px; }
    .highlight-context { font-size: 10.5px; }
}
@media (max-width: 980px) {
    .dashboard-page .nav { overflow-x: auto; }
    .dashboard-page .nav > a,
    .dashboard-page .nav-logout { white-space: nowrap; }
    .dashboard-layout { grid-template-columns: 1fr; }
    .dashboard-sidebar { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .dashboard-bottom-grid { grid-template-columns: 1fr; }
}
@media (max-width: 720px) {
    .dashboard-page .nav { width: 100%; gap: 0; }
    .dashboard-page .nav > a,
    .dashboard-page .nav-logout { min-height: 42px; padding: 0 10px; font-size: 12px; }
    .dashboard-page .nav-logout span { display: none; }
    .dashboard-page > .container { width: calc(100% - 24px); margin-top: 16px; }
    .dashboard-hero { display: grid; }
    .dashboard-quick-actions { display: grid; grid-template-columns: 1fr 1fr; }
    .dashboard-quick-actions .button { min-width: 0; }
    .dashboard-quick-actions .button:first-child { grid-column: 1 / -1; }
    .dashboard-sidebar { grid-template-columns: 1fr; }
    .panel-title-row { align-items: stretch; flex-direction: column; }
    .team-filter select { width: 100%; }
    .match-tabs { overflow-x: auto; }
    .match-tabs a { white-space: nowrap; }
    .matches-table-wrap { overflow-x: auto; }
    .panel-heading-row {
        display: flex;
        min-height: 0;
        padding: 12px 18px;
    }
    .dashboard-page .panel-heading-row h2 { font-size: 18px; }
    .panel-more-link { justify-self: start; margin-top: 0; font-size: 13px; }
    .panel-more-link svg { width: 18px; height: 18px; }
    .highlight-row-compact {
        grid-template-columns: 36px minmax(0, 1fr) auto;
        grid-template-areas:
            "play time badge"
            "play date badge"
            "player player player"
            "action action action"
            "context context context";
        gap: 8px 10px;
        min-height: 0;
        padding: 14px 18px;
    }
    .highlight-time { align-self: center; font-size: 13px; }
    .highlight-date { align-self: center; font-size: 12px; }
    .highlight-player {
        grid-template-columns: auto minmax(0, 1fr);
        gap: 10px;
    }
    .highlight-player b {
        min-width: 26px;
        height: 26px;
        border-radius: 7px;
        font-size: 12px;
    }
    .highlight-player strong,
    .highlight-action { font-size: 13px; }
    .highlight-context {
        display: block;
        white-space: normal;
    }
    .highlight-result-badge {
        min-height: 30px;
        padding: 5px 12px;
        font-size: 13px;
    }
    .highlight-chevron { display: none; }
}
/* Player highlights */
.player-highlights-body {
    overflow-x: hidden;
    background: var(--bg);
}

.container:has(.ph-global-page) {
    width: min(1900px, calc(100% - 28px));
    margin-top: 14px;
}

.ph-page,
.ph-global-page {
    --ph-navy: #0b1739;
    --ph-muted: #526184;
    --ph-border: #dbe3ef;
    --ph-accent: #009f91;
    --ph-accent-dark: #00877c;
    color: var(--ph-navy);
}

.ph-page {
    display: grid;
    grid-template-columns: 232px minmax(0, 1fr);
    min-height: 0;
    gap: 18px;
    align-items: start;
    background: transparent;
    border: 0;
    border-radius: 0;
}

.ph-global-page {
    min-width: 0;
}

.ph-player-rail {
    padding: 29px 28px;
    border-right: 1px solid var(--ph-border);
    background: #fff;
}

.ph-back-link,
.ph-player-nav a,
.ph-export-button,
.ph-quick-filters a,
.ph-pagination a {
    text-decoration: none;
}

.ph-back-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 26px;
    color: #405176;
    font-size: 14px;
    font-weight: 650;
}

.ph-back-link svg,
.ph-export-button svg,
.ph-page-direction svg {
    width: 20px;
    height: 20px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.ph-player-identity {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-bottom: 29px;
}

.ph-player-number {
    display: grid;
    flex: 0 0 58px;
    width: 58px;
    height: 58px;
    place-items: center;
    border-radius: 50%;
    color: #fff;
    background: linear-gradient(145deg, #0fa793, #007c70);
    box-shadow: 0 5px 14px rgba(0, 132, 118, .16);
    font-size: 28px;
    font-weight: 700;
}

.ph-player-identity > span:last-child {
    min-width: 0;
}

.ph-player-identity strong {
    display: block;
    overflow: hidden;
    font-size: 19px;
    line-height: 1.25;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.ph-player-identity small {
    display: block;
    margin-top: 4px;
    color: #354466;
    font-size: 15px;
}

.ph-player-meta {
    display: grid;
    gap: 19px;
    margin: 0;
    padding: 0 4px 25px;
    border-bottom: 1px solid var(--ph-border);
}

.ph-player-meta > div {
    display: grid;
    grid-template-columns: 25px minmax(0, 1fr);
    gap: 14px;
}

.ph-player-meta svg {
    width: 20px;
    height: 20px;
    margin-top: 2px;
    fill: none;
    stroke: #50628c;
    stroke-width: 1.7;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.ph-player-meta dt {
    margin: 0 0 3px;
    color: #59698a;
    font-size: 14px;
    font-weight: 400;
}

.ph-player-meta dd {
    margin: 0;
    color: var(--ph-navy);
    font-size: 14px;
    font-weight: 650;
    line-height: 1.35;
}

.ph-status {
    display: inline-flex;
    align-items: center;
    min-height: 25px;
    padding: 3px 9px;
    border-radius: 6px;
    color: #6b7280;
    background: #eef1f5;
    font-size: 13px;
}

.ph-status.active {
    color: #087f67;
    background: #d9f5e8;
}

.ph-player-nav {
    display: grid;
    gap: 3px;
    margin: 17px -21px 0;
}

.ph-player-nav a {
    position: relative;
    display: flex;
    align-items: center;
    gap: 18px;
    min-height: 52px;
    padding: 0 22px;
    border-radius: 7px;
    color: #162347;
    font-size: 15px;
    font-weight: 650;
}

.ph-player-nav svg {
    width: 23px;
    height: 23px;
    fill: none;
    stroke: #52658e;
    stroke-width: 1.7;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.ph-player-nav a:hover {
    background: #f4f8f9;
}

.ph-player-nav a.active {
    color: #087f77;
    background: linear-gradient(90deg, #e8f7f4 0%, #edf8f7 100%);
}

.ph-player-nav a.active::before {
    position: absolute;
    top: 0;
    bottom: 0;
    left: 0;
    width: 4px;
    border-radius: 0 4px 4px 0;
    background: var(--ph-accent);
    content: "";
}

.ph-player-nav a.active svg {
    stroke: var(--ph-accent);
}

.ph-workspace {
    min-width: 0;
    padding: 0;
}

.ph-heading {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 24px;
    margin-bottom: 22px;
}

.ph-heading h1 {
    margin: 0;
    color: var(--ph-navy);
    font-size: clamp(25px, 2.1vw, 31px);
    line-height: 1.15;
    letter-spacing: -.02em;
}

.ph-heading p {
    margin: 6px 0 0;
    color: #526184;
    font-size: 14px;
}

.ph-export-button {
    display: inline-flex;
    flex: 0 0 auto;
    align-items: center;
    justify-content: center;
    gap: 10px;
    min-height: 46px;
    padding: 0 18px;
    border: 1px solid var(--ph-accent);
    border-radius: 7px;
    color: #008b80;
    background: #fff;
    font-size: 14px;
    font-weight: 700;
}

.ph-export-button:hover {
    background: #eefaf8;
}

.ph-summary-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 20px;
    margin-bottom: 21px;
}

.ph-summary-grid article {
    display: flex;
    align-items: center;
    gap: 17px;
    min-height: 96px;
    padding: 18px;
    border: 1px solid var(--ph-border);
    border-radius: 9px;
    background: #fff;
}

.ph-summary-grid article > span:last-child {
    display: grid;
    gap: 6px;
}

.ph-summary-grid strong {
    color: var(--ph-navy);
    font-size: 23px;
    line-height: 1;
}

.ph-summary-grid small {
    color: #435274;
    font-size: 14px;
}

.ph-summary-icon {
    display: grid;
    flex: 0 0 49px;
    width: 49px;
    height: 49px;
    place-items: center;
    border-radius: 50%;
}

.ph-summary-icon svg {
    width: 28px;
    height: 28px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.7;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.ph-summary-icon.total {
    color: #1688e8;
    background: #e8f5ff;
}

.ph-summary-icon.resultative {
    color: #119b35;
    background: #e6f8e8;
}

.ph-summary-icon.error {
    color: #ee343d;
    background: #fff0f0;
}

.ph-summary-icon.matches {
    color: #009b8f;
    background: #e7f8f6;
}

.ph-filter-details {
    margin: 0 0 24px;
    border: 1px solid var(--ph-border);
    border-radius: 9px;
    background: #fff;
}

.ph-filter-details > summary {
    display: none;
}

.ph-filter-panel {
    display: grid;
    grid-template-columns: repeat(12, minmax(0, 1fr));
    gap: 20px 18px;
    padding: 19px 20px 20px;
}

.ph-filter-panel > label {
    display: grid;
    min-width: 0;
    grid-column: span 3;
    align-content: start;
    gap: 8px;
    color: var(--ph-navy);
    font-size: 13px;
    font-weight: 600;
}

.ph-filter-panel > label:nth-of-type(1) {
    grid-column: span 4;
}

.ph-filter-panel > label:nth-of-type(2) {
    grid-column: span 2;
}

.ph-filter-panel > label:nth-of-type(5),
.ph-filter-panel > label:nth-of-type(6) {
    grid-column: span 2;
}

.ph-filter-panel > label:nth-of-type(7),
.ph-filter-panel > label:nth-of-type(8) {
    grid-column: span 2;
}

.ph-filter-panel.global > label:nth-of-type(1) { grid-column: span 3; }
.ph-filter-panel.global > label:nth-of-type(2) { grid-column: span 2; }
.ph-filter-panel.global > label:nth-of-type(3) { grid-column: span 2; }
.ph-filter-panel.global > label:nth-of-type(4) { grid-column: span 2; }
.ph-filter-panel.global > label:nth-of-type(5) { grid-column: span 3; }
.ph-filter-panel.global > label:nth-of-type(6),
.ph-filter-panel.global > label:nth-of-type(7),
.ph-filter-panel.global > label:nth-of-type(8),
.ph-filter-panel.global > label:nth-of-type(9) { grid-column: span 2; }

.ph-filter-panel input,
.ph-filter-panel select,
.ph-list-options select {
    width: 100%;
    height: 48px;
    min-width: 0;
    padding: 0 13px;
    border: 1px solid #d5deeb;
    border-radius: 7px;
    outline: none;
    color: var(--ph-navy);
    background: #fff;
    font: inherit;
    font-size: 14px;
}

.ph-filter-panel input:focus,
.ph-filter-panel select:focus,
.ph-list-options select:focus {
    border-color: var(--ph-accent);
    box-shadow: 0 0 0 3px rgba(0, 159, 145, .12);
}

.ph-filter-panel input::placeholder {
    color: #75819d;
}

.ph-input-with-icon,
.ph-date-field {
    position: relative;
    display: block;
}

.ph-input-with-icon input {
    padding-right: 44px;
    padding-left: 45px;
}

.ph-input-with-icon svg,
.ph-date-field svg {
    position: absolute;
    top: 50%;
    width: 21px;
    height: 21px;
    transform: translateY(-50%);
    pointer-events: none;
    fill: none;
    stroke: #40547e;
    stroke-width: 1.7;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.ph-input-with-icon svg {
    left: 14px;
}

.ph-search-label {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 12px;
}

.ph-search-label small,
.ph-search-help {
    color: #72809a;
    font-size: 11px;
    font-weight: 500;
}

.ph-search-help {
    margin-top: -2px;
}

.ph-search-clear {
    position: absolute;
    top: 50%;
    right: 7px;
    display: inline-flex;
    width: 34px;
    height: 34px;
    align-items: center;
    justify-content: center;
    padding: 0;
    transform: translateY(-50%);
    border: 0;
    border-radius: 6px;
    color: #61708c;
    background: transparent;
    cursor: pointer;
}

.ph-search-clear:hover,
.ph-search-clear:focus-visible {
    color: var(--ph-accent);
    background: #edf9f7;
    outline: none;
}

.ph-search-clear[hidden] {
    display: none;
}

.ph-search-clear svg {
    position: static;
    width: 18px;
    height: 18px;
    transform: none;
    stroke: currentColor;
    pointer-events: none;
}

.ph-date-field svg {
    right: 13px;
}

.ph-date-field input {
    padding-right: 42px;
}

.ph-filter-actions {
    display: flex;
    align-items: end;
    gap: 12px;
    grid-column: span 4;
}

.ph-button {
    display: inline-flex;
    min-height: 46px;
    align-items: center;
    justify-content: center;
    padding: 0 17px;
    border: 1px solid var(--ph-accent);
    border-radius: 7px;
    color: #008b80;
    background: #fff;
    font-size: 14px;
    font-weight: 700;
    text-decoration: none;
    cursor: pointer;
}

.ph-button.primary {
    border-color: transparent;
    color: #fff;
    background: linear-gradient(180deg, #08aa9b, #008f83);
}

.ph-refresh-button {
    gap: 7px;
}

.ph-refresh-button svg {
    width: 17px;
    height: 17px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.ph-button:hover {
    filter: brightness(.98);
}

.ph-filter-error {
    grid-column: 1 / -1;
    margin: -7px 0 0;
    color: #d92d38;
    font-size: 13px;
}

.ph-quick-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 11px;
}

.ph-quick-filters a {
    display: inline-flex;
    min-height: 43px;
    align-items: center;
    gap: 8px;
    padding: 0 16px;
    border: 1px solid var(--ph-border);
    border-radius: 7px;
    color: #152244;
    background: #fff;
    font-size: 14px;
}

.ph-quick-filters a.active {
    border-color: var(--ph-accent);
    color: #07877d;
    background: #f6fffd;
    font-weight: 700;
}

.ph-quick-filters b {
    display: inline-grid;
    min-width: 23px;
    height: 23px;
    place-items: center;
    padding: 0 5px;
    border-radius: 13px;
    color: #667085;
    background: #eef0f3;
    font-size: 12px;
}

.ph-quick-filters b.all {
    color: #058f84;
    background: #ddf7f2;
}

.ph-quick-filters b.resultative {
    color: #198b2e;
    background: #e5f7e3;
}

.ph-quick-filters b.error {
    color: #fff;
    background: #ef4a50;
}

.ph-list-toolbar {
    display: flex;
    min-height: 56px;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
}

.ph-results-region[aria-busy="true"] {
    opacity: .55;
    pointer-events: none;
    transition: opacity .15s ease;
}

.ph-list-toolbar > strong {
    font-size: 14px;
    font-weight: 500;
}

.ph-list-options {
    display: flex;
    align-items: center;
    gap: 18px;
}

.ph-list-options label {
    display: flex;
    align-items: center;
    gap: 10px;
    color: #18264a;
    font-size: 13px;
    white-space: nowrap;
}

.ph-list-options select {
    width: 168px;
    height: 42px;
    font-weight: 500;
}

.ph-list-options label:last-child select {
    width: 82px;
}

.ph-moment-list {
    overflow: hidden;
    border: 1px solid var(--ph-border);
    border-radius: 9px;
    background: #fff;
}

.ph-moment-row {
    display: grid;
    min-height: 71px;
    grid-template-columns: 54px 78px 112px minmax(120px, 150px) minmax(230px, 1fr) 128px 24px;
    align-items: center;
    gap: 10px;
    padding: 10px 16px;
    border-bottom: 1px solid #e0e6ef;
    color: var(--ph-navy);
    text-decoration: none;
    cursor: pointer;
}

.ph-moment-row:last-child {
    border-bottom: 0;
}

.ph-moment-row:hover {
    background: #f5fbfa;
}

.ph-moment-row:focus-visible {
    position: relative;
    z-index: 1;
    outline: 3px solid rgba(0, 159, 145, .3);
    outline-offset: -3px;
}

.ph-play-button {
    display: grid;
    width: 42px;
    height: 42px;
    place-items: center;
    border: 1px solid var(--ph-accent);
    border-radius: 7px;
    color: #0d1a3b;
    background: #fff;
}

.ph-play-button svg {
    width: 20px;
    height: 20px;
    fill: currentColor;
    stroke: currentColor;
    stroke-width: 1.3;
    stroke-linejoin: round;
}

.ph-time {
    font-size: 17px;
}

.ph-date {
    color: #59698b;
    font-size: 13px;
}

.ph-player-cell {
    display: flex;
    min-width: 0;
    align-items: center;
    gap: 12px;
}

.ph-player-cell b {
    display: grid;
    flex: 0 0 33px;
    height: 33px;
    place-items: center;
    border-radius: 6px;
    color: #008b80;
    background: #e1f7f3;
    font-size: 13px;
}

.ph-player-cell span {
    overflow: hidden;
    font-size: 13px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.ph-action-cell {
    display: grid;
    min-width: 0;
    gap: 4px;
}

.ph-action-cell > span {
    display: flex;
    min-width: 0;
    gap: 7px;
    align-items: baseline;
    font-size: 13px;
}

.ph-action-cell > span strong {
    overflow: hidden;
    max-width: 54%;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.ph-action-cell > span i {
    color: #667085;
    font-style: normal;
}

.ph-action-cell small,
.ph-action-cell em {
    overflow: hidden;
    color: #607091;
    font-size: 12px;
    font-style: normal;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.ph-category-badge {
    justify-self: end;
    padding: 6px 10px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 650;
    white-space: nowrap;
}

.ph-category-badge.resultative {
    color: #128329;
    background: #e1f5e3;
}

.ph-category-badge.error {
    color: #e43139;
    background: #ffe6e6;
}

.ph-category-badge.negative {
    color: #d96d00;
    background: #fff0dd;
}

.ph-category-badge.neutral {
    color: #687386;
    background: #eef0f3;
}

.ph-row-arrow {
    width: 21px;
    height: 21px;
    fill: none;
    stroke: #071535;
    stroke-width: 1.7;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.ph-pagination {
    display: flex;
    min-height: 66px;
    align-items: center;
    justify-content: center;
    gap: 9px;
}

.ph-pagination a,
.ph-pagination strong,
.ph-pagination > span {
    display: inline-grid;
    min-width: 36px;
    height: 36px;
    place-items: center;
    border-radius: 7px;
    color: var(--ph-navy);
    font-size: 13px;
}

.ph-pagination strong {
    color: #fff;
    background: linear-gradient(180deg, #0aad9e, #008d82);
}

.ph-pagination .ph-page-direction {
    display: inline-flex;
    width: auto;
    gap: 6px;
    padding: 0 12px;
    color: #526184;
}

.ph-page-direction svg {
    width: 17px;
    height: 17px;
}

.ph-empty-state,
.ph-no-players {
    display: grid;
    min-height: 220px;
    place-content: center;
    justify-items: center;
    gap: 10px;
    padding: 32px;
    border: 1px solid var(--ph-border);
    border-radius: 9px;
    color: #59698a;
    text-align: center;
    background: #fff;
}

.ph-empty-state strong {
    color: var(--ph-navy);
    font-size: 17px;
}

.ph-no-players {
    min-height: 100vh;
    border: 0;
}

.ph-no-players h1,
.ph-no-players p {
    margin: 0;
}

@media (max-width: 1180px) {
    .ph-player-rail {
        padding-inline: 22px;
    }

    .ph-workspace {
        padding-inline: 22px;
    }

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

    .ph-filter-panel {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .ph-filter-panel > label,
    .ph-filter-panel > label:nth-of-type(n),
    .ph-filter-actions {
        grid-column: span 1;
    }

    .ph-search-field,
    .ph-match-field,
    .ph-filter-error {
        grid-column: 1 / -1 !important;
    }

    .ph-moment-row {
        grid-template-columns: 50px 75px 100px minmax(210px, 1fr) 115px 24px;
    }

    .ph-player-cell {
        display: none;
    }
}

@media (max-width: 860px) {
    .ph-player-identity {
        align-items: flex-start;
        gap: 12px;
    }

    .ph-player-number {
        flex-basis: 48px;
        width: 48px;
        height: 48px;
        font-size: 23px;
    }

    .ph-player-identity strong {
        white-space: normal;
    }

    .ph-list-toolbar {
        align-items: flex-start;
        flex-direction: column;
        padding-block: 12px;
    }

    .ph-list-options {
        width: 100%;
    }

    .ph-list-options label {
        flex: 1;
    }

    .ph-list-options select,
    .ph-list-options label:last-child select {
        width: 100%;
    }

    .ph-moment-row {
        grid-template-columns: 50px 70px minmax(190px, 1fr) 105px 20px;
    }

    .ph-date {
        display: none;
    }
}

@media (max-width: 720px) {
    .ph-page {
        display: block;
        border: 0;
        border-radius: 0;
    }

    .ph-player-rail {
        padding: 18px 18px 0;
        border-right: 0;
        border-bottom: 1px solid var(--ph-border);
    }

    .ph-back-link {
        margin-bottom: 16px;
    }

    .ph-player-identity {
        margin-bottom: 16px;
    }

    .ph-player-meta {
        display: flex;
        overflow-x: auto;
        gap: 18px;
        padding: 0 0 15px;
        border: 0;
        scrollbar-width: none;
    }

    .ph-player-meta::-webkit-scrollbar {
        display: none;
    }

    .ph-player-meta > div {
        flex: 0 0 auto;
        grid-template-columns: 20px auto;
        gap: 8px;
    }

    .ph-player-meta > div:nth-child(2),
    .ph-player-meta > div:nth-child(3) {
        display: none;
    }

    .ph-player-nav {
        display: flex;
        overflow-x: auto;
        margin: 0 -18px;
        padding: 0 18px;
    }

    .ph-player-nav a {
        flex: 0 0 auto;
        min-height: 48px;
        padding: 0 13px;
        border-radius: 0;
    }

    .ph-player-nav a::before {
        top: auto !important;
        right: 9px;
        bottom: 0;
        left: 9px !important;
        width: auto !important;
        height: 3px;
    }

    .ph-player-nav svg {
        display: none;
    }

    .ph-workspace {
        padding: 20px 16px;
    }

    .ph-heading {
        align-items: stretch;
        flex-direction: column;
        gap: 15px;
    }

    .ph-export-button {
        align-self: flex-start;
    }

    .ph-summary-grid {
        gap: 10px;
    }

    .ph-summary-grid article {
        min-height: 80px;
        gap: 12px;
        padding: 12px;
    }

    .ph-summary-icon {
        flex-basis: 40px;
        width: 40px;
        height: 40px;
    }

    .ph-summary-icon svg {
        width: 23px;
        height: 23px;
    }

    .ph-summary-grid strong {
        font-size: 20px;
    }

    .ph-filter-details > summary {
        display: flex;
        height: 48px;
        align-items: center;
        justify-content: space-between;
        padding: 0 16px;
        color: var(--ph-navy);
        font-size: 14px;
        font-weight: 700;
        cursor: pointer;
        list-style: none;
    }

    .ph-filter-details > summary::-webkit-details-marker {
        display: none;
    }

    .ph-filter-details > summary span {
        display: flex;
        align-items: center;
        gap: 8px;
    }

    .ph-filter-details > summary svg {
        width: 20px;
        height: 20px;
        fill: none;
        stroke: currentColor;
        stroke-width: 1.7;
        stroke-linecap: round;
        stroke-linejoin: round;
    }

    .ph-filter-details[open] > summary > svg:last-child {
        transform: rotate(180deg);
    }

    .ph-filter-panel {
        display: grid;
        grid-template-columns: 1fr;
        gap: 14px;
        padding: 0 14px 14px;
        border-top: 1px solid var(--ph-border);
    }

    .ph-filter-panel > label,
    .ph-filter-panel > label:nth-of-type(n),
    .ph-filter-actions,
    .ph-filter-error {
        grid-column: 1 !important;
    }

    .ph-filter-panel > label:first-of-type {
        padding-top: 14px;
    }

    .ph-filter-actions > * {
        flex: 1;
    }

    .ph-quick-filters {
        overflow-x: auto;
        flex-wrap: nowrap;
        margin-right: -16px;
        padding-right: 16px;
        scrollbar-width: none;
    }

    .ph-quick-filters a {
        flex: 0 0 auto;
    }

    .ph-list-toolbar {
        gap: 12px;
    }

    .ph-list-options {
        align-items: stretch;
        flex-direction: column;
        gap: 10px;
    }

    .ph-list-options label {
        display: grid;
        grid-template-columns: 90px minmax(0, 1fr);
    }

    .ph-moment-list {
        display: grid;
        gap: 10px;
        border: 0;
        border-radius: 0;
        background: transparent;
    }

    .ph-moment-row {
        min-height: 0;
        grid-template-columns: 48px minmax(0, 1fr) auto;
        grid-template-areas:
            "play time badge"
            "date date arrow"
            "player player player"
            "action action action";
        gap: 9px 12px;
        padding: 14px;
        border: 1px solid var(--ph-border);
        border-radius: 9px;
        background: #fff;
    }

    .ph-play-button {
        grid-area: play;
    }

    .ph-time {
        align-self: center;
        grid-area: time;
    }

    .ph-date {
        display: block;
        grid-area: date;
    }

    .ph-player-cell {
        display: flex;
        grid-area: player;
    }

    .ph-action-cell {
        grid-area: action;
    }

    .ph-action-cell > span {
        flex-wrap: wrap;
    }

    .ph-action-cell > span strong {
        max-width: 100%;
    }

    .ph-action-cell small {
        white-space: normal;
    }

    .ph-category-badge {
        align-self: center;
        grid-area: badge;
    }

    .ph-row-arrow {
        align-self: center;
        justify-self: end;
        grid-area: arrow;
    }

    .ph-pagination {
        overflow-x: auto;
        justify-content: flex-start;
    }
}
