:root {
  --bg: #f4f7f5;
  --bg-soft: #edf3ef;
  --surface: #fcfdfc;
  --surface-soft: #f7faf8;
  --surface-warm: #fbfcfb;
  --ink: #17211f;
  --muted: #697773;
  --line: #d9e3de;
  --line-soft: rgba(104, 119, 113, 0.12);
  --brand: #0e6f66;
  --brand-dark: #0a514b;
  --blue: #0e6f66;
  --accent: #6f7f5f;
  --danger: #dc2626;
  --success: #168348;
  --shadow: 0 16px 42px rgba(21, 34, 31, 0.075);
  --shadow-hover: 0 22px 54px rgba(21, 34, 31, 0.105);
  --pill-shadow: 0 10px 24px rgba(21, 34, 31, 0.08);
  --press-shadow: 0 5px 12px rgba(21, 34, 31, 0.1);
  --radius: 10px;
  --radius-soft: 14px;
  --radius-pill: 999px;
  --motion: cubic-bezier(0.16, 1, 0.3, 1);
}

* {
  box-sizing: border-box;
}

html {
  overflow-x: hidden;
  overscroll-behavior-x: none;
}

body {
  margin: 0;
  min-height: 100vh;
  overflow-x: hidden;
  overscroll-behavior-x: none;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.78), rgba(244, 247, 245, 0.96)),
    linear-gradient(115deg, rgba(14, 111, 102, 0.052), transparent 42%),
    repeating-linear-gradient(0deg, var(--line-soft) 0 1px, transparent 1px 44px),
    repeating-linear-gradient(90deg, rgba(104, 119, 113, 0.07) 0 1px, transparent 1px 44px),
    var(--bg);
  background-attachment: fixed;
  color: var(--ink);
  font-family:
    Aptos, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "SF Pro Text",
    "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  letter-spacing: 0;
}

::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

::-webkit-scrollbar-track {
  border-radius: 999px;
  background: transparent;
}

::-webkit-scrollbar-thumb {
  border-radius: 999px;
  background: rgba(148, 163, 159, 0.55);
  transition: background 0.2s ease;
}

::-webkit-scrollbar-thumb:hover {
  background: rgba(100, 116, 139, 0.62);
}

button,
input,
select,
textarea {
  font: inherit;
}

@keyframes soft-drop {
  from {
    opacity: 0;
    transform: translateY(-6px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fade-lift {
  from {
    opacity: 0;
    transform: translateY(10px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes pop-in {
  from {
    opacity: 0;
    transform: scale(0.96);
  }

  to {
    opacity: 1;
    transform: scale(1);
  }
}

@keyframes slide-in-right {
  from {
    opacity: 0;
    transform: translateX(18px);
  }

  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes progress-sheen {
  from {
    transform: translateX(-100%);
  }

  to {
    transform: translateX(100%);
  }
}

@keyframes mobile-page-in {
  from {
    opacity: 0;
    transform: translateY(14px) scale(0.992);
  }

  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes mobile-tap-pulse {
  0% {
    box-shadow: 0 0 0 0 rgba(14, 111, 102, 0.2);
  }

  100% {
    box-shadow: 0 0 0 9px rgba(14, 111, 102, 0);
  }
}

button {
  border: 0;
}

button:disabled {
  cursor: not-allowed;
  opacity: 0.55;
}

:where(.btn, .chip, .tab, .admin-nav-button, .subject-card, .module-card, .option, .q-dot, .practice-video-tile, .switch, .video-remove, .upload-btn) {
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
  user-select: none;
}

.app-shell {
  position: relative;
  min-height: 100vh;
  overflow-x: clip;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.42), transparent 320px),
    linear-gradient(115deg, rgba(14, 111, 102, 0.045), transparent 34%),
    repeating-linear-gradient(0deg, rgba(104, 119, 113, 0.055) 0 1px, transparent 1px 44px),
    repeating-linear-gradient(90deg, rgba(104, 119, 113, 0.04) 0 1px, transparent 1px 44px);
}

.login-page {
  display: grid;
  min-height: 100vh;
  grid-template-columns: minmax(0, 1.12fr) minmax(360px, 480px);
}

.login-visual {
  position: relative;
  display: flex;
  min-height: 100vh;
  flex-direction: column;
  justify-content: space-between;
  overflow: hidden;
  padding: 44px;
  color: #f8fbfb;
  background:
    linear-gradient(rgba(9, 45, 43, 0.2), rgba(9, 45, 43, 0.78)),
    url("data:image/svg+xml,%3Csvg width='1400' height='1100' viewBox='0 0 1400 1100' xmlns='http://www.w3.org/2000/svg'%3E%3Crect width='1400' height='1100' fill='%231d3e3b'/%3E%3Cpath d='M0 790C250 708 444 722 690 780c245 58 458 66 710-18v338H0z' fill='%232c6b62'/%3E%3Cpath d='M0 835c248-87 432-79 681-18 258 64 462 64 719-26' fill='none' stroke='%23f8fafc' stroke-width='26' stroke-linecap='round' opacity='.86'/%3E%3Cpath d='M0 900c255-86 438-72 690-10 254 62 463 61 710-26' fill='none' stroke='%23fbbf24' stroke-width='8' stroke-dasharray='36 32' stroke-linecap='round'/%3E%3Ccircle cx='1045' cy='240' r='132' fill='%23f8fafc' opacity='.12'/%3E%3Crect x='139' y='180' width='212' height='212' rx='22' fill='%23fbbf24' transform='rotate(45 245 286)'/%3E%3Crect x='183' y='224' width='124' height='124' rx='14' fill='%2318272c' transform='rotate(45 245 286)'/%3E%3Cpath d='M214 297h70m-35-35v70' stroke='%23fbbf24' stroke-width='16' stroke-linecap='round'/%3E%3Crect x='942' y='454' width='236' height='104' rx='12' fill='%23f8fafc' opacity='.92'/%3E%3Cpath d='M980 506h160' stroke='%230f766e' stroke-width='17' stroke-linecap='round'/%3E%3C/svg%3E")
      center / cover;
}

.brand {
  display: flex;
  align-items: center;
  min-width: 0;
  gap: 12px;
  font-weight: 800;
}

.brand-mark {
  display: grid;
  width: 36px;
  height: 36px;
  flex: 0 0 auto;
  place-items: center;
  border-radius: var(--radius);
  background: var(--brand);
  color: #fff;
  font-weight: 900;
}

.brand-on-visual .brand-mark {
  border: 2px solid rgba(255, 255, 255, 0.85);
  background: rgba(255, 255, 255, 0.14);
  color: #fff;
}

.brand-text {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.login-copy {
  max-width: 720px;
}

.login-copy h1 {
  margin: 0 0 18px;
  font-size: clamp(42px, 6vw, 72px);
  line-height: 1.02;
  letter-spacing: 0;
}

.login-copy p {
  max-width: 590px;
  margin: 0;
  color: rgba(248, 251, 251, 0.86);
  font-size: 18px;
  line-height: 1.75;
}

.login-stats {
  display: grid;
  max-width: 860px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.login-stats-mobile {
  display: none;
}

.stat-tile {
  min-height: 96px;
  padding: 18px;
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(8px);
}

.stat-tile strong {
  display: block;
  margin-bottom: 8px;
  font-size: 28px;
}

.stat-tile span {
  color: rgba(248, 251, 251, 0.82);
  font-size: 14px;
}

.login-panel {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 32px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.94), rgba(250, 252, 251, 0.98)),
    var(--surface);
}

.auth-box {
  width: min(100%, 390px);
  animation: fade-lift 0.34s ease both;
}

.eyebrow {
  margin: 0 0 10px;
  color: var(--brand);
  font-size: 13px;
  font-weight: 800;
}

.login-panel h1 {
  margin: 0 0 10px;
  font-size: 30px;
}

.login-panel p {
  margin: 0 0 26px;
  color: var(--muted);
  line-height: 1.6;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 68px;
  gap: 18px;
  padding: 0 26px;
  border-bottom: 1px solid rgba(217, 227, 222, 0.82);
  background: rgba(252, 253, 252, 0.84);
  box-shadow: 0 8px 26px rgba(21, 34, 31, 0.045);
  backdrop-filter: blur(18px) saturate(145%);
}

.topbar .brand-mark {
  background: #e9f5f3;
  color: var(--brand);
}

.top-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--muted);
  font-size: 14px;
  white-space: nowrap;
}

.password-panel {
  position: sticky;
  top: 68px;
  z-index: 11;
  width: min(1220px, calc(100% - 40px));
  margin: 14px auto 0;
}

.password-card {
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(12px);
}

.page {
  width: min(1220px, calc(100% - 40px));
  margin: 0 auto;
  padding: 26px 0 44px;
}

.student-mobile-dock {
  display: none;
}

.page > .section-title,
.page > .toolbar {
  padding: 20px 22px;
  border: 1px solid rgba(217, 227, 222, 0.86);
  border-radius: var(--radius-soft);
  background: rgba(252, 253, 252, 0.86);
  box-shadow: 0 12px 32px rgba(21, 34, 31, 0.055);
  backdrop-filter: blur(14px);
  animation: fade-lift 0.28s ease both;
}

.page-admin {
  width: 100%;
  padding: 0;
}

.admin-layout {
  display: grid;
  grid-template-columns: 246px minmax(0, 1fr);
  min-height: calc(100vh - 68px);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.38), transparent 310px),
    linear-gradient(115deg, rgba(14, 111, 102, 0.04), transparent 38%),
    transparent;
}

.admin-sidebar {
  position: sticky;
  top: 68px;
  align-self: start;
  height: calc(100vh - 68px);
  overflow-y: auto;
  border-right: 1px solid rgba(217, 227, 222, 0.86);
  background: rgba(252, 253, 252, 0.88);
  padding: 18px 14px;
  backdrop-filter: blur(16px);
}

.admin-sidebar::after {
  content: "";
  display: block;
  height: 1px;
  margin: 18px 8px 0;
  background: linear-gradient(90deg, transparent, rgba(14, 111, 102, 0.18), transparent);
}

.admin-sidebar-head {
  display: grid;
  gap: 4px;
  margin: 2px 8px 18px;
}

.admin-sidebar-head .eyebrow {
  margin: 0;
}

.admin-sidebar-head strong {
  font-size: 18px;
}

.admin-nav {
  display: grid;
  gap: 8px;
}

.admin-nav-button {
  position: relative;
  display: flex;
  align-items: center;
  width: 100%;
  min-height: 58px;
  gap: 12px;
  padding: 9px 12px;
  border: 1px solid transparent;
  border-radius: var(--radius-soft);
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  text-align: left;
  overflow: hidden;
  transition:
    background 0.22s var(--motion),
    border-color 0.22s var(--motion),
    color 0.22s var(--motion),
    box-shadow 0.22s var(--motion),
    transform 0.22s var(--motion);
}

.admin-nav-button::before {
  content: "";
  position: absolute;
  inset: 10px auto 10px 7px;
  width: 3px;
  border-radius: 999px;
  background: var(--brand);
  opacity: 0;
  transform: scaleY(0.4);
  transition:
    opacity 0.18s ease,
    transform 0.18s ease;
}

@media (hover: hover) {
  .admin-nav-button:hover {
    border-color: rgba(14, 111, 102, 0.14);
    background: rgba(255, 255, 255, 0.74);
    color: var(--brand);
    box-shadow: 0 8px 18px rgba(18, 32, 31, 0.045);
    transform: translateY(-1px);
  }
}

.admin-nav-button:focus {
  outline: none;
}

.admin-nav-button:focus-visible {
  border-color: rgba(14, 111, 102, 0.24);
  box-shadow: 0 0 0 3px rgba(14, 111, 102, 0.14);
}

.admin-nav-button.active {
  border-color: rgba(14, 111, 102, 0.2);
  background: rgba(232, 244, 241, 0.9);
  color: var(--brand);
  box-shadow: var(--pill-shadow);
}

.admin-nav-button.active::before {
  opacity: 1;
  transform: scaleY(1);
}

.admin-nav-button svg {
  width: 22px;
  height: 22px;
  flex: 0 0 auto;
}

.admin-nav-button span {
  display: grid;
  min-width: 0;
  gap: 3px;
}

.admin-nav-button strong {
  color: currentColor;
  font-size: 15px;
}

.admin-nav-button small {
  overflow: hidden;
  color: var(--muted);
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.admin-nav-button.active small {
  color: rgba(11, 95, 88, 0.72);
}

@media (hover: hover) {
  .admin-nav-button:hover small {
    color: rgba(11, 95, 88, 0.72);
  }
}

.admin-content {
  min-width: 0;
  padding: 26px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.24), transparent 260px),
    transparent;
}

.page-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 22px;
  padding: 20px 22px;
  border: 1px solid rgba(217, 227, 222, 0.86);
  border-radius: var(--radius-soft);
  background: rgba(252, 253, 252, 0.88);
  box-shadow: 0 14px 34px rgba(21, 34, 31, 0.06);
  backdrop-filter: blur(14px);
  animation: fade-lift 0.3s ease both;
}

.page-header .eyebrow {
  margin: 0 0 8px;
}

.page-header h1 {
  margin: 0 0 8px;
  font-size: 30px;
}

.page-header p {
  margin: 0;
  color: var(--muted);
  line-height: 1.6;
}

.section-title {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
}

.section-title h1,
.section-title h2 {
  margin: 0;
}

.section-title h1 {
  font-size: 30px;
}

.section-title h2 {
  font-size: 20px;
}

.section-title p {
  margin: 6px 0 0;
  color: var(--muted);
  line-height: 1.55;
}

.section-actions {
  display: flex;
  flex: 0 0 auto;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.grid {
  display: grid;
  gap: 16px;
}

.grid.two {
  grid-template-columns: minmax(0, 0.88fr) minmax(360px, 1.12fr);
}

.grid.two.compact {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.grid.three {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.panel,
.subject-card,
.module-card,
.question-card,
.side-panel,
.metric {
  border: 1px solid rgba(217, 227, 222, 0.86);
  border-radius: var(--radius-soft);
  background: rgba(252, 253, 252, 0.9);
  box-shadow: var(--shadow);
  transition:
    border-color 0.22s var(--motion),
    box-shadow 0.22s var(--motion),
    transform 0.22s var(--motion),
    background 0.22s var(--motion);
}

.panel {
  overflow: hidden;
  animation: fade-lift 0.28s ease both;
}

.grid > .panel:nth-child(2),
.grid > .subject-card:nth-child(2),
.grid > .module-card:nth-child(2),
.metric-row > .metric:nth-child(2) {
  animation-delay: 0.035s;
}

.grid > .panel:nth-child(3),
.grid > .subject-card:nth-child(3),
.grid > .module-card:nth-child(3),
.metric-row > .metric:nth-child(3) {
  animation-delay: 0.07s;
}

.grid > .panel:nth-child(4),
.grid > .subject-card:nth-child(4),
.grid > .module-card:nth-child(4),
.metric-row > .metric:nth-child(4) {
  animation-delay: 0.105s;
}

@media (hover: hover) {
  .panel:hover,
  .metric:hover,
  .video-admin-card:hover,
  .log-item:hover {
    border-color: rgba(14, 111, 102, 0.18);
    box-shadow: var(--shadow-hover);
  }
}

.panel > .section-title:first-child,
.panel-pad > .section-title:first-child {
  margin: -20px -20px 18px;
  padding: 18px 20px;
  border-bottom: 1px solid rgba(217, 227, 222, 0.72);
  background: rgba(247, 250, 248, 0.72);
}

.panel-pad {
  padding: 20px;
}

.band {
  padding: 18px 0;
  border-top: 1px solid var(--line);
}

.tabs,
.segmented {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.segmented {
  width: fit-content;
  padding: 4px;
  border: 1px solid rgba(217, 227, 222, 0.86);
  border-radius: var(--radius-pill);
  background: rgba(252, 253, 252, 0.82);
  box-shadow: var(--pill-shadow);
  backdrop-filter: blur(14px);
}

.tabs {
  position: sticky;
  top: 68px;
  z-index: 8;
  margin: -6px 0 18px;
  padding: 10px 0;
  background: rgba(245, 248, 247, 0.9);
  backdrop-filter: blur(10px);
}

.tab,
.chip,
.btn {
  position: relative;
  overflow: hidden;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  gap: 8px;
  padding: 0 14px;
  border: 1px solid rgba(217, 227, 222, 0.92);
  border-radius: var(--radius-pill);
  background: rgba(252, 253, 252, 0.92);
  color: var(--ink);
  cursor: pointer;
  font-weight: 750;
  text-decoration: none;
  transition:
    transform 0.18s var(--motion),
    border-color 0.18s var(--motion),
    background 0.18s var(--motion),
    color 0.18s var(--motion),
    box-shadow 0.18s var(--motion);
}

.tab::after,
.chip::after,
.btn::after,
.practice-video-tile::after,
.admin-nav-button::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(110deg, transparent 0 35%, rgba(255, 255, 255, 0.5) 48%, transparent 62% 100%);
  opacity: 0;
  pointer-events: none;
  transform: translateX(-120%);
}

.tab,
.chip,
.segmented .check {
  border-radius: 999px;
}

.btn.block {
  width: 100%;
}

.tab:hover,
.chip:hover,
.btn:hover {
  border-color: rgba(14, 111, 102, 0.34);
  box-shadow: 0 9px 20px rgba(21, 34, 31, 0.07);
  transform: translateY(-1px);
}

@media (hover: hover) {
  .tab:hover::after,
  .chip:hover::after,
  .btn:hover::after,
  .practice-video-tile:hover::after,
  .admin-nav-button:hover::after {
    opacity: 0.7;
    transform: translateX(120%);
    transition:
      transform 0.56s ease,
      opacity 0.24s ease;
  }
}

.tab:active:not(:disabled),
.chip:active:not(:disabled),
.btn:active:not(:disabled),
.admin-nav-button:active:not(:disabled),
.subject-card:active:not(:disabled),
.module-card:active:not(:disabled),
.option:active:not(:disabled),
.q-dot:active:not(:disabled),
.practice-video-tile:active:not(:disabled),
.switch:active:not(:disabled),
.video-remove:active:not(:disabled) {
  transform: translateY(1px) scale(0.985);
  box-shadow: var(--press-shadow);
}

.tab.active,
.chip.active {
  border-color: rgba(14, 111, 102, 0.28);
  background: #e8f4f1;
  color: var(--brand);
  box-shadow: 0 6px 16px rgba(14, 111, 102, 0.1);
}

.btn.primary {
  border-color: var(--brand);
  background: var(--brand);
  color: #fff;
  box-shadow: 0 10px 22px rgba(14, 111, 102, 0.2);
}

.btn.primary:hover {
  background: var(--brand-dark);
}

.btn.primary:active:not(:disabled) {
  background: #084d48;
}

.btn.ghost {
  border-color: transparent;
  background: transparent;
  color: var(--brand);
}

.back-button,
.btn.ghost.back-button {
  min-height: 42px;
  padding: 0 15px 0 13px;
  border: 1px solid rgba(14, 111, 102, 0.18);
  border-radius: var(--radius-pill);
  background: rgba(252, 253, 252, 0.86);
  color: var(--brand-dark);
  box-shadow: var(--pill-shadow);
  backdrop-filter: blur(14px);
}

.back-button:hover,
.btn.ghost.back-button:hover {
  border-color: rgba(14, 111, 102, 0.28);
  background: rgba(232, 247, 244, 0.9);
}

.btn.danger {
  border-color: #f6d4d4;
  background: #fff7f7;
  color: var(--danger);
}

.btn.small {
  min-height: 34px;
  padding: 0 11px;
  font-size: 14px;
}

.upload-btn {
  white-space: nowrap;
}

.form-row {
  display: grid;
  gap: 8px;
  margin-bottom: 14px;
}

.form-row label,
.label {
  color: var(--ink);
  font-size: 14px;
  font-weight: 750;
}

input,
select,
textarea {
  width: 100%;
  min-height: 44px;
  border: 1px solid rgba(217, 227, 222, 0.95);
  border-radius: var(--radius);
  background: rgba(252, 253, 252, 0.96);
  color: var(--ink);
  padding: 10px 13px;
  outline: none;
  transition:
    border-color 0.18s var(--motion),
    box-shadow 0.18s var(--motion),
    background 0.18s var(--motion),
    transform 0.18s var(--motion);
}

textarea {
  min-height: 180px;
  resize: vertical;
  line-height: 1.6;
}

.textarea-short {
  min-height: 92px;
}

input:focus,
select:focus,
textarea:focus {
  border-color: var(--brand);
  box-shadow: 0 0 0 3px rgba(14, 111, 102, 0.14);
  transform: translateY(-1px);
}

.input-with-button {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
}

.checkbox-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.check {
  display: flex;
  align-items: center;
  min-height: 40px;
  gap: 8px;
  padding: 8px 10px;
  border: 1px solid rgba(217, 227, 222, 0.92);
  border-radius: var(--radius);
  background: rgba(252, 253, 252, 0.88);
}

.check input {
  width: auto;
  min-height: auto;
}

.table {
  width: 100%;
  border-collapse: collapse;
}

.table-scroll {
  overflow-x: auto;
  padding-bottom: 4px;
}

.table-scroll .table {
  min-width: 760px;
}

.wrong-table-scroll {
  overflow-x: auto;
  border: 1px solid rgba(217, 227, 222, 0.86);
  border-radius: var(--radius);
  background: rgba(252, 253, 252, 0.96);
  overscroll-behavior-x: contain;
  touch-action: pan-x pan-y;
  -webkit-overflow-scrolling: touch;
}

.wrong-table-scroll .table {
  min-width: 700px;
  background: rgba(252, 253, 252, 0.96);
}

.wrong-table th,
.wrong-table td {
  background: rgba(252, 253, 252, 0.96);
}

.wrong-table tbody tr:nth-child(even) td {
  background: rgba(247, 250, 248, 0.96);
}

.table th,
.table td {
  padding: 13px 10px;
  border-bottom: 1px solid rgba(217, 227, 222, 0.72);
  text-align: left;
  vertical-align: top;
  transition:
    background 0.16s ease,
    color 0.16s ease;
}

.table th {
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

@media (hover: hover) {
  .table tbody tr:hover td {
    background: rgba(235, 246, 243, 0.56);
  }
}

.table-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.switch-actions {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  white-space: nowrap;
}

.inline-form {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.inline-form input {
  width: 128px;
  min-height: 34px;
  padding: 6px 10px;
}

.admin-log-panel {
  min-height: min(720px, calc(100vh - 170px));
}

.log-list {
  display: grid;
  max-height: min(68vh, 720px);
  overflow-y: auto;
  gap: 10px;
  padding-right: 4px;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
}

.log-item {
  display: grid;
  grid-template-columns: minmax(150px, 190px) 1fr;
  gap: 14px;
  padding: 12px 14px;
  border: 1px solid rgba(14, 111, 102, 0.1);
  border-radius: var(--radius);
  background: rgba(252, 253, 252, 0.82);
  box-shadow: 0 8px 20px rgba(21, 34, 31, 0.045);
}

.log-item time {
  color: var(--muted);
  font-size: 13px;
  font-weight: 850;
  line-height: 1.5;
}

.log-item div {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.log-item strong {
  color: var(--ink);
  font-size: 15px;
}

.log-item span,
.log-item p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.55;
  overflow-wrap: anywhere;
}

.switch {
  position: relative;
  display: inline-flex;
  align-items: center;
  width: 86px;
  min-width: 86px;
  min-height: 34px;
  padding: 0 10px;
  border: 1px solid rgba(220, 38, 38, 0.18);
  border-radius: var(--radius-pill);
  background: #fff0f0;
  color: var(--danger);
  cursor: pointer;
  font-size: 13px;
  font-weight: 800;
  transition:
    background 0.18s var(--motion),
    border-color 0.18s var(--motion),
    color 0.18s var(--motion),
    box-shadow 0.18s var(--motion);
}

.switch span {
  position: absolute;
  top: 3px;
  left: 4px;
  display: block;
  width: 26px;
  height: 26px;
  border-radius: var(--radius-pill);
  background: var(--surface);
  box-shadow: 0 4px 10px rgba(21, 34, 31, 0.1);
  transition:
    transform 0.22s cubic-bezier(0.2, 0.8, 0.2, 1),
    background 0.18s ease;
}

.switch strong {
  position: absolute;
  right: 10px;
  display: block;
  width: 34px;
  text-align: center;
  transition:
    left 0.18s ease,
    right 0.18s ease;
}

.switch.on {
  border-color: rgba(14, 111, 102, 0.22);
  background: #e8f4f1;
  color: var(--brand-dark);
}

.switch.on span {
  background: var(--brand);
  transform: translateX(52px);
}

.switch.on strong {
  right: auto;
  left: 10px;
}

.file-info {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 14px;
  padding: 10px 12px;
  border: 1px solid rgba(217, 227, 222, 0.86);
  border-radius: var(--radius);
  background: rgba(252, 253, 252, 0.76);
  color: var(--muted);
  font-size: 13px;
}

.file-info span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.file-info-actions,
.import-tools {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.import-tools {
  margin: 4px 0 14px;
}

.question-export-all {
  display: flex;
  justify-content: flex-end;
  margin-top: 16px;
}

.csv-preview {
  overflow: auto;
  max-height: 280px;
  border: 1px solid rgba(217, 227, 222, 0.86);
  border-radius: var(--radius);
  background: rgba(252, 253, 252, 0.86);
}

.csv-preview table {
  width: 100%;
  min-width: 620px;
  border-collapse: collapse;
}

.csv-preview th,
.csv-preview td {
  max-width: 260px;
  padding: 9px 10px;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  color: var(--ink);
  font-size: 13px;
  line-height: 1.45;
  text-align: left;
  vertical-align: top;
}

.csv-preview th {
  position: sticky;
  top: 0;
  z-index: 1;
  background: #eef7f4;
  color: var(--brand-dark);
  font-weight: 850;
}

.csv-preview-empty {
  display: grid;
  min-height: 92px;
  place-items: center;
  color: var(--muted);
}

.system-overview {
  margin-top: 20px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
}

.overview-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.overview-head strong {
  display: block;
  margin-bottom: 3px;
  font-size: 15px;
}

.overview-head span {
  color: var(--muted);
  font-size: 13px;
}

.overview-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.overview-tile {
  min-height: 74px;
  padding: 12px;
  border: 1px solid rgba(217, 227, 222, 0.86);
  border-radius: var(--radius);
  background: rgba(252, 253, 252, 0.78);
  box-shadow: 0 8px 18px rgba(21, 34, 31, 0.04);
}

.overview-tile strong {
  display: block;
  margin-bottom: 5px;
  color: var(--brand-dark);
  font-size: 22px;
}

.overview-tile span {
  color: var(--muted);
  font-size: 12px;
}

.dashboard-metrics {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.dashboard-split {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-top: 14px;
}

.dashboard-card {
  padding: 14px;
  border: 1px solid rgba(217, 227, 222, 0.86);
  border-radius: var(--radius);
  background: rgba(252, 253, 252, 0.76);
}

.dashboard-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 10px;
}

.dashboard-card-head strong {
  font-size: 15px;
}

.dashboard-card-head span,
.dashboard-note {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.dashboard-note {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

.dashboard-note span {
  display: inline-flex;
  min-height: 28px;
  align-items: center;
  padding: 0 10px;
  border: 1px solid rgba(217, 227, 222, 0.82);
  border-radius: var(--radius-pill);
  background: rgba(252, 253, 252, 0.78);
}

.subject-overview-list {
  display: grid;
  gap: 8px;
  margin-top: 12px;
}

.subject-overview-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(110px, 34%);
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border: 1px solid rgba(14, 111, 102, 0.1);
  border-radius: var(--radius);
  background: rgba(252, 253, 252, 0.76);
}

.subject-overview-item strong {
  display: block;
  margin-bottom: 3px;
  font-size: 13px;
}

.subject-overview-item span {
  color: var(--muted);
  font-size: 12px;
}

.metric-row {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}

.metric {
  padding: 18px;
}

.metric span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.metric strong {
  display: block;
  margin-top: 8px;
  font-size: 31px;
}

.student-hero {
  position: relative;
  overflow: hidden;
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(280px, 0.75fr);
  gap: 18px;
  margin-bottom: 16px;
  padding: 22px;
  border: 1px solid rgba(217, 227, 222, 0.86);
  border-radius: var(--radius-soft);
  background:
    linear-gradient(120deg, rgba(232, 244, 241, 0.92), rgba(252, 253, 252, 0.94) 58%),
    var(--surface);
  box-shadow: 0 18px 46px rgba(21, 34, 31, 0.08);
  animation: fade-lift 0.32s ease both;
}

.student-hero::after {
  content: "";
  position: absolute;
  inset: 0;
  border-top: 1px solid rgba(255, 255, 255, 0.82);
  pointer-events: none;
}

.student-hero-copy,
.student-hero-metrics {
  position: relative;
  z-index: 1;
}

.student-hero-copy h1 {
  max-width: 720px;
  margin: 8px 0 10px;
  font-size: 30px;
  line-height: 1.28;
}

.student-hero-copy p {
  max-width: 680px;
  margin: 0;
  color: var(--muted);
  line-height: 1.7;
}

.student-hero-metrics {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.student-hero-metrics div,
.goal-card {
  border: 1px solid rgba(217, 227, 222, 0.82);
  border-radius: var(--radius);
  background: rgba(252, 253, 252, 0.8);
  box-shadow: 0 10px 22px rgba(21, 34, 31, 0.045);
}

.student-hero-metrics div {
  min-height: 88px;
  padding: 14px;
}

.student-hero-metrics strong {
  display: block;
  margin-bottom: 6px;
  color: var(--brand-dark);
  font-size: 28px;
}

.student-hero-metrics span,
.goal-card span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 850;
}

.student-goal-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 16px;
}

.goal-card {
  display: grid;
  min-height: 92px;
  gap: 12px;
  padding: 14px;
  animation: fade-lift 0.3s ease both;
}

.goal-card strong {
  display: block;
  margin-bottom: 4px;
  font-size: 16px;
}

.goal-track,
.resource-bar {
  overflow: hidden;
  height: 8px;
  border-radius: var(--radius-pill);
  background: rgba(217, 227, 222, 0.72);
}

.goal-track i,
.resource-bar i {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--brand), rgba(111, 127, 95, 0.82));
  transition: width 0.4s ease;
}

.resource-bar.warm i {
  background: linear-gradient(90deg, var(--accent), rgba(14, 111, 102, 0.54));
}

.subject-card-stats {
  position: relative;
  z-index: 1;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 16px;
}

.subject-card-stats span {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  padding: 0 9px;
  border: 1px solid rgba(217, 227, 222, 0.86);
  border-radius: var(--radius-pill);
  background: rgba(252, 253, 252, 0.74);
  color: var(--muted);
  font-size: 12px;
  font-weight: 850;
}

.student-status-panel {
  position: relative;
  overflow: hidden;
  margin-bottom: 16px;
  padding: 16px;
  border: 1px solid rgba(217, 227, 222, 0.86);
  border-radius: var(--radius-soft);
  background: rgba(252, 253, 252, 0.84);
  box-shadow: 0 14px 34px rgba(21, 34, 31, 0.06);
  backdrop-filter: blur(12px);
}

.student-status-panel::after {
  display: none;
}

.student-status-panel.compact {
  margin-top: 12px;
}

.student-status-head {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.student-status-head strong {
  color: var(--brand-dark);
  font-size: 18px;
}

.student-status-head span {
  color: var(--muted);
  font-size: 13px;
}

.student-status-grid {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.student-status-card {
  min-height: 76px;
  padding: 12px;
  border: 1px solid rgba(217, 227, 222, 0.8);
  border-radius: var(--radius);
  background: rgba(252, 253, 252, 0.82);
}

.student-status-card strong {
  display: block;
  margin-bottom: 5px;
  color: var(--brand-dark);
  font-size: 24px;
}

.student-status-card span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.subject-card,
.module-card {
  position: relative;
  overflow: hidden;
  min-height: 132px;
  padding: 20px;
  cursor: pointer;
  text-align: left;
}

.subject-card::before,
.module-card::before {
  content: "";
  position: absolute;
  inset: 0;
  border-top: 3px solid rgba(14, 111, 102, 0.62);
  opacity: 0.92;
}

.subject-card::after,
.module-card::after {
  display: none;
}

.subject-card h3,
.subject-card p,
.module-card h3,
.module-card p {
  position: relative;
  z-index: 1;
}

.subject-card:hover,
.module-card:hover {
  border-color: rgba(14, 111, 102, 0.28);
  background: rgba(252, 253, 252, 0.96);
  transform: translateY(-2px);
}

.subject-card h3,
.module-card h3 {
  margin: 0 0 10px;
  font-size: 20px;
}

.subject-card p,
.module-card p {
  margin: 0;
  color: var(--muted);
  line-height: 1.5;
}

.toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
}

.page > .toolbar:has(.back-button),
.page > .back-toolbar {
  position: sticky;
  top: 80px;
  z-index: 9;
  padding: 0 0 10px;
  border: 0;
  background: transparent;
  box-shadow: none;
  pointer-events: none;
}

.page > .toolbar:has(.back-button) > *,
.page > .back-toolbar > * {
  pointer-events: auto;
}

.page > .toolbar:has(.back-button) .status,
.page > .back-toolbar .status {
  max-width: min(64vw, 560px);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.question-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 280px;
  gap: 18px;
}

.question-card {
  position: relative;
  overflow: hidden;
  min-height: 360px;
  padding: 22px;
}

.question-card::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 4px;
  background: linear-gradient(90deg, rgba(14, 111, 102, 0.82), rgba(111, 127, 95, 0.58));
}

.question-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 16px;
  color: var(--muted);
  font-size: 14px;
}

.question-meta span,
.status {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  padding: 0 10px;
  border-radius: var(--radius-pill);
  border: 1px solid rgba(217, 227, 222, 0.82);
  background: rgba(252, 253, 252, 0.78);
  color: #334155;
  font-size: 13px;
  font-weight: 800;
  box-shadow: 0 8px 18px rgba(18, 32, 31, 0.04);
  backdrop-filter: blur(10px);
}

.question-text {
  margin: 0 0 20px;
  font-size: 21px;
  line-height: 1.72;
}

.option-list {
  display: grid;
  gap: 10px;
}

.option {
  display: flex;
  align-items: flex-start;
  width: 100%;
  min-height: 52px;
  gap: 12px;
  padding: 12px;
  border: 1px solid rgba(217, 227, 222, 0.92);
  border-radius: var(--radius);
  background: rgba(252, 253, 252, 0.94);
  color: var(--ink);
  cursor: pointer;
  line-height: 1.5;
  text-align: left;
  transition:
    transform 0.18s var(--motion),
    border-color 0.18s var(--motion),
    background 0.18s var(--motion),
    box-shadow 0.18s var(--motion);
}

@media (hover: hover) {
  .option:hover {
    border-color: rgba(14, 111, 102, 0.34);
    background: #f6faf8;
    box-shadow: 0 8px 18px rgba(21, 34, 31, 0.055);
  }
}

.option:focus {
  outline: none;
}

.option:focus-visible {
  border-color: rgba(14, 111, 102, 0.42);
  box-shadow: 0 0 0 3px rgba(14, 111, 102, 0.12);
}

.option.selected {
  border-color: rgba(14, 111, 102, 0.42);
  background: #eaf5f2;
  animation: pop-in 0.18s ease both;
  box-shadow: 0 8px 18px rgba(14, 111, 102, 0.08);
}

.option.correct {
  border-color: rgba(14, 111, 102, 0.52);
  background: #e7f4f0;
  box-shadow: 0 8px 18px rgba(14, 111, 102, 0.08);
}

.option.wrong {
  border-color: rgba(220, 38, 38, 0.42);
  background: #fff0f0;
  box-shadow: 0 8px 18px rgba(220, 38, 38, 0.07);
}

.option-key {
  display: inline-grid;
  width: 26px;
  height: 26px;
  flex: 0 0 auto;
  place-items: center;
  border-radius: 6px;
  background: #e2e8f0;
  color: #334155;
  font-size: 13px;
  font-weight: 900;
}

.answer-box {
  margin-top: 16px;
  padding: 14px;
  border-left: 3px solid var(--brand);
  border-radius: var(--radius);
  background: var(--surface-soft);
  color: var(--muted);
  line-height: 1.65;
}

.answer-box strong {
  color: var(--ink);
}

.answer-box.good {
  background: #e8f4f1;
  color: var(--brand-dark);
}

.answer-box.bad {
  border-left-color: var(--danger);
  background: #fff0f0;
  color: #a51515;
}

.side-panel {
  padding: 16px;
}

.question-side-panel {
  position: sticky;
  top: 132px;
  align-self: start;
  display: grid;
  gap: 14px;
  max-height: calc(100vh - 158px);
  overflow: auto;
}

.question-picker-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.question-picker-head strong,
.timer-pill strong {
  display: block;
  color: var(--ink);
}

.question-picker-head span,
.timer-pill span,
.question-legend {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.timer-pill {
  min-width: 84px;
  padding: 8px 10px;
  border: 1px solid rgba(14, 111, 102, 0.12);
  border-radius: var(--radius);
  background: rgba(232, 244, 241, 0.72);
  text-align: right;
}

.question-picker-fab,
.exam-picker-backdrop {
  display: none;
}

.question-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 8px;
  margin-top: 12px;
}

.q-dot {
  display: grid;
  min-width: 0;
  aspect-ratio: 1;
  place-items: center;
  border: 1px solid rgba(217, 227, 222, 0.92);
  border-radius: 6px;
  background: rgba(252, 253, 252, 0.95);
  color: var(--muted);
  cursor: pointer;
  font-weight: 800;
  transition:
    transform 0.18s var(--motion),
    border-color 0.18s var(--motion),
    background 0.18s var(--motion),
    color 0.18s var(--motion),
    box-shadow 0.18s var(--motion);
}

.q-dot.active {
  border-color: var(--brand);
  background: var(--brand);
  color: #fff;
  box-shadow: 0 8px 18px rgba(14, 111, 102, 0.18);
}

.q-dot.active.answered {
  border-color: var(--brand);
  background: var(--brand);
  color: #fff;
}

.q-dot.answered {
  background: #e8f4f1;
  color: var(--brand);
}

.question-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

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

.question-legend i {
  width: 10px;
  height: 10px;
  border-radius: 999px;
}

.legend-current {
  background: var(--brand);
}

.legend-done {
  background: #e8f4f1;
  border: 1px solid rgba(14, 111, 102, 0.2);
}

.empty {
  display: grid;
  min-height: 180px;
  place-items: center;
  padding: 24px;
  border: 1px dashed #b8c7c3;
  border-radius: var(--radius);
  background: var(--surface-soft);
  color: var(--muted);
  text-align: center;
}

.status.ok {
  background: #e8f4f1;
  color: var(--success);
}

.status.no {
  background: #fff0f0;
  color: var(--danger);
}

.video-list {
  display: grid;
  gap: 10px;
}

.practice-video-item {
  display: grid;
  gap: 10px;
}

.practice-video-tile {
  position: relative;
  overflow: hidden;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 10px;
  width: 100%;
  min-height: 58px;
  padding: 12px 14px;
  border: 1px solid rgba(217, 227, 222, 0.92);
  border-radius: var(--radius);
  background: rgba(252, 253, 252, 0.92);
  color: var(--ink);
  cursor: pointer;
  text-align: left;
  box-shadow: 0 8px 18px rgba(21, 34, 31, 0.045);
  transition:
    transform 0.18s var(--motion),
    border-color 0.18s var(--motion),
    background 0.18s var(--motion),
    box-shadow 0.18s var(--motion);
}

.practice-video-tile:hover,
.practice-video-item.is-open .practice-video-tile {
  border-color: rgba(14, 111, 102, 0.28);
  background: rgba(246, 250, 248, 0.96);
  box-shadow: 0 12px 26px rgba(21, 34, 31, 0.075);
}

.practice-video-name {
  overflow: hidden;
  color: var(--ink);
  font-size: 15px;
  font-weight: 850;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.practice-video-tag {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 5px 9px;
  border-radius: var(--radius-pill);
  background: rgba(14, 111, 102, 0.1);
  color: var(--brand);
  font-size: 12px;
  font-weight: 850;
  white-space: nowrap;
}

.practice-video-tag::before {
  content: "";
  width: 0;
  height: 0;
  border-top: 5px solid transparent;
  border-bottom: 5px solid transparent;
  border-left: 8px solid currentColor;
}

.practice-video-arrow {
  display: grid;
  width: 26px;
  height: 26px;
  place-items: center;
  border-radius: var(--radius-pill);
  background: rgba(14, 111, 102, 0.1);
  color: var(--brand);
  font-weight: 900;
  transition: transform 180ms var(--motion);
}

.practice-video-item.is-open .practice-video-arrow {
  transform: rotate(180deg);
}

.practice-video-expanded {
  display: grid;
  gap: 8px;
  animation: soft-drop 0.22s ease both;
}

.video-frame {
  position: relative;
  overflow: hidden;
  margin-top: 8px;
  border: 1px solid rgba(217, 227, 222, 0.86);
  border-radius: var(--radius);
  background: #10201f;
  aspect-ratio: 16 / 9;
}

.video-frame iframe,
.video-frame video {
  width: 100%;
  height: 100%;
  border: 0;
}

.video-frame > .tcplayer,
.video-frame > .video-js,
.video-modal-frame > .tcplayer,
.video-modal-frame > .video-js {
  position: absolute !important;
  inset: 0;
  width: 100% !important;
  height: 100% !important;
  max-width: 100%;
  max-height: 100%;
}

.video-frame .vjs-tech,
.video-modal-frame .vjs-tech {
  width: 100% !important;
  height: 100% !important;
  object-fit: contain;
}

.video-frame .vjs-control-bar,
.video-modal-frame .vjs-control-bar {
  display: flex !important;
  align-items: center;
  min-width: 0;
}

.video-frame .vjs-fullscreen-control,
.video-modal-frame .vjs-fullscreen-control {
  display: flex !important;
  flex: 0 0 3em;
  visibility: visible !important;
  opacity: 1 !important;
  pointer-events: auto !important;
}

.video-frame .tcp-video-quality-switcher,
.video-modal-frame .tcp-video-quality-switcher {
  display: flex !important;
  align-items: center;
  justify-content: center;
  flex: 0 0 58px;
  min-width: 58px;
  max-width: 72px;
}

.video-frame .tcp-video-quality-switcher .vjs-menu,
.video-modal-frame .tcp-video-quality-switcher .vjs-menu {
  left: 50%;
  min-width: 76px;
  transform: translateX(-50%);
}

.video-frame .tcp-video-quality-switcher .vjs-menu-content,
.video-modal-frame .tcp-video-quality-switcher .vjs-menu-content {
  width: max-content;
  min-width: 76px;
}

.video-frame .tcp-video-quality-switcher .vjs-menu-item,
.video-modal-frame .tcp-video-quality-switcher .vjs-menu-item {
  min-width: 76px;
  padding: 0.45em 0.8em;
  text-align: center;
}

.video-frame .tcp-video-quality-switcher .vjs-menu-item.is-quality-duplicate,
.video-modal-frame .tcp-video-quality-switcher .vjs-menu-item.is-quality-duplicate {
  display: none !important;
}

.video-frame .tcp-video-quality-switcher .vjs-menu-item-text,
.video-modal-frame .tcp-video-quality-switcher .vjs-menu-item-text {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 2.5em;
  line-height: 1.1;
  text-align: center;
  white-space: nowrap;
}

.video-frame .tcp-quality-switcher-value,
.video-modal-frame .tcp-quality-switcher-value {
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  min-width: 42px;
  max-width: none;
  line-height: 1;
  text-align: center;
  white-space: nowrap;
}

.video-frame .vjs-playback-rate,
.video-modal-frame .vjs-playback-rate,
.video-frame .vjs-fullscreen-control,
.video-modal-frame .vjs-fullscreen-control {
  align-items: center;
  justify-content: center;
  text-align: center;
}

.vod-player {
  background: #10201f;
  object-fit: contain;
}

.video-playback-message {
  position: absolute;
  inset: auto 12px 12px;
  z-index: 5;
  padding: 8px 10px;
  border: 1px solid rgba(248, 113, 113, 0.26);
  border-radius: var(--radius-pill);
  background: rgba(252, 253, 252, 0.94);
  color: #b91c1c;
  font-size: 12px;
  font-weight: 850;
  text-align: center;
  box-shadow: 0 8px 18px rgba(6, 34, 32, 0.18);
}

.video-quality-control {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 10px;
  padding: 6px 10px;
  border: 1px solid rgba(14, 111, 102, 0.14);
  border-radius: var(--radius-pill);
  background: rgba(252, 253, 252, 0.9);
  color: var(--muted);
  font-size: 13px;
  font-weight: 850;
}

.video-quality-control select {
  width: auto;
  min-height: 30px;
  padding: 4px 28px 4px 10px;
  border: 1px solid rgba(14, 111, 102, 0.18);
  border-radius: var(--radius-pill);
  background-color: var(--surface);
  color: var(--ink);
  font-size: 13px;
  font-weight: 850;
}

.video-admin-preview {
  overflow: hidden;
  margin-bottom: 10px;
  border: 1px solid rgba(217, 227, 222, 0.86);
  border-radius: var(--radius);
  background: #10201f;
  aspect-ratio: 16 / 9;
}

.video-admin-preview iframe,
.video-admin-preview video {
  width: 100%;
  height: 100%;
  border: 0;
}

.video-admin-preview .empty {
  min-height: 100%;
  border: 0;
  border-radius: 0;
  background: rgba(252, 253, 252, 0.92);
}

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

.video-admin-card {
  position: relative;
  overflow: hidden;
  padding: 10px;
  border: 1px solid rgba(217, 227, 222, 0.86);
  border-radius: var(--radius);
  background: rgba(252, 253, 252, 0.88);
  box-shadow: 0 8px 18px rgba(21, 34, 31, 0.052);
}

.video-admin-card.is-video-hidden {
  background: rgba(248, 250, 252, 0.76);
}

.video-admin-card.is-video-hidden .video-admin-thumb,
.video-admin-card.is-video-hidden .video-title-input {
  opacity: 0.58;
}

.video-demo {
  position: absolute;
  top: 50%;
  left: 50%;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 46px;
  height: 46px;
  padding: 0;
  border: 1px solid rgba(255, 255, 255, 0.58);
  border-radius: 50%;
  background: rgba(14, 111, 102, 0.94);
  color: #fff;
  cursor: pointer;
  box-shadow: 0 10px 24px rgba(6, 34, 32, 0.24);
  transform: translate(-50%, -50%);
  transition:
    transform 0.18s var(--motion),
    background 0.18s var(--motion),
    box-shadow 0.18s var(--motion);
  backdrop-filter: blur(8px);
}

.video-demo:active {
  box-shadow: 0 6px 16px rgba(6, 34, 32, 0.22);
  transform: translate(-50%, -50%) scale(0.94);
}

.video-demo .play-triangle {
  width: 0;
  height: 0;
  margin-left: 3px;
  border-top: 9px solid transparent;
  border-bottom: 9px solid transparent;
  border-left: 14px solid currentColor;
}

.video-admin-thumb {
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(217, 227, 222, 0.86);
  border-radius: var(--radius);
  background: #10201f;
  aspect-ratio: 16 / 9;
}

.video-admin-thumb iframe,
.video-admin-thumb video {
  width: 100%;
  height: 100%;
  border: 0;
  object-fit: cover;
  pointer-events: none;
}

.video-admin-thumb .empty {
  min-height: 100%;
  border: 0;
  border-radius: 0;
  background: rgba(252, 253, 252, 0.94);
}

.video-title-input {
  margin-top: 9px;
  min-height: 38px;
  padding: 8px 10px;
  font-size: 14px;
}

.video-admin-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  justify-content: flex-end;
  margin-top: 8px;
}

.video-status-badge {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 0 10px;
  border: 1px solid rgba(217, 227, 222, 0.86);
  border-radius: var(--radius-pill);
  background: rgba(248, 250, 252, 0.92);
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
  white-space: nowrap;
}

.video-status-badge.status-processed {
  border-color: rgba(22, 163, 74, 0.22);
  background: rgba(240, 253, 244, 0.94);
  color: #15803d;
}

.video-status-badge.status-processing {
  border-color: rgba(217, 119, 6, 0.24);
  background: rgba(255, 251, 235, 0.94);
  color: #b45309;
}

.video-status-badge.status-unprocessed {
  border-color: rgba(100, 116, 139, 0.2);
  background: rgba(248, 250, 252, 0.94);
  color: #64748b;
}

.video-status-badge.status-deleted {
  border-color: rgba(220, 38, 38, 0.24);
  background: rgba(254, 242, 242, 0.94);
  color: #b91c1c;
}

.video-visible-toggle {
  min-height: 30px;
  padding: 0 12px;
  border: 1px solid rgba(14, 111, 102, 0.18);
  border-radius: var(--radius-pill);
  background: rgba(232, 244, 241, 0.92);
  color: var(--brand);
  cursor: pointer;
  font-size: 12px;
  font-weight: 900;
}

.video-visible-toggle.is-off {
  border-color: rgba(100, 116, 139, 0.22);
  background: rgba(241, 245, 249, 0.92);
  color: #64748b;
}

.upload-progress {
  margin-top: 9px;
  padding: 9px 10px;
  border: 1px solid rgba(14, 111, 102, 0.14);
  border-radius: var(--radius-pill);
  background: rgba(232, 244, 241, 0.9);
  color: #134e4a;
}

.upload-progress-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  font-size: 12px;
  font-weight: 850;
}

.upload-progress-track {
  overflow: hidden;
  height: 6px;
  margin-top: 7px;
  border-radius: var(--radius-pill);
  background: rgba(14, 111, 102, 0.14);
}

.upload-progress-track span {
  position: relative;
  overflow: hidden;
  display: block;
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--brand), #2f8a65);
  transition: width 0.22s var(--motion);
}

.upload-progress-track span::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.46), transparent);
  animation: progress-sheen 1.25s ease-in-out infinite;
}

.upload-progress p {
  overflow: hidden;
  margin: 6px 0 0;
  min-height: 17px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.upload-progress p.is-empty {
  color: transparent;
}

.upload-progress.is-failed {
  border-color: rgba(220, 38, 38, 0.2);
  background: rgba(254, 242, 242, 0.92);
  color: var(--danger);
}

.upload-progress.is-failed .upload-progress-track {
  background: rgba(220, 38, 38, 0.15);
}

.upload-progress.is-failed .upload-progress-track span {
  background: var(--danger);
}

.video-task-panel {
  display: grid;
  gap: 10px;
  margin: 12px 0 16px;
  padding: 12px;
  border: 1px solid rgba(14, 111, 102, 0.12);
  border-radius: var(--radius);
  background: rgba(252, 253, 252, 0.92);
  box-shadow: 0 10px 24px rgba(21, 34, 31, 0.06);
}

.video-task-head,
.video-task-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.video-task-head strong {
  color: var(--ink);
}

.video-task-head span,
.video-task-title em {
  color: var(--muted);
  font-size: 12px;
  font-style: normal;
  font-weight: 800;
}

.video-task-list {
  display: grid;
  gap: 10px;
}

.video-task-item {
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(248, 250, 252, 0.86);
  animation: fade-lift 0.24s ease both;
}

.video-task-title span {
  overflow: hidden;
  color: var(--ink);
  font-size: 13px;
  font-weight: 850;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.video-remove {
  position: absolute;
  top: 6px;
  right: 6px;
  z-index: 2;
  display: grid;
  width: 28px;
  height: 28px;
  place-items: center;
  border: 1px solid rgba(220, 38, 38, 0.22);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.94);
  color: var(--danger);
  cursor: pointer;
  font-size: 20px;
  font-weight: 900;
  line-height: 1;
  box-shadow: 0 6px 14px rgba(18, 32, 31, 0.12);
}

.video-grid-empty {
  min-height: 120px;
}

.video-modal {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: grid;
  place-items: center;
  padding: 22px;
}

.video-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(12, 22, 21, 0.62);
  backdrop-filter: blur(8px);
  animation: pop-in 0.18s ease both;
}

.video-modal-panel {
  position: relative;
  z-index: 1;
  width: min(100%, 980px);
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: var(--radius);
  background: #10201f;
  box-shadow: 0 28px 80px rgba(6, 34, 32, 0.34);
  animation: fade-lift 0.24s ease both;
}

.video-modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 14px;
  border-bottom: 1px solid var(--line);
}

.video-modal-head strong {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.video-modal-actions {
  display: flex;
  flex: 0 0 auto;
  flex-wrap: wrap;
  gap: 8px;
}

.video-modal-close {
  position: absolute;
  top: 10px;
  right: 10px;
  z-index: 8;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  padding: 0;
  border: 1px solid rgba(255, 255, 255, 0.58);
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.68);
  color: #fff;
  cursor: pointer;
  font-size: 25px;
  font-weight: 800;
  line-height: 1;
  text-align: center;
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.28);
  backdrop-filter: blur(8px);
  transition:
    transform 0.16s ease,
    background 0.16s ease;
}

.video-modal-close:hover {
  background: rgba(220, 38, 38, 0.9);
}

.video-modal-close:active {
  transform: scale(0.94);
}

.video-modal-frame {
  position: relative;
  overflow: hidden;
  background: #10201f;
  aspect-ratio: 16 / 9;
}

.video-modal-frame iframe,
.video-modal-frame video {
  width: 100%;
  height: 100%;
  border: 0;
}

.preview-segmented {
  flex: 0 0 auto;
}

.preview-panel {
  min-height: min(720px, calc(100vh - 210px));
}

.preview-search {
  margin-bottom: 12px;
}

.preview-table-wrap {
  max-height: min(66vh, 720px);
  overscroll-behavior: contain;
}

.preview-table th,
.preview-table td {
  min-width: 110px;
}

.preview-question-cell {
  min-width: 280px;
  max-width: 420px;
}

.preview-options-cell,
.preview-explain-cell {
  min-width: 220px;
  max-width: 360px;
}

.preview-question-cell,
.preview-options-cell,
.preview-explain-cell {
  line-height: 1.55;
}

.preview-video-list {
  display: grid;
  gap: 10px;
  max-height: min(66vh, 720px);
  overflow-y: auto;
  padding-right: 4px;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
}

.preview-video-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 13px 14px;
  border: 1px solid rgba(14, 111, 102, 0.12);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.86);
  box-shadow: 0 8px 20px rgba(18, 32, 31, 0.045);
}

.preview-video-row strong,
.preview-video-row span {
  display: block;
}

.preview-video-row span {
  margin-top: 4px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}

.content-modal {
  position: fixed;
  inset: 0;
  z-index: 82;
  display: grid;
  place-items: center;
  padding: 22px;
}

.content-modal-panel {
  position: relative;
  z-index: 1;
  width: min(100%, 760px);
  max-height: min(88vh, 820px);
  overflow-y: auto;
  animation: fade-lift 0.24s ease both;
}

.oral-text {
  white-space: pre-wrap;
  line-height: 1.8;
}

.toast {
  position: fixed;
  right: 22px;
  bottom: 22px;
  z-index: 50;
  max-width: min(380px, calc(100vw - 32px));
  padding: 13px 16px;
  border-radius: var(--radius);
  background: #10201f;
  color: #fff;
  box-shadow: var(--shadow);
  animation: slide-in-right 0.24s ease both;
}

.alert-modal {
  position: fixed;
  inset: 0;
  z-index: 90;
  display: grid;
  place-items: center;
  padding: 18px;
  background: rgba(8, 24, 23, 0.44);
  backdrop-filter: blur(6px);
  animation: pop-in 0.18s ease both;
}

.alert-card {
  width: min(100%, 360px);
  padding: 22px;
  border: 1px solid rgba(255, 255, 255, 0.58);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.98);
  box-shadow: 0 24px 70px rgba(6, 34, 32, 0.28);
  text-align: center;
  animation: fade-lift 0.22s ease both;
}

.alert-card h2 {
  margin: 0 0 10px;
  font-size: 22px;
}

.alert-card p {
  margin: 0 0 18px;
  color: var(--muted);
  line-height: 1.65;
}

.alert-card .btn {
  width: 100%;
}

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

.spacer {
  height: 14px;
}

@media (max-width: 1050px) {
  .login-page,
  .grid.two,
  .question-layout,
  .admin-layout {
    grid-template-columns: 1fr;
  }

  .page-admin {
    width: 100%;
  }

  .admin-sidebar {
    position: sticky;
    top: 68px;
    z-index: 8;
    display: block;
    height: auto;
    overflow-x: auto;
    overflow-y: hidden;
    border-right: 0;
    border-bottom: 1px solid var(--line);
    padding: 10px 14px;
  }

  .admin-sidebar-head {
    display: none;
  }

  .admin-nav {
    display: flex;
    gap: 8px;
    min-width: max-content;
  }

  .admin-nav-button {
    width: auto;
    min-width: 190px;
    margin: 0;
  }

  .admin-content {
    padding: 22px;
  }

  .login-visual {
    min-height: 460px;
  }

  .grid.three {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .student-hero,
  .dashboard-split {
    grid-template-columns: 1fr;
  }

  .dashboard-metrics {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .metric-row {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .side-panel {
    order: -1;
  }

  .question-side-panel {
    position: static;
    max-height: none;
  }
}

@media (max-width: 760px) {
  .page,
  .admin-content,
  .login-panel {
    animation: mobile-page-in 0.28s cubic-bezier(0.2, 0.8, 0.2, 1) both;
  }

  .panel,
  .subject-card,
  .module-card,
  .question-card,
  .metric,
  .video-admin-card,
  .log-item {
    animation-duration: 0.34s;
  }

  .is-mobile-pressing {
    transform: translateY(1px) scale(0.965) !important;
    box-shadow: var(--press-shadow) !important;
    filter: saturate(1.04);
  }

  .btn.is-mobile-pressing,
  .chip.is-mobile-pressing,
  .tab.is-mobile-pressing,
  .admin-nav-button.is-mobile-pressing,
  .practice-video-tile.is-mobile-pressing,
  .question-picker-fab.is-mobile-pressing,
  .dock-button.is-mobile-pressing,
  .upload-btn.is-mobile-pressing {
    border-color: rgba(14, 111, 102, 0.36);
    background: rgba(232, 247, 244, 0.94);
    color: var(--brand-dark);
    animation: mobile-tap-pulse 0.32s ease-out;
  }

  .btn.primary.is-mobile-pressing {
    background: #084d48;
    color: #fff;
  }

  .subject-card.is-mobile-pressing,
  .module-card.is-mobile-pressing,
  .option.is-mobile-pressing {
    border-color: rgba(14, 111, 102, 0.4);
    background: rgba(240, 253, 250, 0.96);
  }

  .q-dot.is-mobile-pressing {
    border-color: var(--brand);
    background: rgba(232, 247, 244, 0.96);
    color: var(--brand);
  }

  .switch.is-mobile-pressing {
    filter: saturate(1.08);
  }

  .video-remove.is-mobile-pressing {
    border-color: rgba(220, 38, 38, 0.4);
    background: #fff0f0;
  }

  .video-demo.is-mobile-pressing {
    transform: translate(-50%, -50%) scale(0.9) !important;
  }

  .practice-video-expanded {
    animation: soft-drop 0.28s cubic-bezier(0.2, 0.8, 0.2, 1) both;
  }

  .exam-side-panel.open {
    animation: mobile-page-in 0.22s ease both;
  }

  .login-page {
    position: relative;
    display: grid;
    min-height: 100vh;
    grid-template-columns: 1fr;
    place-items: center;
    overflow: hidden;
    touch-action: pan-y;
    background:
      linear-gradient(rgba(9, 45, 43, 0.18), rgba(9, 45, 43, 0.78)),
      #1d3e3b;
  }

  .login-visual {
    position: absolute;
    inset: 0;
    min-height: auto;
    padding: 22px;
    pointer-events: none;
  }

  .login-copy,
  .login-stats-visual {
    display: none;
  }

  .brand-on-visual {
    position: relative;
    z-index: 1;
  }

  .grid.three,
  .grid.two.compact,
  .checkbox-grid,
  .metric-row {
    grid-template-columns: 1fr;
  }

  .login-panel {
    position: relative;
    z-index: 2;
    flex-direction: column;
    gap: 14px;
    width: 100%;
    min-height: 100vh;
    padding: 92px 18px 36px;
    background: transparent;
    touch-action: pan-y;
  }

  .login-stats-mobile {
    display: grid;
    width: min(100%, 360px);
    max-width: 360px;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
    pointer-events: none;
  }

  .login-stats-mobile .stat-tile {
    min-height: 70px;
    padding: 12px 8px;
    border-color: rgba(255, 255, 255, 0.56);
    background: rgba(255, 255, 255, 0.18);
    box-shadow: 0 12px 30px rgba(6, 34, 32, 0.18);
    text-align: center;
  }

  .login-stats-mobile .stat-tile strong {
    margin-bottom: 5px;
    color: #fff;
    font-size: 22px;
  }

  .login-stats-mobile .stat-tile span {
    color: rgba(248, 251, 251, 0.82);
    font-size: 12px;
  }

  .auth-box {
    width: min(100%, 360px);
    padding: 24px 20px 22px;
    border: 1px solid rgba(255, 255, 255, 0.76);
    border-radius: var(--radius);
    background: rgba(255, 255, 255, 0.96);
    box-shadow:
      0 22px 60px rgba(6, 34, 32, 0.28),
      0 2px 0 rgba(255, 255, 255, 0.7) inset;
    backdrop-filter: blur(12px);
  }

  .auth-box .eyebrow,
  .auth-box h1,
  .auth-box > p {
    text-align: center;
  }

  .auth-box > p {
    margin-bottom: 22px;
  }

  #login-id,
  #login-password {
    text-align: center;
  }

  .topbar {
    align-items: flex-start;
    flex-direction: column;
    gap: 10px;
    padding: 14px 18px;
  }

  .top-actions {
    width: 100%;
    flex-wrap: wrap;
    justify-content: space-between;
  }

  .password-panel {
    top: 110px;
    width: min(100% - 24px, 1220px);
  }

  .inline-form {
    width: 100%;
    flex-wrap: wrap;
  }

  .inline-form input {
    width: min(100%, 180px);
  }

  .overview-head {
    align-items: flex-start;
    flex-direction: column;
    gap: 4px;
  }

  .overview-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .student-hero {
    padding: 18px;
  }

  .student-hero-copy h1 {
    font-size: 24px;
  }

  .student-hero-metrics,
  .student-goal-grid,
  .dashboard-split {
    grid-template-columns: 1fr;
  }

  .dashboard-metrics,
  .student-status-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .subject-overview-item,
  .student-status-head {
    align-items: flex-start;
    flex-direction: column;
  }

  .subject-overview-item {
    grid-template-columns: 1fr;
  }

  .resource-bar {
    width: 100%;
  }

  .section-title {
    align-items: flex-start;
    flex-direction: column;
  }

  .section-actions {
    width: 100%;
    justify-content: flex-start;
  }

  .file-info-actions {
    width: 100%;
    justify-content: space-between;
  }

  .file-info {
    align-items: flex-start;
    flex-direction: column;
    border-radius: var(--radius);
  }

  .csv-preview table {
    min-width: 560px;
  }

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

  .question-export-all .btn {
    width: 100%;
  }

  .video-demo {
    top: 50%;
    left: 50%;
  }

  .video-modal {
    padding: 12px;
  }

  .video-frame .vjs-control-bar,
  .video-modal-frame .vjs-control-bar {
    min-height: 42px;
    padding-right: 0;
  }

  .video-frame .vjs-current-time,
  .video-frame .vjs-time-divider,
  .video-frame .vjs-duration,
  .video-frame .vjs-pdt-time,
  .video-frame .vjs-live-control,
  .video-frame .vjs-remaining-time,
  .video-frame .vjs-chapters-button,
  .video-frame .vjs-descriptions-button,
  .video-frame .vjs-audio-button,
  .video-frame .vjs-subs-caps-button,
  .video-modal-frame .vjs-current-time,
  .video-modal-frame .vjs-time-divider,
  .video-modal-frame .vjs-duration,
  .video-modal-frame .vjs-pdt-time,
  .video-modal-frame .vjs-live-control,
  .video-modal-frame .vjs-remaining-time,
  .video-modal-frame .vjs-chapters-button,
  .video-modal-frame .vjs-descriptions-button,
  .video-modal-frame .vjs-audio-button,
  .video-modal-frame .vjs-subs-caps-button {
    display: none !important;
  }

  .video-frame .vjs-progress-control,
  .video-modal-frame .vjs-progress-control {
    min-width: 48px;
    flex: 1 1 auto;
  }

  .video-frame .tcp-video-quality-switcher,
  .video-modal-frame .tcp-video-quality-switcher {
    flex: 0 0 56px;
    min-width: 56px;
    max-width: 62px;
  }

  .video-frame .vjs-playback-rate,
  .video-modal-frame .vjs-playback-rate {
    display: flex !important;
    flex: 0 0 38px;
    min-width: 38px;
  }

  .video-frame .vjs-playback-rate-value,
  .video-modal-frame .vjs-playback-rate-value {
    overflow: hidden;
    max-width: 34px;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .video-frame .tcp-quality-switcher-value,
  .video-modal-frame .tcp-quality-switcher-value {
    min-width: 40px;
    max-width: none;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .preview-video-row {
    align-items: stretch;
    flex-direction: column;
  }

  .preview-video-row .table-actions,
  .preview-video-row .table-actions .btn {
    width: 100%;
  }

  .content-modal {
    padding: 12px;
  }

  .page {
    width: min(100% - 24px, 1220px);
    padding: 18px 0 112px;
    touch-action: pan-y;
  }

  .page.page-admin {
    width: 100%;
    padding: 0;
  }

  .tabs {
    top: 110px;
    overflow-x: auto;
    flex-wrap: nowrap;
    padding-bottom: 12px;
    touch-action: pan-x pan-y;
  }

  .tab {
    flex: 0 0 auto;
  }

  .admin-sidebar {
    top: 110px;
    touch-action: pan-x pan-y;
  }

  .admin-content {
    padding: 18px 12px 34px;
  }

  .admin-nav-button {
    min-width: 166px;
    min-height: 54px;
  }

  .admin-nav-button small {
    display: none;
  }

  .btn,
  .btn.small,
  .tab,
  .chip {
    min-height: 44px;
  }

  .back-button,
  .back-button.btn.small {
    width: auto;
    min-height: 40px;
    padding-inline: 12px;
  }

  .section-title,
  .toolbar {
    align-items: flex-start;
    flex-direction: column;
  }

  .section-title .btn,
  .toolbar .btn,
  .toolbar .segmented {
    width: 100%;
  }

  .page > .toolbar:has(.back-button),
  .page > .back-toolbar {
    top: 116px;
    flex-direction: row;
    align-items: center;
    padding-bottom: 8px;
  }

  .page > .toolbar:has(.back-button) .back-button,
  .page > .back-toolbar .back-button {
    width: auto;
  }

  .page > .toolbar:has(.back-button) .status,
  .page > .back-toolbar .status {
    width: auto;
    max-width: calc(100vw - 112px);
  }

  .page > .toolbar:has(.back-button) .segmented,
  .page > .back-toolbar .segmented {
    width: auto;
    max-width: calc(100vw - 112px);
    overflow-x: auto;
    flex-wrap: nowrap;
    touch-action: pan-x pan-y;
  }

  .page > .toolbar:has(.back-button) .segmented .chip,
  .page > .toolbar:has(.back-button) .segmented .check,
  .page > .back-toolbar .segmented .chip,
  .page > .back-toolbar .segmented .check {
    flex: 0 0 auto;
  }

  .segmented .chip,
  .segmented .check {
    flex: 1;
  }

  .input-with-button {
    grid-template-columns: 1fr;
  }

  .subject-card,
  .module-card {
    min-height: 116px;
  }

  .question-card {
    padding: 16px;
  }

  .question-text {
    font-size: 18px;
  }

  .question-grid {
    grid-template-columns: repeat(4, 1fr);
  }

  .question-layout {
    display: block;
  }

  .question-picker-fab {
    position: fixed;
    right: 16px;
    bottom: calc(98px + env(safe-area-inset-bottom, 0px));
    z-index: 58;
    display: inline-flex;
    align-items: center;
    min-height: 48px;
    gap: 8px;
    padding: 0 16px;
    border: 1px solid rgba(14, 111, 102, 0.22);
    border-radius: var(--radius-pill);
    background: rgba(252, 253, 252, 0.94);
    color: var(--brand-dark);
    cursor: pointer;
    font-weight: 850;
    box-shadow: 0 14px 34px rgba(21, 34, 31, 0.16);
    backdrop-filter: blur(16px);
  }

  .question-picker-fab span {
    color: var(--muted);
    font-size: 12px;
  }

  .question-picker-fab strong {
    font-size: 15px;
  }

  .exam-picker-backdrop.open {
    position: fixed;
    inset: 0;
    z-index: 56;
    display: block;
    background: rgba(12, 22, 21, 0.24);
    backdrop-filter: blur(4px);
  }

  .exam-side-panel {
    position: fixed;
    right: 12px;
    bottom: calc(158px + env(safe-area-inset-bottom, 0px));
    left: 12px;
    z-index: 57;
    max-height: min(68vh, 560px);
    overflow: auto;
    border: 1px solid rgba(217, 227, 222, 0.92);
    border-radius: var(--radius-soft);
    background: rgba(252, 253, 252, 0.96);
    box-shadow: 0 24px 70px rgba(6, 34, 32, 0.26);
    opacity: 0;
    pointer-events: none;
    transform: translateY(16px);
    transition:
      opacity 0.18s ease,
      transform 0.18s ease;
  }

  .exam-side-panel.open {
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0);
  }

  .exam-side-panel .question-grid {
    grid-template-columns: repeat(6, minmax(0, 1fr));
  }

  .student-mobile-dock {
    position: fixed;
    right: 12px;
    bottom: calc(18px + env(safe-area-inset-bottom, 0px));
    left: 12px;
    z-index: 55;
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 6px;
    padding: 8px;
    border: 1px solid rgba(217, 227, 222, 0.9);
    border-radius: var(--radius-pill);
    background: rgba(252, 253, 252, 0.92);
    box-shadow: 0 18px 48px rgba(21, 34, 31, 0.16);
    backdrop-filter: blur(18px) saturate(145%);
    animation: mobile-page-in 0.26s ease both;
  }

  .dock-button {
    display: grid;
    min-width: 0;
    min-height: 48px;
    place-items: center;
    gap: 2px;
    border: 1px solid transparent;
    border-radius: var(--radius-pill);
    background: transparent;
    color: var(--muted);
    cursor: pointer;
    transition:
      transform 0.18s var(--motion),
      background 0.18s var(--motion),
      color 0.18s var(--motion),
      border-color 0.18s var(--motion);
  }

  .dock-button span {
    font-size: 17px;
    line-height: 1;
  }

  .dock-button strong {
    font-size: 12px;
    line-height: 1;
  }

  .dock-button.active {
    border-color: rgba(14, 111, 102, 0.18);
    background: rgba(232, 244, 241, 0.94);
    color: var(--brand-dark);
  }

  .table {
    min-width: 680px;
  }

  .panel:has(.table) {
    overflow-x: auto;
    touch-action: pan-x pan-y;
  }

  .panel:has(.wrong-table) {
    overflow: hidden;
    touch-action: pan-y;
  }

  .log-list {
    max-height: 66vh;
  }

  .log-item {
    grid-template-columns: 1fr;
    gap: 6px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    scroll-behavior: auto !important;
    transition-duration: 0.001ms !important;
  }
}
