/* ============================================================
   ХОККЕЙ В БРАТСКЕ — оформление
   ============================================================ */

:root {
  --bg: #070d16;
  --bg-soft: #0a1420;
  --panel: rgba(16, 27, 42, 0.76);
  --panel-solid: #111c2b;
  --panel-2: #172436;
  --panel-3: #1d2e44;
  --line: rgba(132, 160, 190, 0.16);
  --line-strong: rgba(132, 160, 190, 0.28);
  --text: #e9eff7;
  --muted: #93a4b8;
  --muted-2: #64748b;
  --accent: #4a9fe0;
  --accent-strong: #2f86c9;
  --accent-2: #7fb3d5;
  --violet: #8aa4bd;
  --green: #34d399;
  --amber: #fbbf24;
  --red: #fb7185;
  --pink: #f472b6;
  --radius: 18px;
  --radius-sm: 12px;
  --shadow: 0 18px 50px rgba(0, 0, 0, 0.35);
  --font: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: "SF Mono", "JetBrains Mono", "Cascadia Mono", ui-monospace, monospace;
  color-scheme: dark;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  min-height: 100%;
}

body {
  font-family: var(--font);
  color: var(--text);
  background:
    radial-gradient(1100px 700px at 8% -12%, rgba(74, 159, 224, 0.16), transparent 60%),
    radial-gradient(900px 600px at 100% 0%, rgba(138, 164, 189, 0.14), transparent 55%),
    radial-gradient(800px 600px at 60% 120%, rgba(127, 179, 213, 0.07), transparent 60%),
    var(--bg);
  background-attachment: fixed;
  font-size: 15px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

body.modal-open { overflow: hidden; }

a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; }
h1, h2, h3, h4 { margin: 0; font-weight: 700; letter-spacing: -0.01em; }
p { margin: 0; }
svg { display: block; }
::selection { background: rgba(74, 159, 224, 0.3); }

.muted { color: var(--muted); }
.dim { color: var(--muted-2); }
.nowrap { white-space: nowrap; }
.tnum { font-variant-numeric: tabular-nums; }

/* ---------------- Boot ---------------- */

.boot-screen {
  position: fixed;
  inset: 0;
  z-index: 5000;
  display: grid;
  place-items: center;
  padding: 24px;
  background:
    radial-gradient(700px 420px at 50% 20%, rgba(42, 167, 223, 0.18), transparent 65%),
    radial-gradient(500px 300px at 80% 90%, rgba(191, 232, 247, 0.22), transparent 70%),
    var(--bg);
  color: var(--text);
  transition: opacity 0.35s ease, visibility 0.35s ease;
}
.boot-screen.is-hidden { opacity: 0; visibility: hidden; pointer-events: none; }
.atlas-boot { width: min(760px, 100%); text-align: center; }
.atlas-boot-stage { position: relative; display: flex; align-items: center; justify-content: center; min-height: 260px; }
.atlas-boot-logo-card { width: min(680px, 100%); padding: 16px 20px; border-radius: 24px; background: #f4fbfe; box-shadow: 0 18px 50px rgba(0,0,0,.22); }
.atlas-boot-logo { display: block; width: 100%; height: auto; }
.atlas-boot-goalie { position: relative; display: grid; place-items: center; flex: none; }
.atlas-boot-orbit {
  position: absolute; inset: -12px; border-radius: 50%;
  border: 2px solid rgba(42, 167, 223, 0.16);
  border-top-color: #2aa7df; border-right-color: rgba(42, 167, 223, 0.62);
  animation: atlas-spin 1.45s linear infinite;
  pointer-events: none;
}
.atlas-boot-band {
  width: 100%;
  box-sizing: border-box;
  display: block;
  background: #2aa7df;
  color: #fff;
  padding: 8px 8px 9px;
  font-size: clamp(13px, 1.75vw, 19px);
  font-weight: 800;
  letter-spacing: 0.14em;
  line-height: 1;
  text-align: center;
  white-space: nowrap;
}
.atlas-boot-word {
  font-family: "Arial Black", Arial, sans-serif;
  font-size: clamp(46px, 7vw, 70px);
  line-height: .88;
  font-weight: 900;
  letter-spacing: .08em;
  color: #fff;
  -webkit-text-stroke: 2px #2aa7df;
  text-shadow: 0 3px 0 rgba(42, 167, 223, 0.25), 0 10px 28px rgba(42, 167, 223, 0.22);
  padding-left: 2px;
}
.atlas-boot-player {
  position: relative;
  z-index: 1;
  width: clamp(200px, 30vw, 280px);
  height: auto;
  margin: 0;
  image-rendering: pixelated;
  image-rendering: crisp-edges;
  filter: drop-shadow(0 12px 18px rgba(18, 56, 79, 0.16));
  animation: atlas-skate 2.2s ease-in-out infinite;
}
.atlas-boot-note {
  margin-top: 8px;
  color: var(--muted);
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: .2em;
  text-transform: uppercase;
}
.atlas-boot-progress {
  width: 180px; height: 3px; margin: 18px auto 0; border-radius: 999px;
  background: rgba(42, 167, 223, 0.14); overflow: hidden;
}
.atlas-boot-progress span {
  display: block; width: 45%; height: 100%; border-radius: inherit;
  background: linear-gradient(90deg, #9ddcf4, #2aa7df, #1f6fae);
  animation: atlas-progress 1.35s ease-in-out infinite;
}
@keyframes atlas-spin { to { transform: rotate(360deg); } }
@keyframes atlas-skate { 0%, 100% { transform: translateX(0); } 50% { transform: translateX(6px); } }
@keyframes atlas-progress { 0% { transform: translateX(-120%); } 100% { transform: translateX(340%); } }
@media (max-width: 560px) {
  .atlas-boot-stage { min-height: 180px; }
  .atlas-boot-logo-card { padding: 10px 12px; border-radius: 18px; }
  .atlas-boot-orbit { inset: -8px; }
  .atlas-boot-band { font-size: 11px; letter-spacing: .10em; padding: 7px 6px; }
  .atlas-boot-player { width: 175px; }
}
@media (prefers-reduced-motion: reduce) {
  .atlas-boot-orbit, .atlas-boot-player, .atlas-boot-progress span { animation: none; }
}

/* ---------------- Shell ---------------- */

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

.sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  display: flex;
  flex-direction: column;
  padding: 22px 16px 18px;
  border-right: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(12, 20, 36, 0.92), rgba(7, 11, 20, 0.88));
  backdrop-filter: blur(14px);
  z-index: 20;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 4px 10px 22px;
}
.brand-mark {
  width: 42px;
  height: 42px;
  flex: none;
  border-radius: 13px;
  display: grid;
  place-items: center;
  background: #eaf6fc url("/icons/icon-atlas-stroke-192.png") center / cover no-repeat;
  object-fit: cover;
  overflow: hidden;
  box-shadow: 0 8px 22px rgba(74, 159, 224, 0.28), inset 0 1px 0 rgba(255, 255, 255, 0.35);
}
.brand-mark > svg,
.brand-mark > .icon { display: none !important; }
.brand-text { display: flex; flex-direction: column; line-height: 1.15; }
.brand-name { font-weight: 800; font-size: 17px; letter-spacing: -0.02em; }
.brand-sub { font-size: 10.5px; text-transform: uppercase; letter-spacing: 0.18em; color: var(--muted); }

.season-switch {
  margin: 0 6px 18px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.025);
}
.season-switch-label { font-size: 10px; text-transform: uppercase; letter-spacing: 0.16em; color: var(--muted); margin-bottom: 6px; }
.season-switch select { width: 100%; }

.nav { display: flex; flex-direction: column; gap: 3px; overflow-y: auto; flex: 1; padding: 0 2px; }
.nav-section { margin: 18px 10px 8px; font-size: 10px; text-transform: uppercase; letter-spacing: 0.18em; color: var(--muted-2); }
.nav-item {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 10px 12px;
  border-radius: 11px;
  color: var(--muted);
  font-weight: 500;
  font-size: 14px;
  border: 1px solid transparent;
  transition: background 0.15s, color 0.15s, border-color 0.15s;
}
.nav-item:hover { background: rgba(255, 255, 255, 0.045); color: var(--text); }
.nav-item.is-active {
  color: #eaf7ff;
  background: linear-gradient(90deg, rgba(74, 159, 224, 0.16), rgba(74, 159, 224, 0.04));
  border-color: rgba(74, 159, 224, 0.24);
}
.nav-item.is-active .nav-icon { color: var(--accent); }
.nav-icon { color: var(--muted-2); flex: none; }
.nav-badge {
  margin-left: auto;
  min-width: 20px;
  height: 20px;
  padding: 0 6px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  font-size: 11px;
  font-weight: 700;
  background: rgba(251, 113, 133, 0.18);
  color: #fda4af;
  font-variant-numeric: tabular-nums;
}

.sidebar-foot { margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--line); }
.user-card { display: flex; align-items: center; gap: 11px; padding: 8px; border-radius: 12px; }
.user-avatar {
  width: 36px; height: 36px; flex: none; border-radius: 50%;
  display: grid; place-items: center; font-weight: 700; font-size: 14px;
  background: linear-gradient(140deg, #1e3a5f, #0f2236);
  border: 1px solid rgba(74, 159, 224, 0.35);
  color: #bfe9ff;
}
.user-meta { min-width: 0; flex: 1; display: flex; flex-direction: column; line-height: 1.2; }
.user-name { font-weight: 600; font-size: 13.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.user-role { font-size: 11px; color: var(--muted); }
.logout-btn { color: var(--muted); }
.logout-btn:hover { color: var(--red); }

/* ---------------- Main / topbar ---------------- */

.main { min-width: 0; display: flex; flex-direction: column; }

.topbar {
  position: sticky;
  top: 0;
  z-index: 15;
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 16px 34px;
  border-bottom: 1px solid var(--line);
  background: rgba(7, 11, 20, 0.72);
  backdrop-filter: blur(16px);
}
.topbar-left { display: flex; align-items: center; gap: 14px; min-width: 0; }
.topbar-title { font-size: 15px; font-weight: 650; letter-spacing: -0.01em; }
.topbar-sub { font-size: 12px; color: var(--muted); }
.topbar-right { margin-left: auto; display: flex; align-items: center; gap: 12px; }

.content { padding: 28px 34px 60px; max-width: 1420px; width: 100%; margin: 0 auto; }

.page-head { display: flex; align-items: flex-end; gap: 20px; margin-bottom: 22px; flex-wrap: wrap; }
.page-head-text { flex: 1; min-width: 240px; }
.page-title { font-size: 28px; letter-spacing: -0.03em; line-height: 1.15; }
.page-sub { color: var(--muted); font-size: 14px; margin-top: 6px; }
.page-actions { display: flex; gap: 10px; flex-wrap: wrap; }

.back-link {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: var(--muted);
  font-size: 13px;
  margin-bottom: 14px;
}
.back-link:hover { color: var(--accent); }

/* ---------------- Buttons ---------------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 40px;
  padding: 0 16px;
  border-radius: 11px;
  border: 1px solid transparent;
  background: transparent;
  color: var(--text);
  font-weight: 600;
  font-size: 13.5px;
  cursor: pointer;
  white-space: nowrap;
  transition: transform 0.12s, background 0.15s, border-color 0.15s, box-shadow 0.15s, opacity 0.15s;
}
.btn:active { transform: translateY(1px) scale(0.995); }
.btn:disabled { opacity: 0.45; cursor: not-allowed; }
.btn .icon { flex: none; }
.btn-primary {
  background: linear-gradient(140deg, #5aa9dd, #2f86c9);
  color: #04121f;
  box-shadow: 0 10px 26px rgba(47, 134, 201, 0.28), inset 0 1px 0 rgba(255, 255, 255, 0.35);
}
.btn-primary:hover { background: linear-gradient(140deg, #7fc3ea, #4a9fe0); box-shadow: 0 12px 30px rgba(47, 134, 201, 0.4); }
.btn-ghost { border-color: var(--line-strong); background: rgba(255, 255, 255, 0.035); color: var(--text); }
.btn-ghost:hover { background: rgba(255, 255, 255, 0.08); border-color: rgba(130, 170, 235, 0.4); }
.btn-danger { background: rgba(251, 113, 133, 0.14); border-color: rgba(251, 113, 133, 0.4); color: #ffb3bf; }
.btn-danger:hover { background: rgba(251, 113, 133, 0.24); }
.btn-success { background: rgba(52, 211, 153, 0.14); border-color: rgba(52, 211, 153, 0.42); color: #8ff0c4; }
.btn-success:hover { background: rgba(52, 211, 153, 0.24); }
.btn-sm { height: 32px; padding: 0 11px; font-size: 12.5px; border-radius: 9px; }
.btn-lg { height: 48px; padding: 0 24px; font-size: 15px; border-radius: 13px; }
.btn-icon { width: 36px; height: 36px; padding: 0; border-radius: 10px; }
.btn.is-loading { position: relative; color: transparent !important; pointer-events: none; }
.btn.is-loading::after {
  content: "";
  position: absolute;
  width: 16px; height: 16px;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}
.btn-primary.is-loading::after { border-color: rgba(4, 18, 31, 0.25); border-top-color: #04121f; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------------- Pills / chips ---------------- */

.pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 24px;
  padding: 0 10px;
  border-radius: 999px;
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: 0.01em;
  border: 1px solid transparent;
  white-space: nowrap;
}
.pill b { font-weight: 800; }
.pill-muted { background: rgba(143, 160, 189, 0.1); color: #a9b8d4; border-color: rgba(143, 160, 189, 0.18); }
.pill-info { background: rgba(74, 159, 224, 0.12); color: #7dd3fc; border-color: rgba(74, 159, 224, 0.25); }
.pill-accent { background: rgba(127, 179, 213, 0.1); color: #9fcee8; border-color: rgba(127, 179, 213, 0.25); }
.pill-violet { background: rgba(138, 164, 189, 0.13); color: #c4b5fd; border-color: rgba(138, 164, 189, 0.28); }
.pill-success { background: rgba(52, 211, 153, 0.12); color: #6ee7b7; border-color: rgba(52, 211, 153, 0.26); }
.pill-warning { background: rgba(251, 191, 36, 0.12); color: #fcd34d; border-color: rgba(251, 191, 36, 0.28); }
.pill-danger { background: rgba(251, 113, 133, 0.12); color: #fda4af; border-color: rgba(251, 113, 133, 0.28); }
.pill-live { background: rgba(251, 113, 133, 0.14); color: #fda4af; border-color: rgba(251, 113, 133, 0.36); }
.live-dot { width: 7px; height: 7px; border-radius: 50%; background: #fb7185; box-shadow: 0 0 0 0 rgba(251, 113, 133, 0.6); animation: pulse 1.6s infinite; }
@keyframes pulse { 70% { box-shadow: 0 0 0 7px rgba(251, 113, 133, 0); } 100% { box-shadow: 0 0 0 0 rgba(251, 113, 133, 0); } }

.form-chip {
  display: inline-grid;
  place-items: center;
  width: 24px; height: 24px;
  border-radius: 7px;
  font-size: 10.5px;
  font-weight: 800;
}
.form-win { background: rgba(52, 211, 153, 0.16); color: #6ee7b7; }
.form-loss { background: rgba(251, 113, 133, 0.14); color: #fda4af; }
.form-otl { background: rgba(251, 191, 36, 0.14); color: #fcd34d; }
.form-draw { background: rgba(143, 160, 189, 0.14); color: #cbd5e1; }
.form-row { display: inline-flex; gap: 4px; }

/* ---------------- Team badge ---------------- */

.team-badge {
  position: relative;
  overflow: hidden;
  display: inline-grid;
  place-items: center;
  flex: none;
  width: 38px; height: 38px;
  border-radius: 11px;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.02em;
  color: #fff;
  background:
    linear-gradient(150deg, color-mix(in srgb, var(--team-color) 92%, #fff 8%), color-mix(in srgb, var(--team-color) 62%, #000 38%));
  border: 1px solid color-mix(in srgb, var(--team-color) 60%, transparent);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.28), 0 6px 16px color-mix(in srgb, var(--team-color) 18%, transparent);
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.25);
}
.team-badge img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.team-badge-sm { width: 30px; height: 30px; border-radius: 9px; font-size: 10px; }
.team-badge-lg { width: 60px; height: 60px; border-radius: 17px; font-size: 18px; }
.team-badge-xl { width: 76px; height: 76px; border-radius: 21px; font-size: 23px; }

.team-line { display: inline-flex; align-items: center; gap: 10px; min-width: 0; }
.team-line-text { display: flex; flex-direction: column; min-width: 0; line-height: 1.2; }
.team-line-name { font-weight: 600; font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.team-line-sub { font-size: 11px; color: var(--muted); }

/* ---------------- Cards / grid ---------------- */

.card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.03) inset;
  backdrop-filter: blur(10px);
  overflow: hidden;
}
.card-head {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  padding: 18px 20px 14px;
  border-bottom: 1px solid rgba(130, 170, 235, 0.09);
}
.card-heading { flex: 1; min-width: 0; }
.card-title { display: flex; align-items: center; gap: 9px; font-size: 15.5px; font-weight: 700; }
.card-title-icon { color: var(--accent); display: inline-flex; }
.card-subtitle { color: var(--muted); font-size: 12.5px; margin-top: 4px; }
.card-actions { display: flex; gap: 8px; flex-wrap: wrap; justify-content: flex-end; }
.card-body { padding: 18px 20px 20px; }
.card-body.flush { padding: 0; }
.card-body.tight { padding: 12px; }

.grid { display: grid; gap: 18px; }
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.grid-sidebar { grid-template-columns: minmax(0, 1.65fr) minmax(0, 1fr); }
.stack { display: flex; flex-direction: column; gap: 18px; }
.row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.spacer { flex: 1; }

/* ---------------- Tables ---------------- */

.table-wrap { width: 100%; overflow-x: auto; -webkit-overflow-scrolling: touch; }
.table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.table th {
  text-align: left;
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
  padding: 10px 12px;
  border-bottom: 1px solid var(--line);
  white-space: nowrap;
}
.table td { padding: 11px 12px; border-bottom: 1px solid rgba(130, 170, 235, 0.07); vertical-align: middle; }
.table tbody tr { transition: background 0.12s; }
.table tbody tr:hover { background: rgba(255, 255, 255, 0.028); }
.table tbody tr:last-child td { border-bottom: none; }
.table .num, .table .col-pos { font-variant-numeric: tabular-nums; }
.col-pos { width: 44px; color: var(--muted); }
.col-team { min-width: 190px; }
.col-points { text-align: center; }
.col-points strong { font-size: 15px; color: #fff; }
.table th.col-points, .table td.col-points { color: var(--text); }
.table th:nth-child(n+3), .table td:nth-child(n+3) { text-align: center; }
.table .col-goals, .table .col-diff { font-variant-numeric: tabular-nums; white-space: nowrap; }
.col-diff { color: var(--muted); }
.cut-row td { border-bottom: 2px solid rgba(74, 159, 224, 0.45) !important; }
.standings-table .in-playoff .col-pos .pos-badge { color: var(--muted); }
.table tbody tr.is-own { background: rgba(74, 159, 224, 0.055); }

.pos-badge {
  display: inline-grid;
  place-items: center;
  width: 26px; height: 26px;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 700;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.035);
}
.pos-badge { color: var(--muted); }

.team-cell { display: flex; align-items: center; gap: 10px; }
.team-cell-text { display: flex; flex-direction: column; line-height: 1.2; min-width: 0; }
.team-cell-name { font-weight: 600; font-size: 13.5px; }
.team-cell-city { font-size: 11px; color: var(--muted); }
.team-cell:hover .team-cell-name { color: var(--accent); }

.table-legend {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
  padding: 12px 16px;
  border-top: 1px solid var(--line);
  font-size: 11.5px;
  color: var(--muted);
}
.legend-dot { display: inline-block; width: 8px; height: 8px; border-radius: 3px; margin-right: 6px; }
.legend-playoff { background: var(--accent); }

.compact-table th, .compact-table td { padding: 8px 10px; }
.player-name { font-weight: 600; }
.player-number { color: var(--muted); font-size: 11px; margin-left: 6px; }

/* ---------------- Game cards ---------------- */

.game-list { display: flex; flex-direction: column; }
.game-card {
  position: relative;
  display: grid;
  grid-template-columns: 138px minmax(0, 1fr) 190px;
  align-items: center;
  gap: 18px;
  padding: 14px 18px;
  border-bottom: 1px solid rgba(130, 170, 235, 0.08);
  transition: background 0.14s;
}
.game-card:last-child { border-bottom: none; }
.game-card:hover { background: rgba(255, 255, 255, 0.03); }
.game-card.is-live { background: linear-gradient(90deg, rgba(251, 113, 133, 0.07), transparent 60%); }
.game-card.is-live::before {
  content: "";
  position: absolute;
  left: 0; top: 12px; bottom: 12px;
  width: 3px;
  border-radius: 0 3px 3px 0;
  background: var(--red);
}
.game-when { display: flex; flex-direction: column; gap: 2px; }
.game-date { font-size: 12px; color: var(--muted); text-transform: capitalize; }
.game-time { font-size: 17px; font-weight: 750; font-variant-numeric: tabular-nums; letter-spacing: 0.01em; }
.game-round { font-size: 10.5px; color: var(--muted-2); text-transform: uppercase; letter-spacing: 0.08em; }
.game-matchup {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 100px minmax(0, 1fr);
  align-items: center;
  gap: 12px;
}
.game-team { display: flex; align-items: center; gap: 9px; min-width: 0; }
.game-team.is-home .team-badge, .game-team.is-away .team-badge { flex: none; }
.game-team:first-child { justify-content: flex-end; text-align: right; }
.game-team:last-child { justify-content: flex-start; }
.game-team-name { font-weight: 600; font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.game-winner-mark { color: var(--green); display: inline-flex; }
.game-center { display: flex; flex-direction: column; align-items: center; gap: 4px; }
.game-score-nums { display: flex; align-items: baseline; gap: 5px; font-size: 21px; font-weight: 800; font-variant-numeric: tabular-nums; }
.game-score-nums .winner { color: var(--accent); }
.game-score-colon { color: var(--muted-2); font-size: 15px; }
.game-score-vs { font-size: 13px; color: var(--muted-2); font-weight: 600; text-transform: uppercase; letter-spacing: 0.1em; }
.game-meta { display: flex; flex-direction: column; align-items: flex-end; gap: 4px; font-size: 11.5px; color: var(--muted); text-align: right; }
.game-venue { display: inline-flex; align-items: center; gap: 5px; }
.game-edit {
  position: absolute;
  top: 8px; right: 8px;
  width: 28px; height: 28px;
  display: none;
  place-items: center;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.06);
  color: var(--muted);
}
.game-card:hover .game-edit { display: grid; }
.game-edit:hover { color: var(--accent); }

.game-day-heading {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 18px;
  background: rgba(255, 255, 255, 0.025);
  border-bottom: 1px solid rgba(130, 170, 235, 0.08);
  font-size: 12px;
  color: var(--muted);
  text-transform: capitalize;
}
.game-day-heading strong { color: var(--text); font-weight: 600; }

/* ---------------- Dashboard hero ---------------- */

.hero {
  position: relative;
  overflow: hidden;
  border-radius: 22px;
  border: 1px solid rgba(74, 159, 224, 0.22);
  background:
    radial-gradient(700px 300px at 88% -30%, rgba(74, 159, 224, 0.28), transparent 70%),
    radial-gradient(500px 260px at 20% 130%, rgba(138, 164, 189, 0.2), transparent 70%),
    linear-gradient(120deg, rgba(16, 30, 52, 0.95), rgba(9, 16, 30, 0.95));
  padding: 26px 28px;
  box-shadow: var(--shadow);
  margin-bottom: 18px;
}
.hero::after {
  content: "";
  position: absolute;
  right: -40px; top: -60px;
  width: 260px; height: 260px;
  border-radius: 50%;
  border: 1px solid rgba(74, 159, 224, 0.18);
  box-shadow: 0 0 0 40px rgba(74, 159, 224, 0.04), 0 0 0 80px rgba(74, 159, 224, 0.02);
  pointer-events: none;
}
.hero-top { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; margin-bottom: 10px; }

.hero-eyebrow { font-size: 11px; text-transform: uppercase; letter-spacing: 0.2em; color: var(--accent); font-weight: 650; }
.hero-title { font-size: clamp(26px, 3.2vw, 38px); letter-spacing: -0.035em; line-height: 1.08; margin-bottom: 8px; }
.hero-sub { color: #a9bbd8; font-size: 14px; max-width: 620px; }
.hero-meta { display: flex; gap: 18px; flex-wrap: wrap; margin-top: 16px; font-size: 12.5px; color: var(--muted); }
.hero-meta span { display: inline-flex; align-items: center; gap: 6px; }
.hero-bottom { display: flex; align-items: flex-end; gap: 18px; flex-wrap: wrap; margin-top: 22px; }
.hero-stats { display: flex; gap: 10px; flex-wrap: wrap; }
.hero-stat {
  min-width: 92px;
  padding: 10px 14px;
  border-radius: 13px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.07);
}
.hero-stat-value { display: block; font-size: 22px; font-weight: 800; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }
.hero-stat-label { display: block; font-size: 10.5px; text-transform: uppercase; letter-spacing: 0.12em; color: var(--muted); margin-top: 2px; }
.hero-actions { margin-left: auto; display: flex; gap: 10px; flex-wrap: wrap; }

.mini-stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.mini-stat {
  padding: 15px 16px;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.025);
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.mini-stat-value { font-size: 25px; font-weight: 800; letter-spacing: -0.03em; font-variant-numeric: tabular-nums; }
.mini-stat-label { font-size: 11.5px; color: var(--muted); }
.mini-stat-hint { font-size: 10.5px; color: var(--muted-2); }
.mini-stat.accent .mini-stat-value { color: var(--accent); }
.mini-stat.green .mini-stat-value { color: var(--green); }
.mini-stat.violet .mini-stat-value { color: var(--violet); }

/* ---------------- Leaders ---------------- */

.leaders-board { display: flex; flex-direction: column; gap: 8px; }
.leader-card {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 9px 11px;
  border-radius: 12px;
  border: 1px solid transparent;
  transition: background 0.15s, border-color 0.15s;
}
.leader-card:hover { background: rgba(255, 255, 255, 0.04); border-color: var(--line); }
.leader-1 { background: linear-gradient(90deg, rgba(251, 191, 36, 0.1), transparent); }
.leader-rank { width: 18px; font-size: 12px; font-weight: 800; color: var(--muted); font-variant-numeric: tabular-nums; }
.leader-1 .leader-rank { color: var(--amber); }
.leader-avatar {
  width: 34px; height: 34px; flex: none;
  border-radius: 50%;
  display: grid; place-items: center;
  font-size: 11px; font-weight: 800;
  background: color-mix(in srgb, var(--lc) 22%, #0b1220);
  border: 1px solid color-mix(in srgb, var(--lc) 45%, transparent);
  color: #e8f6ff;
}
.leader-info { flex: 1; min-width: 0; display: flex; flex-direction: column; line-height: 1.2; }
.leader-name { font-size: 13px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.leader-team { font-size: 10.5px; color: var(--muted); }
.leader-value { font-size: 17px; font-weight: 800; color: var(--accent); font-variant-numeric: tabular-nums; }
.leaders-empty, .leader-table-empty { padding: 18px 4px; font-size: 12.5px; }

/* ---------------- Bracket ---------------- */

.bracket {
  display: flex;
  gap: 22px;
  overflow-x: auto;
  padding: 20px;
  align-items: flex-start;
}
.bracket-round { min-width: 280px; flex: 1; display: flex; flex-direction: column; gap: 14px; }
.bracket-round-title {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  color: var(--muted);
  padding: 0 2px 10px;
  border-bottom: 1px solid var(--line);
}
.bracket-series { display: flex; flex-direction: column; gap: 14px; justify-content: space-around; flex: 1; }
.series-card {
  border: 1px solid var(--line);
  border-radius: 15px;
  background: rgba(255, 255, 255, 0.025);
  padding: 12px 13px;
  transition: border-color 0.15s, background 0.15s;
}
.series-card:hover { border-color: rgba(74, 159, 224, 0.3); background: rgba(74, 159, 224, 0.04); }
.series-card.is-decided { border-color: rgba(52, 211, 153, 0.22); }
.series-card.is-third { border-style: dashed; }
.series-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 9px; }
.series-round { font-size: 10px; text-transform: uppercase; letter-spacing: 0.12em; color: var(--muted); }
.series-done { display: inline-flex; align-items: center; gap: 4px; font-size: 10px; color: var(--green); }
.series-team { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 5px 6px; border-radius: 8px; }
.series-team.is-winner { background: rgba(52, 211, 153, 0.09); }
.series-team.is-winner .team-line-name { color: #9ff5cf; }
.series-wins { font-size: 18px; font-weight: 800; font-variant-numeric: tabular-nums; color: var(--muted); }
.series-team.is-winner .series-wins { color: var(--green); }
.series-games { margin-top: 8px; padding-top: 8px; border-top: 1px dashed rgba(130, 170, 235, 0.14); display: flex; flex-direction: column; gap: 3px; }
.series-game { display: flex; justify-content: space-between; gap: 8px; font-size: 10.5px; color: var(--muted); padding: 2px 1px; }
.series-game:hover { color: var(--accent); }
.series-game.is-pending { color: var(--muted-2); }
.series-game-score { font-variant-numeric: tabular-nums; font-weight: 600; }
.series-link { display: inline-flex; align-items: center; gap: 4px; margin-top: 9px; font-size: 11.5px; color: var(--accent); font-weight: 600; }
.series-link:hover { text-decoration: underline; }

.champion-banner {
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 20px 22px;
  border-radius: 18px;
  border: 1px solid rgba(251, 191, 36, 0.32);
  background:
    radial-gradient(500px 200px at 0% 0%, rgba(251, 191, 36, 0.16), transparent 70%),
    rgba(251, 191, 36, 0.045);
  margin-bottom: 18px;
}
.champion-trophy {
  width: 58px; height: 58px; flex: none;
  display: grid; place-items: center;
  border-radius: 16px;
  color: #3b2600;
  background: linear-gradient(145deg, #ffe08a, #f59e0b);
  box-shadow: 0 10px 26px rgba(245, 158, 11, 0.35);
}
.champion-text { display: flex; flex-direction: column; flex: 1; }
.champion-label { font-size: 10.5px; text-transform: uppercase; letter-spacing: 0.18em; color: #fcd34d; }
.champion-name { font-size: 24px; font-weight: 800; letter-spacing: -0.025em; }
.champion-sub { font-size: 12px; color: var(--muted); }

/* ---------------- Empty state ---------------- */

.empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 46px 24px;
  gap: 6px;
}
.empty-icon {
  width: 54px; height: 54px;
  display: grid; place-items: center;
  border-radius: 16px;
  background: rgba(74, 159, 224, 0.08);
  border: 1px solid rgba(74, 159, 224, 0.18);
  color: var(--accent);
  margin-bottom: 8px;
}
.empty-title { font-size: 16px; }
.empty-text { color: var(--muted); font-size: 13px; max-width: 420px; }
.empty-action { margin-top: 14px; }

/* ---------------- Forms ---------------- */

.field { display: flex; flex-direction: column; gap: 6px; }
.field-label { font-size: 12px; font-weight: 600; color: #b8c6e0; }
.field-hint { font-size: 11px; color: var(--muted-2); }
.field-row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.field-row-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.form-stack { display: flex; flex-direction: column; gap: 14px; }

.input, .select, .textarea {
  width: 100%;
  min-height: 40px;
  padding: 9px 12px;
  border-radius: 10px;
  border: 1px solid var(--line-strong);
  background: rgba(7, 12, 22, 0.65);
  color: var(--text);
  font: inherit;
  font-size: 13.5px;
  outline: none;
  transition: border-color 0.15s, box-shadow 0.15s, background 0.15s;
}
.input::placeholder, .textarea::placeholder { color: var(--muted-2); }
.input:focus, .select:focus, .textarea:focus {
  border-color: rgba(74, 159, 224, 0.6);
  box-shadow: 0 0 0 3px rgba(74, 159, 224, 0.14);
  background: rgba(7, 12, 22, 0.85);
}
.select { appearance: none; background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(135deg, var(--muted) 50%, transparent 50%); background-position: calc(100% - 16px) 17px, calc(100% - 11px) 17px; background-size: 5px 5px, 5px 5px; background-repeat: no-repeat; padding-right: 30px; }
.select option { background: #0d1728; color: var(--text); }
.textarea { min-height: 84px; resize: vertical; }

.checkbox-line { display: flex; align-items: flex-start; gap: 9px; font-size: 13px; color: #c3d0e6; cursor: pointer; }
.checkbox-line input { width: 16px; height: 16px; margin-top: 2px; accent-color: var(--accent); }

.day-picker { display: flex; gap: 6px; flex-wrap: wrap; }
.day-chip { position: relative; }
.day-chip input { position: absolute; opacity: 0; inset: 0; cursor: pointer; }
.day-chip span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 42px;
  height: 34px;
  padding: 0 10px;
  border-radius: 9px;
  border: 1px solid var(--line-strong);
  background: rgba(255, 255, 255, 0.02);
  font-size: 12px;
  color: var(--muted);
  transition: all 0.14s;
}
.day-chip input:checked + span { background: rgba(74, 159, 224, 0.16); border-color: rgba(74, 159, 224, 0.5); color: #bfeaff; font-weight: 600; }
.day-chip input:focus-visible + span { box-shadow: 0 0 0 3px rgba(74, 159, 224, 0.2); }

.radio-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 8px; }
.radio-card { position: relative; }
.radio-card input { position: absolute; opacity: 0; inset: 0; cursor: pointer; }
.radio-card span {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 11px 12px;
  border-radius: 11px;
  border: 1px solid var(--line-strong);
  background: rgba(255, 255, 255, 0.02);
  transition: all 0.14s;
}
.radio-card strong { font-size: 13px; }
.radio-card small { font-size: 11px; color: var(--muted); }
.radio-card input:checked + span { border-color: rgba(74, 159, 224, 0.55); background: rgba(74, 159, 224, 0.12); }

/* ---------------- Dialogs ---------------- */

.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 100;
  background: rgba(3, 7, 14, 0.72);
  backdrop-filter: blur(6px);
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 6vh 18px 24px;
  overflow-y: auto;
}
.dialog {
  width: min(520px, 100%);
  border-radius: 20px;
  border: 1px solid var(--line-strong);
  background: linear-gradient(180deg, #101b2e, #0b1525);
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.6);
  transform: translateY(10px) scale(0.985);
  opacity: 0;
  transition: transform 0.18s ease, opacity 0.18s ease;
  margin: auto;
}
.dialog.dialog-in { transform: none; opacity: 1; }
.dialog-wide { width: min(820px, 100%); }
.dialog-head { display: flex; align-items: flex-start; gap: 14px; padding: 20px 22px 14px; }
.dialog-title-wrap { flex: 1; }
.dialog-title { font-size: 18px; letter-spacing: -0.02em; }
.dialog-sub { color: var(--muted); font-size: 12.5px; margin-top: 3px; }
.dialog-content { padding: 4px 22px 0; }
.dialog-message { color: #c3d0e6; font-size: 14px; line-height: 1.55; }
.dialog-form { display: flex; flex-direction: column; }
.dialog-actions { display: flex; justify-content: flex-end; gap: 10px; padding: 18px 0 20px; }
.dialog-foot { display: flex; justify-content: flex-end; gap: 10px; padding: 18px 22px 20px; }
.modal-closing { opacity: 0; transition: opacity 0.16s; }
.modal-closing .dialog { transform: translateY(6px) scale(0.985); }

/* ---------------- Toasts ---------------- */

.toasts { position: fixed; right: 18px; bottom: 18px; z-index: 200; display: flex; flex-direction: column; gap: 9px; max-width: min(380px, calc(100vw - 36px)); }
.toast {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 12px 12px 12px 13px;
  border-radius: 12px;
  border: 1px solid var(--line-strong);
  background: rgba(16, 27, 46, 0.96);
  box-shadow: 0 14px 40px rgba(0, 0, 0, 0.45);
  font-size: 13px;
  animation: toast-in 0.2s ease;
}
.toast-icon { flex: none; margin-top: 1px; color: var(--accent); }
.toast-success .toast-icon { color: var(--green); }
.toast-error .toast-icon { color: var(--red); }
.toast-warning .toast-icon { color: var(--amber); }
.toast-text { flex: 1; line-height: 1.4; }
.toast-close { background: none; border: none; color: var(--muted); cursor: pointer; padding: 2px; }
.toast-close:hover { color: var(--text); }
.toast-out { opacity: 0; transform: translateX(12px); transition: all 0.2s; }
@keyframes toast-in { from { opacity: 0; transform: translateY(8px); } }

/* ---------------- Match center ---------------- */

.scoreboard {
  position: relative;
  overflow: hidden;
  border-radius: 22px;
  border: 1px solid rgba(74, 159, 224, 0.2);
  background:
    radial-gradient(700px 280px at 50% -60%, rgba(74, 159, 224, 0.22), transparent 70%),
    linear-gradient(160deg, rgba(16, 30, 52, 0.96), rgba(8, 15, 28, 0.98));
  padding: 22px 24px 20px;
  box-shadow: var(--shadow);
}
.scoreboard.is-live { border-color: rgba(251, 113, 133, 0.35); }
.scoreboard-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 18px; }
.scoreboard-stage { font-size: 11px; text-transform: uppercase; letter-spacing: 0.16em; color: var(--muted); }
.scoreboard-date { font-size: 12px; color: var(--muted); }
.scoreboard-main { display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); gap: 20px; align-items: center; }
.score-side { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 10px; }
.score-side-name { font-size: 19px; font-weight: 750; letter-spacing: -0.02em; }
.score-side-city { font-size: 11.5px; color: var(--muted); }
.score-center { display: flex; flex-direction: column; align-items: center; gap: 6px; min-width: 170px; }
.score-digits { font-size: clamp(46px, 7vw, 66px); font-weight: 850; letter-spacing: -0.04em; line-height: 1; font-variant-numeric: tabular-nums; display: flex; align-items: baseline; gap: 10px; }
.score-digits .sep { color: var(--muted-2); font-size: 0.55em; font-weight: 600; }
.score-digits .is-leading { color: var(--accent); }
.score-state { font-size: 11px; text-transform: uppercase; letter-spacing: 0.14em; color: var(--muted); }

.clock-panel {
  margin-top: 18px;
  padding: 16px;
  border-radius: 16px;
  border: 1px solid var(--line);
  background: rgba(4, 9, 18, 0.5);
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 16px;
  align-items: center;
}
.clock-display { display: flex; align-items: baseline; gap: 14px; flex-wrap: wrap; }
.clock-time { font-family: var(--mono); font-size: clamp(38px, 5vw, 52px); font-weight: 700; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; line-height: 1; }
.clock-time.is-low { color: var(--red); }
.clock-time.is-paused { color: var(--amber); }
.clock-label { display: flex; flex-direction: column; gap: 2px; }
.clock-period { font-size: 13px; font-weight: 650; }
.clock-mode { font-size: 10.5px; color: var(--muted); text-transform: uppercase; letter-spacing: 0.12em; }
.clock-controls { display: flex; gap: 8px; flex-wrap: wrap; justify-content: flex-end; }
.clock-hint { grid-column: 1 / -1; font-size: 11.5px; color: var(--muted-2); }

.penalty-board { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 16px; }
.penalty-col { display: flex; flex-direction: column; gap: 6px; }
.penalty-col-title { font-size: 10px; text-transform: uppercase; letter-spacing: 0.14em; color: var(--muted-2); }
.penalty-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 7px 10px;
  border-radius: 9px;
  border: 1px solid rgba(251, 191, 36, 0.22);
  background: rgba(251, 191, 36, 0.07);
  font-size: 12px;
}
.penalty-item.is-expired { opacity: 0.4; }
.penalty-time { margin-left: auto; font-family: var(--mono); font-size: 13px; font-weight: 700; color: var(--amber); font-variant-numeric: tabular-nums; }

.events { display: flex; flex-direction: column; }
.event-item { display: flex; align-items: flex-start; gap: 12px; padding: 11px 16px; border-bottom: 1px solid rgba(130, 170, 235, 0.07); }
.event-item:last-child { border-bottom: none; }
.event-icon {
  width: 30px; height: 30px; flex: none;
  display: grid; place-items: center;
  border-radius: 9px;
  background: rgba(74, 159, 224, 0.1);
  color: var(--accent);
}
.event-icon.penalty { background: rgba(251, 191, 36, 0.1); color: var(--amber); }
.event-icon.shootout { background: rgba(138, 164, 189, 0.12); color: var(--violet); }
.event-main { flex: 1; min-width: 0; }
.event-title { font-size: 13.5px; font-weight: 600; }
.event-title .goal-team { color: var(--accent); }
.event-sub { font-size: 11.5px; color: var(--muted); margin-top: 1px; }
.event-time { display: flex; flex-direction: column; align-items: flex-end; gap: 3px; font-size: 11px; color: var(--muted); font-variant-numeric: tabular-nums; white-space: nowrap; }
.event-time strong { color: #c6d4ea; font-weight: 650; }
.event-delete { color: var(--muted-2); background: none; border: none; cursor: pointer; padding: 2px; }
.event-delete:hover { color: var(--red); }

.lineup-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.lineup-col { border: 1px solid var(--line); border-radius: 12px; padding: 12px; background: rgba(255, 255, 255, 0.02); }
.lineup-head { display: flex; align-items: center; gap: 8px; margin-bottom: 9px; font-size: 12.5px; font-weight: 650; }
.lineup-player { display: flex; align-items: center; gap: 8px; padding: 4px 0; font-size: 12px; color: #c3d0e6; }
.lineup-player input { accent-color: var(--accent); }
.lineup-player .lineup-num { color: var(--muted-2); font-variant-numeric: tabular-nums; width: 22px; }
.lineup-actions { margin-top: 10px; display: flex; gap: 8px; }

.match-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.goal-buttons { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }

.score-side .team-badge { margin-bottom: 2px; }

/* ---------------- Tabs / filters ---------------- */

.toolbar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 16px; }
.toolbar .select, .toolbar .input { width: auto; min-width: 150px; }
.seg { display: inline-flex; padding: 3px; gap: 2px; border-radius: 11px; border: 1px solid var(--line); background: rgba(0, 0, 0, 0.2); }
.seg-item {
  padding: 6px 13px;
  border-radius: 8px;
  border: none;
  background: transparent;
  color: var(--muted);
  font-size: 12.5px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.14s, color 0.14s;
}
.seg-item:hover { color: var(--text); }
.seg-item.is-active { background: rgba(74, 159, 224, 0.16); color: #bfeaff; }

/* ---------------- Team page ---------------- */

.team-hero {
  position: relative;
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 22px 24px;
  border-radius: 20px;
  border: 1px solid var(--line);
  background:
    radial-gradient(400px 180px at 0% 0%, color-mix(in srgb, var(--tc) 22%, transparent), transparent 70%),
    rgba(16, 26, 44, 0.72);
  overflow: hidden;
  margin-bottom: 18px;
}
.team-hero-info { flex: 1; min-width: 0; }
.team-hero-name { font-size: 27px; letter-spacing: -0.03em; line-height: 1.1; }
.team-hero-meta { display: flex; gap: 14px; flex-wrap: wrap; color: var(--muted); font-size: 12.5px; margin-top: 6px; }
.team-hero-meta span { display: inline-flex; align-items: center; gap: 5px; }
.team-hero-stats { display: flex; gap: 18px; }
.team-hero-stat { text-align: center; }
.team-hero-stat b { display: block; font-size: 21px; font-weight: 800; font-variant-numeric: tabular-nums; }
.team-hero-stat span { font-size: 10.5px; color: var(--muted); text-transform: uppercase; letter-spacing: 0.1em; }

.prefs-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.pref-box { padding: 12px 14px; border-radius: 12px; border: 1px solid var(--line); background: rgba(255, 255, 255, 0.02); }
.pref-label { font-size: 10.5px; text-transform: uppercase; letter-spacing: 0.1em; color: var(--muted); }
.pref-value { font-size: 13px; margin-top: 3px; }

/* ---------------- Archive ---------------- */

.archive-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 16px; }
.season-card {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 20px;
  border-radius: 18px;
  border: 1px solid var(--line);
  background: linear-gradient(165deg, rgba(20, 33, 55, 0.85), rgba(11, 20, 35, 0.9));
  transition: border-color 0.15s, transform 0.15s;
}
.season-card:hover { border-color: rgba(74, 159, 224, 0.35); transform: translateY(-2px); }
.season-card-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; }
.season-year { font-size: 11px; text-transform: uppercase; letter-spacing: 0.14em; color: var(--muted); }
.season-name { font-size: 19px; font-weight: 750; letter-spacing: -0.02em; margin-top: 4px; }
.season-champion { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 12px; background: rgba(251, 191, 36, 0.07); border: 1px solid rgba(251, 191, 36, 0.2); }
.season-champion-icon { color: var(--amber); }
.season-champion-text { display: flex; flex-direction: column; line-height: 1.25; }
.season-champion-text small { font-size: 10px; color: var(--amber); text-transform: uppercase; letter-spacing: 0.1em; }
.season-champion-text strong { font-size: 13.5px; }
.season-stats { display: flex; gap: 16px; font-size: 11.5px; color: var(--muted); }
.season-stats b { color: var(--text); font-weight: 700; }

/* ---------------- Login ---------------- */

.login-page { min-height: 100vh; display: grid; grid-template-columns: 1.05fr 0.95fr; }
.login-visual {
  position: relative;
  overflow: hidden;
  padding: 48px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  background:
    radial-gradient(900px 600px at 20% 0%, rgba(74, 159, 224, 0.22), transparent 60%),
    radial-gradient(700px 500px at 80% 100%, rgba(138, 164, 189, 0.18), transparent 60%),
    linear-gradient(160deg, #0a1322, #060a12);
  border-right: 1px solid var(--line);
}
.login-visual::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: linear-gradient(rgba(130, 170, 235, 0.05) 1px, transparent 1px), linear-gradient(90deg, rgba(130, 170, 235, 0.05) 1px, transparent 1px);
  background-size: 60px 60px;
  mask-image: radial-gradient(circle at 40% 40%, #000 20%, transparent 75%);
  pointer-events: none;
}
.login-brand { position: relative; display: flex; align-items: center; gap: 13px; }
.login-brand .brand-mark { width: 46px; height: 46px; }
.login-headline { position: relative; max-width: 520px; }
.login-headline h1 { font-size: clamp(34px, 4.4vw, 54px); line-height: 1.03; letter-spacing: -0.045em; margin-bottom: 18px; }
.login-headline h1 span { background: linear-gradient(100deg, #9fcee8, #4a9fe0 45%, #8aa4bd); -webkit-background-clip: text; background-clip: text; color: transparent; }
.login-headline p { color: #a9bbd8; font-size: 16px; max-width: 460px; line-height: 1.6; }
.login-features { position: relative; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; max-width: 520px; }
.login-feature { display: flex; align-items: center; gap: 9px; font-size: 12.5px; color: #b8c6e0; padding: 9px 12px; border-radius: 10px; background: rgba(255, 255, 255, 0.035); border: 1px solid rgba(255, 255, 255, 0.06); }
.login-feature .icon { color: var(--accent); flex: none; }
.login-panel { display: flex; align-items: center; justify-content: center; padding: 40px 24px; }
.login-card { width: min(410px, 100%); }
.login-card h2 { font-size: 25px; letter-spacing: -0.03em; margin-bottom: 6px; }
.login-card .login-sub { color: var(--muted); font-size: 13.5px; margin-bottom: 24px; }
.login-form { display: flex; flex-direction: column; gap: 14px; }
.login-form .btn { width: 100%; margin-top: 4px; }
.login-error { display: none; padding: 10px 13px; border-radius: 10px; background: rgba(251, 113, 133, 0.1); border: 1px solid rgba(251, 113, 133, 0.3); color: #fda4af; font-size: 12.5px; }
.login-error.is-visible { display: block; }
.login-hint { margin-top: 22px; padding: 14px 15px; border-radius: 12px; border: 1px dashed var(--line-strong); background: rgba(255, 255, 255, 0.02); font-size: 12px; color: var(--muted); }
.login-hint strong { color: #c3d0e6; }
.login-hint code { font-family: var(--mono); font-size: 11.5px; background: rgba(74, 159, 224, 0.1); border: 1px solid rgba(74, 159, 224, 0.18); padding: 1px 6px; border-radius: 5px; color: #9fdcff; }
.login-continue { display: block; margin-top: 14px; text-align: center; font-size: 12.5px; color: var(--accent); text-decoration: none; }
.login-continue:hover { text-decoration: underline; }
.login-foot { margin-top: 24px; font-size: 11px; color: var(--muted-2); text-align: center; }

/* ---------------- Misc ---------------- */

.skeleton {
  border-radius: 12px;
  background: linear-gradient(90deg, rgba(255, 255, 255, 0.03), rgba(255, 255, 255, 0.07), rgba(255, 255, 255, 0.03));
  background-size: 200% 100%;
  animation: shimmer 1.3s infinite;
  min-height: 16px;
}
@keyframes shimmer { to { background-position: -200% 0; } }

.notice {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 12px 14px;
  border-radius: 12px;
  border: 1px solid rgba(74, 159, 224, 0.2);
  background: rgba(74, 159, 224, 0.06);
  color: #b9dcf5;
  font-size: 12.5px;
  line-height: 1.5;
}
.notice .icon { flex: none; color: var(--accent); margin-top: 1px; }
.notice.warning { border-color: rgba(251, 191, 36, 0.28); background: rgba(251, 191, 36, 0.07); color: #f5d68f; }
.notice.warning .icon { color: var(--amber); }
.notice.danger { border-color: rgba(251, 113, 133, 0.3); background: rgba(251, 113, 133, 0.07); color: #f9b8c3; }
.notice.danger .icon { color: var(--red); }

.divider { height: 1px; background: var(--line); margin: 16px 0; }

.badge-count { display: inline-flex; align-items: center; justify-content: center; min-width: 22px; height: 22px; padding: 0 7px; border-radius: 999px; background: rgba(251, 191, 36, 0.15); color: #fcd34d; font-size: 11px; font-weight: 700; }

.list-plain { display: flex; flex-direction: column; }
.list-row { display: flex; align-items: center; gap: 12px; padding: 12px 16px; border-bottom: 1px solid rgba(130, 170, 235, 0.07); }
.list-row:last-child { border-bottom: none; }
.list-row-main { flex: 1; min-width: 0; }
.list-row-title { font-size: 13.5px; font-weight: 600; }
.list-row-sub { font-size: 11.5px; color: var(--muted); }

.kv { display: flex; justify-content: space-between; gap: 14px; padding: 8px 0; border-bottom: 1px dashed rgba(130, 170, 235, 0.1); font-size: 13px; }
.kv:last-child { border-bottom: none; }
.kv span:first-child { color: var(--muted); }

/* ---------------- Responsive ---------------- */

@media (max-width: 1180px) {
  .grid-sidebar { grid-template-columns: minmax(0, 1fr); }
  .grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .content { padding: 24px 22px 50px; }
  .topbar { padding: 14px 22px; }
}

@media (max-width: 980px) {
  .app-shell { grid-template-columns: 1fr; }
  .sidebar {
    position: sticky;
    top: 0;
    height: auto;
    flex-direction: row;
    align-items: center;
    gap: 12px;
    padding: 10px 14px;
    border-right: none;
    border-bottom: 1px solid var(--line);
    overflow-x: auto;
  }
  .brand { padding: 0 8px 0 0; flex: none; }
  .brand-sub { display: none; }
  .brand-text { display: none; }
  .season-switch { display: none; }
  .nav { flex-direction: row; overflow-x: auto; gap: 4px; padding: 0; flex: 1; }
  .nav-section { display: none; }
  .nav-item { padding: 8px 10px; font-size: 12.5px; white-space: nowrap; }
  .nav-badge { display: none; }
  .sidebar-foot { margin: 0; padding: 0; border: none; flex: none; }
  .user-meta { display: none; }
  .user-card { padding: 0; }
  .logout-btn { display: none; }
  .topbar { padding: 10px 16px; gap: 10px; }
  .topbar-title { font-size: 14px; }
  .topbar-sub { display: none; }
  .content { padding: 18px 16px 44px; }
  .page-title { font-size: 23px; }
  .grid-2, .grid-3 { grid-template-columns: 1fr; }
  .mini-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .hero { padding: 20px; }
  .game-card { grid-template-columns: 100px minmax(0, 1fr); gap: 12px; padding: 12px 14px; }
  .game-meta { display: none; }
  .game-matchup { grid-template-columns: minmax(0, 1fr) 78px minmax(0, 1fr); gap: 6px; }
  .game-team-name { font-size: 12.5px; }
  .game-score-nums { font-size: 18px; }
  .bracket { padding: 14px; }
  .bracket-round { min-width: 250px; }
  .clock-panel { grid-template-columns: 1fr; }
  .clock-controls { justify-content: flex-start; }
  .lineup-grid, .penalty-board { grid-template-columns: 1fr; }
  .scoreboard-main { grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); gap: 8px; }
  .score-side-name { font-size: 15px; }
  .score-digits { font-size: 42px; }
  .login-page { grid-template-columns: 1fr; }
  .login-visual { display: none; }
  .login-panel { min-height: 100vh; }
  .prefs-grid { grid-template-columns: 1fr; }
  .field-row, .field-row-3 { grid-template-columns: 1fr; }
}

@media (max-width: 620px) {
  .hide-sm { display: none !important; }
  .col-goals { display: none; }
  .game-team-name { max-width: 90px; }
  .hero-actions { margin-left: 0; width: 100%; }
  .hero-actions .btn { flex: 1; }
  .page-actions { width: 100%; }
  .page-actions .btn { flex: 1; }
  .table th, .table td { padding: 9px 8px; font-size: 12.5px; }
  .team-cell-name { font-size: 12.5px; }
  .team-badge-sm { width: 26px; height: 26px; font-size: 9px; }
  .series-card { min-width: 0; }
  .score-side-name { font-size: 13px; }
  .score-digits { font-size: 36px; gap: 6px; }
  .score-center { min-width: 120px; }
  .game-card { grid-template-columns: 84px minmax(0, 1fr); }
  .game-matchup { grid-template-columns: minmax(0, 1fr) 64px minmax(0, 1fr); }
  .game-score-nums { font-size: 16px; }
  .game-team .team-badge { display: none; }
  .hero-stat { flex: 1; min-width: 70px; }
  .mini-stats { gap: 8px; }
  .mini-stat { padding: 12px; }
  .mini-stat-value { font-size: 21px; }
  .card-head { padding: 15px 15px 12px; }
  .card-body { padding: 15px; }
  .game-day-heading { padding: 8px 14px; }
}

/* ---------------- Print ---------------- */

@media print {
  body { background: #fff; color: #111; }
  .sidebar, .topbar, .page-actions, .btn, .toasts, .game-edit { display: none !important; }
  .app-shell { display: block; }
  .content { padding: 0; max-width: none; }
  .card, .hero, .scoreboard, .team-hero, .champion-banner { border-color: #ccc; background: #fff; color: #111; box-shadow: none; }
  .table th, .table td { border-color: #ddd; color: #111; }
  .muted, .game-date, .team-cell-city { color: #555; }
  .pill { border: 1px solid #ccc; color: #111; background: #f4f4f4; }
  .team-badge { color: #fff; }
  a { color: #111; }
}

/* ---------------- Дополнения интерфейса ---------------- */

.card.card-flush > .card-body { padding: 0; }
.card.card-flush > .card-head { padding-bottom: 14px; }
.is-hidden { display: none !important; }
.mono { font-family: var(--mono); font-size: 12.5px; }

/* Команды */
.teams-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 16px;
}
.team-tile {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 18px;
  border-radius: 18px;
  border: 1px solid var(--line);
  background: linear-gradient(165deg, rgba(20, 33, 55, 0.8), rgba(11, 20, 35, 0.88));
  transition: border-color 0.16s, transform 0.16s, background 0.16s;
}
.team-tile:hover {
  border-color: rgba(74, 159, 224, 0.38);
  transform: translateY(-2px);
  background: linear-gradient(165deg, rgba(24, 40, 66, 0.9), rgba(12, 22, 39, 0.92));
}
.team-tile-top { display: flex; align-items: center; gap: 13px; }
.team-tile-head { flex: 1; min-width: 0; }
.team-tile-name { font-size: 18px; font-weight: 750; letter-spacing: -0.02em; }
.team-tile-city {
  font-size: 11.5px;
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.team-tile-prefs {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 11.5px;
  color: var(--muted);
  padding: 8px 10px;
  border-radius: 9px;
  background: rgba(255, 255, 255, 0.025);
  border: 1px solid rgba(130, 170, 235, 0.08);
}
.team-tile-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding-top: 12px;
  border-top: 1px solid rgba(130, 170, 235, 0.09);
  font-size: 11.5px;
  color: var(--muted);
}
.team-tile-footer span { display: inline-flex; align-items: center; gap: 5px; }

.roster-table td { white-space: nowrap; }
.stats-table .sortable { cursor: pointer; user-select: none; transition: color 0.12s; }
.stats-table .sortable:hover { color: var(--accent); }
.stats-table .sortable.is-sorted { color: var(--accent); }

/* Быстрые действия на матче */
.score-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  margin-top: 16px;
}
.score-action-home, .score-action-away {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 14px 16px;
  border-radius: 15px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.026);
}
.score-action-home { border-left: 3px solid rgba(74, 159, 224, 0.55); }
.score-action-away { border-left: 3px solid rgba(138, 164, 189, 0.55); }
.score-action-label { display: flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 650; }
.score-action-home .row, .score-action-away .row { gap: 8px; }
.score-action-home .btn, .score-action-away .btn { flex: 1; }

.event-period {
  padding: 9px 16px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.022);
  border-bottom: 1px solid rgba(130, 170, 235, 0.07);
  border-top: 1px solid rgba(130, 170, 235, 0.07);
}
.event-period:first-child { border-top: none; }

/* Посев плей-офф */
.seed-list { display: flex; flex-direction: column; gap: 8px; }
.seed-pair {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 9px 11px;
  border-radius: 11px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.022);
  font-size: 12.5px;
}
.seed-pair:nth-child(odd) { background: rgba(255, 255, 255, 0.035); }
.seed-num {
  display: inline-grid;
  place-items: center;
  width: 22px; height: 22px;
  border-radius: 7px;
  background: rgba(74, 159, 224, 0.12);
  color: #8fd8ff;
  font-size: 10.5px;
  font-weight: 700;
  flex: none;
}
.seed-name { font-weight: 600; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.seed-vs { color: var(--muted-2); font-size: 10px; text-transform: uppercase; letter-spacing: 0.1em; padding: 0 2px; }

/* Поля форм */
.color-input { padding: 4px; cursor: pointer; }
.color-input::-webkit-color-swatch-wrapper { padding: 0; }
.color-input::-webkit-color-swatch { border: none; border-radius: 7px; }
.notice code {
  font-family: var(--mono);
  font-size: 11px;
  background: rgba(74, 159, 224, 0.12);
  border: 1px solid rgba(74, 159, 224, 0.2);
  padding: 1px 5px;
  border-radius: 5px;
}

@media (max-width: 980px) {
  .score-actions { grid-template-columns: 1fr; }
  .teams-grid { grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); }
}
@media (max-width: 620px) {
  .teams-grid { grid-template-columns: 1fr; }
  .seed-pair { flex-wrap: wrap; }
  .seed-name { flex: 1; }
}

/* ---------------- Уточнения адаптива ---------------- */

.game-day-heading { text-transform: none; }
.game-list { container-type: inline-size; }
.series-link .icon { transform: rotate(-90deg); }

@container (max-width: 720px) {
  .game-card { grid-template-columns: 104px minmax(0, 1fr); gap: 12px; }
  .game-meta { display: none; }
  .game-matchup { grid-template-columns: minmax(0, 1fr) 86px minmax(0, 1fr); }
  .game-team-name { font-size: 13px; }
}

@container (max-width: 500px) {
  .game-card { grid-template-columns: 84px minmax(0, 1fr); gap: 8px; }
  .game-matchup { grid-template-columns: minmax(0, 1fr) 62px minmax(0, 1fr); gap: 4px; }
  .game-team-name { font-size: 12px; }
  .game-team .team-badge { display: none; }
  .game-score-nums { font-size: 16px; }
}

@media (max-width: 980px) {
  .brand-mark { width: 34px; height: 34px; border-radius: 10px; }
  .brand-mark .icon { width: 20px; height: 20px; }
  .nav {
    mask-image: linear-gradient(90deg, #000 0, #000 calc(100% - 26px), transparent 100%);
    -webkit-mask-image: linear-gradient(90deg, #000 0, #000 calc(100% - 26px), transparent 100%);
    padding-right: 22px;
  }
  .nav-item { padding: 7px 9px; font-size: 12px; }
  .nav-item .icon { width: 16px; height: 16px; }
  .sidebar { gap: 8px; }
}

@media (max-width: 620px) {
  .hide-xs { display: none !important; }
  .standings-table .col-team { min-width: 150px; }
  .standings-table th, .standings-table td { padding: 9px 7px; }
  .card-actions .checkbox-line { font-size: 11.5px; }
  .checkbox-line { font-size: 12px; }
}

/* ============================================================
   Мобильное приложение / PWA
   ============================================================ */

.tabbar,
.mobile-menu-btn,
.mobile-season,
.sheet-backdrop,
.install-btn { display: none; }

body.pwa-installable .install-btn { display: inline-flex; }
body.pwa-standalone .install-btn,
body.pwa-standalone .install-btn-sheet { display: none !important; }

.install-help { display: flex; flex-direction: column; gap: 4px; }
.install-hero {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px;
  border-radius: 14px;
  border: 1px solid rgba(74, 159, 224, 0.22);
  background: rgba(74, 159, 224, 0.06);
  margin-bottom: 8px;
}
.install-hero .icon { color: var(--accent); flex: none; }
.install-hero div { display: flex; flex-direction: column; gap: 3px; }
.install-hero strong { font-size: 15px; }
.install-hero span { font-size: 12px; color: var(--muted); line-height: 1.4; }
.install-steps {
  margin: 10px 0 0 20px;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 9px;
  font-size: 13px;
  color: #c3d0e6;
  line-height: 1.45;
}
.install-steps li::marker { color: var(--accent); font-weight: 700; }
.install-share {
  display: inline-grid;
  place-items: center;
  width: 20px;
  height: 20px;
  border-radius: 6px;
  background: rgba(74, 159, 224, 0.15);
  color: var(--accent);
  font-weight: 700;
  vertical-align: middle;
}
body.sheet-open { overflow: hidden; }

@media (max-width: 980px) {
  .app-shell { display: block; }

  .sidebar {
    position: sticky;
    top: 0;
    z-index: 30;
    height: auto;
    flex-direction: row;
    align-items: center;
    gap: 10px;
    padding: 10px 14px;
    padding-top: max(10px, env(safe-area-inset-top));
    border-right: none;
    border-bottom: 1px solid var(--line);
    overflow: visible;
    background: rgba(8, 14, 25, 0.96);
  }
  .brand { padding: 0; gap: 8px; flex: none; }
  .brand-mark { width: 34px; height: 34px; border-radius: 10px; }
  .brand-mark .icon { width: 20px; height: 20px; }
  .brand-text { display: flex; }
  .brand-name { font-size: 14px; }
  .brand-sub { display: none; }

  .mobile-season {
    display: block;
    flex: 1;
    min-width: 0;
    text-align: right;
    font-size: 11px;
    color: var(--muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }
  .mobile-menu-btn {
    display: grid;
    place-items: center;
    width: 38px;
    height: 38px;
    flex: none;
    border-radius: 11px;
    border: 1px solid var(--line-strong);
    background: rgba(255, 255, 255, 0.04);
    color: var(--text);
    cursor: pointer;
  }
  .mobile-menu-btn:active { background: rgba(74, 159, 224, 0.14); }

  .season-switch { display: none !important; }
  .nav { display: none !important; }
  .sidebar-foot { display: none !important; }
  .topbar { display: none !important; }

  .content { padding: 16px 14px calc(84px + env(safe-area-inset-bottom)); }
  .page-head { margin-bottom: 16px; }
  .page-title { font-size: 22px; }

  .tabbar {
    display: flex;
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 45;
    justify-content: space-around;
    gap: 2px;
    padding: 6px 6px calc(6px + env(safe-area-inset-bottom));
    border-top: 1px solid var(--line);
    background: rgba(7, 12, 22, 0.97);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
  }
  .tab-item {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    padding: 4px 2px;
    border: none;
    border-radius: 10px;
    background: none;
    color: var(--muted);
    font-size: 10px;
    font-weight: 600;
    letter-spacing: 0.01em;
    cursor: pointer;
  }
  .tab-icon {
    display: grid;
    place-items: center;
    width: 36px;
    height: 28px;
    border-radius: 9px;
  }
  .tab-item.is-active { color: var(--accent); }
  .tab-item.is-active .tab-icon { background: rgba(74, 159, 224, 0.14); }

  .sheet-backdrop {
    display: flex;
    position: fixed;
    inset: 0;
    z-index: 80;
    align-items: flex-end;
    justify-content: center;
    background: rgba(3, 7, 14, 0.62);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    opacity: 0;
    transition: opacity 0.2s ease;
  }
  .sheet-backdrop[hidden] { display: none; }
  .sheet-backdrop.is-open { opacity: 1; }
  .sheet {
    width: 100%;
    max-width: 620px;
    max-height: 88vh;
    overflow-y: auto;
    padding: 6px 18px calc(20px + env(safe-area-inset-bottom));
    border-radius: 22px 22px 0 0;
    border-top: 1px solid var(--line-strong);
    background: linear-gradient(180deg, #101b2e, #0b1525);
    box-shadow: 0 -20px 60px rgba(0, 0, 0, 0.5);
    transform: translateY(26px);
    transition: transform 0.22s ease;
  }
  .sheet-backdrop.is-open .sheet { transform: none; }
  .sheet-grab { width: 38px; height: 4px; border-radius: 99px; background: rgba(255, 255, 255, 0.18); margin: 4px auto 14px; }
  .sheet-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
  .sheet-kicker { display: block; font-size: 10px; letter-spacing: 0.16em; text-transform: uppercase; color: var(--muted); }
  .sheet-title { font-size: 22px; letter-spacing: -0.03em; }
  .sheet-season {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px;
    margin-bottom: 12px;
    border: 1px solid var(--line);
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.025);
  }
  .sheet-season .field { flex: 1; min-width: 0; }
  .sheet-season .pill { flex: none; }
  .sheet-nav { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
  .sheet-nav .nav-section { grid-column: 1 / -1; margin: 10px 4px 0; }
  .sheet-nav .nav-item {
    padding: 11px 12px;
    border: 1px solid var(--line);
    background: rgba(255, 255, 255, 0.025);
    font-size: 13px;
  }
  .sheet-nav .nav-item.is-active {
    border-color: rgba(74, 159, 224, 0.35);
    background: rgba(74, 159, 224, 0.12);
  }
  .sheet-nav .nav-badge { margin-left: auto; }
  .sheet-foot { margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--line); display: flex; flex-direction: column; gap: 12px; }
  .install-btn-sheet { width: 100%; }
  .sheet-user { display: flex; align-items: center; gap: 10px; }
  .sheet-user-text { flex: 1; display: flex; flex-direction: column; min-width: 0; line-height: 1.25; }
  .sheet-user-text strong { font-size: 13px; }
  .sheet-user-text span { font-size: 11px; color: var(--muted); }
  .sheet-user .btn { flex: none; }

  .toasts { bottom: calc(76px + env(safe-area-inset-bottom)); }
}

@media (max-width: 620px) {
  .sidebar { padding-left: 12px; padding-right: 10px; }
  .brand-name { font-size: 13px; }
  .mobile-season { font-size: 10.5px; }
  .content { padding-left: 12px; padding-right: 12px; }
  .tab-item { font-size: 9.5px; }
  .tab-icon { width: 34px; height: 26px; }
}

/* ---------------- Телефон / QR ---------------- */

.phone-card { display: flex; align-items: center; gap: 24px; }
.phone-card-info { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 10px; }
.phone-card-info .muted { font-size: 12.5px; line-height: 1.5; }
.phone-url {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 7px 8px 7px 12px;
  border-radius: 10px;
  border: 1px solid var(--line-strong);
  background: rgba(4, 10, 20, 0.55);
}
.phone-url code {
  flex: 1;
  min-width: 0;
  font-family: var(--mono);
  font-size: 12.5px;
  color: #9fdcff;
  overflow-wrap: anywhere;
}
.phone-qr {
  width: 156px;
  height: 156px;
  flex: none;
  padding: 8px;
  border-radius: 14px;
  background: #fff;
  color: #0b1220;
  display: grid;
  place-items: center;
}
.phone-qr svg { width: 100%; height: 100%; display: block; }
.phone-note { font-size: 11.5px !important; color: var(--muted-2) !important; }

@media (max-width: 980px) {
  .phone-card { gap: 16px; }
}
@media (max-width: 620px) {
  .phone-card { flex-direction: column-reverse; align-items: stretch; }
  .phone-qr { width: 132px; height: 132px; align-self: center; }
}

@media (max-width: 620px) {
  .phone-qr { display: none; }
  .phone-card { flex-direction: column; }
}


.theme-options { display: flex; gap: 8px; flex-wrap: wrap; }

/* ---------------- Team application ---------------- */
.apply-form { display: flex; flex-direction: column; gap: 16px; }
.apply-form .card-body { display: block; }
.apply-actions { display: flex; justify-content: flex-end; align-items: center; gap: 10px; padding: 4px 0 8px; }
.logo-picker { display: flex; align-items: center; gap: 14px; min-width: 0; }
.logo-preview {
  width: 76px; height: 76px; flex: none; border-radius: 18px;
  border: 1px dashed var(--line-strong); background: var(--panel-2);
  display: grid; place-items: center; overflow: hidden;
}
.logo-preview img { width: 100%; height: 100%; object-fit: contain; }
.logo-placeholder { font-size: 10px; color: var(--muted-2); text-align: center; padding: 4px; }
.logo-picker-actions { display: flex; flex-direction: column; align-items: flex-start; gap: 6px; min-width: 0; }
.logo-picker-actions .field-hint { margin: 0; max-width: 360px; }
.apply-logo-row { display: flex; align-items: center; gap: 24px; flex-wrap: wrap; }
.apply-logo-note { display: flex; align-items: flex-start; gap: 8px; color: var(--muted); font-size: 12px; max-width: 420px; line-height: 1.5; }
.form-section-title {
  margin-top: 4px; padding-top: 12px; border-top: 1px solid var(--line);
  font-size: 10.5px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--muted);
}
.apply-roster-head {
  display: grid; grid-template-columns: 1.1fr 1.1fr 150px 130px 80px 150px 80px;
  gap: 8px; padding: 0 12px 8px; font-size: 10px; font-weight: 700;
  letter-spacing: .08em; text-transform: uppercase; color: var(--muted-2);
}
.apply-roster { display: flex; flex-direction: column; gap: 8px; }
.apply-player {
  display: grid; grid-template-columns: 1.1fr 1.1fr 150px 130px 80px 150px 80px;
  gap: 8px; align-items: end; padding: 10px 12px;
  border: 1px solid var(--line); border-radius: 14px; background: var(--panel-2);
}
.apply-player .field { gap: 4px; }
.apply-player .field-label { font-size: 10px; }
.apply-row-actions { display: flex; gap: 4px; align-self: end; justify-content: flex-end; }
.apply-add-player { color: var(--accent); }
.apply-remove-player { margin-bottom: 1px; }
.apply-roster-hint {
  display: flex; align-items: flex-start; gap: 8px; margin-top: 10px;
  color: var(--muted); font-size: 11.5px; line-height: 1.45;
}
@media (max-width: 1180px) {
  .apply-roster-head { display: none; }
  .apply-player { grid-template-columns: 1fr 1fr 1fr; }
  .apply-row-actions { justify-self: end; }
}
@media (max-width: 700px) {
  .apply-player { grid-template-columns: 1fr 1fr; padding: 12px; }
  .apply-player .field:nth-child(3),
  .apply-player .field:nth-child(4),
  .apply-player .field:nth-child(5),
  .apply-player .field:nth-child(6) { grid-column: span 1; }
  .apply-row-actions { grid-column: 1 / -1; justify-self: end; }
  .apply-logo-row { align-items: flex-start; flex-direction: column; gap: 14px; }
  .apply-actions { flex-direction: column-reverse; align-items: stretch; }
  .apply-actions .btn { width: 100%; }
}

.player-marker {
  display: inline-grid; place-items: center; width: 19px; height: 19px; border-radius: 6px;
  font-size: 10px; font-weight: 800; vertical-align: 1px;
}
.marker-captain { background: #f3c94f; color: #241a00; }
.marker-assistant { background: #8aa4bd; color: #0b1520; }
.team-contact { text-align: right; line-height: 1.45; }
.team-phone { color: var(--accent); text-decoration: none; font-size: 12px; }
.team-phone:hover { text-decoration: underline; }

.draw-teams { display: flex; flex-wrap: wrap; gap: 8px; }
.draw-team { display: inline-flex; align-items: center; gap: 8px; padding: 8px 11px; border: 1px solid var(--line); border-radius: 999px; background: var(--panel-2); font-size: 12.5px; }
.draw-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--team-color); box-shadow: 0 0 0 3px color-mix(in srgb, var(--team-color) 18%, transparent); }


/* ---------------- Calendar constructor ---------------- */
.builder-controls { display: flex; flex-wrap: wrap; gap: 12px; align-items: flex-end; }
.builder-controls .field { min-width: 150px; }
.builder-double { margin-bottom: 3px; }
.builder-hint { display: flex; align-items: flex-start; gap: 8px; margin-top: 12px; color: var(--muted); font-size: 11.5px; line-height: 1.45; }
.builder-layout { min-width: 0; }
.builder-calendar { width: 100%; min-width: 0; overflow-x: auto; }
.builder-weeks { width: 100%; min-width: 0; overflow-x: visible; padding-bottom: 4px; }
.builder-week-head, .builder-week { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 6px; }
.builder-week-head { margin-bottom: 6px; color: var(--muted); font-size: 10px; font-weight: 700; letter-spacing: .08em; text-align: center; text-transform: uppercase; }
.builder-week { margin-bottom: 8px; }
.builder-cell { min-height: 88px; padding: 6px; border: 1px solid var(--line); border-radius: 11px; background: var(--panel-2); transition: border-color .15s, background .15s; }
.builder-cell.is-dragover { border-color: var(--accent); background: color-mix(in srgb, var(--accent) 8%, var(--panel-2)); }
.builder-day { display: flex; align-items: baseline; gap: 5px; margin-bottom: 4px; }
.builder-day b { font-size: 13px; }
.builder-day span { color: var(--muted); font-size: 9px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.builder-games { display: flex; flex-direction: column; gap: 4px; min-height: 0; }
.builder-game { display: flex; align-items: center; justify-content: space-between; gap: 4px; padding: 4px 6px; border: 1px solid var(--line); border-radius: 8px; background: var(--panel); color: var(--text); cursor: grab; user-select: none; }
.builder-game:hover { border-color: color-mix(in srgb, var(--accent) 50%, var(--line)); }
.builder-game.is-selected { border-color: var(--accent); box-shadow: 0 0 0 2px color-mix(in srgb, var(--accent) 22%, transparent); }
.builder-game.is-dragging { opacity: .45; }
.builder-code { font-size: 10px; font-weight: 800; letter-spacing: .03em; }
.builder-at-home { color: var(--muted); display: inline-flex; }
.builder-unscheduled { margin-top: 16px; padding: 12px; border: 1px dashed var(--line); border-radius: 14px; background: color-mix(in srgb, var(--panel-2) 65%, transparent); }
.builder-unscheduled-head { display: flex; align-items: center; gap: 6px; margin-bottom: 8px; color: var(--muted); font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; }
.builder-unscheduled .builder-games { flex-direction: row; flex-wrap: wrap; }
.builder-unscheduled .builder-game { min-width: 128px; }
@media (max-width: 800px) {
  .builder-controls { align-items: stretch; }
  .builder-controls .field { flex: 1 1 140px; }
  .builder-week-head, .builder-week { grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 3px; }
  .builder-cell { padding: 4px; }
  .builder-day span { font-size: 8px; }
  .builder-code { font-size: 8.5px; }
  .builder-at-home { display: none; }
}

/* ---------------- Team color presets ---------------- */
.color-presets { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; min-height: 28px; }
.color-preset {
  width: 28px; height: 28px; padding: 3px; border: 2px solid transparent; border-radius: 9px;
  background: transparent; cursor: pointer; line-height: 0;
}
.color-preset span {
  display: block; width: 100%; height: 100%; border-radius: 5px;
  background: var(--preset); box-shadow: inset 0 0 0 1px rgba(0,0,0,.16);
}
.color-preset:hover { border-color: var(--line-strong, var(--line)); }
.color-preset.is-selected { border-color: var(--text); box-shadow: 0 0 0 2px var(--panel); }

/* ---------------- Mobile dashboard ---------------- */
.dashboard-mobile { display: none; }
.mobile-sort { display: flex; align-items: center; justify-content: flex-end; gap: 7px; margin-bottom: 10px; color: var(--muted); font-size: 11px; }
.mobile-sort .select { width: auto; min-width: 140px; }
@media (max-width: 900px) {
  .dashboard-desktop-grid { display: none; }
  .dashboard-mobile { display: block; }
}

.builder-cell.is-weekend { background: color-mix(in srgb, var(--accent) 14%, var(--panel-2)); border-color: color-mix(in srgb, var(--accent) 24%, var(--line)); }
.builder-cell.is-weekend .builder-day span { color: var(--accent); font-weight: 700; }
.builder-cell.is-holiday { border-color: color-mix(in srgb, var(--red) 45%, var(--line)); background: color-mix(in srgb, var(--red) 7%, var(--panel-2)); }
.builder-cell.is-holiday .builder-day span { color: var(--red); }

.app-version {
  margin-top: 6px;
  color: var(--muted-2);
  font-size: 10px;
  letter-spacing: .08em;
  text-align: right;
  text-transform: uppercase;
  user-select: none;
}
.sheet-foot .app-version { text-align: center; margin-top: 10px; }

@media print {
  body.print-schedule .sidebar,
  body.print-schedule .topbar,
  body.print-schedule .tabbar,
  body.print-schedule .page-actions,
  body.print-schedule .back-link,
  body.print-schedule .toolbar,
  body.print-schedule .notice,
  body.print-schedule .toasts,
  body.print-schedule .toast,
  body.print-schedule .app-version,
  body.print-schedule .game-edit { display: none !important; }
  body.print-schedule .app-shell { display: block !important; min-height: 0; }
  body.print-schedule .main { padding: 0 !important; }
  body.print-schedule .game-card { break-inside: avoid; box-shadow: none; border-color: #bbb; }
  body.print-schedule .section-card, body.print-schedule .card { box-shadow: none; break-inside: auto; }
  @page { margin: 12mm; }
}

.builder-layout { display: grid; grid-template-columns: 280px minmax(0, 1fr); gap: 16px; align-items: start; }
.builder-pool {
  position: sticky; top: 12px; z-index: 2;
  max-height: calc(100vh - 130px); overflow: auto;
  padding: 10px; border: 1px solid var(--line); border-radius: 14px;
  background: var(--panel-2); box-shadow: 0 10px 26px rgba(16, 42, 67, .10);
}
.builder-pool-head { display: flex; align-items: center; gap: 6px; margin-bottom: 8px; color: var(--muted); font-size: 10.5px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; }
.builder-pool-head b { margin-left: auto; color: var(--accent); }
.builder-pool .builder-games { flex-direction: column; }
.builder-pool .builder-game { width: 100%; }
@media (max-width: 900px) {
  .builder-layout { grid-template-columns: 1fr; }
  .builder-pool { position: sticky; top: 0; max-height: 220px; order: -1; }
}

/* ---------------- Results matrix ---------------- */
.matrix-table th, .matrix-table td { text-align: center; }
.matrix-table .matrix-team-head, .matrix-table .matrix-team { text-align: left; }
.matrix-table .matrix-team { min-width: 150px; font-weight: 700; }
.matrix-table .matrix-code { font-size: 10px; color: var(--muted); padding-left: 5px; padding-right: 5px; }
.matrix-table .matrix-diagonal { background: var(--panel-2); color: var(--muted); font-size: 9.5px; font-weight: 700; letter-spacing: .04em; }
.matrix-table .matrix-result { padding: 5px; }
.matrix-table .matrix-score { display: block; white-space: nowrap; font-size: 10.5px; color: var(--muted); }
.matrix-table .matrix-score b { display: inline-block; min-width: 12px; color: var(--text); }
.matrix-table .matrix-score.has-points b { color: var(--accent); }
.matrix-table .matrix-empty { color: var(--muted-2); }
.matrix-table .matrix-diff.is-plus { color: var(--green); }
.matrix-table .matrix-diff.is-minus { color: var(--red); }

/* ---------------- Feedback button ---------------- */
.feedback-fab {
  position: fixed; right: 18px; bottom: 18px; z-index: 60;
  display: inline-flex; align-items: center; gap: 7px;
  padding: 10px 14px; border-radius: 999px;
  background: var(--accent); color: #fff;
  font-size: 12px; font-weight: 700; text-decoration: none;
  box-shadow: 0 10px 26px rgba(16, 42, 67, .22);
}
.feedback-fab:hover { filter: brightness(1.06); }
.feedback-fab small { font-size: 9px; font-weight: 800; letter-spacing: .08em; opacity: .8; }
.feedback-fab-icon { display: inline-flex; }
@media (max-width: 700px) {
  .feedback-fab { left: 12px; right: auto; bottom: 76px; padding: 9px 12px; }
  .feedback-fab > span:not(.feedback-fab-icon) { display: none; }
  .feedback-fab small { display: none; }
}
@media print { .feedback-fab { display: none !important; } }

.builder-cell { position: relative; overflow: hidden; }
.builder-watermark {
  position: absolute; inset: 0; z-index: 0;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 1px; padding: 18px 2px 2px;
  color: var(--accent); opacity: .26; font-size: clamp(10px, 1.15vw, 15px);
  text-shadow: 0 1px 0 rgba(255,255,255,.35);
  font-weight: 900; line-height: 1.08; letter-spacing: .02em; text-align: center;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; pointer-events: none;
}
.builder-watermark > span { display: block; }
.builder-day, .builder-games { position: relative; z-index: 1; }

.feedback-list { display: flex; flex-direction: column; gap: 10px; }
.feedback-item { padding: 11px 12px; border: 1px solid var(--line); border-radius: 12px; background: var(--panel-2); }
.feedback-item.is-new { border-color: color-mix(in srgb, var(--accent) 45%, var(--line)); }
.feedback-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; font-size: 10.5px; color: var(--muted); }
.feedback-meta strong { color: var(--text); font-size: 11.5px; }
.feedback-item p { margin: 7px 0; font-size: 12.5px; line-height: 1.5; white-space: pre-wrap; }
.feedback-foot { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.feedback-foot .muted { font-size: 10px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }


/* ---------------- Mobile team hero ---------------- */
@media (max-width: 760px) {
  .team-hero {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    align-items: start;
    gap: 12px 14px;
    padding: 16px;
  }
  .team-hero > .team-badge { grid-column: 1; grid-row: 1; }
  .team-hero-info { grid-column: 2; grid-row: 1; min-width: 0; }
  .team-hero-info .row { flex-wrap: wrap; gap: 6px !important; }
  .team-hero-name { font-size: 24px; overflow-wrap: anywhere; }
  .team-hero-meta { display: flex; flex-direction: column; gap: 4px; margin-top: 8px; font-size: 11.5px; }
  .team-hero-meta span { white-space: normal; }
  .team-hero-stats {
    grid-column: 1 / -1; grid-row: 2;
    justify-content: space-between; gap: 6px;
    padding-top: 12px; border-top: 1px solid var(--line);
  }
  .team-hero-stat b { font-size: 19px; }
  .team-hero .page-actions { grid-column: 1 / -1; grid-row: 3; width: 100%; flex-wrap: wrap; }
  .team-hero .page-actions .btn { flex: 1 1 auto; }
}


/* ---------------- Print header and mobile game cards ---------------- */
.print-header { display: none; align-items: center; gap: 14px; padding: 0 0 14px; border-bottom: 2px solid #1f6fae; margin-bottom: 14px; }
.print-logo { width: 58px; height: 58px; object-fit: contain; flex: none; }
.print-title { flex: 1; min-width: 0; }
.print-title h1 { font-size: 20px; margin: 0; line-height: 1.15; color: #12384f; }
.print-title p { font-size: 11px; margin: 3px 0 0; color: #5d7085; }
.print-vk { display: inline-flex; align-items: center; gap: 6px; font-size: 10px; color: #1f6fae; text-decoration: none; white-space: nowrap; }
.vk-mark { display: inline-grid; place-items: center; width: 22px; height: 22px; border-radius: 6px; background: #1f6fae; color: #fff; font-size: 9px; font-weight: 800; letter-spacing: -.02em; }
@media (max-width: 700px) {
  .game-matchup { grid-template-columns: minmax(0, 1fr) 58px minmax(0, 1fr); gap: 4px; align-items: start; }
  .game-team { min-width: 0; gap: 4px; }
  .game-team .team-badge { width: 25px; height: 25px; font-size: 8px; }
  .game-team-name { max-width: 100%; font-size: 11.5px; }
  .game-center { min-width: 0; gap: 2px; }
  .game-center .pill { max-width: 100%; overflow: hidden; text-overflow: ellipsis; font-size: 7.5px; padding: 2px 3px; white-space: nowrap; }
  .game-score-nums { font-size: 16px; gap: 2px; }
  .game-score-vs { font-size: 10px; }
}
@media print {
  body.print-schedule .page-head { display: none !important; }
  body.print-schedule .print-header { display: flex !important; }
  body.print-schedule .content { padding: 0 !important; }
  body.print-schedule .game-day { break-inside: auto; }
  body.print-schedule .game-card { break-inside: avoid; }
  body.print-schedule .print-header { break-after: avoid; }
}

.builder-game.is-locked { opacity: .55; cursor: not-allowed; }

.builder-time { font-size: 9px; color: var(--muted); white-space: nowrap; }

.presence { display: inline-flex; align-items: center; gap: 5px; font-size: 11px; white-space: nowrap; }
.presence-dot { width: 7px; height: 7px; border-radius: 50%; background: #94a3b8; box-shadow: 0 0 0 2px color-mix(in srgb, #94a3b8 15%, transparent); }
.presence.is-online { color: var(--green, #22c55e); }
.presence.is-online .presence-dot { background: var(--green, #22c55e); box-shadow: 0 0 0 2px color-mix(in srgb, #22c55e 18%, transparent); }
.presence.is-offline { color: var(--muted); }
.user-warning { display: inline-grid; place-items: center; color: var(--amber); vertical-align: middle; }
.user-sort { min-width: 160px; }

.schedule-team-filter { min-width: 180px; }
@media (max-width: 700px) { .schedule-team-filter { min-width: 0; width: 100%; } }

/* ---------------- Diagnostics ---------------- */
.diag-big { display: flex; align-items: baseline; gap: 9px; padding: 6px 0 12px; }
.diag-big b { font-size: 38px; line-height: 1; font-variant-numeric: tabular-nums; }
.diag-big span { color: var(--muted); font-size: 11px; }
.diag-samples { margin-top: 10px; }
.diag-sample { display: grid; grid-template-columns: 28px 70px 1fr; gap: 8px; align-items: center; padding: 4px 0; border-top: 1px dashed var(--line); font-size: 11px; }
.diag-sample b { font-variant-numeric: tabular-nums; }
.diag-sample.ok { color: var(--green, #22c55e); }
.diag-sample.bad { color: var(--red, #ef4444); }
.diag-backups { max-height: 180px; overflow: auto; }

.diag-stats { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 8px; }
.diag-stats > div { padding: 8px; border: 1px solid var(--line); border-radius: 10px; background: var(--panel-2); }
.diag-stats b { display: block; font-size: 20px; line-height: 1.1; font-variant-numeric: tabular-nums; }
.diag-stats span { display: block; margin-top: 3px; color: var(--muted); font-size: 9.5px; line-height: 1.25; }
.diag-chart { display: flex; align-items: end; justify-content: space-between; gap: 6px; height: 126px; margin-top: 14px; padding-top: 8px; border-bottom: 1px solid var(--line); }
.diag-bar { display: flex; flex: 1; flex-direction: column; align-items: center; justify-content: end; gap: 3px; height: 100%; min-width: 0; }
.diag-bar span { display: block; width: 100%; max-width: 34px; border-radius: 4px 4px 0 0; background: linear-gradient(180deg, #74d0ed, #2aa7df); }
.diag-bar small { color: var(--muted); font-size: 8.5px; white-space: nowrap; }
.diag-bar b { color: var(--muted); font-size: 9.5px; font-weight: 700; }
@media (max-width: 700px) { .diag-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); } .diag-stats > div:last-child { grid-column: 1 / -1; } }

/* ---------------- History stats ---------------- */
.history-controls { display:flex; flex-wrap:wrap; gap:8px; align-items:center; margin:0 0 14px; }
.history-controls .input { flex:1 1 220px; min-height:36px; }
.history-controls .select { min-height:36px; }
.history-count { color:var(--muted); font-size:11px; white-space:nowrap; }
.history-scroll { width:100%; overflow:auto; max-height:calc(100vh - 250px); border:1px solid var(--line); border-radius:12px; background:var(--panel); }
.history-table { border-collapse:separate; border-spacing:0; min-width:max-content; width:100%; font-size:11px; }
.history-table th, .history-table td { border-right:1px solid var(--line); border-bottom:1px solid var(--line); padding:6px 7px; white-space:nowrap; }
.history-table thead th { position:sticky; z-index:4; background:var(--panel-2); color:var(--muted); font-weight:700; text-align:center; }
.history-table thead tr:first-child th { top:0; }
.history-table thead tr:nth-child(2) th { top:31px; }
.history-table th.history-player-head, .history-table th.history-team-head { text-align:left; }
.history-table .history-player { position:sticky; left:0; z-index:3; background:var(--panel); text-align:left; min-width:180px; max-width:260px; }
.history-table thead .history-player-head { left:0; z-index:6; min-width:180px; }
.history-table tbody tr:hover td { background:color-mix(in srgb, var(--accent) 5%, var(--panel)); }
.history-table .history-player b { color:var(--text); }
.history-table .history-num { text-align:center; font-variant-numeric:tabular-nums; min-width:30px; }
.history-table .history-total { background:rgba(74,159,224,.05); font-weight:700; }
.history-table .history-points { color:var(--accent); }
.history-table .history-year-head { background:color-mix(in srgb, var(--accent) 8%, var(--panel-2)); color:var(--text); }
.history-table .history-total-head { background:color-mix(in srgb, var(--accent) 12%, var(--panel-2)); color:var(--text); }
.history-sort { border:0; background:none; color:inherit; font:inherit; font-weight:700; cursor:pointer; padding:0; }
.history-sort.is-active { color:var(--accent); }
.history-sort:hover { color:var(--accent); }
.history-status { display:inline-block; margin-left:5px; padding:1px 4px; border-radius:4px; background:#fff4df; color:#96651b; font-size:8px; vertical-align:middle; }
.history-empty { text-align:center !important; color:var(--muted); padding:24px !important; }
.history-note { color:var(--muted); font-size:10.5px; margin-top:9px; }
@media (max-width:700px) {
  .history-controls .input, .history-controls .select { flex:1 1 100%; width:100%; }
  .history-table .history-player { min-width:140px; max-width:180px; }
    .history-table thead .history-player-head { min-width:130px; }
  }

.history-covid { display:flex; align-items:flex-start; gap:8px; margin:0 0 12px; padding:9px 12px; border-radius:10px; border:1px solid #ead39e; background:#fff8e7; color:#6f5318; font-size:11.5px; }
.history-table .history-year-head.is-alt { background:color-mix(in srgb, var(--accent) 5%, var(--panel-2)); }
.history-table .history-stat-head.is-alt { background:color-mix(in srgb, var(--accent) 4%, var(--panel-2)); }
.history-table .history-num.is-alt { background:color-mix(in srgb, var(--accent) 3.5%, var(--panel)); }

.history-table .history-player, .history-table .history-team { position:sticky; z-index:3; background:var(--panel); text-align:left; }
.history-table .history-player { left:0; min-width:180px; max-width:260px; }
.history-table .history-team { left:180px; min-width:150px; max-width:240px; color:var(--muted); font-size:10px; }
.history-table thead .history-player-head { left:0; z-index:6; min-width:180px; }
.history-table thead .history-team-head { left:180px; z-index:6; min-width:150px; }
@media (max-width:700px) {
  .history-table .history-player { min-width:140px; max-width:180px; }
  .history-table .history-team { left:140px; min-width:100px; max-width:140px; }
  .history-table thead .history-player-head { min-width:140px; }
  .history-table thead .history-team-head { left:140px; min-width:100px; }
}

.vk-side-link { display:flex; align-items:center; gap:8px; margin:0 0 10px; padding:7px 9px; border:1px solid var(--line); border-radius:8px; color:var(--muted); text-decoration:none; font-size:11px; font-weight:600; }
.vk-side-link:hover { color:var(--accent); border-color:color-mix(in srgb, var(--accent) 35%, var(--line)); }
.vk-top-link { padding:5px !important; }
.vk-top-link .vk-mark { width:22px; height:22px; font-size:8px; }
.vk-sheet-link { justify-content:flex-start; margin-bottom:2px; }
.vk-sheet-link .vk-mark { width:20px; height:20px; font-size:8px; }
.login-vk { display:inline-flex; align-items:center; gap:7px; margin-top:14px; color:var(--muted); font-size:12px; text-decoration:none; }
.login-vk:hover { color:var(--accent); }
.login-vk .vk-mark { width:21px; height:21px; font-size:8px; }
