:root {
  color-scheme: dark;
  --bg: #080d16;
  --bg-2: #0d1422;
  --panel: rgba(17, 25, 39, 0.92);
  --panel-2: rgba(22, 32, 50, 0.94);
  --line: rgba(122, 159, 204, 0.22);
  --line-strong: rgba(63, 219, 255, 0.48);
  --text: #f4f8ff;
  --muted: #91a4bd;
  --brand: #17d9ff;
  --brand-2: #7b5cff;
  --gold: #ffd239;
  --green: #2be080;
  --red: #ff5b78;
  --amber: #ffad33;
  --shadow: 0 22px 70px rgba(0, 0, 0, 0.36);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(circle at 18% 0%, rgba(27, 217, 255, 0.2), transparent 28%),
    radial-gradient(circle at 90% 12%, rgba(123, 92, 255, 0.28), transparent 30%),
    linear-gradient(180deg, #080d16 0%, #0a101b 48%, #090d14 100%);
  color: var(--text);
  font-family: "Microsoft YaHei", "PingFang SC", "Segoe UI", Arial, sans-serif;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.03) 1px, transparent 1px);
  background-size: 34px 34px;
  mask-image: linear-gradient(to bottom, rgba(0, 0, 0, 0.85), transparent 78%);
}

button,
input,
select {
  font: inherit;
}

button {
  cursor: pointer;
}

.app-shell {
  min-height: 100vh;
}

.app-shell.is-locked {
  display: none;
}

.login-screen {
  min-height: 100vh;
  display: none;
  place-items: center;
  padding: 28px;
  position: relative;
  overflow: hidden;
}

.login-screen.show {
  display: grid;
}

.login-screen::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(135deg, transparent 0 56%, rgba(23, 217, 255, 0.16) 56.2%, transparent 57%),
    linear-gradient(145deg, transparent 0 68%, rgba(123, 92, 255, 0.18) 68.2%, transparent 69%),
    radial-gradient(circle at 52% 38%, rgba(23, 217, 255, 0.16), transparent 28%);
  pointer-events: none;
}

.login-card {
  width: min(430px, 100%);
  position: relative;
  z-index: 1;
  display: grid;
  gap: 18px;
  padding: 34px;
  border: 1px solid rgba(122, 159, 204, 0.28);
  border-radius: 18px;
  background:
    linear-gradient(180deg, rgba(20, 30, 46, 0.96), rgba(12, 18, 29, 0.96));
  box-shadow: 0 28px 90px rgba(0, 0, 0, 0.42), inset 0 0 34px rgba(255, 255, 255, 0.035);
}

.login-card::after {
  content: "{ }";
  position: absolute;
  right: 22px;
  top: 18px;
  color: rgba(23, 217, 255, 0.09);
  font-size: 82px;
  font-weight: 950;
  pointer-events: none;
}

.login-logo-wrap,
.login-field,
.login-button,
.login-message {
  position: relative;
  z-index: 1;
}

.login-logo-wrap {
  display: flex;
  justify-content: center;
}

.login-logo {
  width: 188px;
  height: 58px;
  object-fit: contain;
}

.login-field span {
  color: #b8c8de;
  font-weight: 900;
}

.login-field input {
  min-height: 48px;
  border-radius: 12px;
  background: rgba(5, 11, 20, 0.9);
  font-weight: 800;
}

.login-button {
  min-height: 50px;
  border: 0;
  border-radius: 12px;
  background: linear-gradient(135deg, #16d67b, #0a9dff);
  color: #06111b;
  font-size: 16px;
  font-weight: 950;
  box-shadow: 0 14px 32px rgba(23, 217, 255, 0.22);
}

.login-button:disabled {
  opacity: 0.72;
  cursor: wait;
}

.login-message {
  min-height: 20px;
  color: #ffb5c2;
  text-align: center;
  font-size: 13px;
}

.topbar {
  min-height: 70px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 0 36px;
  background: rgba(18, 25, 42, 0.92);
  border-bottom: 1px solid rgba(255, 255, 255, 0.07);
  backdrop-filter: blur(18px);
  position: sticky;
  top: 0;
  z-index: 10;
}

.brand {
  display: inline-flex;
  align-items: center;
  font-size: 24px;
  line-height: 1;
  font-weight: 950;
  letter-spacing: 0;
  color: #fff;
}

.company-logo {
  width: 178px;
  height: 54px;
  object-fit: contain;
  display: block;
}

.hero {
  position: relative;
  min-height: 260px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 280px;
  gap: 28px;
  align-items: center;
  padding: 42px clamp(22px, 5vw, 86px);
  overflow: hidden;
  background:
    linear-gradient(90deg, rgba(5, 14, 34, 0.96) 0%, rgba(10, 14, 44, 0.84) 48%, rgba(24, 16, 52, 0.82) 100%),
    radial-gradient(circle at 78% 45%, rgba(23, 217, 255, 0.35), transparent 28%);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.hero::before {
  content: "{ }";
  position: absolute;
  right: 120px;
  top: 28px;
  font-size: 150px;
  font-weight: 950;
  color: rgba(23, 217, 255, 0.08);
}

.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(135deg, transparent 0 56%, rgba(23, 217, 255, 0.18) 56.2%, transparent 57%),
    linear-gradient(145deg, transparent 0 68%, rgba(123, 92, 255, 0.22) 68.2%, transparent 69%);
}

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

.eyebrow,
.subtitle,
h1,
h2,
h3,
p {
  margin: 0;
}

.eyebrow {
  color: var(--brand);
  font-size: clamp(18px, 2.2vw, 26px);
  font-weight: 900;
  line-height: 1.2;
}

.hero-eyebrow-row {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.logout-button {
  min-height: 32px;
  padding: 6px 14px;
  border: 1px solid rgba(40, 214, 255, 0.42);
  border-radius: 999px;
  background: rgba(9, 17, 30, 0.72);
  color: #d8edff;
  font-size: 13px;
  font-weight: 900;
  cursor: pointer;
  box-shadow: 0 0 16px rgba(40, 214, 255, 0.12);
}

.logout-button:hover {
  border-color: rgba(255, 212, 50, 0.75);
  color: var(--gold);
}

h1 {
  margin-top: 10px;
  font-size: clamp(34px, 5vw, 58px);
  line-height: 1.05;
  letter-spacing: 0;
}

.hero-copy p:last-child {
  max-width: 660px;
  margin-top: 16px;
  color: #b7c7dd;
  font-size: 16px;
  line-height: 1.75;
}

.hero-card {
  min-height: 180px;
  display: grid;
  align-content: center;
  gap: 10px;
  padding: 26px;
  border: 1px solid var(--line-strong);
  border-radius: 18px;
  background: rgba(16, 24, 38, 0.62);
  box-shadow: 0 0 34px rgba(23, 217, 255, 0.16), inset 0 0 36px rgba(255, 255, 255, 0.04);
}

.hero-card span,
.hero-card small {
  color: #a9bbd3;
}

.hero-card strong {
  color: var(--gold);
  font-size: 48px;
  line-height: 1;
}

.dashboard {
  width: min(1220px, calc(100% - 36px));
  margin: 28px auto 60px;
  display: grid;
  gap: 20px;
}

.filter-panel,
.panel,
.summary-grid article {
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--panel);
  box-shadow: var(--shadow);
}

.filter-panel {
  padding: 18px 20px;
}

.filter-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(118px, 1fr));
  gap: 14px;
  align-items: end;
}

label {
  display: grid;
  gap: 8px;
  min-width: 0;
}

label span {
  color: #9db0c8;
  font-size: 12px;
  font-weight: 900;
}

.self-teacher-filter {
  min-height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 0 12px;
  border: 1px solid rgba(136, 164, 204, 0.28);
  border-radius: 9px;
  background: #0b111b;
  color: #dff8ff;
  font-size: 13px;
  font-weight: 900;
  white-space: nowrap;
}

.self-teacher-filter input {
  width: 16px;
  height: 16px;
  min-height: 16px;
  padding: 0;
  accent-color: var(--brand);
}

.self-teacher-filter label {
  display: inline;
  min-width: auto;
  cursor: pointer;
}

input,
select {
  width: 100%;
  min-height: 38px;
  border: 1px solid rgba(136, 164, 204, 0.28);
  border-radius: 9px;
  background: #0b111b;
  color: var(--text);
  padding: 0 12px;
}

input:focus,
select:focus {
  border-color: var(--brand);
  outline: none;
  box-shadow: 0 0 0 3px rgba(23, 217, 255, 0.12);
}

input[type="date"]::-webkit-calendar-picker-indicator {
  filter: invert(1);
}

.filter-actions {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
  flex-wrap: wrap;
  margin-top: 16px;
}

.active-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  min-height: 30px;
  margin-top: 12px;
}

.data-refresh-status {
  min-height: 22px;
  margin-top: 6px;
  color: #9fb2ca;
  font-size: 13px;
  font-weight: 800;
  text-align: right;
}

.filter-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 30px;
  border: 1px solid rgba(23, 217, 255, 0.36);
  border-radius: 999px;
  padding: 0 9px 0 12px;
  background: rgba(23, 217, 255, 0.08);
  color: #dff8ff;
  font-size: 12px;
}

.filter-chip button {
  width: 20px;
  height: 20px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  line-height: 1;
}

.filter-chip button:hover {
  background: var(--brand);
  color: #07111d;
}

.primary-button,
.ghost-button {
  min-height: 38px;
  border-radius: 10px;
  padding: 0 18px;
  font-weight: 900;
}

.primary-button {
  border: 0;
  background: linear-gradient(135deg, #16d67b, #0a9dff);
  color: #06111b;
  box-shadow: 0 10px 26px rgba(23, 217, 255, 0.18);
}

.ghost-button {
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.04);
  color: #cbd7e7;
}

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

.summary-grid article {
  min-height: 118px;
  padding: 24px 20px;
  box-shadow: none;
}

.summary-grid span {
  display: block;
  color: var(--muted);
  font-size: 13px;
  margin-bottom: 12px;
}

.summary-grid strong {
  display: block;
  color: var(--gold);
  font-size: 34px;
  line-height: 1.15;
}

#topWeak {
  color: #fff;
  font-size: 20px;
  overflow-wrap: anywhere;
}

.tabs {
  display: flex;
  gap: 6px;
  overflow-x: auto;
}

.tab {
  min-width: 116px;
  min-height: 44px;
  border: 1px solid var(--line);
  border-radius: 11px 11px 0 0;
  background: var(--panel);
  color: #aec0d8;
  font-weight: 900;
}

.tab.active,
.tab:hover {
  border-color: var(--gold);
  color: var(--gold);
  background: rgba(255, 210, 57, 0.08);
}

.tab-section {
  display: none;
}

.tab-section.active {
  display: block;
}

.panel {
  overflow: hidden;
}

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

.panel-head h2 {
  font-size: 19px;
}

.panel-head p {
  margin-top: 6px;
  color: var(--muted);
  font-size: 13px;
}

.detail-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  flex-wrap: wrap;
}

.student-report-button {
  min-height: 34px;
  padding: 8px 12px;
  border: 1px solid rgba(125, 234, 255, 0.38);
  border-radius: 10px;
  background: linear-gradient(135deg, rgba(31, 217, 177, 0.95), rgba(18, 160, 232, 0.95));
  color: #06111b;
  font-size: 12px;
  font-weight: 950;
  cursor: pointer;
  box-shadow: 0 10px 24px rgba(0, 187, 255, 0.16);
}

.student-report-button:hover {
  transform: translateY(-1px);
  box-shadow: 0 14px 30px rgba(0, 187, 255, 0.22);
}

.student-report-button:disabled {
  cursor: not-allowed;
  transform: none;
  border-color: rgba(136, 164, 204, 0.22);
  background: rgba(136, 164, 204, 0.16);
  color: var(--muted);
  box-shadow: none;
}

.report-note {
  max-width: 160px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.4;
}

.student-tools {
  display: grid;
  grid-template-columns: minmax(180px, 240px) minmax(150px, 180px);
  gap: 10px;
  align-items: center;
}

.list-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  padding: 18px;
}

.overview-card {
  border: 1px solid rgba(136, 164, 204, 0.22);
  border-radius: 12px;
  background: linear-gradient(180deg, rgba(20, 30, 46, 0.96), rgba(14, 21, 33, 0.96));
  padding: 18px;
}

.overview-card:hover {
  border-color: var(--brand);
  box-shadow: 0 0 0 1px rgba(23, 217, 255, 0.14), 0 18px 44px rgba(0, 0, 0, 0.24);
}

.card-top {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  align-items: flex-start;
}

.card-top h3 {
  font-size: 17px;
  line-height: 1.4;
}

.subline {
  margin-top: 6px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
}

.mini-metrics {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  margin-top: 14px;
}

.mini-metrics div,
.metric {
  border: 1px solid rgba(136, 164, 204, 0.18);
  border-radius: 10px;
  background: rgba(4, 9, 16, 0.36);
  padding: 10px;
}

.mini-metrics span,
.metric span {
  display: block;
  color: var(--muted);
  font-size: 12px;
}

.mini-metrics b,
.metric strong {
  display: block;
  margin-top: 4px;
  color: #fff;
  font-size: 18px;
}

.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 12px;
}

.tag {
  display: inline-flex;
  align-items: center;
  border: 1px solid rgba(136, 164, 204, 0.2);
  border-radius: 999px;
  padding: 5px 9px;
  background: rgba(255, 255, 255, 0.04);
  color: #dbe7f7;
  font-size: 12px;
}

.tag.weak {
  border-color: rgba(255, 91, 120, 0.42);
  background: rgba(255, 91, 120, 0.09);
  color: #ffb5c2;
}

.tag.strong {
  border-color: rgba(43, 224, 128, 0.4);
  background: rgba(43, 224, 128, 0.08);
  color: #9df7c5;
}

.tag.blue {
  border-color: rgba(23, 217, 255, 0.38);
  background: rgba(23, 217, 255, 0.08);
  color: #9fefff;
}

.risk-badge {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  border-radius: 999px;
  padding: 6px 10px;
  color: #08101a;
  font-size: 12px;
  font-weight: 900;
  line-height: 1.2;
}

.student-card .risk-badge {
  width: 68px;
  min-height: 68px;
  padding: 8px;
  border-radius: 50%;
}

.risk-high {
  background: var(--red);
}

.risk-medium {
  background: var(--amber);
}

.risk-stable {
  background: var(--green);
}

.student-workspace {
  display: grid;
  grid-template-columns: minmax(340px, 38%) minmax(0, 1fr);
  gap: 18px;
  height: min(760px, calc(100vh - 132px));
  min-height: 560px;
}

.student-panel,
.detail-panel {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  min-height: 0;
  overflow: hidden;
}

.student-list,
.detail-scroll,
.modal-body {
  overflow: auto;
}

.student-card {
  display: block;
  width: 100%;
  border: 0;
  border-bottom: 1px solid var(--line);
  background: transparent;
  color: inherit;
  text-align: left;
  padding: 15px 18px;
}

.student-card:hover,
.student-card.active {
  background: rgba(23, 217, 255, 0.08);
}

.student-card.active {
  box-shadow: inset 4px 0 0 var(--brand);
}

.student-main {
  display: flex;
  justify-content: space-between;
  gap: 12px;
}

.student-name {
  font-size: 16px;
  font-weight: 950;
}

.student-meta {
  margin-top: 6px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.6;
}

.student-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-top: 11px;
}

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

.student-stats b {
  display: block;
  color: #fff;
  font-size: 15px;
}

.empty-state,
.empty-list {
  display: grid;
  place-items: center;
  min-height: 220px;
  color: var(--muted);
  text-align: center;
  padding: 28px;
}

.detail-scroll {
  padding: 20px;
  min-height: 0;
}

.profile-title h2 {
  font-size: 26px;
}

.profile-title p {
  margin-top: 8px;
  color: var(--muted);
  line-height: 1.6;
}

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

.section-title {
  margin: 20px 0 10px;
  font-size: 16px;
}

.report-selection-summary {
  margin: -4px 0 10px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.timeline {
  display: grid;
  gap: 10px;
}

.attempt {
  border: 1px solid rgba(136, 164, 204, 0.22);
  border-radius: 12px;
  padding: 13px;
  background: rgba(4, 9, 16, 0.34);
}

.attempt.repeat-attempt {
  border-color: rgba(136, 164, 204, 0.14);
  background: rgba(4, 9, 16, 0.22);
}

.attempt.fast-repeat {
  border-color: rgba(255, 91, 120, 0.72);
  background: linear-gradient(135deg, rgba(255, 91, 120, 0.18), rgba(4, 9, 16, 0.38));
  box-shadow: inset 4px 0 0 var(--red);
}

.fast-repeat-group {
  display: grid;
  gap: 10px;
  padding: 12px;
  border: 2px solid rgba(255, 91, 120, 0.78);
  border-radius: 16px;
  background:
    linear-gradient(135deg, rgba(255, 91, 120, 0.18), rgba(13, 28, 48, 0.72)),
    rgba(10, 18, 32, 0.86);
  box-shadow: 0 0 0 1px rgba(255, 91, 120, 0.16), 0 14px 36px rgba(255, 91, 120, 0.12);
}

.fast-repeat-group-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  color: #ffe8ee;
  font-size: 13px;
  font-weight: 900;
}

.fast-repeat-group-head span {
  color: #ffb8c6;
  font-size: 12px;
}

.fast-repeat-group-body {
  display: grid;
  gap: 10px;
}

.fast-repeat-group .attempt {
  border-color: rgba(255, 91, 120, 0.66);
  background: rgba(48, 13, 25, 0.38);
}

.attempt-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
}

.attempt-head > div:first-child {
  min-width: 0;
}

.attempt-title {
  font-weight: 950;
  line-height: 1.45;
}

.attempt-title-row,
.attempt-title-block {
  display: flex;
  align-items: stretch;
  gap: 12px;
  min-width: 0;
}

.attempt-title-content {
  min-width: 0;
}

.attempt-title-link {
  display: inline-flex;
  min-width: 0;
  color: #eef7ff;
  text-decoration: none;
  overflow-wrap: anywhere;
}

.attempt-title-link:hover {
  color: var(--cyan);
  text-decoration: underline;
  text-underline-offset: 4px;
}

.paper-search-hint {
  margin-top: 4px;
  color: rgba(125, 234, 255, 0.78);
  font-size: 12px;
  line-height: 1.45;
}

.attempt-score {
  flex: 0 0 auto;
  min-width: 58px;
  text-align: center;
  color: #06111b;
  background: var(--gold);
  border-radius: 9px;
  padding: 6px 8px;
  font-weight: 950;
}

.attempt-score-wrap {
  flex: 0 0 auto;
  display: grid;
  justify-items: end;
  gap: 6px;
}

.attempt-status {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 24px;
  padding: 4px 8px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 900;
  line-height: 1.2;
  text-align: center;
  white-space: nowrap;
}

.attempt-status.effective {
  color: #9df7c5;
  border: 1px solid rgba(43, 224, 128, 0.36);
  background: rgba(43, 224, 128, 0.08);
}

.attempt-status.repeat {
  color: var(--muted);
  border: 1px solid rgba(136, 164, 204, 0.24);
  background: rgba(136, 164, 204, 0.08);
}

.attempt-status.fast {
  color: #ffe8ee;
  border: 1px solid rgba(255, 91, 120, 0.58);
  background: rgba(255, 91, 120, 0.28);
}

.attempt-report-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  flex: 0 0 auto;
  min-height: 26px;
  align-self: stretch;
  padding: 6px 10px;
  border: 1px solid rgba(125, 234, 255, 0.28);
  border-radius: 8px;
  background: rgba(125, 234, 255, 0.06);
  color: #b8cbe3;
  font-size: 11px;
  font-weight: 900;
  line-height: 1.2;
  white-space: nowrap;
  cursor: pointer;
  transition: border-color .16s ease, background .16s ease, color .16s ease;
}

.attempt-report-toggle:hover {
  border-color: rgba(125, 234, 255, 0.62);
  background: rgba(125, 234, 255, 0.12);
  color: #eaf8ff;
}

.attempt-report-toggle.checked {
  color: #9df7c5;
  border-color: rgba(43, 224, 128, 0.46);
  background: rgba(43, 224, 128, 0.1);
}

.attempt-report-toggle input {
  width: 13px;
  height: 13px;
  margin: 0;
  accent-color: var(--green);
}

.attempt-report-toggle:has(input:disabled) {
  opacity: 0.45;
}

.analysis-alert {
  margin: 18px 0 4px;
  padding: 12px 14px;
  border: 1px solid rgba(255, 91, 120, 0.42);
  border-radius: 12px;
  background: rgba(255, 91, 120, 0.1);
  color: #ffcfda;
  font-size: 13px;
  line-height: 1.6;
}

.attempt-meta {
  margin: 8px 0 11px;
  color: var(--muted);
  font-size: 12px;
}

.attempt-copy-panel {
  display: grid;
  gap: 8px;
  margin: 0 0 12px;
  padding: 10px;
  border: 1px solid rgba(125, 234, 255, 0.22);
  border-radius: 12px;
  background: rgba(4, 16, 30, 0.42);
}

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

.copy-label {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.copy-value {
  min-width: 0;
  color: #e8f4ff;
  font-size: 12px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.copy-button {
  min-height: 28px;
  padding: 5px 10px;
  border: 1px solid rgba(125, 234, 255, 0.34);
  border-radius: 8px;
  background: rgba(0, 187, 255, 0.1);
  color: var(--cyan);
  font-size: 12px;
  font-weight: 900;
  cursor: pointer;
}

.copy-button:hover {
  border-color: rgba(125, 234, 255, 0.78);
  background: rgba(0, 187, 255, 0.18);
}

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

.knowledge-box {
  border: 1px solid rgba(136, 164, 204, 0.18);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.03);
  padding: 10px;
  min-width: 0;
}

.knowledge-box b {
  display: block;
  margin-bottom: 5px;
  font-size: 13px;
}

.knowledge-box p {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.6;
  overflow-wrap: anywhere;
}

.modal-overlay {
  position: fixed;
  inset: 0;
  display: none;
  align-items: flex-start;
  justify-content: center;
  padding: 28px;
  background: rgba(0, 0, 0, 0.62);
  z-index: 20;
}

.modal-overlay.show {
  display: flex;
}

.modal {
  width: min(860px, 100%);
  max-height: calc(100vh - 56px);
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  background: #111827;
  border: 1px solid var(--line);
  border-radius: 14px;
  box-shadow: var(--shadow);
  overflow: hidden;
}

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

.modal-head button {
  border: 0;
  background: transparent;
  color: var(--muted);
  font-size: 26px;
}

.modal-body {
  padding: 16px;
}

.toast {
  position: fixed;
  right: 18px;
  bottom: 18px;
  max-width: 420px;
  display: none;
  border: 1px solid var(--line-strong);
  border-radius: 10px;
  padding: 12px 14px;
  background: #101827;
  color: #fff;
  box-shadow: var(--shadow);
  z-index: 30;
}

.toast.show {
  display: block;
}

@media (max-width: 1100px) {
  .filter-grid,
  .summary-grid,
  .list-grid,
  .student-workspace {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 760px) {
  .topbar {
    min-height: 58px;
    padding: 16px;
  }

  .brand {
    font-size: 20px;
  }

  .company-logo {
    width: 128px;
    height: 42px;
  }

  .hero,
  .filter-grid,
  .summary-grid,
  .list-grid,
  .student-workspace,
  .student-tools,
  .metric-row,
  .knowledge-columns {
    grid-template-columns: 1fr;
  }

  .hero {
    min-height: auto;
  }

  .student-workspace {
    height: auto;
    min-height: 0;
  }

  .student-panel,
  .detail-panel {
    overflow: hidden;
  }

  .student-list,
  .detail-scroll {
    max-height: 620px;
  }

  .filter-actions {
    justify-content: stretch;
  }

  .filter-actions button {
    flex: 1;
  }

  .attempt-head {
    align-items: flex-start;
  }

  .copy-field {
    grid-template-columns: 1fr auto;
  }

  .copy-label {
    grid-column: 1 / -1;
  }
}
