/* ============================================================
   Lumen v2.0 — Доска учителя
   Стили тулбара, canvas, палитры, фонов
   ============================================================ */

/* ---------- Layout доски ---------- */
.teacher-v4 .board-layout {
  display: grid;
  grid-template-columns: 56px 1fr 380px;
  gap: 14px;
  min-height: 640px;
  margin-bottom: 14px;
  align-items: start;
}

@media (max-width: 1400px) {
  .teacher-v4 .board-layout {
    grid-template-columns: 56px 1fr 340px;
  }
}

@media (max-width: 1150px) {
  .teacher-v4 .board-layout {
    grid-template-columns: 1fr;
  }
}

/* ---------- Тулбар слева ---------- */
.teacher-v4 .board-toolbar {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 8px 6px;
  background: rgba(20, 25, 45, 0.6);
  backdrop-filter: blur(24px);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 16px;
  box-shadow: 0 20px 60px rgba(0,0,0,0.4);
  align-items: center;
  height: fit-content;
  position: sticky;
  top: 20px;
}

.teacher-v4 .board-tool {
  width: 42px;
  height: 42px;
  border-radius: 11px;
  background: transparent;
  border: none;
  color: #9aa0b4;
  font-size: 18px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.15s;
  position: relative;
  font-family: inherit;
}
.teacher-v4 .board-tool:hover {
  background: rgba(255,255,255,0.06);
  color: #eaeaf0;
}
.teacher-v4 .board-tool.active {
  background: linear-gradient(135deg, #7c5cff, #4a7dff);
  color: #fff;
  box-shadow: 0 4px 12px rgba(124, 92, 255, 0.45);
}
.teacher-v4 .board-tool:disabled {
  opacity: 0.35;
  cursor: not-allowed;
}

.teacher-v4 .board-tool-sep {
  width: 26px;
  height: 1px;
  background: rgba(255,255,255,0.08);
  margin: 4px 0;
}

/* ---------- Canvas ---------- */
.teacher-v4 .board-canvas-wrap {
  position: relative;
  border-radius: 16px;
  overflow: hidden;
  border: 1px solid rgba(255,255,255,0.08);
  box-shadow: 0 20px 60px rgba(0,0,0,0.4);
  background: #ffffff;
  min-height: 620px;
}

.teacher-v4 #board-container {
  width: 100%;
  height: 100%;
  position: absolute;
  inset: 0;
}

/* ---------- Виды фона доски ---------- */
.teacher-v4 .board-canvas-wrap.bg-white {
  background: #ffffff;
}
.teacher-v4 .board-canvas-wrap.bg-grid {
  background:
    linear-gradient(#d7e0f0 1px, transparent 1px) 0 0 / 24px 24px,
    linear-gradient(90deg, #d7e0f0 1px, transparent 1px) 0 0 / 24px 24px,
    #ffffff;
}
.teacher-v4 .board-canvas-wrap.bg-line {
  background:
    linear-gradient(transparent 26px, #d7e0f0 27px) 0 0 / 100% 28px,
    #ffffff;
}
.teacher-v4 .board-canvas-wrap.bg-dots {
  background:
    radial-gradient(circle, #c8cde0 1.2px, transparent 1.2px) 0 0 / 20px 20px,
    #ffffff;
}
.teacher-v4 .board-canvas-wrap.bg-green {
  background: #1e4d2b;
}
.teacher-v4 .board-canvas-wrap.bg-designer {
  background:
    radial-gradient(circle at 20% 20%, #1e2445 0%, #0f1220 60%),
    #0f1220;
}
.teacher-v4 .board-canvas-wrap.bg-designer::after {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle, rgba(160,175,220,0.15) 1px, transparent 1.5px) 0 0 / 26px 26px;
  pointer-events: none;
}

/* ---------- Палитра цветов (всплывающая) ---------- */
.teacher-v4 .board-palette {
  position: absolute;
  left: 70px;
  top: 12px;
  display: none;
  flex-direction: row;
  gap: 6px;
  padding: 8px;
  background: rgba(20, 25, 45, 0.95);
  backdrop-filter: blur(24px);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 14px;
  box-shadow: 0 12px 40px rgba(0,0,0,0.5);
  z-index: 50;
}
.teacher-v4 .board-palette.open { display: flex; }

.teacher-v4 .board-color {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  border: 2px solid transparent;
  cursor: pointer;
  transition: transform 0.12s, border-color 0.15s;
}
.teacher-v4 .board-color:hover { transform: scale(1.12); }
.teacher-v4 .board-color.active {
  border-color: #7c5cff;
  box-shadow: 0 0 0 2px rgba(124, 92, 255, 0.35);
}

/* ---------- Толщины (всплывающая) ---------- */
.teacher-v4 .board-widths {
  position: absolute;
  left: 70px;
  top: 60px;
  display: none;
  flex-direction: row;
  gap: 6px;
  padding: 8px;
  background: rgba(20, 25, 45, 0.95);
  backdrop-filter: blur(24px);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 14px;
  box-shadow: 0 12px 40px rgba(0,0,0,0.5);
  z-index: 50;
  align-items: center;
}
.teacher-v4 .board-widths.open { display: flex; }

.teacher-v4 .board-width-btn {
  width: 36px;
  height: 32px;
  border-radius: 9px;
  border: 1px solid transparent;
  background: rgba(255,255,255,0.04);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.15s;
}
.teacher-v4 .board-width-btn:hover { background: rgba(255,255,255,0.1); }
.teacher-v4 .board-width-btn.active {
  background: rgba(124, 92, 255, 0.25);
  border-color: #7c5cff;
}
.teacher-v4 .board-width-dot {
  background: #eaeaf0;
  border-radius: 50%;
}

/* ---------- Виды фона (всплывающая) ---------- */
.teacher-v4 .board-backgrounds {
  position: absolute;
  left: 70px;
  top: 12px;
  display: none;
  gap: 8px;
  padding: 10px;
  background: rgba(20, 25, 45, 0.95);
  backdrop-filter: blur(24px);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 14px;
  box-shadow: 0 12px 40px rgba(0,0,0,0.5);
  z-index: 50;
}
.teacher-v4 .board-backgrounds.open { display: flex; }

.teacher-v4 .board-bg-btn {
  width: 44px;
  height: 44px;
  border-radius: 10px;
  border: 2px solid transparent;
  cursor: pointer;
  transition: all 0.15s;
  position: relative;
}
.teacher-v4 .board-bg-btn:hover { transform: scale(1.06); }
.teacher-v4 .board-bg-btn.active {
  border-color: #7c5cff;
  box-shadow: 0 0 0 2px rgba(124, 92, 255, 0.35);
}

.teacher-v4 .board-bg-btn[data-bg="white"]    { background: #ffffff; }
.teacher-v4 .board-bg-btn[data-bg="grid"]     {
  background:
    linear-gradient(#d7e0f0 1px, transparent 1px) 0 0 / 10px 10px,
    linear-gradient(90deg, #d7e0f0 1px, transparent 1px) 0 0 / 10px 10px,
    #ffffff;
}
.teacher-v4 .board-bg-btn[data-bg="line"]     {
  background:
    linear-gradient(transparent 8px, #d7e0f0 9px) 0 0 / 100% 10px,
    #ffffff;
}
.teacher-v4 .board-bg-btn[data-bg="dots"]     {
  background:
    radial-gradient(circle, #c8cde0 1px, transparent 1.3px) 0 0 / 8px 8px,
    #ffffff;
}
.teacher-v4 .board-bg-btn[data-bg="green"]    { background: #1e4d2b; }
.teacher-v4 .board-bg-btn[data-bg="designer"] {
  background: linear-gradient(135deg, #1e2445, #0f1220);
}

/* ---------- Индикатор "нет Konva" ---------- */
.teacher-v4 .board-error {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(231, 76, 60, 0.1);
  color: #ff7b7b;
  font-size: 14px;
  font-weight: 600;
  padding: 20px;
  text-align: center;
  line-height: 1.5;
}

/* ---------- Светлая тема ---------- */
body.light .teacher-v4 .board-toolbar {
  background: rgba(255, 255, 255, 0.8);
  border-color: #d0d5e0;
}
body.light .teacher-v4 .board-tool {
  color: #6a7290;
}
body.light .teacher-v4 .board-tool:hover {
  background: rgba(0,0,0,0.05);
  color: #1a1d29;
}
body.light .teacher-v4 .board-tool-sep {
  background: #d0d5e0;
}
body.light .teacher-v4 .board-canvas-wrap {
  border-color: #d0d5e0;
}
body.light .teacher-v4 .board-palette,
body.light .teacher-v4 .board-widths,
body.light .teacher-v4 .board-backgrounds {
  background: rgba(255, 255, 255, 0.98);
  border-color: #d0d5e0;
}
body.light .teacher-v4 .board-width-btn {
  background: rgba(0,0,0,0.04);
}
body.light .teacher-v4 .board-width-dot {
  background: #1a1d29;
}

/* ---------- Адаптив: узкие экраны ---------- */
@media (max-width: 1000px) {
  .teacher-v4 .board-layout {
    grid-template-columns: 1fr;
  }
  .teacher-v4 .board-toolbar {
    flex-direction: row;
    height: auto;
    position: static;
    flex-wrap: wrap;
  }
  .teacher-v4 .board-tool-sep {
    width: 1px;
    height: 26px;
    margin: 0 4px;
  }
  .teacher-v4 .board-palette,
  .teacher-v4 .board-widths,
  .teacher-v4 .board-backgrounds {
    left: 12px;
    top: 60px;
  }
}

/* ============================================================
   ПРАВАЯ ПАНЕЛЬ ДОСКИ (Управление / Карта)
   ============================================================ */

.teacher-v4 .board-sidepanel {
  background: rgba(20, 25, 45, 0.6);
  backdrop-filter: blur(24px);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 16px;
  box-shadow: 0 20px 60px rgba(0,0,0,0.4);
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-height: 80vh;
  overflow-y: auto;
  position: sticky;
  top: 20px;
}

/* Вкладки панели */
.teacher-v4 .sidepanel-tabs {
  display: flex;
  gap: 4px;
  background: rgba(15,18,32,0.6);
  padding: 4px;
  border-radius: 10px;
}
.teacher-v4 .sidepanel-tab {
  flex: 1;
  padding: 9px 12px;
  background: transparent;
  border: none;
  color: #9aa0b4;
  font-weight: 700;
  font-size: 12px;
  font-family: inherit;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.15s;
}
.teacher-v4 .sidepanel-tab:hover { background: rgba(255,255,255,0.05); color: #eaeaf0; }
.teacher-v4 .sidepanel-tab.active {
  background: linear-gradient(135deg, #7c5cff, #4a7dff);
  color: #fff;
  box-shadow: 0 4px 12px rgba(124, 92, 255, 0.4);
}

/* Контент панели */
.teacher-v4 .sidepanel-content {
  display: none;
  flex-direction: column;
  gap: 10px;
}
.teacher-v4 .sidepanel-content.active { display: flex; }

/* Строки */
.teacher-v4 .sp-row {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.teacher-v4 .sp-row-split {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.teacher-v4 .sp-row-split > * { flex: 1; min-width: 0; }

.teacher-v4 .sp-sep {
  height: 1px;
  background: rgba(255,255,255,0.06);
  margin: 4px 0;
}

.teacher-v4 .sp-label {
  font-size: 11px;
  color: #9aa0b4;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  white-space: nowrap;
}

/* Внутри панели кнопки компактнее */
.teacher-v4 .board-sidepanel .btn {
  padding: 10px 14px;
  font-size: 12px;
}
.teacher-v4 .board-sidepanel .action-btn {
  padding: 8px 12px;
  font-size: 12px;
}
.teacher-v4 .board-sidepanel .dropdown {
  min-width: 0;
  width: 100%;
}
.teacher-v4 .board-sidepanel .dropdown-trigger {
  padding: 10px 12px;
  font-size: 12px;
}
.teacher-v4 .board-sidepanel .dropdown-menu {
  min-width: 100%;
}

/* Приглашение компактнее */
.teacher-v4 .board-sidepanel .invite-row {
  padding: 8px 10px;
  gap: 6px;
  margin-bottom: 0;
}
.teacher-v4 .board-sidepanel .invite-label { font-size: 14px; }
.teacher-v4 .board-sidepanel .invite-link { font-size: 11px; min-width: 0; }
.teacher-v4 .board-sidepanel .invited-counter { font-size: 11px; }

/* Счётчики */
.teacher-v4 .board-sidepanel .stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-bottom: 0;
}
.teacher-v4 .board-sidepanel .stat-pill {
  min-width: 0;
  padding: 8px 10px;
  font-size: 12px;
}
.teacher-v4 .board-sidepanel .stat-pill .num { font-size: 16px; }

/* Карта класса */
.teacher-v4 .board-sidepanel .map {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding: 8px;
  background: rgba(15,18,32,0.5);
  border-radius: 10px;
  min-height: 40px;
}
.teacher-v4 .board-sidepanel .student {
  padding: 6px 10px;
  font-size: 12px;
}

/* Свёрнутое присутствие */
.teacher-v4 .board-sidepanel .presence { margin-bottom: 0; }
.teacher-v4 .board-sidepanel .presence summary { font-size: 12px; padding: 8px 12px; }
.teacher-v4 .board-sidepanel .presence-content { font-size: 12px; gap: 10px; flex-direction: column; }

/* Текущий вопрос */
.teacher-v4 .board-sidepanel #current-q {
  padding: 10px 12px;
  background: rgba(15,18,32,0.6);
  border-radius: 10px;
  border-left: 3px solid #7c5cff;
  font-size: 12px;
  font-weight: 600;
  margin-top: 0;
}

/* Квиз-результаты */
.teacher-v4 .board-sidepanel #quiz-results {
  padding: 10px 12px;
  background: rgba(15,18,32,0.6);
  border-radius: 10px;
  margin-top: 0;
}

/* Подсказка */
.teacher-v4 .board-sidepanel .hint {
  padding: 10px 12px;
  font-size: 12px;
  margin-top: 0;
}

.teacher-v4 .board-tool[data-tool="select"].active {
  background: linear-gradient(135deg, #f39c12, #e67e22);
  box-shadow: 0 4px 12px rgba(243, 156, 18, 0.45);
}
.teacher-v4 .board-sidepanel .btn {
  padding: 10px 14px;
  font-size: 16px;
  min-width: 44px;
  line-height: 1;
}
.teacher-v4 .board-sidepanel .btn-primary {
  color: #ffffff;
}
.teacher-v4 .board-sidepanel .btn-ghost {
  color: #eaeaf0;
  font-size: 16px;
  min-width: 44px;
}
body.light .teacher-v4 .board-sidepanel .btn-ghost {
  color: #1a1d29;
}
/* Светлая тема — правки для правой панели доски */
body.light .teacher-v4 .board-sidepanel .action-btn {
  background: #ffffff;
  border-color: #d0d5e0;
  color: #1a1d29;
}
body.light .teacher-v4 .board-sidepanel .action-btn:hover {
  background: #eef1ff;
  border-color: #7c5cff;
  color: #1a1d29;
}

body.light .teacher-v4 .sidepanel-tab {
  color: #6a7290;
}
body.light .teacher-v4 .sidepanel-tab.active {
  color: #ffffff;
}

/* Плейсхолдер вопроса в светлой теме */
body.light .teacher-v4 .board-sidepanel input#question,
body.light .teacher-v4 .board-sidepanel #question {
  background: #ffffff;
  color: #1a1d29;
  border-color: #d0d5e0;
}
body.light .teacher-v4 .board-sidepanel #question::placeholder {
  color: #9aa0b4;
}

/* Плейсхолдер ключевых слов */
body.light .teacher-v4 .board-sidepanel .keywords-input {
  background: #ffffff;
  color: #1a1d29;
  border-color: #d0d5e0;
}
body.light .teacher-v4 .board-sidepanel .keywords-input::placeholder {
  color: #9aa0b4;
}
/* ============================================================
   ФИНАЛЬНЫЕ ПРАВКИ ПРАВОЙ ПАНЕЛИ ДОСКИ
   ============================================================ */

/* Кнопки — мягче */
.teacher-v4 .board-sidepanel .btn {
  font-weight: 600;
  font-size: 13px;
  padding: 10px 14px;
  gap: 8px;
  letter-spacing: 0.2px;
}

.teacher-v4 .board-sidepanel .btn-primary {
  font-weight: 600;
}

.teacher-v4 .board-sidepanel .btn-ghost {
  font-weight: 600;
}

/* Кнопки ▶ и × — компактные и видимые */
.teacher-v4 .board-sidepanel .btn-primary[onclick="ask()"],
.teacher-v4 .board-sidepanel .btn-ghost[onclick="clearQuestion()"] {
  min-width: 44px;
  font-size: 16px;
  padding: 10px 12px;
  flex: 0 0 auto;   /* не растягиваются на всю ширину */
}

/* Светлая тема */
body.light .teacher-v4 .board-sidepanel .btn-ghost {
  background: #ffffff;
  color: #1a1d29;
  border-color: #d0d5e0;
}
body.light .teacher-v4 .board-sidepanel .btn-ghost:hover {
  background: #eef1ff;
  border-color: #7c5cff;
}
/* ============================================================
   Кнопки "Задать" и "Завершить" — текст вместо иконок
   ============================================================ */

.teacher-v4 .board-sidepanel .btn-primary[onclick="ask()"],
.teacher-v4 .board-sidepanel .btn-ghost[onclick="clearQuestion()"] {
  flex: 0 0 auto;
  min-width: 0;
  padding: 10px 12px;
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
}

/* Чуть сузим select таймера, чтобы всё влезло */
.teacher-v4 .board-sidepanel #timer-select {
  min-width: 0;
  flex: 1 1 auto;
}
/* ============================================================
   СВЕТЛАЯ ТЕМА — полный фикс правой панели доски
   ============================================================ */

/* === Кнопки: Задать / Завершить === */
body.light .teacher-v4 .board-sidepanel .btn-primary {
  background: linear-gradient(135deg, #7c5cff, #4a7dff);
  color: #ffffff;
}
body.light .teacher-v4 .board-sidepanel .btn-primary:hover {
  filter: brightness(1.08);
}

body.light .teacher-v4 .board-sidepanel .btn-ghost {
  background: #ffffff;
  color: #1a1d29;
  border: 1px solid #d0d5e0;
}
body.light .teacher-v4 .board-sidepanel .btn-ghost:hover {
  background: #eef1ff;
  border-color: #7c5cff;
}

/* === Кнопки "Ответившие" / "Любой" / "Сбросить" / "Завершить урок" === */
body.light .teacher-v4 .board-sidepanel .btn {
  color: #1a1d29;
}
body.light .teacher-v4 .board-sidepanel .btn-primary {
  color: #ffffff;
}

/* === action-btn: QR, Вставить картинку, Теория === */
body.light .teacher-v4 .board-sidepanel .action-btn {
  background: #ffffff;
  border: 1px solid #d0d5e0;
  color: #1a1d29;
}
body.light .teacher-v4 .board-sidepanel .action-btn:hover {
  background: #eef1ff;
  border-color: #7c5cff;
  color: #1a1d29;
}

/* Кнопка теории — акцентная (если она есть) */
body.light .teacher-v4 .board-sidepanel #theory-toggle-btn {
  background: rgba(46, 204, 113, 0.1);
  border-color: rgba(46, 204, 113, 0.5);
  color: #0a8a3f;
}

/* === Поле вопроса и таймер === */
body.light .teacher-v4 .board-sidepanel #question {
  background: #ffffff;
  color: #1a1d29;
  border: 1px solid #d0d5e0;
}
body.light .teacher-v4 .board-sidepanel #question::placeholder {
  color: #9aa0b4;
  opacity: 1;
}

body.light .teacher-v4 .board-sidepanel #timer-select {
  background: #ffffff;
  color: #1a1d29;
  border: 1px solid #d0d5e0;
}

/* === Ключевые слова === */
body.light .teacher-v4 .board-sidepanel .keywords-input {
  background: #ffffff;
  color: #1a1d29;
  border: 1px solid #d0d5e0;
}
body.light .teacher-v4 .board-sidepanel .keywords-input::placeholder {
  color: #9aa0b4;
  opacity: 1;
}

/* === Выпадашки (Материал, Класс, Режим, Набор) === */
body.light .teacher-v4 .board-sidepanel .dropdown-trigger {
  background: #ffffff;
  color: #1a1d29;
  border: 1px solid #d0d5e0;
}
body.light .teacher-v4 .board-sidepanel .dropdown-trigger:hover {
  border-color: #7c5cff;
}
body.light .teacher-v4 .board-sidepanel .dropdown-menu {
  background: #ffffff;
  border: 1px solid #d0d5e0;
}
body.light .teacher-v4 .board-sidepanel .dropdown-item {
  color: #1a1d29;
}
body.light .teacher-v4 .board-sidepanel .dropdown-item:hover {
  background: #eef1ff;
  color: #1a1d29;
}
body.light .teacher-v4 .board-sidepanel .dropdown-item.selected {
  background: rgba(124, 92, 255, 0.12);
  color: #1a1d29;
}

/* === Ссылка-приглашение === */
body.light .teacher-v4 .board-sidepanel .invite-row {
  background: #f4f6fb;
  border: 1px solid #d0d5e0;
}
body.light .teacher-v4 .board-sidepanel .invite-link {
  color: #1a1d29;
}

/* === Вкладки панели (Управление / Карта) === */
body.light .teacher-v4 .board-sidepanel .sidepanel-tabs {
  background: #f4f6fb;
}
body.light .teacher-v4 .board-sidepanel .sidepanel-tab {
  color: #6a7290;
}
body.light .teacher-v4 .board-sidepanel .sidepanel-tab.active {
  color: #ffffff;
}

/* === Лейблы (РЕЖИМ, НАБОР, Ответ) === */
body.light .teacher-v4 .board-sidepanel .sp-label {
  color: #6a7290;
}

/* === Разделители === */
body.light .teacher-v4 .board-sidepanel .sp-sep {
  background: #e0e5f0;
}

/* === Анонимно / Голос === */
body.light .teacher-v4 .board-sidepanel .anon-toggle {
  background: #ffffff;
  color: #1a1d29;
  border: 1px solid #d0d5e0;
}
/* Светлая тема — Материал (первый dropdown) */
body.light .teacher-v4 .board-sidepanel #material-trigger-label {
  color: #1a1d29 !important;
}

/* На всякий случай — все dropdown-trigger и его span-ы */
body.light .teacher-v4 .board-sidepanel .dropdown-trigger,
body.light .teacher-v4 .board-sidepanel .dropdown-trigger span {
  color: #1a1d29;
}

/* Стрелка вниз — фиолетовая, чтобы виделась */
body.light .teacher-v4 .board-sidepanel .dropdown-arrow {
  color: #7c5cff;
}
/* ============================================================
   СВЕТЛАЯ ТЕМА — вкладка «Карта»
   ============================================================ */

/* === Счётчики (Понял / Почти / Потерялся / Ждём) === */
body.light .teacher-v4 .board-sidepanel .stat-pill {
  background: #ffffff;
  border: 1px solid #d0d5e0;
}
body.light .teacher-v4 .board-sidepanel .stat-pill .label {
  color: #1a1d29;
}
body.light .teacher-v4 .board-sidepanel .stat-pill .num {
  color: #1a1d29;
}
/* Цветные числа — оставляем акценты */
body.light .teacher-v4 .board-sidepanel .stat-pill.g .num { color: #0a8a3f; }
body.light .teacher-v4 .board-sidepanel .stat-pill.y .num { color: #a98b0d; }
body.light .teacher-v4 .board-sidepanel .stat-pill.r .num { color: #c0392b; }
body.light .teacher-v4 .board-sidepanel .stat-pill.n .num { color: #6a7290; }

/* === Карта класса — плитки учеников === */
body.light .teacher-v4 .board-sidepanel .map {
  background: #f4f6fb;
  border-radius: 10px;
}
body.light .teacher-v4 .board-sidepanel .student {
  color: #1a1d29;
}
body.light .teacher-v4 .board-sidepanel .student.green {
  background: rgba(46, 204, 113, 0.15);
  border-color: rgba(46, 204, 113, 0.5);
  color: #0a5a2a;
}
body.light .teacher-v4 .board-sidepanel .student.yellow {
  background: rgba(241, 196, 15, 0.15);
  border-color: rgba(241, 196, 15, 0.5);
  color: #6a5200;
}
body.light .teacher-v4 .board-sidepanel .student.red {
  background: rgba(231, 76, 60, 0.15);
  border-color: rgba(231, 76, 60, 0.5);
  color: #7a1800;
}
body.light .teacher-v4 .board-sidepanel .student.none,
body.light .teacher-v4 .board-sidepanel .student.gray {
  background: #f4f6fb;
  border-color: #d0d5e0;
  color: #6a7290;
}
body.light .teacher-v4 .board-sidepanel .student.picked {
  border-color: #f39c12;
  box-shadow: 0 0 0 3px #f39c12, 0 0 24px rgba(243, 156, 18, 0.4);
  color: #1a1d29;
}

/* === Присутствие (details/summary) === */
body.light .teacher-v4 .board-sidepanel .presence {
  background: #ffffff;
  border: 1px solid #d0d5e0;
}
body.light .teacher-v4 .board-sidepanel .presence summary {
  color: #6a7290;
}
body.light .teacher-v4 .board-sidepanel .presence-item {
  color: #6a7290;
}
body.light .teacher-v4 .board-sidepanel .presence-item b {
  color: #1a1d29;
}

/* === Текущий вопрос === */
body.light .teacher-v4 .board-sidepanel #current-q {
  background: #f4f6fb;
  color: #1a1d29;
  border-left: 3px solid #7c5cff;
}

/* === Результаты квиза === */
body.light .teacher-v4 .board-sidepanel #quiz-results {
  background: #f4f6fb;
  color: #1a1d29;
}
body.light .teacher-v4 .board-sidepanel #quiz-results h3 {
  color: #1a1d29;
}
body.light .teacher-v4 .board-sidepanel .quiz-bar-row {
  color: #1a1d29;
}
body.light .teacher-v4 .board-sidepanel .quiz-bar-letter {
  color: #a98b0d;
}
body.light .teacher-v4 .board-sidepanel .quiz-bar-text {
  color: #1a1d29;
}
body.light .teacher-v4 .board-sidepanel .quiz-bar-track {
  background: #e0e5f0;
}
body.light .teacher-v4 .board-sidepanel .quiz-bar-count {
  color: #1a1d29;
}

/* === Подсказка (advice) === */
body.light .teacher-v4 .board-sidepanel .hint {
  background: rgba(124, 92, 255, 0.08);
  border-left: 3px solid #7c5cff;
  color: #1a1d29;
}

/* === "Выбранный ученик" (picked-box) === */
body.light .teacher-v4 .board-sidepanel .picked-box {
  background: linear-gradient(90deg, #fff5d6, #ffe9a8);
  border-color: #d68910;
  color: #6b4400;
}
body.light .teacher-v4 .board-sidepanel .picked-box #picked-name {
  color: #6b4400;
}

/* Светлая тема */
body.light .teacher-v4 .board-sidepanel {
  background: rgba(255, 255, 255, 0.8);
  border-color: #d0d5e0;
}
body.light .teacher-v4 .sidepanel-tabs { background: #f4f6fb; }
body.light .teacher-v4 .sidepanel-tab { color: #6a7290; }
body.light .teacher-v4 .sidepanel-tab:hover { background: rgba(0,0,0,0.05); color: #1a1d29; }
body.light .teacher-v4 .sp-sep { background: #e0e5f0; }
body.light .teacher-v4 .sp-label { color: #6a7290; }
body.light .teacher-v4 .board-sidepanel .map { background: #f4f6fb; }
body.light .teacher-v4 .board-sidepanel #current-q { background: #f4f6fb; }
body.light .teacher-v4 .board-sidepanel #quiz-results { background: #f4f6fb; }