/* ============================================================
   ClassNotice 班级信息提醒助手 · 样式表
   三端共用设计令牌，按 body.page-* 分流
   ============================================================ */

:root {
  --brand: #2f7cf6;
  --brand-deep: #1b5fd0;
  --brand-soft: #eaf2ff;
  --accent: #ff8f3c;
  --ok: #12b981;
  --warn: #f59e0b;
  --danger: #ef4444;

  --bg: #f6f7fb;
  --card: #ffffff;
  --ink: #101828;
  --ink-2: #475467;
  --ink-3: #98a2b3;
  --line: #e7eaf0;

  --radius: 16px;
  --radius-sm: 12px;
  --radius-chip: 999px;
  --shadow-1: 0 1px 2px rgba(16, 24, 40, .05), 0 10px 28px -14px rgba(16, 24, 40, .22);
  --shadow-2: 0 2px 6px rgba(16, 24, 40, .06), 0 24px 48px -24px rgba(16, 24, 40, .3);

  --font: system-ui, -apple-system, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  --safe-b: env(safe-area-inset-bottom, 0px);
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }

html, body { height: 100%; }

body {
  margin: 0;
  font-family: var(--font);
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

button { font-family: inherit; cursor: pointer; border: none; background: none; color: inherit; }
input, textarea { font-family: inherit; }
[hidden] { display: none !important; }

/* ---------- 通用控件 ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 44px;
  padding: 0 18px;
  border-radius: var(--radius-chip);
  background: var(--brand);
  color: #fff;
  font-size: 15px;
  font-weight: 600;
  letter-spacing: .01em;
  transition: transform .12s ease, background .18s ease, box-shadow .18s ease;
  box-shadow: 0 6px 16px -8px rgba(47, 124, 246, .8);
}
.btn:hover { background: var(--brand-deep); }
.btn:active { transform: scale(.97); }
.btn:disabled { background: #cfd8e6; color: #fff; box-shadow: none; cursor: not-allowed; }
.btn.ghost {
  background: #fff;
  color: var(--ink-2);
  border: 1px solid var(--line);
  box-shadow: none;
  font-weight: 500;
}
.btn.ghost:hover { background: #f8fafc; color: var(--ink); }
.btn.sm { min-height: 34px; padding: 0 13px; font-size: 13px; }
.btn.pill-ok { background: var(--ok); box-shadow: 0 6px 16px -8px rgba(18, 185, 129, .8); }
.btn.pill-ok:hover { background: #0ea371; }

.field { display: block; margin-bottom: 12px; }
.field > span {
  display: block;
  font-size: 13px;
  font-weight: 500;
  color: var(--ink-2);
  margin: 0 0 6px 2px;
}
.input {
  width: 100%;
  min-height: 50px;
  padding: 13px 16px;
  border-radius: var(--radius-sm);
  border: 1.5px solid var(--line);
  background: #fff;
  font-size: 17px;
  color: var(--ink);
  transition: border-color .15s ease, box-shadow .15s ease;
  outline: none;
}
.input::placeholder { color: #b8c0cc; font-size: 15px; }
.input:focus { border-color: var(--brand); box-shadow: 0 0 0 4px rgba(47, 124, 246, .12); }
.input.code { letter-spacing: .22em; text-transform: uppercase; font-weight: 600; }
.input.digits { letter-spacing: .32em; font-weight: 600; font-variant-numeric: tabular-nums; }

.hint { font-size: 12.5px; color: var(--ink-3); line-height: 1.6; }
.form-error {
  display: none;
  margin: 2px 0 12px;
  padding: 10px 13px;
  border-radius: 10px;
  background: #fef3f2;
  color: #b42318;
  font-size: 13.5px;
  line-height: 1.5;
}
.form-error.show { display: block; animation: shake .3s ease; }
@keyframes shake {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-4px); }
  75% { transform: translateX(4px); }
}

/* 轻提示 */
#toast-host {
  position: fixed;
  left: 50%;
  bottom: calc(28px + var(--safe-b));
  transform: translateX(-50%);
  z-index: 90;
  display: flex;
  flex-direction: column;
  gap: 8px;
  align-items: center;
  pointer-events: none;
}
.toast {
  padding: 10px 18px;
  border-radius: var(--radius-chip);
  background: rgba(16, 24, 40, .92);
  color: #fff;
  font-size: 14px;
  box-shadow: var(--shadow-2);
  animation: toast-in .22s ease;
  max-width: 80vw;
}
.toast.ok { background: rgba(12, 148, 104, .95); }
.toast.err { background: rgba(190, 40, 40, .95); }
@keyframes toast-in {
  from { opacity: 0; transform: translateY(8px) scale(.96); }
  to { opacity: 1; transform: none; }
}

/* ============================================================
   家长端  page-parent
   ============================================================ */
.page-parent { display: flex; flex-direction: column; min-height: 100vh; min-height: 100dvh; }

/* 登录 */
.parent-login {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 28px 22px calc(38px + var(--safe-b));
  max-width: 480px;
  width: 100%;
  margin: 0 auto;
}
.login-mark {
  width: 62px;
  height: 62px;
  border-radius: 20px;
  display: grid;
  place-items: center;
  font-size: 30px;
  background: linear-gradient(150deg, #4b8dfb, #2f7cf6 55%, #1e63d8);
  box-shadow: 0 18px 34px -18px rgba(47, 124, 246, .95);
  margin-bottom: 20px;
}
.parent-login h1 {
  font-size: 26px;
  line-height: 1.28;
  margin: 0 0 8px;
  letter-spacing: -.02em;
}
.parent-login .sub { margin: 0 0 26px; color: var(--ink-2); font-size: 15px; line-height: 1.6; }
.parent-login .btn { width: 100%; margin-top: 6px; min-height: 52px; font-size: 16.5px; }
.login-foot { margin-top: 22px; text-align: center; }

/* 顶栏 */
.parent-top {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 13px 16px;
  background: rgba(255, 255, 255, .86);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
}
.avatar {
  width: 38px;
  height: 38px;
  flex: none;
  border-radius: 13px;
  display: grid;
  place-items: center;
  font-size: 17px;
  font-weight: 700;
  color: #fff;
  background: linear-gradient(145deg, #4b8dfb, #2f7cf6);
}
.parent-top .who { flex: 1; min-width: 0; }
.parent-top .who b { display: block; font-size: 15.5px; letter-spacing: -.01em; }
.parent-top .who span { display: block; font-size: 12.5px; color: var(--ink-3); margin-top: 1px; }
.icon-btn {
  width: 38px; height: 38px;
  border-radius: 12px;
  display: grid; place-items: center;
  font-size: 17px;
  color: var(--ink-2);
  transition: background .15s ease;
}
.icon-btn:hover { background: #f1f4f9; }

/* 消息区 */
.parent-body {
  flex: 1;
  overflow-y: auto;
  padding: 18px 14px 8px;
  max-width: 640px;
  width: 100%;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
}
/* 消息少时贴着底部显示，避免顶部一大片空白 */
.parent-body > *:first-child { margin-top: auto; }
.day-sep {
  text-align: center;
  font-size: 12px;
  color: var(--ink-3);
  margin: 6px 0 16px;
}
.bubble-row { display: flex; flex-direction: column; align-items: flex-end; margin-bottom: 16px; }
.bubble {
  max-width: 82%;
  padding: 12px 15px;
  border-radius: 18px 18px 5px 18px;
  background: linear-gradient(160deg, #3d86f8, #2f7cf6);
  color: #fff;
  font-size: 16px;
  line-height: 1.5;
  word-break: break-word;
  white-space: pre-wrap;
  box-shadow: 0 10px 22px -16px rgba(47, 124, 246, .9);
  animation: bubble-in .24s ease;
}
@keyframes bubble-in {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: none; }
}
.bubble-meta {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 6px;
  font-size: 12.5px;
  color: var(--ink-3);
}
.chip-status {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 10px;
  border-radius: var(--radius-chip);
  font-size: 13px;
  font-weight: 600;
  background: #edf0f5;
  color: #475467;
}
.chip-status.read { background: #e3eeff; color: #12459f; }
.chip-status.replied { background: #dcf7ec; color: #056247; }
.reply-card {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 8px;
  padding: 10px 14px;
  border-radius: 12px;
  background: #f2fcf7;
  border: 1px solid #bfe9d8;
  font-size: 14.5px;
  font-weight: 500;
  color: #067552;
  max-width: 82%;
  animation: bubble-in .24s ease;
}
.reply-card .rc-label {
  flex: none;
  padding: 2px 8px;
  border-radius: 6px;
  background: #0a8f63;
  color: #fff;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .04em;
}

.empty-state {
  text-align: center;
  padding: 56px 20px;
  color: var(--ink-3);
}
.empty-state .emoji { font-size: 40px; display: block; margin-bottom: 12px; opacity: .9; }
.empty-state p { margin: 0; font-size: 14px; line-height: 1.7; }

/* 快捷模板 */
.quick-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 10px 14px 2px;
  max-width: 640px;
  width: 100%;
  margin: 0 auto;
}
.quick-bar::-webkit-scrollbar { display: none; }
.quick-chip {
  flex: none;
  padding: 8px 14px;
  border-radius: var(--radius-chip);
  background: #fff;
  border: 1px solid var(--line);
  font-size: 13.5px;
  color: var(--ink-2);
  white-space: nowrap;
  transition: transform .12s ease, background .15s ease, color .15s ease;
}
.quick-chip:hover { background: var(--brand-soft); color: var(--brand-deep); border-color: #cfe0ff; }
.quick-chip:active { transform: scale(.95); }

/* 输入区 */
.composer {
  position: sticky;
  bottom: 0;
  z-index: 20;
  display: flex;
  align-items: flex-end;
  gap: 9px;
  padding: 10px 14px calc(10px + var(--safe-b));
  background: rgba(255, 255, 255, .94);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-top: 1px solid var(--line);
}
.composer-wrap { max-width: 640px; width: 100%; margin: 0 auto; display: flex; gap: 9px; align-items: flex-end; }
.composer textarea {
  flex: 1;
  min-height: 46px;
  max-height: 132px;
  padding: 12px 16px;
  border-radius: 22px;
  border: 1.5px solid var(--line);
  background: #f7f9fc;
  font-size: 16px;
  line-height: 1.45;
  color: var(--ink);
  resize: none;
  outline: none;
  transition: border-color .15s ease, background .15s ease;
}
.composer textarea:focus { border-color: var(--brand); background: #fff; box-shadow: 0 0 0 4px rgba(47, 124, 246, .1); }
.send-btn {
  flex: none;
  width: 46px; height: 46px;
  border-radius: 50%;
  display: grid; place-items: center;
  background: var(--brand);
  color: #fff;
  font-size: 19px;
  box-shadow: 0 8px 18px -10px rgba(47, 124, 246, .95);
  transition: transform .12s ease, background .18s ease;
}
.send-btn:active { transform: scale(.93); }
.send-btn:disabled { background: #d7dde7; box-shadow: none; opacity: .85; }
.counter { display: block; text-align: right; font-size: 11.5px; color: var(--ink-3); padding: 0 6px 4px; }

/* ============================================================
   教室端（电子黑板）  page-board
   ============================================================ */
.page-board {
  min-height: 100vh;
  min-height: 100dvh;
  color: #eaf0fb;
  background:
    radial-gradient(1200px 620px at 12% -8%, rgba(47, 124, 246, .28), transparent 62%),
    radial-gradient(900px 520px at 88% 4%, rgba(18, 185, 129, .16), transparent 60%),
    linear-gradient(168deg, #0a0f1e 0%, #101a30 48%, #0b1224 100%);
  background-attachment: fixed;
}

.board-login {
  min-height: 100vh;
  min-height: 100dvh;
  display: grid;
  place-items: center;
  padding: 24px;
}
.board-login .panel {
  width: 100%;
  max-width: 420px;
  padding: 34px 30px 30px;
  border-radius: 22px;
  background: rgba(255, 255, 255, .055);
  border: 1px solid rgba(255, 255, 255, .12);
  box-shadow: 0 30px 70px -40px rgba(0, 0, 0, .9);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
}
.board-login h1 { font-size: 22px; margin: 14px 0 6px; letter-spacing: -.01em; }
.board-login p.sub { margin: 0 0 22px; font-size: 14px; color: #93a2bd; line-height: 1.6; }
.board-login .mark {
  width: 54px; height: 54px; border-radius: 18px;
  display: grid; place-items: center; font-size: 26px;
  background: linear-gradient(150deg, rgba(75, 141, 251, .95), rgba(47, 124, 246, .65));
  box-shadow: 0 18px 40px -22px rgba(47, 124, 246, 1);
}
.board-login .input {
  background: rgba(255, 255, 255, .06);
  border-color: rgba(255, 255, 255, .16);
  color: #fff;
}
.board-login .input::placeholder { color: #6f7f9c; }
.board-login .input:focus { border-color: #5b9bff; background: rgba(255, 255, 255, .1); box-shadow: 0 0 0 4px rgba(91, 155, 255, .16); }
.board-login .field > span { color: #93a2bd; }
.board-login .form-error { background: rgba(239, 68, 68, .14); color: #ffb4ab; }

/* 顶栏 */
.board-head {
  position: sticky;
  top: 0;
  z-index: 15;
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 16px clamp(18px, 2.4vw, 40px);
  background: rgba(9, 14, 28, .72);
  border-bottom: 1px solid rgba(255, 255, 255, .08);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}
.board-head .title { font-size: clamp(18px, 1.9vw, 26px); font-weight: 700; letter-spacing: -.01em; }
.board-head .title small {
  display: block;
  font-size: 13.5px;
  font-weight: 500;
  color: #7e8dab;
  letter-spacing: 0;
  margin-top: 2px;
}
.board-head .spacer { flex: 1; }
.pill {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 7px 14px;
  border-radius: var(--radius-chip);
  background: rgba(255, 255, 255, .07);
  border: 1px solid rgba(255, 255, 255, .1);
  font-size: 13.5px;
  color: #b9c6dd;
  font-variant-numeric: tabular-nums;
}
.pill b { color: #fff; font-size: 15px; }
.dot { width: 8px; height: 8px; border-radius: 50%; background: var(--ok); box-shadow: 0 0 0 4px rgba(18, 185, 129, .18); }
.dot.warn { background: var(--warn); box-shadow: 0 0 0 4px rgba(245, 158, 11, .18); }
.dot.off { background: #64748b; box-shadow: 0 0 0 4px rgba(100, 116, 139, .18); }

.page-board { scrollbar-width: none; }
.page-board::-webkit-scrollbar { display: none; }

.board-main {
  display: flex;
  flex-direction: column;
  min-height: calc(100vh - 92px);
  min-height: calc(100dvh - 92px);
  padding: clamp(16px, 2vw, 30px) clamp(18px, 2.4vw, 40px) 34px;
  max-width: 1780px;
  margin: 0 auto;
  width: 100%;
}
.board-grid {
  display: grid;
  /* auto-fit：卡片少时自动撑满整屏 */
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 430px), 1fr));
  gap: clamp(14px, 1.4vw, 22px);
  align-items: stretch;
  /* margin:auto 居中；内容超过一屏时自动退化为 0，不会裁掉顶部 */
  margin: auto 0;
  width: 100%;
}

/* 消息卡片 */
.msg-card {
  position: relative;
  display: flex;
  flex-direction: column;
  padding: clamp(16px, 1.5vw, 24px) clamp(16px, 1.5vw, 26px);
  border-radius: 20px;
  background: rgba(255, 255, 255, .055);
  border: 1px solid rgba(255, 255, 255, .1);
  box-shadow: 0 24px 50px -38px rgba(0, 0, 0, .9);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  overflow: hidden;
  animation: card-in .3s cubic-bezier(.2, .8, .3, 1);
}
@keyframes card-in {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: none; }
}
.msg-card::before {
  content: "";
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 4px;
  background: #3b82f6;
}
.msg-card.is-pending {
  background: rgba(96, 165, 250, .1);
  border-color: rgba(96, 165, 250, .38);
}
.msg-card.is-pending::before { background: #60a5fa; width: 5px; }
.msg-card.is-read::before { background: #34d399; }
.msg-card.is-replied::before { background: #34d399; }
.msg-card.fresh { animation: card-in .3s cubic-bezier(.2, .8, .3, 1), pulse-ring 3s ease-out; }
@keyframes pulse-ring {
  0% { box-shadow: 0 0 0 0 rgba(96, 165, 250, .55), 0 24px 50px -38px rgba(0, 0, 0, .9); }
  70% { box-shadow: 0 0 0 14px rgba(96, 165, 250, 0), 0 24px 50px -38px rgba(0, 0, 0, .9); }
  100% { box-shadow: 0 24px 50px -38px rgba(0, 0, 0, .9); }
}

.msg-card .who {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
}
.msg-card .who .name {
  font-size: clamp(20px, 1.95vw, 32px);
  font-weight: 700;
  letter-spacing: -.01em;
}
.msg-card .who .time { font-size: clamp(14px, 1vw, 17px); color: #a3b1c9; font-variant-numeric: tabular-nums; }
.msg-card .who .badge {
  margin-left: auto;
  padding: 5px 12px;
  border-radius: var(--radius-chip);
  font-size: clamp(12.5px, .95vw, 16px);
  font-weight: 600;
  background: rgba(96, 165, 250, .16);
  color: #93c5fd;
}
.msg-card.is-read .who .badge, .msg-card.is-replied .who .badge {
  background: rgba(52, 211, 153, .14);
  color: #6ee7b7;
}
.msg-card.is-pending .who .badge.fresh {
  background: rgba(96, 165, 250, .26);
  color: #dbeafe;
  box-shadow: 0 0 0 1px rgba(96, 165, 250, .45);
}

.msg-body-wrap { position: relative; }
.msg-body {
  font-size: clamp(23px, 2.5vw, 42px);
  line-height: 1.42;
  font-weight: 500;
  letter-spacing: -.01em;
  word-break: break-word;
  white-space: pre-wrap;
  transition: filter .28s ease;
}

.msg-card.masked .msg-body { filter: blur(13px); user-select: none; }
.mask-layer {
  position: absolute;
  inset: -10px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  background: linear-gradient(180deg, rgba(11, 17, 33, .18), rgba(11, 17, 33, .5));
  cursor: pointer;
  transition: opacity .2s ease;
}
.mask-layer .mask-tip {
  padding: 12px 22px;
  border-radius: var(--radius-chip);
  background: rgba(255, 255, 255, .14);
  border: 1px solid rgba(255, 255, 255, .24);
  box-shadow: 0 10px 26px -14px rgba(0, 0, 0, .8);
  font-size: 16.5px;
  font-weight: 600;
  color: #fff;
}
.msg-card.revealed .mask-layer { display: none; }
.msg-card.revealed .msg-body { filter: none; }

.msg-actions {
  display: grid;
  /* 卡片窄时自动排成 2×2，宽时一行 4 个；按钮文字始终单行 */
  grid-template-columns: repeat(auto-fit, minmax(158px, 1fr));
  gap: 8px;
  margin-top: auto;
  padding-top: 14px;
  border-top: 1px solid rgba(255, 255, 255, .07);
}
.msg-actions .act.read-act { grid-column: 1 / -1; }
.msg-actions .act { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
@media (max-width: 560px) {
  .msg-actions { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
.act {
  min-height: clamp(44px, 3.6vh, 56px);
  padding: 0 clamp(15px, 1.3vw, 22px);
  border-radius: var(--radius-chip);
  font-size: clamp(14.5px, 1.15vw, 20px);
  font-weight: 600;
  color: #d5deef;
  background: rgba(255, 255, 255, .07);
  border: 1px solid rgba(255, 255, 255, .12);
  transition: transform .12s ease, background .16s ease, color .16s ease;
}
.act:hover { background: rgba(255, 255, 255, .14); color: #fff; }
.act:active { transform: scale(.96); }
.act.primary { background: rgba(52, 211, 153, .16); border-color: rgba(52, 211, 153, .35); color: #6ee7b7; }
.act.primary:hover { background: rgba(52, 211, 153, .26); }
.act[disabled] { opacity: .45; cursor: default; }
.act-sep { display: none; }

/* 空态 */
.board-empty {
  text-align: center;
  padding: clamp(60px, 12vh, 140px) 20px;
  color: #7e8dab;
}
.board-empty .big { font-size: clamp(46px, 6vw, 76px); margin-bottom: 18px; opacity: .75; }
.board-empty h2 { font-size: clamp(20px, 2.2vw, 30px); color: #cfd9ea; margin: 0 0 10px; font-weight: 600; }
.board-empty p { margin: 0; font-size: 15px; line-height: 1.7; }

/* ============================================================
   管理端  page-admin
   ============================================================ */
.page-admin { min-height: 100vh; min-height: 100dvh; }
.admin-shell { max-width: 1080px; margin: 0 auto; padding: 26px 20px 70px; }

.admin-login { min-height: 100vh; min-height: 100dvh; display: grid; place-items: center; padding: 24px; }
.admin-login .panel {
  width: 100%;
  max-width: 380px;
  padding: 30px 28px;
  background: #fff;
  border-radius: 20px;
  box-shadow: var(--shadow-2);
  border: 1px solid var(--line);
}
.admin-login h1 { font-size: 20px; margin: 12px 0 6px; }
.admin-login p { margin: 0 0 20px; font-size: 13.5px; color: var(--ink-2); }

.admin-head {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 22px;
}
.admin-head h1 { font-size: 22px; margin: 0; letter-spacing: -.02em; }
.admin-head .spacer { flex: 1; }

.panel-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-1);
  padding: 20px;
  margin-bottom: 18px;
}
.panel-card > h2 {
  font-size: 15px;
  margin: 0 0 14px;
  color: var(--ink);
  letter-spacing: -.01em;
  display: flex;
  align-items: center;
  gap: 8px;
}
.panel-card > h2 .muted { font-weight: 400; color: var(--ink-3); font-size: 12.5px; }

.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
@media (max-width: 640px) {
  .grid-2, .grid-3 { grid-template-columns: 1fr; }
}

.class-list { display: grid; gap: 10px; }
.class-row {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 16px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--line);
  background: #fff;
  cursor: pointer;
  transition: border-color .15s ease, background .15s ease, transform .12s ease;
  text-align: left;
  width: 100%;
}
.class-row:hover { border-color: #cfe0ff; background: #fafcff; }
.class-row.active { border-color: var(--brand); background: var(--brand-soft); }
.class-row .cname { font-weight: 600; font-size: 15px; }
.class-row .cmeta { font-size: 12.5px; color: var(--ink-3); margin-top: 3px; }
.code-tag {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-weight: 700;
  letter-spacing: .1em;
  padding: 5px 10px;
  border-radius: 8px;
  background: #f1f4f9;
  color: var(--ink-2);
  font-size: 13px;
}

table.tbl { width: 100%; border-collapse: collapse; font-size: 14px; }
table.tbl th {
  text-align: left;
  font-size: 12px;
  font-weight: 600;
  color: var(--ink-3);
  padding: 8px 10px;
  border-bottom: 1px solid var(--line);
  white-space: nowrap;
}
table.tbl td { padding: 10px; border-bottom: 1px solid #f2f4f8; }
table.tbl tr:last-child td { border-bottom: none; }
table.tbl .mono {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-weight: 600;
  letter-spacing: .12em;
}
.tbl-wrap { max-height: 460px; overflow: auto; border-radius: var(--radius-sm); }

textarea.bulk {
  width: 100%;
  min-height: 132px;
  padding: 13px 15px;
  border-radius: var(--radius-sm);
  border: 1.5px dashed #c8d3e4;
  background: #fbfcfe;
  font-size: 15px;
  line-height: 1.7;
  resize: vertical;
  outline: none;
  transition: border-color .15s ease, background .15s ease;
}
textarea.bulk:focus { border-color: var(--brand); background: #fff; }

.row-actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.divider { height: 1px; background: var(--line); margin: 16px 0; }
.toast-inline {
  padding: 10px 13px;
  border-radius: 10px;
  background: #ecfdf5;
  color: #047857;
  font-size: 13.5px;
  margin-bottom: 12px;
  display: none;
}
.toast-inline.show { display: block; }
.toast-inline.warn { background: #fffbeb; color: #b45309; }

@media print {
  body { background: #fff; }
  .panel-card, .admin-head .spacer, .btn, .row-actions { display: none !important; }
  .tbl-wrap { max-height: none; overflow: visible; }
  table.tbl td, table.tbl th { border-color: #ddd; font-size: 13px; }
}

/* 移动端适配 */
@media (max-width: 480px) {
  .parent-login h1 { font-size: 23px; }
  .bubble { max-width: 88%; }
  .board-head { flex-wrap: wrap; gap: 10px; }
  .board-head .pill { font-size: 12.5px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; transition-duration: .001ms !important; }
}
