/* l2m-admin/admin.css — Админка клана.
   Каркас 1:1 с радаром/боссами (l2m-map/style.css): .sidebar 380px, .header,
   .module-nav-switcher, .region-tabs-плитка, .search-container, .list-header,
   .map-container, .map-hud-top, .mobile-menu-btn, drawer ≤768px.
   Копии вместо ссылок — zero-coupling: падение l2m-map не ломает админку. */

:root {
  --adm-base: #0a0d14;
  --adm-surface-1: #0f172a;
  --adm-surface-2: #1e293b;
  --adm-well: #0b0f19;
  --adm-border: #1e293b;
  --adm-input-border: #334155;
  --adm-gold: #ffd700;
  --adm-gold-dim: #d4af37;
  --adm-sky: #38bdf8;
  --adm-text: #e2e8f0;
  --adm-muted: #94a3b8;
  --adm-crimson: #ef4444;
  --adm-emerald: #10b981;
}

/* --- Unified line-icon system (#ic-* sprite, codicon-style) --- */
.l2m-ic {
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
  vertical-align: -0.14em;
  flex-shrink: 0;
  overflow: visible;
  pointer-events: none;
  display: inline-block;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

.l2m-admin-body {
  background-color: #0b0e14;
  color: var(--adm-text);
  height: 100vh;
  display: flex;
  overflow: hidden;
}

/* --- Sidebar (точная копия l2m-map/style.css .sidebar/.header) --- */
.sidebar {
  width: 380px;
  flex: 0 0 380px;
  background: linear-gradient(180deg, #131722 0%, #0d1017 100%);
  border-right: 1px solid rgba(212, 175, 55, 0.25);
  display: flex;
  flex-direction: column;
  z-index: 1000;
  box-shadow: 4px 0 20px rgba(0, 0, 0, 0.6);
  overflow: hidden;
}

.header {
  padding: 12px 16px;
  background: rgba(16, 20, 30, 0.85);
  border-bottom: 1px solid rgba(212, 175, 55, 0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  min-height: 64px;
  box-sizing: border-box;
}

.drawer-close-btn { display: none; }

/* --- Module switcher (точная копия .module-nav-*) --- */
.module-nav-switcher {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 24px;
  background: transparent;
  border: none;
  box-shadow: none;
  padding: 0;
  margin: 0 auto;
}

.module-nav-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 50px;
  height: 50px;
  border-radius: 12px;
  text-decoration: none;
  background: transparent;
  border: 1px solid transparent;
  color: #94a3b8;
  cursor: pointer;
  transition: all 0.22s cubic-bezier(0.16, 1, 0.3, 1);
  position: relative;
  box-sizing: border-box;
}

.module-nav-btn:hover {
  transform: translateY(-2px) scale(1.08);
}

.module-nav-btn .module-icon {
  display: block;
  transition: all 0.22s ease;
}

.module-nav-btn .crystal-radar-icon {
  width: 40px;
  height: 40px;
}

.module-nav-btn .boss-skull-icon {
  width: 31px;
  height: 31px;
} /* Clan icon (single-file brand: /core/clan-icon.svg) */ .module-nav-btn img.clan-icon {   width: 44px;   height: 44px;   display: block; } /* Clan gold glow (filter works on <img>, keeps clan colors) */ .module-nav-btn.active img.clan-icon {   filter: drop-shadow(0 0 6px rgba(255, 215, 0, 0.85)); } .module-nav-btn:hover img.clan-icon {   filter: drop-shadow(0 0 5px rgba(255, 215, 0, 0.7)); }

.crystal-radar-icon .crystal-frame {
  stroke: #cbd5e1;
  stroke-width: 2;
  stroke-linejoin: round;
  fill: none;
  transition: stroke 0.22s ease, filter 0.22s ease;
}
.crystal-radar-icon .crystal-arc {
  stroke: rgba(203, 213, 225, 0.55);
  stroke-width: 2.2;
  stroke-linecap: round;
  fill: none;
  transition: stroke 0.22s ease, filter 0.22s ease;
}
.crystal-radar-icon .crystal-facet {
  transition: fill 0.22s ease;
}
.crystal-radar-icon .facet-ul { fill: #f8fafc; }
.crystal-radar-icon .facet-ur { fill: #e2e8f0; }
.crystal-radar-icon .facet-ll { fill: #94a3b8; }
.crystal-radar-icon .facet-lr { fill: #64748b; }

.module-nav-btn.active .crystal-radar-icon .crystal-frame {
  stroke: #ffd700;
  filter: drop-shadow(0 0 6px rgba(255, 215, 0, 0.85));
}
.module-nav-btn.active .crystal-radar-icon .crystal-arc {
  stroke: #ffd700;
  filter: drop-shadow(0 0 5px rgba(255, 215, 0, 0.7));
}
.module-nav-btn.active .crystal-radar-icon .crystal-arc-outer {
  stroke: rgba(255, 215, 0, 0.9);
}
.module-nav-btn.active .crystal-radar-icon .facet-ul { fill: #fff4a3; }
.module-nav-btn.active .crystal-radar-icon .facet-ur { fill: #ffd700; }
.module-nav-btn.active .crystal-radar-icon .facet-ll { fill: #d4af37; }
.module-nav-btn.active .crystal-radar-icon .facet-lr { fill: #926310; }

.module-nav-btn:hover .crystal-radar-icon .crystal-frame {
  stroke: #ffd700;
  filter: drop-shadow(0 0 5px rgba(255, 215, 0, 0.7));
}
.module-nav-btn:hover .crystal-radar-icon .crystal-arc {
  stroke: #ffd700;
  filter: drop-shadow(0 0 4px rgba(255, 215, 0, 0.5));
}
.module-nav-btn:hover .crystal-radar-icon .facet-ul { fill: #fff; }
.module-nav-btn:hover .crystal-radar-icon .facet-ur { fill: #ffe57f; }

.boss-skull-icon {
  color: #94a3b8;
  opacity: 0.75;
  transition: all 0.22s ease;
}
.boss-skull-icon path {
  fill: currentColor;
}
.module-nav-btn.active .boss-skull-icon {
  color: #ffd700;
  opacity: 1;
  filter: drop-shadow(0 0 8px rgba(255, 215, 0, 0.85)) drop-shadow(0 0 16px rgba(255, 215, 0, 0.45));
}
.module-nav-btn:hover .boss-skull-icon {
  color: #ffd700;
  opacity: 1;
  filter: drop-shadow(0 0 6px rgba(255, 215, 0, 0.65));
}

.module-nav-btn.active {
  background: rgba(212, 175, 55, 0.08);
  border-color: rgba(212, 175, 55, 0.4);
  box-shadow: 0 0 20px rgba(212, 175, 55, 0.25);
  transform: translateY(-1px);
}

/* Notifications popover (unified HUD: bell before logout on all pages). */
.notify-pop {
  position: absolute;
  top: 46px;
  right: 0;
  width: 220px;
  background: linear-gradient(180deg, rgba(14, 18, 26, 0.98) 0%, rgba(8, 10, 15, 0.99) 100%);
  border: 1px solid rgba(212, 175, 55, 0.4);
  border-radius: 8px;
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.6);
  padding: 10px 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  z-index: 1300;
}
.notify-pop[hidden] { display: none; }
.notify-row {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12.5px;
  color: #e2e8f0;
  cursor: pointer;
}
.notify-section-title {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.06em;
  color: #d4af37;
  text-transform: uppercase;
  margin-top: 2px;
}
.notify-test-row {
  display: flex;
  gap: 6px;
}
.notify-test-row .admin-btn.small { flex: 1; }

/* Backup rows: machine filename secondary, AUTO badge. */
.bk-file {
  font-family: monospace;
  font-size: 11px;
}
.bk-badge {
  display: inline-block;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.5px;
  color: #7dd3fc;
  background: rgba(56, 189, 248, 0.12);
  border: 1px solid rgba(56, 189, 248, 0.4);
  border-radius: 4px;
  padding: 0 6px;
  margin-left: 6px;
  vertical-align: 1px;
}

/* Count badge on switcher icons (alerts / boss chain). Calm gold, hidden when zero. */
.module-nav-badge {
  position: absolute;
  top: -4px;
  right: -4px;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border-radius: 9px;
  background: linear-gradient(180deg, #b8860b, #8a6508);
  border: 1px solid rgba(255, 215, 0, 0.8);
  color: #fff;
  font-size: 10.5px;
  font-weight: 800;
  line-height: 16px;
  text-align: center;
  pointer-events: none;
  z-index: 3;
}

/* Клановый герб: та же палитра и свечение, что у заменённого щита. */
.module-nav-btn .admin-shield-icon {
  width: 44px;
  height: 44px;
}
.admin-shield-icon .crest-radiance {
  fill: #cbd5e1;
  transition: fill 0.22s ease, filter 0.22s ease;
}
.admin-shield-icon .crest-core {
  fill: #94a3b8;
  transition: fill 0.22s ease;
}
.module-nav-btn.active .admin-shield-icon .crest-radiance {
  fill: var(--adm-gold);
  filter: drop-shadow(0 0 6px rgba(255, 215, 0, 0.85));
}
.module-nav-btn.active .admin-shield-icon .crest-core { fill: var(--adm-gold); }
.module-nav-btn:hover .admin-shield-icon .crest-radiance {
  fill: var(--adm-gold);
  filter: drop-shadow(0 0 5px rgba(255, 215, 0, 0.7));
}
.module-nav-btn:hover .admin-shield-icon .crest-core { fill: #ffe57f; }

/* --- Region tabs tile grid (точная копия) --- */
.region-tabs {
  display: flex;
  flex-wrap: wrap;
  overflow-x: hidden;
  scrollbar-width: none;
  background: rgba(0, 0, 0, 0.25);
  padding: 4px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  gap: 2px;
}
.region-tabs::-webkit-scrollbar {
  display: none;
}

.region-tabs .tab-btn {
  flex: 1 1 22%;
  text-align: center;
  padding: 5px 4px;
  background: transparent;
  border: 1px solid transparent;
  color: #94a3b8;
  font-size: 10.5px;
  font-weight: 600;
  cursor: pointer;
  border-radius: 4px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  transition: all 0.15s ease;
}

.region-tabs .tab-btn:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.05);
}

.region-tabs .tab-btn.active {
  background: rgba(212, 175, 55, 0.18);
  border-color: rgba(212, 175, 55, 0.4);
  color: #ffd700;
}

/* --- Search bar (точная копия) --- */
.search-container {
  padding: 10px 14px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.search-input-wrap {
  position: relative;
  display: flex;
  align-items: center;
}

.search-input {
  width: 100%;
  padding: 10px 12px 10px 34px;
  background: #1a202c;
  border: 1px solid rgba(212, 175, 55, 0.3);
  border-radius: 6px;
  color: #f8fafc;
  font-size: 13px;
  outline: none;
  transition: border-color 0.2s;
}

.search-input:focus {
  border-color: #e6c875;
  box-shadow: 0 0 10px rgba(212, 175, 55, 0.2);
}

.search-icon {
  position: absolute;
  left: 10px;
  color: #64748b;
  font-size: 14px;
  pointer-events: none;
}

/* --- List header + scroll list (точная копия .list-header/.locations-list) --- */
.list-header {
  flex: 0 0 auto;
  padding: 10px 16px 6px;
  padding: 9px 14px 5px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  color: #64748b;
  letter-spacing: 0.8px;
}

.locations-list {
  flex: 1;
  min-height: 72px;
  overflow-y: auto;
  padding: 4px 8px 10px;
}

/* Строки сокланов живут внутри .locations-list */
.admin-roster-row {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  padding: 5px 7px;
  background: var(--adm-well);
  border: 1px solid var(--adm-border);
  border-radius: 6px;
  white-space: nowrap;
  overflow: hidden;
  margin-bottom: 4px;
}
.admin-roster-row .dot { width: 8px; height: 8px; border-radius: 50%; background: #64748b; flex-shrink: 0; }
.admin-roster-row.online .dot { background: var(--adm-emerald); }
/* Отозван важнее присутствия: красный бьёт зелёный (правило ниже, специфичности равны). */
.admin-roster-row.revoked .dot { background: var(--adm-crimson); }
.admin-roster-row .nick { overflow: hidden; text-overflow: ellipsis; }
.admin-roster-row .tag { color: var(--adm-sky); }
.admin-roster-row .role { margin-left: auto; color: var(--adm-muted); font-size: 11px; flex-shrink: 0; }
.admin-roster-row.me { border-color: var(--adm-gold-dim); }

/* --- Map container (точная копия) --- */
.map-container {
  flex: 1;
  height: 100vh;
  position: relative;
  background: #06090e;
  overflow-y: auto;
}

/* --- Tactical right stack + HUD (точная копия позиционирования) --- */
.tactical-right-stack {
  display: contents;
}

.map-hud-top {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 1200;
  display: flex;
  width: 320px;
  pointer-events: auto;
}

.user-clan-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  width: 100%;
  height: 38px;
  box-sizing: border-box;
  padding: 4px 8px 4px 10px;
  background: linear-gradient(180deg, rgba(14, 18, 26, 0.96) 0%, rgba(8, 10, 15, 0.98) 100%);
  border: 1px solid rgba(212, 175, 55, 0.35);
  border-radius: 8px;
  box-shadow: 0 4px 18px rgba(0, 0, 0, 0.45);
  overflow: hidden;
}

.user-badge-wrap {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  user-select: none;
  padding: 2px 4px;
  border-radius: 6px;
  min-width: 0;
  flex: 1 1 auto;
  overflow: hidden;
}

.user-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  min-width: 0;
  flex: 1 1 auto;
  overflow: hidden;
  font-size: 12px;
  font-weight: 700;
  color: #f8fafc;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.user-clan-tag {
  font-size: 11px;
  font-weight: 800;
  color: #ffd700;
  letter-spacing: 0.3px;
  flex-shrink: 0;
  white-space: nowrap;
}

.user-nick-text {
  font-size: 12px;
  font-weight: 700;
  color: #f8fafc;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  min-width: 24px;
  flex: 0 1 auto;
}

.user-role-pill {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  font-size: 10px;
  font-weight: 700;
  padding: 1px 6px;
  border-radius: 4px;
  flex-shrink: 0;
  white-space: nowrap;
}

.user-role-pill.admin {
  background: rgba(56, 189, 248, 0.15);
  border: 1px solid rgba(56, 189, 248, 0.4);
  color: #38bdf8;
}

.user-role-pill.leader {
  background: rgba(234, 179, 8, 0.15);
  border: 1px solid rgba(234, 179, 8, 0.45);
  color: #fde047;
}

.user-role-pill.officer {
  background: rgba(168, 85, 247, 0.15);
  border: 1px solid rgba(168, 85, 247, 0.4);
  color: #d8b4fe;
}

.user-role-pill.member {
  background: rgba(34, 197, 94, 0.12);
  border: 1px solid rgba(34, 197, 94, 0.35);
  color: #86efac;
}

.user-role-pill.viewer {
  background: rgba(148, 163, 184, 0.12);
  border: 1px solid rgba(148, 163, 184, 0.3);
  color: #cbd5e1;
}

.hud-clock {
  font-size: 12px;
  font-weight: 700;
  color: #f8fafc;
  font-family: ui-monospace, monospace;
  letter-spacing: 0.5px;
  flex-shrink: 0;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}

.hud-btn-group {
  display: flex;
  align-items: center;
  gap: 4px;
  flex-shrink: 0;
}

.hud-mini-btn {
  width: 28px;
  height: 28px;
  flex-shrink: 0;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: #cbd5e1;
  font-size: 13px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  padding: 0;
  transition: all 0.15s;
}

.hud-mini-btn:hover {
  background: rgba(212, 175, 55, 0.18);
  border-color: rgba(212, 175, 55, 0.45);
  color: #fff;
}

.hud-mini-btn.logout:hover {
  background: rgba(239, 68, 68, 0.2);
  border-color: rgba(239, 68, 68, 0.5);
}

.hud-status-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  display: inline-block;
  flex-shrink: 0;
}

.hud-status-dot.online {
  background: #22c55e;
  box-shadow: 0 0 6px rgba(34, 197, 94, 0.9);
}

/* --- Content + map background: высоту колонки задаёт JS (fitPanelsHeight, px),
   отступы согласованы со всеми краями и HUD (12px периметр, 12px зазор под .map-hud-top).
   Правый отступ 12px — ровно под .map-hud-top. --- */
.admin-content { position: relative; padding: 62px 12px 12px; }
/* Статичный фон карты: привязан к вьюпорту (не тянется за скроллом),
   чуть увеличен и с растворёнными краями — резких обрывов нет.
   Текстура из радара; если модуль радара отсутствует — тихо деградирует в фон. */
.admin-map-bg {
  position: fixed;
  inset: 0;
  background-color: var(--adm-surface-1);
  background-image: url('/radar/images/WorldMap_Continent_D.webp');
  background-size: cover;
  background-position: 55% 45%;
  opacity: 0.16;
  filter: saturate(0.7);
  transform: scale(1.18);
  -webkit-mask-image: radial-gradient(ellipse at center, #000 45%, transparent 95%);
  mask-image: radial-gradient(ellipse at center, #000 45%, transparent 95%);
  pointer-events: none;
}

/* Панели, формы и строки управления (min-height ставит JS инлайном — см. fitPanelsHeight) */
.admin-panels { position: relative; display: flex; flex-direction: column; gap: 12px; }
/* Последняя панель тянется до низа вьюпорта — колонка всегда в полную высоту.
   Дашборд распределяет свои секции по высоте, чтобы не было пустоты внутри. */
.admin-panels > .admin-panel:last-child { flex: 1; }
#adminDashboardPanel {
  display: flex;
  flex-direction: column;
  justify-content: space-evenly;
}
/* Таб-панели — то же распределение, но safe: длинные списки (вары, журнал)
   откатываются к потоку сверху и никогда не обрезаются скроллом. */
#adminTabPanel {
  display: flex;
  flex-direction: column;
  justify-content: safe space-evenly;
}
/* Панели в языке радара: обсидиановый градиент + золотая рамка (как .user-clan-bar).
   Стекло .80/.85 — карта проступает; левая колонка (.sidebar) плотная, как везде. */
.admin-panel {
  background: linear-gradient(180deg, rgba(14, 18, 26, 0.80) 0%, rgba(8, 10, 15, 0.85) 100%);
  border: 1px solid rgba(212, 175, 55, 0.35);
  border-radius: 8px;
  box-shadow: 0 4px 18px rgba(0, 0, 0, 0.45);
  padding: 14px;
}
.admin-panel h3 { margin: 0 0 10px 0; font-size: 14px; color: var(--adm-gold); letter-spacing: 0.3px; }
.admin-panel p, .admin-panel li { font-size: 12.5px; color: var(--adm-text); }
.admin-muted { color: var(--adm-muted); font-size: 12px; }
.admin-stats { display: flex; gap: 8px; flex-wrap: wrap; }
.admin-stat {
  background: var(--adm-well);
  border: 1px solid var(--adm-border);
  border-radius: 8px;
  padding: 8px 12px;
  font-size: 12px;
}
.admin-stat b { color: var(--adm-gold); font-size: 15px; display: block; }
.admin-announce { border-left: 3px solid var(--adm-gold-dim); padding: 6px 10px; margin-bottom: 8px; background: var(--adm-well); border-radius: 0 6px 6px 0; font-size: 12.5px; }
/* Карточки объявлений дашборда: текст + тихая строка автора/срока. Ссылки золотистые. */
.announce-card { border-left: 3px solid var(--adm-gold-dim); padding: 6px 10px; margin-bottom: 8px; background: var(--adm-well); border-radius: 0 6px 6px 0; }
.announce-card .announce-text { font-size: 12.5px; color: var(--adm-text); white-space: pre-wrap; word-break: break-word; }
.announce-card a { color: var(--adm-gold); }
.announce-card .announce-meta { font-size: 11px; margin-top: 2px; }
/* Тонкий золотой разделитель между секциями (Объявления / Расписание). */
.announce-div { height: 1px; margin: 4px 4% 10px; background: linear-gradient(90deg, transparent, rgba(212, 175, 55, 0.5), transparent); }
.admin-sub { margin: 0 0 8px 0; font-size: 13px; color: var(--adm-gold); }
/* Ряд кнопок расписания: черновые слева, эталон+сохранение справа, единая высота. */
.sched-btn-row { display: flex; gap: 8px; margin: 8px 0; flex-wrap: wrap; align-items: center; }
.sched-btn-row .admin-btn { height: 34px; box-sizing: border-box; display: inline-flex; align-items: center; justify-content: center; gap: 6px; }
.sched-btn-spacer { flex: 1 1 auto; }
/* Вкладка объявлений: TTL-ряд и кнопки — тот же язык, что у расписания. */
.ann-ttl-row { display: flex; align-items: center; gap: 12px; margin: 8px 0; flex-wrap: wrap; }
.ann-ttl-hours { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; color: #cbd5e1; }
.ann-ttl-hours .admin-input { width: 90px; flex: 0 0 auto; }
.ann-btn-row { display: flex; gap: 8px; margin: 8px 0; flex-wrap: wrap; align-items: center; }
.ann-btn-row .admin-btn { height: 34px; box-sizing: border-box; display: inline-flex; align-items: center; justify-content: center; gap: 6px; }
/* Недельное расписание — ЕДИНЫЙ <table>: колонки общие на всю таблицу,
   левый край совпадает по построению. Пустой день — голый <td> без объёма. */
.sched-scroll { overflow-x: auto; padding-bottom: 4px; }
table.sched-table { width: 100%; table-layout: fixed; border-collapse: collapse; }
.sched-table col.sched-guttercol { width: 68px; }
/* Сегодня красится целиком через <col> — непрерывно сверху вниз, без секций. */
.sched-table col.is-today { background: rgba(212, 175, 55, 0.12); }
.sched-table th, .sched-table td { padding: 0; vertical-align: middle; }
.sched-corner { width: 68px; }
.sched-day-h { font-size: 11px; font-weight: 700; color: var(--adm-gold); text-align: center; padding: 2px 0; }
.sched-day-h.is-today { color: #ffe9a8; background: rgba(212, 175, 55, 0.22); border: 1px solid rgba(255, 215, 0, 0.65); border-radius: 6px; text-shadow: none; }
.sched-tlabel { font-size: 10px; font-weight: 700; font-variant-numeric: tabular-nums; color: #e2e8f0; white-space: nowrap; text-align: left; vertical-align: top; padding-top: 4px !important; }
/* Дневные ячейки: рамка рисует общую сетку; контент вертикально по центру.
   Паддинг td — строго 0 (как у полос): цветные кромки внутреннего контента
   стоят ровно на границе колонки во всех строках. */
.sched-table td.sched-tday { border: 1px solid var(--adm-border); border-radius: 0; padding: 0; }
.sched-table td.sched-tempty { border: 1px solid rgba(255, 255, 255, 0.07); padding: 0; }
.sched-table td.sched-bandcell { border: 1px solid var(--adm-border); padding: 0; }
/* Полоса через все даты в строке своего времени: время всегда в gutter слева,
   в полосе только текст по центру. Footnote-заметки — мелко под таблицей. */
.sched-band { display: block; text-align: center; font-size: 10.5px; line-height: 1.4; padding: 2px 8px; border-radius: 0; border-left: 3px solid #64748b; background: rgba(255, 255, 255, 0.03); word-break: break-word; }
.sched-band.footnote { font-size: 10px; line-height: 1.4; text-align: left; justify-content: flex-start; opacity: 0.9; margin-top: 3px; }
.sched-cell { font-size: 10.5px; padding: 2px 6px; margin-bottom: 2px; border-radius: 0; border-left: 3px solid #64748b; background: rgba(255, 255, 255, 0.03); word-break: break-word; }
.sched-cell:last-child { margin-bottom: 0; }
/* Цвет несёт смысл (как в таблице лидера): мягкая подложка + цветной текст.
   Альфа низкая, чтобы 7 колонок не пестрили. */
.sched-cell.color-blue, .sched-band.color-blue { border-left-color: #38bdf8; background: rgba(56, 189, 248, 0.10); color: #7dd3fc; }
.sched-cell.color-red, .sched-band.color-red { border-left-color: #ef4444; background: rgba(239, 68, 68, 0.10); color: #fca5a5; }
.sched-cell.color-green, .sched-band.color-green { border-left-color: #22c55e; background: rgba(34, 197, 94, 0.10); color: #86efac; }
.sched-cell.color-purple, .sched-band.color-purple { border-left-color: #a855f7; background: rgba(168, 85, 247, 0.12); color: #d8b4fe; }
.sched-cell.color-yellow, .sched-band.color-yellow { border-left-color: #eab308; background: rgba(234, 179, 8, 0.12); color: #fde047; }
.sched-dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: #64748b; vertical-align: baseline; }
.sched-dot.color-blue { background: #38bdf8; }
.sched-dot.color-red { background: #ef4444; }
.sched-dot.color-green { background: #22c55e; }
.sched-dot.color-purple { background: #a855f7; }
.sched-dot.color-yellow { background: #eab308; }
@media (max-width: 900px) {
  /* Та же таблица, свайп по горизонтали: время прилипает слева. */
  table.sched-table { min-width: 1050px; }
  .sched-table .sched-corner, .sched-table th.sched-tlabel { position: sticky; left: 0; background: #10141c; z-index: 1; }
}

/* --- Controls --- */
.admin-input {
  width: 100%;
  background: var(--adm-well);
  border: 1px solid var(--adm-input-border);
  color: var(--adm-text);
  border-radius: 6px;
  padding: 7px 9px;
  font-size: 12.5px;
}
.admin-input:focus {
  outline: none;
  border-color: #e6c875;
  box-shadow: 0 0 10px rgba(212, 175, 55, 0.2);
}
select.admin-input {
  appearance: none;
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23d4af37' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 10px center;
  padding-right: 28px !important;
  cursor: pointer;
}
select.admin-input option {
  background: #0f141f;
  color: #e2e8f0;
}
.admin-btn {
  background: linear-gradient(180deg, #1e2636, #151b26);
  border: 1px solid rgba(212, 175, 55, 0.35);
  color: #f1f5f9;
  border-radius: 6px;
  padding: 8px 12px;
  font-size: 12.5px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
}
.admin-btn:hover {
  border-color: var(--adm-gold-dim);
  color: var(--adm-gold);
}
.admin-btn.primary { background: linear-gradient(180deg, #0369a1, #075985); border-color: #0284c7; color: #fff; font-weight: 700; }
.admin-btn.primary:hover { border-color: #38bdf8; color: #fff; }
.admin-btn.small { padding: 5px 10px; font-size: 11.5px; }
.admin-btn.danger { border-color: rgba(239, 68, 68, 0.5); color: #fca5a5; background: linear-gradient(180deg, #2a1215, #1a0d10); }
.admin-btn.gold {
  background: linear-gradient(180deg, #322510, #1c1408);
  border-color: rgba(212, 175, 55, 0.7);
  color: #fef08a;
  font-weight: 700;
}
.admin-btn.gold:hover {
  background: linear-gradient(180deg, #483516, #2a1f0c);
  border-color: #ffd700;
  color: #fff;
  box-shadow: 0 0 10px rgba(212, 175, 55, 0.35);
}
.admin-profile-grid { display: flex; flex-direction: column; gap: 10px; }
.admin-kv { display: flex; justify-content: space-between; gap: 8px; font-size: 12.5px; }
.admin-kv span:first-child { color: var(--adm-muted); }
.admin-check { display: flex; align-items: center; gap: 8px; font-size: 12.5px; cursor: pointer; }
.admin-form-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 8px;
}
.admin-form-grid label {
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 11.5px;
  color: var(--adm-muted);
}
/* Таб «Радар и звуки»: строка = подпись + select с кнопкой ▶; TTL отдельно; Save компактно. */
.sound-row { margin-bottom: 10px; }
.sound-row label {
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 11.5px;
  color: var(--adm-muted);
}
.sound-ctrl { display: flex; gap: 8px; align-items: stretch; }
.sound-ctrl .admin-input { flex: 1; min-width: 0; }
.preview-btn {
  flex: 0 0 44px;
  padding: 7px 0;
  font-size: 14px;
  line-height: 1;
}
.sound-ttl .admin-muted { margin-top: 4px; }
.sound-ttl .admin-input { max-width: 220px; }
.sound-actions { display: flex; align-items: center; gap: 10px; margin-top: 4px; flex-wrap: wrap; }
.sound-actions .admin-btn.primary { flex: 0 0 auto; padding: 8px 22px; }
/* Таб «Система» → Telegram: 3 подсекции вместо плоской сетки.
   Чекбоксы — темные с золотой галкой через .admin-check (как Олимп),
   секции делит .announce-div (золотая полоса дашборда). */
.tg-block { display: flex; flex-direction: column; gap: 2px; }
.tg-block .admin-sub { margin-top: 10px; }
.tg-block .admin-sub:first-of-type { margin-top: 2px; }
.tg-switch { display: flex; align-items: flex-start; gap: 10px; cursor: pointer; padding: 9px 12px; background: var(--adm-well); border: 1px solid var(--adm-border); border-radius: 8px; }
.tg-switch.admin-check input[type="checkbox"], .tg-check.admin-check input[type="checkbox"] { margin-right: 0; }
.tg-switch strong { display: block; font-size: 13px; color: var(--adm-text); }
.tg-switch-hint { display: block; margin-top: 1px; font-size: 11px; }
.tg-switch:has(input:checked) { border-color: rgba(212, 175, 55, 0.6); background: rgba(212, 175, 55, 0.1); }
.tg-connect { margin-top: 8px; }
.tg-token-box { display: flex; flex-direction: column; gap: 6px; }
.tg-token-row { display: flex; gap: 6px; align-items: baseline; flex-wrap: wrap; font-size: 12px; }
.tg-token-row .admin-input { flex: 1; min-width: 0; }
.tg-token-edit { display: flex; flex-direction: column; gap: 4px; }
.tg-token-edit[hidden] { display: none; }
/* Тихий статус токена: текст как profile-online-indicator, без пилюли. */
.tg-token-state { color: var(--adm-muted); }
.tg-token-state.is-set { color: #86efac; }
.tg-link-btn { background: none; border: none; padding: 0; color: var(--adm-muted); font-size: 12px; text-decoration: underline; text-underline-offset: 2px; cursor: pointer; }
.tg-link-btn:hover { color: var(--adm-gold); }
.tg-hint { margin-top: 2px; font-size: 11px; }
.tg-delivery { margin-top: 2px; }
.tg-delivery label.is-disabled { opacity: 0.45; }
.tg-delivery .admin-input:disabled { opacity: 0.55; cursor: not-allowed; }
.tg-checks-title { margin: 10px 0 6px; }
.tg-checks { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.tg-check { display: flex; align-items: flex-start; gap: 8px; cursor: pointer; padding: 8px 10px; background: var(--adm-well); border: 1px solid var(--adm-border); border-radius: 8px; font-size: 12px; }
.tg-check:hover { border-color: rgba(212, 175, 55, 0.5); }
.tg-check:has(input:checked) { border-color: var(--adm-gold); background: rgba(212, 175, 55, 0.12); }
.tg-check strong { display: block; color: var(--adm-text); font-size: 12.5px; }
.tg-check .admin-muted { display: block; margin-top: 1px; font-size: 11px; }
.tg-actions { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin-top: 2px; }
.tg-actions .admin-btn { height: 34px; box-sizing: border-box; display: inline-flex; align-items: center; justify-content: center; gap: 6px; }
.tg-actions .admin-btn.small:disabled { opacity: 0.45; cursor: not-allowed; }
.tg-status { margin-top: 10px; padding: 10px 12px; background: rgba(15, 23, 42, 0.6); border: 1px solid rgba(148, 163, 184, 0.15); border-radius: 8px; font-size: 12px; }
.tg-status-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; flex-wrap: wrap; }
.tg-status-id { display: flex; align-items: center; gap: 6px; min-width: 0; flex-wrap: wrap; }
.tg-dot.ok { color: #22c55e; font-weight: 700; }
.tg-status-ok { color: #22c55e; font-weight: 700; }
.tg-link { color: #60a5fa; text-decoration: underline; }
.tg-code { user-select: all; }
.tg-status-sub { margin-top: 4px; }
.tg-status-err { color: #ef4444; font-weight: 700; }
.tg-status-err-text { margin-top: 2px; color: #fca5a5; }
.tg-status-pending { color: #f59e0b; }
.admin-badge { display: inline-flex; align-items: center; padding: 2px 10px; border: 1px solid var(--adm-border); border-radius: 999px; font-size: 11.5px; font-weight: 700; white-space: nowrap; }
.admin-badge.ok { background: rgba(34, 197, 94, 0.15); border-color: rgba(34, 197, 94, 0.4); color: #86efac; }
@media (max-width: 680px) {
  .tg-checks { grid-template-columns: 1fr; }
  .tg-actions .admin-btn.primary { width: 100%; }
}
/* Суб-табы «Боевого радара»: вложенный уровень под главной плиткой, компактнее. */
.sub-tabs { display: flex; gap: 6px; margin: 2px 0 12px; }
.sub-tab-btn {
  flex: 1 1 0;
  padding: 7px 8px;
  background: transparent;
  border: 1px solid var(--adm-border);
  border-radius: 6px;
  color: var(--adm-muted);
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.15s ease;
}
.sub-tab-btn:hover { color: #fff; background: rgba(255, 255, 255, 0.05); }
.sub-tab-btn.active {
  background: rgba(212, 175, 55, 0.18);
  border-color: rgba(212, 175, 55, 0.4);
  color: var(--adm-gold);
}
/* Секция «Мастер-данжи и арены»: карточка на данж, поля 2-в-ряд, мобилка 1-в-ряд. */
.dg-list { display: flex; flex-direction: column; gap: 10px; margin-bottom: 10px; }
.dg-card {
  background: var(--adm-well);
  border: 1px solid var(--adm-border);
  border-radius: 8px;
  padding: 10px 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.dg-card:hover { border-color: rgba(56, 184, 248, 0.5); }
.dg-card.dg-new { border-color: rgba(212, 175, 55, 0.6); border-style: dashed; }
.dg-head { display: flex; justify-content: space-between; align-items: center; gap: 8px; font-size: 12.5px; }
.dg-head > div { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dg-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.dg-grid label {
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 11.5px;
  color: var(--adm-muted);
  min-width: 0;
}
.dg-zones-label {
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 11.5px;
  color: var(--adm-muted);
}
.dg-zones { font-family: monospace; font-size: 11.5px; line-height: 1.5; resize: vertical; }
.dg-card-actions { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.dg-card-actions .dg-preset { flex: 1 1 160px; min-width: 0; }
.dg-card-actions .admin-btn { flex: 0 0 auto; }
.dg-msg { flex-basis: 100%; }
@media (max-width: 560px) {
  .dg-grid { grid-template-columns: 1fr; }
}
.admin-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  background: var(--adm-well);
  border: 1px solid var(--adm-border);
  border-radius: 6px;
  padding: 7px 9px;
  font-size: 12.5px;
  margin-bottom: 6px;
}
.admin-row:hover { border-color: rgba(56, 184, 248, 0.5); }
.admin-row.is-expired { opacity: 0.55; }

/* --- Member card modal --- */
.admin-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(4, 6, 10, 0.72);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 3000;
  padding: 16px;
}
.admin-modal {
  background: var(--adm-surface-1);
  border: 1px solid var(--adm-gold-dim);
  border-radius: 10px;
  padding: 16px;
  width: 100%;
  max-width: 420px;
  max-height: calc(100dvh - 40px);
  overflow-y: auto;
}
.admin-modal h3 { color: var(--adm-gold); font-size: 15px; }

/* --- Member Card Modal Refinement --- */
.admin-modal.member-card-modal {
  max-width: 460px;
  background: linear-gradient(180deg, #131722 0%, #0d1017 100%);
  border: 1px solid rgba(212, 175, 55, 0.45);
  box-shadow: 0 10px 32px rgba(0, 0, 0, 0.8), 0 0 16px rgba(212, 175, 55, 0.12);
  padding: 16px 18px;
}
.member-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding-bottom: 10px;
  border-bottom: 1px solid rgba(212, 175, 55, 0.25);
  margin-bottom: 12px;
}
.member-card-title-group {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.member-card-title {
  font-size: 16px;
  font-weight: 800;
  color: var(--adm-gold);
  letter-spacing: 0.03em;
}
.member-info-strip {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  background: rgba(0, 0, 0, 0.4);
  border: 1px solid var(--adm-border);
  border-radius: 6px;
  padding: 8px 12px;
  margin-bottom: 14px;
}
.member-info-item {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.member-info-label {
  font-size: 10.5px;
  color: var(--adm-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.member-info-val {
  font-size: 12.5px;
  font-weight: 700;
  color: #f1f5f9;
}
.badge-revoked {
  font-size: 10px;
  color: #ef4444;
  background: rgba(239, 68, 68, 0.15);
  padding: 1px 5px;
  border-radius: 3px;
  margin-left: 4px;
}
.member-card-section {
  margin-bottom: 14px;
}
.member-card-section-title {
  font-size: 12px;
  font-weight: 700;
  color: var(--adm-gold);
  letter-spacing: 0.04em;
  margin-bottom: 6px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.member-name-tag-row {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 8px;
  align-items: end;
}
.member-field-label {
  font-size: 11.5px;
  color: var(--adm-muted);
  margin-bottom: 4px;
  display: block;
}
.member-card-actions {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px dashed rgba(255, 255, 255, 0.12);
}
.member-card-actions .admin-btn {
  width: 100%;
  text-align: center;
  padding: 8px 6px;
  font-size: 11px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  white-space: nowrap;
}

/* --- Mobile drawer (точная копия поведения ≤768px) --- */
.mobile-menu-btn { display: none; }
.mobile-drawer-backdrop { display: none; }

@media (max-width: 768px) {
  .l2m-admin-body {
    overflow: hidden;
  }

  .map-container {
    width: 100vw !important;
    height: 100vh !important;
    height: 100dvh !important;
    flex: 1 1 100% !important;
    position: relative !important;
    overflow: hidden !important;
    overflow-y: auto !important;
  }

  /* Off-Canvas Sidebar Drawer */
  .sidebar {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    bottom: 0 !important;
    width: min(340px, 86vw) !important;
    height: 100vh !important;
    height: 100dvh !important;
    flex: none !important;
    z-index: 2000 !important;
    transform: translateX(-100%) !important;
    transition: transform 0.28s cubic-bezier(0.33, 1, 0.68, 1) !important;
    box-shadow: none !important;
    visibility: hidden !important;
  }

  .sidebar.is-open {
    transform: translateX(0) !important;
    visibility: visible !important;
    box-shadow: 6px 0 35px rgba(0, 0, 0, 0.95), 0 0 25px rgba(212, 175, 55, 0.25) !important;
  }

  /* Drawer Backdrop */
  .mobile-drawer-backdrop {
    display: block !important;
    position: fixed;
    inset: 0;
    background: rgba(4, 7, 12, 0.78);
    z-index: 1999;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.25s ease;
  }

  .mobile-drawer-backdrop.is-active {
    opacity: 1;
    pointer-events: auto;
  }

  /* Drawer Header with Close Button */
  .sidebar .header {
    justify-content: center;
    padding: 10px 14px;
    position: relative;
  }

  .drawer-close-btn {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 6px;
    color: #94a3b8;
    font-size: 22px;
    cursor: pointer;
    line-height: 1;
    transition: all 0.18s;
  }

  .drawer-close-btn:hover,
  .drawer-close-btn:active {
    background: rgba(239, 68, 68, 0.25);
    color: #fca5a5;
    border-color: #ef4444;
  }

  /* Mobile Menu Opener Button (Top-Left) */
  .mobile-menu-btn {
    display: inline-flex !important;
    position: absolute;
    top: 12px;
    left: 12px;
    z-index: 1200;
    align-items: center;
    gap: 5px;
    height: 38px;
    padding: 0 10px;
    box-sizing: border-box;
    white-space: nowrap;
    background: rgba(13, 17, 26, 0.94);
    border: 1px solid rgba(212, 175, 55, 0.4);
    border-radius: 8px;
    color: #ffd700;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.5px;
    box-shadow: 0 4px 18px rgba(0, 0, 0, 0.55);
    cursor: pointer;
    user-select: none;
    transition: all 0.18s;
  }

  .mobile-menu-btn:hover,
  .mobile-menu-btn:active {
    background: rgba(24, 32, 48, 0.98);
    border-color: #d4af37;
    color: #fff;
    transform: scale(0.97);
  }

  .mobile-menu-btn .menu-icon {
    font-size: 15px;
    line-height: 1;
  }

  /* Top Right HUD: стандартные 320px, упирается в гамбургер на узких экранах */
  .map-hud-top {
    top: 12px !important;
    right: 12px !important;
    z-index: 1200 !important;
    width: 320px !important;
    max-width: calc(100vw - 116px) !important;
  }

  .user-badge {
    font-size: 11px !important;
    gap: 4px !important;
  }

  .user-clan-tag {
    font-size: 10px !important;
  }

  .user-role-pill {
    font-size: 9px !important;
    padding: 1px 4px !important;
  }

  .user-nick-text {
    font-size: 11.5px !important;
    min-width: 18px !important;
    flex: 1 1 auto !important;
  }

  .hud-clock {
    font-size: 11px !important;
  }

  .admin-content { padding: 60px 10px 10px; }
}

/* --- Olympiad Module Redesign (Tactical HUD Roster & Matrix) --- */

/* Unified Compact Single-Row Toolbar */
.olymp-toolbar {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  background: rgba(0, 0, 0, 0.45);
  border: 1px solid var(--adm-border);
  border-radius: 8px;
  padding: 8px 12px;
  margin-bottom: 12px;
}
.olymp-season-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}
.olymp-toolbar-label {
  font-size: 11px;
  font-weight: 700;
  color: var(--adm-gold);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  white-space: nowrap;
  line-height: 1;
}
.olymp-season-select {
  height: 34px !important;
  box-sizing: border-box !important;
  min-width: 145px;
  max-width: 185px;
  padding: 0 28px 0 10px !important;
  font-weight: 600;
  font-size: 12.5px !important;
  line-height: 32px !important;
  border-radius: 6px;
  background-color: #0f141f;
  border: 1px solid rgba(212, 175, 55, 0.3);
  color: var(--adm-text);
  outline: none;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.olymp-search-wrap {
  flex: 1 1 180px;
  min-width: 150px;
  display: flex;
  align-items: center;
}
.olymp-search-wrap .admin-input {
  width: 100%;
  height: 34px !important;
  box-sizing: border-box !important;
  padding: 0 12px !important;
  font-size: 12.5px !important;
  line-height: 32px !important;
  border-radius: 6px;
  background-color: #0f141f;
  border: 1px solid rgba(212, 175, 55, 0.3);
  color: var(--adm-text);
  outline: none;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.olymp-clan-filter {
  height: 34px !important;
  box-sizing: border-box !important;
  max-width: 140px;
  flex-shrink: 0;
  padding: 0 28px 0 10px !important;
  font-size: 12.5px !important;
  line-height: 32px !important;
  border-radius: 6px;
  background-color: #0f141f;
  border: 1px solid rgba(212, 175, 55, 0.3);
  color: var(--adm-text);
  outline: none;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.olymp-season-select:hover,
.olymp-clan-filter:hover,
.olymp-search-wrap .admin-input:hover {
  border-color: rgba(212, 175, 55, 0.55);
}
.olymp-season-select:focus,
.olymp-clan-filter:focus,
.olymp-search-wrap .admin-input:focus {
  border-color: #e6c875;
  box-shadow: 0 0 8px rgba(212, 175, 55, 0.25);
}
.olymp-open-only {
  height: 34px;
  box-sizing: border-box;
  white-space: nowrap;
  font-size: 12.5px;
  color: #cbd5e1;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  user-select: none;
  flex-shrink: 0;
  margin: 0;
  padding: 0 6px;
}
.olymp-open-only input[type="checkbox"] {
  width: 15px;
  height: 15px;
  margin: 0;
  cursor: pointer;
  accent-color: var(--adm-gold);
}
.olymp-toolbar-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-left: auto;
  flex-shrink: 0;
}
.olymp-toolbar-actions .admin-btn {
  height: 34px;
  box-sizing: border-box;
  padding: 0 12px;
  font-size: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  white-space: nowrap;
  border-radius: 6px;
  line-height: 1;
}

/* Olympian Group Cards */
.olymp-group {
  background: linear-gradient(180deg, #131722 0%, #0d1017 100%);
  border: 1px solid rgba(212, 175, 55, 0.22);
  border-radius: 8px;
  margin-bottom: 8px;
  overflow: hidden;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.35);
  transition: border-color 0.18s, box-shadow 0.18s;
}
.olymp-group:hover {
  border-color: rgba(212, 175, 55, 0.42);
}
.olymp-group.closed {
  opacity: 0.82;
}
.olymp-group.unknown .olymp-group-head {
  cursor: default;
}

.olymp-group-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 14px;
  background: rgba(255, 255, 255, 0.02);
  cursor: pointer;
  user-select: none;
  transition: background 0.15s;
}
.olymp-group-head:hover {
  background: rgba(212, 175, 55, 0.05);
}

.olymp-head-left {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 170px;
  flex-shrink: 0;
}
.olymp-toggle-arrow {
  display: inline-block;
  width: 14px;
  font-size: 13px;
  color: var(--adm-gold);
  line-height: 1;
  transition: transform 0.2s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.olymp-toggle-arrow.open {
  transform: rotate(90deg);
}
.olymp-owner-nick {
  font-size: 13.5px;
  font-weight: 700;
  color: #f8fafc;
  letter-spacing: 0.02em;
}

/* Alt chips inside group header */
.olymp-head-chips {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
  flex: 1;
  min-width: 0;
}
.olymp-alt-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 8px;
  background: rgba(0, 0, 0, 0.5);
  border: 1px solid rgba(212, 175, 55, 0.25);
  border-radius: 5px;
  font-size: 11px;
  transition: all 0.15s;
}
.olymp-alt-chip:hover {
  border-color: rgba(212, 175, 55, 0.55);
  background: rgba(0, 0, 0, 0.7);
}
.olymp-alt-chip.done {
  border-color: rgba(16, 185, 129, 0.45);
  background: rgba(16, 185, 129, 0.08);
}
.olymp-alt-chip.part {
  border-color: rgba(245, 158, 11, 0.45);
  background: rgba(245, 158, 11, 0.08);
}
.olymp-chip-clan {
  font-weight: 700;
  color: var(--adm-gold);
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  background: rgba(212, 175, 55, 0.1);
  padding: 1px 4px;
  border-radius: 3px;
}
.olymp-chip-name {
  color: #f1f5f9;
  font-weight: 600;
}
.olymp-chip-bars {
  display: inline-flex;
  gap: 2px;
  align-items: center;
  margin: 0 1px;
}
.olymp-seg-bar {
  width: 4px;
  height: 9px;
  border-radius: 1.5px;
  background: rgba(255, 255, 255, 0.14);
}
.olymp-seg-bar.filled {
  background: var(--adm-gold);
  box-shadow: 0 0 4px rgba(255, 215, 0, 0.45);
}
.olymp-alt-chip.done .olymp-seg-bar.filled {
  background: #10b981;
  box-shadow: 0 0 4px rgba(16, 185, 129, 0.45);
}
.olymp-chip-score {
  font-size: 10.5px;
  font-weight: 700;
  color: #94a3b8;
  font-variant-numeric: tabular-nums;
}
.olymp-alt-chip.done .olymp-chip-score {
  color: #4ade80;
}
.olymp-empty-alts {
  font-size: 11px;
  color: var(--adm-muted);
  font-style: italic;
  opacity: 0.7;
}

/* Head Right Summary */
.olymp-head-right {
  flex-shrink: 0;
}
.olymp-summary-tag {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.02em;
}
.olymp-summary-tag.done {
  background: rgba(16, 185, 129, 0.15);
  border: 1px solid rgba(16, 185, 129, 0.4);
  color: #4ade80;
}
.olymp-summary-tag.part {
  background: rgba(245, 158, 11, 0.12);
  border: 1px solid rgba(245, 158, 11, 0.35);
  color: #fbbf24;
}
.olymp-summary-tag.empty {
  color: #64748b;
  font-size: 11px;
}

/* Expanded Group Body Table */
.olymp-group-body {
  padding: 6px 12px 10px;
  background: rgba(0, 0, 0, 0.28);
  border-top: 1px solid rgba(212, 175, 55, 0.15);
}
.olymp-table-header {
  display: grid;
  grid-template-columns: minmax(140px, 200px) minmax(110px, 150px) minmax(130px, 170px) 90px;
  gap: 12px;
  padding: 6px 10px;
  font-size: 10.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--adm-muted);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  margin-bottom: 4px;
}
.olymp-row {
  display: grid;
  grid-template-columns: minmax(140px, 200px) minmax(110px, 150px) minmax(130px, 170px) 90px;
  gap: 12px;
  align-items: center;
  padding: 7px 10px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
  border-radius: 4px;
  transition: background 0.15s;
}
.olymp-row:last-child {
  border-bottom: none;
}
.olymp-row:hover {
  background: rgba(255, 255, 255, 0.03);
}
.olymp-row.done {
  opacity: 0.85;
}
.olymp-c-nick {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-weight: 600;
  color: #f8fafc;
  font-size: 13px;
}
.olymp-c-clan {
  display: flex;
  align-items: center;
}
.olymp-c-prog {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.olymp-c-prog .olymp-bar {
  width: 60px;
  height: 6px;
  border-radius: 3px;
  background: rgba(255, 255, 255, 0.1);
  overflow: hidden;
  flex: none;
}
.olymp-c-prog b {
  font-variant-numeric: tabular-nums;
  font-size: 12px;
  min-width: 34px;
  color: #cbd5e1;
}
.olymp-c-st {
  text-align: left;
}
.olymp-badge-done {
  color: #4ade80;
  font-weight: 700;
  font-size: 11.5px;
}
.olymp-badge-part {
  color: #fbbf24;
  font-weight: 700;
  font-size: 11.5px;
}
.olymp-badge-zero {
  color: #64748b;
  font-size: 11.5px;
}

@media (max-width: 768px) {
  .olymp-group-head {
    flex-wrap: wrap;
    gap: 8px;
  }
  .olymp-head-left {
    min-width: 0;
  }
  .olymp-head-chips {
    order: 3;
    width: 100%;
  }
  .olymp-head-right {
    margin-left: auto;
  }
  .olymp-table-header {
    display: none;
  }
  .olymp-row {
    grid-template-columns: 1fr auto auto;
    gap: 8px;
  }
  .olymp-c-clan {
    grid-column: span 1;
  }
}

/* Настройки олимпа: золотые заголовки карточек отличают настройки от данных. */
#olympConfig .olymp-card-title { color: var(--adm-gold); }
/* Matrix Table Wrap & Responsive Scrolling */
.olymp-matrix-wrap {
  width: 100%;
  overflow-x: auto;
  background: rgba(15, 23, 42, 0.4);
  border: 1px solid rgba(212, 175, 55, 0.22);
  border-radius: 8px;
  margin-bottom: 12px;
  box-shadow: 0 4px 18px rgba(0, 0, 0, 0.35);
  -webkit-overflow-scrolling: touch;
}
.olymp-matrix {
  border-collapse: separate;
  border-spacing: 0;
  width: 100%;
  min-width: 680px;
  font-size: 12.5px;
}
.olymp-matrix th, .olymp-matrix td {
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  border-right: 1px solid rgba(255, 255, 255, 0.04);
  padding: 8px 10px;
  text-align: center;
  vertical-align: middle;
  white-space: nowrap;
}
.olymp-matrix thead th {
  background: #141824;
  color: #e2e8f0;
  font-weight: 700;
  font-size: 11.5px;
  letter-spacing: 0.03em;
  border-bottom: 2px solid rgba(212, 175, 55, 0.3);
  cursor: pointer;
  user-select: none;
  transition: background 0.15s, color 0.15s;
}
.olymp-matrix thead th:hover {
  background: #1a2030;
  color: var(--adm-gold);
}
.olymp-matrix thead th.sorted {
  color: var(--adm-gold);
  border-bottom-color: var(--adm-gold);
  background: rgba(212, 175, 55, 0.05);
}
.olymp-th-content {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}
.olymp-th-sub {
  font-size: 10px;
  font-weight: 500;
  color: #94a3b8;
  margin-top: 2px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.olymp-sort-icon {
  font-size: 11px;
  opacity: 0.35;
  transition: opacity 0.15s, color 0.15s;
}
.olymp-sort-icon.active {
  opacity: 1;
  color: var(--adm-gold);
  font-size: 12px;
}
.olymp-matrix thead th:hover .olymp-sort-icon {
  opacity: 0.85;
}

/* Unassigned Banner */
.olymp-unassigned-banner {
  display: flex;
  align-items: center;
  gap: 8px;
  background: linear-gradient(90deg, rgba(30, 24, 12, 0.95) 0%, rgba(20, 16, 9, 0.95) 100%);
  border: 1px solid rgba(245, 158, 11, 0.4);
  border-radius: 6px;
  padding: 8px 12px;
  margin-bottom: 10px;
  font-size: 11.5px;
  color: #fde68a;
  line-height: 1.45;
}
.olymp-unassigned-icon {
  font-size: 15px;
  flex-shrink: 0;
}
.olymp-unassigned-banner b {
  color: #fff;
}

/* Sticky First Column */
.olymp-matrix th.olymp-sticky, .olymp-matrix td.olymp-sticky {
  position: sticky;
  left: 0;
  background: #0f131d;
  text-align: left;
  min-width: 170px;
  max-width: 230px;
  z-index: 2;
  border-right: 2px solid rgba(212, 175, 55, 0.3);
  box-shadow: 4px 0 10px rgba(0, 0, 0, 0.45);
}
.olymp-matrix thead th.olymp-sticky {
  background: #141824;
  z-index: 3;
}
.olymp-matrix tfoot td.olymp-sticky {
  background: #141824;
  z-index: 3;
}
.olymp-matrix tbody tr:hover td {
  background: rgba(212, 175, 55, 0.04);
}
.olymp-matrix tbody tr:hover td.olymp-sticky {
  background: #161c2a;
}

/* Highlighted Column (e.g. Clan Filter active) */
.olymp-matrix th.highlight, .olymp-matrix td.highlight {
  background: rgba(212, 175, 55, 0.07) !important;
  border-left: 1px solid rgba(212, 175, 55, 0.35);
  border-right: 1px solid rgba(212, 175, 55, 0.35);
}

/* Cells & Badges */
.olymp-owner-cell {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.olymp-owner-name {
  font-weight: 700;
  color: #f8fafc;
  font-size: 13px;
}
.olymp-owner-sub-row {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
  margin-top: 2px;
}
.olymp-owner-sub {
  font-size: 10.5px;
  color: #94a3b8;
}
.olymp-unassigned-tag {
  background: rgba(245, 158, 11, 0.15);
  border: 1px solid rgba(245, 158, 11, 0.4);
  color: #fbbf24;
  font-size: 10px;
  font-weight: 700;
  padding: 1px 6px;
  border-radius: 4px;
  cursor: pointer;
  line-height: 1.3;
  transition: all 0.15s ease;
}
.olymp-unassigned-tag:hover {
  background: rgba(245, 158, 11, 0.3);
  border-color: #f59e0b;
  color: #fff;
}
.olymp-matrix-main {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 4px;
  font-weight: 700;
  font-size: 12px;
}
.olymp-matrix-main.played {
  background: rgba(56, 189, 248, 0.15);
  color: #38bdf8;
  border: 1px solid rgba(56, 189, 248, 0.3);
}
.olymp-matrix-main.zero {
  color: #64748b;
}
.olymp-cell-empty {
  color: #475569;
  font-size: 13px;
}

/* Stacked Alt Chips in Matrix Cell */
.olymp-matrix-alts {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 120px;
}
.olymp-matrix-chip {
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  padding: 3px 6px;
  background: rgba(0, 0, 0, 0.45);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 4px;
  font-size: 11px;
  cursor: default;
  transition: all 0.15s;
}
.olymp-matrix-chip[data-olymp-alt-manage] {
  cursor: pointer;
}
.olymp-matrix-chip[data-olymp-alt-manage]:hover {
  border-color: var(--adm-gold);
  background: rgba(0, 0, 0, 0.7);
}
.olymp-matrix-chip.done {
  border-color: rgba(16, 185, 129, 0.45);
  background: rgba(16, 185, 129, 0.08);
}
.olymp-matrix-chip.part {
  border-color: rgba(245, 158, 11, 0.45);
  background: rgba(245, 158, 11, 0.08);
}
.olymp-matrix-chip.zero {
  border-color: rgba(148, 163, 184, 0.18);
  background: rgba(0, 0, 0, 0.3);
}
.olymp-matrix-chip.masked {
  cursor: default;
}
.olymp-matrix-chip.masked:hover {
  border-color: rgba(255, 255, 255, 0.1);
  background: rgba(0, 0, 0, 0.45);
}
.olymp-mchip-nick {
  font-weight: 600;
  color: #f1f5f9;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 85px;
}
.olymp-mchip-bars {
  display: inline-flex;
  gap: 2px;
  align-items: center;
}
.olymp-mchip-val {
  font-size: 10px;
  font-weight: 700;
  color: #94a3b8;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.olymp-matrix-chip.done .olymp-mchip-val {
  color: #4ade80;
}

/* Total Summary in Matrix Row */
.olymp-matrix-total {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 8px;
  border-radius: 4px;
  font-size: 11.5px;
  font-weight: 700;
  white-space: nowrap;
}
.olymp-matrix-total.done {
  background: rgba(16, 185, 129, 0.15);
  border: 1px solid rgba(16, 185, 129, 0.4);
  color: #4ade80;
}
.olymp-matrix-total.part {
  background: rgba(245, 158, 11, 0.12);
  border: 1px solid rgba(245, 158, 11, 0.35);
  color: #fbbf24;
}
.olymp-matrix-total.zero {
  background: rgba(100, 116, 139, 0.1);
  border: 1px solid rgba(100, 116, 139, 0.25);
  color: #94a3b8;
}

/* Matrix Table Footer */
.olymp-matrix tfoot td {
  background: #141824;
  font-weight: 700;
  color: #e2e8f0;
  padding: 10px 12px;
  border-top: 2px solid rgba(212, 175, 55, 0.3);
  font-size: 11.5px;
}
.olymp-tf-sub {
  font-size: 10px;
  color: #94a3b8;
  font-weight: 400;
  margin-top: 2px;
}
/* Checkin Section & Cards */
.olymp-card {
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(15, 23, 42, 0.45);
  border-radius: 8px;
  padding: 10px 14px;
  margin-bottom: 8px;
}
.olymp-card-title {
  font-size: 12px;
  font-weight: 700;
  color: var(--adm-gold);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: 8px;
}

/* Section 1: Parameters (Grid alignment) */
.olymp-checkin-params-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  align-items: center;
}
@media (max-width: 600px) {
  .olymp-checkin-params-grid {
    grid-template-columns: 1fr;
    gap: 8px;
  }
}
.olymp-param-label {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0;
  cursor: pointer;
}
.olymp-param-name {
  font-size: 12px;
  font-weight: 600;
  color: #94a3b8;
  white-space: nowrap;
  min-width: 42px;
}
.olymp-checkin-select,
.olymp-checkin-date {
  flex: 1;
  height: 34px !important;
  border-radius: 6px;
  font-size: 13px;
  padding: 0 10px;
  border: 1px solid rgba(255, 255, 255, 0.15);
  background: #0b0f19;
  color: #f1f5f9;
  box-sizing: border-box;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.olymp-checkin-select:hover,
.olymp-checkin-date:hover,
.olymp-checkin-select:focus,
.olymp-checkin-date:focus {
  border-color: var(--adm-gold);
  outline: none;
  box-shadow: 0 0 0 2px rgba(212, 175, 55, 0.15);
}

/* Game Segment Buttons */
.olymp-seg {
  display: flex;
  gap: 8px;
  margin-top: 10px;
}
#olympGameSeg .sub-tab-btn {
  flex: 1;
  height: 34px;
  padding: 0 12px;
  font-size: 12.5px;
  font-weight: 600;
  border-radius: 6px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  border: 1px solid rgba(255, 255, 255, 0.15);
  background: #0f131d;
  color: #94a3b8;
  cursor: pointer;
  transition: all 0.15s ease;
  white-space: nowrap;
}
#olympGameSeg .sub-tab-btn:hover {
  border-color: rgba(212, 175, 55, 0.45);
  color: #f1f5f9;
  background: rgba(212, 175, 55, 0.08);
}
#olympGameSeg .sub-tab-btn.active {
  border-color: var(--adm-gold);
  background: rgba(212, 175, 55, 0.2);
  color: #ffd700;
  font-weight: 700;
  box-shadow: 0 0 8px rgba(212, 175, 55, 0.2);
}

/* Section 2: Search & Participant Chips */
.olymp-checkin-search-row {
  margin-bottom: 8px;
}
#olympPickSearch {
  width: 100%;
  height: 34px !important;
  box-sizing: border-box;
  border-radius: 6px;
  font-size: 13px;
  padding: 0 10px;
  border: 1px solid rgba(255, 255, 255, 0.15);
  background: #0b0f19;
  color: #f1f5f9;
  transition: border-color 0.15s, box-shadow 0.15s;
}
#olympPickSearch:hover,
#olympPickSearch:focus {
  border-color: var(--adm-gold);
  outline: none;
  box-shadow: 0 0 0 2px rgba(212, 175, 55, 0.15);
}

.olymp-group-label {
  font-size: 11.5px;
  font-weight: 700;
  color: #94a3b8;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  margin: 8px 0 6px;
}
.olymp-picks-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding: 2px 0 4px;
}
.olymp-pick {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 6px;
  font-size: 12px;
  cursor: pointer;
  user-select: none;
  background: rgba(15, 23, 42, 0.7);
  transition: all 0.15s ease;
}
.olymp-pick:hover {
  border-color: rgba(212, 175, 55, 0.5);
  background: rgba(212, 175, 55, 0.08);
}
.olymp-pick.has-checked {
  border-color: var(--adm-gold);
  background: rgba(212, 175, 55, 0.2);
  color: #fff;
  font-weight: 600;
  box-shadow: 0 0 6px rgba(212, 175, 55, 0.25);
  opacity: 1 !important;
}
.olymp-pick.done {
  opacity: 0.85;
  background: rgba(16, 185, 129, 0.08);
  border-color: rgba(16, 185, 129, 0.35);
}
.olymp-pick.done:hover {
  opacity: 1;
  border-color: rgba(16, 185, 129, 0.6);
  background: rgba(16, 185, 129, 0.14);
}
.olymp-pick-name {
  font-weight: 600;
  color: #f1f5f9;
}
.olymp-pick-n {
  color: #94a3b8;
  font-size: 11px;
  font-variant-numeric: tabular-nums;
}
.olymp-pick.has-checked .olymp-pick-n {
  color: #fde68a;
}
.olymp-pick.done .olymp-pick-n {
  color: #34d399;
  font-weight: 600;
}
.olymp-pick-check {
  color: #10b981;
  font-weight: 800;
  margin-left: 2px;
}

/* Section 3: Textarea & Submit Bar */
#olympNicks {
  width: 100%;
  box-sizing: border-box;
  height: 52px;
  min-height: 44px;
  max-height: 120px;
  resize: vertical;
  font-size: 12.5px;
  line-height: 1.4;
  padding: 6px 10px;
  border-radius: 6px;
  background: #0b0f19;
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: #f1f5f9;
  transition: border-color 0.15s, box-shadow 0.15s;
}
#olympNicks:hover,
#olympNicks:focus {
  border-color: var(--adm-gold);
  outline: none;
  box-shadow: 0 0 0 2px rgba(212, 175, 55, 0.15);
}

/* Pasted Nicks Validation Warning Box */
.olymp-pasted-warning {
  margin-top: 6px;
  background: rgba(239, 68, 68, 0.08);
  border: 1px solid rgba(239, 68, 68, 0.35);
  border-radius: 6px;
  padding: 8px 10px;
  font-size: 11.5px;
}
.olymp-warn-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  flex-wrap: wrap;
  color: #fca5a5;
  margin-bottom: 6px;
}
.olymp-warn-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}
.olymp-tag-foreign {
  background: rgba(239, 68, 68, 0.18);
  border: 1px solid rgba(239, 68, 68, 0.5);
  color: #fecaca;
  padding: 2px 7px;
  border-radius: 4px;
  font-size: 11px;
}
.olymp-tag-foreign i {
  color: #fbbf24;
  font-style: normal;
  font-weight: 600;
}
.olymp-tag-unknown {
  background: rgba(100, 116, 139, 0.2);
  border: 1px solid rgba(148, 163, 184, 0.4);
  color: #cbd5e1;
  padding: 2px 7px;
  border-radius: 4px;
  font-size: 11px;
}

.olymp-submitbar {
  position: sticky;
  bottom: 0;
  display: flex;
  gap: 12px;
  align-items: center;
  padding: 8px 0 12px;
  background: linear-gradient(180deg, transparent 0%, rgba(10, 13, 20, 0.95) 25%, #0a0d14 100%);
  z-index: 5;
  flex-wrap: wrap;
}
#olympSubmitBtn {
  height: 36px;
  padding: 0 20px;
  font-size: 13px;
  font-weight: 700;
  border-radius: 6px;
}
#olympTotalPreview {
  font-size: 12px;
  color: #cbd5e1;
}

.olymp-inline-sel { max-width: 150px; padding: 2px 6px; font-size: 12px; }
.olymp-attach { display: inline-flex; gap: 4px; align-items: center; }

.olymp-alt-row { display: flex; gap: 6px; align-items: center; }
.olymp-alt-row .admin-input { min-width: 0; }
.olymp-alt-row input.admin-input { flex: 1; }
.olymp-alt-row select.admin-input { max-width: 150px; flex-shrink: 0; }
.olymp-assign { display: flex; gap: 6px; align-items: center; }
.olymp-assign .admin-input { max-width: 170px; }

.olymp-hpips { display: inline-flex; gap: 8px; margin-left: 8px; flex-wrap: wrap; }
.olymp-hpip { font-size: 10px; color: var(--adm-muted); white-space: nowrap; }
.olymp-hpip .on { color: var(--adm-gold); }
.olymp-hpip .off { opacity: .35; }
.olymp-hpip.done .on { color: #10b981; }
.olymp-hpip.zero { opacity: .6; }

/* Приглушённые золотые скроллбары админки в цвет темы (плитку табов не трогаем — там скрыты,
   компактные чип-ленты остаются с overflow: hidden по LESSONS 2026-09-28). */
.map-container, .admin-panels, .locations-list, .admin-content,
.admin-modal, .choice-modal-body, .sched-scroll, textarea.admin-input {
  scrollbar-width: thin;
  scrollbar-color: rgba(212, 175, 55, 0.4) transparent;
}
.map-container::-webkit-scrollbar, .admin-panels::-webkit-scrollbar, .locations-list::-webkit-scrollbar,
.admin-content::-webkit-scrollbar, .admin-modal::-webkit-scrollbar, .choice-modal-body::-webkit-scrollbar,
.sched-scroll::-webkit-scrollbar, textarea.admin-input::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}
.map-container::-webkit-scrollbar-track, .admin-panels::-webkit-scrollbar-track, .locations-list::-webkit-scrollbar-track,
.admin-content::-webkit-scrollbar-track, .admin-modal::-webkit-scrollbar-track, .choice-modal-body::-webkit-scrollbar-track,
.sched-scroll::-webkit-scrollbar-track, textarea.admin-input::-webkit-scrollbar-track {
  background: transparent;
  border-radius: 3px;
}
.map-container::-webkit-scrollbar-thumb, .admin-panels::-webkit-scrollbar-thumb, .locations-list::-webkit-scrollbar-thumb,
.admin-content::-webkit-scrollbar-thumb, .admin-modal::-webkit-scrollbar-thumb, .choice-modal-body::-webkit-scrollbar-thumb,
.sched-scroll::-webkit-scrollbar-thumb, textarea.admin-input::-webkit-scrollbar-thumb {
  background: rgba(212, 175, 55, 0.4);
  border-radius: 3px;
}
.map-container::-webkit-scrollbar-thumb:hover, .admin-panels::-webkit-scrollbar-thumb:hover, .locations-list::-webkit-scrollbar-thumb:hover,
.admin-content::-webkit-scrollbar-thumb:hover, .admin-modal::-webkit-scrollbar-thumb:hover, .choice-modal-body::-webkit-scrollbar-thumb:hover,
.sched-scroll::-webkit-scrollbar-thumb:hover, textarea.admin-input::-webkit-scrollbar-thumb:hover {
  background: rgba(212, 175, 55, 0.7);
}
/* Чекбоксы и радио в теме клана: тёмный бокс + золотая галка. */
.admin-check input[type="checkbox"], .olymp-pick input[type="checkbox"] {
  appearance: none;
  -webkit-appearance: none;
  width: 16px;
  height: 16px;
  flex-shrink: 0;
  border: 1px solid #d4af37;
  border-radius: 4px;
  background: #0b0f19;
  cursor: pointer;
  position: relative;
  vertical-align: -3px;
  margin-right: 6px;
}
.admin-check input[type="checkbox"]:checked, .olymp-pick input[type="checkbox"]:checked {
  background: linear-gradient(180deg, #ffd700, #b8860b);
  border-color: #ffd700;
}
.admin-check input[type="checkbox"]:checked::after, .olymp-pick input[type="checkbox"]:checked::after {
  content: '✓';
  position: absolute;
  inset: 0;
  color: #0a0d14;
  font-size: 12px;
  font-weight: 800;
  line-height: 14px;
  text-align: center;
}
/* Нативные календари/часы — тёмная схема. */
input[type="date"].admin-input, input[type="datetime-local"].admin-input, input[type="time"].admin-input {
  color-scheme: dark;
}
.olymp-pick[data-kind="main"] .olymp-pick-n { opacity: .45; }

.olymp-row[data-olymp-row] { cursor: pointer; }
.olymp-detail { padding: 6px 0 8px 4px; border-bottom: 1px solid var(--adm-border); }
.olymp-actions { display: flex; gap: 6px; margin-top: 6px; flex-wrap: wrap; align-items: center; }
.olymp-row.ghost { opacity: .8; }
.olymp-modal-back { position: fixed; inset: 0; background: rgba(0,0,0,.7); backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px); z-index: 2000; display: flex; align-items: center; justify-content: center; padding: 16px; }
.olymp-modal { background: linear-gradient(180deg, #181d2a 0%, #0e121a 100%); border: 1px solid rgba(212, 175, 55, 0.4); border-radius: 8px; box-shadow: 0 10px 30px rgba(0, 0, 0, 0.9); overflow: hidden; max-width: 420px; width: 100%; max-height: calc(100dvh - 40px); display: flex; flex-direction: column; }
.olymp-modal .admin-input { width: 100%; margin: 4px 0 8px; }

#admChoiceBack { z-index: 3500; }
/* Choice header/footer in boss-confirm language (gold title, dark strips). */
.choice-modal-header { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 12px 16px; background: #1a202c; border-bottom: 1px solid rgba(212, 175, 55, 0.2); flex-shrink: 0; }
.choice-modal-header h4 { margin: 0; color: var(--adm-gold); font-size: 14px; }
.choice-modal-close { background: none; border: none; color: var(--adm-muted); font-size: 18px; cursor: pointer; line-height: 1; padding: 0 2px; }
.choice-modal-close:hover { color: #fff; }
.choice-modal-body { padding: 14px 16px; font-size: 13px; line-height: 1.5; color: #cbd5e1; overflow-y: auto; }
.olymp-modal-btns { display: flex; gap: 8px; justify-content: flex-end; flex-wrap: wrap; padding: 10px 16px; background: #1a202c; border-top: 1px solid rgba(212, 175, 55, 0.2); flex-shrink: 0; }
@media (max-width: 480px) {
  .olymp-modal { max-width: calc(100vw - 24px); }
}

/* HUD Toast Notifications (copy of the /boss set — modules stay zero-coupled).
   Container is always above modals; admin toasts use a colored dot glyph. */
.hud-toast-container {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 8px;
  pointer-events: none;
  max-width: 400px;
  width: calc(100vw - 48px);
}

.hud-toast {
  pointer-events: auto;
  background: rgba(15, 23, 42, 0.95);
  border: 1px solid rgba(212, 175, 55, 0.35);
  border-radius: 8px;
  padding: 10px 14px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.6);
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 13px;
  color: #f1f5f9;
  animation: toastSlideIn 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  transition: all 0.2s ease;
}

.hud-toast.success {
  border-color: rgba(34, 197, 94, 0.5);
  box-shadow: 0 0 20px rgba(34, 197, 94, 0.15);
}
.hud-toast.info {
  border-color: rgba(56, 189, 248, 0.5);
  box-shadow: 0 0 20px rgba(56, 189, 248, 0.15);
}
.hud-toast.warning {
  border-color: rgba(245, 158, 11, 0.5);
  box-shadow: 0 0 20px rgba(245, 158, 11, 0.15);
}
.hud-toast.danger {
  border-color: rgba(239, 68, 68, 0.5);
  box-shadow: 0 0 20px rgba(239, 68, 68, 0.15);
}

.hud-toast-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  margin-top: 1px;
  line-height: 1;
  background: none;
  border-radius: 0;
  width: auto;
  height: auto;
}
.hud-toast-icon .l2m-ic {
  display: block;
}
.hud-toast.success .hud-toast-icon { color: #4ade80; }
.hud-toast.info .hud-toast-icon { color: #38bdf8; }
.hud-toast.warning .hud-toast-icon { color: #fbbf24; }
.hud-toast.danger .hud-toast-icon { color: #f87171; }

.hud-toast-icon:empty {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  margin-top: 4px;
}
.hud-toast.success .hud-toast-icon:empty { background: #4ade80; }
.hud-toast.info .hud-toast-icon:empty { background: #38bdf8; }
.hud-toast.warning .hud-toast-icon:empty { background: #fbbf24; }
.hud-toast.danger .hud-toast-icon:empty { background: #f87171; }
.hud-toast-content {
  flex: 1;
  line-height: 1.4;
  word-break: break-word;
}
.hud-toast-title {
  font-weight: 700;
  margin-bottom: 2px;
  color: #ffd700;
}
.hud-toast.success .hud-toast-title { color: #4ade80; }
.hud-toast.info .hud-toast-title { color: #38bdf8; }
.hud-toast.warning .hud-toast-title { color: #fbbf24; }
.hud-toast.danger .hud-toast-title { color: #f87171; }

.hud-toast-close {
  background: none;
  border: none;
  color: #94a3b8;
  font-size: 16px;
  cursor: pointer;
  line-height: 1;
  padding: 0 2px;
  transition: color 0.15s;
}
.hud-toast-close:hover {
  color: #fff;
}

@keyframes toastSlideIn {
  from {
    opacity: 0;
    transform: translateY(12px) scale(0.96);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

/* --- Welcome Modal («Боевой пропуск клана») --- */
.welcome-modal-overlay {
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  background: rgba(4, 7, 12, 0.85);
  animation: fadeInModal 0.25s ease-out;
}
@keyframes fadeInModal {
  from { opacity: 0; }
  to { opacity: 1; }
}

.welcome-modal {
  max-width: 490px;
  width: 94%;
  background: linear-gradient(180deg, #131722 0%, #0a0d14 100%);
  border: 1px solid rgba(212, 175, 55, 0.5);
  box-shadow: 0 16px 50px rgba(0, 0, 0, 0.9), 0 0 35px rgba(212, 175, 55, 0.18);
  border-radius: 12px;
  padding: 24px 22px 22px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.welcome-modal-header {
  text-align: center;
}
.welcome-emblem {
  font-size: 26px;
  color: var(--adm-gold);
  line-height: 1;
  margin-bottom: 4px;
  filter: drop-shadow(0 0 8px rgba(255, 215, 0, 0.6));
}
.welcome-modal-header h3 {
  margin: 0;
  font-size: 16px;
  font-weight: 800;
  letter-spacing: 0.08em;
  color: var(--adm-gold);
  text-transform: uppercase;
}
.welcome-subtitle {
  margin: 4px 0 0;
  font-size: 12px;
  color: #94a3b8;
}

.welcome-user-card {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  background: rgba(15, 23, 42, 0.7);
  border: 1px solid rgba(212, 175, 55, 0.25);
  border-radius: 8px;
}
.welcome-status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #10b981;
  box-shadow: 0 0 8px #10b981;
  flex-shrink: 0;
}
.welcome-nick {
  font-weight: 700;
  color: #f8fafc;
  font-size: 13px;
}
.welcome-role-badge {
  margin-left: auto;
  font-size: 11px;
  font-weight: 700;
  color: var(--adm-gold);
  background: rgba(212, 175, 55, 0.12);
  border: 1px solid rgba(212, 175, 55, 0.3);
  padding: 2px 8px;
  border-radius: 4px;
  text-transform: uppercase;
}

.welcome-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.welcome-label {
  font-size: 11.5px;
  font-weight: 600;
  color: #cbd5e1;
}
.welcome-input-row {
  display: flex;
  gap: 8px;
  align-items: center;
}
.welcome-key-input {
  flex: 1;
  font-family: monospace;
  font-size: 11px !important;
  color: #38bdf8 !important;
  background: #080c14 !important;
  border: 1px solid #1e293b !important;
  padding: 8px 10px !important;
  border-radius: 6px;
  text-overflow: ellipsis;
  user-select: all;
}
.welcome-input-row .admin-btn {
  flex-shrink: 0;
  white-space: nowrap;
}

.welcome-warning-box {
  display: flex;
  gap: 10px;
  padding: 10px 12px;
  background: rgba(245, 158, 11, 0.08);
  border: 1px solid rgba(245, 158, 11, 0.3);
  border-radius: 8px;
  font-size: 11.5px;
  line-height: 1.45;
  color: #fde68a;
}
.warn-glyph {
  font-size: 16px;
  flex-shrink: 0;
}
.warn-desc b {
  color: #ffffff;
}

.welcome-modal-actions {
  margin-top: 4px;
}
.welcome-submit-btn {
  width: 100%;
  min-height: 42px;
  font-size: 13px !important;
  font-weight: 800 !important;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  border-radius: 6px;
  box-shadow: 0 4px 16px rgba(212, 175, 55, 0.35) !important;
}

/* --- Sticky Key Reminder Banner («Мягкая страховка») --- */
.key-reminder-banner {
  background: linear-gradient(90deg, rgba(30, 24, 12, 0.95) 0%, rgba(18, 14, 8, 0.95) 100%);
  border: 1px solid rgba(212, 175, 55, 0.5);
  border-radius: 8px;
  padding: 10px 14px;
  margin-bottom: 14px;
  box-shadow: 0 4px 18px rgba(0, 0, 0, 0.4), 0 0 12px rgba(212, 175, 55, 0.15);
  animation: slideDownBanner 0.3s ease-out;
}
@keyframes slideDownBanner {
  from { opacity: 0; transform: translateY(-8px); }
  to { opacity: 1; transform: translateY(0); }
}

.krem-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}
.krem-left {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  color: #fde68a;
  flex: 1 1 260px;
}
.krem-icon {
  font-size: 16px;
  flex-shrink: 0;
}
.krem-left b {
  color: #fff;
}
.krem-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.krem-dismiss-btn {
  background: transparent;
  border: 1px solid rgba(148, 163, 184, 0.25);
  color: #94a3b8;
  font-size: 11px;
  font-weight: 600;
  padding: 6px 10px;
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.15s ease;
}
.krem-dismiss-btn:hover {
  border-color: rgba(255, 255, 255, 0.5);
  color: #fff;
}

/* --- Profile Tab 2.0 (Игровой профиль, безопасность и альты) --- */
#adminTabPanel.profile-panel {
  justify-content: flex-start !important;
  width: 100%;
  max-width: none;
  margin: 0;
  padding: 14px;
}
.profile-container {
  display: flex;
  flex-direction: column;
  gap: 14px;
  width: 100%;
}
.profile-card {
  background: linear-gradient(180deg, rgba(20, 26, 38, 0.90) 0%, rgba(11, 15, 23, 0.95) 100%);
  border: 1px solid rgba(212, 175, 55, 0.35);
  border-radius: 10px;
  padding: 16px 18px;
  box-shadow: 0 4px 18px rgba(0, 0, 0, 0.45);
}
.profile-header {
  display: flex;
  align-items: center;
  gap: 14px;
}
.profile-emblem {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(212, 175, 55, 0.25) 0%, rgba(15, 23, 42, 0.8) 100%);
  border: 1.5px solid rgba(212, 175, 55, 0.6);
  color: var(--adm-gold);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  box-shadow: 0 0 12px rgba(212, 175, 55, 0.2);
  flex-shrink: 0;
}
.profile-header-info {
  display: flex;
  flex-direction: column;
  gap: 4px;
  flex: 1;
  min-width: 0;
}
.profile-nick-row {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}
.profile-nick {
  font-size: 18px;
  font-weight: 800;
  color: #f8fafc;
  letter-spacing: 0.02em;
}
.profile-role-badge {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 3px 8px;
  border-radius: 4px;
}
.profile-role-badge.role-admin,
.profile-role-badge.role-leader {
  background: linear-gradient(135deg, rgba(212, 175, 55, 0.25), rgba(180, 83, 9, 0.35));
  border: 1px solid rgba(212, 175, 55, 0.7);
  color: #fef08a;
}
.profile-role-badge.role-officer {
  background: linear-gradient(135deg, rgba(56, 189, 248, 0.2), rgba(30, 64, 175, 0.3));
  border: 1px solid rgba(56, 189, 248, 0.6);
  color: #bae6fd;
}
.profile-role-badge.role-member {
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.2), rgba(4, 120, 87, 0.3));
  border: 1px solid rgba(16, 185, 129, 0.6);
  color: #a7f3d0;
}
.profile-role-badge.role-viewer {
  background: rgba(148, 163, 184, 0.15);
  border: 1px solid rgba(148, 163, 184, 0.4);
  color: #cbd5e1;
}
.profile-clan-badge {
  font-size: 11px;
  font-weight: 700;
  color: var(--adm-gold);
  background: rgba(0, 0, 0, 0.4);
  border: 1px solid rgba(212, 175, 55, 0.4);
  padding: 2px 8px;
  border-radius: 4px;
}
.profile-meta-row {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 11.5px;
  color: var(--adm-muted);
}
.profile-online-indicator {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: #86efac;
}
.profile-divider {
  height: 1px;
  background: linear-gradient(90deg, rgba(212, 175, 55, 0.4) 0%, rgba(212, 175, 55, 0.1) 60%, transparent 100%);
  margin: 14px 0 16px 0;
}
.profile-section-title {
  font-size: 13px;
  font-weight: 700;
  color: var(--adm-gold);
  letter-spacing: 0.04em;
  margin-bottom: 12px;
}
.profile-field-group {
  margin-bottom: 12px;
}
.profile-field-label-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 5px;
}
.profile-field-label {
  font-size: 12px;
  font-weight: 600;
  color: #cbd5e1;
}
.profile-field-secure-badge {
  font-size: 10.5px;
  color: #94a3b8;
}
.profile-input-group {
  display: flex;
  gap: 6px;
  align-items: center;
}
.profile-key-input {
  flex: 1;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace !important;
  font-size: 12px !important;
  letter-spacing: 0.04em;
  background: #07090e !important;
  border: 1px solid rgba(212, 175, 55, 0.35) !important;
  color: #fde68a !important;
  padding: 7px 10px !important;
  border-radius: 5px !important;
  min-width: 0;
}
.profile-field-desc {
  font-size: 11px;
  color: var(--adm-muted);
  margin-top: 4px;
  line-height: 1.4;
}
.profile-rotate-wrap {
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px dashed rgba(255, 255, 255, 0.1);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}
.profile-rotate-info {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 11.5px;
  color: #94a3b8;
}
.admin-btn.danger-outline {
  background: rgba(239, 68, 68, 0.08);
  border: 1px solid rgba(239, 68, 68, 0.45);
  color: #fca5a5;
  transition: all 0.15s ease;
}
.admin-btn.danger-outline:hover {
  background: rgba(239, 68, 68, 0.2);
  border-color: #ef4444;
  color: #fff;
}
.profile-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}
.profile-card-title {
  font-size: 13.5px;
  font-weight: 700;
  color: var(--adm-gold);
  letter-spacing: 0.03em;
}
.profile-card-subtitle {
  font-size: 11.5px;
  color: var(--adm-muted);
}
.profile-card-subtitle b {
  color: #f8fafc;
}
.profile-olymp-notice {
  background: linear-gradient(90deg, rgba(30, 24, 12, 0.9) 0%, rgba(18, 14, 8, 0.9) 100%);
  border: 1px solid rgba(212, 175, 55, 0.45);
  border-radius: 8px;
  padding: 10px 12px;
  margin-bottom: 12px;
  display: flex;
  align-items: flex-start;
  gap: 10px;
}
.profile-olymp-notice .notice-icon {
  font-size: 16px;
  color: var(--adm-gold);
  flex-shrink: 0;
  line-height: 1.2;
}
.profile-olymp-notice .notice-text {
  font-size: 11.5px;
  color: #fde68a;
  line-height: 1.45;
}
.profile-olymp-notice .notice-text b {
  color: #fff;
}
.alt-chips-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.alt-chip-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  background: rgba(15, 23, 42, 0.65);
  border: 1px solid rgba(212, 175, 55, 0.25);
  border-radius: 6px;
  padding: 7px 12px;
}
.alt-chip-left {
  display: flex;
  align-items: center;
  gap: 8px;
}
.alt-chip-icon {
  font-size: 13px;
  color: #94a3b8;
}
.alt-chip-name {
  font-size: 13px;
  font-weight: 700;
  color: #fff;
}
.alt-chip-clan {
  font-size: 11px;
  color: var(--adm-gold);
  background: rgba(0, 0, 0, 0.4);
  border: 1px solid rgba(212, 175, 55, 0.3);
  padding: 1px 6px;
  border-radius: 3px;
  margin-left: 4px;
}
.alt-chip-badge {
  font-size: 10.5px;
  color: #64748b;
  font-weight: 600;
}
.alt-slot-tag {
  font-size: 11px;
  font-weight: 700;
  color: var(--adm-muted);
  background: rgba(0, 0, 0, 0.45);
  border: 1px solid var(--adm-border);
  border-radius: 4px;
  padding: 5px 8px;
  flex-shrink: 0;
  min-width: 26px;
  text-align: center;
}



