/* ============================================================
   scout-new — дизайн-система админки (ds.css)
   ------------------------------------------------------------
   ИСТОЧНИК: прототип `prototype/scout/styles.css` (4229 стр.).
   Перенесено ~40%: только то, что нужно админке. Выкинуто легаси
   прототипа отчётов (LOGIN/GENERATE CARD/AUTOBOOK/TOURNAMENTS GRID/
   HOME GRID/OFFLINE DEMO/CHAT/LANGUAGE SELECTOR), оболочка book
   (APP SHELL/DIVISION RAIL/FILTER BAR) и вся консоль матча
   (SCOREBOARD/MATCH GRID/MATCH CONTROL/SPORT VARIANTS/MOBILE).

   🔴 ПРОТОКОЛ ЭТОТ ФАЙЛ НЕ ПОДКЛЮЧАЕТ. У протокола своя дизайн-система —
   `public/protocol/grid-ds.css`, и она же является таблицей стилей
   протоколов (боулинг живёт в ней целиком, `.button-bet` общая для
   всех спортов). Эти два файла НЕ сводить и НЕ синхронизировать:
   правка здесь не должна доезжать до протоколов. См. Phase 11 (K-UI).

   ПОРЯДОК ПОДКЛЮЧЕНИЯ (как в прототипе, важен): components.css → ds.css.

   ТЕМА: светлая = дефолт (нет атрибута), тёмная = <html data-theme="dark">.
   Новое писать на семантических токенах, чтобы флипалось само:
     --bg-page --bg-card --surface-muted --input-bg --panel-border
     --text-primary/secondary/tertiary --border/-light --accent*
   ============================================================ */

/* ====== FONT — Inter (самохостинг: без внешнего CDN в рантайме) ====== */

/* cyrillic-ext */
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url(../fonts/inter-cyrillic-ext-400.woff2) format('woff2');
  unicode-range: U+0460-052F, U+1C80-1C8A, U+20B4, U+2DE0-2DFF, U+A640-A69F, U+FE2E-FE2F;
}
/* cyrillic */
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url(../fonts/inter-cyrillic-400.woff2) format('woff2');
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
/* latin-ext */
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url(../fonts/inter-latin-ext-400.woff2) format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
/* latin */
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url(../fonts/inter-latin-400.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
/* cyrillic-ext */
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url(../fonts/inter-cyrillic-ext-500.woff2) format('woff2');
  unicode-range: U+0460-052F, U+1C80-1C8A, U+20B4, U+2DE0-2DFF, U+A640-A69F, U+FE2E-FE2F;
}
/* cyrillic */
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url(../fonts/inter-cyrillic-500.woff2) format('woff2');
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
/* latin-ext */
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url(../fonts/inter-latin-ext-500.woff2) format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
/* latin */
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url(../fonts/inter-latin-500.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
/* cyrillic-ext */
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url(../fonts/inter-cyrillic-ext-600.woff2) format('woff2');
  unicode-range: U+0460-052F, U+1C80-1C8A, U+20B4, U+2DE0-2DFF, U+A640-A69F, U+FE2E-FE2F;
}
/* cyrillic */
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url(../fonts/inter-cyrillic-600.woff2) format('woff2');
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
/* latin-ext */
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url(../fonts/inter-latin-ext-600.woff2) format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
/* latin */
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url(../fonts/inter-latin-600.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
/* cyrillic-ext */
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url(../fonts/inter-cyrillic-ext-700.woff2) format('woff2');
  unicode-range: U+0460-052F, U+1C80-1C8A, U+20B4, U+2DE0-2DFF, U+A640-A69F, U+FE2E-FE2F;
}
/* cyrillic */
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url(../fonts/inter-cyrillic-700.woff2) format('woff2');
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
/* latin-ext */
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url(../fonts/inter-latin-ext-700.woff2) format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
/* latin */
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url(../fonts/inter-latin-700.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
/* cyrillic-ext */
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 800;
  font-display: swap;
  src: url(../fonts/inter-cyrillic-ext-800.woff2) format('woff2');
  unicode-range: U+0460-052F, U+1C80-1C8A, U+20B4, U+2DE0-2DFF, U+A640-A69F, U+FE2E-FE2F;
}
/* cyrillic */
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 800;
  font-display: swap;
  src: url(../fonts/inter-cyrillic-800.woff2) format('woff2');
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
/* latin-ext */
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 800;
  font-display: swap;
  src: url(../fonts/inter-latin-ext-800.woff2) format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
/* latin */
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 800;
  font-display: swap;
  src: url(../fonts/inter-latin-800.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}


/* ============ RESET + TOKENS (прототип 1-103) ============ */

/* ====== RESET & VARIABLES ====== */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

:root {
  /* Neutrals */
  --bg-primary: #0c1a2a;
  --bg-secondary: #0f2035;
  --bg-tertiary: #142840;
  --bg-surface: #17304d;
  --bg-surface-hover: #1d3a5a;
  --bg-page: #f0f2f7;
  --bg-card: #ffffff;

  /* Accents */
  --accent: #1e3a5f;
  --accent-hover: #2d5a8e;
  --accent-light: #3a7bc8;
  --accent-muted: rgba(30, 58, 95, 0.10);
  --accent-glow: rgba(30, 58, 95, 0.25);
  --green: #22c55e;
  --green-hover: #16a34a;
  --green-muted: rgba(34, 197, 94, 0.12);
  --red: #ef4444;
  --red-hover: #dc2626;
  --red-muted: rgba(239, 68, 68, 0.08);

  /* Semantic action button (attention / delayed penalty) */
  --warn: #e6a14b;
  --warn-hover: #d28e3a;

  /* Info (cyan) — penalties / corners / removals / strikes */
  --info: #3f9fca;
  --info-hover: #348bb0;

  /* Console buttons — neutral tone in the scoreboard's navy family */
  --btn-neutral: #4f688c;
  --btn-neutral-hover: #3e5573;
  --btn-neutral-disabled-bg: rgba(30, 58, 95, 0.10);
  --btn-neutral-disabled-fg: var(--text-tertiary);

  /* Brand gradient (scoreboard, primary action) */
  --gradient-brand: linear-gradient(135deg, #1e3a5f 0%, #2d5a8e 100%);

  /* Text */
  --text-primary: #0f172a;
  --text-secondary: #64748b;
  --text-tertiary: #94a3b8;
  --text-inverse: #f8fafc;
  --text-sidebar: #cbd5e1;
  --text-sidebar-muted: #64748b;

  /* Borders */
  --border: #e2e8f0;
  --border-light: #f1f5f9;
  --border-dark: rgba(255,255,255,0.06);

  /* Shadows */
  --shadow-sm: 0 1px 2px rgba(0,0,0,0.04);
  --shadow-md: 0 4px 16px rgba(0,0,0,0.06);
  --shadow-lg: 0 12px 40px rgba(0,0,0,0.1);
  --shadow-card: 0 1px 3px rgba(0,0,0,0.04), 0 4px 12px rgba(0,0,0,0.03);

  /* Layout */
  --topbar-h: 64px;
  --radius: 10px;
  --radius-lg: 14px;
  --radius-sm: 8px;
  --radius-xl: 18px;

  /* Spacing scale */
  --space-1: 6px;
  --space-2: 8px;
  --space-3: 10px;
  --space-4: 14px;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background: var(--bg-page);
  color: var(--text-primary);
  min-height: 100vh;
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

/* Brand logo (img) — sizes shared across all surfaces */
.brand-img { display: block; object-fit: contain; flex-shrink: 0; }
.brand-img-xs { width: 26px; height: 26px; }
.brand-img-sm { width: 52px; height: 52px; }
.brand-img-md { width: 46px; height: 46px; }
.brand-img-lg { width: 84px; height: 84px; }

/* Tooltips moved to components.css (.sys-tooltip + tooltip.js).
   Hover on any [data-tip] element shows a body-level tooltip that
   is never clipped by parent overflow. */

.hidden { display: none !important; }


/* ============ BUTTONS (прототип 259-313) ============ */

/* ====== BUTTONS ====== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: none;
  border-radius: var(--radius);
  font-size: 16px;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  padding: 12px 23px;
  transition: all 0.2s;
  white-space: nowrap;
}
.btn-primary {
  background: var(--accent);
  color: #fff;
}
.btn-primary:hover {
  background: var(--accent-hover);
  box-shadow: 0 4px 16px var(--accent-glow);
}
.btn-accent {
  background: linear-gradient(135deg, #1e3a5f 0%, #2d5a8e 100%);
  color: #fff;
  box-shadow: 0 2px 8px var(--accent-glow);
}
.btn-accent:hover {
  box-shadow: 0 6px 24px var(--accent-glow);
  transform: translateY(-1px);
}
.btn-accent:active {
  transform: translateY(0);
}
.btn-accent:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}
.btn-ghost {
  background: transparent;
  color: var(--text-secondary);
  border: 1px solid var(--border);
}
.btn-ghost:hover {
  background: var(--border-light);
  color: var(--text-primary);
}
.btn-full { width: 100%; padding: 15px; font-size: 17px; }
.btn-lg { padding: 16px 37px; font-size: 17px; }
.btn-sm { padding: 8px 16px; font-size: 15px; border-radius: var(--radius-sm); }


/* ============ CONTENT / CARD / FILTER ROWS (прототип 424-493) ============ */

/* ====== CONTENT ====== */
.content {
  padding: 28px 32px 48px;
  max-width: 1040px;
  margin: 0 auto;
}

/* ====== CARD ====== */
.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card);
  overflow: hidden;
}
.card + .card {
  margin-top: 20px;
}

.card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 28px;
  border-bottom: 1px solid var(--border-light);
  background: linear-gradient(180deg, #fafbfe 0%, #fff 100%);
}
.card-header-left {
  display: flex;
  align-items: center;
  gap: 10px;
}
.card-header-left svg {
  color: var(--accent);
}
.card-header h2 {
  font-size: 17px;
  font-weight: 700;
  color: var(--text-primary);
  letter-spacing: -0.2px;
}

.card-body {
  padding: 24px 28px 28px;
}

/* ====== FILTER ROWS ====== */
.filter-row {
  margin-bottom: 28px;
}
.filter-row:last-child {
  margin-bottom: 0;
}

.filter-label-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}
.filter-label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 15px;
  font-weight: 600;
  color: var(--text-primary);
  letter-spacing: -0.1px;
}


/* ============ CALENDAR POPOVER + SEARCH INPUT (прототип 1162-1304) ============ */

/* ====== CUSTOM CALENDAR POPOVER ====== */
.calendar-popover {
  position: absolute;
  top: calc(100% + 8px);
  left: 50%;
  transform: translateX(-50%);
  width: 286px;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 14px;
  box-shadow: var(--shadow-lg);
  padding: 14px;
  z-index: 9500;              /* above modal-backdrop (9000) so date pills work inside modals */
  animation: calIn 0.16s ease;
}
@keyframes calIn {
  from { opacity: 0; transform: translateX(-50%) translateY(-6px); }
  to   { opacity: 1; transform: translateX(-50%) translateY(0); }
}
.calendar-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}
.cal-title {
  font-size: 16px;
  font-weight: 700;
  color: var(--text-primary);
}
.cal-nav {
  width: 30px;
  height: 30px;
  border: 1px solid var(--border);
  background: #fff;
  border-radius: 8px;
  cursor: pointer;
  color: var(--text-secondary);
  font-size: 18.5px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: inherit;
  transition: all 0.15s;
}
.cal-nav:hover { background: var(--accent); color: #fff; border-color: var(--accent); }
.calendar-weekdays {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 2px;
  margin-bottom: 6px;
}
.calendar-weekdays span {
  text-align: center;
  font-size: 12.5px;
  font-weight: 700;
  color: var(--text-tertiary);
  padding: 4px 0;
  text-transform: uppercase;
}
.calendar-weekdays span.weekend { color: var(--red); }
.calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 2px;
}
.cal-day {
  height: 34px;
  border: none;
  background: transparent;
  border-radius: 8px;
  cursor: pointer;
  font-size: 15px;
  font-weight: 600;
  color: var(--text-primary);
  font-family: inherit;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.12s;
}
.cal-day.empty { visibility: hidden; pointer-events: none; }
.cal-day:hover { background: var(--accent-muted); }
.cal-day.weekend { color: var(--red); }
.cal-day.today { box-shadow: inset 0 0 0 1.5px var(--accent); }
.cal-day.selected {
  background: linear-gradient(135deg, #1e3a5f, #2d5a8e);
  color: #fff !important;
  box-shadow: 0 2px 8px var(--accent-glow);
}
.calendar-footer {
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid var(--border-light);
  display: flex;
  justify-content: center;
}
.cal-today-btn {
  background: var(--accent-muted);
  color: var(--accent);
  border: none;
  border-radius: 8px;
  padding: 7px 18px;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  font-family: inherit;
  transition: all 0.15s;
}
.cal-today-btn:hover { background: var(--accent); color: #fff; }

/* Search bar */
.search-input {
  position: relative;
  display: inline-flex;
  align-items: center;
}
.search-input input {
  padding: 10px 38px 10px 16px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--border-light);
  font-size: 15px;
  font-family: inherit;
  color: var(--text-primary);
  width: 250px;
  outline: none;
  transition: all 0.15s;
}
.search-input input:focus {
  border-color: var(--accent);
  background: #fff;
  box-shadow: 0 0 0 3px var(--accent-muted);
}
.search-input svg {
  position: absolute;
  right: 12px;
  width: 14px;
  height: 14px;
  color: var(--text-tertiary);
  pointer-events: none;
}


/* ============ DATA TABLE (прототип 1305-1439) ============ */

/* ====== DATA TABLE ====== */
.data-table-wrap {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 14px;
  overflow: hidden;
  box-shadow: var(--shadow-card);
}
.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 15px;
}
.data-table thead th {
  text-align: center;
  padding: 14px 16px;
  background: linear-gradient(180deg, #fafbfe 0%, #f3f6fb 100%);
  border-bottom: 1px solid var(--border);
  font-size: 14px;
  font-weight: 700;
  color: var(--text-secondary);
  text-transform: none;
  letter-spacing: 0;
  white-space: nowrap;
}
/* Sortable column headers — works on any th.sortable in data-table / report-table */
th.sortable {
  cursor: pointer;
  user-select: none;
  transition: color 0.15s;
}
th.sortable::after {
  content: '⇅';
  display: inline-block;
  margin-left: 6px;
  font-size: 12.5px;
  color: var(--text-tertiary);
  opacity: 0.4;
  font-weight: 400;
  transition: opacity 0.15s, color 0.15s;
  vertical-align: 0;
}
th.sortable:hover { color: var(--accent); }
th.sortable:hover::after { opacity: 0.85; color: var(--accent); }
th.sortable.sort-asc,
th.sortable.sort-desc { color: var(--accent); }
th.sortable.sort-asc::after,
th.sortable.sort-desc::after {
  opacity: 1;
  color: var(--accent);
  font-size: 15px;
  font-weight: 700;
}
th.sortable.sort-asc::after { content: '↑'; }
th.sortable.sort-desc::after { content: '↓'; }
.data-table tbody td {
  padding: 13px 16px;
  border-bottom: 1px solid var(--border-light);
  color: var(--text-primary);
  vertical-align: middle;
  text-align: center;
}
.data-table tbody tr:hover { background: var(--border-light); }
.data-table tbody tr:last-child td { border-bottom: none; }
.data-table .col-num { font-variant-numeric: tabular-nums; }

/* Thin vertical column dividers — subtle grid lines for readability (all tables) */
.data-table th:not(:last-child),
.data-table td:not(:last-child),
.report-table th:not(:last-child),
.report-table td:not(:last-child),
.settings-table th:not(:last-child),
.settings-table td:not(:last-child),
.match-table th:not(:last-child),
.match-table td:not(:last-child),
.admin-table th:not(:last-child),
.admin-table td:not(:last-child) {
  border-right: 1px solid var(--border-light);
}

.cell-time { font-weight: 700; color: var(--text-primary); font-variant-numeric: tabular-nums; }
.cell-id { color: var(--text-tertiary); font-variant-numeric: tabular-nums; font-size: 14px; }
.cell-event { font-weight: 600; color: var(--text-primary); }

.score-cell {
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.5px;
}
.score-win  { color: var(--green); }
.score-lose { color: var(--text-primary); }
.score-dash { color: var(--text-tertiary); margin: 0 4px; }
.score-neutral { color: var(--text-primary); }

.cell-checkbox {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}
.cell-checkbox input {
  width: 18px;
  height: 18px;
  accent-color: var(--accent);
  cursor: pointer;
}

.col-info-icon {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-weight: 700;
}
.info-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--border-light);
  border: 1px solid var(--border);
  color: var(--text-secondary);
  cursor: help;
  transition: all 0.15s;
}
.info-badge:hover {
  background: var(--border);
  color: var(--text-primary);
}
.info-badge svg {
  width: 14px;
  height: 14px;
}


/* ============ STATUS PILLS (прототип 1440-1526) ============ */

/* ====== STATUS PILLS ====== */
.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 12.5px;
  font-weight: 700;
  letter-spacing: 0.3px;
  text-transform: uppercase;
  white-space: nowrap;
}
.status-finished {
  background: rgba(34,197,94,0.12);
  color: #16a34a;
}
/* Live — в одном дизайне с .status-finished: приглушённая плашка + насыщенный
   текст (была сплошная красная заливка с белым текстом — выбивалась из ряда). */
.status-live {
  background: rgba(239,68,68,0.12);
  color: #b91c1c;
}
.status-live::before {
  content: '';
  width: 6px;
  height: 6px;
  background: currentColor;      /* точка в цвет текста — как в остальных статусах */
  border-radius: 50%;
  animation: pulse 1.2s ease-in-out infinite;
}
/* ⚠️ Кейфреймы pulse потерялись при переносе прототипа: animation ссылалась на
   несуществующее имя, поэтому кружок Live не мигал вовсе. */
@keyframes pulse {
  0%, 100% { opacity: 1;   transform: scale(1); }
  50%      { opacity: 0.3; transform: scale(0.75); }
}
@media (prefers-reduced-motion: reduce) {
  .status-live::before { animation: none; }
}
.status-not-started {
  background: var(--border-light);
  color: var(--text-secondary);
}
.status-canceled {
  background: rgba(239,68,68,0.12);
  color: var(--red);
}
.status-finished-block {
  background: rgba(34,197,94,0.12);
  color: #16a34a;
  border: 1px solid rgba(34,197,94,0.3);
}

/* Mute/sound icon button */
.icon-btn {
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 5px;
  color: var(--text-tertiary);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 6px;
  transition: all 0.15s;
}
.icon-btn:hover { background: var(--border-light); color: var(--accent); }
.icon-btn.on { color: var(--accent); }
.icon-btn.off { color: var(--text-tertiary); }

/* TV icon — small badge */
.tv-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 22px;
  border: 1.5px solid var(--text-tertiary);
  border-radius: 4px;
  font-size: 10.5px;
  font-weight: 800;
  color: var(--text-tertiary);
  letter-spacing: 0.3px;
}
.tv-icon.active { border-color: var(--accent); color: var(--accent); }

/* Scout indicator — single round dot or letter */
.scout-dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--text-tertiary);
}
.scout-dot.online { background: var(--green); }
.scout-dot.offline { background: var(--red); }


/* ============ SCROLLBAR (прототип 1527-1546) ============ */

/* ====== SCROLLBAR — глобально, в тон темы ======
   Скроллы админки красятся везде, а не только на .custom-scroll: нативный
   скроллбар в тёмной теме рисуется светлым и выбивается из стилистики.

   Токены --scroll-* флипаются вместе с темой (см. блок токенов ниже).
   Прозрачный бордер + background-clip: padding-box вместо бордера в цвет фона —
   thumb так вписывается в ЛЮБУЮ поверхность (page/card/input), а не в одну.

   Протокол сюда не заезжает: у него свой grid-ds.css с теми же значениями. */
* {
  scrollbar-width: auto;
  scrollbar-color: var(--scroll-thumb) var(--scroll-track);
}
::-webkit-scrollbar { width: 15px; height: 15px; }
::-webkit-scrollbar-track { background: var(--scroll-track); }
::-webkit-scrollbar-thumb {
  background: var(--scroll-thumb);
  border-radius: 4px;
  border: 2px solid transparent;
  background-clip: padding-box;
}
::-webkit-scrollbar-thumb:hover { background: var(--scroll-thumb-hover); background-clip: padding-box; }
::-webkit-scrollbar-corner { background: transparent; }

/* ====== CUSTOM SCROLLBAR — вариант с видимым треком ======
   Для чеклистов/таблиц, где важно показать саму дорожку (граница области скролла). */
.custom-scroll {
  scrollbar-color: var(--scroll-thumb) var(--border-light);
}
.custom-scroll::-webkit-scrollbar { width: 10px; height: 10px; }
.custom-scroll::-webkit-scrollbar-track {
  background: var(--border-light);
  border-radius: 999px;
  margin: 4px 0;
}
.custom-scroll::-webkit-scrollbar-thumb {
  background: var(--scroll-thumb);
  border-radius: 999px;
  border: 2px solid transparent;
  background-clip: padding-box;
}
.custom-scroll::-webkit-scrollbar-thumb:hover {
  background: var(--scroll-thumb-hover);
  background-clip: padding-box;
}


/* ============ SETTINGS GRID (switch / segmented) (прототип 1855-1995) ============ */

/* ====== SETTINGS GRID ====== */
.settings-grid {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 20px;
  margin-bottom: 24px;
  align-items: start; /* keep each card at its own natural height — Autobook can grow, siblings stay */
}
.settings-card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 22px;
  box-shadow: var(--shadow-card);
  min-width: 0;
}
.settings-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
  font-size: 16px;
  font-weight: 700;
  color: var(--text-primary);
}
.settings-card-header:only-child { margin-bottom: 0; }
.settings-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 15px;
}
.settings-table thead th {
  text-align: left;
  padding: 10px 0;
  font-size: 12.5px;
  font-weight: 700;
  color: var(--text-tertiary);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  border-bottom: 1px solid var(--border-light);
}
.settings-table thead th.col-center { text-align: center; }
.settings-table tbody td {
  padding: 10px 0;
  border-bottom: 1px solid var(--border-light);
  color: var(--text-primary);
  vertical-align: middle;
}
.settings-table tbody tr:last-child td { border-bottom: none; }
.settings-table .col-center { text-align: center; }
.settings-table .col-right { text-align: right; }

/* Segmented toggle (Русский / English, Нет / Да) */
.segmented {
  display: inline-flex;
  background: var(--border-light);
  border-radius: 999px;
  padding: 3px;
  gap: 2px;
}
.segmented input { display: none; }
.segmented label {
  padding: 5px 14px;
  font-size: 14px;
  font-weight: 600;
  color: var(--text-secondary);
  border-radius: 999px;
  cursor: pointer;
  transition: all 0.15s;
  user-select: none;
}
.segmented input:checked + label {
  background: var(--accent);
  color: #fff;
  box-shadow: 0 1px 4px var(--accent-glow);
}
.segmented.danger input:checked[value="no"] + label {
  background: #c1392c;
}

/* Small switch (Вкл/выкл per row) */
.switch {
  position: relative;
  display: inline-block;
  width: 38px;
  height: 22px;
  flex-shrink: 0;
}
.switch input { display: none; }
.switch-slider {
  position: absolute;
  inset: 0;
  background: var(--border);
  border-radius: 11px;
  cursor: pointer;
  transition: background 0.2s;
}
.switch-slider::after {
  content: '';
  position: absolute;
  left: 3px;
  top: 3px;
  width: 16px;
  height: 16px;
  background: #fff;
  border-radius: 50%;
  transition: transform 0.2s;
  box-shadow: 0 1px 3px rgba(0,0,0,0.15);
}
.switch input:checked + .switch-slider { background: var(--accent); }
.switch input:checked + .switch-slider::after { transform: translateX(16px); }

.row-with-switch {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  justify-content: flex-end;
  width: 100%;
}
.chevron-mini {
  color: var(--text-tertiary);
  width: 14px;
  height: 14px;
}

.settings-actions {
  display: flex;
  justify-content: flex-start;
  position: sticky;
  bottom: 16px;
  z-index: 10;
  padding: 14px 16px;
  background: rgba(240, 242, 247, 0.88);
  backdrop-filter: blur(10px);
  border-radius: 14px;
  border: 1px solid rgba(16,24,40,0.06);
  box-shadow: 0 -2px 12px rgba(16,24,40,0.04), 0 12px 28px -10px rgba(16,24,40,0.18);
  margin-top: 8px;
}


/* ============ SCOUT SHELL — header / user / stats / tiles / match-table (прототип 2226-2584) ============ */

/* ====== SCOUT — PUBLIC EVENTS PAGE ====== */
.scout-page {
  min-height: 100vh;
  background:
    radial-gradient(1100px 360px at 50% -160px, rgba(45,90,142,0.14), transparent 70%),
    linear-gradient(180deg, #eceff5 0%, #f4f6fa 38%);
}
/* 🔴 Шапка (.scout-header / .scout-brand / .scout-nav / .user-chip / .user-logout
   и т.д.) переехала в public/css/header.css — он общий с протоколом, который ds.css не
   подключает. Правки шапки — только там, иначе копии снова разъедутся. */

/* Контент на всю ширину экрана: по бокам ровно 40px, без внешнего max-width.
   Ограничителя ширины намеренно нет — на широком мониторе админка занимает
   весь экран (прямое требование пользователя 2026-07-17). */
.scout-content {
  padding: 28px 40px 52px;
  margin: 0 auto;
}

/* Page heading */
.scout-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 22px;
}
.scout-heading h1 {
  font-size: 32px;
  font-weight: 800;
  color: var(--text-primary);
  letter-spacing: -0.7px;
  line-height: 1.05;
}
.scout-heading p {
  font-size: 15px;
  color: var(--text-secondary);
  margin-top: 3px;
}

/* Summary stat strip */
.scout-stats {
  display: flex;
  gap: 12px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}
.scout-stat {
  display: flex;
  align-items: center;
  gap: 12px;
  background: #fff;
  border: 1px solid rgba(16,24,40,0.06);
  border-radius: 14px;
  padding: 13px 18px;
  box-shadow: 0 1px 2px rgba(16,24,40,0.04), 0 12px 26px -16px rgba(16,24,40,0.22);
  transition: transform 0.2s, box-shadow 0.2s;
}
.scout-stat:hover {
  transform: translateY(-2px);
  box-shadow: 0 1px 2px rgba(16,24,40,0.05), 0 18px 32px -18px rgba(16,24,40,0.3);
}
.scout-stat-ico {
  width: 38px;
  height: 38px;
  border-radius: 11px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.3), 0 4px 10px -3px rgba(16,24,40,0.4);
}
.scout-stat-ico.green { background: linear-gradient(135deg, #22c55e, #15994b); }
.scout-stat-ico.red   { background: linear-gradient(135deg, #f05252, #d83a3a); }
.scout-stat-ico.navy  { background: linear-gradient(135deg, #3a7bc8, #2d5a8e); }
.scout-stat-num { font-size: 20.5px; font-weight: 800; color: var(--text-primary); line-height: 1.1; letter-spacing: -0.3px; }
.scout-stat-label { font-size: 12.5px; color: var(--text-tertiary); font-weight: 600; }

/* Tour tiles — compact cards in a row */
.tour-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(132px, 1fr));
  gap: 10px;
  margin-bottom: 20px;
}
.tour-tile {
  background: #fff;
  border: 1px solid rgba(16,24,40,0.06);
  border-radius: 16px;
  box-shadow: 0 1px 2px rgba(16,24,40,0.04), 0 14px 30px -16px rgba(16,24,40,0.2);
  cursor: pointer;
  display: flex;
  flex-direction: column;
  position: relative;
  transition: transform 0.25s cubic-bezier(0.4,0,0.2,1), box-shadow 0.25s cubic-bezier(0.4,0,0.2,1), border-color 0.25s;
}
.tour-tile:hover {
  transform: translateY(-4px);
  box-shadow: 0 1px 2px rgba(16,24,40,0.05), 0 26px 44px -20px rgba(30,58,95,0.42);
}
.tour-tile.active {
  border-color: transparent;
  box-shadow: 0 0 0 2px var(--accent), 0 24px 46px -18px rgba(30,58,95,0.45);
}
.tour-tile.active::after {
  content: '';
  position: absolute;
  bottom: -8px;
  left: 50%;
  transform: translateX(-50%) rotate(45deg);
  width: 14px;
  height: 14px;
  background: #fff;
  border-right: 2px solid var(--accent);
  border-bottom: 2px solid var(--accent);
  border-radius: 0 0 3px 0;
}
.tour-tile-head {
  position: relative;
  overflow: hidden;
  border-radius: 16px 16px 0 0;
  background: linear-gradient(135deg, #16304f 0%, #234468 100%);
  color: #fff;
  font-size: 28.5px;
  font-weight: 800;
  letter-spacing: 0.8px;
  line-height: 1;
  padding: 18px 10px;
  text-align: center;
  text-shadow: 0 1px 2px rgba(0,0,0,0.22);
}
.tour-tile-body {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 14px 12px 16px;
  border-radius: 0 0 16px 16px;
  background: #fff;
}
.tour-tile-date {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-primary);
}
.tour-tile-count {
  font-size: 13px;
  color: var(--text-tertiary);
  font-weight: 600;
}
.tour-tile .status-pill { font-size: 11px; padding: 3px 9px; }

/* Selected tour detail */
.tour-detail {
  background: #fff;
  border: 1px solid rgba(16,24,40,0.06);
  border-radius: 16px;
  box-shadow: 0 1px 2px rgba(16,24,40,0.04), 0 20px 44px -22px rgba(16,24,40,0.24);
  overflow: hidden;
}
.tour-detail-head {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 18px 22px;
  border-bottom: 1px solid var(--border-light);
  background: linear-gradient(180deg, #fbfcfe 0%, #ffffff 100%);
}
.tour-detail-badge {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-width: 52px;
  padding: 8px 10px;
  border-radius: 12px;
  background: linear-gradient(135deg, #21436b, #2d5a8e);
  color: #fff;
  flex-shrink: 0;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.22), 0 6px 14px -6px rgba(30,58,95,0.6);
}
.tour-detail-badge small { font-size: 10.5px; font-weight: 700; letter-spacing: 1px; opacity: 0.8; }
.tour-detail-badge b { font-size: 20.5px; font-weight: 800; line-height: 1; }
.tour-detail-title { font-size: 19.5px; font-weight: 800; color: var(--text-primary); letter-spacing: -0.3px; }
.tour-detail-sub {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14.5px;
  color: var(--text-secondary);
  margin-top: 3px;
}
.tour-detail-head .tour-edit { margin-left: auto; }

.tour-edit {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 15px;
  font-weight: 600;
  color: var(--accent);
  background: var(--accent-muted);
  border: 1px solid rgba(30,58,95,0.12);
  padding: 8px 16px;
  border-radius: 10px;
  text-decoration: none;
  cursor: pointer;
  flex-shrink: 0;
  transition: all 0.2s cubic-bezier(0.4,0,0.2,1);
}
.tour-edit:hover {
  background: linear-gradient(135deg, #1e3a5f, #2d5a8e);
  color: #fff;
  border-color: transparent;
  box-shadow: 0 8px 18px -6px rgba(30,58,95,0.55);
}
.tour-edit svg { width: 14px; height: 14px; }

.match-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 15px;
}
.match-table thead th {
  text-align: center;
  padding: 12px 18px;
  font-size: 12px;
  font-weight: 700;
  color: var(--text-tertiary);
  text-transform: uppercase;
  letter-spacing: 0.6px;
  background: #fafbfd;
  border-bottom: 1px solid var(--border-light);
}
.match-table tbody td {
  padding: 13px 18px;
  border-bottom: 1px solid var(--border-light);
  text-align: center;
  color: var(--text-primary);
  vertical-align: middle;
}
.match-table tbody tr:last-child td { border-bottom: none; }
.match-table tbody tr { transition: background 0.15s; }
.match-table tbody tr:hover { background: linear-gradient(90deg, rgba(45,90,142,0.05), rgba(45,90,142,0.02)); }
.mt-time {
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  color: var(--text-secondary);
  background: var(--border-light);
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 14px;
}
.mt-home { text-align: right; }
.mt-away { text-align: left; }
.mt-team { font-weight: 700; font-size: 15.5px; color: var(--text-primary); }

.mt-score {
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  font-size: 19.5px;
  white-space: nowrap;
  letter-spacing: 0.5px;
}
.mt-score .score-dash { font-weight: 600; }


/* ============ SCOUT ADMIN — core (прототип 2585-2994) ============ */

/* ====== SCOUT ADMIN (modern, system style — compact) ====== */
.admin-content {
  padding-top: 18px;
  padding-bottom: 80px;  /* leave room for sticky action bar */
  max-width: 1280px;
}
.admin-page-head {
  margin-bottom: 14px;
}
.admin-breadcrumb {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-tertiary);
  margin-bottom: 6px;
}
.admin-breadcrumb a {
  color: var(--accent);
  text-decoration: none;
  transition: color 0.15s;
}
.admin-breadcrumb a:hover { color: var(--accent-hover); text-decoration: underline; }
.admin-breadcrumb .bc-sep { color: var(--text-tertiary); }
.admin-breadcrumb .bc-current { color: var(--text-primary); }

.admin-title-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}
.admin-title {
  font-size: 25.5px;
  font-weight: 800;
  color: var(--text-primary);
  letter-spacing: -0.5px;
  line-height: 1.15;
}
.admin-meta {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
  margin-top: 7px;
}
.admin-meta-chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: #fff;
  border: 1px solid rgba(16,24,40,0.06);
  border-radius: 999px;
  padding: 4px 10px;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-secondary);
  box-shadow: 0 1px 2px rgba(16,24,40,0.04);
}
.admin-meta-chip svg { color: var(--accent); flex-shrink: 0; }

/* Admin card — section wrapper */
.admin-card {
  background: #fff;
  border: 1px solid rgba(16,24,40,0.06);
  border-radius: 14px;
  box-shadow: 0 1px 2px rgba(16,24,40,0.04), 0 10px 24px -16px rgba(16,24,40,0.16);
  margin-bottom: 12px;
  overflow: hidden;
}
.admin-card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 18px;
  border-bottom: 1px solid var(--border-light);
  background: linear-gradient(180deg, #fbfcfe 0%, #ffffff 100%);
}
.admin-card-title {
  font-size: 16px;
  font-weight: 800;
  color: var(--text-primary);
  letter-spacing: -0.2px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.admin-card-sub {
  font-size: 13px;
  color: var(--text-tertiary);
  margin-top: 3px;
  font-weight: 500;
}
.admin-card-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}
.admin-count-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 24px;
  height: 22px;
  padding: 0 8px;
  background: var(--accent-muted);
  color: var(--accent);
  font-size: 12.5px;
  font-weight: 800;
  border-radius: 999px;
  font-variant-numeric: tabular-nums;
}

/* Form grid */
.admin-form-grid {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 10px 14px;
  padding: 14px 18px 16px;
}
.admin-field {
  display: flex;
  flex-direction: column;
  gap: 5px;
  min-width: 0;
}
.admin-field-label {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 12.5px;
  font-weight: 700;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.admin-help {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--border-light);
  border: 1px solid var(--border);
  color: var(--text-tertiary);
  font-size: 11.5px;
  font-weight: 700;
  cursor: help;
  text-transform: none;
  transition: all 0.15s;
}
.admin-help:hover { background: var(--accent); color: #fff; border-color: var(--accent); }

.admin-input,
.admin-textarea,
.admin-select {
  width: 100%;
  padding: 9px 14px;
  border: 1px solid var(--border);
  border-radius: 9px;
  font-size: 15px;
  font-family: inherit;
  font-weight: 500;
  color: var(--text-primary);
  background: #fff;
  outline: none;
  transition: border-color 0.15s, box-shadow 0.15s;
  height: 42px;
}
.admin-input::placeholder, .admin-textarea::placeholder { color: var(--text-tertiary); font-weight: 400; }
.admin-input-mono { font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif; font-size: 14.5px; }
.admin-textarea {
  resize: vertical;
  min-height: 64px;
  height: 64px;
  padding: 10px 14px;
}
.admin-input:focus,
.admin-textarea:focus,
.admin-select:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-muted);
}

/* Date pill — replaces native <input type="date"> with system-styled calendar */
.date-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  padding: 9px 14px;
  border: 1px solid var(--border);
  border-radius: 9px;
  background: #fff;
  font-family: inherit;
  font-size: 15px;
  font-weight: 600;
  color: var(--text-primary);
  cursor: pointer;
  height: 42px;
  text-align: left;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.date-pill:hover { border-color: var(--accent-light); }
.date-pill.open,
.date-pill:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-muted);
  outline: none;
}
.date-pill .date-pill-icon { color: var(--accent); width: 14px; height: 14px; flex-shrink: 0; }
.date-pill .date-pill-value { font-variant-numeric: tabular-nums; flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.date-pill .date-pill-value.placeholder { color: var(--text-tertiary); font-weight: 400; }
.date-pill .date-pill-chev { color: var(--text-tertiary); width: 12px; height: 12px; flex-shrink: 0; }

/* Compact variant for table cells */
.date-pill.admin-cell-date-pill {
  height: 30px;
  padding: 5px 8px;
  gap: 6px;
  font-size: 14px;
  border-radius: 7px;
}
.date-pill.admin-cell-date-pill .date-pill-icon { width: 12px; height: 12px; }
.date-pill.admin-cell-date-pill .date-pill-chev { width: 10px; height: 10px; }

.admin-input-with-action {
  display: flex;
  align-items: stretch;
  gap: 6px;
}
.admin-input-with-action .admin-input { flex: 1; }
.admin-input-action {
  background: var(--accent-muted);
  border: 1px solid transparent;
  border-radius: 9px;
  cursor: pointer;
  padding: 0 10px;
  color: var(--accent);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: inherit;
  transition: all 0.15s;
}
.admin-input-action:hover { background: var(--accent); color: #fff; }

.admin-segmented { align-self: flex-start; }

/* Span helpers */
.span-2  { grid-column: span 2; }
.span-3  { grid-column: span 3; }
.span-4  { grid-column: span 4; }
.span-5  { grid-column: span 5; }
.span-6  { grid-column: span 6; }
.span-7  { grid-column: span 7; }
.span-8  { grid-column: span 8; }
.span-9  { grid-column: span 9; }
.span-12 { grid-column: span 12; }

/* Admin matches table */
.admin-table-wrap {
  overflow-x: hidden;
}
.admin-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14.5px;
  table-layout: fixed;
}
.admin-table thead th {
  text-align: left;
  padding: 11px 10px;
  font-size: 11.5px;
  font-weight: 700;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.4px;
  background: #fafbfd;
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
  cursor: help;
}
.admin-table thead th.col-center { text-align: center; }
.admin-table thead th:first-child { padding-left: 16px; }
.admin-table thead th:last-child { padding-right: 16px; }
.admin-table tbody td {
  padding: 9px 10px;
  border-bottom: 1px solid var(--border-light);
  vertical-align: middle;
}
.admin-table tbody td:first-child { padding-left: 16px; }
.admin-table tbody td:last-child { padding-right: 16px; }
.admin-table tbody td.col-center { text-align: center; }
.admin-table tbody tr:last-child td { border-bottom: none; }
.admin-table tbody tr { transition: background 0.15s; }
.admin-table tbody tr:hover { background: rgba(45,90,142,0.04); }
.admin-row-num {
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  color: var(--text-tertiary);
  text-align: center;
}

.admin-cell-input {
  width: 100%;
  padding: 6px 9px;
  border: 1px solid var(--border);
  border-radius: 7px;
  font-size: 14px;
  font-family: inherit;
  color: var(--text-primary);
  background: #fff;
  outline: none;
  min-width: 0;
  height: 34px;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.admin-cell-input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 2px var(--accent-muted);
}
.admin-cell-input.admin-cell-score {
  width: 38px;
  min-width: 0;
  text-align: center;
  font-variant-numeric: tabular-nums;
  font-weight: 700;
  padding: 5px 4px;
}
.admin-cell-input.admin-cell-time { padding-left: 4px; padding-right: 4px; }
.admin-cell-input.admin-cell-date { padding-left: 4px; padding-right: 4px; }
.admin-cell-input.admin-cell-tc { font-variant-numeric: tabular-nums; }
.admin-team-select { min-width: 0; }

.admin-score-cell {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.admin-score-sep {
  font-weight: 700;
  color: var(--text-tertiary);
  font-size: 17px;
}

.admin-row-actions {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.admin-row-actions .icon-btn {
  width: 30px;
  height: 30px;
  border-radius: 8px;
  color: var(--text-tertiary);
}
.admin-row-actions .icon-btn:hover { background: var(--accent-muted); color: var(--accent); }
.admin-row-actions .icon-btn.icon-btn-danger:hover { background: rgba(239,68,68,0.12); color: var(--red); }

/* Sticky action bar at the bottom — compact.
   Ширина по содержимому, блок по центру вьюпорта: left/right:0 + margin auto
   центрируют fit-content-блок. max-width держит панель в тех же боковых
   отступах, что и .scout-content (40px), — на узком экране она упрётся в них
   и ужмётся, а не вылезет за край. */
.admin-action-bar {
  position: fixed;
  bottom: 12px;
  left: 0;
  right: 0;
  width: fit-content;
  max-width: calc(100% - 80px);
  margin: 0 auto;
  background: rgba(255,255,255,0.96);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(16,24,40,0.06);
  border-radius: 12px;
  box-shadow: 0 1px 2px rgba(16,24,40,0.04), 0 12px 28px -10px rgba(16,24,40,0.22);
  padding: 8px 14px;
  display: flex;
  align-items: center;
  gap: 10px;
  z-index: 35;
}
.admin-action-bar .btn { padding: 8px 18px; font-size: 15px; }
/* Спейсер прижимал кнопки к правому краю растянутой панели. Панель теперь
   по содержимому — распирать нечего, а пустой флекс-элемент добавлял бы
   слева лишний gap и уводил центровку. Разметку 13 форм не трогаем. */
.admin-action-spacer { display: none; }

/* Панель фиксирована — контент под ней не резервирует места, и последний блок
   формы уезжал под плашку. Добавляем странице подвал: 12px (отступ панели снизу)
   + ~56px (её высота) + воздух. :has() — потому что панель есть не на всех
   страницах, а класса-маркера на body нет. */
body:has(.admin-action-bar) .scout-content { padding-bottom: 96px; }
.admin-link-danger {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: transparent;
  border: 1px solid transparent;
  color: var(--red);
  font-size: 15px;
  font-weight: 600;
  padding: 7px 12px;
  border-radius: 9px;
  cursor: pointer;
  font-family: inherit;
  text-decoration: none;
  transition: all 0.15s;
}
.admin-link-danger:hover { background: rgba(239,68,68,0.10); border-color: rgba(239,68,68,0.25); }

@media (max-width: 900px) {
  .admin-form-grid { grid-template-columns: repeat(6, 1fr); }
  .span-7, .span-5, .span-3, .span-2 { grid-column: span 6; }
}



/* ============ THEME TOKENS + DARK (прототип 3955-4085, очищено от консольных селекторов) ============ */

/* ============================================================
   THEME TOKENS + DARK THEME
   ------------------------------------------------------------
   Light mode = default (no attribute). Dark mode = <html data-theme="dark">.
   New pages should use these semantic tokens so they flip automatically:
     --bg-page  --bg-card  --surface-muted  --input-bg  --panel-border
     --text-primary/secondary/tertiary  --border/-light  --accent*
   Existing hardcoded surfaces are remapped in the override block below.
   ============================================================ */
:root {
  --surface-muted: #fafbfd;             /* subtle header / hover fills   */
  --input-bg: #ffffff;                  /* form fields                    */
  --panel-border: rgba(16,24,40,0.06);  /* soft card border               */

  /* Scrollbar — значения совпадают с --ds-scroll* протокола (grid-ds.css),
     чтобы админка и грид скроллились одинаково. Файлы намеренно не сведены. */
  --scroll-track: transparent;          /* трек = фон под ним             */
  --scroll-thumb: #c3cad6;
  --scroll-thumb-hover: #a9b3c2;
}

:root[data-theme="dark"] {
  color-scheme: dark;                   /* dark native date/time/select   */

  /* Neutrals / surfaces */
  --bg-page: #0a1420;
  --bg-card: #14273e;
  --surface-muted: #1a3350;
  --input-bg: #0e1f34;
  --bg-surface: #1d3a5a;
  --bg-surface-hover: #244667;

  /* Text */
  --text-primary: #e8eef7;
  --text-secondary: #a4b5ca;
  --text-tertiary: #71859f;

  /* Borders */
  --border: rgba(255,255,255,0.13);
  --border-light: rgba(255,255,255,0.07);
  --panel-border: rgba(255,255,255,0.09);

  /* Accent — brightened so it stays legible on dark surfaces */
  --accent: #5b9bd8;
  --accent-hover: #74aee4;
  --accent-light: #74aee4;
  --accent-muted: rgba(91,155,216,0.16);
  --accent-glow: rgba(91,155,216,0.30);
  --green-muted: rgba(34,197,94,0.16);
  --red-muted: rgba(239,68,68,0.14);

  /* Console neutral button — lifted so it reads on the dark navy card */
  --btn-neutral: #5f7ea6;
  --btn-neutral-hover: #6f8db4;
  --btn-neutral-disabled-bg: rgba(255,255,255,0.06);

  /* Scrollbar — трек чуть темнее поверхности, thumb светлее фона, но не белый:
     нейтральная полупрозрачность ложится на любой тёмный слой (page/card/input). */
  --scroll-track: rgba(255,255,255,0.04);
  --scroll-thumb: rgba(255,255,255,0.16);
  --scroll-thumb-hover: rgba(255,255,255,0.28);

  /* Shadows — deeper on dark */
  --shadow-sm: 0 1px 2px rgba(0,0,0,0.4);
  --shadow-md: 0 6px 20px rgba(0,0,0,0.5);
  --shadow-lg: 0 16px 46px rgba(0,0,0,0.6);
  --shadow-card: 0 1px 3px rgba(0,0,0,0.5), 0 10px 24px rgba(0,0,0,0.35);
}

/* ---- Page backgrounds ---- */
[data-theme="dark"] .scout-page {
  background:
    radial-gradient(1100px 360px at 50% -160px, rgba(45,90,142,0.22), transparent 70%),
    linear-gradient(180deg, #091320 0%, #0c1a2b 42%);
}

/* ---- Card / panel surfaces (were solid #fff) ---- */
[data-theme="dark"] .card,
[data-theme="dark"] .data-table-wrap,
[data-theme="dark"] .scout-stat,
[data-theme="dark"] .tour-tile,
[data-theme="dark"] .tour-tile-body,
[data-theme="dark"] .tour-detail,
[data-theme="dark"] .admin-meta-chip,
[data-theme="dark"] .admin-card,
[data-theme="dark"] .calendar-popover,
[data-theme="dark"] .modal {
  background: var(--bg-card);
  border-color: var(--panel-border);
}
[data-theme="dark"] .cal-nav { background: var(--input-bg); border-color: var(--border); }
[data-theme="dark"] .tour-tile.active::after { background: var(--bg-card); }

/* ---- Muted header / gradient fills ---- */
[data-theme="dark"] .card-header,
[data-theme="dark"] .data-table thead th,
[data-theme="dark"] .match-table thead th,
[data-theme="dark"] .admin-card-head,
[data-theme="dark"] .admin-table thead th,
[data-theme="dark"] .tour-detail-head {
  background: var(--surface-muted);
}

/* ---- Form fields & controls (were #fff) ---- */
[data-theme="dark"] .admin-input,
[data-theme="dark"] .admin-textarea,
[data-theme="dark"] .admin-select,
[data-theme="dark"] .date-pill,
[data-theme="dark"] .admin-cell-input,
[data-theme="dark"] .counter {
  background: var(--input-bg);
  border-color: var(--border);
  color: var(--text-primary);
}
[data-theme="dark"] .search-input input:focus { background: var(--input-bg); }
[data-theme="dark"] .admin-table tbody tr:hover { background: rgba(255,255,255,0.04); }

/* ---- Sticky admin action bar ---- */
[data-theme="dark"] .admin-action-bar {
  background: rgba(16,30,48,0.94);
  border-color: var(--panel-border);
}

/* ---- Modal internals ---- */
[data-theme="dark"] .modal-footer .btn-ghost { background: rgba(255,255,255,0.10); color: var(--text-secondary); }
[data-theme="dark"] .modal-footer .btn-ghost:hover { background: rgba(255,255,255,0.16); color: var(--text-primary); }
[data-theme="dark"] .modal-check { background: var(--input-bg); border-color: var(--border); }

/* ---- Status pills — brighten finished-green text on dark ---- */
[data-theme="dark"] .status-finished,
[data-theme="dark"] .status-finished-block { color: #4ade80; }
/* Live — по тому же принципу, что и «Завершён»: на тёмном фоне насыщенный
   текст плашки подсветляется, иначе #b91c1c на тёмном не читается. */
[data-theme="dark"] .status-live { color: #f87171; }


/* Плавающая кнопка смены темы убрана: тема живёт в меню пользователя
   (partials/user-menu.blade.php, стили — public/css/header.css). */


/* ============ PAGINATION (прототип 4114-4151) ============ */
/* .scout-nav — в public/css/header.css (общий с протоколом). */

/* ===== Table pagination (admin lists) ===== */
.admin-table-foot {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 11px 16px; flex-wrap: wrap;
  border-top: 1px solid var(--border-light);
}
.admin-foot-count { font-size: 14px; color: var(--text-tertiary); font-weight: 600; font-variant-numeric: tabular-nums; }
.pager { display: inline-flex; align-items: center; gap: 4px; flex-wrap: wrap; margin-left: auto; }
.pager .pg-btn {
  min-width: 37px; height: 37px; padding: 0 11px;
  border: 1px solid var(--border); border-radius: 8px;
  background: var(--bg-card); color: var(--text-secondary);
  font-family: inherit; font-size: 15px; font-weight: 600; cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center;
  font-variant-numeric: tabular-nums; transition: all 0.14s;
}
.pager .pg-btn:hover:not(:disabled):not(.active) { border-color: var(--accent-light); color: var(--accent); background: var(--accent-muted); }
.pager .pg-btn.active { background: var(--accent); border-color: var(--accent); color: #fff; cursor: default; }
.pager .pg-btn:disabled { opacity: 0.4; cursor: default; }
.pager .pg-ellipsis { padding: 0 2px; color: var(--text-tertiary); font-weight: 700; }
.pager .pg-svg { width: 15px; height: 15px; }



/* ============================================================
   ВЫТАЩЕНО ИЗ INLINE-СТИЛЕЙ ПРОТОТИПА
   ------------------------------------------------------------
   Переиспользуемые админ-компоненты, застрявшие в <style> одной
   страницы (admin-seasons.html). Здесь они общие.
   `.seasons-statusbar` прототипа обобщён в `.admin-statusbar`.
   ============================================================ */

/* ---- Контекстная под-навигация (у нас — вкладки матча, partials/match-nav) ---- */
.joom-subnav {
  display: flex; align-items: center; gap: 4px;
  background: var(--bg-card);
  border: 1px solid var(--panel-border);
  border-radius: 12px;
  padding: 5px;
  margin: 0 auto 12px;
  box-shadow: var(--shadow-card);
  width: fit-content; max-width: 100%;
  overflow-x: auto;
}
.joom-subnav a {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 8px 16px; border-radius: 8px;
  font-size: 15px; font-weight: 600;
  color: var(--text-secondary); text-decoration: none; white-space: nowrap;
  transition: all 0.15s;
}
.joom-subnav a svg { width: 15px; height: 15px; }
.joom-subnav a:hover { background: var(--surface-muted); color: var(--text-primary); text-decoration: none; }
.joom-subnav a.active {
  background: linear-gradient(135deg, #1e3a5f, #2d5a8e);
  color: #fff;
  box-shadow: 0 4px 12px -4px var(--accent-glow);
}
.joom-subnav a.active svg { color: #fff; }
.joom-subnav .subnav-title { font-size: 15px; font-weight: 700; color: var(--text-primary); padding: 0 10px 0 8px; white-space: nowrap; }
.joom-subnav .subnav-back { margin-left: 6px; color: var(--text-tertiary); }

/* ---- Строка фильтров-статусов над таблицей ---- */
.admin-statusbar {
  display: flex; align-items: center; justify-content: space-between;
  gap: 14px; flex-wrap: wrap;
  padding: 12px 18px;
  border-bottom: 1px solid var(--border-light);
}
.status-tabs { display: flex; align-items: center; gap: 4px; flex-wrap: wrap; }
.status-tab {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 6px 12px; border-radius: 8px;
  font-size: 14.5px; font-weight: 600;
  color: var(--text-secondary);
  background: transparent; border: none; cursor: pointer;
  font-family: inherit; text-decoration: none;
  transition: all 0.15s;
}
.status-tab:hover { background: var(--surface-muted); color: var(--text-primary); text-decoration: none; }
.status-tab.active { background: var(--accent-muted); color: var(--accent); }
.status-tab .count { font-size: 12.5px; font-weight: 700; color: var(--text-tertiary); font-variant-numeric: tabular-nums; }
.status-tab.active .count { color: var(--accent); }
.status-tab.trash.active { background: var(--red-muted); color: var(--red); }

/* ============================================================
   ДОБАВЛЕНО ДЛЯ scout-new — в прототипе этих компонентов НЕТ
   ------------------------------------------------------------
   Прототип рисовал статичные экраны, поэтому в нём не оказалось
   ни флеш-сообщений, ни пустых состояний. Собрано на его токенах.
   ============================================================ */

/* ---- Кнопки-ссылки ----
   В прототипе .btn/.icon-btn/.tour-tile всегда <button>/<div>. У нас половина из них —
   <a> (Протокол, Создать матч, плитка лиги), и они приезжают с браузерным подчёркиванием. */
.btn, .icon-btn, .tour-tile, .status-tab, .pg-btn { text-decoration: none; }
.btn:hover, .icon-btn:hover, .tour-tile:hover, .pg-btn:hover { text-decoration: none; }
a.tour-tile { color: inherit; }

/* ---- Пилюля-предупреждение ----
   В прототипе у .status-pill нет warn-варианта, а он нужен (уровни лога, задержки). */
.status-pill.status-warn {
  background: rgba(230,161,75,0.14);
  color: #a96a1c;
  border-color: rgba(230,161,75,0.35);
}
[data-theme="dark"] .status-pill.status-warn { color: #f0b862; }

/* ---- Прокручиваемая обёртка таблицы с липкой шапкой ----
   Базовый .admin-table-wrap умеет только горизонтальный скролл; длинным журналам
   (аудит, лог матча) нужен вертикальный + thead, который не уезжает. */
.admin-table-wrap.is-scroll { max-height: 70vh; overflow: auto; }
.admin-table-wrap.is-scroll thead th { position: sticky; top: 0; z-index: 2; }

/* ---- Статус «Задержка» ----
   В прототипе четыре статуса (live/finished/not-started/canceled), а у нас их пять:
   3 = отменён, 4 = задержка (см. решение по осям division+date). Достраиваем пятый. */
.status-pill.status-delayed {
  background: rgba(230,161,75,0.14);
  color: #a96a1c;
  border-color: rgba(230,161,75,0.35);
}
[data-theme="dark"] .status-pill.status-delayed { color: #f0b862; }

/* ---- Мульти-выбор чипами (фильтр статусов) ----
   Прототипный .pill-toggle — эксклюзивный выбор; здесь чекбоксы (можно несколько). */
.filter-chip {
  display: inline-flex; align-items: center; gap: 6px;
  height: 41px; padding: 0 13px;
  border: 1px solid var(--border); border-radius: var(--radius-sm);
  background: var(--input-bg); color: var(--text-secondary);
  font-size: 15px; font-weight: 600; cursor: pointer; user-select: none;
  transition: all 0.15s;
}
.filter-chip:hover { border-color: var(--accent-light); color: var(--text-primary); }
.filter-chip input { display: none; }
.filter-chip.active { border-color: var(--accent); background: var(--accent-muted); color: var(--accent); }

/* ---- Ячейки таблиц, которых не было в прототипе ---- */
/* Ссылка на сущность внутри ячейки (в прототипе жила как .seasons-table .s-title) */
.admin-cell-link { font-weight: 700; color: var(--accent); text-decoration: none; }
.admin-cell-link:hover { text-decoration: underline; }
.cell-muted { color: var(--text-secondary); font-weight: 600; }
.cell-nowrap { white-space: nowrap; }
.cell-sub { display: block; color: var(--text-tertiary); font-size: 12.5px; font-weight: 500; }

/* Миниатюра логотипа/аватара в списках (лиги, турниры, команды, игроки) */
.admin-logo-thumb {
  height: 34px; width: 34px; display: block;
  object-fit: contain;
  background: var(--surface-muted);
  border: 1px solid var(--border);
  border-radius: 8px;
}
.admin-logo-thumb.is-empty {
  display: flex; align-items: center; justify-content: center;
  color: var(--text-tertiary); font-weight: 700;
}

/* ---- Тело карточки для НЕ-формного контента ----
   В прототипе внутрь .admin-card кладётся сразу .admin-form-grid (padding у самой
   сетки), поэтому тела карточки там нет. Для списков/пустых состояний/произвольной
   разметки нужен padded-контейнер — вот он. Для форм по-прежнему используем
   .admin-form-grid напрямую, без обёртки (иначе двойной padding). */
.admin-card-body { padding: 14px 18px 16px; }
.admin-card-body > :last-child { margin-bottom: 0; }

/* ---- Чекбокс-строка вне модалки (в прототипе был только .modal-checkbox) ---- */
.admin-check {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 15px; font-weight: 600; color: var(--text-primary);
  cursor: pointer; user-select: none;
}
.admin-check input[type="checkbox"] { width: 15px; height: 15px; accent-color: var(--accent); cursor: pointer; flex-shrink: 0; }
.admin-check .sub { color: var(--text-tertiary); font-weight: 600; font-size: 14px; }

/* Прокручиваемый список чекбоксов (турниры лиги, доступы оператора) */
.admin-checklist {
  max-height: 360px; overflow: auto;
  border: 1px solid var(--border); border-radius: var(--radius-sm);
  background: var(--input-bg);
  padding: 8px 12px;
}
.admin-checklist .admin-check { display: flex; padding: 5px 0; }

/* Превью загруженного файла (логотип лиги/команды/игрока) */
.admin-file-preview { display: flex; align-items: center; gap: 12px; margin-top: 10px; }
.admin-file-preview img {
  height: 48px; width: 48px; object-fit: contain;
  background: var(--surface-muted); border: 1px solid var(--border); border-radius: var(--radius-sm);
}

/* Опасная зона (удаление сущности) */
.admin-danger-zone {
  display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap;
  padding: 16px 18px; margin-top: 18px;
  border: 1px solid rgba(239,68,68,0.28); border-radius: var(--radius-lg);
  background: var(--red-muted);
}
.admin-danger-zone .t { font-size: 15.5px; font-weight: 700; color: var(--text-primary); }
.admin-danger-zone .s { font-size: 14.5px; color: var(--text-secondary); font-weight: 600; margin-top: 2px; }
.btn-danger-outline {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 8px 16px; border-radius: var(--radius-sm);
  font-family: inherit; font-size: 15px; font-weight: 700; cursor: pointer;
  color: var(--red); background: transparent; border: 1px solid rgba(239,68,68,0.5);
  transition: all 0.15s;
}
.btn-danger-outline:hover { background: var(--red); border-color: var(--red); color: #fff; }
.btn-danger-outline svg { width: 14px; height: 14px; }

/* ---- Flash / alerts (замена .flash из старого app.blade) ---- */
.flash {
  display: flex; align-items: flex-start; gap: 10px;
  padding: 12px 16px; margin-bottom: 16px;
  border: 1px solid transparent; border-radius: var(--radius);
  font-size: 15px; font-weight: 600; line-height: 1.45;
}
.flash svg { width: 17px; height: 17px; flex-shrink: 0; margin-top: 1px; }
.flash-ok   { background: var(--green-muted); border-color: rgba(34,197,94,0.35);  color: #15803d; }
.flash-err  { background: var(--red-muted);   border-color: rgba(239,68,68,0.35);  color: #b91c1c; }
.flash-warn { background: rgba(230,161,75,0.12); border-color: rgba(230,161,75,0.4); color: #a96a1c; }
.flash-info { background: var(--accent-muted); border-color: rgba(30,58,95,0.18);  color: var(--accent); }
.flash-list { margin: 4px 0 0; padding-left: 18px; font-weight: 500; }
[data-theme="dark"] .flash-ok   { color: #4ade80; }
[data-theme="dark"] .flash-err  { color: #fca5a5; }
[data-theme="dark"] .flash-warn { color: #f0b862; }

/* ---- Empty state (пустая таблица / нет данных) ---- */
.empty-state {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 8px; padding: 48px 24px; text-align: center;
}
.empty-state-ico {
  width: 46px; height: 46px; border-radius: 13px;
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--accent-muted); color: var(--accent); margin-bottom: 2px;
}
.empty-state-ico svg { width: 22px; height: 22px; }
.empty-state-title { font-size: 16.5px; font-weight: 700; color: var(--text-primary); }
.empty-state-text  { font-size: 14.5px; color: var(--text-secondary); max-width: 380px; }
.empty-state .btn { margin-top: 8px; }
td.empty-cell { padding: 0 !important; background: transparent !important; }
td.empty-cell:hover { background: transparent !important; }

/* ---- Field-level validation error (Laravel @error) ---- */
.admin-field-error { display: block; margin-top: 5px; font-size: 13px; font-weight: 600; color: var(--red); }
.admin-input.is-invalid, .admin-select.is-invalid, .admin-textarea.is-invalid {
  border-color: var(--red); box-shadow: 0 0 0 3px var(--red-muted);
}

/* ---- Required-field marker ---- */
.admin-field-label .req { color: var(--red); margin-left: 2px; font-weight: 700; }

/* ============================================================
   RESPONSIVE — только админские поверхности
   (мобильная раскладка консоли матча из прототипа не перенесена —
    консоль = протокол, вне скоупа)
   ============================================================ */
@media (max-width: 900px) {
  .settings-grid { grid-template-columns: 1fr; }
  .tour-grid { grid-template-columns: repeat(3, 1fr); }
  .tour-detail-head { flex-wrap: wrap; gap: 10px; }
  .tour-detail-head .tour-edit { margin-left: 0; }
  .match-table { font-size: 14px; }
  .match-table thead th, .match-table tbody td { padding: 9px 8px; }
  .data-table { font-size: 14px; }
  .data-table thead th, .data-table tbody td { padding: 10px 8px; }
}
@media (max-width: 640px) {
  html, body { overflow-x: hidden; }
  .scout-content { padding: 16px 12px 40px; }
  /* панель по-прежнему по центру, но упирается в узкие поля контента (12px) */
  .admin-action-bar { max-width: calc(100% - 24px); }
  /* .scout-header на узком экране — в header.css (общий с протоколом) */
  /* широкие таблицы скроллятся внутри карточки, а не тянут страницу */
  .admin-table-wrap, .data-table-wrap { display: block; width: 100%; max-width: 100%;
    overflow-x: auto; overflow-y: hidden; -webkit-overflow-scrolling: touch; }
  .admin-form-grid > [class*="span-"] { grid-column: span 12; }
}

/* ====== DROPDOWN С ПОИСКОМ (.dd-*) ======
   Кастомный селект: кнопка + всплывающий список с фильтром по подстроке.
   Нужен там, где вариантов много и нативный <select> без поиска неудобен
   (первый потребитель — «Турнир» на /dashboard: турниров за день десятки).

   🔑 Это СЛОЙ ПРЕДСТАВЛЕНИЯ поверх нативного <select>, а не замена ему:
   select остаётся в DOM (класс .dd-native), хранит значение и уходит в форму,
   дропдаун лишь ставит ему .value и шлёт 'change'. Поэтому вся логика,
   завязанная на select (автосабмит, сброс, сбор параметров), не меняется.

   Визуально .dd-toggle зеркалит .admin-select (см. выше) — оба стоят в одних
   рядах фильтров и обязаны выглядеть одинаково: правя один, правь второй.
   Только семантические токены — иначе поедет тёмная тема. */

.dd { position: relative; }

/* Скрыт визуально, но НЕ от формы: display:none/[hidden] убрали бы значение
   из сабмита и фокусируемость (нативный фолбэк, <label for>). */
.dd-native {
  position: absolute;
  opacity: 0;
  pointer-events: none;
  width: 0;
  height: 0;
}

.dd-toggle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  width: 100%;
  padding: 9px 14px;
  border: 1px solid var(--border);
  border-radius: 9px;
  background: var(--input-bg);
  color: var(--text-primary);
  font-family: inherit;
  font-size: 15px;
  font-weight: 600;
  text-align: left;
  cursor: pointer;
}
.dd-toggle:hover { border-color: var(--text-tertiary); }
/* Фокус — как у .admin-select:focus, чтобы клавиатурный обход не «прыгал» стилем. */
.dd-toggle:focus-visible {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-muted);
}
.dd-toggle-text { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dd-caret { flex-shrink: 0; width: 16px; height: 16px; color: var(--text-tertiary); transition: transform .15s; }
.dd.open .dd-caret { transform: rotate(180deg); }

.dd-menu {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  min-width: 100%;
  max-width: 420px;
  z-index: 30;              /* под шапкой (40), над sticky thead таблицы (2) */
  display: flex;
  flex-direction: column;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  overflow: hidden;
}
/* 🔴 Обязательно: правило выше (0,1,0) иначе перебивает браузерное
   [hidden]{display:none} и меню будет раскрыто всегда. Те же грабли уже
   были у .addrow .addform[hidden] в dashboard.blade. */
.dd-menu[hidden] { display: none; }

.dd-search {
  flex-shrink: 0;
  margin: 8px;
  padding: 8px 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--input-bg);
  color: var(--text-primary);
  font-family: inherit;
  font-size: 14px;
}
.dd-search:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-muted); }
.dd-search::placeholder { color: var(--text-tertiary); }

.dd-list { overflow-y: auto; max-height: 280px; padding: 0 0 6px; }

.dd-opt {
  display: block;
  width: 100%;
  padding: 8px 14px;
  border: 0;
  background: none;
  color: var(--text-primary);
  font-family: inherit;
  font-size: 14.5px;
  font-weight: 600;
  text-align: left;
  cursor: pointer;
}
/* .dd-opt задаёт display:block (0,1,0) → перебивает браузерное [hidden]{display:none} (тоже 0,1,0,
   но авторский стиль важнее UA) → скрытые фильтром опции оставались видимыми и поиск «не работал».
   Те же грабли уже чинились у .dd-menu[hidden] выше и .addrow .addform[hidden] в dashboard.blade. */
.dd-opt[hidden] { display: none; }
.dd-opt:hover { background: var(--surface-muted); }
/* Подсветка при обходе стрелками — отдельно от :hover и от выбранного. */
.dd-opt.active { background: var(--accent-muted); }
.dd-opt[aria-selected="true"] { color: var(--accent-light); }
/* Лига — приглушённым инлайновым текстом, как .cell-muted в таблицах. */
.dd-opt-league { color: var(--text-secondary); font-weight: 600; }

.dd-empty { padding: 12px 14px; color: var(--text-tertiary); font-size: 14px; font-weight: 600; }
