/* ============================================================
   标书助手 — 应用工作台视觉系统 v2
   取意投标公文的世界：钢笔墨蓝、契约纸白、印章朱红、暖砚灰。
   刻意避开通用科技蓝，用一套沉稳、可信、克制的商务语言。
   布局：左侧墨蓝侧边栏（工作/工具/账户分组）+ 纸白内容区。
   ============================================================ */
:root {
  /* 语义色（保留旧变量名以兼容内联样式引用） */
  --paper: #f8f6f1;      /* 契约纸白（暖，非冷灰） */
  --surface: #ffffff;    /* 卡面 */
  --surface-2: #f3f1ea;  /* 次级面 / 悬浮 */
  --ink: #17324c;        /* 钢笔墨蓝：主操作、标题 */
  --ink-2: #21456a;      /* 次级墨蓝：悬浮 */
  --ink-wash: #eef2f6;   /* 墨蓝极浅底 */
  --seal: #a5352a;       /* 印章朱红：警示 / 否决 / 危险操作 */
  --seal-wash: #fbf0ee;
  --line: #e5e0d5;       /* 发丝线（暖中性） */
  --line-2: #d6d0c2;
  --text: #1e2a35;
  --muted: #6f6758;      /* 暖砚灰文字 */
  --ok: #2f7157;         /* 墨绿 */
  --ok-wash: #e7f0ec;
  --warn: #9a6a15;       /* 琥珀 */
  --warn-wash: #f6efe0;

  /* 侧边栏（墨蓝深底） */
  --side-bg: #142c42;
  --side-line: #23415c;
  --side-text: #a9b8c8;
  --side-text-2: #e8eef4;

  /* 旧变量别名 → 新值（app.js 内联样式仍引用这些） */
  --bg: var(--paper);
  --card: var(--surface);
  --border: var(--line);
  --primary: var(--ink);
  --primary-dark: var(--ink-2);
  --danger: var(--seal);

  --r: 6px;
  --r-lg: 9px;
  --shadow: 0 1px 2px rgba(23, 50, 76, .05), 0 1px 3px rgba(23, 50, 76, .04);
  --shadow-lg: 0 12px 32px rgba(23, 50, 76, .12);
  --sans: "PingFang SC", "Source Han Sans SC", "Source Han Sans CN", "Microsoft YaHei", "Segoe UI", system-ui, sans-serif;
  --serif: "Noto Serif SC", "Source Han Serif SC", "Songti SC", "SimSun", "宋体", serif;
  --num: "SF Mono", "JetBrains Mono", "Consolas", ui-monospace, monospace;
}
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  background: var(--paper);
  color: var(--text);
  font-family: var(--sans);
  font-size: 14px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
.hidden { display: none !important; }
.muted { color: var(--muted); }
.small { font-size: 12.5px; }
.grow { flex: 1; }
b, strong { font-weight: 600; }
/* 数字（金额、编号、天数、token）等宽对齐，更专业 */
.badge, .num, td, th, .info-grid, .rmb-out, #entitlement-bar, .plan-card { font-variant-numeric: tabular-nums; }
a { color: var(--ink); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 2px; }
:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }

/* 线性图标基类 */
.ico { width: 1.05em; height: 1.05em; flex: none; stroke: currentColor; fill: none;
  stroke-width: 1.75; stroke-linecap: round; stroke-linejoin: round; vertical-align: -.14em; }

/* ============================================================
   骨架：侧边栏 + 内容区
   ============================================================ */
.shell { display: flex; min-height: 100vh; }

.side {
  width: 216px; flex: none;
  display: flex; flex-direction: column;
  background: var(--side-bg); border-right: 1px solid var(--side-line);
  position: sticky; top: 0; height: 100vh;
}
.side .brand {
  display: flex; align-items: center; gap: 9px;
  padding: 18px 18px 16px; margin-bottom: 4px;
  font-size: 16px; font-weight: 700; letter-spacing: .02em; color: #fff;
  border-bottom: 1px solid var(--side-line);
}
.side .brand:hover { text-decoration: none; }
.side .brand .brand-mark { width: 25px; height: 25px; flex: none; color: #8fb4cf; }

.side-nav { flex: 1; overflow-y: auto; padding: 10px 10px 12px; }
.nav-group { margin-bottom: 14px; }
.nav-label {
  padding: 6px 10px 4px; font-size: 11px; font-weight: 600; letter-spacing: .12em;
  color: #5d7a94;
}
.tab-btn {
  display: flex; align-items: center; gap: 10px; width: 100%;
  border: none; background: none; cursor: pointer; text-align: left;
  padding: 8px 10px; margin: 1px 0; border-radius: var(--r);
  font: inherit; font-size: 13.5px; color: var(--side-text);
  transition: background .12s, color .12s;
}
.tab-btn .ico { width: 16px; height: 16px; stroke-width: 1.6; opacity: .8; }
.tab-btn:hover { color: var(--side-text-2); background: rgba(255, 255, 255, .06); }
.tab-btn.active {
  color: #fff; font-weight: 600; background: rgba(255, 255, 255, .1);
  box-shadow: inset 2px 0 0 0 #c96a5e;
}
.tab-btn.active .ico { opacity: 1; }

.side-foot { border-top: 1px solid var(--side-line); padding: 12px 14px; }
.side-user { display: flex; align-items: center; gap: 8px; margin-bottom: 10px; }
.side-user-name {
  flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  color: var(--side-text-2); font-size: 12.5px;
}
.side-user .btn {
  background: none; border-color: var(--side-line); color: var(--side-text);
}
.side-user .btn:hover { border-color: #3a5b7a; color: #fff; background: rgba(255, 255, 255, .06); }
.side-link { color: #5d7a94; font-size: 12px; }
.side-link:hover { color: var(--side-text-2); }

main { flex: 1; min-width: 0; max-width: 1160px; margin: 0 auto; padding: 26px 32px 96px; }

.page-head { margin: 2px 0 18px; }
.page-head h1 {
  margin: 0 0 2px; font-size: 20px; font-weight: 700; letter-spacing: .01em; color: var(--ink);
}
.page-head p { margin: 0; font-size: 13px; }

/* ---------- 管理后台子页导航 ---------- */
.admin-nav {
  display: flex; flex-wrap: wrap; gap: 2px;
  margin: -4px 0 18px; border-bottom: 1px solid var(--line);
}
.admin-nav button {
  border: 0; background: none; cursor: pointer;
  padding: 8px 14px; font-size: 13px; color: var(--muted);
  border-bottom: 2px solid transparent; margin-bottom: -1px;
}
.admin-nav button:hover { color: var(--ink); }
.admin-nav button.active { color: var(--ink); font-weight: 600; border-bottom-color: var(--ink); }

/* 示例库拖拽上传高亮 */
#sample-card.drop-hover { outline: 2px dashed var(--ink); outline-offset: -6px; }

/* ---------- 整篇标书预览 ---------- */
.pv-mask {
  position: fixed; inset: 0; z-index: 60;
  background: rgba(20, 28, 36, .55);
  display: flex; flex-direction: column;
}
.pv-bar {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  padding: 10px 16px; background: var(--surface-2); border-bottom: 1px solid var(--line-2);
}
.pv-bar-title { font-weight: 700; color: var(--ink); }
/* 顶栏在浅灰底上，非主按钮给足边框与白底填充，避免“看不到” */
.pv-bar .btn { background: #fff; border-color: var(--line-2); }
.pv-bar .btn:hover { background: var(--ink-wash); border-color: var(--ink); }
.pv-scroll { flex: 1; overflow-y: auto; padding: 24px 12px 60px; }
.pv-paper {
  background: #fff; color: #1e2a35; max-width: 820px; margin: 0 auto;
  padding: 54px 64px; border-radius: 4px; box-shadow: 0 8px 30px rgba(0,0,0,.25);
  font-size: 15px; line-height: 1.9;
}
.pv-cover { text-align: center; padding: 60px 0 90px; border-bottom: 1px dashed var(--line-2); margin-bottom: 30px; }
.pv-cover-title { font-family: "SimHei","黑体",sans-serif; font-size: 40px; font-weight: 700; letter-spacing: 6px; }
.pv-cover-sub { font-family: "SimHei","黑体",sans-serif; font-size: 18px; margin: 10px 0 60px; }
.pv-cover-meta { display: inline-block; text-align: left; font-size: 16px; line-height: 2.6; }
.pv-sec { margin-bottom: 30px; }
.pv-h1 {
  font-family: "SimSun","宋体",serif; font-weight: 700; font-size: 21px;
  margin: 26px 0 12px; padding-bottom: 6px; border-bottom: 1px solid var(--line);
}
.pv-paper .md-h { font-family: "SimSun","宋体",serif; }
.pv-mats { margin-top: 12px; }
.pv-mat { margin: 12px 0; text-align: center; }
.pv-mat img { max-width: 100%; border: 1px solid var(--line); }
.pv-mat figcaption { font-size: 13px; color: var(--muted); margin-top: 4px; }
.pv-mat-ph { margin: 8px 0; padding: 14px; border: 1px dashed var(--line-2); border-radius: 4px; background: var(--surface-2); }
body.pv-open { overflow: hidden; }

@media print {
  body.pv-open > *:not(#preview-root) { display: none !important; }
  #preview-root .pv-bar, #preview-root .pv-mask { display: block; background: none; }
  #preview-root .pv-bar { display: none; }
  #preview-root .pv-scroll { overflow: visible; padding: 0; }
  #preview-root .pv-paper { box-shadow: none; max-width: none; padding: 0; }
}

/* 使用指引弹窗 */
.guide-step { display: flex; gap: 12px; margin: 14px 0; align-items: flex-start; }
.guide-step p { margin: 4px 0 0; line-height: 1.6; }
.guide-num {
  flex: 0 0 auto; width: 24px; height: 24px; border-radius: 50%;
  background: var(--ink); color: #fff; font-size: 13px; font-weight: 600;
  display: flex; align-items: center; justify-content: center; margin-top: 1px;
}

/* ---------- 卡片 ---------- */
.card {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--r-lg); padding: 20px 22px; margin-bottom: 18px;
  box-shadow: var(--shadow);
}
.card h2 {
  margin: 0 0 14px; font-size: 15px; font-weight: 700; letter-spacing: .01em;
  display: flex; align-items: center; gap: 9px;
}
.card h3 { font-size: 13.5px; font-weight: 700; margin: 14px 0 8px; }
.row { display: flex; align-items: center; gap: 10px; margin: 9px 0; }
.row.wrap { flex-wrap: wrap; }
.row.end { justify-content: flex-end; }

.banner {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  background: var(--warn-wash); border: 1px solid #e6d4a8; color: #7c5510;
  border-radius: var(--r); padding: 11px 16px; margin-bottom: 16px; font-size: 13px;
}
.banner a { color: var(--ink); font-weight: 600; }
.banner.danger-banner { background: var(--seal-wash); border-color: #e7c4bf; color: #8a2b22; }
.banner.ent, #entitlement-bar { color: var(--ink); border-color: #cdd8e2; background: var(--ink-wash); }

/* ---------- 登录 ---------- */
#view-auth { min-height: calc(100vh - 130px); display: flex; align-items: center; justify-content: center; }
.auth-wrap { width: min(410px, 92vw); margin: 0 auto; }
.auth-brand {
  display: flex; align-items: center; justify-content: center; gap: 9px;
  font-size: 19px; font-weight: 700; color: var(--ink); margin-bottom: 18px;
}
.auth-brand svg { width: 28px; height: 28px; }
.auth-card { padding: 26px 26px 20px; }
.auth-title { text-align: center; margin: 2px 0 20px; font-size: 18px; font-weight: 700; }
.auth-oidc { font-size: 15px; padding: 11px 14px; }
.auth-hint { text-align: center; margin: 10px 0 0; }
.auth-divider { display: flex; align-items: center; text-align: center; color: var(--muted);
  font-size: 12px; margin: 20px 0 14px; }
.auth-divider::before, .auth-divider::after { content: ""; flex: 1; border-top: 1px solid var(--line); }
.auth-divider span { padding: 0 12px; white-space: nowrap; }
.auth-error { color: var(--seal); font-size: 13px; margin: 4px 0; }
.auth-submit { width: 100%; justify-content: center; }
.auth-back { text-align: center; margin-top: 16px; }
.form-grid.single { grid-template-columns: 1fr; }

/* ---------- 控件 ---------- */
input, select, textarea {
  font: inherit; color: inherit;
  border: 1px solid var(--line-2); border-radius: var(--r);
  padding: 8px 11px; background: #fff; outline: none;
  transition: border-color .12s, box-shadow .12s;
}
input:focus, select:focus, textarea:focus {
  border-color: var(--ink); box-shadow: 0 0 0 3px rgba(23, 50, 76, .1);
}
textarea { width: 100%; resize: vertical; }
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  border: 1px solid var(--line-2); background: #fff; color: var(--text);
  padding: 8px 15px; border-radius: var(--r); cursor: pointer; font: inherit; font-weight: 500;
  white-space: nowrap; transition: background .12s, border-color .12s, color .12s;
}
.btn:hover { border-color: var(--ink); background: var(--surface-2); }
.btn.primary { background: var(--ink); border-color: var(--ink); color: #fff; }
.btn.primary:hover { background: var(--ink-2); border-color: var(--ink-2); }
.btn.danger { color: var(--seal); border-color: #e0c2bd; }
.btn.danger:hover { border-color: var(--seal); background: var(--seal-wash); }
.btn:disabled { opacity: .45; cursor: not-allowed; }
.btn.small { padding: 4px 10px; font-size: 12.5px; }
.btn .ico { width: 15px; height: 15px; }

/* ---------- 表格 ---------- */
.table { width: 100%; border-collapse: collapse; margin-top: 8px; }
.table th, .table td {
  text-align: left; padding: 9px 11px;
  border-bottom: 1px solid var(--line); vertical-align: top;
}
.table thead th {
  color: var(--muted); font-weight: 600; font-size: 11.5px;
  text-transform: none; letter-spacing: .03em; border-bottom-color: var(--line-2);
}
.table tbody tr:hover { background: var(--surface-2); }

/* ---------- 表单 ---------- */
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px 22px; margin: 12px 0; }
.form-grid label { display: flex; flex-direction: column; gap: 5px; font-size: 13px; color: var(--muted); }
.form-grid label.full { grid-column: 1 / -1; }
.form-grid input, .form-grid select { width: 100%; }

/* ---------- 项目列表 ---------- */
.proj-list { display: flex; flex-direction: column; gap: 9px; }
.proj-item {
  display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
  border: 1px solid var(--line); border-radius: var(--r); padding: 12px 15px;
  background: var(--surface); transition: border-color .12s, box-shadow .12s;
}
.proj-item:hover { border-color: var(--line-2); box-shadow: var(--shadow); }
.proj-item .name { font-weight: 600; cursor: pointer; color: var(--ink); }
.proj-item .name:hover { text-decoration: underline; text-underline-offset: 2px; }

/* ---------- 徽标 ---------- */
.badge {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 2px 10px; border-radius: 999px; font-size: 12px; font-weight: 500;
  background: var(--surface-2); color: var(--muted); border: 1px solid var(--line);
  white-space: nowrap;
}
.badge.st-done { background: var(--ok-wash); color: var(--ok); border-color: #c5ddd2; }
.badge.st-generating { background: var(--ink-wash); color: var(--ink); border-color: #cdd8e2; }
.badge.st-error { background: var(--seal-wash); color: var(--seal); border-color: #e7c4bf; }
.badge.kind { background: #f0ece2; color: #6b5d3e; border-color: #e0d8c6; }
/* 状态圆点（替代 emoji） */
.dot { display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: currentColor; flex: none; }

/* ---------- 项目详情 ---------- */
.detail-head { display: flex; align-items: center; gap: 12px; margin-bottom: 16px; flex-wrap: wrap; }
.detail-head h1 { font-size: 21px; font-weight: 700; margin: 0; flex: 1; min-width: 200px; }
.step-tag {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 22px; height: 22px; padding: 0 5px; border-radius: 5px;
  background: var(--ink); color: #fff; font-size: 12px; font-weight: 700;
  font-family: var(--num); margin-right: 9px; flex: none; letter-spacing: .02em;
}
.card h2 .step-tag { vertical-align: middle; }

.stream {
  background: #12293c; color: #9fd6c8;
  border: 1px solid #1e3b52; border-radius: var(--r); padding: 13px 15px; margin: 12px 0;
  font-family: var(--num); font-size: 12px;
  white-space: pre-wrap; word-break: break-all; max-height: 260px; overflow-y: auto;
}
.spin { display: inline-block; animation: spin 1s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

.info-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 8px 20px; margin: 12px 0; }
.info-grid .item b { color: var(--muted); font-weight: 600; margin-right: 6px; }
.list-block { margin: 10px 0; }
.list-block h4 { margin: 12px 0 5px; font-size: 13px; font-weight: 700; }
.list-block li { margin: 3px 0; }
.match-ok { color: var(--ok); }
.match-miss { color: var(--warn); }
.chip {
  display: inline-block; background: var(--ink-wash); color: var(--ink);
  border: 1px solid #d3dde6; border-radius: 5px; padding: 1px 9px; font-size: 12px; margin: 2px 4px 2px 0;
}

/* ---------- 章节 ---------- */
.sec-row { border: 1px solid var(--line); border-radius: var(--r); margin: 9px 0; background: var(--surface); }
.sec-head { display: flex; align-items: center; gap: 9px; padding: 10px 13px; flex-wrap: wrap; }
.sec-ord { color: var(--muted); font-family: var(--num); width: 22px; text-align: center; flex: none; }
.sec-title { flex: 2; min-width: 160px; }
.sec-kind { flex: none; }
.sec-body { border-top: 1px solid var(--line); padding: 12px 13px; }
.sec-hint { width: 100%; margin-bottom: 8px; }
.sec-content { width: 100%; min-height: 180px; font-family: inherit; }
.sec-mats { margin: 7px 0; }

/* ---------- 弹窗 ---------- */
.modal-mask { position: fixed; inset: 0; background: rgba(18, 30, 42, .5);
  display: flex; align-items: center; justify-content: center; z-index: 100; padding: 20px; }
.modal {
  background: #fff; border-radius: var(--r-lg); padding: 22px 24px;
  width: min(680px, 96vw); max-height: 86vh; overflow-y: auto; box-shadow: var(--shadow-lg);
}
.modal h3 { margin: 0 0 16px; font-size: 16px; font-weight: 700; }
.modal .row.end { margin-top: 16px; }
.pick-group { margin: 8px 0; }
.pick-group h4 { margin: 8px 0 4px; font-size: 13px; color: var(--muted); }
.pick-item { display: block; margin: 4px 0; cursor: pointer; }

/* ---------- Toast ---------- */
#toast { position: fixed; bottom: 30px; left: 50%; transform: translateX(-50%);
  z-index: 200; display: flex; flex-direction: column; gap: 8px; align-items: center; }
.toast-item {
  background: var(--ink); color: #fff; border-radius: var(--r);
  padding: 10px 20px; font-size: 13px; box-shadow: var(--shadow-lg); animation: fadein .2s;
}
.toast-item.err { background: var(--seal); }
@keyframes fadein { from { opacity: 0; transform: translateY(8px); } }

/* ---------- 自查 / 自检结果 ---------- */
.status-ok { color: var(--ok); white-space: nowrap; }
.status-risk { color: var(--warn); white-space: nowrap; }
.status-missing { color: var(--seal); white-space: nowrap; font-weight: 600; }
.status-manual { color: var(--muted); white-space: nowrap; }

/* ---------- 章节工具条 / 版本历史 ---------- */
.sec-tools { border-top: 1px solid var(--line); margin-top: 9px; padding-top: 9px; }
.ver-item { border: 1px solid var(--line); border-radius: var(--r); padding: 9px 13px; margin: 8px 0; }
.sec-mode-bar { margin: 5px 0 7px; }
.addendum-box summary { cursor: pointer; }

/* ---------- Markdown 预览（刻意保留宋体/黑体，模拟 Word 成稿观感） ---------- */
.md-preview {
  border: 1px solid var(--line); border-radius: var(--r);
  padding: 18px 24px; background: #fff; max-height: 540px; overflow-y: auto;
  font-family: "SimSun", "宋体", serif; font-size: 14px; line-height: 1.9;
}
.md-preview .md-h { font-family: "SimHei", "黑体", "Microsoft YaHei", sans-serif; font-weight: 700; margin: 15px 0 6px; }
.md-preview .md-h2 { font-size: 17px; }
.md-preview .md-h3 { font-size: 15.5px; }
.md-preview .md-h4 { font-size: 14.5px; }
.md-preview p.md-p { text-indent: 2em; margin: 6px 0; }
.md-preview p.md-num { margin: 6px 0; }
.md-preview p.md-empty { color: var(--muted); text-indent: 0; }
.md-preview ul { margin: 6px 0 6px 26px; padding: 0; }
.md-preview li { margin: 3px 0; }
.md-preview table.md-table { border-collapse: collapse; width: 100%; margin: 10px 0; }
.md-preview .md-table th, .md-preview .md-table td { border: 1px solid #8a8f98; padding: 5px 9px; font-size: 13px; text-align: left; }
.md-preview .md-table th { background: #f3f4f6; font-weight: 700; }
.todo-mark { background: #fbe6c4; padding: 0 3px; border-radius: 3px; }

/* ---------- 金额换算 ---------- */
.rmb-out { border: 1px solid var(--line-2); border-radius: var(--r);
  padding: 13px 16px; margin: 12px 0; font-size: 15px; line-height: 2; word-break: break-all; background: var(--surface-2); }

/* ---------- 套餐与用量 ---------- */
.ent-summary { display: flex; flex-wrap: wrap; gap: 8px 36px; margin: 4px 0 10px; }
.ent-summary .item { min-width: 130px; }
.ent-summary .item .k { color: var(--muted); font-size: 12px; }
.ent-summary .item .v { font-size: 17px; font-weight: 600; color: var(--ink); }
.ent-summary .item .v .badge { vertical-align: 2px; margin-left: 6px; }
.meter { background: var(--ink-wash); border: 1px solid #d3dde6; border-radius: 999px;
  height: 10px; overflow: hidden; max-width: 380px; margin: 6px 0 4px; }
.meter-fill { height: 100%; background: var(--ink); border-radius: 999px; transition: width .3s; }
.meter-fill.full { background: var(--seal); }

.plan-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 14px; margin: 12px 0 8px; }
.plan-card {
  border: 1px solid var(--line); border-radius: var(--r-lg); padding: 18px 18px 16px;
  display: flex; flex-direction: column; background: var(--surface);
  transition: border-color .12s, box-shadow .12s;
}
.plan-card:hover { border-color: var(--line-2); box-shadow: var(--shadow); }
.plan-card.current { border-color: var(--ink); box-shadow: inset 0 2px 0 0 var(--ink); }
.plan-card h3 { margin: 0; font-size: 15px; font-weight: 700; color: var(--ink); }
.plan-card .plan-price { margin: 10px 0 2px; color: var(--ink); }
.plan-card .plan-price b { font-family: var(--num); font-size: 24px; font-weight: 700; }
.plan-card .plan-price span { color: var(--muted); font-size: 12.5px; }
.plan-card .plan-alt { color: var(--muted); font-size: 12.5px; margin: 0 0 8px; min-height: 1.4em; }
.plan-card ul { list-style: none; margin: 6px 0 14px; padding: 0; flex: 1; }
.plan-card li { position: relative; padding-left: 18px; margin: 5px 0; font-size: 13px; }
.plan-card li::before { content: ""; position: absolute; left: 1px; top: 8px; width: 8px; height: 4px;
  border-left: 1.6px solid var(--ok); border-bottom: 1.6px solid var(--ok); transform: rotate(-45deg); }
.plan-card .row { margin: 0; gap: 8px; }
.plan-card .btn { flex: 1; }

/* ============================================================
   响应式：窄屏时侧边栏折叠为顶部横条
   ============================================================ */
@media (max-width: 860px) {
  .shell { flex-direction: column; }
  .side { width: 100%; height: auto; position: sticky; flex-direction: row; align-items: center;
    flex-wrap: wrap; padding: 0; z-index: 50; }
  .side .brand { border-bottom: none; padding: 12px 14px; margin: 0; font-size: 15px; }
  .side-nav { flex: 1; display: flex; overflow-x: auto; padding: 0 8px; }
  .nav-group { display: flex; margin: 0; }
  .nav-label { display: none; }
  .tab-btn { width: auto; white-space: nowrap; padding: 14px 10px; margin: 0; border-radius: 0; }
  .tab-btn.active { box-shadow: inset 0 -2px 0 0 #c96a5e; background: none; }
  .side-foot { border-top: none; padding: 8px 12px; display: flex; align-items: center; gap: 10px; }
  .side-user { margin: 0; }
  .side-link { display: none; }
  main { padding: 16px 14px 80px; }
  .form-grid { grid-template-columns: 1fr; }
  #view-auth { min-height: calc(100vh - 220px); }
}
@media (prefers-reduced-motion: reduce) {
  * { animation-duration: .001ms !important; transition-duration: .001ms !important; }
}
