:root {
  --bg: #f4f7fb;
  --bg-accent: #e9eff9;
  --surface: rgba(255, 255, 255, 0.92);
  --surface-solid: #ffffff;
  --text: #162033;
  --muted: #667085;
  --line: #dfe6f0;
  --primary: #2563eb;
  --primary-dark: #1d4ed8;
  --primary-soft: #eaf1ff;
  --success: #087a55;
  --success-soft: #e9f9f1;
  --warning: #b45309;
  --warning-soft: #fff6e7;
  --danger: #c2413b;
  --danger-soft: #fff0ef;
  --shadow: 0 24px 70px rgba(26, 46, 82, 0.12);
  --radius-xl: 28px;
  --radius-lg: 20px;
  --radius-md: 14px;
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
}

body {
  min-height: 100vh;
  margin: 0;
  color: var(--text);
  background:
    radial-gradient(circle at top left, rgba(37, 99, 235, 0.11), transparent 36rem),
    radial-gradient(circle at bottom right, rgba(8, 122, 85, 0.08), transparent 34rem),
    linear-gradient(145deg, var(--bg), var(--bg-accent));
  font-family: "Microsoft YaHei", "PingFang SC", "Segoe UI", system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
}

button,
input {
  font: inherit;
}

button {
  cursor: pointer;
}

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

.hidden {
  display: none !important;
}

.page-shell {
  width: min(1180px, calc(100% - 32px));
  min-height: 100vh;
  margin: 0 auto;
  padding: 24px 0 18px;
  display: flex;
  flex-direction: column;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 4px 4px 22px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
}

.brand-mark {
  display: grid;
  width: 44px;
  height: 44px;
  place-items: center;
  border-radius: 14px;
  color: #fff;
  background: linear-gradient(145deg, #3b82f6, #1d4ed8);
  box-shadow: 0 10px 24px rgba(37, 99, 235, 0.25);
  font-weight: 800;
  font-size: 18px;
}

.brand strong,
.brand small {
  display: block;
}

.brand strong {
  font-size: 16px;
  letter-spacing: 0.02em;
}

.brand small {
  margin-top: 2px;
  color: var(--muted);
  font-size: 12px;
}

main {
  flex: 1;
  display: flex;
}

.view {
  width: 100%;
}

.text-button {
  border: 0;
  padding: 8px 4px;
  color: var(--muted);
  background: transparent;
  font-size: 14px;
  font-weight: 600;
  text-decoration: underline;
  text-decoration-color: transparent;
  text-underline-offset: 4px;
  transition: color 160ms ease, text-decoration-color 160ms ease;
}

.text-button:hover {
  color: var(--primary);
  text-decoration-color: currentColor;
}

.danger-text:hover {
  color: var(--danger);
}

.panel,
.student-card {
  border: 1px solid rgba(218, 227, 240, 0.9);
  border-radius: var(--radius-xl);
  background: var(--surface);
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
}

.loading-panel {
  width: min(520px, 100%);
  min-height: 260px;
  margin: auto;
  display: grid;
  place-content: center;
  justify-items: center;
  gap: 16px;
  color: var(--muted);
  font-size: 14px;
}

.spinner {
  width: 30px;
  height: 30px;
  border: 3px solid #dce7f8;
  border-top-color: var(--primary);
  border-radius: 999px;
  animation: spin 850ms linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

.register-panel {
  width: min(480px, 100%);
  margin: auto;
  padding: clamp(28px, 5vw, 48px);
}

.eyebrow {
  margin: 0 0 9px;
  color: var(--primary);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

h1,
h2,
p {
  overflow-wrap: anywhere;
}

h1 {
  margin: 0;
  font-size: clamp(28px, 4vw, 40px);
  line-height: 1.16;
  letter-spacing: -0.035em;
}

h2 {
  margin: 0;
  font-size: 20px;
  letter-spacing: -0.02em;
}

.muted {
  color: var(--muted);
  line-height: 1.7;
}

form label {
  display: block;
  margin: 24px 0 8px;
  font-size: 13px;
  font-weight: 700;
}

input {
  width: 100%;
  min-height: 52px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  padding: 12px 15px;
  color: var(--text);
  background: var(--surface-solid);
  outline: none;
  transition: border-color 160ms ease, box-shadow 160ms ease;
}

input:focus {
  border-color: rgba(37, 99, 235, 0.72);
  box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.12);
}

.field-hint {
  margin: 9px 0 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
}

.primary-button,
.secondary-button,
.danger-button {
  min-height: 48px;
  border-radius: var(--radius-md);
  padding: 12px 20px;
  border: 1px solid transparent;
  font-weight: 800;
  transition: transform 140ms ease, box-shadow 140ms ease, background 140ms ease, border-color 140ms ease;
}

.primary-button {
  color: #fff;
  background: linear-gradient(145deg, #3b82f6, var(--primary-dark));
  box-shadow: 0 10px 22px rgba(37, 99, 235, 0.22);
}

.primary-button:hover:not(:disabled) {
  transform: translateY(-1px);
  box-shadow: 0 14px 28px rgba(37, 99, 235, 0.28);
}

.secondary-button {
  border-color: var(--line);
  color: var(--text);
  background: var(--surface-solid);
}

.secondary-button:hover:not(:disabled) {
  border-color: #b8c8df;
  background: #f8fbff;
}

.danger-button {
  color: #fff;
  background: var(--danger);
  box-shadow: 0 10px 22px rgba(194, 65, 59, 0.2);
}

.danger-button:hover:not(:disabled) {
  background: #a93631;
}

.full-width {
  width: 100%;
  margin-top: 24px;
}

.student-card {
  width: min(640px, 100%);
  margin: auto;
  padding: clamp(26px, 5vw, 46px);
}

.identity-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  padding-bottom: 24px;
  border-bottom: 1px solid var(--line);
}

.identity-name {
  font-size: 26px;
  font-weight: 850;
  letter-spacing: -0.03em;
}

.identity-tools {
  display: flex;
  flex: none;
  align-items: flex-end;
  flex-direction: column;
  gap: 8px;
}

.compact-text {
  padding: 2px 0;
  font-size: 12px;
  font-weight: 600;
}

.security-warning {
  margin: 0 0 18px;
  border: 1px solid #f0d39a;
  border-radius: 12px;
  padding: 11px 13px;
  color: #7c4a05;
  background: #fff8e8;
  font-size: 12px;
  line-height: 1.65;
}

.device-chip {
  flex: none;
  border: 1px solid #d9e5f7;
  border-radius: 999px;
  padding: 7px 11px;
  color: #476184;
  background: #f7faff;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.06em;
}

.round-block {
  padding: 30px 0 24px;
}

.round-block h1 {
  font-size: clamp(26px, 4vw, 34px);
}

.completion-state {
  display: flex;
  align-items: center;
  gap: 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 18px;
  background: #fbfcfe;
}

.completion-state.pending {
  border-color: #eadcc7;
  background: var(--warning-soft);
}

.completion-state.completed {
  border-color: #bcebd8;
  background: var(--success-soft);
}

.state-icon {
  display: grid;
  width: 40px;
  height: 40px;
  flex: none;
  place-items: center;
  border-radius: 999px;
  font-size: 23px;
  font-weight: 700;
}

.pending .state-icon {
  color: var(--warning);
  background: #fff0d2;
}

.completed .state-icon {
  color: var(--success);
  background: #cff3e3;
}

.completion-state strong {
  display: block;
  font-size: 16px;
}

.completion-state p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 13px;
}

.student-actions {
  display: grid;
  gap: 10px;
  margin-top: 20px;
}

.action-button {
  min-height: 64px;
  font-size: 18px;
}

.fine-print {
  margin: 16px 0 0;
  color: var(--muted);
  font-size: 12px;
  text-align: center;
}

.teacher-view {
  padding-top: 6px;
}

.teacher-toolbar,
.section-heading,
.progress-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.teacher-toolbar {
  margin-bottom: 22px;
}

.toolbar-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.stats-grid {
  display: grid;
  grid-template-columns: minmax(200px, 1.3fr) repeat(3, minmax(120px, 0.5fr));
  gap: 14px;
}

.stat-card {
  min-height: 126px;
  border: 1px solid rgba(218, 227, 240, 0.9);
  border-radius: var(--radius-lg);
  padding: 20px;
  background: var(--surface);
  box-shadow: 0 12px 32px rgba(26, 46, 82, 0.07);
}

.stat-card span {
  display: block;
  margin-bottom: 14px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.stat-card strong {
  display: block;
  font-size: 25px;
  line-height: 1.2;
  letter-spacing: -0.03em;
}

.stat-card.accent {
  color: #fff;
  background: linear-gradient(145deg, #138263, #087a55);
  border-color: transparent;
}

.stat-card.accent span {
  color: rgba(255, 255, 255, 0.72);
}

.stat-card.accent strong {
  font-size: 36px;
}

.stat-card.muted-card {
  background: #f8fafc;
}

.stat-hint {
  display: block;
  margin-top: 8px;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.4;
}

.offline-section {
  margin-top: 18px;
  border-top: 1px solid var(--line);
  padding-top: 16px;
}

.offline-section summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  cursor: pointer;
  color: #53647d;
  font-size: 13px;
  font-weight: 800;
  list-style: none;
}

.offline-section summary::-webkit-details-marker {
  display: none;
}

.offline-section summary::before {
  content: "▸";
  margin-right: 4px;
  color: #8391a8;
  transition: transform 150ms ease;
}

.offline-section[open] summary::before {
  transform: rotate(90deg);
}

.summary-count {
  margin-left: auto;
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
}

.offline-table-wrap {
  margin-top: 14px;
}

.offline-row {
  color: #64748b;
}

.status-stack {
  display: flex;
  align-items: center;
  gap: 7px;
}

.presence-pill {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 5px 9px;
  font-size: 11px;
  font-weight: 800;
}

.presence-pill.online {
  color: #087a55;
  background: #e9f9f1;
}

.presence-pill.offline {
  color: #667085;
  background: #f0f3f7;
}

.presence-pill.absent {
  color: #8a5a12;
  background: #fff6e7;
}

.presence-time {
  display: block;
  margin-top: 3px;
  color: #98a2b3;
  font-size: 10px;
  white-space: nowrap;
}

.progress-wrap {
  margin-top: 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 16px 18px;
  background: var(--surface);
}

.progress-meta {
  margin-bottom: 10px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.progress-track {
  height: 9px;
  overflow: hidden;
  border-radius: 999px;
  background: #e8eef7;
}

.progress-bar {
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #34b98d, #087a55);
  transition: width 300ms ease;
}

.dashboard-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.7fr) minmax(280px, 0.8fr);
  gap: 16px;
  margin-top: 16px;
}

.table-panel,
.activity-panel {
  padding: 22px;
  border-radius: var(--radius-lg);
}

.section-heading {
  margin-bottom: 18px;
}

.live-indicator {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: var(--muted);
  font-size: 12px;
}

.live-indicator::before {
  width: 7px;
  height: 7px;
  border-radius: 999px;
  background: #16a36f;
  content: "";
  box-shadow: 0 0 0 4px rgba(22, 163, 111, 0.12);
}

.table-scroll {
  overflow-x: auto;
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

th,
td {
  padding: 14px 12px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  white-space: nowrap;
}

th {
  color: var(--muted);
  font-size: 11px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

tbody tr:last-child td {
  border-bottom: 0;
}

.student-name {
  font-weight: 800;
}

.code-cell {
  color: #536a8c;
  font-family: Consolas, "Courier New", monospace;
  font-size: 12px;
  font-weight: 700;
}

.status-pill {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 5px 9px;
  font-size: 11px;
  font-weight: 800;
}

.status-pill.completed {
  color: var(--success);
  background: var(--success-soft);
}

.status-pill.pending {
  color: var(--warning);
  background: var(--warning-soft);
}

.align-right {
  text-align: right;
}

.small-button {
  border: 1px solid #ebc7c4;
  border-radius: 10px;
  padding: 7px 10px;
  color: var(--danger);
  background: #fffafa;
  font-size: 12px;
  font-weight: 700;
}

.small-button:disabled {
  border-color: var(--line);
  color: #98a2b3;
  background: #f8fafc;
}

.empty-state {
  margin: 20px 0 4px;
  color: var(--muted);
  font-size: 13px;
  text-align: center;
}

.activity-list {
  max-height: 475px;
  margin: 0;
  padding: 0;
  overflow: auto;
  list-style: none;
}

.activity-list li {
  position: relative;
  padding: 0 0 18px 20px;
  border-left: 1px solid var(--line);
}

.activity-list li:last-child {
  padding-bottom: 0;
  border-left-color: transparent;
}

.activity-list li::before {
  position: absolute;
  top: 3px;
  left: -4px;
  width: 7px;
  height: 7px;
  border: 2px solid var(--surface-solid);
  border-radius: 999px;
  background: var(--primary);
  content: "";
  box-shadow: 0 0 0 1px #b9cdf0;
}

.activity-text {
  margin: 0;
  font-size: 13px;
  line-height: 1.55;
}

.activity-time {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 11px;
}

.footer {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 20px 4px 0;
  color: var(--muted);
  font-size: 11px;
}

.modal {
  width: min(440px, calc(100% - 32px));
  border: 0;
  border-radius: 22px;
  padding: 0;
  color: var(--text);
  background: transparent;
  box-shadow: none;
}

.modal::backdrop {
  background: rgba(15, 23, 42, 0.4);
  backdrop-filter: blur(5px);
}

.modal-card {
  margin: 0;
  border: 1px solid rgba(218, 227, 240, 0.9);
  border-radius: 22px;
  padding: 26px;
  background: var(--surface-solid);
  box-shadow: 0 30px 80px rgba(15, 23, 42, 0.24);
}

.modal-heading {
  margin-bottom: 20px;
}

.modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 24px;
}

.confirm-message {
  margin: 0;
  color: #475467;
  line-height: 1.75;
}

.form-error {
  margin: 10px 0 0;
  color: var(--danger);
  font-size: 13px;
}

.toast {
  position: fixed;
  z-index: 20;
  right: 24px;
  bottom: 24px;
  max-width: min(360px, calc(100% - 48px));
  border: 1px solid #cbd8eb;
  border-radius: 14px;
  padding: 12px 16px;
  color: #fff;
  background: #1f2f49;
  box-shadow: 0 18px 40px rgba(15, 23, 42, 0.25);
  font-size: 13px;
  line-height: 1.5;
  animation: toast-in 180ms ease-out;
}

.toast.error {
  background: #9f2f2b;
}

@keyframes toast-in {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

@media (max-width: 840px) {
  .page-shell {
    width: min(100% - 20px, 720px);
    padding-top: 14px;
  }

  .topbar {
    padding-bottom: 14px;
  }

  .stats-grid,
  .dashboard-grid {
    grid-template-columns: 1fr;
  }

  .stats-grid {
    grid-template-columns: 1fr 1fr;
  }

  .stat-card:first-child {
    grid-column: 1 / -1;
  }

  .teacher-toolbar {
    align-items: flex-start;
    flex-direction: column;
  }

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

@media (max-width: 520px) {
  .page-shell {
    width: min(100% - 14px, 480px);
  }

  .register-panel,
  .student-card {
    padding: 24px 20px;
    border-radius: 22px;
  }

  .identity-row {
    align-items: flex-start;
    flex-direction: column;
  }

  .stats-grid {
    grid-template-columns: 1fr;
  }

  .stat-card:first-child {
    grid-column: auto;
  }

  .toolbar-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .activity-panel,
  .table-panel {
    padding: 18px;
  }

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

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
/* ===== v0.5 visual refresh ===== */
:root {
  --bg: #f3f6fb;
  --bg-accent: #e9eff8;
  --text: #111b2d;
  --muted: #6b778c;
  --line: #dde5f0;
  --primary: #315cf4;
  --primary-dark: #2447cf;
  --primary-soft: #edf2ff;
  --success: #087a55;
  --success-soft: #e8f9f1;
  --warning: #b45309;
  --warning-soft: #fff7e8;
  --danger: #bf413b;
  --danger-soft: #fff1f0;
  --shadow: 0 28px 80px rgba(22, 42, 76, 0.13);
  --shadow-soft: 0 14px 36px rgba(25, 45, 82, 0.08);
}

body {
  position: relative;
  background:
    radial-gradient(circle at 12% 8%, rgba(55, 104, 245, 0.12), transparent 30rem),
    radial-gradient(circle at 88% 22%, rgba(28, 161, 126, 0.09), transparent 28rem),
    linear-gradient(145deg, #f7f9fd 0%, #eef3fa 100%);
}

.ambient-background {
  position: fixed;
  inset: 0;
  z-index: -1;
  overflow: hidden;
  pointer-events: none;
}

.ambient-orb {
  position: absolute;
  display: block;
  border-radius: 999px;
  filter: blur(2px);
  opacity: 0.72;
}

.ambient-orb-one {
  top: -8rem;
  right: -7rem;
  width: 28rem;
  height: 28rem;
  background: radial-gradient(circle at 35% 35%, rgba(85, 126, 255, 0.22), rgba(55, 104, 245, 0.02) 68%);
}

.ambient-orb-two {
  bottom: -12rem;
  left: -9rem;
  width: 32rem;
  height: 32rem;
  background: radial-gradient(circle at 60% 40%, rgba(24, 166, 128, 0.16), rgba(24, 166, 128, 0.01) 70%);
}

.ambient-grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(74, 102, 150, 0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(74, 102, 150, 0.04) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: radial-gradient(circle at center, black 0%, transparent 72%);
}

.page-shell {
  width: min(1240px, calc(100% - 40px));
  padding: 22px 0 20px;
}

.topbar {
  position: relative;
  z-index: 2;
  margin-bottom: 22px;
  border: 1px solid rgba(255, 255, 255, 0.78);
  border-radius: 22px;
  padding: 11px 13px 11px 14px;
  background: rgba(255, 255, 255, 0.76);
  box-shadow: 0 14px 36px rgba(30, 50, 90, 0.07);
  backdrop-filter: blur(22px);
}

.brand {
  gap: 11px;
}

.brand-mark {
  position: relative;
  width: 42px;
  height: 42px;
  border-radius: 13px;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.2), transparent 45%),
    linear-gradient(145deg, #4c7bff, #2447cf);
  box-shadow:
    0 10px 24px rgba(49, 92, 244, 0.28),
    inset 0 1px 0 rgba(255, 255, 255, 0.3);
  font-size: 17px;
}

.brand-mark::after {
  position: absolute;
  inset: -6px;
  border-radius: 18px;
  border: 1px solid rgba(49, 92, 244, 0.12);
  content: "";
}

.brand-copy strong {
  font-size: 15px;
  letter-spacing: 0.03em;
}

.brand-copy small {
  margin-top: 3px;
  font-size: 11px;
  letter-spacing: 0.05em;
}

.version-pill {
  margin-left: 4px;
  border: 1px solid #dce5f6;
  border-radius: 999px;
  padding: 4px 8px;
  color: #60708a;
  background: #f5f8fe;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.05em;
}

.teacher-entry {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  min-height: 40px;
  border: 1px solid #e0e7f2;
  border-radius: 999px;
  padding: 8px 10px 8px 15px;
  color: #394860;
  background: #fff;
  box-shadow: 0 6px 18px rgba(31, 50, 86, 0.06);
  font-size: 12px;
  font-weight: 800;
  transition: transform 150ms ease, border-color 150ms ease, box-shadow 150ms ease;
}

.teacher-entry:hover {
  transform: translateY(-1px);
  border-color: #bccce6;
  box-shadow: 0 10px 24px rgba(31, 50, 86, 0.1);
}

.entry-arrow {
  display: grid;
  width: 24px;
  height: 24px;
  place-items: center;
  border-radius: 999px;
  color: var(--primary);
  background: var(--primary-soft);
  font-size: 13px;
}

.register-panel {
  position: relative;
  width: min(510px, 100%);
  overflow: hidden;
  padding: clamp(30px, 5vw, 50px);
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.97), rgba(249, 251, 255, 0.94));
}

.register-panel::before {
  position: absolute;
  top: -7rem;
  right: -6rem;
  width: 18rem;
  height: 18rem;
  border-radius: 999px;
  background: radial-gradient(circle, rgba(49, 92, 244, 0.14), transparent 68%);
  content: "";
  pointer-events: none;
}

.register-topline {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.step-badge {
  border: 1px solid #dfe8f7;
  border-radius: 999px;
  padding: 5px 9px;
  color: #6b7c96;
  background: #f8faff;
  font-size: 10px;
  font-weight: 700;
}

.register-panel h1 {
  margin-top: 20px;
  font-size: clamp(38px, 5vw, 52px);
  line-height: 1.08;
  letter-spacing: -0.055em;
}

.register-lead {
  max-width: 34ch;
  margin: 16px 0 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.75;
}

.register-panel form label {
  margin-top: 30px;
}

.register-panel input {
  min-height: 56px;
  border-radius: 16px;
  padding: 14px 17px;
  background: #fbfcff;
}

.student-card {
  position: relative;
  width: min(680px, 100%);
  overflow: hidden;
  padding: clamp(28px, 5vw, 48px);
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.98), rgba(248, 250, 255, 0.94));
}

.student-card-accent {
  position: absolute;
  top: -9rem;
  right: -7rem;
  width: 24rem;
  height: 24rem;
  border-radius: 999px;
  background:
    radial-gradient(circle at 40% 45%, rgba(71, 116, 255, 0.16), transparent 62%),
    radial-gradient(circle at 70% 75%, rgba(22, 166, 128, 0.1), transparent 58%);
  pointer-events: none;
}

.identity-row {
  position: relative;
  z-index: 1;
  align-items: center;
  padding-bottom: 26px;
}

.identity-main {
  display: flex;
  align-items: center;
  gap: 14px;
}

.identity-avatar {
  display: grid;
  width: 54px;
  height: 54px;
  flex: none;
  place-items: center;
  border: 1px solid rgba(49, 92, 244, 0.16);
  border-radius: 18px;
  color: var(--primary-dark);
  background: linear-gradient(145deg, #eef3ff, #dfe9ff);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.8);
  font-size: 23px;
  font-weight: 900;
}

.identity-name {
  margin-top: 2px;
  font-size: clamp(25px, 4vw, 32px);
}

.device-chip {
  border-color: #dce6f7;
  background: rgba(247, 250, 255, 0.86);
  letter-spacing: 0.08em;
}

.round-block {
  position: relative;
  z-index: 1;
  padding: 28px 0 24px;
}

.round-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
}

.round-heading h1 {
  max-width: 15ch;
  margin-top: 3px;
  font-size: clamp(30px, 4vw, 42px);
  line-height: 1.12;
}

.sync-pill {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  flex: none;
  margin-top: 3px;
  border: 1px solid #dce9e5;
  border-radius: 999px;
  padding: 6px 9px;
  color: #36705e;
  background: #f2fbf7;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.03em;
}

.sync-dot {
  width: 6px;
  height: 6px;
  border-radius: 999px;
  background: #16a36f;
  box-shadow: 0 0 0 4px rgba(22, 163, 111, 0.1);
  animation: pulse-dot 1.8s ease-in-out infinite;
}

@keyframes pulse-dot {
  50% { opacity: 0.55; transform: scale(0.86); }
}

.completion-state {
  position: relative;
  z-index: 1;
  border-radius: 20px;
  padding: 19px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.7);
}

.completion-state.pending {
  background: linear-gradient(145deg, #fffaf0, #fff3dd);
}

.completion-state.completed {
  background: linear-gradient(145deg, #effbf5, #dff7ec);
}

.state-icon {
  width: 44px;
  height: 44px;
}

.student-actions {
  position: relative;
  z-index: 1;
}

.primary-button {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.15), transparent 55%),
    linear-gradient(145deg, #4c77ff, #2447cf);
  box-shadow:
    0 14px 28px rgba(49, 92, 244, 0.24),
    inset 0 1px 0 rgba(255, 255, 255, 0.24);
}

.action-button {
  min-height: 66px;
  border-radius: 18px;
  letter-spacing: 0.01em;
}

.teacher-heading-group h1 {
  font-size: clamp(34px, 4vw, 46px);
}

.teacher-subtitle {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 12px;
}

.stats-grid {
  gap: 15px;
}

.stat-card {
  position: relative;
  overflow: hidden;
  border-color: rgba(218, 228, 242, 0.88);
  background: rgba(255, 255, 255, 0.9);
  box-shadow: 0 12px 30px rgba(26, 46, 82, 0.06);
}

.stat-card::after {
  position: absolute;
  right: -2.5rem;
  bottom: -4rem;
  width: 9rem;
  height: 9rem;
  border-radius: 999px;
  background: rgba(49, 92, 244, 0.04);
  content: "";
}

.stat-label-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 15px;
}

.stat-label-row span:first-child {
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.03em;
}

.stat-glyph {
  display: grid;
  width: 26px;
  height: 26px;
  place-items: center;
  border-radius: 9px;
  color: #5d74a0;
  background: #f1f5fc;
  font-size: 12px;
  font-weight: 800;
}

.stat-task {
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.96), rgba(246, 249, 255, 0.95));
}

.stat-task strong {
  max-width: 16ch;
  font-size: clamp(23px, 2.8vw, 30px);
}

.stat-card.accent {
  background:
    radial-gradient(circle at 85% 12%, rgba(255, 255, 255, 0.18), transparent 7rem),
    linear-gradient(145deg, #119b74, #087552);
  box-shadow: 0 16px 34px rgba(8, 122, 85, 0.18);
}

.stat-card.accent .stat-label-row span:first-child {
  color: rgba(255, 255, 255, 0.82);
}

.stat-card.accent .stat-glyph {
  color: #fff;
  background: rgba(255, 255, 255, 0.13);
}

.stat-card.muted-card {
  background: linear-gradient(145deg, #fbfcfe, #f4f7fb);
}

.table-panel,
.activity-panel {
  background: rgba(255, 255, 255, 0.9);
  box-shadow: 0 16px 40px rgba(25, 45, 82, 0.07);
}

.table-name-wrap {
  display: flex;
  align-items: center;
  gap: 10px;
}

.table-avatar {
  display: grid;
  width: 30px;
  height: 30px;
  flex: none;
  place-items: center;
  border: 1px solid #dce7f8;
  border-radius: 10px;
  color: #4766a2;
  background: linear-gradient(145deg, #f2f6ff, #e7eeff);
  font-size: 12px;
  font-weight: 900;
}

.student-name {
  font-weight: 800;
}

.student-name > .table-name-wrap > span:last-child {
  overflow: hidden;
  max-width: 13ch;
  text-overflow: ellipsis;
}

.table-scroll table {
  font-size: 12px;
}

.table-scroll th {
  padding-top: 9px;
  padding-bottom: 11px;
}

.table-scroll td {
  padding-top: 15px;
  padding-bottom: 15px;
}

.studentTableBody tr,
#offlineTableBody tr {
  transition: background 140ms ease;
}

#offlineTableBody tr:hover {
  background: #fbfcfe;
}

.offline-section summary {
  border-radius: 12px;
  padding: 8px 10px;
  transition: background 140ms ease;
}

.offline-section summary:hover {
  background: #f7f9fd;
}

.presence-pill,
.status-pill {
  letter-spacing: 0.01em;
}

.activity-list li::before {
  background: #4b73f8;
}

.modal-card {
  border-radius: 24px;
  box-shadow: 0 34px 90px rgba(15, 23, 42, 0.26);
}

.modal-heading h2 {
  font-size: 24px;
}

.footer {
  padding-top: 18px;
}

@media (max-width: 840px) {
  .page-shell {
    width: min(100% - 22px, 760px);
  }

  .topbar {
    margin-bottom: 16px;
  }

  .version-pill {
    display: none;
  }

  .round-heading {
    align-items: flex-start;
    flex-direction: column;
    gap: 12px;
  }

  .sync-pill {
    margin-top: 0;
  }
}

@media (max-width: 520px) {
  .page-shell {
    width: min(100% - 14px, 480px);
    padding-top: 10px;
  }

  .topbar {
    border-radius: 18px;
    padding: 9px 10px;
  }

  .brand-mark {
    width: 38px;
    height: 38px;
  }

  .teacher-entry {
    padding-left: 12px;
  }

  .identity-main {
    align-items: flex-start;
  }

  .identity-avatar {
    width: 46px;
    height: 46px;
    border-radius: 15px;
    font-size: 20px;
  }

  .round-heading h1 {
    max-width: none;
  }

  .stat-card {
    min-height: 112px;
  }

  .stat-glyph {
    display: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  .sync-dot {
    animation: none;
  }
}