/* Auto searchable select */
.auto-ss-wrap { position:relative; display:inline-block; width:100%; }
.auto-ss-input {
  width:100%; box-sizing:border-box;
  background:var(--bg3,#181d28); border:1px solid var(--border2,#2a3149);
  color:var(--text,#e4e8f0); border-radius:7px; padding:7px 10px;
  font-size:13px; font-family:var(--font,'Outfit',sans-serif);
  outline:none; transition:border .18s; cursor:pointer;
}
.auto-ss-input:focus { border-color:var(--neon,#00e88a); box-shadow:0 0 0 2px var(--neon-dim,rgba(0,232,138,.12)); }
.auto-ss-dd {
  display:none; position:absolute; top:calc(100% + 3px); left:0; right:0;
  background:var(--bg2,#0f131e); border:1px solid var(--border2,#2a3149);
  border-radius:8px; max-height:200px; overflow-y:auto; z-index:9999;
  box-shadow:0 8px 24px rgba(0,0,0,.55);
}
.auto-ss-wrap.open .auto-ss-dd { display:block; }
.auto-ss-opt {
  padding:7px 11px; cursor:pointer; font-size:13px; color:var(--text,#e4e8f0);
  transition:background .1s; border-bottom:1px solid rgba(255,255,255,.04);
}
.auto-ss-opt:last-child { border-bottom:none; }
.auto-ss-opt:hover, .auto-ss-opt.ss-focused { background:var(--neon-dim,rgba(0,232,138,.08)); color:var(--neon,#00e88a); }
.auto-ss-opt.ss-selected { color:var(--neon,#00e88a); font-weight:600; }
.auto-ss-opt.ss-hidden { display:none !important; }
.auto-ss-empty { padding:9px 11px; font-size:12px; color:var(--text3,#556); text-align:center; }

/* ── HandGraphics: дашборд ───────────────────────────── */
.roadmap { display:flex; flex-direction:column; gap:8px; }
.roadmap-row { display:flex; align-items:center; gap:12px; padding:10px 14px; border-radius:8px; background:var(--bg3); border:1px solid var(--border); font-size:14px; }
.roadmap-num { font-family:var(--font-mono); font-weight:700; width:22px; color:var(--text3); }
.roadmap-row.done .roadmap-num { color:var(--neon); }
.roadmap-row.next { border-color:var(--border3); }
.roadmap-row.next .roadmap-num { color:var(--neon); }
.roadmap-text { flex:1; }
.roadmap-row.todo .roadmap-text, .roadmap-row.postponed .roadmap-text { color:var(--text2); }
.error-page { max-width:480px; margin:12vh auto; text-align:center; }
.error-code { font-family:var(--font-mono); font-size:72px; font-weight:700; color:var(--neon); line-height:1; }
.league-checks { display:grid; grid-template-columns:repeat(auto-fill,minmax(220px,1fr)); gap:6px 16px; margin-top:6px; }
.hint { font-size:12px; color:var(--text3); margin-top:4px; }

/* ── Справочники (CRUD) ──────────────────────────────── */
.crud-filters { display:flex; gap:8px; flex-wrap:wrap; align-items:center; }
.crud-filters .form-input-sm { max-width:240px; }
.crud-filters .auto-ss-wrap, .crud-filters .form-select-sm { width:auto; min-width:170px; max-width:240px; }
.crud-count { margin-left:auto; font-family:var(--font-mono); font-size:12px; color:var(--text3); }
.crud-table td { vertical-align:middle; }
.crud-table .actions-cell { white-space:nowrap; text-align:right; }
.crud-table .actions-cell form { display:inline; }
.crud-main-link { color:var(--text); font-weight:600; text-decoration:none; }
.crud-main-link:hover { color:var(--neon); }
.crud-thumb { width:34px; height:34px; border-radius:6px; object-fit:contain; background:var(--bg3); display:block; }
.crud-thumb-empty { border:1px dashed var(--border2); }
.crud-image { width:46px; }
.crud-swatch { display:inline-block; width:22px; height:22px; border-radius:5px; border:1px solid var(--border2); }
.crud-pager { display:flex; gap:8px; align-items:center; margin-top:12px; font-size:13px; color:var(--text2); }
.crud-grid { display:grid; grid-template-columns:repeat(2, minmax(0,1fr)); gap:4px 18px; }
.crud-wide, .crud-section { grid-column:1 / -1; }
.crud-section { font-size:11px; font-weight:700; color:var(--neon); text-transform:uppercase; letter-spacing:1px;
  padding:14px 0 6px; margin-top:6px; border-top:1px solid var(--border); font-family:var(--font-head); }
.crud-section-first { border-top:none; padding-top:0; margin-top:0; }
.crud-form .form-group { margin-bottom:10px; }
.crud-form .form-group > .check-label { margin-top:24px; }
.crud-m2m { border:1px solid var(--border2); border-radius:8px; padding:8px; background:var(--bg3); }
.crud-m2m-search { margin-bottom:8px; max-width:260px; }
.crud-m2m-list { display:grid; grid-template-columns:repeat(auto-fill, minmax(210px,1fr)); gap:4px 14px; max-height:260px; overflow-y:auto; }
.crud-m2m-list .is-checked { color:var(--neon); }
.crud-upload { display:flex; gap:14px; align-items:center; }
.crud-preview { width:84px; height:84px; object-fit:contain; border-radius:8px; background:var(--bg3); border:1px solid var(--border); }
.crud-color { display:flex; gap:8px; align-items:center; }
.crud-color input[type=color] { width:42px; height:34px; border:1px solid var(--border2); border-radius:6px; background:none; padding:2px; cursor:pointer; }
.crud-color .form-input-sm { max-width:110px; font-family:var(--font-mono); }

/* ── Заявка на матч ──────────────────────────────────── */
.roster-head { margin:-4px 0 16px; }
.roster-match { font-family:var(--font-head); font-size:22px; font-weight:700; display:flex; gap:12px; align-items:center; flex-wrap:wrap; }
.roster-vs { color:var(--text3); }
.roster-meta { color:var(--text2); font-size:13px; margin-top:4px; }
.roster-grid { display:grid; grid-template-columns:repeat(2, minmax(0,1fr)); gap:16px; }
.roster-team, .roster-officials { padding:14px; }
.roster-team-head { display:flex; justify-content:space-between; align-items:center; gap:12px; margin-bottom:10px; }
.roster-team-head h2 { font-size:17px; font-family:var(--font-head); }
.roster-counter { font-size:13px; color:var(--text2); font-family:var(--font-mono); }
.roster-counter b.over { color:var(--red); }
.roster-table td, .roster-table th { padding:5px 6px; }
.roster-table tr:not(.in-roster) .roster-name { color:var(--text3); }
.roster-table tr.in-roster { background:var(--neon-dim); }
.roster-num { width:56px; }
.roster-table .form-select-sm { min-width:76px; }
.roster-add { display:flex; gap:8px; margin:10px 0 4px; align-items:center; }
.roster-add .auto-ss-wrap { flex:1; }
.roster-sub { font-size:12px; text-transform:uppercase; letter-spacing:.8px; color:var(--neon); margin:16px 0 8px; font-family:var(--font-head); }
.roster-officials { margin-top:16px; }
.roster-off-grid { display:grid; grid-template-columns:repeat(3, minmax(0,1fr)); gap:4px 16px; }
.roster-actions { position:sticky; bottom:0; padding:12px 0; background:linear-gradient(transparent, var(--bg) 40%); }

@media (max-width: 900px) {
  .db-layout { flex-direction:column; }
  .db-sidenav { width:100%; }
  .crud-grid, .roster-grid, .roster-off-grid { grid-template-columns:1fr; }
}
.breadcrumb a { color:var(--text2); text-decoration:none; }
.breadcrumb a:hover { color:var(--neon); }
