.teacher-body { background: #f4f7fb; overflow-y: auto; }
.teacher-login {
  position: relative;
  min-height: 100dvh;
  display: grid;
  place-items: center;
  padding: 32px 20px;
  overflow: hidden;
  background: #081426;
}
.teacher-login-bg {
  position: absolute; inset: 0;
  background:
    radial-gradient(circle at 18% 12%, rgba(13,148,136,.22), transparent 34%),
    radial-gradient(circle at 82% 78%, rgba(37,99,235,.2), transparent 40%),
    linear-gradient(145deg, #07111f, #0c2038);
}
.teacher-login-bg::after {
  content: ""; position: absolute; inset: 0;
  background-image: linear-gradient(rgba(148,163,184,.05) 1px, transparent 1px), linear-gradient(90deg, rgba(148,163,184,.05) 1px, transparent 1px);
  background-size: 68px 68px;
  mask-image: radial-gradient(circle at 50% 50%, #000, transparent 80%);
}
.teacher-login-card {
  position: relative; z-index: 1;
  width: min(430px, 100%);
  padding: 34px;
  border-radius: 20px;
  background: rgba(255,255,255,.97);
  box-shadow: 0 32px 90px rgba(2,6,23,.4);
  animation: rise .55s cubic-bezier(.2,.8,.2,1) both;
}
.teacher-back { display: inline-flex; align-items: center; gap: 4px; margin-bottom: 24px; color: #8a99ab; font-size: 11px; }
.teacher-back:hover { color: #2563eb; }
.teacher-back .icon { width: 13px; height: 13px; }
.teacher-brand { display: flex; align-items: center; gap: 11px; margin-bottom: 26px; }
.teacher-brand > div, .teacher-brand > span:last-child { display: flex; flex-direction: column; line-height: 1.15; }
.teacher-brand strong { font-size: 13px; }
.teacher-brand small { color: #94a3b8; font: 500 8.5px var(--mono); letter-spacing: .14em; margin-top: 3px; }
.teacher-login-card h1 { margin: 0 0 7px; font-size: 28px; letter-spacing: -.03em; }
.teacher-login-card > p { margin: 0 0 25px; color: #64748b; font-size: 12.5px; line-height: 1.7; }
.teacher-login-card .field { margin-bottom: 15px; }
.teacher-hint { margin: 20px 0 0 !important; padding-top: 15px; border-top: 1px solid #eef2f7; color: #94a3b8 !important; font-size: 10.5px !important; line-height: 1.7 !important; }
.teacher-hint code { color: #b45309; font: 500 9.5px var(--mono); background: #fffbeb; padding: 1px 4px; border-radius: 3px; }

.teacher-app { min-height: 100dvh; }
.teacher-topbar {
  position: sticky; top: 0; z-index: 20;
  height: 62px;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 0 26px;
  background: rgba(255,255,255,.95);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(14px);
}
.teacher-top-left, .teacher-top-right { display: flex; align-items: center; gap: 10px; }
.teacher-brand.small { margin: 0; gap: 9px; }
.teacher-brand.small strong { font-size: 12.5px; }
.teacher-brand.small small { font-size: 8px; }
.teacher-top-divider { width: 1px; height: 22px; background: var(--line); margin: 0 4px; }
.teacher-context { color: #7c8b9e; font-size: 11px; }
.teacher-btn {
  display: inline-flex; align-items: center; gap: 6px;
  height: 34px; padding: 0 10px;
  border: 0; border-radius: 8px;
  background: transparent; color: #64748b;
  font-size: 11px; font-weight: 550;
}
.teacher-btn .icon { width: 14px; height: 14px; }
.teacher-btn.ghost:hover { background: #f1f5f9; color: #1e293b; }
.teacher-main { max-width: 1380px; margin: 0 auto; padding: 34px 28px 70px; }
.teacher-heading { display: flex; align-items: flex-end; justify-content: space-between; gap: 22px; margin-bottom: 24px; }
.teacher-heading h1 { margin: 8px 0 6px; font-size: 30px; letter-spacing: -.035em; }
.teacher-heading p { margin: 0; color: #7c8b9e; font-size: 12px; }
.heading-actions { display: flex; align-items: center; gap: 14px; }
.updated-at { color: #9aa8b9; font: 500 9.5px var(--mono); }
.teacher-alert {
  display: flex; align-items: flex-start; gap: 9px;
  margin-bottom: 18px; padding: 12px 14px;
  border: 1px solid #fde68a; border-radius: 10px;
  background: #fffbeb; color: #92400e; font-size: 11.5px; line-height: 1.6;
}
.teacher-alert .icon { width: 16px; height: 16px; margin-top: 1px; }
.teacher-summary { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin-bottom: 18px; }
.summary-card {
  position: relative; overflow: hidden;
  padding: 18px 18px 16px;
  border: 1px solid #e7ecf3;
  border-radius: 13px;
  background: #fff;
  box-shadow: var(--shadow-sm);
}
.summary-card::after {
  content: ""; position: absolute; right: -22px; top: -30px;
  width: 90px; height: 90px; border-radius: 50%;
  background: radial-gradient(circle, rgba(37,99,235,.08), transparent 70%);
}
.summary-label { display: flex; align-items: center; gap: 6px; color: #8795a8; font-size: 10.5px; }
.summary-label .icon { width: 13px; height: 13px; }
.summary-value { margin: 10px 0 4px; font: 700 29px/1 var(--mono); letter-spacing: -.04em; color: #0f172a; }
.summary-value small { font-size: 12px; color: #94a3b8; font-weight: 500; }
.summary-sub { color: #93a1b3; font-size: 9.5px; }
.teacher-grid { display: grid; grid-template-columns: minmax(0, 1.65fr) minmax(300px, .75fr); gap: 16px; align-items: start; }
.teacher-panel { border: 1px solid #e7ecf3; border-radius: 13px; background: #fff; box-shadow: var(--shadow-sm); overflow: hidden; }
.panel-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 17px 18px 14px; border-bottom: 1px solid #eff3f8; }
.panel-head h2 { margin: 0 0 3px; font-size: 14px; letter-spacing: -.01em; }
.panel-note { color: #93a1b3; font-size: 9.5px; }
.teacher-search { display: flex; align-items: center; gap: 7px; width: 210px; height: 33px; padding: 0 10px; border: 1px solid #e3e9f2; border-radius: 8px; background: #fbfcfe; color: #94a3b8; }
.teacher-search:focus-within { border-color: #b7cdf5; background: #fff; }
.teacher-search .icon { width: 14px; height: 14px; }
.teacher-search input { min-width: 0; width: 100%; border: 0; outline: 0; background: transparent; font-size: 10.5px; color: #334155; }
.table-wrap { overflow-x: auto; }
.teacher-table { width: 100%; border-collapse: collapse; min-width: 650px; }
.teacher-table th {
  padding: 10px 14px;
  color: #93a1b3; font-size: 9px; font-weight: 600; text-align: left;
  letter-spacing: .05em; white-space: nowrap;
  background: #fbfcfe; border-bottom: 1px solid #eff3f8;
}
.teacher-table th[data-sort] { cursor: pointer; user-select: none; }
.teacher-table th[data-sort]:hover { color: #2563eb; }
.sort-arrow { color: #2563eb; font-size: 9px; }
.teacher-table td { padding: 11px 14px; border-bottom: 1px solid #f2f5f9; color: #4d5d72; font-size: 10.5px; vertical-align: middle; }
.teacher-table tbody tr:last-child td { border-bottom: 0; }
.teacher-table tbody tr:hover { background: #fbfdff; }
.stu-cell { display: flex; align-items: center; gap: 9px; min-width: 150px; }
.stu-avatar { width: 29px; height: 29px; display: grid; place-items: center; border-radius: 50%; background: #eef6ff; color: #2563eb; font-size: 11px; font-weight: 700; flex: 0 0 auto; }
.stu-name { font-size: 11px; font-weight: 600; color: #1e293b; }
.stu-meta { margin-top: 2px; color: #9aa8b9; font: 500 8.5px var(--mono); }
.class-text { color: #7c8b9e; font-size: 9.5px; }
.solved-number { font: 700 13px var(--mono); color: #0f172a; }
.solved-number span { color: #b4c0cf; font-weight: 500; font-size: 9px; }
.attempts-cell { font: 500 10.5px var(--mono); color: #64748b; }
.time-cell { color: #93a1b3; font-size: 9.5px; white-space: nowrap; }
.progress-cell { min-width: 100px; }
.mini-progress { height: 5px; background: #eef2f8; border-radius: 3px; overflow: hidden; }
.mini-progress i { display: block; height: 100%; border-radius: 3px; background: linear-gradient(90deg, #38bdf8, #2563eb); }
.progress-text { margin-top: 4px; color: #a0adbd; font: 500 8px var(--mono); }
.status-dot { display: inline-flex; align-items: center; gap: 4px; color: #15803d; font-size: 9px; }
.status-dot::before { content: ""; width: 5px; height: 5px; border-radius: 50%; background: currentColor; }
.status-dot.idle { color: #b0bccb; }
.table-empty { padding: 30px; text-align: center; color: #a4b1c2; font-size: 11px; }
.hardest-list { padding: 9px 12px 13px; }
.hardest-item { display: flex; align-items: center; gap: 10px; padding: 10px 6px; border-bottom: 1px solid #f2f5f9; }
.hardest-item:last-child { border-bottom: 0; }
.rank { width: 20px; height: 20px; display: grid; place-items: center; border-radius: 6px; background: #f4f7fb; color: #8a99ab; font: 600 8.5px var(--mono); flex: 0 0 auto; }
.hardest-main { flex: 1; min-width: 0; }
.hardest-main strong { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 10.5px; }
.hardest-meta { margin-top: 4px; display: flex; align-items: center; gap: 7px; color: #9aa8b9; font-size: 8.5px; }
.pass-bar { width: 72px; height: 4px; border-radius: 3px; background: #eef2f8; overflow: hidden; }
.pass-bar i { display: block; height: 100%; background: #f59e0b; border-radius: 3px; }
.pass-rate { width: 38px; text-align: right; font: 600 9px var(--mono); color: #b45309; }
.teacher-toast { z-index: 80; }
@media (max-width: 1000px) {
  .teacher-grid { grid-template-columns: 1fr; }
  .teacher-summary { grid-template-columns: repeat(2, 1fr); }
  .questions-panel { order: -1; }
}
@media (max-width: 640px) {
  .teacher-topbar { padding: 0 14px; height: 56px; }
  .teacher-context, .teacher-top-divider { display: none; }
  .teacher-main { padding: 24px 14px 50px; }
  .teacher-heading { display: block; }
  .heading-actions { justify-content: space-between; margin-top: 16px; }
  .teacher-heading h1 { font-size: 25px; }
  .teacher-summary { gap: 8px; }
  .summary-card { padding: 14px; }
  .summary-value { font-size: 24px; }
  .panel-head { display: block; }
  .teacher-search { width: 100%; margin-top: 12px; }
  .teacher-btn { padding: 0 7px; }
  .teacher-btn .icon { width: 13px; height: 13px; }
  .teacher-login-card { padding: 28px 22px; }
}
