/* 拼好业 · 作业管理台（桌面 + 手机自适应） */
:root {
  --bg: #02050f;
  --bg-soft: #061321;
  --text: #e8f7ff;
  --muted: #93b4c8;
  --muted-2: #6c8ba0;
  --cyan: #00f2fe;
  --blue: #4facfe;
  --pink: #ff3399;
  --green: #38e8a0;
  --amber: #ffcc66;
  --red: #ff6b81;
  --line: rgba(255, 255, 255, 0.12);
  --line-strong: rgba(0, 242, 254, 0.35);
  --glass: linear-gradient(145deg, rgba(255, 255, 255, 0.09), rgba(255, 255, 255, 0.025));
  --radius: 20px;
  --shadow: 0 18px 40px rgba(0, 0, 0, 0.38);
  --topbar-h: 68px;
  --tabbar-h: 66px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
[hidden] { display: none !important; }

html { -webkit-text-size-adjust: 100%; }

body {
  min-height: 100vh;
  min-height: 100dvh;
  background: var(--bg);
  color: var(--text);
  font-family: "Microsoft YaHei", "PingFang SC", "Hiragino Sans GB", "Noto Sans SC", system-ui, sans-serif;
  font-size: 15px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
a { color: var(--cyan); text-decoration: none; }
svg { display: block; }
code { font-family: "Cascadia Code", Consolas, monospace; font-size: 0.92em; padding: 1px 5px; border-radius: 5px; background: rgba(0, 242, 254, 0.1); color: #a9f6ff; }

::selection { background: rgba(0, 242, 254, 0.3); }
::-webkit-scrollbar { width: 9px; height: 9px; }
::-webkit-scrollbar-thumb { background: rgba(0, 242, 254, 0.22); border-radius: 99px; }
::-webkit-scrollbar-track { background: transparent; }

/* ---------- 背景 ---------- */
.bg-layer { position: fixed; inset: 0; z-index: 0; overflow: hidden; pointer-events: none; }
.bg-layer::after {
  content: ""; position: absolute; inset: 0;
  background: radial-gradient(ellipse at 50% -10%, rgba(0, 90, 140, 0.35), transparent 60%);
}
.bg-grid {
  position: absolute; inset: -20%;
  background-image: linear-gradient(rgba(0, 242, 254, 0.045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0, 242, 254, 0.045) 1px, transparent 1px);
  background-size: 64px 64px;
  transform: perspective(900px) rotateX(58deg) translateY(10%);
  transform-origin: 50% 40%;
  mask-image: radial-gradient(ellipse 60% 50% at 50% 45%, #000 10%, transparent 75%);
  -webkit-mask-image: radial-gradient(ellipse 60% 50% at 50% 45%, #000 10%, transparent 75%);
  animation: grid-drift 26s linear infinite;
}
@keyframes grid-drift { to { background-position: 0 64px, 64px 0; } }
.bg-glow { position: absolute; width: 55vmax; height: 55vmax; border-radius: 50%; filter: blur(80px); opacity: 0.5; }
.bg-glow-a { top: -25vmax; left: -10vmax; background: radial-gradient(circle, rgba(0, 242, 254, 0.22), transparent 65%); }
.bg-glow-b { bottom: -30vmax; right: -12vmax; background: radial-gradient(circle, rgba(255, 51, 153, 0.16), transparent 65%); }
.bg-triangle { position: absolute; right: 4vw; top: 18vh; width: min(46vw, 620px); aspect-ratio: 1; opacity: 0.5; }
.bg-triangle svg { width: 100%; height: 100%; }

.glass {
  background: var(--glass);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.12), var(--shadow);
  backdrop-filter: blur(22px) saturate(150%);
  -webkit-backdrop-filter: blur(22px) saturate(150%);
}

/* ---------- 认证页 ---------- */
.auth-view {
  position: relative; z-index: 2;
  min-height: 100vh; min-height: 100dvh;
  display: grid; grid-template-columns: 1.15fr 0.85fr;
  gap: clamp(24px, 5vw, 80px);
  align-items: center;
  padding: clamp(24px, 5vw, 72px) clamp(20px, 6vw, 96px);
}
.auth-art { max-width: 640px; animation: rise-in 0.8s cubic-bezier(.16, 1, .3, 1) both; }
.auth-brand { display: flex; align-items: center; gap: 14px; }
.auth-mark { width: 54px; height: 54px; flex: 0 0 54px; filter: drop-shadow(0 0 16px rgba(0, 242, 254, 0.45)); }
.auth-mark svg { width: 100%; height: 100%; }
.auth-title {
  font-family: "STXingkai", "KaiTi", "Songti SC", serif;
  font-size: clamp(1.9rem, 3vw, 2.4rem); letter-spacing: 0.16em;
  background: linear-gradient(120deg, #fff, #9ff3ff 55%, #00f2fe);
  -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; color: transparent;
}
.auth-sub { font-size: 11px; letter-spacing: 0.32em; color: var(--muted); }
.auth-headline {
  margin: clamp(28px, 5vh, 54px) 0 24px;
  font-family: "STXingkai", "KaiTi", "Songti SC", serif;
  font-size: clamp(2.5rem, 4.6vw, 4.2rem); font-weight: 700; line-height: 1.16; letter-spacing: 0.04em;
  color: #f4fdff; text-shadow: 0 8px 40px rgba(0, 242, 254, 0.18);
}
.auth-headline em { font-style: normal; color: var(--cyan); }
.auth-points { list-style: none; display: flex; flex-direction: column; gap: 14px; max-width: 520px; }
.auth-points li { display: flex; gap: 14px; align-items: flex-start; color: #cfe9f6; font-size: 14px; }
.auth-points i {
  font-style: normal; font-family: Consolas, monospace; font-size: 11px; color: var(--cyan);
  border: 1px solid rgba(0, 242, 254, 0.3); border-radius: 6px; padding: 2px 6px; flex: 0 0 auto; margin-top: 2px;
}
.auth-foot { margin-top: clamp(30px, 6vh, 60px); font: 10px/1.8 Consolas, monospace; letter-spacing: 0.22em; color: var(--muted-2); }
.auth-foot span { color: var(--pink); margin: 0 8px; }

.auth-panel {
  position: relative; width: min(440px, 100%); justify-self: end;
  padding: clamp(24px, 3vw, 38px); border-radius: 28px;
  animation: rise-in 0.9s cubic-bezier(.16, 1, .3, 1) 0.12s both;
}
.auth-pane { display: flex; flex-direction: column; gap: 20px; }
.pane-head h2 { font-size: 1.5rem; font-weight: 700; letter-spacing: 0.04em; }
.pane-head p { margin-top: 6px; font-size: 13px; color: var(--muted); }
.pane-kicker { font: 10px/1 Consolas, monospace; letter-spacing: 0.3em; color: rgba(0, 242, 254, 0.7); }
.pane-tip { display: flex; align-items: center; gap: 8px; font-size: 12px; color: var(--muted); border-top: 1px solid var(--line); padding-top: 16px; }

.form { display: flex; flex-direction: column; gap: 14px; }
.field { display: flex; flex-direction: column; gap: 7px; font-size: 12px; color: var(--muted); }
.field > span { letter-spacing: 0.06em; }
.field input, .field select, .field textarea,
.toolbar input, .toolbar select, .sent-editform input, .sent-editform textarea {
  width: 100%; padding: 11px 13px; border-radius: 11px;
  border: 1px solid rgba(255, 255, 255, 0.14); background: rgba(2, 12, 22, 0.6);
  color: var(--text); font-size: 15px; outline: none; transition: border-color 0.2s, box-shadow 0.2s;
}
.field input:focus, .field select:focus, .field textarea:focus,
.toolbar input:focus, .toolbar select:focus, .sent-editform input:focus, .sent-editform textarea:focus {
  border-color: rgba(0, 242, 254, 0.7); box-shadow: 0 0 0 3px rgba(0, 242, 254, 0.12);
}
.form-error { color: #ff9db0; font-size: 12.5px; background: rgba(255, 51, 60, 0.08); border: 1px solid rgba(255, 80, 90, 0.25); border-radius: 9px; padding: 8px 11px; }
.notice { font-size: 13px; line-height: 1.8; color: #cfe9f6; background: rgba(255, 204, 102, 0.07); border: 1px solid rgba(255, 204, 102, 0.24); border-radius: 12px; padding: 12px 14px; }
.confirm-text { font-size: 14px; line-height: 1.85; color: #d8edf8; }

/* ---------- 通用按钮 ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  padding: 10px 18px; border-radius: 11px; border: 1px solid rgba(255, 255, 255, 0.16);
  background: rgba(255, 255, 255, 0.06); color: var(--text);
  font-size: 13.5px; letter-spacing: 0.02em; white-space: nowrap;
  transition: background 0.2s, border-color 0.2s, transform 0.15s, box-shadow 0.2s;
}
.btn svg { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; flex: 0 0 auto; }
.btn:hover { background: rgba(0, 242, 254, 0.14); border-color: rgba(0, 242, 254, 0.5); }
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: 0.5; cursor: not-allowed; }
.btn.primary { border-color: rgba(0, 242, 254, 0.6); background: linear-gradient(135deg, rgba(0, 242, 254, 0.32), rgba(79, 172, 254, 0.16)); color: #fff; box-shadow: 0 0 22px rgba(0, 242, 254, 0.16); }
.btn.primary:hover { background: linear-gradient(135deg, rgba(0, 242, 254, 0.45), rgba(79, 172, 254, 0.24)); box-shadow: 0 0 30px rgba(0, 242, 254, 0.28); }
.btn.ghost { background: rgba(255, 255, 255, 0.035); }
.btn.danger { border-color: rgba(255, 80, 100, 0.4); background: rgba(255, 51, 80, 0.12); color: #ffb3c0; }
.btn.danger:hover { background: rgba(255, 51, 80, 0.22); border-color: rgba(255, 80, 100, 0.65); }
.btn.small { padding: 7px 12px; border-radius: 9px; font-size: 12px; gap: 5px; }
.btn.small svg { width: 14px; height: 14px; }
.btn.block { width: 100%; padding: 12px; }
.btn.text { border: 0; background: transparent; padding: 6px 8px; color: var(--muted); }
.btn.text:hover { color: var(--cyan); background: rgba(0, 242, 254, 0.08); }
.icon-btn {
  width: 36px; height: 36px; display: inline-flex; align-items: center; justify-content: center;
  border-radius: 10px; border: 1px solid transparent; background: transparent; color: var(--muted);
  transition: 0.2s;
}
.icon-btn svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.icon-btn:hover { color: var(--cyan); background: rgba(0, 242, 254, 0.1); border-color: rgba(0, 242, 254, 0.25); }
:focus-visible { outline: 2px solid rgba(0, 242, 254, 0.8); outline-offset: 2px; }

/* ---------- 顶栏 ---------- */
.app { position: relative; z-index: 2; min-height: 100vh; min-height: 100dvh; display: flex; flex-direction: column; }
.topbar {
  position: sticky; top: 0; z-index: 40;
  height: calc(var(--topbar-h) + env(safe-area-inset-top, 0px));
  flex: 0 0 calc(var(--topbar-h) + env(safe-area-inset-top, 0px));
  display: flex; align-items: center; gap: clamp(12px, 3vw, 36px);
  padding: env(safe-area-inset-top, 0px) clamp(14px, 3.4vw, 40px) 0;
  background: rgba(2, 8, 16, 0.72); border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(18px) saturate(160%); -webkit-backdrop-filter: blur(18px) saturate(160%);
}
.brand { display: flex; align-items: center; gap: 10px; color: inherit; }
.brand-mark { width: 34px; height: 34px; filter: drop-shadow(0 0 10px rgba(0, 242, 254, 0.4)); }
.brand-mark svg { width: 100%; height: 100%; }
.brand-text { display: flex; flex-direction: column; line-height: 1.2; }
.brand-text strong {
  font-family: "STXingkai", "KaiTi", serif; font-size: 1.35rem; letter-spacing: 0.12em;
  background: linear-gradient(120deg, #fff, #a9f6ff); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;
}
.brand-text small { font-size: 9.5px; letter-spacing: 0.26em; color: var(--muted-2); }

.main-nav { display: flex; gap: 4px; padding: 4px; border-radius: 12px; background: rgba(255, 255, 255, 0.035); border: 1px solid rgba(255, 255, 255, 0.06); }
.nav-btn {
  border: 1px solid transparent; background: transparent; color: var(--muted);
  padding: 8px 16px; border-radius: 9px; font-size: 13px; letter-spacing: 0.04em; transition: 0.2s;
}
.nav-btn:hover { color: #fff; background: rgba(255, 255, 255, 0.05); }
.nav-btn.active { color: #031018; background: linear-gradient(135deg, #7ff6ff, #00f2fe); font-weight: 700; box-shadow: 0 0 18px rgba(0, 242, 254, 0.3); }

.top-actions { margin-left: auto; display: flex; align-items: center; gap: 10px; }
.user-chip { display: flex; align-items: center; gap: 9px; padding: 4px 6px 4px 10px; border-radius: 99px; border: 1px solid rgba(255, 255, 255, 0.12); background: rgba(255, 255, 255, 0.045); }
.avatar {
  width: 32px; height: 32px; border-radius: 50%; flex: 0 0 32px;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 13px; font-weight: 700; color: #04121c;
  background: linear-gradient(135deg, #7ff6ff, #00f2fe 55%, #ff8ac2);
  box-shadow: 0 0 14px rgba(0, 242, 254, 0.28);
}
.user-meta { display: flex; flex-direction: column; line-height: 1.25; }
.user-meta strong { font-size: 12.5px; font-weight: 600; max-width: 10em; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.user-meta small { font-size: 10px; color: var(--muted-2); letter-spacing: 0.08em; }
.user-chip .icon-btn { width: 30px; height: 30px; }

.main { flex: 1; width: 100%; max-width: 1440px; margin: 0 auto; padding: clamp(18px, 3vw, 36px) clamp(14px, 3.4vw, 40px) 48px; }
.view { animation: rise-in 0.45s cubic-bezier(.16, 1, .3, 1) both; }
@keyframes rise-in { from { opacity: 0; transform: translateY(14px); } }

/* ---------- 页面标题 ---------- */
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 22px; }
.page-kicker { font: 10px/1 Consolas, monospace; letter-spacing: 0.3em; color: rgba(0, 242, 254, 0.62); }
.page-title { margin-top: 7px; font-size: clamp(1.5rem, 2.4vw, 2.1rem); letter-spacing: 0.03em; font-weight: 700; }
.page-sub { margin-top: 5px; font-size: 13px; color: var(--muted); }
.page-actions { display: flex; gap: 9px; flex-wrap: wrap; }

.hero {
  position: relative; overflow: hidden; border-radius: 26px; padding: clamp(22px, 3.4vw, 38px);
  display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; flex-wrap: wrap;
  margin-bottom: 22px;
  background:
    radial-gradient(70% 120% at 12% 0%, rgba(0, 242, 254, 0.16), transparent 60%),
    radial-gradient(60% 100% at 92% 100%, rgba(255, 51, 153, 0.12), transparent 60%),
    var(--glass);
  border: 1px solid rgba(255, 255, 255, 0.13);
  box-shadow: var(--shadow);
}
.hero::after {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(110deg, transparent 40%, rgba(255, 255, 255, 0.06) 50%, transparent 60%);
  transform: translateX(-100%); animation: sheen 9s ease-in-out infinite;
}
@keyframes sheen { 0%, 55% { transform: translateX(-100%); } 85%, 100% { transform: translateX(100%); } }
.hero-copy { position: relative; z-index: 1; }
.hero-date { font: 11px/1.4 Consolas, monospace; letter-spacing: 0.22em; color: rgba(0, 242, 254, 0.72); }
.hero-title { margin: 10px 0 8px; font-size: clamp(1.7rem, 3.2vw, 2.6rem); letter-spacing: 0.03em; }
.hero-title em { font-style: normal; color: var(--cyan); }
.hero-sub { font-size: 13.5px; color: var(--muted); max-width: 46em; }
.hero-actions { position: relative; z-index: 1; display: flex; gap: 10px; flex-wrap: wrap; }

/* ---------- 统计 ---------- */
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-bottom: 22px; }
.stat { padding: 17px 18px; border-radius: 17px; position: relative; overflow: hidden; }
.stat::before { content: ""; position: absolute; left: 0; top: 16px; bottom: 16px; width: 3px; border-radius: 9px; background: var(--cyan); box-shadow: 0 0 12px rgba(0, 242, 254, 0.7); }
.stat:nth-child(2)::before { background: var(--pink); box-shadow: 0 0 12px rgba(255, 51, 153, 0.6); }
.stat:nth-child(3)::before { background: var(--amber); box-shadow: 0 0 12px rgba(255, 204, 102, 0.55); }
.stat:nth-child(4)::before { background: var(--green); box-shadow: 0 0 12px rgba(56, 232, 160, 0.55); }
.stat-label { font-size: 11.5px; color: var(--muted); letter-spacing: 0.08em; }
.stat-num { margin-top: 5px; font: 700 clamp(1.5rem, 2.6vw, 2rem)/1.1 Consolas, monospace; color: #f2feff; }
.stat-num small { font-size: 11px; font-weight: 400; color: var(--muted-2); margin-left: 4px; letter-spacing: 0; }
.stat-foot { margin-top: 5px; font-size: 11px; color: var(--muted-2); }

/* ---------- 今日作业 ---------- */
.block-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 26px 0 12px; }
.block-title { font-size: 16px; font-weight: 700; letter-spacing: 0.05em; display: flex; align-items: center; gap: 9px; }
.block-title::before { content: ""; width: 4px; height: 16px; border-radius: 4px; background: linear-gradient(var(--cyan), var(--pink)); }
.block-more { font-size: 12px; color: var(--muted); }
.block-more:hover { color: var(--cyan); }

.today-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.subject-card { padding: 20px 22px; border-radius: 20px; position: relative; overflow: hidden; }
.subject-card.chinese { background: linear-gradient(140deg, rgba(0, 242, 254, 0.12), rgba(255, 255, 255, 0.03)); }
.subject-card.math { background: linear-gradient(140deg, rgba(255, 51, 153, 0.12), rgba(255, 255, 255, 0.03)); }
.subject-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.subject-title { display: flex; align-items: center; gap: 9px; font-size: 15px; font-weight: 700; }
.subject-icon { width: 34px; height: 34px; border-radius: 10px; display: inline-flex; align-items: center; justify-content: center; font-size: 13px; font-weight: 700; }
.chinese .subject-icon { background: rgba(0, 242, 254, 0.16); color: var(--cyan); border: 1px solid rgba(0, 242, 254, 0.3); }
.math .subject-icon { background: rgba(255, 51, 153, 0.14); color: #ff9ecb; border: 1px solid rgba(255, 51, 153, 0.3); }
.subject-name { margin-top: 14px; font-size: 20px; font-weight: 700; color: #fff; line-height: 1.35; }
.subject-desc { margin-top: 4px; font-size: 12.5px; color: var(--muted); min-height: 1.5em; }
.subject-meta { display: flex; gap: 14px; flex-wrap: wrap; margin-top: 14px; font-size: 12px; color: var(--muted); }
.subject-meta b { color: #eafcff; font-family: Consolas, monospace; font-weight: 600; }
.subject-actions { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 16px; }
.subject-empty { color: var(--muted-2); font-size: 13px; margin-top: 10px; }

/* ---------- 列表 ---------- */
.recent { display: flex; flex-direction: column; gap: 8px; }
.recent-item { display: flex; align-items: center; gap: 14px; padding: 13px 16px; border-radius: 13px; }
.recent-item:hover { border-color: rgba(0, 242, 254, 0.25); background: rgba(255, 255, 255, 0.05); }
.recent-date { font: 600 12px/1 Consolas, monospace; color: var(--cyan); flex: 0 0 auto; width: 5.6em; }
.recent-title { flex: 1; min-width: 0; font-size: 13.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.recent-meta { font-size: 11px; color: var(--muted-2); flex: 0 0 auto; }

.badge { display: inline-flex; align-items: center; gap: 4px; padding: 2px 8px; border-radius: 99px; font-size: 10.5px; letter-spacing: 0.04em; border: 1px solid transparent; white-space: nowrap; }
.badge.chinese { color: #8ff6ff; background: rgba(0, 242, 254, 0.1); border-color: rgba(0, 242, 254, 0.28); }
.badge.math { color: #ffb3d5; background: rgba(255, 51, 153, 0.1); border-color: rgba(255, 51, 153, 0.28); }
.badge.done { color: #8ff5c8; background: rgba(56, 232, 160, 0.1); border-color: rgba(56, 232, 160, 0.28); }
.badge.pending, .badge.processing { color: #ffe0a3; background: rgba(255, 204, 102, 0.1); border-color: rgba(255, 204, 102, 0.28); }
.badge.failed { color: #ffb3c0; background: rgba(255, 80, 100, 0.12); border-color: rgba(255, 80, 100, 0.32); }
.badge.muted { color: var(--muted); background: rgba(255, 255, 255, 0.05); border-color: rgba(255, 255, 255, 0.12); }
.badge.ai { color: #c7b3ff; background: rgba(150, 120, 255, 0.1); border-color: rgba(150, 120, 255, 0.3); }

/* ---------- 筛选 ---------- */
.filters { padding: 14px; border-radius: 16px; margin-bottom: 18px; display: flex; flex-wrap: wrap; gap: 10px; align-items: flex-end; }
.filters .field { flex: 1 1 150px; min-width: 120px; gap: 4px; font-size: 11px; }
.filters .field input, .filters .field select { padding: 9px 11px; font-size: 13.5px; }
.filters .filter-actions { display: flex; gap: 8px; }
.filters .grow { flex: 1 1 220px; }
.filter-count { margin-left: auto; font-size: 11.5px; color: var(--muted-2); align-self: center; }

/* ---------- 作业卡片 ---------- */
.hw-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); gap: 14px; }
.hw-card { padding: 18px 19px; border-radius: 18px; display: flex; flex-direction: column; gap: 12px; position: relative; overflow: hidden; transition: border-color 0.25s, transform 0.25s, box-shadow 0.25s; }
.hw-card:hover { transform: translateY(-2px); border-color: rgba(0, 242, 254, 0.28); box-shadow: 0 20px 48px rgba(0, 0, 0, 0.45); }
.hw-card::after { content: ""; position: absolute; top: 0; left: 0; width: 3px; height: 100%; background: linear-gradient(var(--cyan), transparent 70%); opacity: 0.65; }
.hw-card.math::after { background: linear-gradient(var(--pink), transparent 70%); }
.hw-top { display: flex; align-items: flex-start; gap: 12px; }
.hw-date { flex: 0 0 auto; text-align: center; padding-right: 12px; border-right: 1px solid var(--line); }
.hw-day { display: block; font: 700 26px/1 Consolas, monospace; color: #fff; }
.hw-month { display: block; margin-top: 3px; font-size: 10px; color: var(--muted-2); letter-spacing: 0.08em; }
.hw-main { flex: 1; min-width: 0; }
.hw-title { font-size: 15.5px; font-weight: 700; color: #f2feff; line-height: 1.4; word-break: break-word; }
.hw-sub { margin-top: 5px; display: flex; align-items: center; gap: 7px; flex-wrap: wrap; font-size: 11.5px; color: var(--muted-2); }
.hw-notes { font-size: 12.5px; color: var(--muted); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.hw-stats { display: flex; gap: 14px; flex-wrap: wrap; font-size: 11.5px; color: var(--muted-2); }
.hw-stats b { color: #dff8ff; font-family: Consolas, monospace; }
.hw-actions { display: flex; gap: 7px; flex-wrap: wrap; padding-top: 2px; }
.hw-actions .btn.small { flex: 0 0 auto; }
.pager { display: flex; justify-content: center; margin: 20px 0 0; }

.empty { padding: 52px 20px; text-align: center; border-radius: 18px; border: 1px dashed rgba(255, 255, 255, 0.14); color: var(--muted); }
.empty-icon { font-size: 34px; opacity: 0.5; margin-bottom: 8px; }
.empty h3 { font-size: 15px; color: #dff8ff; font-weight: 600; margin-bottom: 5px; }
.empty p { font-size: 12.5px; }
.empty .btn { margin-top: 14px; }

.loading { display: flex; align-items: center; justify-content: center; gap: 10px; padding: 50px 0; color: var(--muted); font-size: 13px; }
.spinner { width: 18px; height: 18px; border-radius: 50%; border: 2px solid rgba(0, 242, 254, 0.2); border-top-color: var(--cyan); animation: spin 0.8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- 语文句子 ---------- */
.status-chips { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 16px; }
.chip {
  display: inline-flex; align-items: center; gap: 6px; padding: 7px 14px; border-radius: 99px;
  border: 1px solid rgba(255, 255, 255, 0.12); background: rgba(255, 255, 255, 0.04);
  color: var(--muted); font-size: 12.5px; transition: 0.2s;
}
.chip:hover { color: #fff; border-color: rgba(0, 242, 254, 0.35); }
.chip.active { color: #031018; background: linear-gradient(135deg, #7ff6ff, #00f2fe); border-color: transparent; font-weight: 700; }
.chip b { font-family: Consolas, monospace; font-size: 11px; }

.sent-list { display: flex; flex-direction: column; gap: 18px; }
.date-group { display: flex; flex-direction: column; gap: 10px; }
.date-head { display: flex; align-items: center; gap: 10px; font: 600 12px/1 Consolas, monospace; color: var(--cyan); letter-spacing: 0.08em; }
.date-head::after { content: ""; flex: 1; height: 1px; background: linear-gradient(90deg, rgba(0, 242, 254, 0.25), transparent); }
.sent-card { padding: 16px 18px; border-radius: 16px; display: flex; flex-direction: column; gap: 10px; }
.sent-card:hover { border-color: rgba(0, 242, 254, 0.22); }
.sent-top { display: flex; align-items: flex-start; gap: 10px; }
.sent-seq { flex: 0 0 auto; font: 700 13px/1 Consolas, monospace; color: var(--cyan); border: 1px solid rgba(0, 242, 254, 0.25); border-radius: 6px; padding: 3px 6px; margin-top: 2px; }
.sent-text { flex: 1; font-size: 17px; font-weight: 600; color: #fff; line-height: 1.6; word-break: break-word; }
.sent-badges { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
.sent-details { display: grid; grid-template-columns: 1fr; gap: 6px; padding-left: 44px; }
.detail-row { display: flex; gap: 8px; font-size: 13px; line-height: 1.7; color: #c6ddea; }
.detail-row .k { flex: 0 0 auto; color: var(--cyan); font-size: 12px; letter-spacing: 0.04em; min-width: 4.2em; }
.detail-row .v { flex: 1; min-width: 0; word-break: break-word; }
.sent-actions { display: flex; gap: 6px; flex-wrap: wrap; padding-left: 44px; }
.sent-error { margin-left: 44px; font-size: 12px; color: #ff9db0; background: rgba(255, 80, 100, 0.08); border: 1px solid rgba(255, 80, 100, 0.2); border-radius: 8px; padding: 6px 9px; }
.sent-hint { font-size: 11.5px; color: var(--muted-2); margin-left: 44px; }

/* ---------- 账号 ---------- */
.user-list { display: flex; flex-direction: column; gap: 9px; }
.user-card { display: flex; align-items: center; gap: 14px; padding: 14px 16px; border-radius: 15px; flex-wrap: wrap; }
.user-card .avatar { width: 40px; height: 40px; flex-basis: 40px; font-size: 15px; }
.user-card-main { flex: 1 1 180px; min-width: 0; }
.user-card-name { font-size: 14px; font-weight: 600; color: #f2feff; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.user-card-sub { font-size: 11.5px; color: var(--muted-2); margin-top: 2px; font-family: Consolas, monospace; }
.user-card-actions { display: flex; gap: 6px; flex-wrap: wrap; }
.role-tag { font-size: 10px; padding: 1px 7px; border-radius: 99px; border: 1px solid rgba(255, 255, 255, 0.15); color: var(--muted); }
.role-tag.admin { color: #ffe0a3; border-color: rgba(255, 204, 102, 0.35); background: rgba(255, 204, 102, 0.08); }
.role-tag.teacher { color: #9ff3ff; border-color: rgba(0, 242, 254, 0.3); background: rgba(0, 242, 254, 0.07); }
.role-tag.inactive { color: #ffb3c0; border-color: rgba(255, 80, 100, 0.3); background: rgba(255, 80, 100, 0.08); }

/* ---------- 弹窗 ---------- */
.modal-root { position: fixed; inset: 0; z-index: 100; display: flex; align-items: center; justify-content: center; padding: 20px; }
.modal-root[hidden] { display: none; }
.modal-backdrop { position: absolute; inset: 0; background: rgba(0, 4, 10, 0.72); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); animation: fade-in 0.2s ease; }
@keyframes fade-in { from { opacity: 0; } }
.modal-card {
  position: relative; z-index: 1; width: min(720px, 100%); max-height: min(88vh, 900px);
  display: flex; flex-direction: column; border-radius: 22px; overflow: hidden;
  animation: modal-in 0.32s cubic-bezier(.16, 1, .3, 1) both;
}
.modal-card.sm { width: min(460px, 100%); }
.modal-card.lg { width: min(940px, 100%); }
@keyframes modal-in { from { opacity: 0; transform: translateY(20px) scale(0.98); } }
.modal-head { display: flex; align-items: flex-start; gap: 12px; padding: 20px 22px 14px; border-bottom: 1px solid var(--line); flex: 0 0 auto; }
.modal-head-main { flex: 1; min-width: 0; }
.modal-kicker { font: 9.5px/1 Consolas, monospace; letter-spacing: 0.28em; color: rgba(0, 242, 254, 0.6); }
.modal-title { margin-top: 6px; font-size: 19px; font-weight: 700; letter-spacing: 0.02em; }
.modal-sub { margin-top: 3px; font-size: 12px; color: var(--muted); }
.modal-close { width: 34px; height: 34px; border-radius: 9px; border: 1px solid rgba(255, 255, 255, 0.12); background: rgba(255, 255, 255, 0.04); color: var(--muted); font-size: 18px; line-height: 1; display: inline-flex; align-items: center; justify-content: center; flex: 0 0 auto; }
.modal-close:hover { color: #fff; background: rgba(255, 80, 100, 0.18); border-color: rgba(255, 80, 100, 0.4); }
.modal-body { padding: 20px 22px; overflow: auto; display: flex; flex-direction: column; gap: 16px; }
.modal-foot { display: flex; align-items: center; justify-content: flex-end; gap: 9px; padding: 14px 22px; border-top: 1px solid var(--line); flex: 0 0 auto; flex-wrap: wrap; }
.modal-foot .left { margin-right: auto; display: flex; gap: 8px; flex-wrap: wrap; }

.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.form-grid .full { grid-column: 1 / -1; }
.form-grid .field > span .req { color: var(--pink); }

.segmented { display: inline-flex; gap: 4px; padding: 4px; border-radius: 11px; background: rgba(255, 255, 255, 0.05); border: 1px solid var(--line); }
.seg-btn { padding: 8px 18px; border-radius: 8px; border: 1px solid transparent; background: transparent; color: var(--muted); font-size: 13px; }
.seg-btn.active { color: #031018; background: linear-gradient(135deg, #7ff6ff, #00f2fe); font-weight: 700; }
.seg-btn:disabled { opacity: 0.55; cursor: not-allowed; }
.hint { font-size: 12px; color: var(--muted-2); line-height: 1.7; }
.hint.warn { color: #ffd28a; }

.dropzone {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px;
  min-height: 128px; padding: 20px; border-radius: 14px; text-align: center;
  border: 1px dashed rgba(0, 242, 254, 0.35); background: rgba(0, 242, 254, 0.03);
  color: var(--muted); cursor: pointer; transition: 0.2s;
}
.dropzone:hover, .dropzone.drag { border-color: rgba(0, 242, 254, 0.75); background: rgba(0, 242, 254, 0.08); color: #dffcff; }
.dropzone strong { font-size: 13.5px; color: #dffcff; font-weight: 600; }
.dropzone small { font-size: 11.5px; color: var(--muted-2); }
.dropzone .dz-icon { font-size: 26px; line-height: 1; color: var(--cyan); }

.upload-progress { display: flex; flex-direction: column; gap: 7px; }
.progress-track { height: 7px; border-radius: 99px; background: rgba(255, 255, 255, 0.08); overflow: hidden; }
.progress-fill { height: 100%; width: 0; border-radius: inherit; background: linear-gradient(90deg, var(--cyan), var(--pink)); transition: width 0.2s; }
.progress-text { font-size: 11.5px; color: var(--muted); display: flex; justify-content: space-between; }

.file-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 10px; }

/* ---------- 数学题目（文字 / 图片混合） ---------- */
.problem-add { display: flex; flex-direction: column; gap: 8px; margin: 12px 0; padding: 12px; border: 1px dashed rgba(0, 242, 254, .25); border-radius: 12px; background: rgba(0, 242, 254, .03); }
.problem-add label { font-size: 12px; color: var(--muted); }
.problem-add textarea { width: 100%; padding: 9px 11px; border-radius: 9px; border: 1px solid rgba(255, 255, 255, .14); background: rgba(2, 12, 22, .6); color: var(--text); font-size: 14px; resize: vertical; outline: none; }
.problem-add textarea:focus { border-color: rgba(0, 242, 254, .7); }
.problem-add .row { display: flex; gap: 8px; align-items: center; }
.problem-list { display: flex; flex-direction: column; gap: 8px; margin-top: 10px; }
.problem-item { padding: 10px 12px; border: 1px solid var(--line); border-radius: 12px; background: rgba(255, 255, 255, .035); }
.problem-head { display: flex; align-items: center; gap: 8px; }
.problem-seq { flex: 0 0 auto; min-width: 24px; height: 24px; padding: 0 6px; border-radius: 6px; display: inline-flex; align-items: center; justify-content: center; font: 700 12px/1 Consolas, monospace; color: #031018; background: var(--cyan); }
.problem-actions { margin-left: auto; display: flex; gap: 4px; }
.problem-body { margin-top: 8px; border-radius: 8px; overflow: hidden; background: rgba(0, 0, 0, .22); border: 1px solid rgba(255, 255, 255, .06); }
.problem-body img { display: block; width: 100%; max-height: 180px; object-fit: cover; }
.problem-text-preview { padding: 10px 12px; font-size: 13.5px; line-height: 1.75; color: #dff6ff; white-space: pre-wrap; word-break: break-word; max-height: 160px; overflow: auto; }
.problem-edit { margin-top: 8px; display: flex; flex-direction: column; gap: 6px; border-top: 1px dashed var(--line); padding-top: 8px; }
.problem-edit textarea { width: 100%; min-height: 70px; padding: 9px 11px; border-radius: 9px; border: 1px solid rgba(255, 255, 255, .14); background: rgba(2, 12, 22, .6); color: var(--text); font-size: 14px; resize: vertical; }
.problem-edit .row { display: flex; gap: 7px; justify-content: flex-end; }
.file-card { position: relative; border-radius: 12px; overflow: hidden; border: 1px solid var(--line); background: rgba(255, 255, 255, 0.04); }
.file-thumb { position: relative; aspect-ratio: 4 / 3; display: flex; align-items: center; justify-content: center; background: rgba(0, 0, 0, 0.25); overflow: hidden; }
.file-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.file-thumb .pdf { font-size: 12px; color: #ffb3c0; letter-spacing: 0.12em; }
.file-meta { padding: 7px 8px; font-size: 10.5px; color: var(--muted); display: flex; flex-direction: column; gap: 2px; }
.file-meta strong { font-weight: 500; color: #dff8ff; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.file-actions { position: absolute; top: 6px; right: 6px; display: flex; gap: 4px; opacity: 0; transition: opacity 0.2s; }
.file-card:hover .file-actions, .file-card:focus-within .file-actions { opacity: 1; }
.file-act { width: 26px; height: 26px; border-radius: 7px; border: 1px solid rgba(255, 255, 255, 0.2); background: rgba(0, 8, 16, 0.72); color: #dffcff; font-size: 12px; display: inline-flex; align-items: center; justify-content: center; }
.file-act:hover { background: rgba(0, 242, 254, 0.28); }
.file-act.danger:hover { background: rgba(255, 51, 80, 0.3); }
.file-order { position: absolute; top: 6px; left: 6px; font: 700 10px/1 Consolas, monospace; color: #031018; background: var(--cyan); border-radius: 5px; padding: 3px 5px; }

.sent-editor-list { display: flex; flex-direction: column; gap: 8px; }
.sent-row { padding: 11px 13px; border-radius: 11px; border: 1px solid var(--line); background: rgba(255, 255, 255, 0.035); display: flex; flex-direction: column; gap: 6px; }
.sent-row-main { display: flex; align-items: flex-start; gap: 9px; }
.sent-row-text { flex: 1; font-size: 14px; color: #f2feff; line-height: 1.6; word-break: break-word; }
.sent-row-actions { display: flex; gap: 4px; flex-wrap: wrap; }
.sent-row-actions .btn { padding: 4px 8px; font-size: 11px; border-radius: 6px; }
.sent-row .meta { font-size: 11.5px; color: var(--muted-2); }
.sent-editform { display: grid; grid-template-columns: 1fr; gap: 8px; padding-top: 8px; border-top: 1px dashed var(--line); }
.sent-editform label { display: flex; flex-direction: column; gap: 4px; font-size: 11px; color: var(--muted); }
.sent-editform input, .sent-editform textarea { padding: 8px 10px; font-size: 13px; border-radius: 8px; }
.sent-editform textarea { min-height: 58px; resize: vertical; }
.sent-editform .row { display: flex; gap: 7px; justify-content: flex-end; }

/* ---------- Toast ---------- */
.toast {
  position: fixed; left: 50%; bottom: 34px; z-index: 200; transform: translate(-50%, 16px);
  max-width: min(90vw, 520px); padding: 11px 18px; border-radius: 12px;
  background: rgba(4, 18, 30, 0.94); border: 1px solid rgba(0, 242, 254, 0.38);
  color: #eafcff; font-size: 13px; box-shadow: 0 16px 40px rgba(0, 0, 0, 0.5);
  opacity: 0; pointer-events: none; transition: opacity 0.25s, transform 0.25s;
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }
.toast.error { border-color: rgba(255, 80, 100, 0.55); color: #ffd6dd; }
.toast.success { border-color: rgba(56, 232, 160, 0.5); color: #d6ffec; }

/* ---------- 移动端标签栏 ---------- */
.tabbar { display: none; }
.dot { width: 7px; height: 7px; border-radius: 50%; background: var(--green); box-shadow: 0 0 8px rgba(56, 232, 160, 0.7); flex: 0 0 auto; }
.dot.warn { background: var(--amber); box-shadow: 0 0 8px rgba(255, 204, 102, 0.7); }
.dot.bad { background: var(--red); box-shadow: 0 0 8px rgba(255, 100, 120, 0.7); }

/* ---------- 响应式 ---------- */
@media (hover: none) {
  .file-actions { opacity: 1; }
}

@media (max-width: 1080px) {
  .auth-view { grid-template-columns: 1fr; justify-items: center; gap: 30px; padding: 34px 20px 50px; }
  .auth-art { max-width: 560px; text-align: center; }
  .auth-brand { justify-content: center; }
  .auth-points { display: none; }
  .auth-headline { margin: 22px 0 0; font-size: clamp(2rem, 8vw, 2.8rem); }
  .auth-foot { display: none; }
  .auth-panel { justify-self: center; width: min(440px, 100%); }
  .main-nav { display: none; }
  .tabbar {
    display: flex; position: fixed; left: 0; right: 0; bottom: 0; z-index: 50;
    height: calc(var(--tabbar-h) + env(safe-area-inset-bottom, 0px));
    padding: 6px 8px env(safe-area-inset-bottom, 0px);
    background: rgba(2, 8, 16, 0.9); border-top: 1px solid rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(20px) saturate(160%); -webkit-backdrop-filter: blur(20px) saturate(160%);
  }
  .tabbar-btn {
    flex: 1; min-width: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px;
    border: 0; background: transparent; color: var(--muted-2); border-radius: 10px; font-size: 10.5px; letter-spacing: 0.04em;
    padding: 4px 2px;
  }
  .tabbar-btn svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
  .tabbar-btn.active { color: var(--cyan); background: rgba(0, 242, 254, 0.08); }
  .main { padding-bottom: calc(var(--tabbar-h) + 30px + env(safe-area-inset-bottom, 0px)); }
  .stats { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 820px) {
  .bg-triangle { display: none; }
  .topbar { gap: 10px; padding: 0 12px; }
  .brand-text small { display: none; }
  .brand-text strong { font-size: 1.15rem; }
  .brand-mark { width: 29px; height: 29px; }
  .screen-link span { display: none; }
  .screen-link { padding: 8px; }
  .user-meta { display: none; }
  .user-chip { padding: 3px; gap: 4px; }
  .today-grid { grid-template-columns: 1fr; }
  .hw-grid { grid-template-columns: 1fr; }
  .hero { padding: 20px; align-items: flex-start; }
  .hero-actions { width: 100%; flex-direction: column; align-items: stretch; }
  .hero-actions .btn { width: 100%; }
  .filters { display: grid; grid-template-columns: 1fr 1fr; padding: 12px; }
  .filters .field { min-width: 0; }
  .filters .field.grow,
  .filters .field.full,
  .filters .filter-actions,
  .filter-count { grid-column: 1 / -1; }
  .filters .filter-actions { width: 100%; }
  .filters .filter-actions .btn { flex: 1; }
  .filter-count { margin-left: 0; width: 100%; text-align: right; }
  .detail-row { flex-direction: row; gap: 5px; }
  .detail-row .k { min-width: 3.4em; }
  .sent-details, .sent-actions, .sent-error, .sent-hint { padding-left: 0; margin-left: 0; }
  .sent-text { font-size: 16px; }
  .modal-root { padding: 0; align-items: flex-end; }
  .modal-card, .modal-card.sm, .modal-card.lg {
    width: 100%; max-height: 92vh; max-height: 92dvh; border-radius: 20px 20px 0 0; border-bottom: 0;
  }
  .modal-body { padding: 16px; }
  .modal-head { padding: 16px 16px 12px; }
  .modal-foot { padding: 12px 16px calc(12px + env(safe-area-inset-bottom, 0px)); }
  .modal-foot .btn { flex: 1 1 auto; }
  .btn.small { min-height: 38px; }
  .file-act { width: 32px; height: 32px; }
  .sent-row-actions .btn { min-height: 34px; }
  .form-grid { grid-template-columns: 1fr; }
  .file-grid { grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); }
  .toast { bottom: calc(var(--tabbar-h) + 20px + env(safe-area-inset-bottom, 0px)); }
  .page-head { align-items: flex-start; }
  .page-actions { width: 100%; }
  .page-actions .btn { flex: 1 1 auto; }
  .recent-date { width: 4.8em; }
  .recent-meta { display: none; }
  .hw-stats { gap: 10px; }
  .user-card-actions { width: 100%; justify-content: flex-end; }
}

@media (max-width: 420px) {
  .stat { padding: 14px; }
  .stat-num { font-size: 1.5rem; }
  .auth-panel { padding: 20px; }
  .subject-card { padding: 16px; }
  .hw-card { padding: 15px; }
  .sent-card { padding: 13px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; }
  .bg-grid { animation: none; }
}
