/* ============================================================
   Панель ведущего
   ============================================================ */

.admin-page {
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
}

.admin-header {
  position: sticky;
  top: 0;
  z-index: 30;
  display: flex;
  align-items: center;
  gap: clamp(14px, 2.4vw, 38px);
  padding: 12px clamp(16px, 3vw, 40px);
  background: rgba(7, 11, 22, 0.78);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border-bottom: 1px solid var(--border);
}

.admin-brand {
  font-size: 17px;
}

.admin-tabs {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 4px;
  border-radius: 13px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border);
}

.tab-btn {
  padding: 9px 16px;
  border-radius: 9px;
  color: var(--muted);
  font-size: 14px;
  font-weight: 700;
  transition: 0.18s ease;
  white-space: nowrap;
}

.tab-btn:hover {
  color: var(--text);
}

.tab-btn.active {
  color: #fff;
  background: linear-gradient(135deg, rgba(124, 92, 255, 0.95), rgba(104, 69, 245, 0.95));
  box-shadow: 0 6px 20px rgba(112, 82, 255, 0.32);
}

.admin-header-right {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 9px;
}

.admin-main {
  flex: 1;
  width: min(1520px, 100%);
  margin: 0 auto;
  padding: clamp(18px, 2.4vh, 32px) clamp(16px, 3vw, 40px) 56px;
}

/* ---------- Вход ---------- */

.login-view {
  min-height: calc(100dvh - 120px);
  display: grid;
  place-items: center;
  padding: 20px;
}

.login-card {
  width: min(440px, 100%);
  padding: clamp(26px, 4vw, 44px);
  border-radius: 26px;
  border: 1px solid var(--border);
  background: linear-gradient(165deg, rgba(16, 22, 40, 0.9), rgba(8, 13, 25, 0.94));
  box-shadow: 0 34px 90px rgba(0, 0, 0, 0.45);
  text-align: center;
  animation: fadeUp 0.4s ease both;
}

.login-logo {
  display: flex;
  justify-content: center;
  margin-bottom: 18px;
  font-size: 46px;
}

.login-card h1 {
  margin: 0 0 8px;
  font-size: 28px;
  letter-spacing: -0.02em;
}

.login-sub {
  margin: 0 0 24px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.55;
}

.login-form {
  display: flex;
  flex-direction: column;
  gap: 16px;
  text-align: left;
}

.login-error {
  margin: 0;
  padding: 10px 13px;
  border-radius: 10px;
  background: rgba(255, 84, 112, 0.12);
  border: 1px solid rgba(255, 84, 112, 0.32);
  color: #ffb3c1;
  font-size: 13.5px;
  font-weight: 600;
}

.login-hint {
  margin: 22px 0 0;
  font-size: 12.5px;
}

.login-hint code {
  color: #c3b3ff;
  background: rgba(124, 92, 255, 0.12);
  padding: 2px 6px;
  border-radius: 5px;
  font-size: 12px;
}

/* ---------- Панели ---------- */

.tab-panel {
  animation: fadeIn 0.25s ease both;
}

.tab-panel[hidden] {
  display: none;
}

.panel {
  border-radius: 20px;
  border: 1px solid var(--border);
  background: linear-gradient(165deg, rgba(15, 21, 38, 0.86), rgba(8, 13, 25, 0.92));
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.18);
  padding: clamp(16px, 1.8vw, 24px);
}

.panel-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 16px;
}

.panel-head h2 {
  margin: 0;
  font-size: 18px;
  letter-spacing: -0.01em;
}

.panel-hint {
  color: var(--dim);
  font-size: 12.5px;
}

/* ---------- Статус ---------- */

.status-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: clamp(20px, 4vw, 60px);
  flex-wrap: wrap;
  padding: clamp(20px, 2.4vw, 34px);
  border-radius: 24px;
  border: 1px solid var(--border);
  background:
    radial-gradient(700px 240px at 0% 0%, rgba(124, 92, 255, 0.22), transparent 65%),
    linear-gradient(150deg, rgba(16, 22, 40, 0.84), rgba(8, 13, 25, 0.92));
  margin-bottom: 18px;
  position: relative;
  overflow: hidden;
}

.status-card::after {
  content: "";
  position: absolute;
  right: -60px;
  top: -80px;
  width: 240px;
  height: 240px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(55, 208, 255, 0.14), transparent 70%);
}

.status-main h1 {
  margin: 6px 0 4px;
  font-size: clamp(26px, 3vw, 42px);
  letter-spacing: -0.025em;
  line-height: 1.05;
}

.status-main p {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
}

.status-metrics {
  display: flex;
  gap: clamp(16px, 2.6vw, 44px);
  z-index: 1;
}

.metric {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 2px;
}

.metric b {
  font-size: clamp(26px, 2.6vw, 40px);
  font-weight: 900;
  line-height: 1;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.03em;
}

.metric span {
  color: var(--dim);
  font-size: 12px;
  font-weight: 600;
}

/* ---------- Сетка управления ---------- */

.control-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(320px, 0.8fr);
  gap: 18px;
  align-items: start;
}

.field-panel {
  min-height: 0;
}

.admin-field {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  grid-template-rows: repeat(4, minmax(72px, 10vh));
  gap: 9px;
}

.admin-cell {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 13px;
  border: 1px solid var(--border);
  background: linear-gradient(150deg, rgba(15, 21, 38, 0.78), rgba(8, 13, 25, 0.86));
  font-size: clamp(20px, 1.8vw, 28px);
  font-weight: 900;
  color: #e8edff;
  transition: 0.17s ease;
  overflow: hidden;
  min-height: 0;
}

.admin-cell:hover:not(.is-completed):not(.is-locked) {
  transform: translateY(-2px);
  border-color: rgba(124, 92, 255, 0.55);
  box-shadow: 0 10px 26px rgba(0, 0, 0, 0.35), 0 0 28px rgba(124, 92, 255, 0.18);
}

.admin-cell.is-completed {
  background: rgba(255, 255, 255, 0.028);
  border-color: rgba(255, 255, 255, 0.04);
  color: #414b67;
  cursor: default;
}

.admin-cell.is-locked {
  cursor: not-allowed;
  opacity: 0.8;
}

.admin-cell .ac-flags {
  position: absolute;
  top: 6px;
  right: 6px;
  display: flex;
  align-items: center;
  gap: 4px;
}

.admin-cell .ac-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #4b5674;
}

.admin-cell.is-filled .ac-dot {
  background: var(--true);
  box-shadow: 0 0 8px rgba(47, 227, 164, 0.7);
}

.admin-cell .ac-answer {
  position: absolute;
  left: 6px;
  bottom: 5px;
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 0.02em;
  padding: 2px 5px;
  border-radius: 5px;
  color: #9fb0d8;
  background: rgba(255, 255, 255, 0.06);
}

.admin-cell.is-filled .ac-answer.true {
  color: var(--true);
  background: rgba(47, 227, 164, 0.12);
}

.admin-cell.is-filled .ac-answer.false {
  color: #ff8fa5;
  background: rgba(255, 84, 112, 0.12);
}

.admin-cell .ac-check {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  font-size: 32px;
  color: #3b4560;
}

.admin-cell.is-completed .ac-num {
  opacity: 0.45;
}

.field-legend {
  display: flex;
  gap: 18px;
  flex-wrap: wrap;
  margin-top: 14px;
  color: var(--dim);
  font-size: 12px;
  font-weight: 600;
}

.field-legend span {
  display: inline-flex;
  align-items: center;
  gap: 7px;
}

.legend-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  display: inline-block;
}

.legend-dot.active {
  background: var(--accent);
}

.legend-dot.done {
  background: #3b4560;
}

.legend-dot.empty {
  background: transparent;
  border: 1px solid #556180;
}

/* ---------- Управление ---------- */

.control-side {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.control-panel .panel-head {
  margin-bottom: 12px;
}

.current-question {
  border-radius: 14px;
  border: 1px solid var(--border);
  background: rgba(5, 9, 19, 0.45);
  padding: 14px;
  margin-bottom: 14px;
  min-height: 90px;
}

.cq-empty {
  color: var(--dim);
  font-size: 14px;
  display: grid;
  place-items: center;
  min-height: 60px;
  text-align: center;
}

.cq-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 8px;
}

.cq-num {
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent-2);
}

.cq-timer {
  font-size: 13px;
  font-weight: 800;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}

.cq-timer.urgent {
  color: #ff8fa5;
}

.cq-text {
  margin: 0 0 12px;
  font-size: 15px;
  font-weight: 700;
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.cq-stats {
  display: flex;
  flex-direction: column;
  gap: 7px;
}

.cq-split {
  display: flex;
  height: 8px;
  border-radius: 99px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.07);
}

.cq-split .s-true {
  background: linear-gradient(90deg, #1abc87, #45efb4);
  transition: width 0.4s ease;
}

.cq-split .s-false {
  background: linear-gradient(90deg, #e63456, #ff7d94);
  transition: width 0.4s ease;
}

.cq-counts {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  font-size: 12px;
  font-weight: 700;
  color: var(--muted);
}

.cq-counts .ct {
  color: #7ff3c9;
}

.cq-counts .cf {
  color: #ff9caf;
}

.action-stack {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.action-stack [hidden] {
  display: none !important;
}

.confirm-block {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.confirm-label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  font-size: 12px;
  color: var(--dim);
  font-weight: 600;
}

.stored-answer {
  color: var(--muted);
}

.stored-answer b {
  color: var(--text);
}

.confirm-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 9px;
}

.confirm-grid .btn {
  padding-left: 10px;
  padding-right: 10px;
  font-size: 15px;
  letter-spacing: 0.04em;
}

.readiness {
  margin-top: 14px;
  padding-top: 13px;
  border-top: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  gap: 7px;
}

.ready-row {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12.5px;
  color: var(--muted);
  font-weight: 600;
}

.ready-row .r-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  flex: none;
  background: var(--dim);
}

.ready-row.ok {
  color: #b9f7e2;
}

.ready-row.ok .r-dot {
  background: var(--true);
  box-shadow: 0 0 8px rgba(47, 227, 164, 0.6);
}

.ready-row.bad {
  color: #ffc1cc;
}

.ready-row.bad .r-dot {
  background: var(--false);
}

.reset-row {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 14px;
  padding-top: 13px;
  border-top: 1px solid var(--border);
}

/* ---------- Подключение ---------- */

.connect-body {
  display: flex;
  gap: 14px;
  align-items: center;
  margin-bottom: 14px;
}

.mini-qr {
  width: 116px;
  height: 116px;
  flex: none;
  padding: 7px;
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.35);
}

.mini-qr img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  border-radius: 5px;
}

.connect-info {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.connect-link {
  font-size: 12.5px;
  font-weight: 700;
  color: #cdd6ff;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  padding: 7px 9px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border);
}

.url-editor {
  display: flex;
  align-items: flex-end;
  gap: 8px;
  margin-bottom: 8px;
}

.url-editor .field {
  flex: 1;
  min-width: 0;
  gap: 5px;
}

.url-editor .field > span {
  font-size: 10.5px;
}

.url-editor .input {
  padding: 9px 11px;
  font-size: 13px;
}

.connect-panel .hint {
  font-size: 12px;
}

/* ---------- Вопросы ---------- */

.page-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
  margin-bottom: 18px;
}

.page-head h1 {
  margin: 0 0 4px;
  font-size: clamp(28px, 3vw, 40px);
  letter-spacing: -0.025em;
}

.page-head p {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
}

.readiness-card {
  width: min(320px, 100%);
  padding: 14px 16px;
  border-radius: 16px;
  border: 1px solid var(--border);
  background: rgba(10, 15, 28, 0.72);
}

.readiness-top {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  font-size: 12px;
  color: var(--muted);
  font-weight: 700;
  margin-bottom: 8px;
}

.readiness-top b {
  color: var(--text);
  font-size: 16px;
}

.readiness-track {
  height: 8px;
  border-radius: 99px;
  background: rgba(255, 255, 255, 0.08);
  overflow: hidden;
  margin-bottom: 8px;
}

.readiness-track i {
  display: block;
  height: 100%;
  width: 0;
  border-radius: inherit;
  background: linear-gradient(90deg, #7c5cff, #37d0ff);
  transition: width 0.4s ease;
}

.question-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 14px;
}

.qcard {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 13px;
  border-radius: 17px;
  border: 1px solid var(--border);
  background: linear-gradient(160deg, rgba(15, 21, 38, 0.84), rgba(8, 13, 25, 0.9));
  text-align: left;
  transition: 0.18s ease;
  position: relative;
  overflow: hidden;
}

.qcard:hover {
  transform: translateY(-3px);
  border-color: rgba(124, 92, 255, 0.5);
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.35);
}

.qcard.is-completed {
  opacity: 0.65;
}

.qcard.is-completed:hover {
  transform: none;
  border-color: var(--border);
  box-shadow: none;
}

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

.qcard-num {
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.12em;
  color: var(--dim);
}

.qcard-thumb {
  height: 92px;
  border-radius: 11px;
  overflow: hidden;
  background: rgba(5, 9, 19, 0.55);
  display: grid;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.05);
}

.qcard-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.qcard-thumb .no-img {
  color: #46516d;
  font-size: 24px;
  font-weight: 900;
}

.qcard-text {
  margin: 0;
  font-size: 13px;
  line-height: 1.4;
  color: #dfe5f8;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  min-height: 36px;
}

.qcard-text.empty {
  color: var(--dim);
  font-style: italic;
}

.qcard-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  font-size: 11px;
  color: var(--dim);
  font-weight: 600;
}

.qcard-completed {
  color: #8d79ff;
}

/* ---------- Таблица участников ---------- */

.players-panel {
  padding: 0;
  overflow: hidden;
}

.table-wrap {
  overflow-x: auto;
}

.admin-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}

.admin-table th {
  text-align: left;
  padding: 13px 18px;
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--dim);
  font-weight: 800;
  border-bottom: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.025);
}

.admin-table td {
  padding: 12px 18px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.045);
  vertical-align: middle;
}

.admin-table tbody tr:last-child td {
  border-bottom: none;
}

.admin-table tbody tr {
  transition: background 0.15s ease;
}

.admin-table tbody tr:hover {
  background: rgba(255, 255, 255, 0.03);
}

.admin-table tbody tr.top-row {
  background: rgba(255, 206, 92, 0.055);
}

.admin-table .col-place {
  width: 70px;
}

.admin-table .col-score {
  width: 120px;
  text-align: right;
}

.admin-table .col-answer {
  width: 160px;
}

.admin-table td.col-score {
  font-weight: 900;
  font-size: 17px;
  text-align: right;
  font-variant-numeric: tabular-nums;
}

.place-num {
  display: inline-grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border-radius: 9px;
  background: rgba(255, 255, 255, 0.05);
  font-size: 12.5px;
  font-weight: 800;
  color: var(--muted);
}

.top-row .place-num.gold {
  background: rgba(255, 206, 92, 0.15);
  color: var(--gold);
}

.top-row .place-num.silver {
  background: rgba(199, 212, 235, 0.12);
  color: #dfe8f8;
}

.top-row .place-num.bronze {
  background: rgba(222, 150, 94, 0.14);
  color: #f0b078;
}

.player-cell {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.player-avatar {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 12px;
  font-weight: 900;
  color: #0a1020;
  flex: none;
}

.player-name {
  font-weight: 700;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.table-empty {
  padding: 40px 24px;
  text-align: center;
  color: var(--dim);
  font-size: 14px;
}

.table-empty[hidden] {
  display: none;
}

.history-panel {
  margin-top: 18px;
}

.history-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.history-row {
  display: grid;
  grid-template-columns: 46px minmax(0, 1fr) auto auto;
  gap: 12px;
  align-items: center;
  padding: 11px 13px;
  border-radius: 11px;
  background: rgba(255, 255, 255, 0.035);
  border: 1px solid rgba(255, 255, 255, 0.045);
}

.history-row .h-num {
  font-weight: 900;
  color: var(--dim);
  font-size: 13px;
}

.history-row .h-text {
  font-size: 13px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.history-row .h-stats {
  font-size: 12px;
  color: var(--muted);
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.history-empty {
  color: var(--dim);
  font-size: 13px;
  padding: 8px 2px;
}

/* ---------- Модальное окно ---------- */

.modal {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: rgba(3, 6, 14, 0.72);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  overflow-y: auto;
  animation: fadeIn 0.2s ease both;
}

.modal[hidden] {
  display: none;
}

.modal-card {
  position: relative;
  width: min(620px, 100%);
  max-height: calc(100dvh - 48px);
  overflow-y: auto;
  padding: clamp(22px, 3vw, 34px);
  border-radius: 24px;
  border: 1px solid var(--border-strong);
  background: linear-gradient(170deg, #121a2d, #0a0f1d);
  box-shadow: 0 40px 120px rgba(0, 0, 0, 0.65);
  animation: modalIn 0.25s cubic-bezier(0.2, 0.9, 0.3, 1) both;
}

@keyframes modalIn {
  from {
    opacity: 0;
    transform: translateY(18px) scale(0.98);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.modal-close {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 36px;
  height: 36px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  font-size: 22px;
  line-height: 1;
  color: var(--muted);
  background: var(--surface);
  border: 1px solid var(--border);
  transition: 0.16s ease;
}

.modal-close:hover {
  color: var(--text);
  background: var(--surface-2);
}

.modal-head {
  margin-bottom: 20px;
  padding-right: 40px;
}

.modal-head h2 {
  margin: 4px 0 0;
  font-size: 24px;
  letter-spacing: -0.02em;
}

#questionForm {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

#questionForm label {
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
}

.char-counter {
  text-align: right;
  font-size: 11.5px;
  color: var(--dim);
  font-variant-numeric: tabular-nums;
}

.upload-zone {
  position: relative;
  min-height: 160px;
  border-radius: 14px;
  border: 1.5px dashed rgba(255, 255, 255, 0.16);
  background: rgba(5, 9, 19, 0.45);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  cursor: pointer;
  transition: 0.18s ease;
}

.upload-zone:hover,
.upload-zone.drag-over {
  border-color: rgba(124, 92, 255, 0.6);
  background: rgba(124, 92, 255, 0.05);
}

.upload-zone img {
  width: 100%;
  max-height: 260px;
  object-fit: contain;
  background: #05080f;
}

.upload-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 7px;
  padding: 24px;
  text-align: center;
  color: var(--dim);
}

.upload-empty svg {
  width: 40px;
  height: 40px;
  color: #5a6688;
}

.upload-empty b {
  color: var(--muted);
  font-size: 14px;
}

.upload-empty span {
  font-size: 12px;
  line-height: 1.4;
}

.upload-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 8px;
}

.answer-toggle {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.answer-option {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 18px;
  border-radius: 14px;
  border: 1px solid var(--border);
  background: rgba(5, 9, 19, 0.4);
  cursor: pointer;
  transition: 0.18s ease;
  user-select: none;
}

.answer-option input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.answer-option .ao-check {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.25);
  flex: none;
  transition: 0.18s ease;
}

.answer-option .ao-label {
  font-size: 17px;
  font-weight: 900;
  letter-spacing: 0.06em;
  color: var(--muted);
}

.answer-option.is-true:hover {
  border-color: rgba(47, 227, 164, 0.45);
}

.answer-option.is-false:hover {
  border-color: rgba(255, 84, 112, 0.45);
}

.answer-option.is-true:has(input:checked) {
  border-color: rgba(47, 227, 164, 0.7);
  background: rgba(47, 227, 164, 0.1);
  box-shadow: 0 0 30px rgba(47, 227, 164, 0.1);
}

.answer-option.is-false:has(input:checked) {
  border-color: rgba(255, 84, 112, 0.7);
  background: rgba(255, 84, 112, 0.1);
  box-shadow: 0 0 30px rgba(255, 84, 112, 0.1);
}

.answer-option.is-true:has(input:checked) .ao-check {
  border-color: var(--true);
  background: var(--true);
  box-shadow: inset 0 0 0 4px #0b1526;
}

.answer-option.is-false:has(input:checked) .ao-check {
  border-color: var(--false);
  background: var(--false);
  box-shadow: inset 0 0 0 4px #0b1526;
}

.answer-option.is-true:has(input:checked) .ao-label {
  color: #7ff3c9;
}

.answer-option.is-false:has(input:checked) .ao-label {
  color: #ff9caf;
}

.modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  padding-top: 4px;
}

/* ---------- Адаптив ---------- */

@media (max-width: 1080px) {
  .control-grid {
    grid-template-columns: 1fr;
  }

  .control-side {
    display: grid;
    grid-template-columns: 1fr 1fr;
    align-items: start;
  }
}

@media (max-width: 820px) {
  .admin-header {
    flex-wrap: wrap;
    gap: 8px 14px;
  }

  .admin-brand {
    font-size: 15px;
  }

  .admin-tabs {
    order: 3;
    width: 100%;
    overflow-x: auto;
  }

  .admin-header-right {
    margin-left: auto;
  }

  .admin-header-right .pill {
    display: none;
  }

  .control-side {
    grid-template-columns: 1fr;
  }

  .status-card {
    align-items: flex-start;
  }

  .status-metrics {
    width: 100%;
    justify-content: space-between;
  }
}

@media (max-width: 560px) {
  .admin-main {
    padding: 14px 12px 40px;
  }

  .admin-field {
    gap: 6px;
    grid-template-rows: repeat(4, minmax(54px, 9vh));
  }

  .admin-cell {
    border-radius: 9px;
    font-size: 18px;
  }

  .admin-cell .ac-answer {
    display: none;
  }

  .question-grid {
    grid-template-columns: repeat(auto-fill, minmax(158px, 1fr));
    gap: 10px;
  }

  .qcard-thumb {
    height: 72px;
  }

  .admin-table th,
  .admin-table td {
    padding: 10px 12px;
  }

  .admin-table .col-answer {
    display: none;
  }

  .admin-table th:nth-child(3) {
    display: none;
  }

  .history-row {
    grid-template-columns: 36px minmax(0, 1fr) auto;
  }

  .history-row .h-stats {
    display: none;
  }

  .connect-body {
    flex-direction: column;
    align-items: flex-start;
  }

  .connect-info {
    width: 100%;
  }

  .modal {
    padding: 10px;
  }

  .modal-card {
    max-height: calc(100dvh - 20px);
    padding: 18px;
    border-radius: 18px;
  }
}
