/* OGE «Дежурный учитель» — premium-модалка и экран звонка */

:root {
  --oge-duty-modal-z: 2147483647;
}

html.oge-duty-ui-blocked,
html.oge-duty-ui-blocked body,
html.oge-duty-teacher-modal-open,
html.oge-duty-teacher-modal-open body {
  overflow: hidden !important;
  overscroll-behavior: none;
}

html.oge-duty-ui-blocked body,
html.oge-duty-teacher-modal-open body {
  touch-action: none;
}

/* Блокируем всю страницу, кроме слоя видеосвязи */
html.oge-duty-ui-blocked body * {
  pointer-events: none !important;
  user-select: none !important;
}

html.oge-duty-ui-blocked #oge-duty-overlay-root,
html.oge-duty-ui-blocked #oge-duty-overlay-root .is-open,
html.oge-duty-ui-blocked #oge-duty-overlay-root .is-open * {
  pointer-events: auto !important;
  user-select: auto !important;
}

html.oge-duty-ui-blocked iframe {
  pointer-events: none !important;
}

#oge-duty-overlay-root {
  position: fixed;
  inset: 0;
  z-index: var(--oge-duty-modal-z);
  pointer-events: none;
}

#oge-duty-overlay-root > .is-open {
  pointer-events: auto;
}

.oge-duty-teacher-modal[hidden],
.oge-duty-call-room[hidden],
.oge-duty-call-incoming[hidden] {
  display: none !important;
}

.oge-duty-teacher-btn__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

/* ——— Overlay ——— */

.oge-duty-teacher-modal {
  position: fixed;
  inset: 0;
  z-index: var(--oge-duty-modal-z);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.25rem;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.22s ease;
}

.oge-duty-teacher-modal.is-open {
  pointer-events: auto;
  opacity: 1;
  overflow: hidden;
  isolation: isolate;
}

.oge-duty-teacher-modal.is-open .oge-duty-teacher-modal__backdrop {
  pointer-events: auto;
  cursor: pointer;
  z-index: 1;
}

.oge-duty-teacher-modal--session.is-open .oge-duty-teacher-modal__backdrop {
  cursor: default;
}

.oge-duty-teacher-modal__backdrop {
  position: fixed;
  inset: 0;
  z-index: 1;
  background: rgba(2, 6, 23, 0.78);
  backdrop-filter: blur(8px);
}

/* ——— Premium panel (как #task-answer-section) ——— */

.oge-duty-teacher-modal__panel {
  position: relative;
  isolation: isolate;
  z-index: 2;
  pointer-events: auto;
  width: min(760px, 100%);
  max-height: min(90vh, 860px);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border-radius: 20px;
  background: linear-gradient(
    168deg,
    rgba(42, 50, 64, 0.99) 0%,
    rgba(26, 32, 44, 0.97) 46%,
    rgba(16, 20, 30, 0.99) 100%
  );
  border: 1px solid rgba(255, 255, 255, 0.16);
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.12) inset,
    0 -2px 0 rgba(0, 0, 0, 0.38) inset,
    0 24px 64px rgba(0, 0, 0, 0.58),
    0 8px 24px rgba(0, 0, 0, 0.38),
    0 0 0 1px rgba(255, 255, 255, 0.05);
  transform: translateY(12px) scale(0.98);
  transition:
    transform 0.28s cubic-bezier(0.22, 1, 0.36, 1),
    opacity 0.22s ease;
}

.oge-duty-teacher-modal.is-open .oge-duty-teacher-modal__panel {
  transform: translateY(0) scale(1);
}

.oge-duty-teacher-modal__panel--placed {
  position: fixed;
  margin: 0;
  transform: none !important;
  transition: none;
}

.oge-duty-teacher-modal--session.is-open {
  align-items: stretch;
  justify-content: stretch;
  padding: 0;
}

.oge-duty-teacher-modal--session.is-open .oge-duty-teacher-modal__panel,
.oge-duty-teacher-modal--session.is-open .oge-duty-teacher-modal__panel--placed {
  position: fixed;
  inset: 0 !important;
  width: 100% !important;
  height: 100% !important;
  max-width: none !important;
  max-height: none !important;
  margin: 0 !important;
  border-radius: 0;
  transform: none !important;
  pointer-events: auto;
}

.oge-duty-teacher-modal--session .oge-duty-teacher-modal__resize {
  display: none !important;
}

.oge-duty-teacher-modal--session [data-oge-duty-drag-handle] {
  cursor: default;
}

.oge-duty-teacher-modal.is-open .oge-duty-teacher-modal__panel--placed {
  transform: none;
}

.oge-duty-teacher-modal__panel--placed .oge-duty-teacher-modal__body {
  flex: 1;
  min-height: 0;
}

.oge-duty-teacher-modal__header[data-oge-duty-drag-handle] {
  cursor: grab;
  touch-action: none;
}

.oge-duty-teacher-modal__header--dragging {
  cursor: grabbing;
}

.oge-duty-teacher-modal__header-actions,
.oge-duty-teacher-modal__header-actions * {
  cursor: default;
}

/* ——— Resize handles ——— */

.oge-duty-teacher-modal__resize {
  position: absolute;
  z-index: 6;
  touch-action: none;
}

.oge-duty-teacher-modal__resize::after {
  content: "";
  position: absolute;
  border-radius: 999px;
  background: rgba(52, 211, 153, 0.55);
  opacity: 0;
  transition: opacity 0.15s ease;
}

.oge-duty-teacher-modal__panel:hover .oge-duty-teacher-modal__resize::after,
.oge-duty-teacher-modal__resize:hover::after {
  opacity: 1;
}

.oge-duty-teacher-modal__resize--edge-bottom {
  left: 12%;
  right: 12%;
  bottom: 0;
  height: 10px;
  cursor: ns-resize;
}

.oge-duty-teacher-modal__resize--edge-bottom::after {
  left: 0;
  right: 0;
  top: 50%;
  height: 3px;
  transform: translateY(-50%);
}

.oge-duty-teacher-modal__resize--edge-right {
  top: 12%;
  bottom: 12%;
  right: 0;
  width: 10px;
  cursor: ew-resize;
}

.oge-duty-teacher-modal__resize--edge-right::after {
  top: 0;
  bottom: 0;
  right: 3px;
  width: 3px;
}

.oge-duty-teacher-modal__resize--corner {
  right: 0;
  bottom: 0;
  width: 18px;
  height: 18px;
  cursor: nwse-resize;
}

.oge-duty-teacher-modal__resize--corner::after {
  right: 4px;
  bottom: 4px;
  width: 10px;
  height: 10px;
  border-radius: 2px;
  background: linear-gradient(
    135deg,
    transparent 0 40%,
    rgba(52, 211, 153, 0.75) 40% 55%,
    transparent 55% 70%,
    rgba(52, 211, 153, 0.75) 70%
  );
  opacity: 0.85;
}

[data-theme="light"] .oge-duty-teacher-modal__resize::after {
  background: rgba(5, 150, 105, 0.55);
}

.oge-duty-teacher-modal__panel::before {
  content: "";
  position: absolute;
  top: 0;
  left: 8%;
  right: 8%;
  height: 1px;
  background: linear-gradient(
    90deg,
    transparent 0%,
    rgba(255, 255, 255, 0.45) 50%,
    transparent 100%
  );
  pointer-events: none;
  z-index: 3;
}

.oge-duty-teacher-modal__panel::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  padding: 1px;
  background: linear-gradient(
    168deg,
    rgba(20, 184, 166, 0.48) 0%,
    rgba(255, 255, 255, 0.12) 38%,
    rgba(139, 92, 246, 0.32) 100%
  );
  -webkit-mask:
    linear-gradient(#fff 0 0) content-box,
    linear-gradient(#fff 0 0);
  mask:
    linear-gradient(#fff 0 0) content-box,
    linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  pointer-events: none;
  z-index: 2;
}

[data-theme="light"] .oge-duty-teacher-modal__panel {
  background: linear-gradient(168deg, #ffffff 0%, #f8fafc 48%, #eef2f7 100%);
  border-color: rgba(15, 23, 42, 0.1);
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.98) inset,
    0 -1px 0 rgba(15, 23, 42, 0.06) inset,
    0 24px 56px rgba(15, 23, 42, 0.16),
    0 8px 20px rgba(15, 23, 42, 0.1);
}

[data-theme="light"] .oge-duty-teacher-modal__panel::before {
  background: linear-gradient(
    90deg,
    transparent 0%,
    rgba(255, 255, 255, 0.95) 50%,
    transparent 100%
  );
}

[data-theme="light"] .oge-duty-teacher-modal__panel::after {
  background: linear-gradient(
    168deg,
    rgba(20, 184, 166, 0.38) 0%,
    rgba(255, 255, 255, 0.55) 40%,
    rgba(139, 92, 246, 0.24) 100%
  );
}

/* ——— Header ——— */

.oge-duty-teacher-modal__header {
  position: relative;
  z-index: 4;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.85rem;
  padding: 1.15rem 1.25rem 1rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.oge-duty-teacher-modal__header-actions {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  flex-shrink: 0;
}

.oge-duty-teacher-modal__theme-toggle.hf-header-util-toggle {
  flex-shrink: 0;
}

.oge-duty-teacher-modal__theme-toggle.hf-header-util-toggle .palette-toggle {
  border-left: none;
  border-radius: 9px 0 0 9px;
}

.oge-duty-teacher-modal__theme-toggle.hf-header-util-toggle .theme-toggle {
  border-radius: 0 9px 9px 0;
}

[data-theme="light"] .oge-duty-teacher-modal__header {
  border-bottom-color: rgba(15, 23, 42, 0.08);
}

.oge-duty-teacher-modal__header-main {
  display: flex;
  align-items: flex-start;
  gap: 0.85rem;
  min-width: 0;
}

.oge-duty-teacher-modal__badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: 2.65rem;
  height: 2.65rem;
  border-radius: 999px;
  border: 1px solid rgba(52, 211, 153, 0.45);
  background: linear-gradient(
    145deg,
    rgba(34, 197, 94, 0.32) 0%,
    rgba(16, 185, 129, 0.22) 100%
  );
  color: #ecfdf5;
  box-shadow:
    0 4px 0 rgba(6, 95, 70, 0.38),
    0 8px 20px rgba(34, 197, 94, 0.22),
    inset 0 1px 0 rgba(255, 255, 255, 0.22);
}

.oge-duty-teacher-modal__badge-svg {
  display: block;
}

.oge-duty-teacher-modal__titles {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  min-width: 0;
}

.oge-duty-teacher-modal__title.task-premium-section-title {
  margin: 0;
  font-size: 0.78rem;
}

.oge-duty-teacher-modal__subtitle {
  margin: 0;
  font-size: 0.875rem;
  font-weight: 500;
  color: rgba(203, 213, 225, 0.88);
  line-height: 1.35;
}

[data-theme="light"] .oge-duty-teacher-modal__subtitle {
  color: #64748b;
}

.oge-duty-teacher-modal__close {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: 2.35rem;
  height: 2.35rem;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.55);
  color: #e2e8f0;
  font-size: 1.35rem;
  line-height: 1;
  cursor: pointer;
  box-shadow:
    0 3px 0 rgba(0, 0, 0, 0.28),
    inset 0 1px 0 rgba(255, 255, 255, 0.1);
  transition:
    transform 0.14s ease,
    border-color 0.18s ease,
    background 0.18s ease;
}

.oge-duty-teacher-modal__close:hover {
  transform: translateY(-2px);
  border-color: rgba(255, 255, 255, 0.28);
  background: rgba(30, 41, 59, 0.85);
}

.oge-duty-teacher-modal__close:active {
  transform: translateY(1px);
}

[data-theme="light"] .oge-duty-teacher-modal__close {
  color: #334155;
  background: #f1f5f9;
  border-color: #e2e8f0;
}

.oge-duty-teacher-modal__body {
  position: relative;
  z-index: 4;
  padding: 1rem 1.25rem 1.35rem;
  overflow: hidden;
}

/* ——— Premium buttons (общие) ——— */

.oge-duty-teacher-btn-premium {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  min-height: 2.65rem;
  padding: 0.62rem 1.15rem;
  border: 1.5px solid rgba(255, 255, 255, 0.18);
  border-radius: 0.65rem;
  background: linear-gradient(
    135deg,
    rgba(51, 65, 85, 0.92) 0%,
    rgba(30, 41, 59, 0.96) 100%
  );
  color: #f8fafc;
  font-size: 0.875rem;
  font-weight: 700;
  letter-spacing: 0.015em;
  cursor: pointer;
  box-shadow:
    0 4px 0 rgba(0, 0, 0, 0.28),
    0 8px 18px rgba(0, 0, 0, 0.22),
    inset 0 1px 0 rgba(255, 255, 255, 0.14);
  transition:
    transform 0.14s ease,
    border-color 0.18s ease,
    background 0.18s ease,
    box-shadow 0.18s ease;
}

.oge-duty-teacher-btn-premium:hover:not(:disabled) {
  transform: translateY(-2px);
  border-color: rgba(255, 255, 255, 0.28);
}

.oge-duty-teacher-btn-premium:active:not(:disabled) {
  transform: translateY(2px);
  box-shadow:
    0 1px 0 rgba(0, 0, 0, 0.32),
    0 4px 10px rgba(0, 0, 0, 0.18),
    inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

.oge-duty-teacher-btn-premium:disabled {
  opacity: 0.55;
  cursor: not-allowed;
  box-shadow: none;
}

.oge-duty-teacher-btn-premium--call {
  border-color: rgba(34, 197, 94, 0.55);
  background: linear-gradient(
    135deg,
    rgba(34, 197, 94, 0.42) 0%,
    rgba(16, 185, 129, 0.32) 50%,
    rgba(5, 150, 105, 0.28) 100%
  );
  color: #ecfdf5;
  box-shadow:
    0 4px 0 rgba(6, 95, 70, 0.42),
    0 8px 20px rgba(34, 197, 94, 0.24),
    inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

.oge-duty-teacher-btn-premium--call:hover:not(:disabled) {
  border-color: rgba(52, 211, 153, 0.85);
  background: linear-gradient(
    135deg,
    rgba(52, 211, 153, 0.52) 0%,
    rgba(34, 197, 94, 0.4) 50%,
    rgba(16, 185, 129, 0.32) 100%
  );
}

.oge-duty-teacher-btn-premium--cancel {
  border-color: rgba(239, 68, 68, 0.45) !important;
  background: rgba(239, 68, 68, 0.12) !important;
  color: #fca5a5 !important;
  box-shadow: 0 4px 14px rgba(239, 68, 68, 0.18) !important;
}

.oge-duty-teacher-btn-premium--cancel:hover:not(:disabled) {
  background: rgba(239, 68, 68, 0.2) !important;
  border-color: rgba(239, 68, 68, 0.65) !important;
}

[data-theme="light"] .oge-duty-teacher-btn-premium--cancel {
  color: #dc2626 !important;
  background: rgba(239, 68, 68, 0.08) !important;
}

.oge-duty-teacher-btn-premium--request {
  border-color: rgba(96, 165, 250, 0.55);
  background: linear-gradient(
    135deg,
    rgba(59, 130, 246, 0.42) 0%,
    rgba(37, 99, 235, 0.32) 50%,
    rgba(29, 78, 216, 0.28) 100%
  );
  color: #eff6ff;
  box-shadow:
    0 4px 0 rgba(30, 58, 138, 0.42),
    0 8px 20px rgba(59, 130, 246, 0.24),
    inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

.oge-duty-teacher-btn-premium--request:hover:not(:disabled) {
  border-color: rgba(147, 197, 253, 0.85);
  background: linear-gradient(
    135deg,
    rgba(96, 165, 250, 0.52) 0%,
    rgba(59, 130, 246, 0.4) 50%,
    rgba(37, 99, 235, 0.32) 100%
  );
}

.oge-duty-teacher-btn-premium--sent {
  border-color: rgba(52, 211, 153, 0.55);
  background: linear-gradient(
    135deg,
    rgba(34, 197, 94, 0.35) 0%,
    rgba(16, 185, 129, 0.28) 100%
  );
  color: #ecfdf5;
  cursor: default;
}

.oge-duty-teacher-btn-premium--ghost {
  background: transparent;
  border-color: rgba(148, 163, 184, 0.45);
  color: #e2e8f0;
  box-shadow: none;
}

.oge-duty-teacher-btn-premium--ghost:hover:not(:disabled) {
  background: rgba(148, 163, 184, 0.12);
}

.oge-duty-teacher-btn-premium--danger {
  border-color: rgba(248, 113, 113, 0.55);
  background: linear-gradient(
    135deg,
    rgba(239, 68, 68, 0.88) 0%,
    rgba(220, 38, 38, 0.92) 100%
  );
  color: #fff;
  box-shadow:
    0 4px 0 rgba(127, 29, 29, 0.45),
    0 8px 20px rgba(239, 68, 68, 0.28),
    inset 0 1px 0 rgba(255, 255, 255, 0.18);
}

.oge-duty-teacher-btn-premium.is-active {
  border-color: rgba(96, 165, 250, 0.75);
  background: linear-gradient(
    135deg,
    rgba(37, 99, 235, 0.75) 0%,
    rgba(29, 78, 216, 0.85) 100%
  );
  box-shadow:
    0 4px 0 rgba(30, 58, 138, 0.42),
    0 0 0 2px rgba(59, 130, 246, 0.35),
    inset 0 1px 0 rgba(255, 255, 255, 0.18);
}

.oge-duty-teacher-call__tool.is-muted {
  border-color: rgba(248, 113, 113, 0.55);
  background: linear-gradient(
    135deg,
    rgba(127, 29, 29, 0.72) 0%,
    rgba(69, 10, 10, 0.88) 100%
  );
  color: #fecaca;
  box-shadow:
    0 4px 0 rgba(69, 10, 10, 0.45),
    inset 0 1px 0 rgba(255, 255, 255, 0.12);
}

.oge-duty-teacher-call__tool.is-muted .oge-duty-teacher-call__tool-icon {
  opacity: 0.72;
  filter: grayscale(0.35);
}

.oge-duty-teacher-call__tool.is-muted.is-locked {
  cursor: not-allowed;
  opacity: 0.92;
}

.oge-duty-teacher-call__tool--remote-mic.is-active {
  border-color: rgba(248, 113, 113, 0.65);
  background: linear-gradient(
    135deg,
    rgba(185, 28, 28, 0.82) 0%,
    rgba(127, 29, 29, 0.92) 100%
  );
  color: #fee2e2;
}

[data-theme="light"] .oge-duty-teacher-btn-premium {
  background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
  color: #0f172a;
  border-color: #cbd5e1;
}

[data-theme="light"] .oge-duty-teacher-btn-premium--call {
  color: #065f46;
}

[data-theme="light"] .oge-duty-teacher-btn-premium--ghost {
  color: #334155;
}

/* ——— Picker ——— */

.oge-duty-teacher-picker__hint {
  margin: 0 0 1.1rem;
  padding: 0.65rem 0.85rem;
  border-radius: 0.75rem;
  border: 1px solid rgba(52, 211, 153, 0.22);
  background: rgba(15, 23, 42, 0.45);
  font-size: 0.9rem;
  line-height: 1.45;
  color: rgba(226, 232, 240, 0.92);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

[data-theme="light"] .oge-duty-teacher-picker__hint {
  background: rgba(240, 253, 244, 0.85);
  border-color: rgba(5, 150, 105, 0.2);
  color: #334155;
}

.oge-duty-teacher-picker__list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.oge-duty-teacher-card {
  position: relative;
  isolation: isolate;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.6rem;
  padding: 1.15rem 0.95rem 1.2rem;
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: linear-gradient(
    165deg,
    rgba(30, 41, 59, 0.72) 0%,
    rgba(15, 23, 42, 0.88) 100%
  );
  text-align: center;
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.08) inset,
    0 8px 24px rgba(0, 0, 0, 0.28);
  overflow: hidden;
}

.oge-duty-teacher-card::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  padding: 1px;
  background: linear-gradient(
    160deg,
    rgba(20, 184, 166, 0.35) 0%,
    rgba(255, 255, 255, 0.08) 45%,
    rgba(139, 92, 246, 0.22) 100%
  );
  -webkit-mask:
    linear-gradient(#fff 0 0) content-box,
    linear-gradient(#fff 0 0);
  mask:
    linear-gradient(#fff 0 0) content-box,
    linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  pointer-events: none;
}

.oge-duty-teacher-card--unavailable {
  opacity: 0.68;
  filter: saturate(0.75);
}

[data-theme="light"] .oge-duty-teacher-card {
  background: linear-gradient(165deg, #ffffff 0%, #f8fafc 100%);
  border-color: rgba(15, 23, 42, 0.08);
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.95) inset,
    0 8px 20px rgba(15, 23, 42, 0.08);
}

.oge-duty-teacher-card__avatar-wrap {
  position: relative;
  z-index: 1;
  width: 6rem;
  height: 6rem;
  border-radius: 999px;
  overflow: hidden;
  border: 2px solid rgba(255, 255, 255, 0.22);
  box-shadow:
    0 8px 28px rgba(0, 0, 0, 0.35),
    0 0 0 4px rgba(52, 211, 153, 0.12);
}

.oge-duty-teacher-card__avatar {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.oge-duty-teacher-card__avatar--fallback {
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  background: rgba(59, 130, 246, 0.2);
}

.oge-duty-teacher-card__name {
  position: relative;
  z-index: 1;
  margin: 0;
  font-size: 1rem;
  font-weight: 700;
  color: #f1f5f9;
}

.oge-duty-teacher-card__role {
  z-index: 2;
  display: inline-flex;
  align-items: center;
  padding: 0.22rem 0.7rem;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.oge-duty-teacher-card__role--admin {
  position: absolute;
  top: 0.4rem;
  right: 0.4rem;
  padding: 0.1rem 0.38rem;
  border-radius: 6px;
  font-size: 0.5625rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  line-height: 1.2;
  border: 1px solid rgba(251, 191, 36, 0.45);
  background: linear-gradient(
    135deg,
    rgba(251, 191, 36, 0.28) 0%,
    rgba(245, 158, 11, 0.2) 100%
  );
  color: #fde68a;
  box-shadow: 0 2px 10px rgba(251, 191, 36, 0.18);
}

.oge-duty-teacher-card--admin {
  border-color: rgba(251, 191, 36, 0.28);
}

.oge-duty-teacher-card--admin::after {
  background: linear-gradient(
    160deg,
    rgba(251, 191, 36, 0.38) 0%,
    rgba(255, 255, 255, 0.08) 45%,
    rgba(139, 92, 246, 0.22) 100%
  );
}

[data-theme="light"] .oge-duty-teacher-card__role--admin {
  color: #92400e;
  border-color: rgba(245, 158, 11, 0.35);
  background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
}

[data-theme="light"] .oge-duty-teacher-card__name {
  color: #0f172a;
}

.oge-duty-teacher-card__status {
  position: relative;
  z-index: 1;
  display: inline-flex;
  align-items: center;
  padding: 0.28rem 0.75rem;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  border: 1px solid transparent;
}

.oge-duty-teacher-card__status--available,
.oge-duty-teacher-card__status--online {
  border-color: rgba(34, 197, 94, 0.35);
  background: rgba(34, 197, 94, 0.18);
  color: #86efac;
}

.oge-duty-teacher-card__status--busy {
  border-color: rgba(239, 68, 68, 0.35);
  background: rgba(239, 68, 68, 0.18);
  color: #fca5a5;
}

.oge-duty-teacher-card__status--appointment {
  border-color: rgba(96, 165, 250, 0.35);
  background: rgba(59, 130, 246, 0.18);
  color: #93c5fd;
}

.oge-duty-teacher-card__status--day_off,
.oge-duty-teacher-card__status--vacation,
.oge-duty-teacher-card__status--sick {
  border-color: rgba(148, 163, 184, 0.28);
  background: rgba(148, 163, 184, 0.16);
  color: #cbd5e1;
}

[data-theme="light"] .oge-duty-teacher-card__status--available,
[data-theme="light"] .oge-duty-teacher-card__status--online {
  color: #15803d;
}

[data-theme="light"] .oge-duty-teacher-card__status--busy {
  color: #b91c1c;
}

[data-theme="light"] .oge-duty-teacher-card__status--appointment {
  color: #1d4ed8;
}

[data-theme="light"] .oge-duty-teacher-card__status--day_off,
[data-theme="light"] .oge-duty-teacher-card__status--vacation,
[data-theme="light"] .oge-duty-teacher-card__status--sick {
  color: #64748b;
}

.oge-duty-teacher-card__call {
  position: relative;
  z-index: 1;
  margin-top: 0.35rem;
  width: 100%;
  max-width: 11rem;
}

/* ——— Dialing (карточка в списке) ——— */

.oge-duty-teacher-card--dialing {
  border-color: rgba(59, 130, 246, 0.45);
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.08) inset,
    0 8px 24px rgba(59, 130, 246, 0.28);
}

.oge-duty-teacher-card--dialing .oge-duty-teacher-card__avatar-wrap {
  overflow: visible;
}

.oge-duty-teacher-card--dialing .oge-duty-teacher-card__avatar-wrap::after {
  content: "";
  position: absolute;
  inset: -0.55rem;
  border-radius: 999px;
  border: 2px solid rgba(59, 130, 246, 0.55);
  animation: oge-duty-teacher-pulse 1.5s ease-out infinite;
  pointer-events: none;
}

@keyframes oge-duty-teacher-pulse {
  0% {
    transform: scale(0.9);
    opacity: 0.85;
  }
  100% {
    transform: scale(1.22);
    opacity: 0;
  }
}

.oge-duty-teacher-modal--dialing .oge-duty-teacher-picker__hint {
  color: #93c5fd;
}

/* ——— Call stage ——— */

.oge-duty-teacher-call__stage {
  position: relative;
  min-height: 340px;
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: #020617;
  overflow: hidden;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.06),
    0 12px 32px rgba(0, 0, 0, 0.35);
}

.oge-duty-teacher-call__remote {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.7rem;
  min-height: 340px;
  padding: 1.75rem 1rem 5rem;
  background:
    radial-gradient(circle at 50% 22%, rgba(37, 99, 235, 0.32), transparent 58%),
    radial-gradient(circle at 80% 80%, rgba(139, 92, 246, 0.18), transparent 45%),
    linear-gradient(180deg, #0f172a 0%, #020617 100%);
}

.oge-duty-teacher-call__remote-avatar {
  width: 9.5rem;
  height: 9.5rem;
  border-radius: 999px;
  object-fit: cover;
  border: 3px solid rgba(255, 255, 255, 0.18);
  box-shadow: 0 20px 48px rgba(0, 0, 0, 0.48);
}

.oge-duty-teacher-call__remote-video {
  width: 100%;
  max-width: 28rem;
  max-height: 16rem;
  border-radius: 0.85rem;
  object-fit: cover;
  border: 2px solid rgba(255, 255, 255, 0.14);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.45);
  background: #020617;
}

/* Удалённое видео на всю сцену (камера и демонстрация экрана) */
.oge-duty-teacher-call__remote--active {
  position: absolute;
  inset: 0;
  min-height: 0 !important;
  padding: 0 !important;
  justify-content: center;
}

.oge-duty-teacher-call__remote--active .oge-duty-teacher-call__remote-video {
  position: absolute;
  inset: 0;
  z-index: 1;
  width: 100%;
  height: 100%;
  max-width: none;
  max-height: none;
  border-radius: 0;
  border: none;
  box-shadow: none;
  object-fit: cover;
}

.oge-duty-teacher-call__remote--active .oge-duty-teacher-call__remote-name,
.oge-duty-teacher-call__remote--active .oge-duty-teacher-call__remote-badge {
  position: absolute;
  z-index: 2;
  left: 50%;
  transform: translateX(-50%);
}

.oge-duty-teacher-call__remote--active .oge-duty-teacher-call__remote-name {
  bottom: 5.5rem;
}

.oge-duty-teacher-call__remote--active .oge-duty-teacher-call__remote-badge {
  bottom: 4rem;
}

.oge-duty-teacher-call__local-video {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.oge-duty-teacher-call__local--screen-share {
  width: 10rem;
  height: 6.5rem;
}

.oge-duty-teacher-call__local--screen-share .oge-duty-teacher-call__local-video {
  object-fit: contain;
  background: #020617;
}

.oge-duty-teacher-call__remote--active .oge-duty-teacher-call__remote-video--screen-share {
  object-fit: contain !important;
  background: #020617;
}

.oge-duty-teacher-call__remote-badge--screen {
  border-color: rgba(96, 165, 250, 0.45);
  background: rgba(59, 130, 246, 0.22);
  color: #bfdbfe;
}

.oge-duty-teacher-call__remote-badge--screen {
  border-color: rgba(96, 165, 250, 0.45);
  background: rgba(59, 130, 246, 0.22);
  color: #bfdbfe;
}

.oge-duty-teacher-call__remote:has(
  .oge-duty-teacher-call__remote-video--screen-share:not([hidden])
) {
  position: absolute;
  inset: 0;
  min-height: 0 !important;
  padding: 0 0 5rem !important;
}

.oge-duty-teacher-call__remote:has(
  .oge-duty-teacher-call__remote-video--screen-share:not([hidden])
) .oge-duty-teacher-call__remote-name {
  position: absolute;
  z-index: 2;
  bottom: 5.5rem;
}

.oge-duty-teacher-call__remote-name {
  font-size: 1.15rem;
  font-weight: 700;
  color: #f8fafc;
}

.oge-duty-teacher-call__remote-badge {
  padding: 0.28rem 0.75rem;
  border-radius: 999px;
  border: 1px solid rgba(34, 197, 94, 0.35);
  background: rgba(34, 197, 94, 0.18);
  color: #86efac;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

.oge-duty-teacher-call__local {
  position: absolute;
  right: 0.95rem;
  bottom: 0.95rem;
  z-index: 5;
  width: 8rem;
  height: 5.25rem;
  border-radius: 0.65rem;
  overflow: hidden;
  border: 2px solid rgba(255, 255, 255, 0.35);
  background: #1e293b;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.45);
}

.oge-duty-teacher-call__local-label {
  position: absolute;
  top: 0.3rem;
  left: 0.4rem;
  z-index: 2;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #fff;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.6);
}

.oge-duty-teacher-call__local-placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  font-size: 1.85rem;
  background: linear-gradient(145deg, #334155 0%, #1e293b 100%);
}

.oge-duty-teacher-call__toolbar {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.7rem;
  margin-top: 1.1rem;
  padding: 0.95rem 1rem;
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: linear-gradient(
    168deg,
    rgba(30, 41, 59, 0.88) 0%,
    rgba(15, 23, 42, 0.94) 100%
  );
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.08) inset,
    0 8px 24px rgba(0, 0, 0, 0.28);
}

[data-theme="light"] .oge-duty-teacher-call__toolbar {
  background: linear-gradient(168deg, #f8fafc 0%, #eef2f7 100%);
  border-color: #e2e8f0;
}

.oge-duty-teacher-call__tool {
  flex-direction: column;
  min-width: 4.5rem;
  min-height: 3.35rem;
  padding: 0.5rem 0.55rem;
}

.oge-duty-teacher-call__tool-icon {
  font-size: 1.15rem;
  line-height: 1;
}

.oge-duty-teacher-call__tool-label {
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.02em;
}

/* ——— Кнопка в #task-answer-section ——— */

.variant-exam-body--oge #task-answer-section .libreoffice-hf-action-btn--duty-teacher {
  height: 2.85rem;
  min-height: 2.85rem;
  max-height: 2.85rem;
  padding: 0.68rem 1.3rem;
  overflow: visible;
  border-color: rgba(129, 140, 248, 0.55);
  background: linear-gradient(
    135deg,
    rgba(244, 114, 182, 0.92) 0%,
    rgba(167, 139, 250, 0.9) 52%,
    rgba(56, 189, 248, 0.88) 100%
  );
  color: #fdf4ff;
  box-shadow:
    0 4px 0 rgba(76, 29, 149, 0.4),
    0 8px 22px rgba(167, 139, 250, 0.32),
    0 1px 0 rgba(255, 255, 255, 0.22) inset,
    0 -1px 0 rgba(49, 46, 129, 0.35) inset;
}

.variant-exam-body--oge #task-answer-section .libreoffice-hf-action-btn--duty-teacher .libreoffice-hf-action-btn__icon {
  position: relative;
  width: 1.85rem;
  height: 1.85rem;
  flex-shrink: 0;
  overflow: visible;
}

.variant-exam-body--oge #task-answer-section .libreoffice-hf-action-btn--duty-teacher .duty-teacher-btn-icon--oge {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 2.55rem;
  height: 2.55rem;
  transform: translate(-50%, -50%);
}

.variant-exam-body--oge #task-answer-section .libreoffice-hf-action-btn--duty-teacher:hover {
  border-color: rgba(196, 181, 253, 0.85);
  background: linear-gradient(
    135deg,
    rgba(244, 114, 182, 0.98) 0%,
    rgba(167, 139, 250, 0.96) 50%,
    rgba(56, 189, 248, 0.94) 100%
  );
  color: #ffffff;
  box-shadow:
    0 6px 0 rgba(76, 29, 149, 0.34),
    0 14px 30px rgba(167, 139, 250, 0.42),
    0 1px 0 rgba(255, 255, 255, 0.26) inset;
}

.variant-exam-body--oge #task-answer-section .libreoffice-hf-action-btn--duty-teacher .duty-teacher-btn-icon {
  border-color: rgba(255, 255, 255, 0.48);
  background: rgba(255, 255, 255, 0.14);
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.1),
    0 2px 10px rgba(0, 0, 0, 0.16);
  filter: drop-shadow(0 0 6px rgba(255, 255, 255, 0.35));
}

[data-theme="light"] .variant-exam-body--oge #task-answer-section .libreoffice-hf-action-btn--duty-teacher {
  color: #ffffff;
  border-color: rgba(167, 139, 250, 0.45);
}

/* ——— Pink palette ——— */

html[data-palette="pink"] .oge-duty-teacher-modal__panel {
  background: linear-gradient(
    168deg,
    rgba(58, 32, 52, 0.98) 0%,
    rgba(36, 22, 40, 0.97) 50%,
    rgba(24, 16, 32, 0.99) 100%
  );
}

html[data-palette="pink"] .oge-duty-teacher-modal__panel::after {
  background: linear-gradient(
    168deg,
    rgba(236, 72, 153, 0.42) 0%,
    rgba(255, 255, 255, 0.1) 40%,
    rgba(167, 139, 250, 0.32) 100%
  );
}

html[data-palette="pink"] .oge-duty-teacher-modal__badge {
  border-color: rgba(244, 114, 182, 0.48);
  background: linear-gradient(
    145deg,
    rgba(236, 72, 153, 0.38) 0%,
    rgba(219, 39, 119, 0.28) 100%
  );
  box-shadow:
    0 4px 0 rgba(131, 24, 67, 0.38),
    0 8px 20px rgba(236, 72, 153, 0.24),
    inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

html[data-palette="pink"] .oge-duty-teacher-card::after {
  background: linear-gradient(
    160deg,
    rgba(236, 72, 153, 0.32) 0%,
    rgba(255, 255, 255, 0.08) 45%,
    rgba(167, 139, 250, 0.24) 100%
  );
}

html[data-palette="pink"] .oge-duty-teacher-btn-premium--call {
  border-color: rgba(244, 114, 182, 0.55);
  background: linear-gradient(
    135deg,
    rgba(236, 72, 153, 0.42) 0%,
    rgba(219, 39, 119, 0.32) 100%
  );
  box-shadow:
    0 4px 0 rgba(131, 24, 67, 0.42),
    0 8px 20px rgba(236, 72, 153, 0.24),
    inset 0 1px 0 rgba(255, 255, 255, 0.18);
}

html[data-palette="pink"] .variant-exam-body--oge #task-answer-section .libreoffice-hf-action-btn--duty-teacher {
  border-color: rgba(244, 114, 182, 0.58);
  background: linear-gradient(
    135deg,
    rgba(236, 72, 153, 0.94) 0%,
    rgba(192, 132, 252, 0.92) 52%,
    rgba(251, 113, 133, 0.9) 100%
  );
  color: #fdf2f8;
  box-shadow:
    0 4px 0 rgba(131, 24, 67, 0.42),
    0 8px 22px rgba(236, 72, 153, 0.28),
    0 1px 0 rgba(255, 255, 255, 0.2) inset;
}

html[data-palette="pink"][data-theme="light"] .oge-duty-teacher-modal__panel {
  background: linear-gradient(168deg, #fff5fb 0%, #fdf2f8 48%, #fce7f3 100%);
}
