/* ============================================================
   远程打印 · 设计系统
   延续「二小之声」广播稿工具的浅蓝卡片风格，扩展移动端与打印样式
   ============================================================ */

*,
*::before,
*::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --blue: #2f6fed;
  --blue-dark: #1d4ed8;
  --blue-light: #eef4ff;
  --blue-soft: #dbe8ff;
  --orange: #ff8a00;
  --orange-dark: #e67a00;
  --orange-light: #fff7ed;
  --green: #10b981;
  --green-light: #ecfdf5;
  --red: #ef4444;
  --red-light: #fef2f2;
  --amber: #f59e0b;
  --amber-light: #fffbeb;
  --purple: #8b5cf6;
  --purple-light: #f5f3ff;

  --g900: #111827;
  --g800: #1f2937;
  --g700: #374151;
  --g600: #4b5563;
  --g500: #6b7280;
  --g400: #9ca3af;
  --g300: #d1d5db;
  --g200: #e5e7eb;
  --g100: #f3f4f6;
  --g50: #f9fafb;

  --bg: #f5f7fb;
  --card: #ffffff;
  --border: #e5e7eb;
  --border-strong: #d5dbe6;

  --radius: 16px;
  --radius-sm: 10px;
  --radius-lg: 22px;
  --shadow-xs: 0 1px 2px rgba(16, 24, 40, .04);
  --shadow-sm: 0 2px 8px rgba(16, 24, 40, .05);
  --shadow-md: 0 10px 30px rgba(24, 45, 90, .08);
  --shadow-lg: 0 24px 70px rgba(10, 40, 100, .18);

  --font: system-ui, -apple-system, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans SC", sans-serif;
  --print-font: "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans SC", sans-serif;
}

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

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--g900);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  min-height: 100vh;
}

button { font-family: inherit; cursor: pointer; border: none; background: none; color: inherit; }
input, select, textarea, button { font-family: inherit; font-size: 14px; }
a { color: var(--blue); text-decoration: none; }
a:hover { text-decoration: underline; }
img { max-width: 100%; display: block; }
svg { display: block; }
.hidden { display: none !important; }
.muted { color: var(--g500); }
.small { font-size: 12.5px; }
.mono { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; }
.nowrap { white-space: nowrap; }
.text-center { text-align: center; }
.mt-0 { margin-top: 0 !important; }
.mt-8 { margin-top: 8px; }
.mt-12 { margin-top: 12px; }
.mt-16 { margin-top: 16px; }
.mt-24 { margin-top: 24px; }
.mb-8 { margin-bottom: 8px; }
.mb-12 { margin-bottom: 12px; }
.mb-16 { margin-bottom: 16px; }
.mb-24 { margin-bottom: 24px; }
.flex { display: flex; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.gap-8 { gap: 8px; }
.gap-12 { gap: 12px; }
.gap-16 { gap: 16px; }
.grow { flex: 1; min-width: 0; }
.wrap { flex-wrap: wrap; }

/* ---------- 图标 ---------- */
.ic {
  width: 18px;
  height: 18px;
  flex: none;
  stroke: currentColor;
  fill: none;
  stroke-width: 1.9;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.ic-sm { width: 15px; height: 15px; }
.ic-lg { width: 24px; height: 24px; }
.ic-xl { width: 30px; height: 30px; }

/* ---------- 按钮 ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 9px 17px;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 600;
  line-height: 1.2;
  border: 1px solid transparent;
  transition: background .16s, border-color .16s, color .16s, box-shadow .16s, transform .1s;
  white-space: nowrap;
  user-select: none;
}
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: .5; cursor: not-allowed; transform: none; }
.btn-primary { background: var(--blue); color: #fff; box-shadow: 0 4px 14px rgba(47, 111, 237, .22); }
.btn-primary:hover:not(:disabled) { background: var(--blue-dark); }
.btn-ghost { background: #fff; border-color: var(--border); color: var(--g700); }
.btn-ghost:hover:not(:disabled) { border-color: #b9ccf3; color: var(--blue); background: #fbfdff; }
.btn-soft { background: var(--blue-light); color: var(--blue); }
.btn-soft:hover:not(:disabled) { background: var(--blue-soft); }
.btn-orange { background: linear-gradient(135deg, #ff9a2e, var(--orange)); color: #fff; box-shadow: 0 6px 18px rgba(255, 138, 0, .28); }
.btn-orange:hover:not(:disabled) { background: linear-gradient(135deg, #ffa942, var(--orange-dark)); }
.btn-danger { background: var(--red-light); color: #dc2626; }
.btn-danger:hover:not(:disabled) { background: #fee2e2; }
.btn-white { background: #fff; color: var(--blue); border-color: #c9d8f8; }
.btn-white:hover:not(:disabled) { border-color: var(--blue); }
.btn-lg { padding: 13px 26px; font-size: 15.5px; border-radius: 12px; }
.btn-sm { padding: 6px 11px; font-size: 12.5px; border-radius: 8px; gap: 5px; }
.btn-block { width: 100%; }
.btn-icon { width: 38px; height: 38px; padding: 0; border-radius: 10px; }
.btn-icon.btn-sm { width: 30px; height: 30px; border-radius: 8px; }
.btn-link { color: var(--blue); font-weight: 600; padding: 4px 2px; font-size: 13px; }
.btn-link:hover { text-decoration: underline; }

/* ---------- 表单 ---------- */
.input, .select, .textarea {
  width: 100%;
  padding: 10px 13px;
  border: 1px solid var(--border);
  border-radius: 10px;
  font-size: 14px;
  outline: none;
  transition: border-color .15s, box-shadow .15s;
  background: #fff;
  color: var(--g900);
  min-height: 42px;
}
.input::placeholder, .textarea::placeholder { color: var(--g400); }
.input:focus, .select:focus, .textarea:focus {
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(47, 111, 237, .13);
}
.input:disabled, .select:disabled { background: var(--g100); color: var(--g500); }
.textarea { resize: vertical; line-height: 1.75; min-height: 110px; }
.select { appearance: none; background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%236b7280' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 12px center; padding-right: 34px; }
.field { margin-bottom: 15px; }
.field > label { display: block; font-size: 12.5px; color: var(--g600); font-weight: 600; margin-bottom: 6px; }
.field-hint { font-size: 12px; color: var(--g500); margin-top: 6px; line-height: 1.6; }
.field-error { font-size: 12px; color: var(--red); margin-top: 5px; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0 16px; }
.form-grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0 16px; }
.input-group { display: flex; gap: 8px; }
.input-group .input { flex: 1; }

.pw-wrap { position: relative; }
.pw-wrap .input { padding-right: 44px; }
.pw-toggle {
  position: absolute; right: 6px; top: 50%; transform: translateY(-50%);
  width: 32px; height: 32px; border-radius: 8px; display: flex; align-items: center; justify-content: center;
  color: var(--g500);
}
.pw-toggle:hover { background: var(--g100); color: var(--g700); }

/* 开关 */
.switch {
  position: relative; display: inline-flex; align-items: center; gap: 10px;
  cursor: pointer; user-select: none;
}
.switch input { position: absolute; opacity: 0; width: 0; height: 0; }
.switch-track {
  width: 42px; height: 24px; border-radius: 20px; background: var(--g300);
  position: relative; transition: background .18s; flex: none;
}
.switch-track::after {
  content: ""; position: absolute; top: 3px; left: 3px; width: 18px; height: 18px;
  border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.2);
  transition: transform .18s;
}
.switch input:checked + .switch-track { background: var(--blue); }
.switch input:checked + .switch-track::after { transform: translateX(18px); }
.switch-label { font-size: 13.5px; color: var(--g700); }

/* 选择芯片 */
.chip-btn {
  display: inline-flex; align-items: center; gap: 6px; padding: 8px 14px;
  border: 1px solid var(--border); border-radius: 10px; background: #fff;
  font-size: 13px; font-weight: 500; color: var(--g600); transition: .15s;
}
.chip-btn:hover { border-color: #b9ccf3; color: var(--blue); }
.chip-btn.active { border-color: var(--blue); background: var(--blue-light); color: var(--blue); font-weight: 600; }
.chip-btn input { display: none; }

/* ---------- 卡片 / 基础块 ---------- */
.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-xs);
}
.card-pad { padding: 20px 22px; }
.card-head {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 16px 20px; border-bottom: 1px solid var(--border);
}
.card-title { font-size: 15px; font-weight: 700; color: var(--g900); display: flex; align-items: center; gap: 8px; }
.card-body { padding: 20px; }
.divider { height: 1px; background: var(--border); margin: 18px 0; border: none; }

.tag {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 3px 9px; border-radius: 999px; font-size: 11.5px; font-weight: 600;
  line-height: 1.5; white-space: nowrap;
}
.tag-draft { background: #f3f4f6; color: #4b5563; }
.tag-pending { background: #fff7e6; color: #b45309; }
.tag-printed { background: #d1fae5; color: #047857; }
.tag-revoked { background: #fee2e2; color: #b91c1c; }
.tag-blue { background: var(--blue-light); color: var(--blue-dark); }
.tag-purple { background: var(--purple-light); color: #6d28d9; }
.tag-issue { background: var(--red-light); color: #b91c1c; }

.status-pill {
  display: inline-flex; align-items: center; gap: 6px; padding: 5px 10px;
  border-radius: 999px; font-size: 12px; font-weight: 600;
}
.status-pill::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.status-ok { background: var(--green-light); color: #047857; }
.status-warn { background: var(--amber-light); color: #b45309; }
.status-off { background: var(--g100); color: var(--g500); }

/* ---------- Toast ---------- */
.toast {
  position: fixed; left: 50%; bottom: 30px; transform: translate(-50%, 16px);
  background: #111827; color: #fff; padding: 12px 20px; border-radius: 12px;
  font-size: 13.5px; font-weight: 500; opacity: 0; pointer-events: none;
  transition: opacity .24s, transform .24s; z-index: 3000;
  box-shadow: 0 12px 34px rgba(0, 0, 0, .28); max-width: min(90vw, 460px);
  display: flex; align-items: center; gap: 9px; line-height: 1.5;
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }
.toast.success { background: #065f46; }
.toast.error { background: #991b1b; }
.toast .ic { color: #fff; }
@media (max-width: 900px) {
  .toast { bottom: 94px; }
}
body.print-app .toast { bottom: 112px; }

/* ---------- 弹窗 ---------- */
.modal {
  position: fixed; inset: 0; z-index: 3200; display: flex; align-items: center; justify-content: center;
  padding: 20px; opacity: 0; pointer-events: none; transition: opacity .18s;
}
.modal.open { opacity: 1; pointer-events: auto; }
.modal-backdrop { position: absolute; inset: 0; background: rgba(17, 24, 39, .5); backdrop-filter: blur(2px); }
.modal-card {
  position: relative; background: #fff; border-radius: 20px; width: 100%; max-width: 460px;
  box-shadow: var(--shadow-lg); transform: translateY(12px) scale(.98); transition: transform .2s;
  max-height: min(86vh, 760px); display: flex; flex-direction: column;
}
.modal.open .modal-card { transform: none; }
.modal-head { padding: 20px 22px 0; }
.modal-head h3 { font-size: 17px; font-weight: 700; }
.modal-head p { font-size: 13px; color: var(--g500); margin-top: 5px; line-height: 1.6; }
.modal-body { padding: 18px 22px; overflow-y: auto; }
.modal-foot { padding: 0 22px 20px; display: flex; gap: 10px; justify-content: flex-end; }
.modal-foot .btn { min-width: 84px; }

/* ---------- 通用空态 / 加载 ---------- */
.empty { text-align: center; padding: 46px 20px; color: var(--g500); font-size: 13.5px; line-height: 1.8; }
.empty .ic { width: 40px; height: 40px; margin: 0 auto 12px; color: var(--g300); stroke-width: 1.5; }
.spinner {
  width: 18px; height: 18px; border: 2px solid rgba(255,255,255,.35); border-top-color: #fff;
  border-radius: 50%; animation: spin .7s linear infinite; flex: none;
}
.spinner.blue { border-color: rgba(47,111,237,.2); border-top-color: var(--blue); }
@keyframes spin { to { transform: rotate(360deg); } }
.loading-line { display: flex; align-items: center; gap: 10px; color: var(--g500); font-size: 13px; }
.skeleton {
  background: linear-gradient(90deg, #eef1f6 25%, #f7f9fc 37%, #eef1f6 63%);
  background-size: 400% 100%; animation: shimmer 1.3s ease infinite; border-radius: 8px;
}
@keyframes shimmer { 0% { background-position: 100% 50%; } 100% { background-position: 0 50%; } }

/* ============================================================
   登录 / 初始化
   ============================================================ */
.auth-page {
  min-height: 100vh; display: flex; align-items: center; justify-content: center;
  padding: 24px; position: relative; overflow: hidden;
  background: linear-gradient(145deg, #2f6fed 0%, #5b9cff 52%, #8cc4ff 100%);
}
.auth-bg { position: absolute; inset: 0; overflow: hidden; pointer-events: none; }
.auth-bg::before, .auth-bg::after {
  content: ""; position: absolute; border-radius: 50%; filter: blur(2px); opacity: .2; background: #fff;
}
.auth-bg::before { width: 460px; height: 460px; top: -170px; right: -120px; }
.auth-bg::after { width: 320px; height: 320px; bottom: -140px; left: -110px; opacity: .14; }
.auth-orb {
  position: absolute; border-radius: 50%; background: radial-gradient(circle at 30% 30%, rgba(255,255,255,.6), rgba(255,255,255,0));
  pointer-events: none;
}
.auth-orb.o1 { width: 220px; height: 220px; top: 12%; left: 8%; opacity: .35; }
.auth-orb.o2 { width: 120px; height: 120px; bottom: 18%; right: 14%; opacity: .5; }
.auth-card {
  position: relative; width: 100%; max-width: 424px; background: #fff; border-radius: 24px;
  padding: 34px 32px 28px; box-shadow: var(--shadow-lg);
}
.auth-brand { text-align: center; margin-bottom: 24px; }
.auth-logo {
  width: 62px; height: 62px; border-radius: 19px; margin: 0 auto 14px;
  display: flex; align-items: center; justify-content: center;
  background: linear-gradient(135deg, #2f6fed, #6aa6ff); color: #fff;
  box-shadow: 0 10px 24px rgba(47, 111, 237, .3);
}
.auth-logo .ic { width: 30px; height: 30px; stroke-width: 1.8; }
.auth-brand h1 { font-size: 23px; letter-spacing: 2px; font-weight: 800; color: var(--g900); }
.auth-sub { font-size: 12.5px; color: var(--g500); margin-top: 7px; letter-spacing: .3px; }
.auth-tabs { display: flex; background: var(--g100); border-radius: 12px; padding: 4px; margin-bottom: 20px; }
.auth-tab {
  flex: 1; padding: 9px; border-radius: 9px; font-size: 13.5px; font-weight: 600;
  color: var(--g500); transition: .16s;
}
.auth-tab.active { background: #fff; color: var(--blue); box-shadow: 0 1px 5px rgba(0, 0, 0, .09); }
.auth-form .field { margin-bottom: 13px; }
.auth-error {
  background: var(--red-light); color: #b91c1c; border: 1px solid #fecaca;
  padding: 10px 13px; border-radius: 10px; font-size: 12.5px; line-height: 1.6;
  margin-bottom: 13px;
}
.auth-error:empty { display: none; }
.auth-note {
  margin-top: 16px; padding: 11px 13px; border-radius: 10px; background: var(--blue-light);
  color: #1e40af; font-size: 12px; line-height: 1.7; text-align: center;
}
.auth-help { margin-top: 14px; text-align: center; font-size: 12.5px; color: var(--g500); }
.auth-help a { font-weight: 600; }
.auth-foot { margin-top: 18px; text-align: center; font-size: 11.5px; color: var(--g400); }
.auth-setup-head {
  background: var(--blue-light); border: 1px solid #d7e4ff; border-radius: 12px;
  padding: 13px 15px; margin-bottom: 18px; font-size: 12.5px; color: #1e40af; line-height: 1.7;
}
.auth-setup-head b { display: block; font-size: 13.5px; margin-bottom: 3px; color: var(--blue-dark); }
.auth-db-error {
  background: #fff7ed; border: 1px solid #fed7aa; color: #9a3412; border-radius: 12px;
  padding: 14px 16px; font-size: 12.5px; line-height: 1.85; margin-bottom: 16px;
}
.auth-db-error code { background: rgba(255,255,255,.7); padding: 1px 5px; border-radius: 4px; font-size: 11.5px; }

/* ============================================================
   应用外壳（家长端）
   ============================================================ */
.app-header {
  height: 66px; background: rgba(255,255,255,.92); backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border); display: flex; align-items: center;
  gap: 26px; padding: 0 28px; position: sticky; top: 0; z-index: 100;
}
.brand { display: flex; align-items: center; gap: 10px; flex: none; }
.brand-logo {
  width: 34px; height: 34px; border-radius: 10px; color: #fff;
  background: linear-gradient(135deg, #2f6fed, #6aa6ff);
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 4px 12px rgba(47, 111, 237, .25);
}
.brand-logo .ic { width: 19px; height: 19px; }
.brand-name { font-size: 16px; font-weight: 800; letter-spacing: .8px; }
.brand-sub { font-size: 10.5px; color: var(--g400); letter-spacing: .5px; margin-top: 1px; }
.tabs { display: flex; gap: 3px; align-items: center; }
.tab {
  display: flex; align-items: center; gap: 6px; padding: 8px 13px; border-radius: 9px;
  font-size: 13.5px; color: var(--g500); font-weight: 600; transition: .15s; white-space: nowrap;
}
.tab .ic { width: 16px; height: 16px; }
.tab:hover { background: var(--g100); color: var(--g700); }
.tab.active { background: var(--blue-light); color: var(--blue); }
.header-right { margin-left: auto; display: flex; align-items: center; gap: 12px; flex: none; }
.header-icon {
  position: relative; width: 38px; height: 38px; border-radius: 10px; display: flex;
  align-items: center; justify-content: center; color: var(--g600); transition: .15s;
}
.header-icon:hover { background: var(--g100); color: var(--g800); }
.badge-dot {
  position: absolute; top: 6px; right: 6px; min-width: 17px; height: 17px; padding: 0 4px;
  border-radius: 9px; background: var(--red); color: #fff; font-size: 10px; font-weight: 700;
  display: flex; align-items: center; justify-content: center; border: 2px solid #fff;
  box-sizing: content-box;
}
.badge-dot:empty, .badge-dot.zero { display: none; }
.user-chip { display: flex; align-items: center; gap: 9px; padding: 4px 6px 4px 4px; border-radius: 12px; }
.user-chip:hover { background: var(--g100); }
.user-chip .name { font-size: 13px; font-weight: 600; color: var(--g700); }
.user-chip .role { font-size: 10.5px; color: var(--g400); }
.avatar {
  width: 34px; height: 34px; border-radius: 50%; display: flex; align-items: center; justify-content: center;
  background: linear-gradient(135deg, #dbe8ff, #b9d2ff); color: var(--blue-dark);
  font-size: 13px; font-weight: 700; flex: none; overflow: hidden;
}
.avatar-lg { width: 52px; height: 52px; font-size: 19px; }
.avatar-sm { width: 28px; height: 28px; font-size: 11.5px; }
.avatar-orange { background: linear-gradient(135deg, #ffe0b8, #ffc37a); color: #b45309; }

.app-main { max-width: 1240px; margin: 0 auto; padding: 26px 28px 60px; }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 20px; flex-wrap: wrap; }
.page-title { font-size: 21px; font-weight: 800; letter-spacing: .3px; }
.page-sub { font-size: 13px; color: var(--g500); margin-top: 5px; line-height: 1.6; }
.page-actions { display: flex; gap: 9px; flex-wrap: wrap; }

/* 通知面板 */
.notif-panel {
  position: absolute; top: 56px; right: 0; width: 360px; max-height: 480px; overflow: hidden;
  background: #fff; border: 1px solid var(--border); border-radius: 16px; box-shadow: var(--shadow-md);
  z-index: 300; display: flex; flex-direction: column;
}
.notif-panel.hidden { display: none !important; }
.notif-head { display: flex; align-items: center; justify-content: space-between; padding: 14px 16px; border-bottom: 1px solid var(--border); }
.notif-head h4 { font-size: 14px; font-weight: 700; }
.notif-list { overflow-y: auto; }
.notif-item { display: flex; gap: 11px; padding: 13px 16px; border-bottom: 1px solid #f1f4f8; transition: background .15s; }
.notif-item:hover { background: var(--g50); }
.notif-item:last-child { border-bottom: none; }
.notif-item.unread { background: #f8fbff; }
.notif-icon {
  width: 34px; height: 34px; border-radius: 10px; display: flex; align-items: center; justify-content: center;
  background: var(--green-light); color: #047857; flex: none;
}
.notif-icon.issue { background: var(--red-light); color: #b91c1c; }
.notif-main { flex: 1; min-width: 0; }
.notif-title { font-size: 13px; font-weight: 600; line-height: 1.5; }
.notif-body { font-size: 12px; color: var(--g500); margin-top: 3px; line-height: 1.55; word-break: break-word; }
.notif-time { font-size: 11px; color: var(--g400); margin-top: 5px; }
.notif-foot { padding: 10px 16px; border-top: 1px solid var(--border); display: flex; justify-content: space-between; align-items: center; }

/* ============================================================
   家长工作台
   ============================================================ */
.stat-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-bottom: 20px; }
.stat-card {
  background: #fff; border: 1px solid var(--border); border-radius: var(--radius);
  padding: 17px 18px; display: flex; align-items: flex-start; justify-content: space-between; gap: 10px;
  box-shadow: var(--shadow-xs); transition: transform .16s, box-shadow .16s;
}
.stat-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-sm); }
.stat-num { font-size: 28px; font-weight: 800; line-height: 1.05; letter-spacing: -.5px; }
.stat-num.blue { color: var(--blue); }
.stat-num.orange { color: var(--orange); }
.stat-num.green { color: var(--green); }
.stat-num.purple { color: var(--purple); }
.stat-label { font-size: 12.5px; color: var(--g500); margin-top: 7px; font-weight: 500; }
.stat-icon {
  width: 38px; height: 38px; border-radius: 11px; display: flex; align-items: center; justify-content: center;
  background: var(--blue-light); color: var(--blue); flex: none;
}
.stat-icon.orange { background: var(--orange-light); color: var(--orange); }
.stat-icon.green { background: var(--green-light); color: var(--green); }
.stat-icon.purple { background: var(--purple-light); color: var(--purple); }

.dash-grid { display: grid; grid-template-columns: minmax(0, 1.7fr) minmax(300px, 1fr); gap: 18px; align-items: start; }
.dash-main { display: flex; flex-direction: column; gap: 18px; min-width: 0; }
.dash-side { display: flex; flex-direction: column; gap: 18px; min-width: 0; }

.recent-list { display: flex; flex-direction: column; }
.job-row {
  display: flex; align-items: center; gap: 13px; padding: 13px 20px;
  border-bottom: 1px solid #f1f4f8; transition: background .14s; cursor: pointer;
}
.job-row:hover { background: #fafcff; }
.job-row:last-child { border-bottom: none; }
.job-icon {
  width: 40px; height: 40px; border-radius: 11px; background: var(--blue-light); color: var(--blue);
  display: flex; align-items: center; justify-content: center; flex: none;
}
.job-icon.pdf { background: #fff1f0; color: #e2473d; }
.job-icon.image { background: var(--green-light); color: #059669; }
.job-icon.docx { background: #eff6ff; color: #2563eb; }
.job-icon.text { background: var(--purple-light); color: var(--purple); }
.job-main { flex: 1; min-width: 0; }
.job-title { font-size: 14px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.job-meta { display: flex; gap: 12px; flex-wrap: wrap; font-size: 12px; color: var(--g500); margin-top: 4px; }
.job-side { display: flex; align-items: center; gap: 8px; flex: none; }
.job-actions { display: flex; align-items: center; gap: 4px; }

.trend-card { padding: 18px 20px; }
.trend-bars { display: flex; align-items: flex-end; justify-content: space-between; gap: 8px; height: 108px; margin-top: 8px; }
.trend-col { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 7px; height: 100%; justify-content: flex-end; }
.trend-bar {
  width: 100%; max-width: 32px; min-height: 4px; border-radius: 6px 6px 3px 3px;
  background: linear-gradient(to top, #4a86f7, #8fb6ff); transition: height .4s;
  position: relative;
}
.trend-bar.today { background: linear-gradient(to top, var(--blue), #2f6fed); }
.trend-bar[data-count="0"] { background: #e8eef9; }
.trend-value { font-size: 11px; color: var(--g500); font-weight: 600; }
.trend-label { font-size: 11px; color: var(--g400); }

.child-mini-list { display: flex; flex-direction: column; gap: 10px; }
.child-mini {
  display: flex; align-items: center; gap: 11px; padding: 10px 12px; border-radius: 12px;
  border: 1px solid var(--border); background: #fff; transition: .15s;
}
.child-mini:hover { border-color: #c4d6f7; background: #fbfdff; }
.child-mini .info { flex: 1; min-width: 0; }
.child-mini .name { font-size: 13.5px; font-weight: 600; }
.child-mini .meta { font-size: 11.5px; color: var(--g500); margin-top: 3px; }

.checklist { display: flex; flex-direction: column; gap: 8px; }
.check-item {
  display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 10px;
  background: var(--g50); font-size: 12.5px; color: var(--g600);
}
.check-item .ic { color: var(--g400); flex: none; }
.check-item.done { background: var(--green-light); color: #047857; }
.check-item.done .ic { color: #047857; }
.check-item a { margin-left: auto; font-weight: 600; font-size: 12px; }

.config-pills { display: flex; flex-wrap: wrap; gap: 7px; }
.config-pill {
  display: inline-flex; align-items: center; gap: 5px; padding: 5px 9px; border-radius: 8px;
  font-size: 11.5px; font-weight: 600; background: var(--g100); color: var(--g500);
}
.config-pill.ok { background: var(--green-light); color: #047857; }
.config-pill.warn { background: var(--amber-light); color: #b45309; }

/* ============================================================
   上传向导
   ============================================================ */
.wizard { display: flex; flex-direction: column; gap: 18px; }
.steps {
  display: flex; align-items: center; background: #fff; border: 1px solid var(--border);
  border-radius: var(--radius); padding: 14px 22px; box-shadow: var(--shadow-xs); overflow-x: auto;
}
.step { display: flex; align-items: center; gap: 9px; font-size: 13px; color: var(--g500); flex: 1; white-space: nowrap; min-width: 0; }
.step-num {
  width: 26px; height: 26px; border-radius: 50%; background: var(--g100); color: var(--g500);
  display: flex; align-items: center; justify-content: center; font-size: 12.5px; font-weight: 700; flex: none;
}
.step.active { color: var(--blue); font-weight: 700; }
.step.active .step-num { background: var(--blue); color: #fff; box-shadow: 0 0 0 4px rgba(47,111,237,.12); }
.step.done { color: #047857; }
.step.done .step-num { background: #d1fae5; color: #047857; }
.step-line { width: 30px; height: 1.5px; background: var(--border); margin: 0 14px; flex: none; }

.wizard-panel { display: grid; grid-template-columns: minmax(0, 1fr) 330px; gap: 18px; align-items: start; }
.wizard-main { min-width: 0; display: flex; flex-direction: column; gap: 16px; }
.wizard-side { position: sticky; top: 86px; display: flex; flex-direction: column; gap: 16px; }

.dropzone {
  border: 2px dashed #c8d6ef; border-radius: var(--radius); background: #fbfdff;
  padding: 40px 22px; text-align: center; transition: .18s; cursor: pointer;
}
.dropzone:hover, .dropzone.drag { border-color: var(--blue); background: var(--blue-light); }
.dropzone .drop-icon {
  width: 56px; height: 56px; border-radius: 16px; margin: 0 auto 14px;
  background: #fff; border: 1px solid #dbe6fa; display: flex; align-items: center; justify-content: center;
  color: var(--blue); box-shadow: var(--shadow-sm);
}
.dropzone h3 { font-size: 15px; font-weight: 700; margin-bottom: 6px; }
.dropzone p { font-size: 12.5px; color: var(--g500); line-height: 1.7; }
.dropzone .drop-formats { margin-top: 12px; display: flex; gap: 6px; justify-content: center; flex-wrap: wrap; }
.dropzone .fmt { font-size: 10.5px; font-weight: 700; color: var(--g500); background: #fff; border: 1px solid var(--border); padding: 3px 7px; border-radius: 5px; }

.file-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 12px; }
.file-grid > * { min-width: 0; }
.file-card {
  position: relative; border: 1px solid var(--border); border-radius: 12px; overflow: hidden;
  background: #fff; transition: .16s; min-width: 0;
}
.file-card:hover { border-color: #c4d6f7; box-shadow: var(--shadow-sm); }
.file-card.dragging { opacity: .5; }
.file-thumb {
  height: 106px; background: #f1f5fb; display: flex; align-items: center; justify-content: center;
  overflow: hidden; position: relative; min-width: 0;
}
.file-thumb img { width: 100%; height: 100%; object-fit: cover; min-width: 0; }
.file-thumb.clickable { cursor: zoom-in; }
.file-zoom {
  position: absolute; right: 6px; bottom: 6px; width: 24px; height: 24px; border-radius: 7px;
  background: rgba(17,24,39,.6); color: #fff; display: flex; align-items: center; justify-content: center;
  opacity: 0; transition: opacity .15s; pointer-events: none;
}
.file-zoom .ic { width: 13px; height: 13px; }
.file-thumb.clickable:hover .file-zoom { opacity: 1; }
.file-thumb .ic { width: 30px; height: 30px; color: var(--g400); }
.file-order {
  position: absolute; left: 7px; top: 7px; min-width: 20px; height: 20px; padding: 0 5px;
  border-radius: 6px; background: rgba(17, 24, 39, .7); color: #fff; font-size: 10.5px; font-weight: 700;
  display: flex; align-items: center; justify-content: center; backdrop-filter: blur(4px);
}
.file-remove {
  position: absolute; right: 6px; top: 6px; width: 24px; height: 24px; border-radius: 7px;
  background: rgba(17, 24, 39, .62); color: #fff; display: flex; align-items: center; justify-content: center;
  opacity: 0; transition: .15s;
}
.file-card:hover .file-remove { opacity: 1; }
.file-remove .ic { width: 13px; height: 13px; }
.file-info { padding: 9px 10px 10px; }
.file-name { font-size: 12px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.file-meta { font-size: 10.5px; color: var(--g500); margin-top: 3px; display: flex; gap: 8px; }
.file-move { display: flex; gap: 4px; margin-top: 7px; }
.file-move button { flex: 1; height: 24px; border-radius: 6px; background: var(--g100); color: var(--g500); display: flex; align-items: center; justify-content: center; }
.file-move button:hover { background: var(--blue-light); color: var(--blue); }
.file-move .ic { width: 13px; height: 13px; }

.upload-row { display: flex; align-items: center; gap: 11px; padding: 11px 13px; border: 1px solid var(--border); border-radius: 11px; margin-bottom: 8px; background: #fff; }
.upload-row .name { flex: 1; min-width: 0; font-size: 12.5px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.upload-row .size { font-size: 11px; color: var(--g500); flex: none; }
.upload-progress { width: 130px; height: 5px; background: var(--g100); border-radius: 4px; overflow: hidden; flex: none; }
.upload-bar { height: 100%; background: var(--blue); border-radius: 4px; transition: width .2s; }
.upload-row.done .upload-progress { display: none; }
.upload-row.done .size { color: var(--green); }

.option-block { padding: 18px 20px; }
.option-block h4 { font-size: 13.5px; font-weight: 700; margin-bottom: 12px; display: flex; align-items: center; gap: 7px; }
.option-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.option-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; }
.option-grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }

.child-pick-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 10px; }
.child-pick {
  display: flex; align-items: center; gap: 10px; padding: 11px 13px; border: 1.5px solid var(--border);
  border-radius: 12px; background: #fff; transition: .15s; text-align: left; width: 100%;
}
.child-pick:hover { border-color: #b9ccf3; }
.child-pick.selected { border-color: var(--blue); background: var(--blue-light); box-shadow: 0 0 0 3px rgba(47,111,237,.08); }
.child-pick .name { font-size: 13px; font-weight: 600; }
.child-pick .meta { font-size: 11px; color: var(--g500); margin-top: 2px; }
.child-pick .check { margin-left: auto; color: var(--blue); opacity: 0; }
.child-pick.selected .check { opacity: 1; }

.push-summary { padding: 18px 20px; }
.summary-row { display: flex; justify-content: space-between; gap: 12px; font-size: 12.5px; padding: 8px 0; border-bottom: 1px dashed #eef1f6; }
.summary-row:last-of-type { border-bottom: none; }
.summary-row .k { color: var(--g500); flex: none; }
.summary-row .v { color: var(--g800); font-weight: 600; text-align: right; word-break: break-word; }
.summary-total { background: var(--blue-light); border-radius: 10px; padding: 11px 13px; margin-top: 10px; font-size: 12px; color: #1e40af; line-height: 1.7; }

.wizard-foot { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding-top: 4px; }

/* ============================================================
   AI 生成
   ============================================================ */
.ai-layout { display: grid; grid-template-columns: 370px minmax(0, 1fr); gap: 18px; align-items: start; }
.ai-side { display: flex; flex-direction: column; gap: 14px; position: sticky; top: 86px; }
.ai-main { min-width: 0; display: flex; flex-direction: column; gap: 14px; }
.template-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.template-card {
  display: flex; flex-direction: column; align-items: flex-start; gap: 7px; padding: 11px 12px;
  border: 1.5px solid var(--border); border-radius: 12px; background: #fff; text-align: left; transition: .15s;
}
.template-card:hover { border-color: #b9ccf3; background: #fbfdff; }
.template-card.active { border-color: var(--blue); background: var(--blue-light); box-shadow: 0 0 0 3px rgba(47,111,237,.08); }
.tpl-icon {
  width: 30px; height: 30px; border-radius: 8px; background: var(--blue-light); color: var(--blue);
  display: flex; align-items: center; justify-content: center;
}
.template-card.active .tpl-icon { background: #fff; }
.tpl-name { font-size: 12.5px; font-weight: 700; }
.tpl-desc { font-size: 10.5px; color: var(--g500); line-height: 1.45; }
.ai-fields { padding: 16px 18px; }
.ai-fields .field:last-child { margin-bottom: 0; }
.ai-actions { display: flex; gap: 9px; padding: 0 18px 18px; }
.ai-actions .btn { flex: 1; }

.ai-output { min-height: 520px; display: flex; flex-direction: column; overflow: hidden; }
.ai-toolbar {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  padding: 12px 18px; border-bottom: 1px solid var(--border); background: #fff;
}
.ai-toolbar .left { display: flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 700; }
.ai-seg { display: flex; background: var(--g100); border-radius: 8px; padding: 3px; }
.ai-seg button { padding: 5px 11px; border-radius: 6px; font-size: 12px; font-weight: 600; color: var(--g500); }
.ai-seg button.active { background: #fff; color: var(--blue); box-shadow: 0 1px 3px rgba(0,0,0,.08); }
.ai-body { flex: 1; min-height: 0; display: flex; flex-direction: column; }
.ai-text {
  width: 100%; flex: 1; min-height: 460px; border: none; outline: none; resize: none;
  padding: 22px 24px; font-size: 13.5px; line-height: 1.9; color: var(--g800); font-family: var(--font);
  background: #fff;
}
.ai-preview-wrap { flex: 1; background: #eef2f8; padding: 18px; overflow: auto; max-height: 620px; }
.ai-empty { display: flex; flex-direction: column; align-items: center; justify-content: center; min-height: 440px; color: var(--g400); text-align: center; padding: 20px; }
.ai-empty .ic { width: 46px; height: 46px; margin-bottom: 14px; stroke-width: 1.4; }
.ai-empty p { font-size: 13px; line-height: 1.8; }
.stream-cursor::after {
  content: "▍"; color: var(--blue); animation: blink 1s step-end infinite; margin-left: 2px;
}
@keyframes blink { 50% { opacity: 0; } }
.ai-result-actions { display: flex; gap: 9px; padding: 13px 18px; border-top: 1px solid var(--border); background: #fff; flex-wrap: wrap; }
.ai-result-actions .btn { flex: 1; min-width: 110px; }

/* ============================================================
   打印记录
   ============================================================ */
.filter-bar {
  display: flex; align-items: center; gap: 10px; padding: 13px 16px; margin-bottom: 16px;
  background: #fff; border: 1px solid var(--border); border-radius: var(--radius); flex-wrap: wrap;
  box-shadow: var(--shadow-xs);
}
.filter-group { display: flex; align-items: center; gap: 7px; flex-wrap: wrap; }
.filter-group .label { font-size: 12px; color: var(--g500); font-weight: 600; }
.search-box { position: relative; flex: 1; min-width: 160px; max-width: 300px; }
.search-box .ic { position: absolute; left: 11px; top: 50%; transform: translateY(-50%); color: var(--g400); width: 15px; height: 15px; }
.search-box .input { padding-left: 34px; min-height: 38px; font-size: 13px; }
.filter-bar .select { width: auto; min-width: 120px; min-height: 38px; font-size: 13px; }

.record-list { display: flex; flex-direction: column; gap: 10px; }
.record-row {
  display: flex; align-items: center; gap: 14px; padding: 14px 18px; background: #fff;
  border: 1px solid var(--border); border-radius: 14px; transition: .15s;
}
.record-row:hover { border-color: #c4d6f7; box-shadow: var(--shadow-sm); }
.record-cover {
  width: 46px; height: 46px; border-radius: 12px; background: var(--blue-light); color: var(--blue);
  display: flex; align-items: center; justify-content: center; flex: none; overflow: hidden;
}
.record-cover img { width: 100%; height: 100%; object-fit: cover; }
.record-cover.pdf { background: #fff1f0; color: #e2473d; }
.record-cover.image { background: var(--green-light); color: #059669; }
.record-cover.docx { background: #eff6ff; color: #2563eb; }
.record-cover.text { background: var(--purple-light); color: var(--purple); }
.record-info { flex: 1; min-width: 0; }
.record-title { font-size: 14px; font-weight: 700; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.record-meta { display: flex; gap: 13px; flex-wrap: wrap; font-size: 12px; color: var(--g500); margin-top: 5px; }
.record-meta .dot { color: var(--g300); }
.record-side { display: flex; align-items: center; gap: 12px; flex: none; }
.record-time { font-size: 11.5px; color: var(--g400); text-align: right; line-height: 1.6; }
.record-actions { display: flex; gap: 2px; }
.pager { display: flex; justify-content: center; margin-top: 18px; }
.pager .btn { min-width: 130px; }

/* ============================================================
   孩子管理
   ============================================================ */
.child-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 16px; }
.child-card { padding: 19px 20px; display: flex; flex-direction: column; gap: 14px; }
.child-card-top { display: flex; align-items: center; gap: 12px; }
.child-card-top .info { flex: 1; min-width: 0; }
.child-card-top .name { font-size: 15.5px; font-weight: 700; display: flex; align-items: center; gap: 7px; }
.child-card-top .meta { font-size: 12px; color: var(--g500); margin-top: 4px; line-height: 1.5; }
.child-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; background: var(--g50); border-radius: 11px; padding: 11px 8px; }
.child-stat { text-align: center; }
.child-stat .n { font-size: 18px; font-weight: 800; color: var(--g800); line-height: 1.1; }
.child-stat .l { font-size: 10.5px; color: var(--g500); margin-top: 3px; }
.child-card-foot { display: flex; gap: 7px; }
.child-card-foot .btn { flex: 1; }
.add-child-card {
  border: 2px dashed #c8d6ef; border-radius: var(--radius); display: flex; flex-direction: column;
  align-items: center; justify-content: center; gap: 9px; padding: 32px 20px; color: var(--g500);
  background: #fbfdff; transition: .15s; min-height: 190px;
}
.add-child-card:hover { border-color: var(--blue); color: var(--blue); background: var(--blue-light); }
.add-child-card .plus { width: 44px; height: 44px; border-radius: 13px; background: #fff; border: 1px solid #dbe6fa; display: flex; align-items: center; justify-content: center; }
.add-child-card span { font-size: 13px; font-weight: 600; }
.avatar-picker { display: flex; gap: 7px; flex-wrap: wrap; }
.avatar-swatch {
  width: 34px; height: 34px; border-radius: 50%; display: flex; align-items: center; justify-content: center;
  font-size: 13px; font-weight: 700; border: 2px solid transparent; color: #fff;
}
.avatar-swatch.active { border-color: var(--blue); box-shadow: 0 0 0 3px rgba(47,111,237,.13); }

/* ============================================================
   系统设置
   ============================================================ */
.settings-layout { display: grid; grid-template-columns: 214px minmax(0, 1fr); gap: 18px; align-items: start; }
.settings-nav {
  background: #fff; border: 1px solid var(--border); border-radius: var(--radius); padding: 8px;
  position: sticky; top: 86px; display: flex; flex-direction: column; gap: 3px;
}
.settings-nav button {
  display: flex; align-items: center; gap: 9px; padding: 10px 12px; border-radius: 9px;
  font-size: 13px; font-weight: 600; color: var(--g600); text-align: left; transition: .14s;
}
.settings-nav button .ic { color: var(--g400); }
.settings-nav button:hover { background: var(--g50); color: var(--g800); }
.settings-nav button.active { background: var(--blue-light); color: var(--blue); }
.settings-nav button.active .ic { color: var(--blue); }
.settings-main { display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.settings-section { padding: 22px 24px; }
.settings-section + .settings-section { margin-top: 0; }
.settings-title { display: flex; align-items: center; gap: 9px; font-size: 16px; font-weight: 800; margin-bottom: 5px; }
.settings-desc { font-size: 12.5px; color: var(--g500); line-height: 1.7; margin-bottom: 20px; }
.settings-group { border-top: 1px solid var(--border); padding-top: 18px; margin-top: 18px; }
.settings-group:first-of-type { border-top: none; padding-top: 0; margin-top: 0; }
.settings-group h4 { font-size: 13.5px; font-weight: 700; margin-bottom: 13px; display: flex; align-items: center; gap: 7px; }
.setting-row { display: flex; align-items: center; justify-content: space-between; gap: 18px; padding: 10px 0; }
.setting-row .label { font-size: 13px; font-weight: 600; color: var(--g700); }
.setting-row .desc { font-size: 11.5px; color: var(--g500); margin-top: 3px; line-height: 1.55; }
.setting-row .control { flex: none; min-width: 180px; display: flex; justify-content: flex-end; align-items: center; gap: 8px; }
.setting-row.block { display: block; }
.setting-row.block .control { justify-content: flex-start; min-width: 0; margin-top: 9px; }
.secret-row { display: flex; gap: 8px; align-items: center; }
.secret-row .input { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 12.5px; }
.test-row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-top: 14px; padding-top: 16px; border-top: 1px dashed var(--border); }
.test-result { font-size: 12.5px; line-height: 1.6; }
.test-result.ok { color: #047857; }
.test-result.err { color: #b91c1c; }
.save-bar {
  position: sticky; bottom: 16px; z-index: 40; display: flex; align-items: center; justify-content: space-between;
  gap: 12px; background: rgba(255,255,255,.95); backdrop-filter: blur(8px); border: 1px solid var(--border);
  border-radius: 14px; padding: 12px 16px; box-shadow: var(--shadow-md); margin-top: 18px;
}
.save-bar .hint { font-size: 12px; color: var(--g500); }

/* ============================================================
   孩子端
   ============================================================ */
.child-app { min-height: 100vh; padding-bottom: 84px; background: var(--bg); }
.child-header {
  background: rgba(255,255,255,.94); backdrop-filter: blur(10px); border-bottom: 1px solid var(--border);
  padding: 12px 18px; display: flex; align-items: center; gap: 12px; position: sticky; top: 0; z-index: 100;
}
.child-header .info { flex: 1; min-width: 0; }
.child-header .nm { font-size: 15px; font-weight: 700; }
.child-header .cls { font-size: 11.5px; color: var(--g500); margin-top: 2px; }
.child-main { max-width: 720px; margin: 0 auto; padding: 18px 16px 30px; }
.child-hero {
  background: linear-gradient(135deg, #2f6fed, #6aa6ff); color: #fff; border-radius: 20px;
  padding: 20px 22px; margin-bottom: 20px; box-shadow: 0 12px 30px rgba(47,111,237,.22);
  position: relative; overflow: hidden;
}
.child-hero::after {
  content: ""; position: absolute; right: -40px; top: -40px; width: 150px; height: 150px;
  border-radius: 50%; background: rgba(255,255,255,.13);
}
.child-hero::before {
  content: ""; position: absolute; right: 36px; bottom: -56px; width: 110px; height: 110px;
  border-radius: 50%; background: rgba(255,255,255,.08);
}
.child-greeting { font-size: 19px; font-weight: 800; letter-spacing: .3px; }
.child-sub { font-size: 12.5px; opacity: .88; margin-top: 6px; }
.child-hero-stats { display: flex; gap: 22px; margin-top: 17px; position: relative; z-index: 1; }
.child-hero-stat .n { font-size: 22px; font-weight: 800; line-height: 1; }
.child-hero-stat .l { font-size: 11px; opacity: .82; margin-top: 4px; }
.child-section-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.child-section-title { font-size: 16px; font-weight: 800; display: flex; align-items: center; gap: 8px; }
.child-section-title .count { font-size: 11.5px; font-weight: 700; color: var(--blue); background: var(--blue-light); border-radius: 999px; padding: 2px 8px; }

.child-tabs { display: flex; gap: 7px; margin-bottom: 16px; background: #fff; border: 1px solid var(--border); padding: 4px; border-radius: 12px; }
.child-tab { flex: 1; padding: 8px; border-radius: 9px; font-size: 13px; font-weight: 700; color: var(--g500); }
.child-tab.active { background: var(--blue-light); color: var(--blue); }

.task-list { display: flex; flex-direction: column; gap: 13px; }
.task-card {
  background: #fff; border: 1px solid var(--border); border-radius: 18px; padding: 16px;
  box-shadow: 0 2px 10px rgba(16,24,40,.03); display: flex; flex-direction: column; gap: 13px;
  position: relative; overflow: hidden;
}
.task-card.fresh::before {
  content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 4px;
  background: linear-gradient(to bottom, #ffb020, var(--orange));
}
.task-top { display: flex; align-items: flex-start; gap: 12px; }
.task-cover {
  width: 48px; height: 48px; border-radius: 13px; background: var(--blue-light); color: var(--blue);
  display: flex; align-items: center; justify-content: center; flex: none; overflow: hidden;
}
.task-cover img { width: 100%; height: 100%; object-fit: cover; }
.task-cover.pdf { background: #fff1f0; color: #e2473d; }
.task-cover.image { background: #ecfdf5; color: #059669; }
.task-cover.docx { background: #eff6ff; color: #2563eb; }
.task-cover.text { background: var(--purple-light); color: var(--purple); }
.task-body { flex: 1; min-width: 0; }
.task-title { font-size: 16px; font-weight: 800; line-height: 1.4; word-break: break-word; }
.task-note {
  font-size: 12.5px; color: var(--g600); margin-top: 5px; line-height: 1.6;
  background: var(--g50); border-radius: 8px; padding: 7px 10px; border-left: 2px solid #dbe6fa;
}
.task-meta { display: flex; gap: 12px; flex-wrap: wrap; font-size: 11.5px; color: var(--g500); margin-top: 7px; }
.task-meta .ic { width: 13px; height: 13px; vertical-align: -2px; margin-right: 3px; }
.task-foot { display: flex; gap: 9px; align-items: center; }
.btn-print {
  flex: 1; display: flex; align-items: center; justify-content: center; gap: 9px;
  height: 52px; border-radius: 14px; background: linear-gradient(135deg, #ff9a2e, var(--orange));
  color: #fff; font-size: 16.5px; font-weight: 800; letter-spacing: .5px;
  box-shadow: 0 8px 20px rgba(255,138,0,.27); transition: .15s;
}
.btn-print:hover { background: linear-gradient(135deg, #ffab4a, var(--orange-dark)); }
.btn-print:active { transform: scale(.985); }
.btn-print .ic { width: 21px; height: 21px; }
.btn-print.blue { background: linear-gradient(135deg, #4a86f7, var(--blue)); box-shadow: 0 8px 20px rgba(47,111,237,.25); }
.btn-print.blue:hover { background: linear-gradient(135deg, #5b93f9, var(--blue-dark)); }
.btn-print.ghost { background: #fff; color: var(--blue); border: 1.5px solid #c9d8f8; box-shadow: none; }
.btn-print.ghost:hover { background: var(--blue-light); }
.btn-print:disabled { opacity: .55; cursor: not-allowed; box-shadow: none; }

.history-list { display: flex; flex-direction: column; gap: 10px; }
.history-row {
  display: flex; align-items: center; gap: 12px; padding: 13px 15px; background: #fff;
  border: 1px solid var(--border); border-radius: 14px;
}
.history-row .info { flex: 1; min-width: 0; }
.history-row .t { font-size: 13.5px; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.history-row .m { font-size: 11.5px; color: var(--g500); margin-top: 4px; display: flex; gap: 10px; flex-wrap: wrap; }
.history-row .check { color: var(--green); flex: none; }

.profile-card { padding: 22px; display: flex; flex-direction: column; align-items: center; text-align: center; gap: 6px; }
.profile-card .name { font-size: 19px; font-weight: 800; margin-top: 8px; }
.profile-card .meta { font-size: 12.5px; color: var(--g500); }
.profile-stat-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; width: 100%; margin-top: 16px; }
.profile-stat { background: var(--g50); border-radius: 12px; padding: 12px 6px; }
.profile-stat .n { font-size: 20px; font-weight: 800; color: var(--blue); line-height: 1; }
.profile-stat .l { font-size: 10.5px; color: var(--g500); margin-top: 5px; }
.profile-menu { margin-top: 16px; display: flex; flex-direction: column; gap: 9px; }
.profile-menu button {
  display: flex; align-items: center; gap: 11px; padding: 13px 15px; background: #fff;
  border: 1px solid var(--border); border-radius: 13px; font-size: 13.5px; font-weight: 600;
  color: var(--g700); text-align: left;
}
.profile-menu button:hover { border-color: #c4d6f7; background: #fbfdff; }
.profile-menu .menu-link {
  display: flex; align-items: center; gap: 11px; padding: 13px 15px; background: #fff;
  border: 1px solid var(--border); border-radius: 13px; font-size: 13.5px; font-weight: 600;
  color: var(--g700); text-align: left; text-decoration: none;
}
.profile-menu .menu-link:hover { border-color: #c4d6f7; background: #fbfdff; text-decoration: none; }
.profile-menu .ic { color: var(--g400); }
.profile-menu .arrow { margin-left: auto; color: var(--g300); }

.child-nav {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 200;
  background: rgba(255,255,255,.96); backdrop-filter: blur(14px); border-top: 1px solid var(--border);
  display: flex; padding: 7px 10px calc(7px + env(safe-area-inset-bottom));
  max-width: 720px; margin: 0 auto; border-radius: 18px 18px 0 0;
  box-shadow: 0 -6px 24px rgba(16,24,40,.06);
}
.child-nav button {
  flex: 1; display: flex; flex-direction: column; align-items: center; gap: 3px; padding: 7px 4px;
  border-radius: 10px; font-size: 10.5px; font-weight: 600; color: var(--g500); position: relative;
}
.child-nav button .ic { width: 21px; height: 21px; }
.child-nav button.active { color: var(--blue); }
.child-nav button.active::before {
  content: ""; position: absolute; top: -7px; width: 22px; height: 3px; border-radius: 2px; background: var(--blue);
}
.child-nav .dot {
  position: absolute; top: 5px; right: 22%; min-width: 15px; height: 15px; padding: 0 4px;
  background: var(--orange); color: #fff; border-radius: 8px; font-size: 9px; font-weight: 800;
  display: flex; align-items: center; justify-content: center; border: 2px solid #fff;
}
.child-nav .dot.zero { display: none; }

/* ============================================================
   打印中心
   ============================================================ */
.print-app { min-height: 100vh; background: #e9eef6; padding-bottom: 0; }
.print-topbar {
  position: sticky; top: 0; z-index: 100; display: flex; align-items: center; gap: 12px;
  padding: 10px 18px; background: rgba(255,255,255,.95); backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}
.print-back { display: flex; align-items: center; gap: 5px; font-size: 13px; font-weight: 600; color: var(--g600); padding: 7px 9px; border-radius: 8px; flex: none; }
.print-back:hover { background: var(--g100); color: var(--g900); }
.print-title-wrap { flex: 1; min-width: 0; }
.print-title { font-size: 15px; font-weight: 800; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.print-sub { font-size: 11.5px; color: var(--g500); margin-top: 2px; display: flex; gap: 10px; flex-wrap: wrap; }
.print-status { flex: none; }
.print-stage { max-width: 1000px; margin: 0 auto; padding: 20px 16px 120px; }
.print-tip {
  background: #fff; border: 1px solid var(--border); border-radius: 12px; padding: 11px 15px;
  font-size: 12.5px; color: var(--g600); line-height: 1.7; margin-bottom: 16px;
  display: flex; align-items: flex-start; gap: 9px;
}
.print-tip .ic { color: var(--blue); flex: none; margin-top: 1px; }
.print-tip.warn { background: var(--amber-light); border-color: #fde68a; color: #92400e; }
.print-tip.warn .ic { color: #b45309; }

.sheet {
  width: 210mm; min-height: 297mm; background: #fff; margin: 0 auto 18px;
  box-shadow: 0 8px 30px rgba(16, 24, 40, .12); border-radius: 2px; position: relative;
  overflow: hidden;
}
.sheet.raster { height: 297mm; }
.sheet.raster img { width: 100%; height: 100%; object-fit: contain; background: #fff; }
.sheet.img-sheet {
  padding: 10mm; display: flex; align-items: center; justify-content: center;
}
.sheet.img-sheet img { max-width: 100%; max-height: 100%; width: auto; height: auto; object-fit: contain; }
.sheet.doc-sheet { padding: 16mm 15mm; min-height: 297mm; }
.doc-body { font-family: var(--print-font); color: #111; font-size: 12pt; line-height: 1.9; }
.doc-body h1 { font-size: 20pt; text-align: center; font-weight: 700; margin: 0 0 6mm; line-height: 1.4; letter-spacing: .5px; }
.doc-body h2 { font-size: 14pt; font-weight: 700; margin: 6mm 0 2.5mm; line-height: 1.5; }
.doc-body h3 { font-size: 12.5pt; font-weight: 700; margin: 4mm 0 2mm; }
.doc-body p { margin: 0 0 2.4mm; text-indent: 2em; text-align: justify; white-space: pre-wrap; word-break: break-word; }
.doc-body p.no-indent { text-indent: 0; }
.doc-body ul, .doc-body ol { margin: 0 0 2.5mm; padding-left: 2.2em; }
.doc-body li { margin-bottom: 1.4mm; line-height: 1.85; white-space: pre-wrap; }
.doc-body hr { border: none; border-top: 1px solid #d1d5db; margin: 4mm 0; }
.doc-body .doc-meta { text-align: center; font-size: 10.5pt; color: #374151; margin: 2mm 0 5mm; text-indent: 0; }
.doc-body .name-line { font-size: 11pt; margin: 0 0 5mm; text-indent: 0; color: #111; }
.doc-body strong { font-weight: 700; }
.doc-body table { width: 100%; border-collapse: collapse; margin: 3mm 0; font-size: 10.5pt; }
.doc-body table th, .doc-body table td { border: 1px solid #374151; padding: 2mm 2.5mm; text-align: left; }
.doc-body img { max-width: 100%; height: auto; margin: 2mm auto; }
.docx-body { font-family: var(--print-font); color: #111; font-size: 11.5pt; line-height: 1.85; }
.docx-body p { margin: 0 0 2.4mm; text-indent: 0; text-align: justify; word-break: break-word; }
.docx-body h1 { font-size: 17pt; margin: 0 0 4mm; text-align: center; }
.docx-body h2 { font-size: 14pt; margin: 5mm 0 2mm; }
.docx-body h3 { font-size: 12pt; margin: 4mm 0 1.5mm; }
.docx-body ul, .docx-body ol { padding-left: 2.2em; margin: 0 0 2.5mm; }
.docx-body table { width: 100%; border-collapse: collapse; margin: 2mm 0; font-size: 10.5pt; }
.docx-body table td, .docx-body table th { border: 1px solid #444; padding: 1.8mm 2mm; }
.docx-body img { max-width: 100%; height: auto; }
.docx-body strong { font-weight: 700; }

.print-loading {
  position: fixed; inset: 0; z-index: 500; background: rgba(245, 247, 251, .96);
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 16px;
  backdrop-filter: blur(3px);
}
.loader-ring {
  width: 52px; height: 52px; border-radius: 50%; border: 3px solid #dbe6fa;
  border-top-color: var(--blue); animation: spin .85s linear infinite;
}
.print-loading .txt { font-size: 14px; font-weight: 600; color: var(--g700); }
.print-loading .sub { font-size: 12px; color: var(--g500); text-align: center; line-height: 1.7; max-width: 300px; }
.print-load-error { max-width: 400px; text-align: center; padding: 24px; background: #fff; border-radius: 18px; box-shadow: var(--shadow-md); }
.print-load-error .ic { width: 44px; height: 44px; color: var(--red); margin: 0 auto 12px; }
.print-load-error h3 { font-size: 16px; margin-bottom: 8px; }
.print-load-error p { font-size: 13px; color: var(--g500); line-height: 1.7; margin-bottom: 16px; }

.print-actions {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 300;
  background: rgba(255,255,255,.97); backdrop-filter: blur(14px); border-top: 1px solid var(--border);
  box-shadow: 0 -8px 30px rgba(16,24,40,.08); padding: 11px 16px calc(11px + env(safe-area-inset-bottom));
}
.print-actions-inner { max-width: 960px; margin: 0 auto; display: flex; align-items: center; gap: 10px; }
.print-action-buttons { display: flex; gap: 10px; flex: 1; }
.print-action-buttons .btn { flex: 1; }
.print-secondary { display: flex; gap: 7px; flex: none; }
.print-meta-line { max-width: 960px; margin: 0 auto 9px; font-size: 11.5px; color: var(--g500); display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.print-meta-line .dot { color: var(--g300); }

.confirm-sheet {
  position: fixed; inset: 0; z-index: 3100; display: flex; align-items: flex-end; justify-content: center;
  background: rgba(17,24,39,.45); opacity: 0; pointer-events: none; transition: opacity .2s;
  padding: 0;
}
.confirm-sheet.open { opacity: 1; pointer-events: auto; }
.confirm-card {
  width: 100%; max-width: 460px; background: #fff; border-radius: 22px 22px 0 0;
  padding: 26px 22px calc(22px + env(safe-area-inset-bottom)); text-align: center;
  transform: translateY(24px); transition: transform .22s;
}
.confirm-sheet.open .confirm-card { transform: none; }
.confirm-icon {
  width: 62px; height: 62px; border-radius: 50%; background: var(--green-light); color: var(--green);
  display: flex; align-items: center; justify-content: center; margin: 0 auto 14px;
}
.confirm-icon.issue { background: var(--red-light); color: var(--red); }
.confirm-card h3 { font-size: 18px; font-weight: 800; margin-bottom: 7px; }
.confirm-card p { font-size: 13px; color: var(--g500); line-height: 1.7; margin-bottom: 20px; }
.confirm-actions { display: flex; flex-direction: column; gap: 9px; }
.confirm-actions .btn { width: 100%; }
.confirm-actions .row { display: flex; gap: 9px; }
.confirm-actions .row .btn { flex: 1; }

.print-help { background: #fff; border: 1px solid var(--border); border-radius: 14px; padding: 0; margin-top: 8px; overflow: hidden; }
.print-help summary { padding: 14px 17px; font-size: 13px; font-weight: 700; cursor: pointer; list-style: none; display: flex; align-items: center; gap: 8px; }
.print-help summary::-webkit-details-marker { display: none; }
.print-help summary .ic:last-child { margin-left: auto; transition: transform .2s; }
.print-help[open] summary .ic:last-child { transform: rotate(180deg); }
.print-help .help-body { padding: 0 17px 16px; font-size: 12.5px; color: var(--g600); line-height: 1.9; }
.print-help .help-body ol { padding-left: 1.4em; display: flex; flex-direction: column; gap: 7px; }
.print-help .help-body b { color: var(--g800); }
.print-help .help-note { background: var(--blue-light); border-radius: 9px; padding: 9px 12px; margin-top: 10px; color: #1e40af; font-size: 12px; line-height: 1.7; }

.print-done-view { max-width: 460px; margin: 40px auto; text-align: center; background: #fff; border-radius: 22px; padding: 34px 26px; box-shadow: var(--shadow-md); }
.print-done-view .big-check { width: 70px; height: 70px; border-radius: 50%; background: var(--green-light); color: var(--green); display: flex; align-items: center; justify-content: center; margin: 0 auto 16px; }
.print-done-view h2 { font-size: 20px; font-weight: 800; margin-bottom: 8px; }
.print-done-view p { font-size: 13px; color: var(--g500); line-height: 1.8; margin-bottom: 22px; }

/* ============================================================
   响应式
   ============================================================ */
@media (max-width: 1080px) {
  .dash-grid { grid-template-columns: minmax(0, 1fr); }
  .dash-side { display: grid; grid-template-columns: 1fr 1fr; }
  .ai-layout { grid-template-columns: 330px minmax(0, 1fr); }
  .wizard-panel { grid-template-columns: minmax(0, 1fr) 300px; }
}

@media (max-width: 900px) {
  .app-header { height: auto; padding: 10px 16px 0; flex-wrap: wrap; gap: 6px 14px; }
  .brand { padding-bottom: 4px; }
  .header-right { margin-left: auto; }
  .tabs {
    width: 100%; order: 3; overflow-x: auto; padding: 4px 0 6px; margin: 0 -4px;
    scrollbar-width: none; -webkit-overflow-scrolling: touch;
  }
  .tabs::-webkit-scrollbar { display: none; }
  .tab { padding: 7px 11px; font-size: 12.5px; }
  .app-main { padding: 20px 16px 50px; }

  .stat-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .stat-card { padding: 14px 15px; }
  .stat-num { font-size: 24px; }
  .dash-side { grid-template-columns: 1fr; }
  .wizard-panel, .ai-layout, .settings-layout { grid-template-columns: 1fr; }
  .wizard-side, .ai-side, .settings-nav { position: static; }
  .settings-nav { flex-direction: row; overflow-x: auto; padding: 5px; }
  .settings-nav button { white-space: nowrap; padding: 8px 11px; font-size: 12.5px; }
  .settings-nav button .ic { width: 15px; height: 15px; }
  .ai-output { min-height: 420px; }
  .ai-text { min-height: 380px; }
  .notif-panel {
    position: fixed; top: auto; bottom: 0; right: 0; left: 0; width: auto; max-height: 72vh;
    border-radius: 20px 20px 0 0; border-bottom: none;
  }
  .record-row { flex-wrap: wrap; }
  .record-side { width: 100%; justify-content: space-between; border-top: 1px dashed #eef1f6; padding-top: 10px; margin-top: 2px; }
  .record-time { text-align: left; }
  .option-grid, .option-grid-3 { grid-template-columns: 1fr; gap: 0; }
  .form-grid, .form-grid-3 { grid-template-columns: 1fr; gap: 0; }
  .steps { padding: 12px 14px; }
  .step-line { width: 16px; margin: 0 8px; }

  .sheet { width: 100%; min-height: 0; height: auto; border-radius: 4px; margin-bottom: 12px; }
  .sheet.raster { height: auto; aspect-ratio: 210 / 297; }
  .sheet.img-sheet { aspect-ratio: 210 / 297; padding: 6mm; }
  .sheet.doc-sheet { padding: 22px 18px; }
  .doc-body { font-size: 11pt; }
  .print-stage { padding: 14px 10px 130px; }
  .print-actions-inner { flex-direction: column; align-items: stretch; gap: 8px; }
  .print-action-buttons .btn { height: 48px; font-size: 15.5px; }
  .print-secondary { justify-content: center; }
  .print-secondary .btn { flex: 1; }
}

@media (max-width: 620px) {
  .page-title { font-size: 19px; }
  .user-chip .name, .user-chip .role { display: none; }
  .brand-sub { display: none; }
  .tabs { gap: 1px; }
  .stats-grid { grid-template-columns: 1fr 1fr; }
  .template-grid { grid-template-columns: 1fr 1fr; }
  .child-grid { grid-template-columns: 1fr; }
  .child-hero { padding: 18px; border-radius: 18px; }
  .child-greeting { font-size: 17px; }
  .child-hero-stats { gap: 18px; }
  .child-main { padding: 14px 12px 26px; }
  .task-card { padding: 14px; border-radius: 16px; }
  .task-title { font-size: 15px; }
  .btn-print { height: 50px; font-size: 16px; }
  .filter-bar { gap: 8px; padding: 11px; }
  .filter-group { width: 100%; }
  .filter-group .select { flex: 1; }
  .search-box { max-width: none; width: 100%; }
  .record-title { font-size: 13.5px; }
  .modal { padding: 12px; }
  .modal-card { max-height: 88vh; }
  .settings-section { padding: 18px 16px; }
  .setting-row { flex-direction: column; align-items: stretch; gap: 8px; }
  .setting-row .control { justify-content: flex-start; min-width: 0; }
  .save-bar { flex-direction: column; align-items: stretch; gap: 9px; }
  .save-bar .btn { width: 100%; }
  .print-tip { font-size: 12px; padding: 10px 12px; }
  .confirm-card { max-width: none; }
  .auth-card { padding: 28px 22px 22px; border-radius: 20px; }
  .auth-brand h1 { font-size: 21px; }
  .ai-result-actions .btn { flex: 1 1 45%; }
}

@media print {
  html, body { background: #fff !important; margin: 0 !important; padding: 0 !important; }
  body.print-app > *:not(#printRoot) { display: none !important; }
  body.print-app #printRoot { display: block !important; }
  body.print-app .no-print, body.print-app .print-topbar, body.print-app .print-actions,
  body.print-app .print-tip, body.print-app .print-help, body.print-app .confirm-sheet,
  body.print-app .print-loading, body.print-app .toast { display: none !important; }
  body.print-app { background: #fff !important; min-height: 0 !important; padding: 0 !important; }
  body.print-app .print-stage { max-width: none; margin: 0; padding: 0; }
  .sheet {
    width: 210mm !important; height: 297mm !important; min-height: 0 !important;
    margin: 0 !important; padding: 0 !important; border-radius: 0 !important;
    box-shadow: none !important; overflow: hidden; page-break-after: always;
    break-after: page; aspect-ratio: auto !important;
  }
  .sheet:last-child { page-break-after: auto; break-after: auto; }
  .sheet.raster img { width: 100%; height: 100%; object-fit: contain; }
  .sheet.img-sheet { padding: 10mm !important; display: flex; align-items: center; justify-content: center; }
  .sheet.img-sheet img { max-width: 100%; max-height: 100%; }
  .sheet.doc-sheet { padding: 0 !important; }
  .doc-body { font-size: 12pt; }
  .docx-body { font-size: 11.5pt; }
  .doc-body h1, .doc-body h2, .doc-body h3 { break-after: avoid; }
  .doc-body li, .doc-body p, .docx-body p, .docx-body li { break-inside: avoid; }
  img, table { break-inside: avoid; }
  .bw-print { filter: grayscale(1) contrast(1.06); }
}

@page { size: A4 portrait; margin: 0; }

/* ============================================================
   帮助页 / 404
   ============================================================ */
.help-page { background: var(--bg); min-height: 100vh; padding-bottom: 50px; }
.help-header {
  height: 64px; background: rgba(255,255,255,.94); backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border); display: flex; align-items: center;
  gap: 12px; padding: 0 24px; position: sticky; top: 0; z-index: 50;
}
.help-header .brand { flex: 1; }
.help-header .back { font-size: 13px; font-weight: 600; color: var(--g600); }
.help-wrap { max-width: 980px; margin: 0 auto; padding: 26px 20px 0; }
.help-hero {
  background: linear-gradient(135deg, #2f6fed, #6aa6ff); color: #fff; border-radius: 22px;
  padding: 34px 34px; box-shadow: 0 16px 40px rgba(47,111,237,.2); position: relative; overflow: hidden;
}
.help-hero::after {
  content: ""; position: absolute; right: -60px; top: -60px; width: 240px; height: 240px;
  border-radius: 50%; background: rgba(255,255,255,.12);
}
.help-hero h1 { font-size: 27px; font-weight: 800; letter-spacing: .5px; line-height: 1.35; position: relative; z-index: 1; }
.help-hero p { font-size: 13.5px; line-height: 1.85; opacity: .92; margin-top: 10px; max-width: 620px; position: relative; z-index: 1; }
.help-hero .help-actions { display: flex; gap: 10px; margin-top: 20px; position: relative; z-index: 1; flex-wrap: wrap; }
.help-hero .btn-white { box-shadow: 0 6px 18px rgba(0,0,0,.12); }
.help-section-title { font-size: 18px; font-weight: 800; margin: 30px 0 14px; display: flex; align-items: center; gap: 9px; }
.help-section-title .num {
  width: 26px; height: 26px; border-radius: 8px; background: var(--blue-light); color: var(--blue);
  font-size: 13px; display: flex; align-items: center; justify-content: center;
}
.help-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.help-card { background: #fff; border: 1px solid var(--border); border-radius: var(--radius); padding: 20px; }
.help-card .device-icon {
  width: 42px; height: 42px; border-radius: 12px; background: var(--blue-light); color: var(--blue);
  display: flex; align-items: center; justify-content: center; margin-bottom: 13px;
}
.help-card h3 { font-size: 15px; font-weight: 800; margin-bottom: 5px; }
.help-card .tagline { font-size: 11.5px; color: var(--blue); font-weight: 600; margin-bottom: 10px; }
.help-card p { font-size: 12.5px; color: var(--g600); line-height: 1.8; }
.help-card ol { margin: 10px 0 0; padding-left: 1.3em; font-size: 12.5px; color: var(--g600); line-height: 1.85; }
.help-card li { margin-bottom: 4px; }
.help-card .note { margin-top: 10px; background: var(--g50); border-radius: 8px; padding: 8px 10px; font-size: 11.5px; color: var(--g500); line-height: 1.7; }
.help-flow { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
.help-flow .flow-item { background: #fff; border: 1px solid var(--border); border-radius: 14px; padding: 16px; position: relative; }
.help-flow .flow-num {
  width: 26px; height: 26px; border-radius: 50%; background: var(--blue); color: #fff;
  font-size: 12.5px; font-weight: 800; display: flex; align-items: center; justify-content: center; margin-bottom: 10px;
}
.help-flow h4 { font-size: 13.5px; font-weight: 700; margin-bottom: 5px; }
.help-flow p { font-size: 12px; color: var(--g500); line-height: 1.7; }
.help-faq { display: flex; flex-direction: column; gap: 9px; }
.help-faq details { background: #fff; border: 1px solid var(--border); border-radius: 12px; overflow: hidden; }
.help-faq summary {
  padding: 14px 17px; font-size: 13.5px; font-weight: 650; cursor: pointer; list-style: none;
  display: flex; align-items: center; gap: 9px; color: var(--g800);
}
.help-faq summary::-webkit-details-marker { display: none; }
.help-faq summary .q { color: var(--blue); font-weight: 800; }
.help-faq .a { padding: 0 17px 14px 38px; font-size: 12.5px; color: var(--g600); line-height: 1.85; }
.help-foot { margin-top: 34px; text-align: center; font-size: 12px; color: var(--g400); line-height: 1.9; }
.help-tip {
  background: var(--amber-light); border: 1px solid #fde68a; color: #92400e; border-radius: 12px;
  padding: 12px 15px; font-size: 12.5px; line-height: 1.8; margin-top: 14px;
}

.not-found {
  min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 24px;
  background: linear-gradient(145deg, #2f6fed, #6aa6ff);
}
.not-found .card { max-width: 420px; width: 100%; padding: 36px 30px; text-align: center; border-radius: 24px; box-shadow: var(--shadow-lg); }
.not-found .code { font-size: 54px; font-weight: 900; color: var(--blue); line-height: 1; letter-spacing: 2px; }
.not-found h1 { font-size: 18px; margin: 12px 0 8px; }
.not-found p { font-size: 13px; color: var(--g500); line-height: 1.8; margin-bottom: 20px; }

@media (max-width: 860px) {
  .help-grid { grid-template-columns: 1fr; }
  .help-flow { grid-template-columns: 1fr 1fr; }
  .help-hero { padding: 26px 22px; }
  .help-hero h1 { font-size: 22px; }
}
@media (max-width: 520px) {
  .help-flow { grid-template-columns: 1fr; }
  .help-header { padding: 0 14px; }
  .help-wrap { padding: 16px 12px 0; }
  .help-hero { border-radius: 18px; }
}

@media (min-width: 901px) {
  ::-webkit-scrollbar { width: 9px; height: 9px; }
  ::-webkit-scrollbar-thumb { background: #d7deea; border-radius: 6px; }
  ::-webkit-scrollbar-thumb:hover { background: #c3cddd; }
  ::-webkit-scrollbar-track { background: transparent; }
}

/* ---------- 补充组件 ---------- */
.btn, .btn:hover { text-decoration: none; }
.hint-box {
  background: var(--amber-light); border: 1px solid #fde68a; color: #92400e;
  border-radius: 10px; padding: 12px 16px; font-size: 12.5px; line-height: 1.8;
}
.check-item .btn-link { padding: 0; font-size: 12px; }
.ai-preview-wrap .sheet {
  width: 100%; max-width: 760px; min-height: auto; padding: 16mm 14mm;
  box-shadow: 0 4px 16px rgba(16,24,40,.07);
}
.doc-body blockquote {
  margin: 2mm 0; padding-left: 12px; border-left: 3px solid #dbe6fa; color: #444;
}
.doc-body blockquote p { text-indent: 0; }
.doc-body code, .docx-body code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  background: #f3f4f6; border-radius: 4px; padding: 0 4px; font-size: .92em;
}
.doc-body del { color: #6b7280; }
.doc-meta-line {
  display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline;
  gap: 3px 16px; font-size: 10.5pt; color: #333; margin: 0 0 5mm; line-height: 1.7;
}
.doc-meta-line span { white-space: nowrap; }
@media (max-width: 900px) {
  .sheet.doc-sheet { min-height: 0 !important; }
  .ai-preview-wrap .sheet { padding: 20px 16px; }
}

/* 手机端：家长导航改为三列两行，避免横向滚动找不到入口 */
@media (max-width: 620px) {
  .tabs {
    display: grid; grid-template-columns: repeat(3, 1fr); gap: 5px;
    overflow: visible; width: 100%; padding: 6px 0 8px;
  }
  .tab { justify-content: center; padding: 8px 4px; font-size: 12px; gap: 5px; }
  .tab .ic { width: 15px; height: 15px; }
}

/* 手机端：上传向导底部操作条常驻，避免长页面找不到下一步 */
@media (max-width: 900px) {
  #uploadFoot {
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 180;
    background: rgba(255,255,255,.97); backdrop-filter: blur(12px);
    border-top: 1px solid var(--border);
    padding: 10px 16px calc(10px + env(safe-area-inset-bottom));
    box-shadow: 0 -8px 26px rgba(16,24,40,.07);
  }
  #uploadFoot .small { font-size: 11.5px; line-height: 1.45; max-width: 48%; }
  #view-upload { padding-bottom: 86px; }
}


