﻿/* ============================================================
   智点 · 施工组织设计智能生成平台
   ============================================================ */
:root {
  --bg: #f4f6fb;
  --surface: #ffffff;
  --surface-2: #f8fafc;
  --border: #e3e8f0;
  --border-strong: #cfd8e6;
  --text: #16202e;
  --text-2: #5a6a80;
  --text-3: #8a97a8;
  --brand: #2563eb;
  --brand-dark: #1d4ed8;
  --brand-soft: #eff4ff;
  --accent: #0ea5e9;
  --ok: #16a34a;
  --ok-soft: #ecfdf3;
  --warn: #d97706;
  --warn-soft: #fffbeb;
  --danger: #dc2626;
  --danger-soft: #fef2f2;
  --radius: 14px;
  --radius-sm: 9px;
  --shadow: 0 1px 2px rgba(16, 32, 56, .05), 0 6px 20px -8px rgba(16, 32, 56, .12);
  --shadow-lg: 0 20px 50px -20px rgba(16, 32, 56, .28);
  --font: "Segoe UI", "Microsoft YaHei", "PingFang SC", "Hiragino Sans GB", system-ui, sans-serif;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4 { margin: 0; font-weight: 600; letter-spacing: .01em; }
p { margin: 0; }
code { background: #eef2f8; padding: 1px 6px; border-radius: 5px; font-size: .88em; }

/* ------------------------------------------------------------ 顶栏 */
.topbar {
  display: flex; align-items: center; justify-content: space-between;
  gap: 16px; padding: 14px 28px;
  background: var(--surface); border-bottom: 1px solid var(--border);
  position: sticky; top: 0; z-index: 30;
}
.brand { display: flex; align-items: center; gap: 13px; }
.logo {
  width: 42px; height: 42px; border-radius: 12px; flex: none;
  background: linear-gradient(140deg, var(--brand), var(--accent));
  color: #fff; font-size: 21px; font-weight: 700;
  display: grid; place-items: center;
  box-shadow: 0 6px 16px -6px rgba(37, 99, 235, .6);
}
.brand-text h1 { font-size: 18px; }
.brand-text p { font-size: 12.5px; color: var(--text-3); }
.topbar-right { display: flex; align-items: center; gap: 10px; }

.badge {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 5px 12px; border-radius: 999px;
  background: var(--surface-2); border: 1px solid var(--border);
  font-size: 12.5px; color: var(--text-2);
}
.badge .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--ok); }
.badge.offline .dot { background: var(--warn); }
/* token 计量：灰色=未花费，蓝色=有花费，让「哪一步开始花钱」一眼可见 */
.badge.token-badge { font-variant-numeric: tabular-nums; }
.badge.token-badge .dot { background: var(--text-3, #9aa4b2); }
.badge.token-badge.spent { color: var(--text-1); border-color: var(--accent, #3b82f6); }
.badge.token-badge.spent .dot { background: var(--accent, #3b82f6); }

/* 生成前的 token 花费预估 */
.cost-card { margin-top: 4px; background: var(--surface-2); line-height: 1.7; }
.cost-card strong { color: var(--text-1); }
.cost-card .muted { color: var(--text-3, #8b95a5); font-size: 12.5px; }
/* 上传后提示"本次解析未消耗 token" */
.free-notice {
  display: flex; align-items: center; gap: 8px; margin-top: 10px;
  padding: 9px 12px; border-radius: 8px; font-size: 12.5px;
  background: color-mix(in srgb, var(--ok) 12%, transparent);
  border: 1px solid color-mix(in srgb, var(--ok) 35%, transparent);
  color: var(--text-2);
}

/* ------------------------------------------------------------ 步骤条 */
.steps {
  display: flex; gap: 8px; padding: 16px 28px 0;
  max-width: 1180px; margin: 0 auto; width: 100%;
  overflow-x: auto;
}
.step {
  display: flex; align-items: center; gap: 9px;
  padding: 9px 16px 9px 10px; border-radius: 999px;
  border: 1px solid var(--border); background: var(--surface);
  color: var(--text-2); font-size: 13.5px; font-family: inherit;
  cursor: pointer; white-space: nowrap; transition: .16s;
}
.step i {
  width: 23px; height: 23px; border-radius: 50%; flex: none;
  display: grid; place-items: center; font-style: normal;
  font-size: 12px; font-weight: 600;
  background: var(--surface-2); color: var(--text-3);
}
.step:hover:not(:disabled) { border-color: var(--border-strong); }
.step.is-active { background: var(--brand-soft); border-color: #bfd3ff; color: var(--brand-dark); font-weight: 600; }
.step.is-active i { background: var(--brand); color: #fff; }
.step.is-done i { background: var(--ok-soft); color: var(--ok); }
.step:disabled { opacity: .5; cursor: not-allowed; }

/* ------------------------------------------------------------ 主体 */
main {
  max-width: 1180px; margin: 0 auto; padding: 20px 28px 80px;
  width: 100%;
}
.panel { display: none; animation: fade .22s ease; }
.panel.is-active { display: block; }
@keyframes fade { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

.panel-head { margin-bottom: 18px; }
.panel-head h2 { font-size: 21px; margin-bottom: 6px; }
.panel-head p { color: var(--text-2); font-size: 14px; max-width: 900px; }

.panel-actions {
  display: flex; gap: 12px; justify-content: flex-end;
  margin-top: 22px; flex-wrap: wrap;
}

/* ------------------------------------------------------------ 卡片 */
.card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 18px 20px; box-shadow: var(--shadow);
  margin-bottom: 16px;
}
.card-head {
  display: flex; align-items: center; justify-content: space-between;
  gap: 12px; margin-bottom: 12px;
}
.card-head h3 { font-size: 15.5px; }
.card-actions { display: flex; gap: 8px; }

.grid { display: grid; gap: 16px; margin-bottom: 16px; }
.grid.two { grid-template-columns: repeat(auto-fit, minmax(340px, 1fr)); }
.grid.three { grid-template-columns: repeat(auto-fit, minmax(290px, 1fr)); }
.grid .card { margin-bottom: 0; }

.tag {
  font-size: 12px; padding: 3px 10px; border-radius: 999px;
  background: var(--brand-soft); color: var(--brand-dark); font-weight: 600;
}
.tag.muted { background: var(--surface-2); color: var(--text-3); font-weight: 500; }
.count {
  font-size: 12px; padding: 2px 9px; border-radius: 999px;
  background: var(--surface-2); color: var(--text-2);
}
.count.danger { background: var(--danger-soft); color: var(--danger); }

.muted { color: var(--text-2); font-size: 13.5px; }
.req { font-size: 11px; color: var(--danger); background: var(--danger-soft); padding: 2px 8px; border-radius: 999px; vertical-align: middle; }

/* ------------------------------------------------------------ 按钮 */
.btn {
  font-family: inherit; font-size: 14px; font-weight: 500;
  padding: 10px 20px; border-radius: 10px; cursor: pointer;
  border: 1px solid transparent; transition: .15s; white-space: nowrap;
}
.btn.sm { padding: 6px 13px; font-size: 13px; }
.btn.primary { background: var(--brand); color: #fff; box-shadow: 0 6px 16px -8px rgba(37, 99, 235, .8); }
.btn.primary:hover:not(:disabled) { background: var(--brand-dark); }
.btn.ghost { background: var(--surface); border-color: var(--border-strong); color: var(--text-2); }
.btn.ghost:hover:not(:disabled) { border-color: var(--brand); color: var(--brand); }
.btn:disabled { opacity: .45; cursor: not-allowed; box-shadow: none; }

/* ------------------------------------------------------------ 上传区 */
.dropzone {
  border: 2px dashed var(--border-strong); border-radius: var(--radius);
  background: var(--surface); padding: 46px 24px; text-align: center;
  cursor: pointer; transition: .18s;
}
.dropzone:hover, .dropzone.is-over { border-color: var(--brand); background: var(--brand-soft); }
.dz-icon { width: 46px; height: 46px; color: var(--brand); margin-bottom: 12px; }
.dropzone h3 { font-size: 16px; margin-bottom: 6px; }

.upload-progress { margin-top: 16px; }
.upload-progress p { margin-top: 8px; font-size: 13.5px; color: var(--text-2); }

.bar { height: 8px; border-radius: 999px; background: #e8edf6; overflow: hidden; }
.bar.big { height: 12px; flex: 1; }
.bar > span {
  display: block; height: 100%; width: 0;
  background: linear-gradient(90deg, var(--brand), var(--accent));
  border-radius: 999px; transition: width .3s ease;
}

/* ------------------------------------------------------------ 键值表 */
.kv { margin: 0; display: grid; gap: 9px; }
.kv > div { display: grid; grid-template-columns: 96px 1fr; gap: 12px; align-items: start; }
.kv dt { color: var(--text-3); font-size: 13px; }
.kv dd { margin: 0; font-size: 13.5px; word-break: break-all; }
.kv dd.empty { color: var(--text-3); }

.warn-list { margin: 12px 0 0; padding: 0; list-style: none; display: grid; gap: 6px; }
.warn-list li {
  font-size: 13px; color: var(--warn); background: var(--warn-soft);
  border-radius: 8px; padding: 7px 11px;
}
.warn-list:empty { display: none; }

.summary-box {
  background: var(--brand-soft); border-left: 3px solid var(--brand);
  padding: 12px 16px; border-radius: 0 10px 10px 0;
  font-size: 14px; color: var(--text); line-height: 1.7;
}

/* ------------------------------------------------------------ 列表 */
.bullet-list { margin: 0; padding-left: 18px; display: grid; gap: 7px; }
.bullet-list li { font-size: 13.5px; color: var(--text-2); line-height: 1.65; }
.bullet-list.scroll { max-height: 260px; overflow-y: auto; padding-right: 6px; }
.bullet-list.danger li { color: #9f1239; }
.empty-hint { color: var(--text-3); font-size: 13.5px; padding: 8px 0; }

/* ------------------------------------------------------------ 数据表 */
.table-wrap { overflow-x: auto; }
.data-table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.data-table th, .data-table td {
  border-bottom: 1px solid var(--border); padding: 9px 12px; text-align: left;
  vertical-align: top;
}
.data-table th { background: var(--surface-2); color: var(--text-2); font-weight: 600; white-space: nowrap; }
.data-table td.pts { color: var(--brand-dark); font-weight: 600; white-space: nowrap; }
.data-table tr:last-child td { border-bottom: none; }
.stats-inline { display: flex; gap: 14px; font-size: 12.5px; color: var(--text-2); }
.stats-inline b { color: var(--brand-dark); }

/* ------------------------------------------------------------ 表单 */
.field { margin-bottom: 13px; }
.field label { display: block; font-size: 13px; color: var(--text-2); margin-bottom: 5px; }
.field.inline { display: flex; align-items: center; gap: 12px; }
.field.inline label { margin: 0; width: 76px; flex: none; }
input[type="text"], input[type="number"], select {
  width: 100%; padding: 9px 12px; font-family: inherit; font-size: 14px;
  border: 1px solid var(--border-strong); border-radius: var(--radius-sm);
  background: var(--surface); color: var(--text); transition: .15s;
}
input[type="text"]:focus, input[type="number"]:focus, select:focus {
  outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-soft);
}
.check { display: flex; align-items: flex-start; gap: 9px; margin: 10px 0; font-size: 13.5px; color: var(--text-2); cursor: pointer; }
.check input { margin-top: 3px; width: 16px; height: 16px; accent-color: var(--brand); flex: none; }

/* ------------------------------------------------------------ 页数选择器 */
.page-control { padding: 22px 24px 18px; }
.pc-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 20px; margin-bottom: 20px; }
.pc-head h3 { font-size: 16px; margin-bottom: 4px; }
.pc-head .muted { max-width: 620px; }
.pc-value { display: flex; align-items: baseline; gap: 7px; flex: none; }
.pc-value input {
  width: 118px; font-size: 32px; font-weight: 700; text-align: center;
  color: var(--brand-dark); padding: 4px 8px; border-radius: 10px;
}
.pc-value .unit { font-size: 15px; color: var(--text-2); }

.range {
  -webkit-appearance: none; appearance: none; width: 100%; height: 8px;
  border-radius: 999px; background: #e3e9f4; outline: none; margin: 4px 0 0;
}
.range::-webkit-slider-thumb {
  -webkit-appearance: none; appearance: none;
  width: 24px; height: 24px; border-radius: 50%;
  background: #fff; border: 3px solid var(--brand); cursor: pointer;
  box-shadow: 0 2px 8px rgba(37, 99, 235, .45); transition: .12s;
}
.range::-webkit-slider-thumb:hover { transform: scale(1.08); }
.range::-moz-range-thumb {
  width: 20px; height: 20px; border-radius: 50%; background: #fff;
  border: 3px solid var(--brand); cursor: pointer;
}
.range-scale {
  display: flex; justify-content: space-between;
  font-size: 11.5px; color: var(--text-3); margin-top: 7px;
}

.chips { display: flex; gap: 8px; flex-wrap: wrap; margin: 16px 0 4px; }
.chips button {
  font-family: inherit; font-size: 13px; padding: 6px 14px;
  border-radius: 999px; border: 1px solid var(--border-strong);
  background: var(--surface); color: var(--text-2); cursor: pointer; transition: .15s;
}
.chips button:hover { border-color: var(--brand); color: var(--brand); }
.chips button.is-active { background: var(--brand); border-color: var(--brand); color: #fff; font-weight: 600; }

.pc-hint {
  margin-top: 12px; font-size: 13px; color: var(--warn);
  background: var(--warn-soft); border-radius: 8px; padding: 9px 13px;
}
.pc-hint.info { color: var(--brand-dark); background: var(--brand-soft); }

.pc-meta {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 12px; margin-top: 18px; padding-top: 18px; border-top: 1px dashed var(--border);
}
.pc-meta > div { display: grid; gap: 3px; }
.pc-meta .m-label { font-size: 12px; color: var(--text-3); }
.pc-meta b { font-size: 17px; color: var(--brand-dark); }

/* ------------------------------------------------------------ 大纲树 */
.outline-tree { max-height: 460px; overflow-y: auto; padding-right: 6px; }
.ot-chapter { margin-bottom: 10px; border-left: 2px solid var(--border); padding-left: 12px; }
.ot-chapter > .ot-title {
  display: flex; justify-content: space-between; gap: 12px;
  font-size: 14px; font-weight: 600; padding: 5px 0;
}
.ot-chapter .ot-budget { font-size: 12px; color: var(--text-3); font-weight: 400; white-space: nowrap; }
.ot-section {
  display: flex; justify-content: space-between; gap: 12px;
  font-size: 13px; color: var(--text-2); padding: 3px 0 3px 10px;
}
.ot-section .ot-budget { font-size: 11.5px; color: var(--text-3); white-space: nowrap; }

/* ------------------------------------------------------------ 进度与日志 */
.progress-row { display: flex; align-items: center; gap: 14px; margin-bottom: 10px; }
.progress-row b { font-size: 19px; color: var(--brand-dark); min-width: 58px; text-align: right; }
.stat-row { display: flex; flex-wrap: wrap; gap: 20px; margin-top: 14px; padding-top: 14px; border-top: 1px dashed var(--border); }
.stat-row > div { display: grid; gap: 2px; }
.stat-row .s-label { font-size: 12px; color: var(--text-3); }
.stat-row b { font-size: 15px; }

.log {
  margin: 0; font-family: "Cascadia Mono", Consolas, "Courier New", monospace;
  font-size: 12.5px; line-height: 1.75; color: var(--text-2);
  background: var(--surface-2); border-radius: 10px; padding: 12px 14px;
  max-height: 300px; overflow-y: auto; white-space: pre-wrap; word-break: break-all;
}

/* ------------------------------------------------------------ 规范引用核查 */
.audit-summary {
  display: flex; flex-wrap: wrap; gap: 18px; padding: 11px 14px;
  background: var(--surface-2); border-radius: 9px; margin-bottom: 14px; font-size: 13px;
}
.audit-summary .as-item { color: var(--text-2); }
.audit-summary .as-item b { font-size: 15px; }
.audit-summary .as-item.ok b { color: var(--ok); }
.audit-summary .as-item.warn b { color: var(--warn); }
.audit-summary .as-item.error b { color: var(--danger); }
.audit-summary .as-item.info b { color: var(--text-3); }

.audit-item {
  border-radius: 9px; padding: 11px 14px; margin-bottom: 9px;
  border: 1px solid var(--border);
}
.audit-item.error { background: var(--danger-soft); border-color: #fecaca; }
.audit-item.warn { background: var(--warn-soft); border-color: #fde68a; }
.audit-item.info { background: var(--surface-2); }
.audit-head { display: flex; align-items: center; gap: 9px; flex-wrap: wrap; font-size: 13.5px; }
.audit-level {
  font-size: 11.5px; padding: 2px 9px; border-radius: 999px; font-weight: 600; flex: none;
}
.audit-level.error { background: var(--danger); color: #fff; }
.audit-level.warn { background: var(--warn); color: #fff; }
.audit-level.info { background: var(--border-strong); color: var(--text); }
.audit-title { color: var(--text-2); }
.audit-times { margin-left: auto; font-size: 12px; color: var(--text-3); }
.audit-msg { margin-top: 6px; font-size: 13px; line-height: 1.65; }
.audit-loc { margin-top: 4px; font-size: 12px; color: var(--text-3); }

.audit-clean {
  background: var(--ok-soft); color: var(--ok); border: 1px solid #bbf7d0;
  border-radius: 9px; padding: 11px 14px; font-size: 13.5px;
}
.audit-passed { margin-top: 12px; }
.audit-passed summary { cursor: pointer; font-size: 13px; color: var(--text-2); }
.audit-passed-list { margin-top: 9px; display: grid; gap: 4px; }
.audit-pass-row {
  display: flex; align-items: baseline; gap: 10px; font-size: 12.5px;
  color: var(--text-2); padding: 3px 0;
}
.audit-pass-row b { color: var(--text); white-space: nowrap; }
.audit-pass-row .audit-times { margin-left: auto; }
.audit-note { margin-top: 12px; font-size: 12px; color: var(--text-3); line-height: 1.6; }
.count.warn { background: var(--warn-soft); color: var(--warn); }

/* ------------------------------------------------------------ 页数合规校验 */
.job-warning {
  margin-top: 14px; border-radius: 9px; padding: 11px 15px;
  font-size: 13.5px; line-height: 1.7;
}
.job-warning.danger { background: var(--danger-soft); color: var(--danger); border: 1px solid #fecaca; }
.job-warning.ok { background: var(--ok-soft); color: var(--ok); border: 1px solid #bbf7d0; }
.job-warning b { font-weight: 700; }

.unit-grid { display: flex; flex-wrap: wrap; gap: 6px; max-height: 300px; overflow-y: auto; }.unit-chip {
  font-size: 11.5px; padding: 4px 9px; border-radius: 7px;
  background: var(--surface-2); color: var(--text-3); border: 1px solid var(--border);
}
.unit-chip.running { background: var(--brand-soft); color: var(--brand-dark); border-color: #bfd3ff; }
.unit-chip.done { background: var(--ok-soft); color: var(--ok); border-color: #bbf7d0; }
.unit-chip.failed { background: var(--danger-soft); color: var(--danger); border-color: #fecaca; }

/* ------------------------------------------------------------ 预览 */
.preview {
  max-height: 660px; overflow-y: auto; background: #fff;
  border: 1px solid var(--border); border-radius: 10px; padding: 30px 38px;
  font-family: "FangSong", "仿宋", "SimSun", serif; font-size: 15px; line-height: 1.95;
}
.preview h2 {
  font-family: var(--font); font-size: 18px; text-align: center;
  margin: 26px 0 14px; padding-bottom: 9px; border-bottom: 1px solid var(--border);
}
.preview h2:first-child { margin-top: 0; }
.preview h3 { font-family: var(--font); font-size: 16px; margin: 18px 0 9px; }
.preview h4 { font-family: var(--font); font-size: 14.5px; margin: 14px 0 7px; color: var(--text-2); }
.preview p { text-indent: 2em; margin: 0 0 9px; text-align: justify; }
.preview .tbl-title { font-family: var(--font); font-size: 14px; font-weight: 600; text-align: center; text-indent: 0; margin: 16px 0 7px; }
.preview table { width: 100%; border-collapse: collapse; font-family: var(--font); font-size: 12.5px; margin-bottom: 18px; }
.preview table th, .preview table td { border: 1px solid #93a3b8; padding: 5px 7px; text-align: center; }
.preview table th { background: var(--surface-2); font-weight: 600; }
.preview .placeholder { color: var(--text-3); text-indent: 2em; }
.preview .engine-tag { font-family: var(--font); font-size: 11px; color: var(--text-3); float: right; }

details.raw summary { cursor: pointer; font-size: 14px; font-weight: 600; color: var(--text-2); }
details.raw pre {
  margin: 12px 0 0; max-height: 320px; overflow: auto; font-size: 12.5px;
  background: var(--surface-2); padding: 12px; border-radius: 9px;
  white-space: pre-wrap; color: var(--text-2);
}

/* ------------------------------------------------------------ 提示与弹窗 */
.toast {
  position: fixed; left: 50%; bottom: 30px; transform: translateX(-50%);
  background: #16202e; color: #fff; padding: 11px 22px; border-radius: 10px;
  font-size: 13.5px; z-index: 100; box-shadow: var(--shadow-lg); max-width: 82vw;
}
.toast.error { background: var(--danger); }
.toast.ok { background: var(--ok); }

dialog {
  border: none; border-radius: var(--radius); padding: 26px 28px;
  max-width: 620px; box-shadow: var(--shadow-lg); color: var(--text);
}
dialog::backdrop { background: rgba(16, 32, 56, .45); }
dialog h3 { font-size: 18px; margin-bottom: 14px; }
.help-list { padding-left: 20px; display: grid; gap: 9px; font-size: 13.5px; color: var(--text-2); margin: 0 0 14px; }
dialog form { text-align: right; margin-top: 16px; }

/* ============================================================
   账号 / 充值 / 历史
   ============================================================ */
.badge.spent { color: var(--text); border-color: var(--brand); }
.badge.spent .dot { background: var(--brand); }

.modal {
  position: fixed; inset: 0; z-index: 90;
  background: rgba(16, 32, 56, .45);
  display: flex; align-items: center; justify-content: center;
  padding: 24px;
}
.modal[hidden] { display: none; }
.modal-card {
  background: var(--surface); border-radius: 14px; padding: 22px 24px;
  width: min(440px, 100%); max-height: 88vh; overflow: auto;
  box-shadow: 0 24px 60px rgba(16, 32, 56, .28);
}
.modal-card.wide { width: min(720px, 100%); }
.modal-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; }
.modal-head h3 { font-size: 17px; }
.modal-hint { font-size: 12.5px; color: var(--text-3); line-height: 1.65; margin: 6px 0 12px; }
.modal-actions { display: flex; gap: 10px; margin-top: 14px; }
.modal-error {
  margin-top: 12px; padding: 9px 12px; border-radius: 8px;
  background: #fef2f2; color: #b91c1c; font-size: 13px;
}
.modal h4 { font-size: 14px; margin: 16px 0 8px; }
.modal hr { border: 0; border-top: 1px solid var(--border); margin: 18px 0 0; }

.tabs { display: flex; gap: 6px; margin-bottom: 14px; }
.tabs .tab {
  flex: 1; padding: 8px 10px; border-radius: 8px; cursor: pointer;
  border: 1px solid var(--border); background: var(--surface-2);
  font-size: 13.5px; color: var(--text-2);
}
.tabs .tab.is-active { background: var(--brand-soft); border-color: var(--brand); color: var(--brand-dark); font-weight: 600; }

.account-info { font-size: 13px; line-height: 1.9; }
.plans { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 12px; }
.plan {
  border: 1px solid var(--border); border-radius: 10px; padding: 14px;
  display: grid; gap: 6px; background: var(--surface-2);
}
.plan-head { display: flex; align-items: baseline; justify-content: space-between; }
.plan-price { color: var(--brand-dark); font-weight: 700; font-size: 16px; }
.plan .btn { margin-top: 6px; }
.order-row, .history-row {
  display: flex; flex-direction: column; gap: 3px;
  padding: 9px 0; border-bottom: 1px dashed var(--border); font-size: 13px;
}
.history-row:last-child { border-bottom: 0; }
.history-row a { color: var(--brand-dark); }

@media (max-width: 720px) {
  .modal { padding: 12px; }
  .plans { grid-template-columns: 1fr; }
}

@media (max-width: 720px) {
  .topbar { padding: 12px 16px; }
  .steps { padding: 12px 16px 0; }
  main { padding: 16px 16px 60px; }
  .pc-head { flex-direction: column; }
  .pc-value { align-self: flex-start; }
  .preview { padding: 18px 16px; }
  .brand-text p { display: none; }
}


/* ---------------------------------------------------------------- 工程量清单卡片
   清单是可选输入，视觉上要与已解析文件卡片区分开，也不该抢主流程的注意力，
   所以用更轻的描边 + 次要按钮。 */
.boq-card { margin-top: 14px; border-style: dashed; }
.boq-card.is-over { border-color: var(--accent, #3b82f6); background: rgba(59,130,246,.06); }
.boq-card .card-head h3 .muted { font-weight: 400; font-size: 12px; margin-left: 6px; }
.boq-hint { margin: 6px 0 10px; font-size: 13px; line-height: 1.7; }
.boq-actions { display: flex; gap: 8px; }
.boq-result { margin-top: 12px; padding-top: 10px; border-top: 1px dashed var(--line, #e5e7eb); }
.boq-result .kv { margin: 0 0 8px; }
.boq-error { color: #b91c1c; font-weight: 600; margin: 0 0 6px; }

/* ---------------------------------------------------------------- 顶栏精简
   ★ 这些元素**不能从 DOM 删除** —— app.js 对它们全都有引用
     （如 $('quotaBadge').hidden = !showQuota），删掉会 null 崩溃 ✗。
     所以按用户要求"只保留四项"时，统一在这里隐藏 ✓。
     注意 #btnRecharge 虽被 display:none 隐藏，
     但侧栏「额度与充值」用 .click() 仍能触发它 ✓（display 不影响程序化点击）。 */
#quotaBadge,
#btnRecharge,
#btnHistory,
#accountBadge,
#engineBadge,
#tokenBadge,
#costEstimate,
#jobTokens {
  display: none !important;
}

/* ---------------------------------------------------------------- 勾选项
   用户要求：更醒目、不要每项的详细注解 ✓ */
.opt-checks {
  display: grid;
  gap: 12px;
  margin: 4px 0 18px;
  padding: 16px 18px;
  border: 1px solid #dbe8ff;
  border-radius: var(--radius);
  background: linear-gradient(180deg, #f6faff, #ffffff);
}
.opt-checks .check { margin: 0; }
/* ★ `hidden` 只是浏览器默认样式（优先级最低）✗ —— 一旦作者样式给元素写了
   display（.check 就是 display:flex），hidden 立刻失效 ✗。
   这里显式压过它：被隐藏的「附表数据用大模型」必须留在 DOM 里给 app.js 读，
   但绝不能显示出来 ✓（截图里它当初赫然还在 ✗）。 */
.opt-checks .check[hidden],
.check[hidden] { display: none !important; }
.opt-checks .check-big { font-size: 15.5px; font-weight: 600; color: var(--text); }
.opt-checks .check-big input { width: 19px; height: 19px; }

/* 联系我们弹窗正文 */
.contact-body p { margin: 0 0 10px; font-size: 14px; line-height: 1.75; }
.contact-body .contact-todo { color: #b45309; font-weight: 600; }

/* ---------------------------------------------------------------- 生成选项（醒目版）
   用户要求：从左下空白处移到"投标截止日期"下方，并且**更明显** ✓。
   做法：小标题 + 品牌色竖条 + 更大的勾选框与字号，让这块一眼能看见 ✓。 */
.opt-checks-strong {
  margin-top: 18px;
  padding: 16px 18px 18px 20px;
  border: 1px solid #cddffb;
  border-left: 4px solid var(--brand);
  border-radius: 10px;
  background: linear-gradient(180deg, #f2f7ff, #ffffff);
}
.opt-checks-strong .opt-title {
  margin: 0 0 12px;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: .04em;
  color: var(--brand);
}
.opt-checks-strong .check-big {
  font-size: 17px;
  font-weight: 600;
  color: var(--text);
  padding: 4px 0;
}
.opt-checks-strong .check-big input {
  width: 22px;
  height: 22px;
  margin-top: 0;
}

/* ---------------------------------------------------------------- 地区选择
   新建标书第一步：选了地区才知道该用哪套排版规格与页数标定 ✓。
   未标定地区会加 .warn 立刻警示 ✗（不能等生成完才发现页数不对 ✓）。 */
.region-pick {
  display: flex; flex-wrap: wrap; align-items: center; gap: .6rem;
  margin: 0 0 1rem;
}
.region-pick label { font-weight: 600; }
.region-pick select {
  min-width: 12rem; padding: .45rem .65rem; border-radius: .5rem;
  border: 1px solid var(--border, #d7dce2); background: #fff;
  font: inherit; color: inherit; cursor: pointer;
}
.region-pick select:focus-visible { outline: 2px solid var(--accent, #2563eb); outline-offset: 1px; }
.region-note { font-size: .875rem; color: var(--muted, #6b7280); }
.region-note.warn { color: #b45309; font-weight: 600; }

/* ---------------------------------------------------------------- 危险操作区
   只有最高权限账号看得到 ✓；配色刻意"不好看"✓，让人下意识停一下 ✓。 */
.danger-zone {
  margin-top: 1.25rem; padding: .9rem 1rem;
  border: 1px solid #f0b4b4; border-radius: .6rem; background: #fff7f7;
}
.danger-zone h3 { margin: 0 0 .35rem; font-size: .95rem; color: #b91c1c; }
.danger-note { margin: 0 0 .75rem; font-size: .8125rem; color: #7f1d1d; line-height: 1.6; }
.btn.danger {
  background: #dc2626; border-color: #dc2626; color: #fff;
}
.btn.danger:hover { background: #b91c1c; border-color: #b91c1c; }
.danger-card { border-top: 4px solid #dc2626; }
.destroy-scope {
  margin: 0 0 1rem; padding-left: 1.1rem; max-height: 13rem; overflow: auto;
  font-size: .8125rem; color: #4b5563; line-height: 1.8;
}
.destroy-phrase { display: block; font-size: .875rem; margin-bottom: .75rem; }
.destroy-phrase input {
  display: block; width: 100%; margin-top: .4rem; padding: .5rem .6rem;
  border: 1px solid var(--border, #d7dce2); border-radius: .5rem; font: inherit;
}
.destroy-status { min-height: 1.2rem; font-size: .875rem; color: #b91c1c; font-weight: 600; }
