:root {
  --app-page-bg: #F5F7FB;
  --app-page-gradient-start: #F7FAFF;
  --app-page-gradient-end: #EEF4FB;
  --app-primary: #2563EB;
  --app-primary-hover: #1D4ED8;
  --app-secondary: #3B82F6;
  --app-tag-bg: #E8F1FF;
  --app-btn-hover-bg: #EFF6FF;
  --app-title: #1F2937;
  --app-body: #374151;
  --app-muted: #6B7280;
  --app-hint: #9CA3AF;
  --app-bg: #F4F7FC;
  --card-bg-solid: #ffffff;
  --card-bg: #ffffff;
  --card-border: rgba(148, 163, 184, 0.22);
  --shadow: 0 8px 32px rgba(15, 23, 42, 0.06);
  --card-radius: 20px;
  --app-header-height: 80px;
  /* —— ZK Design System (Card System) —— */
  --zk-primary: #2563EB;
  --zk-primary-dark: #1D4ED8;
  --zk-primary-light: #DBEAFE;
  --zk-cyan: #38BDF8;

  --zk-text-main: #0F172A;
  --zk-text-secondary: #475569;
  --zk-text-muted: #64748B;

  --zk-card-bg: rgba(255, 255, 255, 0.96);
  --zk-card-bg-strong: #ffffff;
  --zk-card-border: rgba(148, 163, 184, 0.24);
  --zk-card-border-blue: rgba(147, 197, 253, 0.42);

  --zk-shadow-card: 0 8px 28px rgba(15, 23, 42, 0.06);
  --zk-shadow-card-hover: 0 12px 32px rgba(15, 23, 42, 0.08);
  --zk-shadow-blue: 0 22px 56px rgba(37, 99, 235, 0.12);

  --zk-radius-lg: 24px;
  --zk-radius-md: 18px;
  --zk-radius-sm: 14px;

  --zk-card-padding: 28px;
  --zk-section-gap: 24px;
  --register-primary: #2563EB;
  --register-primary-hover: #1D4ED8;
  --register-border: #E5E7EB;
  --register-text: #374151;
  --register-required: #f56c6c;
  --register-radius-card: 12px;
  --register-radius-control: 8px;
  --register-avatar-ring: #E8F1FF;
}

/* —— ZK Card System —— */
.zk-card {
  position: relative;
  overflow: hidden;
  border-radius: var(--zk-radius-lg);
  background: var(--zk-card-bg);
  border: 1px solid var(--zk-card-border);
  box-shadow: var(--zk-shadow-card);
  contain: layout style paint;
}
.zk-card-padding { padding: var(--zk-card-padding); }
.zk-card-inner {
  border-radius: var(--zk-radius-md);
  background: rgba(255, 255, 255, 0.74);
  border: 1px solid rgba(226, 232, 240, 0.9);
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.04);
}
.zk-card-hover {
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}
@media (hover: hover) and (pointer: fine) {
  .zk-card-hover:hover {
    transform: translateY(-2px);
    box-shadow: var(--zk-shadow-card-hover);
    border-color: rgba(96, 165, 250, 0.42);
  }
}
.app-bg.is-scrolling .zk-card-hover,
.app-bg.is-scrolling .zk-card-hover:hover {
  transform: none;
  transition: none;
}

/* Card layout helpers */
.summary-card {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  min-height: 150px;
}
.summary-card .assignment-take-desc {
  flex: 0 0 100%;
}
.question-card {
  display: flex;
  flex-direction: column;
  gap: 18px;
}
.viewer-card { overflow: hidden; }
.viewer-toolbar {
  height: 56px;
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid rgba(226, 232, 240, 0.85);
  background: rgba(248, 250, 252, 0.72);
}
.document-canvas {
  padding: var(--zk-card-padding);
  background: linear-gradient(180deg, rgba(248, 250, 252, 0.95), rgba(241, 245, 249, 0.95));
}
.assignment-image-view-btn {
  cursor: pointer;
  transition: none;
}
.assignment-image-view-btn:hover {
  background: rgba(226, 232, 240, 0.95);
  color: var(--zk-text-secondary);
}
.assignment-image-modal-img {
  max-width: 100%;
  max-height: min(85vh, 900px);
  width: auto;
  height: auto;
  object-fit: contain;
  display: block;
  margin: 0 auto;
  border-radius: 8px;
}
.feedback-panel {
  padding: var(--zk-card-padding);
  display: flex;
  flex-direction: column;
  gap: 24px;
  position: sticky;
  top: calc(var(--app-header-height) + 1rem);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.9), rgba(239, 246, 255, 0.78));
  border-color: rgba(147, 197, 253, 0.42);
  box-shadow: 0 22px 56px rgba(37, 99, 235, 0.12);
}
.feedback-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.feedback-header--brand {
  padding: 12px 14px;
  border-radius: 16px;
  background: linear-gradient(135deg, rgba(239, 246, 255, 0.96), rgba(255, 255, 255, 0.9));
  border: 1px solid rgba(147, 197, 253, 0.32);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.85);
}
.feedback-header-main {
  display: flex;
  align-items: center;
  gap: 18px;
  min-width: 0;
}
.feedback-header h2 {
  margin: 0 0 0 2px;
  color: var(--zk-text-main);
  font-size: 22px;
  font-weight: 800;
  line-height: 1.2;
  letter-spacing: -0.02em;
}
.feedback-header p {
  margin: 0;
  color: var(--zk-text-muted);
  font-size: 14px;
  line-height: 1.6;
}
.feedback-ai-mark {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 56px;
  height: 56px;
  line-height: 0;
}
.feedback-ai-gif {
  width: 56px;
  height: auto;
  max-height: 64px;
  display: block;
  object-fit: contain;
  pointer-events: none;
  user-select: none;
  background: transparent;
  border: none;
  box-shadow: none;
}
.feedback-section {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.section-title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.feedback-section h3 {
  margin: 0;
  color: var(--zk-text-main);
  font-size: 16px;
  font-weight: 800;
}
.feedback-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.feedback-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 14px 16px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.76);
  border: 1px solid rgba(226, 232, 240, 0.9);
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.04);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
@media (hover: hover) and (pointer: fine) {
  .feedback-item:hover {
    transform: translateY(-1px);
    box-shadow: 0 12px 28px rgba(15, 23, 42, 0.07);
  }
}
.app-bg.is-scrolling .feedback-item,
.app-bg.is-scrolling .feedback-item:hover {
  transform: none;
  transition: none;
}
.feedback-icon {
  width: 30px;
  height: 30px;
  flex: 0 0 30px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  background: #DBEAFE;
  color: #2563EB;
  font-size: 13px;
  font-weight: 900;
}
.feedback-item strong {
  display: block;
  color: var(--zk-text-main);
  font-size: 14px;
  font-weight: 800;
  line-height: 1.3;
}
.feedback-item p {
  margin: 5px 0 0;
  color: var(--zk-text-secondary);
  font-size: 14px;
  line-height: 1.55;
}
.status-flow {
  display: flex;
  align-items: center;
  gap: 12px;
}
.status-chip {
  height: 42px;
  min-width: 96px;
  padding: 0 16px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 14px;
  font-size: 15px;
  font-weight: 800;
  background: rgba(255, 255, 255, 0.76);
  border: 1px solid rgba(226, 232, 240, 0.9);
}
.status-chip.success { color: #059669; }
.status-chip.pending { color: #2563EB; }
.status-chip.warning { color: #D97706; }
.status-chip.muted { color: var(--zk-text-secondary); }
.status-chip.is-active.pending {
  background: rgba(37, 99, 235, 0.1);
  border-color: rgba(37, 99, 235, 0.35);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
}
.status-chip.is-active.success {
  background: rgba(5, 150, 105, 0.12);
  border-color: rgba(5, 150, 105, 0.38);
  box-shadow: 0 0 0 3px rgba(5, 150, 105, 0.14);
}
.status-line {
  flex: 1;
  height: 1px;
  border-top: 1px dashed rgba(96, 165, 250, 0.55);
}
.feedback-actions {
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.feedback-actions .zk-btn-primary,
.feedback-actions .zk-btn-secondary {
  width: 100%;
}
.left-column { display: flex; flex-direction: column; gap: var(--zk-section-gap); }

/* Typography */
.card-title {
  font-size: 18px;
  font-weight: 800;
  color: var(--zk-text-main);
  line-height: 1.4;
  margin: 0;
}
.card-subtitle {
  margin-top: 4px;
  font-size: 14px;
  color: var(--zk-text-muted);
  line-height: 1.6;
}
.page-title h1 {
  font-size: 32px;
  font-weight: 800;
  color: var(--zk-text-main);
  letter-spacing: -0.02em;
}

/* Tags */
.zk-tag {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 30px;
  padding: 0 12px;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 700;
  white-space: nowrap;
}
.zk-tag-primary {
  background: linear-gradient(135deg, var(--zk-primary), #3B82F6);
  color: #FFFFFF;
  box-shadow: 0 8px 18px rgba(37, 99, 235, 0.22);
}
.zk-tag-soft { background: var(--zk-primary-light); color: var(--zk-primary-dark); }
.zk-tag-muted {
  background: rgba(241, 245, 249, 0.86);
  color: var(--zk-text-secondary);
  border: 1px solid rgba(226, 232, 240, 0.9);
}

/* Step chips — 小圆角矩形标签，蓝色主题 */
.zk-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 2px 8px;
  border-radius: 5px;
  font-size: 12px;
  font-weight: 700;
  line-height: 1.45;
  letter-spacing: 0.03em;
  white-space: nowrap;
  vertical-align: middle;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.22),
    0 1px 2px rgba(15, 23, 42, 0.08);
}
.zk-chip-pending {
  background: linear-gradient(180deg, #3B82F6 0%, #2563EB 100%);
  color: #fff;
}
.zk-chip-success {
  background: linear-gradient(180deg, #2563EB 0%, #1D4ED8 100%);
  color: #fff;
}
.zk-chip-progress {
  background: linear-gradient(180deg, #DBEAFE 0%, #BFDBFE 100%);
  color: #1D4ED8;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.65),
    0 1px 2px rgba(37, 99, 235, 0.1);
}
.zk-chip-soft {
  background: var(--zk-primary-light);
  color: var(--zk-primary-dark);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.65),
    0 1px 2px rgba(37, 99, 235, 0.08);
}
.zk-chip-muted {
  background: rgba(241, 245, 249, 0.95);
  color: var(--zk-text-secondary);
  border: 1px solid rgba(226, 232, 240, 0.9);
  box-shadow: none;
}
.zk-chip-info {
  background: linear-gradient(180deg, #EFF6FF 0%, #DBEAFE 100%);
  color: #1D4ED8;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.7),
    0 1px 2px rgba(37, 99, 235, 0.08);
}
.zk-chip-warning {
  background: linear-gradient(180deg, #FEF3C7 0%, #FDE68A 100%);
  color: #92400E;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.55),
    0 1px 2px rgba(146, 64, 14, 0.1);
}
.zk-chip-danger {
  background: linear-gradient(180deg, #FCA5A5 0%, #EF4444 100%);
  color: #fff;
}
.feedback-card-title {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 0;
}

/* Buttons */
.zk-btn-primary,
.zk-btn-secondary {
  height: 52px;
  padding: 0 24px;
  border-radius: 16px;
  font-size: 16px;
  font-weight: 800;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease, border-color 0.2s ease;
  text-decoration: none;
  user-select: none;
}
.zk-btn-primary {
  border: none;
  background: linear-gradient(135deg, var(--zk-primary), #3B82F6);
  color: #FFFFFF;
  box-shadow: 0 14px 28px rgba(37, 99, 235, 0.24);
}
.zk-btn-secondary {
  border: 1px solid #60A5FA;
  background: rgba(255, 255, 255, 0.72);
  color: var(--zk-primary);
}
.zk-btn-primary:hover,
.zk-btn-secondary:hover { transform: translateY(-1px); }
.zk-btn-primary:hover { box-shadow: 0 18px 36px rgba(37, 99, 235, 0.30); }
.zk-btn-secondary:hover { background: #EFF6FF; }
.zk-btn-sm {
  height: 32px;
  padding: 0 14px;
  border-radius: 10px;
  font-size: 13px;
  font-weight: 700;
  line-height: 1;
  white-space: nowrap;
}
.zk-btn-sm.zk-btn-primary { box-shadow: 0 6px 16px rgba(37, 99, 235, 0.2); }
.zk-btn-sm.zk-btn-primary:hover { box-shadow: 0 10px 22px rgba(37, 99, 235, 0.26); }
.zk-btn-sm.zk-btn-secondary { border-color: rgba(96, 165, 250, 0.65); }

.empty-state {
  position: relative;
  z-index: 1;
  background: var(--card-bg-solid);
  border: 1px solid var(--card-border);
  border-radius: var(--card-radius);
  box-shadow: var(--shadow);
}
.empty-state-icon { line-height: 1; opacity: 0.9; }

html:has(.landing-body) { height: 100%; }
.landing-body { margin: 0; min-height: 100%; min-height: 100dvh; height: 100%; height: 100dvh; display: flex; flex-direction: column; color: #e2e8f0; position: relative; background: radial-gradient(1000px 520px at 15% 20%, rgba(99, 102, 241, 0.48), transparent 55%), radial-gradient(900px 480px at 85% 22%, rgba(16, 185, 129, 0.30), transparent 58%), radial-gradient(780px 400px at 50% 92%, rgba(59, 130, 246, 0.22), transparent 55%), #070b14; overflow: hidden; }
.landing-video-layer { position: fixed; inset: 0; z-index: 0; overflow: hidden; pointer-events: none; }
.landing-video-layer--fallback { display: none; }
.landing-video { width: 100%; height: 100%; object-fit: cover; transform: scale(1.02); }
.landing-video-scrim { position: absolute; inset: 0; background: radial-gradient(1000px 520px at 15% 20%, rgba(99, 102, 241, 0.35), transparent 55%), radial-gradient(900px 480px at 85% 22%, rgba(16, 185, 129, 0.22), transparent 58%), linear-gradient(180deg, rgba(7, 11, 20, 0.55), rgba(7, 11, 20, 0.72)); }
.landing-main { flex: 1 1 auto; position: relative; min-height: 0; width: 100%; padding: 0; overflow: hidden; z-index: 1; }
.landing-center-wrap { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; padding: 1.25rem; width: 100%; box-sizing: border-box; overflow: auto; }
.login-split-outer { width: 100%; max-width: 980px; margin: 0 auto; padding: 0; box-sizing: border-box; position: relative; flex-shrink: 0; }
.login-split-card { display: flex; align-items: stretch; width: 100%; min-height: 620px; border-radius: 18px; overflow: hidden; box-shadow: 0 24px 70px rgba(0, 0, 0, 0.38); background: #fff; }
.login-split-visual { flex: 1 1 52%; min-width: 0; background: linear-gradient(155deg, #1d4ed8 0%, #3730a3 48%, #1e1b4b 100%); position: relative; overflow: hidden; }
.login-split-visual::after { content: ""; position: absolute; inset: 0; background: radial-gradient(400px 220px at 80% 20%, rgba(255, 255, 255, 0.12), transparent 60%); pointer-events: none; }
.login-split-visual-inner { position: relative; z-index: 1; height: 100%; min-height: 620px; display: flex; flex-direction: column; align-items: stretch; padding: 1rem 1rem 0 1rem; color: #fff; box-sizing: border-box; }
.login-split-visual-copy { width: 100%; text-align: center; padding: 0.35rem 0.75rem 0.5rem; flex-shrink: 0; margin-top: clamp(1rem, 4vw, 2.5rem); }
.login-split-visual-title { font-size: clamp(1.28rem, 3.4vw, 1.85rem); font-weight: 800; letter-spacing: 0.06em; line-height: 1.38; margin: 0; text-shadow: 0 2px 18px rgba(0, 0, 0, 0.2); }
.login-split-visual-sub { font-size: clamp(0.92rem, 2vw, 1.12rem); font-weight: 400; line-height: 1.6; margin: 0.9rem auto 0; max-width: 22rem; color: rgba(255, 255, 255, 0.9); }
.login-split-visual-art { margin-top: auto; display: flex; justify-content: flex-start; align-items: flex-end; align-self: stretch; margin-left: -0.45rem; margin-bottom: -0.85rem; min-height: 0; }
.login-split-visual-art img { max-width: min(100%, 560px); width: auto; max-height: min(420px, 64vh); height: auto; object-fit: contain; display: block; filter: drop-shadow(0 14px 32px rgba(0, 0, 0, 0.28)); transform: translate(-12px, 28px); }
.login-split-form { flex: 1 1 48%; min-width: 0; min-height: 0; padding: 1.75rem 1.75rem 2rem; background: #fff; position: relative; z-index: 1; display: flex; flex-direction: column; box-sizing: border-box; }
.login-form-logo-wrap { text-align: center; margin-bottom: 0.35rem; }
.login-form-logo { max-width: 100%; height: auto; max-height: 72px; object-fit: contain; }
.login-post-form { flex: 1 1 auto; display: flex; flex-direction: column; min-height: 0; }
.login-form-fields-cluster { flex: 1 1 auto; }
.login-form-tail { flex-shrink: 0; margin-top: auto; padding-top: 0.25rem; }
.login-form-tail .alert { margin-bottom: 0.75rem; }
.login-split-form .form-label { color: #0f2744; font-weight: 600; font-size: 0.9rem; letter-spacing: 0.03em; margin-bottom: 0.4rem; }
.login-submit-btn { border-radius: 10px; }
.login-footer-hint { position: absolute; top: calc(100% + 1.35rem); left: 0; right: 0; text-align: center; margin: 0; font-size: 0.9rem; z-index: 5; }
.login-footer-hint a { color: rgba(226, 232, 240, 0.92); text-decoration: none; border-bottom: 1px solid rgba(255, 255, 255, 0.45); }
.login-footer-hint a:hover { color: #fff; border-bottom-color: rgba(255, 255, 255, 0.85); }
.landing-auth-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 0.75rem; flex-wrap: wrap; }
.landing-redirect-hint { color: rgba(226, 232, 240, 0.55); }

.app-bg {
  --bs-body-color: var(--app-body);
  --bs-primary: var(--app-primary);
  --bs-primary-rgb: 37, 99, 235;
  --bs-link-color: var(--app-primary);
  --bs-link-hover-color: var(--app-primary-hover);
  position: relative;
  min-height: 100vh;
  min-height: 100dvh;
  overflow-x: hidden;
  background-color: #EEF4FB;
  background:
    radial-gradient(circle at 16% 10%, rgba(59, 130, 246, 0.12), transparent 28%),
    radial-gradient(circle at 86% 16%, rgba(14, 165, 233, 0.10), transparent 32%),
    radial-gradient(circle at 70% 90%, rgba(191, 219, 254, 0.16), transparent 36%),
    linear-gradient(180deg, #F8FAFF 0%, #F4F7FC 48%, #EEF4FB 100%);
  color: var(--app-body);
}
@keyframes app-bg-glow-drift {
  0%, 100% { transform: translate(0, 0) scale(1); opacity: 0.82; }
  50% { transform: translate(-24px, 16px) scale(1.05); opacity: 1; }
}
@keyframes app-bg-ambient-float {
  0%, 100% { transform: translate(0, 0) scale(1); opacity: 0.85; }
  50% { transform: translate(20px, -14px) scale(1.04); opacity: 1; }
}
.app-bg::before {
  content: "";
  position: absolute;
  top: 48px;
  right: -220px;
  width: 760px;
  height: 440px;
  background: radial-gradient(circle, rgba(37, 99, 235, 0.11) 0%, rgba(59, 130, 246, 0.05) 38%, transparent 72%);
  border-radius: 50%;
  pointer-events: none;
  z-index: 0;
  contain: paint;
}
.app-bg::after {
  content: "";
  position: absolute;
  top: 120px;
  right: -90px;
  width: 760px;
  height: 280px;
  background: linear-gradient(135deg, rgba(96, 165, 250, 0.08), rgba(255, 255, 255, 0));
  border-radius: 50%;
  transform: rotate(-8deg);
  pointer-events: none;
  z-index: 0;
  contain: paint;
}
.app-bg-ambient {
  position: absolute;
  inset: 0;
  min-height: 100%;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
  contain: paint;
}
.app-bg-ambient::before {
  content: "";
  position: absolute;
  top: 52%;
  left: -160px;
  width: 520px;
  height: 520px;
  border-radius: 50%;
  pointer-events: none;
  background: radial-gradient(circle, rgba(59, 130, 246, 0.09) 0%, rgba(59, 130, 246, 0.03) 45%, transparent 74%);
}
.app-bg-ambient::after {
  content: "";
  position: absolute;
  top: 18%;
  left: 32%;
  width: 400px;
  height: 400px;
  border-radius: 50%;
  pointer-events: none;
  background: radial-gradient(circle, rgba(14, 165, 233, 0.06) 0%, transparent 68%);
}
@media (prefers-reduced-motion: no-preference) and (min-width: 992px) {
  .app-bg::before {
    animation: app-bg-glow-drift 20s ease-in-out infinite;
  }
  .app-bg-ambient::before {
    animation: app-bg-ambient-float 26s ease-in-out infinite;
  }
  .app-bg.is-scrolling::before,
  .app-bg.is-scrolling > .app-bg-ambient::before {
    animation-play-state: paused;
  }
}
@media (prefers-reduced-motion: reduce) {
  .app-bg::before,
  .app-bg-ambient::before {
    animation: none !important;
  }
}
/* 长页面（作业详情）关闭背景动画，减少滚动时 GPU 压力 */
.app-bg:has(.assignment-take-shell)::before,
.app-bg:has(.assignment-take-shell) > .app-bg-ambient::before,
.app-bg:has(.student-home-shell)::before,
.app-bg:has(.student-home-shell) > .app-bg-ambient::before {
  animation: none !important;
}
.app-bg > main.app-main {
  position: relative;
  z-index: 1;
}
.app-header-spacer {
  height: var(--app-header-height);
  width: 100%;
  pointer-events: none;
  flex-shrink: 0;
}
.app-main {
  min-height: calc(100vh - var(--app-header-height));
  min-height: calc(100dvh - var(--app-header-height));
  padding-top: 1.5rem;
  color: var(--app-body);
}
.app-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  width: 100%;
  z-index: 1050;
  overflow: visible;
}
.app-header .navbar {
  background: rgba(255, 255, 255, 0.97);
  overflow: visible;
  border-bottom: 1px solid rgba(226, 232, 240, 0.85);
  box-shadow: 0 4px 18px rgba(15, 23, 42, 0.04);
}
@media (max-width: 991.98px) {
  :root { --app-header-height: 72px; }
}
.app-header .navbar .container { overflow: visible; }
@media (min-width: 992px) { .navbar-app-container { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; column-gap: 1rem; } .navbar-app-container .navbar-brand-logo { height: 46px; max-width: min(270px, 50vw); } .navbar-app-container > .navbar-toggler { display: none; } .navbar-app-container > .navbar-collapse { display: flex !important; flex-basis: auto !important; height: auto !important; justify-content: center; min-width: 0; } .navbar-app-container > .navbar-collapse .navbar-app-main-nav { flex-direction: row; align-items: center; margin-bottom: 0 !important; } }
.navbar-app-link { position: relative; font-weight: 600; padding-top: 0.65rem; padding-bottom: 0.65rem; color: var(--app-muted) !important; }
.navbar-app-link:hover { color: var(--app-primary) !important; }
.navbar-app-link--active { color: var(--app-primary) !important; }
.navbar-app-link--active::after { content: ""; position: absolute; left: 50%; transform: translateX(-50%); bottom: 6px; width: 26px; height: 3px; border-radius: 999px; background: var(--app-primary); box-shadow: none; }
.app-header .navbar .nav-link, .app-header .navbar .navbar-brand { color: var(--app-body); }
.app-header .navbar .nav-link:hover, .app-header .navbar .navbar-brand:hover { color: var(--app-primary); }
.app-header .navbar .navbar-brand { margin-left: -0.5rem; }
.app-header .navbar-toggler { border-color: var(--card-border); color: var(--app-body); }
.navbar-brand-logo { height: 40px; width: auto; max-width: min(240px, 48vw); object-fit: contain; display: block; }
.nav-account-dropdown { position: relative; z-index: 1060; }
.nav-account-trigger.btn { --bs-btn-bg: transparent; --bs-btn-border-color: transparent; --bs-btn-hover-bg: transparent; --bs-btn-hover-border-color: transparent; --bs-btn-active-bg: transparent; --bs-btn-active-border-color: transparent; --bs-btn-focus-shadow: none; }
.nav-account-trigger { width: 40px; height: 40px; padding: 0; border: none; border-radius: 0; background: transparent; color: rgba(255, 255, 255, 0.95); box-shadow: none; }
.nav-account-trigger:hover, .nav-account-trigger:focus-visible, .nav-account-trigger.show { background: transparent; border: none; color: #fff; box-shadow: none; }
.nav-account-trigger:focus-visible { outline: 2px solid rgba(37, 99, 235, 0.45); outline-offset: 3px; }
.nav-account-trigger-img { width: 32px; height: 32px; object-fit: contain; flex-shrink: 0; border-radius: 999px; pointer-events: none; }
.profile-account-dropdown { width: min(300px, calc(100vw - 1.5rem)); border-radius: 16px; overflow: visible; z-index: 1070; border: none !important; box-shadow: none !important; background: transparent !important; margin-top: 0.9rem !important; }
.profile-account-dropdown-inner { padding: 1rem 1rem 0.9rem; background: #fff; color: var(--app-body); border: 1px solid var(--card-border); box-shadow: var(--shadow); border-radius: 16px; }
.profile-account-header { padding-bottom: 0.95rem; border-bottom: 1px solid var(--card-border); }
.profile-account-avatar { width: 52px; height: 52px; border-radius: 12px; flex-shrink: 0; display: flex; align-items: center; justify-content: center; overflow: hidden; background: rgba(15, 23, 42, 0.06); box-shadow: 0 6px 18px rgba(37, 99, 235, 0.12); }
.profile-account-avatar-img { width: 100%; height: 100%; object-fit: contain; display: block; }
.profile-account-name { font-weight: 800; font-size: 1.05rem; color: var(--app-title); }
.profile-account-role-badge { font-size: 11px; font-weight: 700; padding: 2px 8px; border-radius: 6px; white-space: nowrap; }
.profile-account-role-badge.is-student { background: #2563eb; color: #fff; }
.profile-account-role-badge.is-teacher { background: #ea580c; color: #fff; }
.profile-account-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; padding: 12px 0 4px; }
.profile-account-tile { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; padding: 2px 4px; border: none; background: transparent; color: #1d4ed8; text-decoration: none; transition: opacity 0.15s ease, transform 0.15s ease; }
.profile-account-tile:hover { background: transparent; border: none; opacity: 0.82; transform: translateY(-1px); color: #1e40af; }
.profile-account-tile-sticker { width: 2.75rem; height: 2.75rem; object-fit: contain; display: block; background: transparent; border: none; box-shadow: none; }
.profile-account-tile-label { font-size: 13px; font-weight: 600; line-height: 1.2; }
.profile-account-footer { padding-top: 10px; margin-top: 4px; border-top: 1px solid rgba(15, 23, 42, 0.08); }
.profile-account-footer .btn-primary { box-shadow: 0 4px 12px rgba(13, 110, 253, 0.35); }
.app-header .navbar-collapse { overflow: visible; }
.app-card {
  position: relative;
  z-index: 1;
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  box-shadow: var(--shadow);
  border-radius: var(--card-radius);
}
.app-page-header { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-start; gap: 1rem; margin-bottom: 1.25rem; }
.app-page-title { font-size: clamp(1.35rem, 2.5vw, 1.75rem); font-weight: 800; color: var(--app-title); margin: 0; letter-spacing: -0.02em; }
.app-page-subtitle { font-size: 0.925rem; color: var(--app-muted); margin: 0.35rem 0 0; }
.app-page-header-actions { display: flex; flex-wrap: wrap; gap: 0.5rem; align-items: center; }
.app-section-title { display: flex; align-items: center; gap: 0.45rem; font-size: 0.95rem; font-weight: 700; color: var(--app-title); margin: 0 0 0.85rem; }
.app-section-title::before { content: ""; width: 4px; height: 1rem; border-radius: 999px; background: var(--app-primary); flex-shrink: 0; }
.app-tag { display: inline-flex; align-items: center; padding: 0.25rem 0.65rem; border-radius: 999px; background: var(--app-tag-bg); color: var(--app-primary); font-size: 0.78rem; font-weight: 700; }
.app-tag--muted { background: #F3F4F6; color: var(--app-muted); }
.btn-primary { --bs-btn-bg: var(--app-primary); --bs-btn-border-color: var(--app-primary); --bs-btn-hover-bg: var(--app-primary-hover); --bs-btn-hover-border-color: var(--app-primary-hover); --bs-btn-active-bg: var(--app-primary-hover); --bs-btn-active-border-color: var(--app-primary-hover); }
.btn-outline-primary { --bs-btn-color: var(--app-primary); --bs-btn-border-color: rgba(37, 99, 235, 0.45); --bs-btn-hover-bg: var(--app-btn-hover-bg); --bs-btn-hover-border-color: var(--app-primary); --bs-btn-hover-color: var(--app-primary-hover); --bs-btn-active-bg: var(--app-btn-hover-bg); --bs-btn-active-border-color: var(--app-primary); --bs-btn-active-color: var(--app-primary-hover); }
.text-muted { color: var(--app-muted) !important; }
.hero-badge { display: inline-flex; align-items: center; gap: 8px; padding: 6px 10px; border-radius: 999px; background: var(--app-tag-bg); color: var(--app-primary); font-weight: 700; font-size: 12px; }
.student-home-shell { max-width: 1100px; margin: 0 auto; }
.teacher-home-shell { max-width: 1100px; margin: 0 auto; }
.student-home-hero { border: 1px solid var(--card-border); }
.student-home-title { font-size: clamp(2rem, 3.6vw, 2.75rem); font-weight: 800; color: var(--app-title); letter-spacing: -0.03em; }
.student-home-subtitle { font-size: 1rem; color: var(--app-muted); }
.student-home-avatar { width: 94px; height: 94px; border-radius: 24px; background: var(--app-tag-bg); box-shadow: var(--shadow); display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.student-home-avatar-img { width: 78px; height: 78px; object-fit: contain; display: block; }
.student-home-stats { border-top: 1px solid var(--card-border); }
.student-home-stat { text-align: center; padding: 0.5rem 0; }
.student-home-stat-num { font-size: clamp(1.4rem, 3vw, 1.9rem); font-weight: 800; color: var(--app-primary); line-height: 1.1; }
.student-home-stat-label { font-size: .85rem; color: var(--app-muted); margin-top: .25rem; font-weight: 600; }
.student-home-panel-title { font-size: 1.1rem; font-weight: 800; color: var(--app-title); }
.student-home-table thead th { font-size: .85rem; color: var(--app-muted); font-weight: 700; }
.student-home-table tbody td { border-color: var(--card-border); color: var(--app-body); }
.student-home-table-btn {
  --bs-btn-padding-y: 0.25rem;
  --bs-btn-padding-x: 0.7rem;
  --bs-btn-font-size: 0.75rem;
  --bs-btn-font-weight: 600;
  min-width: 4.5rem;
  transition: none;
}
.student-home-dl dt { font-weight: 600; color: var(--app-muted); }
.student-home-dl dd { margin-bottom: .45rem; color: var(--app-body); }
.teacher-dashboard-hero { border: 1px solid var(--card-border) !important; box-shadow: var(--shadow) !important; border-radius: var(--card-radius) !important; overflow: hidden; }
.teacher-dashboard-hero .card-body { background: linear-gradient(135deg, #fff 0%, #F7FAFF 100%); }
.teacher-dashboard-stat { background: #fff; border: 1px solid var(--card-border); border-radius: 1rem; padding: 1rem; box-shadow: 0 2px 12px rgba(31, 41, 55, 0.05); height: 100%; }
.teacher-dashboard-stat-label { font-size: 0.85rem; color: var(--app-muted); }
.teacher-dashboard-stat-num { font-size: 1.75rem; font-weight: 800; color: var(--app-primary); line-height: 1.2; }
.teacher-panel-card { border: 1px solid var(--card-border) !important; box-shadow: var(--shadow) !important; border-radius: var(--card-radius) !important; }
.teacher-panel-card .table thead th { color: var(--app-muted); font-weight: 600; border-bottom-color: var(--card-border); }
.teacher-panel-card .table tbody td { border-color: var(--card-border); color: var(--app-body); vertical-align: middle; }

/* —— 教师端：布置作业 —— */
.teacher-create-shell { max-width: 1180px; }
.teacher-create-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) min(340px, 34%);
  gap: var(--zk-section-gap, 1.25rem);
  align-items: start;
}
.teacher-create-main { min-width: 0; }
.teacher-create-main > .card { overflow: visible; }
.teacher-create-datetime-picker.is-popover-open {
  position: relative;
  z-index: 50;
}
.teacher-create-aside {
  position: sticky;
  top: calc(var(--app-header-height) + 1rem);
  border-color: rgba(147, 197, 253, 0.42) !important;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.96) 0%, rgba(239, 246, 255, 0.88) 100%);
  box-shadow: var(--shadow) !important;
}
.teacher-create-aside .card-body {
  min-height: 420px;
}
@media (max-width: 1100px) {
  .teacher-create-layout { grid-template-columns: 1fr; }
  .teacher-create-aside {
    position: static;
    margin-top: 0.25rem;
  }
  .teacher-create-aside .card-body { min-height: 0; }
}
.teacher-create-form .app-section-title { margin-bottom: 1rem; }
.teacher-create-input,
.teacher-create-textarea,
.teacher-create-target-select {
  border-radius: 12px;
  border-color: var(--card-border);
  background: #fff;
}
.teacher-create-datetime-picker { position: relative; }
.teacher-create-datetime-trigger {
  display: flex;
  align-items: center;
  justify-content: space-between;
  text-align: left;
  cursor: pointer;
  background: #fff;
}
.teacher-create-datetime-trigger:not(.has-value) .teacher-create-datetime-trigger-text {
  color: var(--app-muted);
}
.teacher-create-datetime-trigger::after {
  content: "";
  width: 1rem;
  height: 1rem;
  flex-shrink: 0;
  margin-left: 0.5rem;
  opacity: 0.72;
  background: center / contain no-repeat url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%232563eb'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M8 7V3m8 4V3m-9 8h10M5 21h14a2 2 0 002-2V7a2 2 0 00-2-2H5a2 2 0 00-2 2v12a2 2 0 002 2z'/%3E%3C/svg%3E");
}
.teacher-create-datetime-popover {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 1400;
  width: 19.5rem;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.14);
  overflow: hidden;
}
.teacher-create-datetime-popover.is-open {
  display: block;
}
.teacher-create-datetime-popover-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  min-height: 2rem;
  padding: 0.45rem 0.55rem 0.4rem;
  border-bottom: 1px solid #e2e8f0;
}
.teacher-create-datetime-month-nav {
  display: flex;
  align-items: center;
  gap: 0.2rem;
  min-width: 0;
}
.teacher-create-datetime-month-label {
  font-size: 0.82rem;
  font-weight: 600;
  color: #1e293b;
  white-space: nowrap;
}
.teacher-create-datetime-nav-btn {
  border: none;
  background: transparent;
  color: #475569;
  font-size: 1rem;
  line-height: 1;
  width: 1.35rem;
  height: 1.35rem;
  border-radius: 4px;
  cursor: pointer;
}
.teacher-create-datetime-nav-btn:hover {
  background: #f1f5f9;
}
.teacher-create-datetime-unit-labels {
  display: flex;
  flex-shrink: 0;
  gap: 0.35rem;
  padding-right: 0.15rem;
}
.teacher-create-datetime-unit-labels span {
  width: 2.05rem;
  text-align: center;
  font-size: 0.72rem;
  font-weight: 700;
  color: #475569;
  line-height: 1.2;
}
.teacher-create-datetime-popover-body {
  display: flex;
  align-items: stretch;
  gap: 0.15rem;
  padding: 0.35rem 0.45rem 0.55rem;
}
.teacher-create-datetime-calendar {
  flex: 1;
  min-width: 0;
}
.teacher-create-datetime-weekdays,
.teacher-create-datetime-days {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 1px;
}
.teacher-create-datetime-weekday {
  font-size: 0.68rem;
  font-weight: 600;
  color: #64748b;
  text-align: center;
  padding: 0.15rem 0;
}
.teacher-create-datetime-day {
  border: none;
  background: transparent;
  font-size: 0.78rem;
  color: #334155;
  width: 1.65rem;
  height: 1.65rem;
  margin: 0 auto;
  border-radius: 999px;
  cursor: pointer;
}
.teacher-create-datetime-day.is-empty {
  pointer-events: none;
}
.teacher-create-datetime-day:hover:not(.is-selected) {
  background: #f1f5f9;
}
.teacher-create-datetime-day.is-today {
  box-shadow: inset 0 0 0 1px #93c5fd;
}
.teacher-create-datetime-day.is-selected {
  background: #64748b;
  color: #fff;
  font-weight: 600;
}
.teacher-create-datetime-time {
  display: flex;
  gap: 0.15rem;
  width: 4.55rem;
  flex-shrink: 0;
}
.teacher-create-time-scroll {
  flex: 1;
  min-width: 0;
  height: 11rem;
  overflow-y: auto;
  scroll-snap-type: y mandatory;
  scrollbar-width: thin;
  border-left: 1px solid #f1f5f9;
}
.teacher-create-time-scroll:first-child {
  border-left: none;
}
.teacher-create-time-scroll-spacer {
  height: calc(50% - 14px);
  flex-shrink: 0;
}
.teacher-create-time-scroll-item {
  scroll-snap-align: center;
  height: 1.75rem;
  line-height: 1.75rem;
  text-align: center;
  font-size: 0.82rem;
  color: #64748b;
  cursor: pointer;
  user-select: none;
}
.teacher-create-time-scroll-item.is-selected {
  background: #64748b;
  color: #fff;
  border-radius: 4px;
  font-weight: 600;
}
.teacher-create-textarea {
  resize: vertical;
  min-height: 96px;
  line-height: 1.65;
}
.teacher-create-file-field {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  min-height: calc(1.5em + 0.75rem + 2px);
  padding: 0.4rem 0.85rem;
  border: 1px dashed rgba(147, 197, 253, 0.55);
  border-radius: 12px;
  background: linear-gradient(180deg, #fff 0%, #F8FAFF 100%);
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.teacher-create-file-field:focus-within {
  border-color: rgba(37, 99, 235, 0.42);
  border-style: solid;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}
.teacher-create-file-native {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
.teacher-create-file-trigger {
  flex-shrink: 0;
  margin: 0;
  padding: 0.38rem 0.9rem;
  border-radius: 8px;
  border: 1px solid rgba(37, 99, 235, 0.28);
  background: #EFF6FF;
  color: var(--app-primary);
  font-weight: 600;
  font-size: 0.82rem;
  line-height: 1.35;
  cursor: pointer;
  user-select: none;
  transition: background 0.15s ease, border-color 0.15s ease;
}
.teacher-create-file-trigger:hover {
  background: #DBEAFE;
  border-color: rgba(37, 99, 235, 0.42);
}
.teacher-create-file-name {
  flex: 1;
  min-width: 0;
  font-size: 0.84rem;
  color: var(--app-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.teacher-create-file-name.has-file {
  color: #334155;
  font-weight: 500;
}
.teacher-create-target-select {
  min-height: 16rem;
  max-height: min(52vh, 420px);
  padding: 0.65rem 0.75rem;
  background: linear-gradient(180deg, #fff 0%, #F9FBFF 100%);
}
.teacher-create-target-picker { flex: 1 1 auto; display: flex; flex-direction: column; min-height: 0; }
.teacher-create-target-selected {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  min-height: 2.5rem;
  max-height: min(36vh, 260px);
  overflow: auto;
  padding: 0.65rem;
  border: 1px dashed var(--card-border);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.72);
}
.teacher-create-target-selected:empty::before {
  content: "暂未选择班级";
  color: var(--app-muted);
  font-size: 0.82rem;
}
.teacher-create-target-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.15rem;
}
.teacher-create-target-remove {
  border: none;
  background: transparent;
  color: #64748b;
  font-size: 1.1rem;
  line-height: 1;
  padding: 0 0.2rem;
  cursor: pointer;
}
.teacher-create-target-remove:hover { color: #dc2626; }
.teacher-create-target-select option {
  padding: 0.35rem 0.25rem;
  border-radius: 6px;
}
.teacher-create-target-select option:checked {
  background: linear-gradient(180deg, #3B82F6 0%, #2563EB 100%);
  color: #fff;
}
.teacher-create-question-card {
  border: 1px solid var(--card-border);
  border-radius: 16px;
  padding: 1.15rem 1.25rem;
  background: linear-gradient(180deg, #fff 0%, #F9FBFF 100%);
  box-shadow: 0 2px 12px rgba(31, 41, 55, 0.04);
}
.teacher-create-submit {
  height: 52px;
  border-radius: 16px;
  font-size: 1rem;
  margin-bottom: 0.5rem;
}
.app-bg:has(.teacher-create-shell)::before,
.app-bg:has(.teacher-create-shell) > .app-bg-ambient::before {
  animation: none !important;
}

/* —— 学生端：作业详情与反馈 —— */
.assignment-take-shell { max-width: 1180px; }
.assignment-take-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) min(340px, 32%);
  gap: var(--zk-section-gap);
  align-items: start;
}
.assignment-take-main { min-width: 0; }
@media (max-width: 1100px) {
  .assignment-take-layout { grid-template-columns: 1fr; }
  .feedback-panel { position: static; }
}
.assignment-take-id { font-size: 0.82rem; color: var(--app-hint); margin-bottom: 0.35rem; }
.assignment-take-title { font-size: clamp(1.35rem, 3vw, 1.85rem); font-weight: 800; color: var(--app-title); letter-spacing: -0.02em; line-height: 1.35; }
.assignment-take-meta { font-size: 0.875rem; color: var(--app-muted); }
.assignment-take-meta-item { display: inline-flex; align-items: center; gap: 0.35rem; }
.assignment-take-meta-label { font-weight: 600; color: var(--app-hint); }
.assignment-take-desc { font-size: 0.925rem; line-height: 1.65; color: var(--app-muted); }
.assignment-take-back { border-radius: 10px; font-weight: 600; }
.feedback-panel .assignment-progress-nav--panel {
  position: static;
  scroll-margin-top: 0;
  z-index: auto;
}
.feedback-panel .assignment-progress-track {
  padding: 12px 14px;
  border-radius: var(--zk-radius-md);
  background: rgba(255, 255, 255, 0.76);
  border: 1px solid rgba(226, 232, 240, 0.9);
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.04);
}
.feedback-panel .assignment-progress-pill {
  min-width: 2.5rem;
  height: 2.5rem;
}
.assignment-progress-nav {
  scroll-margin-top: 5.5rem;
  position: sticky;
  top: calc(var(--app-header-height) + 0.5rem);
  z-index: 1020;
}
.assignment-progress-nav-placeholder { display: none; }
.assignment-progress-label { font-size: 0.82rem; font-weight: 700; color: var(--app-muted); letter-spacing: 0.04em; }
.assignment-progress-summary { font-size: 0.82rem; font-weight: 600; color: var(--app-primary); }
.assignment-progress-track { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.assignment-progress-pill { display: inline-flex; align-items: center; justify-content: center; min-width: 2.35rem; height: 2.35rem; padding: 0 0.65rem; border-radius: 999px; border: 1px solid var(--card-border); background: #fff; color: var(--app-body); font-size: 0.875rem; font-weight: 700; text-decoration: none; transition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease, box-shadow 0.15s ease; }
.assignment-progress-pill:hover { border-color: rgba(37, 99, 235, 0.35); color: var(--app-primary); background: var(--app-btn-hover-bg); }
.assignment-progress-pill.is-active { border-color: var(--app-primary); background: var(--app-primary); color: #fff; box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.18); }
.assignment-progress-pill.is-done:not(.is-active) { border-color: rgba(22, 163, 74, 0.35); background: rgba(22, 163, 74, 0.08); color: #15803d; }
.assignment-media-frame { background: #fff; border: 1px solid var(--card-border); border-radius: 12px; padding: 0.85rem; display: flex; justify-content: center; align-items: center; overflow: hidden; }
.assignment-media-frame img { max-width: 100%; width: auto; height: auto; object-fit: contain; display: block; border-radius: 6px; }
.assignment-media-frame:not(.assignment-cover-frame) img { max-height: min(70vh, 520px); }
.assignment-cover-frame img { max-height: 240px; }
.assignment-cover-preview { max-width: 760px; width: 100%; margin: 0; }
.assignment-take-shell:has(> .assignment-cover-preview) {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: calc(100vh - var(--app-header-height) - 3rem);
  min-height: calc(100dvh - var(--app-header-height) - 3rem);
}
.assignment-cover-preview-title { font-size: clamp(1.35rem, 2.5vw, 1.75rem); font-weight: 800; color: var(--app-title); }
.assignment-cover-preview-frame { max-width: 640px; }
.assignment-cover-preview-frame img { max-height: min(68vh, 560px); }
.assignment-question-group {
  scroll-margin-top: 6.5rem;
  content-visibility: auto;
  contain-intrinsic-size: auto 480px;
}
.assignment-question-card.is-answered { border-color: rgba(22, 163, 74, 0.28); }
.assignment-question-layout { align-items: stretch; }
.assignment-question-media-col { min-width: 0; }
.assignment-question-form-col { min-width: 0; display: flex; flex-direction: column; }
@media (min-width: 992px) {
    .assignment-question-form-col { border-left: 1px solid var(--card-border); padding-left: 1.25rem; }
    .assignment-question-form-col .assignment-feedback-section { margin-top: 0 !important; }
}
.assignment-question-status { font-size: 0.72rem; font-weight: 700; }
.assignment-question-text { font-size: 1rem; line-height: 1.7; color: var(--app-title); word-break: break-word; }
.assignment-question-empty { font-size: 0.875rem; color: var(--app-muted); padding: 1rem; border-radius: 10px; background: #F9FAFB; border: 1px dashed var(--card-border); }
.assignment-feedback-section .form-label { font-weight: 600; color: var(--app-body); font-size: 0.9rem; margin-bottom: 0.5rem; }
.assignment-feedback-content-label {
  display: inline-flex;
  cursor: default;
  margin-bottom: 0;
}
.assignment-feedback-textarea { border-radius: 10px; border-color: var(--card-border); resize: vertical; min-height: 96px; }
.assignment-feedback-textarea:focus { border-color: rgba(37, 99, 235, 0.45); box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12); }
.form-control, .form-select { border-color: var(--card-border); color: var(--app-body); }
.form-control:focus, .form-select:focus { border-color: rgba(37, 99, 235, 0.45); box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12); }
.form-label { color: var(--app-body); }
.mastery-choice-group { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0.65rem; }
.mastery-choice { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 0.15rem; padding: 0.75rem 0.5rem !important; border-radius: 12px !important; min-height: 4.25rem; text-align: center; transition: background-color 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease; }
.mastery-choice-title { font-weight: 700; font-size: 0.95rem; line-height: 1.2; }
.mastery-choice-hint { font-size: 0.72rem; font-weight: 500; opacity: 0.72; line-height: 1.25; }
.btn-check:checked + .mastery-choice.btn-outline-success { background-color: rgba(22, 163, 74, 0.12); border-color: #16a34a; color: #15803d; box-shadow: 0 0 0 3px rgba(22, 163, 74, 0.15); }
.btn-check:checked + .mastery-choice.btn-outline-success .mastery-choice-hint { opacity: 0.85; color: #15803d; }
.btn-check:checked + .mastery-choice.btn-outline-warning { background-color: rgba(245, 158, 11, 0.14); border-color: #f59e0b; color: #b45309; box-shadow: 0 0 0 3px rgba(245, 158, 11, 0.18); }
.btn-check:checked + .mastery-choice.btn-outline-warning .mastery-choice-hint { opacity: 0.85; color: #b45309; }
.btn-check:checked + .mastery-choice.btn-outline-danger { background-color: rgba(220, 38, 38, 0.1); border-color: #dc2626; color: #b91c1c; box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.12); }
.btn-check:checked + .mastery-choice.btn-outline-danger .mastery-choice-hint { opacity: 0.85; color: #b91c1c; }
@media (max-width: 991.98px) {
    .assignment-question-form-col { border-left: none; padding-left: 0; padding-top: 0.25rem; border-top: 1px solid rgba(15, 23, 42, 0.08); margin-top: 0.25rem; padding-top: 1rem; }
}
@media (max-width: 767.98px) {
    .mastery-choice-group { grid-template-columns: 1fr; }
    .mastery-choice { flex-direction: row; justify-content: flex-start; gap: 0.5rem; min-height: auto; padding: 0.65rem 0.85rem !important; text-align: left; }
    .mastery-choice-hint { margin-left: auto; }
}

.feedback-stat-card { border-radius: 16px; }
.feedback-stat-card--success { border-left: 4px solid #16a34a; }
.feedback-stat-card--warning { border-left: 4px solid #f59e0b; }
.feedback-stat-card--danger { border-left: 4px solid #dc2626; }
.feedback-chart-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  min-height: 280px;
  padding: 0.5rem 0;
}
@property --feedback-pie-sweep {
  syntax: '<angle>';
  initial-value: 0deg;
  inherits: false;
}
.feedback-pie-shell {
  width: min(220px, 72vw);
  aspect-ratio: 1;
  position: relative;
  transform-origin: center center;
  animation: feedback-pie-shell-in 0.45s cubic-bezier(0.22, 1, 0.36, 1) both;
}
.feedback-pie-chart {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.65);
  --feedback-pie-sweep: 0deg;
  -webkit-mask: conic-gradient(from -90deg, #000 0deg, #000 var(--feedback-pie-sweep), transparent var(--feedback-pie-sweep));
  mask: conic-gradient(from -90deg, #000 0deg, #000 var(--feedback-pie-sweep), transparent var(--feedback-pie-sweep));
  animation: feedback-pie-draw 0.85s cubic-bezier(0.33, 1, 0.68, 1) 0.08s forwards;
}
.feedback-pie-legend {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.65rem 1rem;
  margin: 0;
  padding: 0;
  list-style: none;
  font-size: 0.875rem;
  color: rgba(15, 23, 42, 0.72);
}
.feedback-pie-legend li {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  opacity: 0;
  transform: translateY(4px);
  animation: feedback-pie-legend-in 0.35s ease forwards;
}
.mastery-level-tag {
  padding: 0.35rem 0.75rem;
  font-size: 0.8125rem;
  font-weight: 700;
  border-radius: 999px;
}
.feedback-pie-legend li:nth-child(1) { animation-delay: 0.55s; }
.feedback-pie-legend li:nth-child(2) { animation-delay: 0.68s; }
.feedback-pie-legend li:nth-child(3) { animation-delay: 0.81s; }
@keyframes feedback-pie-shell-in {
  from {
    opacity: 0;
    transform: scale(0.82);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}
@keyframes feedback-pie-draw {
  to { --feedback-pie-sweep: 360deg; }
}
@keyframes feedback-pie-legend-in {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
@media (prefers-reduced-motion: reduce) {
  .feedback-pie-shell,
  .feedback-pie-chart,
  .feedback-pie-legend li {
    animation: none !important;
    opacity: 1 !important;
    transform: none !important;
    --feedback-pie-sweep: 360deg;
  }
}
.feedback-pie-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  flex: 0 0 10px;
}
.feedback-pie-dot--success { background: #16a34a; }
.feedback-pie-dot--warning { background: #f59e0b; }
.feedback-pie-dot--danger { background: #dc2626; }
.feedback-summary-table thead th { color: rgba(15, 23, 42, 0.62); font-size: 0.85rem; }
.feedback-progress { height: 10px; background: rgba(15, 23, 42, 0.06); border-radius: 999px; }
.feedback-progress .progress-bar { border-radius: 999px; }
.alert.alert-danger, .alert.alert-warning, .alert.alert-success { background-color: transparent !important; border: none !important; box-shadow: none !important; padding-top: 0.35rem; padding-bottom: 0.35rem; padding-left: 0; padding-right: 0; }
.alert.alert-danger { color: #b91c1c; }
.alert.alert-warning { color: #c2410c; }
.alert.alert-success { color: #15803d; }

/* —— 注册 / 身份选择：居中白卡片 + 蓝色顶栏（与设计稿一致）—— */
.register-card-page-body.landing-body {
  min-height: 100vh;
  min-height: 100dvh;
}

.register-card-page-main {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: clamp(1rem, 4vw, 2.5rem) 1rem;
  width: 100%;
  box-sizing: border-box;
  overflow: auto;
}

.register-shell-card {
  width: 100%;
  max-width: min(520px, calc(100vw - 2rem));
  background: #fff;
  border-radius: var(--register-radius-card);
  box-shadow: 0 22px 55px rgba(0, 0, 0, 0.38);
  overflow: hidden;
}

.register-shell-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem 1rem;
  padding: 1rem 1.25rem 1.05rem;
  background: var(--register-primary);
  color: #fff;
}

.register-shell-brand {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  min-width: 0;
  color: inherit;
  text-decoration: none;
}

.register-shell-brand:hover {
  color: #fff;
}

.register-shell-brand-logo {
  flex-shrink: 0;
  width: 40px;
  height: 40px;
  object-fit: contain;
  border-radius: 8px;
}

.register-shell-brand-text {
  display: flex;
  flex-direction: column;
  gap: 0.12rem;
  line-height: 1.22;
  min-width: 0;
}

.register-shell-brand-title {
  font-weight: 700;
  font-size: 1.12rem;
  letter-spacing: 0.02em;
}

.register-shell-brand-sub {
  font-size: 0.76rem;
  font-weight: 400;
  opacity: 0.94;
}

.register-shell-header-link {
  flex-shrink: 0;
  align-self: flex-start;
  margin-top: 0.12rem;
  color: #fff;
  font-size: 0.875rem;
  text-decoration: none;
  white-space: nowrap;
}

.register-shell-header-link:hover {
  color: #fff;
  text-decoration: underline;
}

.register-shell-body {
  padding: 1.65rem 1.5rem 1.85rem;
  color: var(--register-text);
}

.register-role-page-title {
  text-align: center;
  font-size: 1.22rem;
  font-weight: 700;
  margin: 0 0 1.65rem;
  color: #1a1a1a;
}

.register-role-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem 1.35rem;
  justify-content: center;
  align-items: stretch;
}

.register-role-tile {
  flex: 1 1 140px;
  max-width: 200px;
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  text-decoration: none;
  color: inherit;
  padding: 0.65rem 0.5rem 0.85rem;
  border-radius: var(--register-radius-control);
  transition: background 0.15s ease, transform 0.15s ease, box-shadow 0.15s ease;
}

.register-role-tile:hover {
  color: inherit;
  transform: translateY(-2px);
}

.register-role-sticker {
  width: 7.25rem;
  height: 7.25rem;
  object-fit: contain;
  display: block;
  margin-bottom: 0.8rem;
  background: transparent;
  border: none;
  box-shadow: none;
}

.register-role-label {
  font-size: 0.95rem;
  font-weight: 600;
  color: #303133;
}

.register-form-page-title {
  font-size: 1.22rem;
  font-weight: 700;
  margin: 0 0 1.3rem;
  color: #1a1a1a;
}

.register-form-stack .form-label {
  font-weight: 600;
  color: #303133;
  margin-bottom: 0.38rem;
  font-size: 0.9rem;
}

.register-form-stack .text-danger,
.register-form-stack .form-label .text-danger {
  color: var(--register-required) !important;
}

.register-form-stack .register-input,
.register-form-stack .form-control,
.register-form-stack .form-select {
  border-color: var(--register-border);
  border-radius: var(--register-radius-control);
  padding: 0.5rem 0.75rem;
}

.register-form-stack .form-control:focus,
.register-form-stack .form-select:focus {
  border-color: rgba(59, 102, 245, 0.55);
  box-shadow: 0 0 0 0.2rem rgba(59, 102, 245, 0.15);
}

.register-form-stack .form-text {
  color: #909399;
  font-size: 0.8rem;
  margin-top: 0.35rem;
}

.gender-toggle {
  display: flex;
  gap: 0.75rem;
}

.gender-btn {
  flex: 1;
  border: 1px solid var(--register-border) !important;
  border-radius: var(--register-radius-control) !important;
  background: #fff !important;
  color: #303133 !important;
  font-weight: 600;
  padding: 0.58rem 0.75rem;
}

.gender-btn:hover {
  border-color: #c0c4cc !important;
  color: #303133 !important;
  background: #fafafa !important;
}

.btn-check:checked + .gender-btn {
  border-color: var(--register-primary) !important;
  background: rgba(59, 102, 245, 0.1) !important;
  color: var(--register-primary) !important;
}

.register-form-primary-btn.btn-primary {
  --bs-btn-bg: var(--register-primary);
  --bs-btn-border-color: var(--register-primary);
  --bs-btn-hover-bg: var(--register-primary-hover);
  --bs-btn-hover-border-color: var(--register-primary-hover);
  --bs-btn-active-bg: var(--register-primary-hover);
  --bs-btn-active-border-color: var(--register-primary-hover);
  --bs-btn-focus-shadow-rgb: 59, 102, 245;
  border-radius: var(--register-radius-control);
  padding-top: 0.62rem;
  padding-bottom: 0.62rem;
  font-weight: 600;
  font-size: 1rem;
}

.register-auth-footer {
  text-align: center;
  font-size: 0.9rem;
  color: #606266 !important;
  margin-top: 1.1rem !important;
}

.register-auth-footer a {
  color: var(--register-primary);
  text-decoration: none;
  font-weight: 600;
}

.register-auth-footer a:hover {
  text-decoration: underline;
  color: var(--register-primary-hover);
}

.report-box {
  background: rgba(248, 250, 252, 0.92);
  border: 1px solid rgba(148, 163, 184, 0.35);
  border-radius: 14px;
  padding: 1rem 1.1rem;
  min-height: 120px;
}

.report-markdown {
  color: #1e293b;
  font-size: 0.95rem;
  line-height: 1.75;
  word-break: break-word;
}

.report-markdown h1,
.report-markdown h2,
.report-markdown h3,
.report-markdown h4 {
  color: #0f172a;
  font-weight: 700;
  margin: 1.25rem 0 0.65rem;
  line-height: 1.4;
}

.report-markdown h1 { font-size: 1.35rem; }
.report-markdown h2 { font-size: 1.2rem; }
.report-markdown h3 { font-size: 1.05rem; }
.report-markdown h4 { font-size: 1rem; }

.report-markdown p {
  margin: 0.55rem 0;
}

.report-markdown ul,
.report-markdown ol {
  margin: 0.5rem 0 0.75rem;
  padding-left: 1.35rem;
}

.report-markdown li {
  margin: 0.35rem 0;
}

.report-markdown strong {
  color: #0f172a;
  font-weight: 700;
}

.report-markdown blockquote {
  margin: 0.75rem 0;
  padding: 0.65rem 0.9rem;
  border-left: 4px solid #6366f1;
  background: rgba(99, 102, 241, 0.08);
  border-radius: 0 10px 10px 0;
  color: #334155;
}

.report-markdown hr {
  margin: 1rem 0;
  border: 0;
  border-top: 1px solid rgba(148, 163, 184, 0.45);
}

.report-markdown .table-responsive-wrap {
  overflow-x: auto;
  margin: 0.75rem 0 1rem;
  border-radius: 10px;
  border: 1px solid rgba(148, 163, 184, 0.35);
}

.report-markdown table {
  width: 100%;
  min-width: 520px;
  margin: 0;
  border-collapse: collapse;
  font-size: 0.88rem;
  background: #fff;
}

.report-markdown th,
.report-markdown td {
  padding: 0.55rem 0.7rem;
  border: 1px solid rgba(148, 163, 184, 0.35);
  vertical-align: top;
}

.report-markdown th {
  background: rgba(241, 245, 249, 0.95);
  font-weight: 700;
  white-space: nowrap;
}

.report-markdown tr:nth-child(even) td {
  background: rgba(248, 250, 252, 0.7);
}

.report-markdown code {
  padding: 0.1rem 0.35rem;
  border-radius: 6px;
  background: rgba(15, 23, 42, 0.06);
  font-size: 0.88em;
}

#reportAiCard.is-generating {
  box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.25), 0 18px 45px rgba(15, 23, 42, 0.12);
}

.assignment-ai-report-modal .modal-body {
  min-height: 280px;
  max-height: min(70vh, 720px);
}

.assignment-ai-report-modal .modal-header {
  position: sticky;
  top: 0;
  z-index: 2;
  background: #fff;
  border-bottom: 1px solid rgba(226, 232, 240, 0.95);
}

.assignment-ai-report-modal .modal-footer {
  position: sticky;
  bottom: 0;
  z-index: 2;
  background: #fff;
  border-top: 1px solid rgba(226, 232, 240, 0.95);
  display: flex;
  justify-content: flex-end;
  gap: 0.75rem;
}

#studentAiReportModal {
  z-index: 1085;
}

#teacherAiReportModal {
  z-index: 1085;
}

#studentAiReportModal.show {
  display: block;
}

.modal-backdrop.show {
  z-index: 1080;
}

.assignment-ai-report-modal .report-box {
  min-height: 220px;
}

.ai-report-loading {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  min-height: 220px;
  padding: 1.5rem 1rem;
}

.ai-report-spinner {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  border: 4px solid rgba(59, 130, 246, 0.18);
  border-top-color: #3b82f6;
  animation: ai-report-spin 0.85s linear infinite;
  margin-bottom: 1rem;
}

.ai-report-loading-title {
  font-size: 1.05rem;
  font-weight: 700;
  color: #0f172a;
  margin-bottom: 0.45rem;
}

.ai-report-loading-desc {
  max-width: 28rem;
  font-size: 0.9rem;
  color: #64748b;
  line-height: 1.6;
  margin-bottom: 1.1rem;
}

.ai-report-loading-steps {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  justify-content: center;
}

.ai-report-step {
  font-size: 0.78rem;
  font-weight: 600;
  padding: 0.35rem 0.7rem;
  border-radius: 999px;
  background: rgba(148, 163, 184, 0.16);
  color: #64748b;
  transition: background-color 0.25s ease, color 0.25s ease, box-shadow 0.25s ease;
}

.ai-report-step--active {
  background: rgba(59, 130, 246, 0.14);
  color: #1d4ed8;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.12);
}

.ai-btn-spinner {
  display: inline-block;
  width: 0.95rem;
  height: 0.95rem;
  margin-right: 0.4rem;
  vertical-align: -0.15em;
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.35);
  border-top-color: #fff;
  animation: ai-report-spin 0.75s linear infinite;
}

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

@keyframes ai-report-step-pulse {
  0%, 100% { opacity: 0.55; transform: translateY(0); }
  50% { opacity: 1; transform: translateY(-1px); }
}

}