/**
 * ВЕБ-АДМИН-ПАНЕЛЬ ФЕДЕРАЦИИ МНОГОБОРЬЯ ГТО РОССИИ
 * Дизайн-система по эталону «Герой ГТО» (idunarekord.vercel.app/web/)
 */

.admin-wrapper {
  display: flex;
  min-height: calc(100vh - 64px);
  background: #07111f;
  color: #f1f5f9;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  overflow: hidden;
}

/* ================= Сайдбар ================= */
.admin-sidebar {
  width: 260px;
  background: #0c1829;
  border-right: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  flex-direction: column;
  flex-shrink: 0;
  transition: all 0.25s ease;
  z-index: 40;
}
@media (max-width: 900px) {
  .admin-sidebar {
    position: fixed;
    top: 60px;
    bottom: 0;
    left: -280px;
    width: 280px;
    box-shadow: 10px 0 30px rgba(0,0,0,0.6);
  }
  .admin-sidebar.is-open {
    left: 0;
  }
}

.admin-sidebar-brand {
  padding: 18px 20px;
  display: flex;
  align-items: center;
  gap: 12px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}
.admin-sidebar-brand img {
  width: 32px;
  height: 32px;
  object-fit: contain;
}
.admin-brand-text b {
  display: block;
  font-family: 'TT Squares', 'Unbounded', sans-serif;
  font-size: 13px;
  letter-spacing: 0.04em;
  color: #fff;
}
.admin-brand-text small {
  font-size: 10px;
  color: #38bdf8;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-weight: 700;
}

.admin-nav-scroll {
  flex: 1;
  overflow-y: auto;
  padding: 12px 10px 24px;
}
.admin-nav-scroll::-webkit-scrollbar {
  width: 5px;
}
.admin-nav-scroll::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.1);
  border-radius: 4px;
}

.admin-nav-group-title {
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: #64748b;
  padding: 14px 12px 6px;
}

.admin-nav-item {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 12px;
  border-radius: 10px;
  background: transparent;
  border: 0;
  color: #94a3b8;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  text-align: left;
  transition: all 0.15s ease;
  position: relative;
}
.admin-nav-item:hover {
  background: rgba(255, 255, 255, 0.05);
  color: #fff;
}
.admin-nav-item.active {
  background: rgba(56, 189, 248, 0.12);
  color: #38bdf8;
  font-weight: 700;
}
.admin-nav-item.active::before {
  content: '';
  position: absolute;
  left: 0;
  top: 8px;
  bottom: 8px;
  width: 3px;
  background: #38bdf8;
  border-radius: 0 4px 4px 0;
}
.admin-nav-ic {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  color: inherit;
  flex-shrink: 0;
}
.admin-nav-label {
  flex: 1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.admin-nav-badge {
  padding: 2px 7px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 700;
  background: rgba(239, 68, 68, 0.2);
  color: #f87171;
  border: 1px solid rgba(239, 68, 68, 0.4);
}
.admin-nav-badge.blue {
  background: rgba(56, 189, 248, 0.2);
  color: #38bdf8;
  border-color: rgba(56, 189, 248, 0.4);
}

.admin-sidebar-footer {
  padding: 14px 16px;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  background: rgba(10, 20, 36, 0.95);
}
.admin-user-pill {
  display: flex;
  align-items: center;
  gap: 10px;
}
.admin-user-avatar {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  background: linear-gradient(135deg, #ef4444, #38bdf8);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  color: #fff;
  font-size: 13px;
}
.admin-user-meta {
  flex: 1;
  min-width: 0;
}
.admin-user-name {
  font-size: 12.5px;
  font-weight: 700;
  color: #fff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.admin-user-role {
  font-size: 11px;
  color: #94a3b8;
}

/* ================= Основное содержимое ================= */
.admin-main {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-width: 0;
  background: radial-gradient(circle at top right, rgba(30, 58, 138, 0.12), transparent 45%), #07111f;
  height: calc(100vh - 64px);
  overflow-y: auto;
}

/* Верхняя панель управления */
.admin-topbar {
  height: 62px;
  background: rgba(12, 24, 41, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 24px;
  gap: 16px;
  position: sticky;
  top: 0;
  z-index: 30;
}
@media (max-width: 768px) {
  .admin-topbar {
    padding: 0 14px;
    height: 56px;
  }
}

.admin-topbar-left {
  display: flex;
  align-items: center;
  gap: 12px;
}
.admin-sidebar-toggle {
  display: none;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.12);
  color: #fff;
  border-radius: 8px;
  padding: 7px 10px;
  cursor: pointer;
}
@media (max-width: 900px) {
  .admin-sidebar-toggle {
    display: inline-flex;
  }
}

.admin-page-heading {
  display: flex;
  flex-direction: column;
}
.admin-page-title {
  margin: 0;
  font-family: 'TT Squares', 'Unbounded', sans-serif;
  font-size: 16px;
  color: #fff;
  font-weight: 700;
  letter-spacing: 0.02em;
}
.admin-page-sub {
  margin: 0;
  font-size: 11.5px;
  color: #94a3b8;
}

.admin-topbar-right {
  display: flex;
  align-items: center;
  gap: 10px;
}
.admin-role-switcher {
  display: flex;
  align-items: center;
  background: rgba(15, 23, 42, 0.8);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 10px;
  padding: 3px 6px;
  gap: 6px;
}
.admin-role-switcher label {
  font-size: 10.5px;
  font-weight: 700;
  color: #94a3b8;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding-left: 4px;
}
.admin-role-select {
  background: transparent;
  border: 0;
  color: #38bdf8;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  outline: none;
  padding: 4px 6px;
}
.admin-role-select option {
  background: #0f172a;
  color: #fff;
}

.admin-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 8px 14px;
  border-radius: 10px;
  font-size: 12.5px;
  font-weight: 700;
  cursor: pointer;
  border: 0;
  transition: all 0.18s ease;
  white-space: nowrap;
}
.admin-btn:active {
  transform: scale(0.97);
}
.admin-btn.primary {
  background: linear-gradient(135deg, #ef4444, #dc2626);
  color: #fff;
  box-shadow: 0 4px 14px rgba(239, 68, 68, 0.3);
}
.admin-btn.primary:hover {
  filter: brightness(1.1);
}
.admin-btn.secondary {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.14);
  color: #cbd5e1;
}
.admin-btn.secondary:hover {
  background: rgba(255, 255, 255, 0.14);
  color: #fff;
}
.admin-btn.accent {
  background: rgba(56, 189, 248, 0.15);
  border: 1px solid rgba(56, 189, 248, 0.35);
  color: #38bdf8;
}
.admin-btn.accent:hover {
  background: rgba(56, 189, 248, 0.25);
  color: #fff;
}
.admin-btn.danger {
  background: rgba(239, 68, 68, 0.15);
  border: 1px solid rgba(239, 68, 68, 0.35);
  color: #f87171;
}
.admin-btn.success {
  background: linear-gradient(135deg, #10b981, #059669);
  color: #fff;
}

/* ================= Контейнер страниц ================= */
.admin-content-body {
  padding: 24px;
  flex: 1;
}
@media (max-width: 768px) {
  .admin-content-body {
    padding: 14px;
  }
}

/* ================= Метрики Дашборда ================= */
.admin-metrics-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-bottom: 24px;
}
@media (max-width: 1024px) {
  .admin-metrics-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}
@media (max-width: 560px) {
  .admin-metrics-grid {
    grid-template-columns: 1fr;
  }
}

.admin-metric-card {
  background: rgba(16, 29, 45, 0.7);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 16px;
  padding: 18px 20px;
  position: relative;
  overflow: hidden;
  transition: transform 0.2s ease, border-color 0.2s ease;
  cursor: pointer;
}
.admin-metric-card:hover {
  transform: translateY(-2px);
  border-color: rgba(56, 189, 248, 0.35);
}
.admin-metric-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
}
.admin-metric-title {
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #94a3b8;
}
.admin-metric-icon {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.06);
  color: #38bdf8;
}
.admin-metric-icon.red {
  background: rgba(239, 68, 68, 0.15);
  color: #f87171;
}
.admin-metric-icon.green {
  background: rgba(16, 185, 129, 0.15);
  color: #34d399;
}
.admin-metric-icon.amber {
  background: rgba(245, 158, 11, 0.15);
  color: #fbbf24;
}
.admin-metric-value {
  font-family: 'TT Squares', 'Unbounded', sans-serif;
  font-size: 28px;
  font-weight: 800;
  color: #fff;
  line-height: 1.1;
  margin-bottom: 6px;
}
.admin-metric-foot {
  font-size: 11.5px;
  color: #64748b;
  display: flex;
  align-items: center;
  gap: 6px;
}

/* ================= Таблицы и Карточки ================= */
.admin-panel-card {
  background: rgba(16, 29, 45, 0.65);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 16px;
  padding: 20px;
  margin-bottom: 20px;
}
.admin-panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 18px;
}
.admin-panel-title {
  margin: 0;
  font-family: 'TT Squares', 'Unbounded', sans-serif;
  font-size: 15px;
  font-weight: 700;
  color: #fff;
  letter-spacing: 0.03em;
  display: flex;
  align-items: center;
  gap: 8px;
}

.admin-toolbar {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}
.admin-search-input {
  height: 38px;
  padding: 0 14px;
  background: rgba(7, 17, 31, 0.85);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 10px;
  color: #fff;
  font-size: 13px;
  min-width: 220px;
  outline: none;
}
.admin-search-input:focus {
  border-color: #38bdf8;
  box-shadow: 0 0 0 2px rgba(56, 189, 248, 0.2);
}
.admin-filter-select {
  height: 38px;
  padding: 0 10px;
  background: rgba(7, 17, 31, 0.85);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 10px;
  color: #cbd5e1;
  font-size: 12.5px;
  font-weight: 600;
  outline: none;
  cursor: pointer;
}

.admin-table-wrap {
  width: 100%;
  overflow-x: auto;
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 12px;
}
.admin-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  font-size: 13px;
}
.admin-table th {
  background: rgba(12, 24, 41, 0.9);
  padding: 12px 14px;
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #94a3b8;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  white-space: nowrap;
}
.admin-table td {
  padding: 12px 14px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  color: #cbd5e1;
  vertical-align: middle;
}
.admin-table tr:hover td {
  background: rgba(255, 255, 255, 0.02);
}
.admin-table td b {
  color: #fff;
}

/* Статусные бейджи */
.admin-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 8px;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 700;
  white-space: nowrap;
}
.admin-badge.success {
  background: rgba(16, 185, 129, 0.15);
  color: #34d399;
  border: 1px solid rgba(16, 185, 129, 0.35);
}
.admin-badge.warning {
  background: rgba(245, 158, 11, 0.15);
  color: #fbbf24;
  border: 1px solid rgba(245, 158, 11, 0.35);
}
.admin-badge.danger {
  background: rgba(239, 68, 68, 0.15);
  color: #f87171;
  border: 1px solid rgba(239, 68, 68, 0.35);
}
.admin-badge.info {
  background: rgba(56, 189, 248, 0.15);
  color: #38bdf8;
  border: 1px solid rgba(56, 189, 248, 0.35);
}
.admin-badge.neutral {
  background: rgba(148, 163, 184, 0.12);
  color: #94a3b8;
  border: 1px solid rgba(148, 163, 184, 0.25);
}

/* ================= Сплит-экран судейства видео ================= */
.admin-judging-split {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 20px;
}
@media (max-width: 1000px) {
  .admin-judging-split {
    grid-template-columns: 1fr;
  }
}
.admin-video-player-card {
  background: #000;
  border-radius: 16px;
  overflow: hidden;
  border: 2px solid rgba(56, 189, 248, 0.4);
  position: relative;
  display: flex;
  flex-direction: column;
}
.admin-judging-video {
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #000;
  display: block;
}
.admin-video-controls {
  padding: 10px 14px;
  background: rgba(15, 23, 42, 0.95);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}
.admin-speed-chip {
  padding: 3px 8px;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: #cbd5e1;
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
}
.admin-speed-chip.active {
  background: #38bdf8;
  color: #07111f;
  border-color: #38bdf8;
}

.admin-judging-meta {
  background: rgba(16, 29, 45, 0.7);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 16px;
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.admin-standards-box {
  background: rgba(7, 17, 31, 0.7);
  border: 1px solid rgba(56, 189, 248, 0.2);
  border-radius: 12px;
  padding: 14px;
}
.admin-standards-box h5 {
  margin: 0 0 6px;
  color: #38bdf8;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.admin-standards-box p {
  margin: 0;
  font-size: 12px;
  color: #94a3b8;
  line-height: 1.5;
}

.admin-judging-actions {
  display: flex;
  gap: 10px;
  margin-top: 10px;
}

/* ================= Модальные окна ================= */
.admin-modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(2, 6, 23, 0.85);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
}
.admin-modal-dialog {
  background: #0d1b2e;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 18px;
  width: 100%;
  max-width: 680px;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.7);
  padding: 24px;
  position: relative;
}
.admin-modal-close {
  position: absolute;
  top: 18px;
  right: 18px;
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.06);
  border: 0;
  color: #94a3b8;
  cursor: pointer;
  font-size: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.admin-modal-close:hover {
  background: rgba(239, 68, 68, 0.2);
  color: #f87171;
}

.admin-form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 14px;
}
.admin-form-group label {
  font-size: 11.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #93c5fd;
}
.admin-form-input, .admin-form-select, .admin-form-textarea {
  background: rgba(7, 17, 31, 0.85);
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 10px;
  padding: 10px 14px;
  color: #fff;
  font-size: 13.5px;
  font-family: inherit;
  outline: none;
}
.admin-form-input:focus, .admin-form-select:focus, .admin-form-textarea:focus {
  border-color: #38bdf8;
  box-shadow: 0 0 0 2px rgba(56, 189, 248, 0.2);
}
.admin-form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
@media (max-width: 560px) {
  .admin-form-row {
    grid-template-columns: 1fr;
  }
}

/* ================= Мобильная адаптация админки (ТЗ HOTFIX 2026) ================= */
.admin-card-list {
  display: none;
  flex-direction: column;
  gap: 12px;
}

.admin-app-card {
  background: rgba(15, 23, 42, 0.75);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 14px;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  transition: border-color 0.2s;
}

.admin-app-card:hover {
  border-color: rgba(56, 189, 248, 0.35);
}

.aac-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.aac-id {
  font-family: monospace;
  font-size: 13px;
  font-weight: 800;
  color: #38bdf8;
  background: rgba(56, 189, 248, 0.12);
  padding: 3px 8px;
  border-radius: 6px;
}

.aac-athlete {
  font-size: 15px;
  font-weight: 700;
  color: #fff;
  line-height: 1.3;
}

.aac-region {
  font-size: 12px;
  color: #94a3b8;
  margin-top: -4px;
}

.aac-details-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  background: rgba(7, 17, 31, 0.6);
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.05);
  font-size: 12px;
}

.aac-details-grid div {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.aac-details-grid small {
  color: #64748b;
  font-size: 10px;
  text-transform: uppercase;
  font-weight: 700;
}

.aac-action-btn {
  width: 100%;
  min-height: 42px;
  font-size: 13px;
  margin-top: 4px;
}

/* Пустое состояние (Zero Fake Data) */
.admin-empty-state {
  text-align: center;
  padding: 48px 20px;
  color: #94a3b8;
  background: rgba(15, 23, 42, 0.4);
  border-radius: 16px;
  border: 1px dashed rgba(255, 255, 255, 0.12);
  margin: 12px 0;
}

.admin-empty-state .aes-icon {
  font-size: 36px;
  margin-bottom: 12px;
  opacity: 0.8;
}

.admin-empty-state b {
  display: block;
  font-size: 16px;
  color: #f1f5f9;
  margin-bottom: 6px;
}

.admin-empty-state p {
  font-size: 13px;
  max-width: 440px;
  margin: 0 auto;
  line-height: 1.5;
}

@media (max-width: 768px) {
  .admin-wrapper {
    overflow-x: hidden !important;
    width: 100% !important;
    max-width: 100vw !important;
    min-width: 0 !important;
  }

  .admin-main {
    width: 100% !important;
    max-width: 100vw !important;
    min-width: 0 !important;
    padding: 12px 10px 40px !important;
    overflow-x: hidden !important;
  }

  .admin-topbar {
    height: auto !important;
    min-height: 56px;
    padding: 10px 12px !important;
    flex-direction: column !important;
    align-items: stretch !important;
    gap: 10px !important;
    width: 100% !important;
    max-width: 100vw !important;
    box-sizing: border-box !important;
  }

  .admin-topbar-left {
    width: 100% !important;
    justify-content: space-between !important;
    gap: 8px !important;
  }

  .admin-topbar-right {
    width: 100% !important;
    flex-direction: column !important;
    align-items: stretch !important;
    gap: 8px !important;
  }

  .admin-role-switcher {
    width: 100% !important;
    justify-content: space-between !important;
    box-sizing: border-box !important;
  }

  .admin-role-select {
    flex: 1 !important;
    width: 100% !important;
    min-width: 0 !important;
  }

  .admin-topbar-right .admin-btn {
    width: 100% !important;
    justify-content: center !important;
  }

  .admin-panel-card,
  .admin-judging-card,
  .admin-judging-meta,
  .admin-video-player-card {
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    box-sizing: border-box !important;
    overflow-x: hidden !important;
    padding: 14px 12px !important;
  }

  .admin-panel-header {
    flex-direction: column;
    align-items: stretch !important;
    gap: 12px !important;
    width: 100% !important;
  }

  .admin-toolbar {
    flex-direction: column;
    width: 100% !important;
    gap: 8px !important;
  }

  .admin-search-input,
  .admin-filter-select {
    width: 100% !important;
    min-width: 100% !important;
    box-sizing: border-box !important;
  }

  .admin-table-wrap {
    display: none !important;
  }

  .admin-card-list {
    display: flex !important;
    flex-direction: column !important;
    gap: 12px !important;
    width: 100% !important;
  }

  .admin-app-card {
    width: 100% !important;
    box-sizing: border-box !important;
    overflow-wrap: anywhere !important;
    word-break: normal !important;
    white-space: normal !important;
  }

  .admin-judging-split {
    grid-template-columns: 1fr !important;
    gap: 14px !important;
    width: 100% !important;
  }

  .admin-judging-video {
    width: 100% !important;
    max-width: 100% !important;
    height: auto !important;
    max-height: 45vh !important;
    object-fit: contain !important;
    box-sizing: border-box !important;
  }

  .admin-video-controls {
    width: 100% !important;
    max-width: 100% !important;
    flex-direction: column !important;
    align-items: stretch !important;
    gap: 8px !important;
    box-sizing: border-box !important;
  }

  .admin-video-controls > div {
    display: flex !important;
    align-items: center !important;
    justify-content: flex-start !important;
    flex-wrap: wrap !important;
    gap: 6px !important;
  }

  .admin-video-controls .admin-btn {
    width: 100% !important;
    text-align: center !important;
    justify-content: center !important;
  }
}

.admin-wrapper,
.admin-wrapper *,
.admin-wrapper *::before,
.admin-wrapper *::after {
  box-sizing: border-box !important;
}

.admin-app-card,
.admin-judging-meta,
.admin-page-heading {
  overflow-wrap: anywhere !important;
  word-break: normal !important;
  white-space: normal !important;
}



/* ============================================================
   v119 — UX: тосты вместо alert() + бэкдроп мобильного сайдбара
   ============================================================ */
.admin-toast-host {
  position: fixed; left: 50%; bottom: max(20px, env(safe-area-inset-bottom, 20px));
  transform: translateX(-50%); z-index: 100000;
  display: flex; flex-direction: column; gap: 10px; align-items: center;
  pointer-events: none; width: min(92vw, 420px);
}
.admin-toast {
  pointer-events: auto; display: flex; align-items: center; gap: 10px;
  width: 100%; box-sizing: border-box; padding: 12px 16px; border-radius: 12px;
  background: rgba(15, 23, 42, 0.97); border: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.5); color: #e2e8f0;
  font-size: 14px; font-weight: 600;
  opacity: 0; transform: translateY(12px);
  transition: opacity 0.22s ease, transform 0.22s ease; cursor: pointer;
}
.admin-toast.show { opacity: 1; transform: translateY(0); }
.admin-toast .admin-toast-ic {
  flex-shrink: 0; width: 22px; height: 22px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 12px; font-weight: 800; color: #fff;
}
.admin-toast.success { border-color: rgba(16, 185, 129, 0.5); }
.admin-toast.success .admin-toast-ic { background: #10b981; }
.admin-toast.error { border-color: rgba(239, 68, 68, 0.5); }
.admin-toast.error .admin-toast-ic { background: #ef4444; }
.admin-toast.info { border-color: rgba(56, 189, 248, 0.5); }
.admin-toast.info .admin-toast-ic { background: #38bdf8; }
.admin-toast-msg { flex: 1; min-width: 0; }

.admin-backdrop {
  position: fixed; inset: 0; z-index: 39;
  background: rgba(2, 6, 23, 0.55); backdrop-filter: blur(2px);
  opacity: 0; transition: opacity 0.22s ease;
}
.admin-backdrop.show { opacity: 1; }
@media (min-width: 901px) { .admin-backdrop { display: none !important; } }


/* v120 — подсказка горячих клавиш в судействе видео */
.admin-judge-hotkeys {
  display: flex; flex-wrap: wrap; gap: 6px 14px;
  padding: 8px 10px 2px; font-size: 11px; color: #94a3b8;
}
.admin-judge-hotkeys span { display: inline-flex; align-items: center; gap: 3px; }
.admin-judge-hotkeys kbd {
  font-family: inherit; background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.16); border-bottom-width: 2px;
  border-radius: 5px; padding: 1px 5px; font-size: 10px; font-weight: 700;
  color: #e2e8f0; min-width: 14px; text-align: center;
}

/* v121 — Кнопка предупреждения / пересъёмки */
.admin-btn.warning {
  background: rgba(245, 158, 11, 0.15);
  border: 1px solid rgba(245, 158, 11, 0.4);
  color: #fbbf24;
}
.admin-btn.warning:hover {
  background: rgba(245, 158, 11, 0.25);
  color: #fef3c7;
}

/* Степпер жизненного цикла соревнований (Скриншот 32) */
.admin-stage-stepper {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 16px;
  padding: 12px;
  background: rgba(15, 23, 42, 0.7);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 14px;
  overflow-x: auto;
}
.admin-stage-step {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.06);
  color: #94a3b8;
  font-size: 12.5px;
  font-weight: 600;
  white-space: nowrap;
  flex: 1;
}
.admin-stage-step.active {
  background: rgba(56, 189, 248, 0.15);
  border-color: rgba(56, 189, 248, 0.4);
  color: #38bdf8;
  font-weight: 700;
}
.admin-stage-step.passed {
  background: rgba(34, 197, 94, 0.1);
  border-color: rgba(34, 197, 94, 0.3);
  color: #4ade80;
}
.admin-stage-step-num {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.08);
  font-size: 11px;
}
.admin-stage-step.active .admin-stage-step-num {
  background: #38bdf8;
  color: #030712;
  font-weight: 800;
}
.admin-stage-step.passed .admin-stage-step-num {
  background: #22c55e;
  color: #030712;
  font-weight: 800;
}

/* 3 вкладки Лидерборда: Результаты / Рекорды / Медали (Скриншоты 32, 33, 34) */
.admin-subtabs-bar {
  display: flex;
  gap: 6px;
  background: rgba(2, 6, 23, 0.6);
  padding: 4px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  margin-bottom: 14px;
}
.admin-subtab-btn {
  flex: 1;
  padding: 8px 12px;
  border: none;
  background: transparent;
  color: #94a3b8;
  font-size: 13px;
  font-weight: 700;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}
.admin-subtab-btn.active {
  background: rgba(56, 189, 248, 0.15);
  color: #38bdf8;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

/* QR Чек-ин на площадке (Скриншоты 25, 26, 27) */
.admin-checkin-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}
@media (max-width: 860px) {
  .admin-checkin-grid {
    grid-template-columns: 1fr;
  }
}
.admin-doc-check-box {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 14px;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 12px;
}
.admin-doc-check-item {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 13px;
  color: #cbd5e1;
  cursor: pointer;
}
.admin-doc-check-item input[type="checkbox"] {
  width: 18px;
  height: 18px;
  accent-color: #22c55e;
  cursor: pointer;
}

/* Переключатель 3 видео комплекса атлета в панели судьи */
.admin-judge-ex-switcher {
  display: flex;
  gap: 8px;
  margin-bottom: 12px;
  overflow-x: auto;
}
.admin-judge-ex-tab {
  flex: 1;
  min-width: 130px;
  display: flex;
  flex-direction: column;
  gap: 3px;
  padding: 8px 12px;
  background: rgba(255, 255, 255, 0.03);
  border: 1.5px solid rgba(255, 255, 255, 0.08);
  border-radius: 10px;
  color: #cbd5e1;
  font-size: 11.5px;
  font-weight: 700;
  cursor: pointer;
  text-align: left;
  transition: all 0.2s ease;
}
.admin-judge-ex-tab:hover {
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(255, 255, 255, 0.16);
}
.admin-judge-ex-tab.active {
  border-color: #38bdf8;
  background: rgba(56, 189, 248, 0.12);
  color: #fff;
}

.admin-complex-summary-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
  margin-bottom: 12px;
}
.admin-complex-summary-table th {
  text-align: left;
  padding: 6px 8px;
  color: #94a3b8;
  font-size: 11px;
  text-transform: uppercase;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}
.admin-complex-summary-table td {
  padding: 8px 8px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
  color: #e2e8f0;
}
.admin-complex-summary-table tr.active-row {
  background: rgba(56, 189, 248, 0.08);
}

/* Аккуратная вкладка/аккордеон 3-х видео комплекса участника */
.admin-complex-drawer-row {
  background: rgba(15, 23, 42, 0.7) !important;
}
.admin-complex-drawer-row td {
  padding: 0 !important;
  border-bottom: 2px solid rgba(56, 189, 248, 0.25) !important;
}
.admin-complex-drawer {
  padding: 14px 18px 18px;
  background: linear-gradient(180deg, rgba(30, 41, 59, 0.45) 0%, rgba(15, 23, 42, 0.85) 100%);
  border-left: 3px solid #38bdf8;
  animation: adminDrawerFade 0.2s ease-out;
}
@keyframes adminDrawerFade {
  from { opacity: 0; transform: translateY(-4px); }
  to { opacity: 1; transform: translateY(0); }
}
.admin-complex-drawer-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
  flex-wrap: wrap;
  gap: 8px;
}
.admin-complex-drawer-title {
  font-size: 13px;
  font-weight: 700;
  color: #38bdf8;
  display: flex;
  align-items: center;
  gap: 6px;
}
.admin-complex-cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 12px;
}
.admin-complex-exercise-card {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 10px;
  padding: 12px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 10px;
  transition: all 0.2s ease;
}
.admin-complex-exercise-card:hover {
  border-color: rgba(56, 189, 248, 0.3);
  background: rgba(56, 189, 248, 0.04);
}
.acec-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 8px;
}
.acec-title {
  font-size: 12px;
  font-weight: 700;
  color: #f1f5f9;
  line-height: 1.4;
}
.acec-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 12px;
  background: rgba(0, 0, 0, 0.25);
  padding: 6px 10px;
  border-radius: 6px;
}
.acec-reps {
  color: #38bdf8;
  font-weight: 800;
}
.acec-judge-reps {
  color: #22c55e;
  font-weight: 800;
}
.acec-actions {
  display: flex;
  gap: 6px;
  margin-top: 2px;
}



