/*
 * 视觉主题：参考阿里云备案控制台（「我的备案」页面）
 * 白色顶部横向导航、控制台蓝 #1677ff、浅灰页面底、直角细边框白色面板、
 * 淡蓝渐变标题条、步骤条与浅蓝提示框；保留原有全部类名与响应式断点。
 */
:root {
  --bg: #f4f5f7; --surface: #ffffff; --surface-2: #f7f9fc;
  --border: #e5e8ef; --border-strong: #d9dfe8;
  --text: #1f2329; --text-2: #4e5969; --muted: #86909c;
  --primary: #1677ff; --primary-dark: #0958d9; --primary-light: #69b1ff;
  --primary-soft: #eaf3ff; --primary-soft-2: #d6e8ff;
  --success: #00a870; --success-soft: #e8fff4;
  --warn: #d48806; --warn-soft: #fff7e6;
  --danger: #e54545; --danger-soft: #fff1f0;
  --shadow: 0 1px 2px rgba(31, 35, 41, .02);
  --shadow-pop: 0 6px 24px rgba(31, 35, 41, .14);
  --radius: 3px; --radius-sm: 2px;
  font-synthesis: none;
}
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  background: var(--bg); color: var(--text); font-size: 14px; line-height: 1.5;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", "Hiragino Sans GB", sans-serif;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--primary); text-decoration: none; }
button, input, select, textarea { font-family: inherit; font-size: inherit; }
button { cursor: pointer; }
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-thumb { background: #c9d0da; border-radius: 4px; }
::-webkit-scrollbar-track { background: transparent; }

/* ---------- 布局：白色顶部导航 + 浅灰内容区 ---------- */
.app-shell { display: block; min-height: 100vh; }
.topbar {
  height: 48px; background: #fff; border-bottom: 1px solid var(--border);
  position: sticky; top: 0; z-index: 30;
}
.topbar-inner {
  max-width: 1440px; height: 100%; margin: 0 auto; padding: 0 24px;
  display: flex; align-items: center; gap: 24px;
}
.brand { display: flex; align-items: center; gap: 8px; flex: 0 0 auto; }
.brand-logo {
  width: 28px; height: 28px; border-radius: var(--radius-sm); background: var(--primary);
  display: grid; place-items: center; color: #fff; flex: 0 0 28px;
}
.brand-logo svg { width: 17px; height: 17px; }
.brand-name { font-weight: 500; font-size: 14px; letter-spacing: 0; color: var(--text); white-space: nowrap; }
.brand-sub { font-size: 12px; color: var(--muted); white-space: nowrap; }
.topnav { display: flex; align-items: stretch; height: 100%; flex: 1; min-width: 0; overflow-x: auto; overflow-y: hidden; }
.topnav::-webkit-scrollbar { height: 0; }
.top-nav-item {
  position: relative; display: inline-flex; align-items: center; gap: 8px; flex: 0 0 auto;
  padding: 0 12px; border: none; background: none; color: var(--text-2);
  font-size: 13px; white-space: nowrap; transition: .15s;
}
.top-nav-item svg { width: 16px; height: 16px; opacity: .6; }
.top-nav-item:hover { color: var(--primary); }
.top-nav-item.active { color: var(--primary); font-weight: 600; }
.top-nav-item.active::after { content: ''; position: absolute; left: 10px; right: 10px; bottom: 0; height: 2px; background: var(--primary); }
.top-nav-item .badge-count { margin-left: 2px; background: var(--danger-soft); color: var(--danger); font-size: 12px; padding: 0 8px; border-radius: 8px; }
.topbar-right { display: flex; align-items: center; gap: 12px; flex: 0 0 auto; }
.user-chip { display: flex; align-items: center; gap: 8px; }
.avatar { width: 26px; height: 26px; border-radius: 50%; background: var(--primary-soft); color: var(--primary); display: grid; place-items: center; font-weight: 500; font-size: 12px; }
.user-chip .u-name { font-size: 13px; font-weight: 500; line-height: 1.25; color: var(--text); }
.user-chip .u-role { font-size: 12px; color: var(--muted); line-height: 1.25; }
.topbar .crumb, .crumb-sep, .topbar h1 { font-size: 12px; color: var(--muted); margin: 0; font-weight: 400; }
.topbar-spacer { flex: 1; }
.menu-toggle { display: none; border: 1px solid var(--border-strong); background: #fff; border-radius: var(--radius-sm); width: 30px; height: 30px; place-items: center; color: var(--text-2); }

.tags-view {
  display: flex; gap: 8px; align-items: center; padding: 8px 24px; background: #fff;
  border-bottom: 1px solid var(--border); overflow-x: auto; white-space: nowrap;
}
.tags-view::-webkit-scrollbar { height: 0; }
.tag-view {
  display: inline-flex; align-items: center; gap: 8px; padding: 4px 12px;
  border: 1px solid var(--border); border-radius: var(--radius-sm); background: #fff;
  color: var(--text-2); font-size: 12px; line-height: 1.5; white-space: nowrap; transition: .15s;
}
.tag-view svg { width: 14px; height: 14px; }
.tag-view:hover { color: var(--primary); border-color: var(--primary-light); background: #f7fbff; }
.tag-view.active { background: var(--primary-soft); border-color: #b8d8ff; color: var(--primary-dark); font-weight: 600; }
.main { min-width: 0; }
.content { padding: 20px 24px 32px; max-width: 1440px; margin: 0 auto; }

/* 页面标题条：中性表面，蓝色只留给选中态、主操作与告警 */
.page-head {
  display: flex; align-items: center; gap: 8px; min-height: 40px; padding: 8px 16px;
  background: var(--surface-2);
  border: 1px solid var(--border); border-radius: var(--radius) var(--radius) 0 0; margin-bottom: 16px;
}
.page-head h2 { margin: 0; font-size: 16px; font-weight: 500; color: var(--text); }
.page-head .ph-sub { font-size: 12px; color: var(--muted); }
.page-head .ph-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--border-strong); flex: 0 0 6px; }
.page-head .ph-right { margin-left: auto; font-size: 12px; color: var(--text-2); }

/* 移动端抽屉：白色而非深色 */
.sidebar { display: none; }
.scrim { display: none; }
.mobile-nav { display: none; }

/* ---------- 通用组件：直角细边框 / 弱阴影 ---------- */
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); }
.card-head { display: flex; align-items: center; gap: 8px; padding: 12px 16px; border-bottom: 1px solid var(--border); min-height: 44px; }
.card-head h2 { margin: 0; font-size: 14px; font-weight: 500; }
.card-head h2::before { content: ''; display: inline-block; width: 4px; height: 4px; border-radius: 50%; background: var(--border-strong); vertical-align: middle; margin-right: 8px; }
.card-head .sub { font-size: 12px; color: var(--muted); }
.card-head .spacer { flex: 1; }
.card-head > svg { width: 16px; height: 16px; color: var(--muted); flex: 0 0 16px; }
.card-body { padding: 16px; }
.grid { display: grid; gap: 16px; }
/* grid 子项默认 min-width:auto，会被图表 / 表格撑破视口；显式归零让内部滚动容器生效 */
.grid > * { min-width: 0; }
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.section-title { font-size: 14px; font-weight: 500; margin: 24px 0 12px; color: var(--text-2); display: flex; align-items: center; gap: 8px; }
.section-title::before { content: ''; width: 3px; height: 14px; background: var(--border-strong); border-radius: 1px; }

.kpi { padding: 16px; display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.kpi .k-label { font-size: 12px; color: var(--text-2); }
.kpi .k-value { font-size: 28px; font-weight: 500; letter-spacing: 0; margin-top: 4px; line-height: 1.25; color: var(--text); font-variant-numeric: tabular-nums; }
.kpi .k-foot { font-size: 12px; color: var(--muted); margin-top: 4px; }
.kpi-icon { width: 32px; height: 32px; border-radius: var(--radius-sm); display: grid; place-items: center; flex: 0 0 32px; background: var(--surface-2); color: var(--muted); }
.kpi-icon svg { width: 18px; height: 18px; }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; border: 1px solid var(--border-strong); background: #fff; color: var(--text-2); padding: 8px 16px; border-radius: var(--radius-sm); font-size: 13px; font-weight: 400; transition: .15s; white-space: nowrap; }
.btn svg { width: 16px; height: 16px; }
.btn:hover { border-color: var(--primary); color: var(--primary); background: #f7fbff; }
.btn-primary { background: var(--primary); border-color: var(--primary); color: #fff; }
.btn-primary:hover { background: var(--primary-dark); border-color: var(--primary-dark); color: #fff; }
.btn-danger { color: var(--danger); border-color: #f3c2c2; background: #fff; }
.btn-danger:hover { background: var(--danger-soft); border-color: var(--danger); color: var(--danger); }
.btn-sm { padding: 4px 12px; font-size: 12px; border-radius: var(--radius-sm); }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn-row { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }

.tag { display: inline-block; padding: 2px 8px; border-radius: var(--radius-sm); font-size: 12px; font-weight: 400; background: #f2f3f5; color: var(--text-2); white-space: nowrap; border: 1px solid #e5e8ef; }
.tag-green { background: var(--success-soft); color: var(--success); border-color: #c6f0de; }
.tag-blue { background: var(--primary-soft); color: var(--primary-dark); border-color: #c9e0ff; }
.tag-orange { background: var(--warn-soft); color: var(--warn); border-color: #ffe2ad; }
.tag-red { background: var(--danger-soft); color: var(--danger); border-color: #ffd4d4; }
.tag-gray { background: #f2f3f5; color: var(--muted); border-color: #e5e8ef; }
.tag-purple { background: var(--primary-soft); color: var(--primary-dark); border-color: #c9e0ff; }

.table-wrap { overflow-x: auto; }
table.data { width: 100%; border-collapse: collapse; font-size: 13px; min-width: 720px; font-variant-numeric: tabular-nums; }
table.data th { background: var(--surface-2); color: var(--text-2); font-weight: 600; text-align: left; padding: 8px 12px; border-bottom: 1px solid var(--border); white-space: nowrap; position: sticky; top: 0; z-index: 1; }
table.data td { padding: 8px 12px; border-bottom: 1px solid #f0f1f3; vertical-align: middle; white-space: nowrap; }
table.data tr:last-child td { border-bottom: none; }
table.data tbody tr:hover { background: var(--surface-2); }
table.data td.actions { white-space: nowrap; }
.mono { font-family: ui-monospace, SFMono-Regular, Consolas, monospace; font-size: 13px; font-variant-numeric: tabular-nums; }
.muted { color: var(--muted); }
.empty { padding: 36px 20px; text-align: center; color: var(--muted); font-size: 13px; }
.empty svg { width: 30px; height: 30px; opacity: .35; display: block; margin: 0 auto 8px; }

.toolbar { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin-bottom: 16px; }
.search { position: relative; flex: 1; min-width: 180px; max-width: 300px; }
.search input { width: 100%; padding: 8px 12px 8px 32px; border: 1px solid var(--border-strong); border-radius: var(--radius-sm); background: #fff; outline: none; font-size: 13px; }
.search input:focus { border-color: var(--primary); box-shadow: 0 0 0 2px rgba(22, 119, 255, .12); }
.search svg { position: absolute; left: 12px; top: 11px; width: 14px; height: 14px; color: var(--muted); }
select.filter { padding: 8px 12px; border: 1px solid var(--border-strong); border-radius: var(--radius-sm); background: #fff; outline: none; font-size: 13px; }
select.filter:focus { border-color: var(--primary); }

.tabs { display: flex; gap: 2px; border-bottom: 1px solid var(--border); margin-bottom: 16px; overflow-x: auto; }
.tab { padding: 8px 16px; border: none; background: none; color: var(--text-2); font-size: 13px; white-space: nowrap; border-bottom: 2px solid transparent; margin-bottom: -1px; }
.tab:hover { color: var(--primary); }
.tab.active { color: var(--primary); font-weight: 600; border-bottom-color: var(--primary); }

/* ---------- 密码本分组筛选条 ---------- */
.group-bar { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 16px; padding: 12px 16px; background: #fff; border: 1px solid var(--border); border-radius: 3px; }
.group-bar-label { font-size: 13px; color: var(--muted); white-space: nowrap; }
.group-chip { display: inline-flex; align-items: center; gap: 8px; padding: 4px 12px; border: 1px solid var(--border-strong); border-radius: 3px; background: #fff; color: var(--text-2); font-size: 13px; cursor: pointer; white-space: nowrap; }
.group-chip:hover { color: var(--primary); border-color: var(--primary); }
.group-chip.active { color: #fff; background: var(--primary); border-color: var(--primary); }
.group-chip svg { width: 16px; height: 16px; flex: none; }
.chip-count { min-width: 16px; padding: 0 4px; border-radius: 8px; background: #f0f2f5; color: var(--muted); font-size: 12px; text-align: center; }
.group-chip.active .chip-count { background: rgba(255, 255, 255, .25); color: #fff; }
@media (max-width: 640px) {
  .group-bar { padding: 8px; gap: 8px; }
  .group-bar-label { display: none; }
  .group-chip { padding: 4px 12px; }
}

.progress-line { height: 8px; background: #eef0f4; border-radius: 4px; overflow: hidden; }
.progress-line > i { display: block; height: 100%; border-radius: 4px; transition: width .4s; }
.expiry-row { display: grid; grid-template-columns: minmax(130px, 1.3fr) minmax(90px, 1fr) minmax(120px, 1.6fr) 78px; gap: 12px; align-items: center; padding: 12px 0; border-bottom: 1px solid var(--border); font-size: 13px; font-variant-numeric: tabular-nums; }
.expiry-row:last-child { border-bottom: none; }
.chart-box { width: 100%; overflow-x: auto; }
.chart-box svg { display: block; width: 100%; height: auto; }

/* ---------- 步骤条 / 说明框（控制台风格） ---------- */
.steps { display: flex; align-items: flex-start; gap: 0; margin: 4px 0 8px; padding: 4px 0; }
.step { flex: 1; min-width: 0; position: relative; text-align: center; padding: 0 8px; }
.step::after { content: ''; position: absolute; top: 12px; left: calc(50% + 14px); right: calc(-50% + 14px); height: 1px; background: #c9d0da; }
.step:last-child::after { display: none; }
.step .step-dot { position: relative; z-index: 1; display: grid; place-items: center; width: 24px; height: 24px; margin: 0 auto 8px; border-radius: 50%; border: 1px solid var(--border-strong); background: #fff; color: var(--muted); font-size: 12px; font-weight: 500; }
.step.current .step-dot { background: var(--primary); color: #fff; border-color: var(--primary); }
.step.done .step-dot { background: #fff; color: var(--text-2); border-color: var(--border-strong); }
.step .step-title { font-size: 13px; font-weight: 500; color: var(--text); }
.step .step-desc { font-size: 12px; color: var(--muted); margin-top: 4px; line-height: 1.5; }
.notice { background: var(--surface-2); border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 12px 16px; color: var(--text-2); font-size: 13px; line-height: 1.8; }
.notice ol { margin: 0; padding-left: 18px; }

/* ---------- 表单 / 弹窗 ---------- */
.modal-mask { position: fixed; inset: 0; background: rgba(31, 35, 41, .45); z-index: 90; display: flex; align-items: center; justify-content: center; padding: 16px; }
.modal { background: #fff; border-radius: var(--radius); width: 100%; max-width: 720px; max-height: 90vh; display: flex; flex-direction: column; box-shadow: var(--shadow-pop); }
.modal.wide { max-width: 900px; }
.modal-head { padding: 12px 16px; border-bottom: 1px solid var(--border); display: flex; align-items: center; }
.modal-head h3 { margin: 0; font-size: 16px; font-weight: 500; }
.modal-head .x { margin-left: auto; border: none; background: none; font-size: 20px; line-height: 1; color: var(--muted); padding: 0 4px; }
.modal-body { padding: 16px; overflow-y: auto; }
.modal-foot { padding: 12px 16px; border-top: 1px solid var(--border); display: flex; justify-content: flex-end; gap: 8px; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px 16px; }
.form-item.full { grid-column: 1 / -1; }
.form-item label { display: block; font-size: 13px; font-weight: 500; color: var(--text-2); margin-bottom: 8px; }
.form-item label .req { color: var(--danger); margin-left: 2px; }
.form-item input, .form-item select, .form-item textarea {
  width: 100%; padding: 8px 12px; border: 1px solid var(--border-strong); border-radius: var(--radius-sm);
  background: #fff; color: var(--text); outline: none; transition: .15s; font-size: 13px;
}
.form-item textarea { min-height: 76px; resize: vertical; }
.form-item input:focus, .form-item select:focus, .form-item textarea:focus { border-color: var(--primary); box-shadow: 0 0 0 2px rgba(22, 119, 255, .12); }
.form-item .hint { font-size: 12px; color: var(--muted); margin-top: 4px; }
.form-error { background: var(--danger-soft); color: var(--danger); padding: 8px 12px; border-radius: var(--radius-sm); font-size: 13px; margin-bottom: 16px; }
.form-note { background: var(--surface-2); border: 1px solid var(--border); border-left: 3px solid var(--border-strong); color: var(--text-2); padding: 12px 16px; border-radius: var(--radius-sm); font-size: 13px; margin-bottom: 16px; line-height: 1.7; }
.form-note.warn { background: var(--danger-soft); border-color: #ffd4d4; border-left-color: var(--danger); }
.lk-row { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 12px; margin-top: 8px; font-size: 12px; }
.lk-row b { min-width: 148px; color: var(--text-2); font-weight: 500; }
.lk-row code, .lk-code { background: #fff; border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 2px 8px; font-size: 12px; color: var(--text-2); word-break: break-all; }

.toast { position: fixed; top: 14px; left: 50%; transform: translateX(-50%); z-index: 120; padding: 9px 16px; border-radius: var(--radius-sm); background: #fff; color: var(--text); font-size: 13px; box-shadow: var(--shadow-pop); border: 1px solid var(--border); max-width: 380px; }
.toast.err { background: var(--danger-soft); color: var(--danger); border-color: #ffd4d4; }
.toast.ok { background: var(--success-soft); color: var(--success); border-color: #c6f0de; }

/* ---------- 登录 ---------- */
.login-page { min-height: 100vh; display: grid; place-items: center; padding: 24px; background: var(--bg); }
.login-card { width: 100%; max-width: 400px; background: #fff; border: 1px solid var(--border); border-radius: var(--radius); padding: 32px 24px; box-shadow: 0 8px 28px rgba(31, 35, 41, .08); border-top: 1px solid var(--border); }
.login-brand { display: flex; align-items: center; gap: 12px; margin-bottom: 24px; }
.login-brand .brand-logo { width: 36px; height: 36px; flex-basis: 36px; background: var(--primary); }
.login-brand .brand-name { color: var(--text); font-size: 16px; }
.login-brand .brand-sub { color: var(--muted); }
.login-card h2 { margin: 0 0 8px; font-size: 20px; font-weight: 500; }
.login-card .desc { color: var(--muted); font-size: 13px; margin-bottom: 24px; }
.login-card .form-item { margin-bottom: 16px; }
.login-card .btn { width: 100%; justify-content: center; padding: 8px; margin-top: 8px; }
.login-hint { margin-top: 16px; padding-top: 16px; border-top: 1px dashed var(--border); font-size: 12px; color: var(--muted); line-height: 1.8; }
.login-hint code { background: var(--surface-2); padding: 2px 8px; border-radius: var(--radius-sm); }

/* ---------- 反馈页 ---------- */
.fb-page { min-height: 100vh; padding: 32px 16px; background: var(--bg); }
.fb-card { max-width: 820px; margin: 0 auto; }
.fb-item { display: grid; grid-template-columns: 1fr auto; gap: 12px; align-items: center; padding: 12px 0; border-bottom: 1px solid var(--border); }
.fb-item:last-child { border-bottom: none; }
.fb-num { font-weight: 500; font-size: 16px; }
.fb-meta { font-size: 12px; color: var(--muted); margin-top: 4px; }
.fb-item select { padding: 8px 12px; border: 1px solid var(--border-strong); border-radius: var(--radius-sm); background: #fff; min-width: 140px; }
.fb-actions { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 16px; }
.fb-done { text-align: center; padding: 40px 20px; }

/* ---------- 响应式 ---------- */
@media (max-width: 1180px) {
  .grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .topbar-inner { gap: 16px; padding: 0 16px; }
  .top-nav-item { padding: 0 12px; }
}
@media (max-width: 980px) {
  .topnav { display: none; }
  .menu-toggle { display: grid; }
  .topbar-inner { gap: 12px; }
  .topbar-right { margin-left: auto; }
  .sidebar {
    display: flex; flex-direction: column; position: fixed; inset: 0 auto 0 0; z-index: 40;
    width: 240px; background: #fff; border-right: 1px solid var(--border);
    transform: translateX(-100%); transition: transform .22s; overflow-y: auto;
    box-shadow: 6px 0 24px rgba(31, 35, 41, .12);
  }
  .sidebar.open { transform: translateX(0); }
  .sidebar .brand { padding: 16px; border-bottom: 1px solid var(--border); }
  .nav-scroll { padding: 8px; flex: 1; }
  .nav-group { font-size: 12px; color: var(--muted); letter-spacing: 0; padding: 16px 12px 8px; font-weight: 500; }
  .nav-item {
    display: flex; align-items: center; gap: 8px; padding: 8px 12px; border-radius: var(--radius-sm);
    color: var(--text-2); font-size: 13px; margin-bottom: 4px; border: none; background: none;
    width: 100%; text-align: left;
  }
  .nav-item svg { width: 16px; height: 16px; flex: 0 0 16px; }
  .nav-item:hover { background: var(--surface-2); color: var(--primary); }
  .nav-item.active { background: var(--primary-soft); color: var(--primary-dark); font-weight: 600; }
  .nav-item .badge-count { margin-left: auto; background: var(--danger-soft); color: var(--danger); font-size: 12px; padding: 0 6px; border-radius: 10px; }
  .sidebar-foot { padding: 12px 16px; border-top: 1px solid var(--border); font-size: 12px; color: var(--muted); line-height: 1.7; }
  .scrim.show { display: block; position: fixed; inset: 0; background: rgba(31, 35, 41, .35); z-index: 35; }
  .grid-2 { grid-template-columns: 1fr; }
  .content { padding: 16px; }
  .tags-view { padding: 8px 16px; }
}
@media (max-width: 640px) {
  .grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .kpi .k-value { font-size: 24px; }
  .kpi-icon { display: none; }
  .form-grid { grid-template-columns: 1fr; }
  .content { padding: 16px 16px 96px; }
  .topbar .crumb, .crumb-sep, .topbar h1 { display: none; }
  .brand-sub, .user-chip .u-name, .user-chip .u-role { display: none; }
  .topbar-right { gap: 8px; }
  .page-head { padding: 8px 16px; }
  .page-head .ph-sub { display: none; }
  .card-head { padding: 12px 16px; flex-wrap: wrap; gap: 8px; }
  .card-head h2 { font-size: 14px; flex: 0 0 auto; }
  .card-head .sub { display: none; }
  .card-head .spacer { flex-basis: 100%; height: 0; }
  .card-head .btn { padding: 4px 12px; font-size: 12px; }
  .card-body { padding: 16px; }
  .form-note { padding: 12px 16px; font-size: 13px; }
  .expiry-row { grid-template-columns: 1fr auto; gap: 8px 12px; }
  .expiry-row .bar-cell { grid-column: 1 / -1; }
  .steps { flex-direction: column; gap: 12px; }
  .step { display: grid; grid-template-columns: 24px 1fr; gap: 8px; text-align: left; }
  .step::after { display: none; }
  .step .step-dot { margin: 0; }
  .step .step-desc { margin-top: 0; }
  /* 图表按 SVG 原始比例渲染并允许横向滑动，避免缩放到 6px 的不可读字号 */
  .chart-box svg { min-width: 640px; }
  .table-wrap { -webkit-overflow-scrolling: touch; }
  .table-wrap::-webkit-scrollbar { height: 6px; }
  .table-wrap::-webkit-scrollbar-thumb { background: #c9d0da; border-radius: 4px; }
  table.data .pg-mini { white-space: normal; }
  .mobile-nav {
    display: flex; position: fixed; bottom: 0; left: 0; right: 0; height: 60px; z-index: 45;
    background: #fff; border-top: 1px solid var(--border); padding-bottom: env(safe-area-inset-bottom);
    box-shadow: 0 -2px 12px rgba(31, 35, 41, .05);
  }
  .mobile-nav button { flex: 1; border: none; background: none; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; font-size: 12px; color: var(--muted); }
  .mobile-nav button svg { width: 18px; height: 18px; }
  .mobile-nav button.active { color: var(--primary); font-weight: 600; }
  .modal-mask { align-items: flex-end; padding: 0; }
  .modal { max-width: 100%; border-radius: 8px 8px 0 0; max-height: 92vh; }
  .fb-item { grid-template-columns: 1fr; }
}
@media print {
  .topbar, .sidebar, .tags-view, .mobile-nav, .toolbar, .btn, .tabs, .page-head { display: none !important; }
  .card { box-shadow: none; break-inside: avoid; }
  body { background: #fff; }
}

/* ============================================================
 * 交互反馈与视觉美化层（保持控制台蓝主题的结构与配色不变）
 * 原则：只用 transform / opacity / box-shadow 做动画，避免重排；
 *      尊重 prefers-reduced-motion；打印时全部关闭。
 * ============================================================ */
:root {
  --ease: cubic-bezier(.22, .61, .36, 1);
  --ease-out: cubic-bezier(.16, 1, .3, 1);
  --fx-fast: .16s;
  --fx: .24s;
}

::selection { background: #cfe4ff; color: #0958d9; }
:focus-visible { outline: 2px solid rgba(22, 119, 255, .55); outline-offset: 2px; }
::-webkit-scrollbar-thumb { background: #c3cbd6; border: 2px solid transparent; background-clip: padding-box; border-radius: 8px; }
::-webkit-scrollbar-thumb:hover { background: #a6b3c4; background-clip: padding-box; }

button, .btn, .tab, .tag-view, .top-nav-item, .nav-item, .group-chip,
.modal-head .x, input, select, textarea, .card, .kpi-icon, .brand-logo {
  transition: color var(--fx-fast) var(--ease), background-color var(--fx-fast) var(--ease),
              border-color var(--fx-fast) var(--ease), box-shadow var(--fx-fast) var(--ease),
              transform var(--fx-fast) var(--ease), opacity var(--fx-fast) var(--ease);
}

/* ---------- 全局点击涟漪：挂在独立浮层，页面重绘也不会被打断 ---------- */
#fx-layer { position: fixed; inset: 0; z-index: 9999; pointer-events: none; overflow: hidden; }
.fx-ripple-clip { position: fixed; overflow: hidden; pointer-events: none; }
.fx-ripple {
  position: absolute; border-radius: 50%; pointer-events: none;
  transform: translate(-50%, -50%) scale(.1);
  background: radial-gradient(circle, rgba(22, 119, 255, .34) 0%, rgba(22, 119, 255, .15) 48%, rgba(22, 119, 255, 0) 72%);
  animation: fx-ripple .6s var(--ease-out) forwards;
}
.fx-ripple.on-primary {
  background: radial-gradient(circle, rgba(255, 255, 255, .58) 0%, rgba(255, 255, 255, .22) 48%, rgba(255, 255, 255, 0) 72%);
}
@keyframes fx-ripple {
  0% { transform: translate(-50%, -50%) scale(.1); opacity: .95; }
  65% { opacity: .55; }
  100% { transform: translate(-50%, -50%) scale(1); opacity: 0; }
}
.fx-progress {
  position: fixed; top: 0; left: 0; width: 100%; height: 2px; pointer-events: none;
  transform-origin: left center; background: linear-gradient(90deg, #69b1ff, #1677ff, #0958d9);
  box-shadow: 0 0 10px rgba(22, 119, 255, .6);
  animation: fx-progress .72s var(--ease-out) forwards;
}
@keyframes fx-progress {
  0% { transform: scaleX(0); opacity: 1; }
  72% { transform: scaleX(1); opacity: 1; }
  100% { transform: scaleX(1); opacity: 0; }
}

/* ---------- 页面切换：内容错峰浮入 ---------- */
@keyframes fx-rise {
  from { opacity: 0; transform: translateY(10px) scale(.995); }
  to { opacity: 1; transform: none; }
}
@keyframes fx-fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes fx-pop {
  0% { transform: scale(.6); opacity: 0; }
  70% { transform: scale(1.08); opacity: 1; }
  100% { transform: scale(1); opacity: 1; }
}
.fx-route-enter > * { animation: fx-rise .42s var(--ease-out) both; }
.fx-route-enter > .grid { animation: none; }
.fx-route-enter .grid > .card { animation: fx-rise .46s var(--ease-out) both; }
.fx-route-enter > :nth-child(2) { animation-delay: .04s; }
.fx-route-enter > :nth-child(3) { animation-delay: .08s; }
.fx-route-enter > :nth-child(4) { animation-delay: .12s; }
.fx-route-enter > :nth-child(n+5) { animation-delay: .16s; }
.fx-route-enter .grid > .card:nth-child(1) { animation-delay: .03s; }
.fx-route-enter .grid > .card:nth-child(2) { animation-delay: .09s; }
.fx-route-enter .grid > .card:nth-child(3) { animation-delay: .15s; }
.fx-route-enter .grid > .card:nth-child(4) { animation-delay: .21s; }
.fx-route-enter .grid > .card:nth-child(n+5) { animation-delay: .26s; }

/* 标题条：切换页面时一次高光扫过 + 状态点呼吸 */
.page-head { position: relative; overflow: hidden; }
.fx-route-enter > .page-head::after {
  content: ''; position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(100deg, transparent 22%, rgba(255, 255, 255, .82) 50%, transparent 78%);
  transform: translateX(-100%); animation: fx-sheen 1.05s .12s var(--ease-out) both;
}
@keyframes fx-sheen { to { transform: translateX(100%); } }
.ph-dot { position: relative; }
.ph-dot::after {
  content: ''; position: absolute; inset: -4px; border-radius: 50%;
  border: 1px solid rgba(22, 119, 255, .4); animation: fx-pulse 2.6s ease-out infinite;
}
@keyframes fx-pulse { 0% { transform: scale(.6); opacity: .85; } 100% { transform: scale(1.9); opacity: 0; } }

/* ---------- 按钮：抬升 / 按压 / 主按钮光泽 ---------- */
.btn { position: relative; overflow: hidden; }
.btn:hover { transform: translateY(-1px); box-shadow: 0 3px 9px rgba(22, 119, 255, .13); }
.btn-primary:hover { box-shadow: 0 5px 14px rgba(22, 119, 255, .26); }
.btn-primary::after {
  content: ''; position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(100deg, transparent 32%, rgba(255, 255, 255, .26) 50%, transparent 68%);
  transform: translateX(-120%); transition: transform .6s var(--ease-out);
}
.btn-primary:hover::after { transform: translateX(120%); }
.btn:active, .btn.is-pressed { transform: translateY(0) scale(.97); box-shadow: inset 0 1px 4px rgba(31, 35, 41, .12); }
.btn:disabled { transform: none !important; box-shadow: none !important; }
.btn:disabled:hover { transform: none; box-shadow: none; }
.btn-sm:active, .btn-sm.is-pressed { transform: scale(.94); }

/* ---------- 导航 / 标签 / 筛选 chip ---------- */
.top-nav-item { overflow: hidden; }
.top-nav-item::before {
  content: ''; position: absolute; left: 10px; right: 10px; bottom: 0; height: 2px;
  background: var(--primary-light); transform: scaleX(0); transform-origin: center;
  transition: transform .28s var(--ease-out);
}
.top-nav-item:hover:not(.active)::before { transform: scaleX(1); }
.top-nav-item.active::after { transform-origin: center; animation: fx-underline .34s var(--ease-out) both; }
@keyframes fx-underline { from { transform: scaleX(.35); opacity: .4; } to { transform: scaleX(1); opacity: 1; } }
.top-nav-item:active, .nav-item:active { transform: scale(.97); }
.brand-logo:hover { transform: rotate(-6deg) scale(1.07); box-shadow: 0 4px 12px rgba(22, 119, 255, .3); }
.tag-view:hover { transform: translateY(-1px); box-shadow: 0 3px 8px rgba(22, 119, 255, .12); }
.tag-view.active { box-shadow: inset 0 0 0 1px rgba(22, 119, 255, .12); }
.tag-view:active, .group-chip:active, .tab:active { transform: scale(.96); }
.group-chip:hover { transform: translateY(-1px); box-shadow: 0 3px 8px rgba(22, 119, 255, .12); }
.group-chip.active { box-shadow: 0 3px 9px rgba(22, 119, 255, .22); }
.tab { position: relative; }
.tab:hover:not(.active) { background: linear-gradient(180deg, transparent 55%, #eaf3ff 100%); }
.mobile-nav button { transition: color var(--fx-fast) var(--ease), transform var(--fx-fast) var(--ease); }
.mobile-nav button:active { transform: scale(.9); }
.mobile-nav button.active svg { animation: fx-pop .36s var(--ease-out) both; }

/* ---------- 卡片 / KPI ---------- */
.content .card:not(.kpi):hover { border-color: #cfe0f7; box-shadow: 0 5px 18px rgba(31, 35, 41, .07); }
.card.kpi { position: relative; overflow: hidden; }
.card.kpi::after {
  content: ''; position: absolute; top: 0; left: 0; width: 100%; height: 2px;
  background: linear-gradient(90deg, #1677ff, #69b1ff); transform: scaleX(0); transform-origin: left center;
  transition: transform .38s var(--ease-out);
}
.card.kpi:hover { transform: translateY(-2px); border-color: #b8d8ff; box-shadow: 0 7px 20px rgba(22, 119, 255, .12); }
.card.kpi:hover::after { transform: scaleX(1); }
.card.kpi:hover .kpi-icon { transform: translateY(-2px) scale(1.09); box-shadow: 0 4px 12px rgba(31, 35, 41, .1); }
.kpi .k-value { font-variant-numeric: tabular-nums; }
.card-head h2::before { transition: transform .24s var(--ease-out), background-color .24s; }
.card:hover > .card-head h2::before { transform: scale(1.35); }

/* ---------- 表格 ---------- */
table.data tbody tr { transition: background-color .18s var(--ease); }
table.data tbody tr:hover { background: #f2f8ff; }
table.data tbody tr:hover td:first-child { box-shadow: inset 3px 0 0 var(--primary); }
table.data td { transition: box-shadow .18s var(--ease); }
table.data td.actions .btn:hover { transform: translateY(-1px) scale(1.04); }

/* ---------- 表单 ---------- */
.form-item input:hover, .form-item select:hover, .form-item textarea:hover,
.search input:hover, select.filter:hover { border-color: #b8c6d9; }
.form-item input:focus, .form-item select:focus, .form-item textarea:focus,
.search input:focus, select.filter:focus { box-shadow: 0 0 0 3px rgba(22, 119, 255, .13); }
.form-item select, select.filter, .fb-item select {
  -webkit-appearance: none; appearance: none; padding-right: 28px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%2386909c' stroke-width='2.2' 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 9px center; background-size: 12px 12px;
}
.form-error, .form-note { animation: fx-rise .28s var(--ease-out) both; }

/* ---------- 弹窗 ---------- */
.modal-mask { animation: fx-fade .22s var(--ease-out) both; -webkit-backdrop-filter: blur(2px); backdrop-filter: blur(2px); }
.modal { animation: fx-modal-in .28s var(--ease-out) both; }
@keyframes fx-modal-in {
  from { opacity: 0; transform: translateY(16px) scale(.985); }
  to { opacity: 1; transform: none; }
}
.modal-mask.fx-no-anim, .modal-mask.fx-no-anim .modal { animation: none; }
.modal-head .x { border-radius: 50%; width: 26px; height: 26px; }
.modal-head .x:hover { transform: rotate(90deg); color: var(--danger); background: var(--danger-soft); }
.modal-foot .btn:hover { transform: translateY(-1px); }

/* ---------- 轻提示 ---------- */
.toast {
  /* 纯提示层：不要拦截下方顶部导航的点击（例如刚登录就点菜单） */
  pointer-events: none;
  border-left: 3px solid var(--primary); padding-left: 13px;
  animation: fx-toast-in .3s var(--ease-out) both;
}
.toast.ok { border-left-color: var(--success); }
.toast.err { border-left-color: var(--danger); }
.toast.ok::before { content: '✓'; display: inline-block; margin-right: 8px; font-weight: 700; color: var(--success); }
.toast.err::before { content: '!'; display: inline-block; margin-right: 10px; font-weight: 700; color: var(--danger); }
.toast.fx-toast-out { animation: fx-toast-out .28s var(--ease) both; }
@keyframes fx-toast-in { from { opacity: 0; transform: translate(-50%, -16px); } to { opacity: 1; transform: translate(-50%, 0); } }
@keyframes fx-toast-out { from { opacity: 1; transform: translate(-50%, 0); } to { opacity: 0; transform: translate(-50%, -10px); } }

/* ---------- 启动画面 / 登录页 ---------- */
.fx-boot {
  min-height: 100vh; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px;
  background: linear-gradient(180deg, #e6f0ff 0%, #f4f5f7 55%, #f4f5f7 100%);
}
.fx-boot-logo {
  width: 44px; height: 44px; border-radius: 4px; background: var(--primary); color: #fff;
  display: grid; place-items: center; box-shadow: 0 6px 18px rgba(22, 119, 255, .3);
  animation: fx-breathe 1.6s ease-in-out infinite alternate;
}
.fx-boot-logo svg { width: 24px; height: 24px; }
.fx-boot p { margin: 0; font-size: 12.5px; color: var(--muted); }
.fx-boot-bar { width: 156px; height: 3px; border-radius: 3px; background: #d6e8ff; overflow: hidden; }
.fx-boot-bar i { display: block; width: 42%; height: 100%; border-radius: 3px; background: var(--primary); animation: fx-boot-slide 1.15s var(--ease) infinite; }
@keyframes fx-breathe { from { transform: scale(.94); opacity: .82; } to { transform: scale(1.04); opacity: 1; } }
@keyframes fx-boot-slide { 0% { transform: translateX(-110%); } 100% { transform: translateX(340%); } }
.login-page { position: relative; overflow: hidden; }
.login-page::before, .login-page::after {
  content: ''; position: absolute; border-radius: 50%; pointer-events: none;
  background: radial-gradient(circle, rgba(22, 119, 255, .13), rgba(22, 119, 255, 0) 70%);
  animation: fx-float 11s ease-in-out infinite alternate;
}
.login-page::before { width: 420px; height: 420px; top: -150px; left: -110px; }
.login-page::after { width: 360px; height: 360px; bottom: -140px; right: -100px; animation-delay: -5s; }
@keyframes fx-float { from { transform: translate3d(0, 0, 0); } to { transform: translate3d(22px, -26px, 0); } }
.login-card { position: relative; z-index: 1; animation: fx-modal-in .46s var(--ease-out) both; }
.login-card .btn-primary { padding: 9px; }
.login-brand .brand-logo { animation: fx-pop .5s var(--ease-out) both; }

/* ---------- 反馈页 ---------- */
.fb-card { animation: fx-rise .46s var(--ease-out) both; }
.fb-item { padding-left: 10px; padding-right: 10px; border-radius: 3px; transition: background-color .2s var(--ease), box-shadow .2s var(--ease); }
.fb-item:hover { background: #f7fbff; box-shadow: inset 3px 0 0 var(--primary); }
#fb-body > form > .fb-item { animation: fx-rise .36s var(--ease-out) both; }
#fb-body > form > .fb-item:nth-child(2) { animation-delay: .05s; }
#fb-body > form > .fb-item:nth-child(3) { animation-delay: .1s; }
#fb-body > form > .fb-item:nth-child(n+4) { animation-delay: .15s; }
.fb-done > div:first-child { animation: fx-pop .55s var(--ease-out) both; }

/* ---------- 图表绘制动画（class 由 charts.js 输出） ---------- */
.chart-box svg .fx-bar, .chart-box svg .fx-hbar, .chart-box svg .fx-dot, .chart-box svg .fx-line, .chart-box svg .fx-area { transform-box: fill-box; }
.chart-box svg .fx-bar { transform-origin: center bottom; animation: fx-bar-grow .62s var(--ease-out) both; animation-delay: var(--fx-d, 0ms); }
@keyframes fx-bar-grow { from { transform: scaleY(.02); } to { transform: scaleY(1); } }
.chart-box svg .fx-hbar { transform-origin: left center; animation: fx-hbar-grow .68s var(--ease-out) both; animation-delay: var(--fx-d, 0ms); }
@keyframes fx-hbar-grow { from { transform: scaleX(0); } to { transform: scaleX(1); } }
.chart-box svg .fx-line { stroke-dasharray: 1; stroke-dashoffset: 1; animation: fx-draw 1s var(--ease-out) both; }
@keyframes fx-draw { to { stroke-dashoffset: 0; } }
.chart-box svg .fx-area { animation: fx-fade .85s .12s var(--ease-out) both; }
.chart-box svg .fx-dot { transform-origin: center; animation: fx-pop .34s var(--ease-out) both; animation-delay: var(--fx-d, 0ms); }
.progress-line > i { transform-origin: left center; animation: fx-grow-x .72s var(--ease-out) both; }
@keyframes fx-grow-x { from { transform: scaleX(0); } to { transform: scaleX(1); } }

/* ---------- 无障碍 / 打印 ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .001ms !important; animation-iteration-count: 1 !important;
    transition-duration: .001ms !important; scroll-behavior: auto !important;
  }
  #fx-layer { display: none; }
}
@media print {
  *, *::before, *::after { animation: none !important; transition: none !important; box-shadow: none !important; }
  #fx-layer { display: none !important; }
}

/* ============================================================
 * 工单进度：当前进度卡 + 按日分组的更新时间线
 * 沿用控制台蓝主题，浅色背景 / 深色文字；动画沿用全局 reduce / print 规则
 * ============================================================ */
.pg-mini { max-width: 230px; line-height: 1.5; white-space: normal; }
.pg-mini > span { display: block; font-size: 13px; color: var(--text); word-break: break-all; white-space: normal; }
.pg-mini-at { font-size: 12px; color: var(--muted); margin-top: 4px; white-space: nowrap; font-variant-numeric: tabular-nums; }

.pg-current { background: var(--surface-2); border: 1px solid var(--border); border-left: 3px solid var(--primary); border-radius: var(--radius-sm); padding: 12px 16px; margin-bottom: 16px; }
.pg-current-label { font-size: 12px; color: var(--muted); font-weight: 500; letter-spacing: 0; }
.pg-current-text { font-size: 16px; color: var(--text); line-height: 1.6; margin: 4px 0 8px; word-break: break-word; white-space: pre-wrap; }
.pg-current-meta { font-size: 12px; color: var(--muted); font-variant-numeric: tabular-nums; }

.pg-presets { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 8px 0 12px; }
.pg-presets > .muted { font-size: 12px; margin-right: 4px; }
.pg-preset { border: 1px solid var(--border-strong); background: #fff; color: var(--text-2); font-size: 12px; padding: 4px 12px; border-radius: 11px; line-height: 1.6; }
.pg-preset:hover { border-color: var(--primary); color: var(--primary); background: var(--primary-soft); }
.pg-preset:active { transform: scale(.96); }
.pg-actions { display: flex; justify-content: flex-end; gap: 8px; padding-top: 4px; }

.ptl { margin: 4px 0 2px; }
.ptl-day { margin-bottom: 16px; }
.ptl-day-head { display: flex; align-items: center; gap: 8px; padding: 0 0 8px; border-bottom: 1px dashed var(--border); margin-bottom: 12px; }
.ptl-date { font-size: 13px; font-weight: 500; color: var(--text-2); font-variant-numeric: tabular-nums; }
.ptl-item { display: flex; align-items: flex-start; gap: 10px; padding: 0 0 12px; position: relative; }
.ptl-time { flex: 0 0 58px; font-size: 12px; color: var(--muted); font-variant-numeric: tabular-nums; padding-top: 2px; }
.ptl-dot { flex: 0 0 9px; width: 9px; height: 9px; margin-top: 6px; border-radius: 50%; background: #fff; border: 2px solid var(--primary); box-shadow: 0 0 0 3px var(--primary-soft); position: relative; z-index: 1; }
.ptl-item:not(:last-child)::after { content: ''; position: absolute; left: 71px; top: 15px; bottom: 0; width: 1px; background: var(--border-strong); }
.ptl-body { flex: 1; min-width: 0; }
.ptl-text { font-size: 13px; color: var(--text); line-height: 1.6; word-break: break-word; white-space: pre-wrap; }
.ptl-by { font-size: 12px; color: var(--muted); margin-top: 4px; }
.ptl-day-head + .ptl-item .ptl-dot { background: var(--primary); }
.ptl .empty { padding: 24px 12px; }

.modal-body #progress-form textarea[name="text"] { min-height: 84px; }
.modal-body .section-title { margin-top: 18px; }

@media (max-width: 640px) {
  .pg-mini { max-width: 165px; }
  .ptl-time { flex-basis: 50px; }
  .ptl-item:not(:last-child)::after { left: 63px; }
  .pg-current-text { font-size: 14px; }
}
@media print {
  .pg-preset, .pg-actions, #progress-form { display: none !important; }
  .ptl-item { break-inside: avoid; }
}

/* ============================================================
 * 国备业务：业务老师的独立单页以同源 iframe 原样嵌入
 * 页面内部有自己的配色与滚动，这里只负责外层容器尺寸
 * ============================================================ */
/* 老师页面较宽：取消内容区 1440 上限，宽屏显示器可按 1600+ 宽度排版，避免顶部统计卡片拥挤 */
.content.gb-mode { max-width: none; }
.gb-card { overflow: hidden; }
.gb-head { align-items: center; flex-wrap: wrap; gap: 10px; }
.gb-title { min-width: 0; }
.gb-title h2 { font-size: 14px; }
.gb-title .sub { display: block; margin-top: 4px; font-size: 12px; line-height: 1.6; color: var(--muted); }
.gb-tools { margin-left: auto; flex: 0 0 auto; }
.gb-frame-wrap { position: relative; background: #f4f7f4; border-top: 1px solid var(--border); }
.gb-loading { position: absolute; inset: 0; z-index: 1; display: flex; align-items: center; justify-content: center;
  background: #f4f7f4; color: var(--muted); font-size: 13px; pointer-events: none; }
.gb-frame { display: block; width: 100%; height: calc(100vh - 232px); min-height: 580px; border: 0; background: #fff; }
.gb-foot { padding: 8px 16px; border-top: 1px solid var(--border); background: var(--surface-2); font-size: 12px; color: var(--muted); }
.gb-foot code { padding: 2px 8px; border-radius: 4px; background: var(--surface-2); color: var(--text-2); font-size: 12px; }

@media (max-width: 900px) {
  .gb-tools { margin-left: 0; }
  .gb-frame { height: calc(100vh - 250px); min-height: 68vh; }
  .gb-title .sub { display: none; }
}
@media print {
  .gb-tools, .gb-foot, .gb-loading { display: none !important; }
  .gb-frame { height: auto; min-height: 0; }
}

/* ============================================================
 * 日报周报：统计卡片 / 内容口径 / 自动计划 / 正文预览
 * ============================================================ */
.rp-stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin-bottom: 16px; }
.rp-stat { background: var(--surface-2); border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 12px 8px; text-align: center; }
.rp-stat-v { font-size: 24px; font-weight: 500; line-height: 1.3; color: var(--text); font-variant-numeric: tabular-nums; }
.rp-stat-l { font-size: 12px; color: var(--muted); margin-top: 4px; }
.rp-scope { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin-bottom: 16px; }
.rp-scope-item { background: var(--surface-2); border: 1px solid var(--border); border-left: 3px solid var(--border-strong); border-radius: var(--radius-sm); padding: 12px 16px; }
.rp-scope-item strong { font-size: 13px; color: var(--text); }
.rp-scope-item p { margin: 6px 0 0; font-size: 12px; line-height: 1.75; color: var(--text-2); }
.rp-plan { display: grid; gap: 8px; font-size: 13px; color: var(--text-2); }
.rp-plan > div { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.rp-plan-k { display: inline-block; min-width: 72px; color: var(--muted); font-size: 12px; }
.rp-view-tools { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 10px; }
.rp-frame { display: block; width: 100%; height: 56vh; min-height: 420px; border: 1px solid var(--border); border-radius: var(--radius-sm); background: #f4f6fa; }

@media (max-width: 900px) {
  .rp-scope { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  .rp-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .rp-frame { height: 52vh; }
}
@media print {
  .rp-view-tools { display: none !important; }
  .rp-frame { height: auto; min-height: 0; border: 0; }
}
