/* ============================================================
   创想企业报价单智能生成管理系统 v1.0
   视觉体系：墨绿纸张 × 铜色票据（Quotation Atelier）
   ============================================================ */
:root {
  --ink: #111c17;
  --ink-2: #17251f;
  --ink-3: #1f3129;
  --ink-4: #2b3f35;
  --paper: #f2eee4;
  --paper-2: #f8f5ed;
  --card: #fdfbf6;
  --card-2: #f7f2e7;
  --line: #e2dac9;
  --line-2: #ece6d8;
  --line-dark: #cbbfa9;
  --copper: #b57a4b;
  --copper-2: #c98f5e;
  --copper-3: #e2b98f;
  --copper-soft: rgba(181, 122, 75, .1);
  --sage: #3c6754;
  --sage-2: #57836d;
  --sage-soft: rgba(60, 103, 84, .1);
  --warn: #b57e28;
  --warn-soft: rgba(181, 126, 40, .12);
  --danger: #a94b3d;
  --danger-soft: rgba(169, 75, 61, .1);
  --info: #3c6480;
  --info-soft: rgba(60, 100, 128, .1);
  --success: #3a7359;
  --success-soft: rgba(58, 115, 89, .11);
  --muted: #7e8377;
  --muted-2: #9ba093;
  --text: #1e2a24;
  --serif: "Songti SC", "Source Han Serif SC", "Noto Serif SC", "SimSun", Georgia, "Times New Roman", serif;
  --sans: "PingFang SC", "Microsoft YaHei", "Lantinghei SC", "Helvetica Neue", Arial, sans-serif;
  --shadow-1: 0 1px 0 rgba(255, 255, 255, .7) inset, 0 12px 28px -22px rgba(17, 28, 23, .5);
  --shadow-2: 0 2px 0 #e9e2d2, 0 26px 56px -26px rgba(17, 28, 23, .5);
  --radius: 3px;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--sans);
  font-size: 13.5px;
  color: var(--text);
  background-color: var(--paper);
  background-image:
    linear-gradient(rgba(17, 28, 23, .024) 1px, transparent 1px),
    linear-gradient(90deg, rgba(17, 28, 23, .024) 1px, transparent 1px),
    radial-gradient(900px 420px at 88% -8%, rgba(181, 122, 75, .09), transparent 62%);
  background-size: 34px 34px, 34px 34px, 100% 100%;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
p { margin: 0; }
button { font-family: inherit; cursor: pointer; }
input, select, textarea { font-family: inherit; font-size: 13.5px; color: var(--text); }
h1, h2, h3, h4 { margin: 0; font-weight: 600; }
em { font-style: normal; }
::selection { background: var(--copper-soft); color: var(--ink); }
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-thumb { background: #cfc5b0; border-radius: 8px; border: 2px solid transparent; background-clip: content-box; }
::-webkit-scrollbar-track { background: transparent; }

/* ---------------- 应用骨架 ---------------- */
.shell { display: flex; min-height: 100vh; }
.sidebar {
  position: fixed; inset: 0 auto 0 0; width: 252px; z-index: 50;
  display: flex; flex-direction: column;
  background: linear-gradient(175deg, #14211b 0%, #101b16 48%, #0d1713 100%);
  color: #ded6c7;
  border-right: 1px solid #22332b;
}
.sidebar::before {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background-image: linear-gradient(rgba(226, 185, 143, .04) 1px, transparent 1px);
  background-size: 100% 42px;
  mask-image: linear-gradient(#000, transparent 78%);
}
.brand { display: flex; align-items: center; gap: 12px; padding: 22px 22px 20px; border-bottom: 1px solid rgba(226, 185, 143, .13); position: relative; }
.brand-mark { width: 40px; height: 40px; color: #e8dfcd; flex: none; }
.brand-mark svg { width: 100%; height: 100%; display: block; }
.brand-text { display: flex; flex-direction: column; line-height: 1.25; }
.brand-text strong { font-family: var(--serif); font-size: 17px; letter-spacing: .08em; color: #f2ead9; font-weight: 600; }
.brand-text span { font-size: 8.5px; letter-spacing: .28em; color: #9c8f79; margin-top: 4px; }
.brand-light .brand-text strong { color: #f4eddd; }

.nav-scroll { flex: 1; overflow-y: auto; padding: 14px 0 18px; position: relative; }
.nav-scroll::-webkit-scrollbar-thumb { background: #33463b; }
.nav { display: flex; flex-direction: column; gap: 2px; }
.nav-group { padding: 0 12px; }
.nav-group-head {
  display: flex; align-items: center; gap: 10px; width: 100%;
  background: none; border: 0; color: #8e978c; padding: 11px 10px 9px;
  text-align: left; font-size: 11.5px; letter-spacing: .12em;
}
.nav-group-head .idx { font-family: var(--serif); font-size: 10px; color: var(--copper-2); letter-spacing: .05em; width: 18px; opacity: .9; }
.nav-group-head .name { flex: 1; color: #b7bcb1; font-weight: 500; }
.nav-group-head i { font-size: 9px; color: #64766b; transition: transform .25s; }
.nav-group.is-open .nav-group-head i { transform: rotate(180deg); }
.nav-group-head:hover .name { color: #e7dfcf; }
.nav-items { display: none; flex-direction: column; gap: 1px; padding: 0 0 8px; }
.nav-group.is-open .nav-items { display: flex; }
.nav-item {
  position: relative; display: flex; align-items: center; gap: 11px;
  padding: 9px 12px 9px 38px; color: #9fa79b; font-size: 13px; border-radius: 2px;
  transition: color .18s, background .18s;
}
.nav-item i { font-size: 12px; width: 16px; text-align: center; color: #6f8175; transition: color .18s; }
.nav-item:hover { color: #f0e9da; background: rgba(226, 185, 143, .06); }
.nav-item.active { color: #f6efdf; background: linear-gradient(90deg, rgba(181, 122, 75, .22), rgba(181, 122, 75, .03)); }
.nav-item.active::before { content: ""; position: absolute; left: 0; top: 6px; bottom: 6px; width: 2px; background: var(--copper-3); }
.nav-item.active i { color: var(--copper-3); }
.sidebar-foot { border-top: 1px solid rgba(226, 185, 143, .13); padding: 14px 22px 18px; font-size: 10.5px; color: #6f7d72; }
.sf-row { display: flex; justify-content: space-between; letter-spacing: .08em; margin-bottom: 6px; }
.sf-row em { color: var(--copper-3); font-family: var(--serif); }
.sf-company { color: #5e6d62; letter-spacing: .02em; }

.shell-body { flex: 1; min-width: 0; margin-left: 252px; display: flex; flex-direction: column; }
.topbar {
  position: sticky; top: 0; z-index: 40; height: 66px; flex: none;
  display: flex; align-items: center; gap: 18px; padding: 0 30px;
  background: rgba(248, 245, 237, .88);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.crumbs { display: flex; align-items: center; gap: 10px; font-size: 12px; color: var(--muted); flex: 1; min-width: 0; }
.crumb-module { letter-spacing: .06em; }
.crumb-sep { font-size: 10px; color: #c9bdaa; transform: rotate(12deg); }
.crumb-page { color: var(--ink); font-weight: 600; letter-spacing: .02em; }
.top-actions { display: flex; align-items: center; gap: 10px; }
.search-trigger {
  display: flex; align-items: center; gap: 9px; height: 34px; padding: 0 12px;
  background: var(--card); border: 1px solid var(--line); border-radius: 2px;
  color: var(--muted); font-size: 12px; min-width: 232px;
}
.search-trigger i { color: var(--copper); }
.search-trigger kbd { margin-left: auto; font-family: var(--sans); font-size: 9.5px; color: var(--muted-2); border: 1px solid var(--line); padding: 2px 5px; border-radius: 2px; letter-spacing: .05em; }
.top-divider { width: 1px; height: 24px; background: var(--line); }
.icon-btn {
  position: relative; width: 34px; height: 34px; display: inline-flex; align-items: center; justify-content: center;
  background: transparent; border: 1px solid transparent; border-radius: 2px; color: #4d5a52;
}
.icon-btn:hover { background: var(--card); border-color: var(--line); color: var(--ink); }
.icon-btn .dot-count {
  position: absolute; top: 2px; right: 1px; min-width: 15px; height: 15px; padding: 0 4px;
  background: var(--copper); color: #fff; font-style: normal; font-size: 9px; line-height: 15px;
  border-radius: 8px; text-align: center;
}
.user-chip { display: flex; align-items: center; gap: 9px; padding: 4px 8px; border-radius: 2px; cursor: pointer; }
.user-chip:hover { background: var(--card); }
.avatar { display: inline-flex; align-items: center; justify-content: center; width: 30px; height: 30px; flex: none; border-radius: 50%; background: var(--ink); color: var(--copper-3); font-family: var(--serif); font-size: 13px; }
.avatar.lg { width: 40px; height: 40px; font-size: 17px; }
.uc-text { display: flex; flex-direction: column; line-height: 1.3; }
.uc-text strong { font-size: 12.5px; font-weight: 600; }
.uc-text small { color: var(--muted); font-size: 10px; }
.user-chip > i { color: var(--muted-2); font-size: 9px; }

.popover {
  position: absolute; top: 58px; right: 30px; width: 322px; z-index: 60;
  background: var(--card); border: 1px solid var(--line); border-radius: 2px;
  box-shadow: var(--shadow-2); overflow: hidden;
}
.pop-head { display: flex; align-items: baseline; justify-content: space-between; padding: 15px 18px 11px; border-bottom: 1px solid var(--line-2); }
.pop-head strong { font-family: var(--serif); font-size: 14px; letter-spacing: .04em; }
.pop-head span { font-size: 10px; color: var(--muted-2); letter-spacing: .12em; }
.pop-item { display: flex; align-items: center; gap: 12px; padding: 11px 18px; border-bottom: 1px solid var(--line-2); }
.pop-item:last-child { border-bottom: 0; }
.pop-item:hover { background: var(--card-2); }
.pop-item > i { width: 26px; height: 26px; display: inline-flex; align-items: center; justify-content: center; color: var(--copper); background: var(--copper-soft); font-size: 11px; border-radius: 50%; }
.pop-item div { flex: 1; display: flex; flex-direction: column; line-height: 1.35; }
.pop-item b { font-size: 12.5px; font-weight: 600; }
.pop-item small { font-size: 10.5px; color: var(--muted); }
.pop-item em { font-style: normal; font-family: var(--serif); font-size: 16px; color: var(--ink); }
.up-head { display: flex; gap: 12px; align-items: center; padding: 17px 18px; border-bottom: 1px solid var(--line-2); background: var(--card-2); }
.up-head div { display: flex; flex-direction: column; line-height: 1.4; }
.up-head strong { font-family: var(--serif); font-size: 15px; }
.up-head small { font-size: 10.5px; color: var(--muted); }

.main { flex: 1; padding: 30px 32px 40px; max-width: 1640px; width: 100%; }
.app-footer { display: flex; align-items: center; gap: 10px; padding: 16px 32px 22px; font-size: 10.5px; color: var(--muted-2); letter-spacing: .05em; }
.af-dot { width: 3px; height: 3px; background: var(--copper); border-radius: 50%; }
.af-right { margin-left: auto; color: var(--muted); letter-spacing: .18em; }
.sidebar-mask { display: none; }

/* ---------------- 页头与通用结构 ---------------- */
.page { animation: rise .34s ease both; }
@keyframes rise { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
.page-head { display: flex; align-items: flex-end; gap: 22px; margin-bottom: 24px; flex-wrap: wrap; }
.page-head-main { flex: 1; min-width: 260px; }
.eyebrow { display: inline-flex; align-items: center; gap: 9px; font-size: 9.5px; letter-spacing: .28em; color: var(--copper); text-transform: uppercase; }
.eyebrow::before { content: ""; width: 22px; height: 1px; background: var(--copper); opacity: .55; }
.page-title { font-family: var(--serif); font-size: 30px; line-height: 1.22; letter-spacing: .02em; margin: 9px 0 7px; color: var(--ink); font-weight: 600; }
.page-desc { color: var(--muted); font-size: 12.5px; letter-spacing: .01em; max-width: 720px; }
.page-actions { display: flex; gap: 9px; align-items: center; flex-wrap: wrap; padding-bottom: 4px; }
.section-note { font-size: 10.5px; color: var(--muted-2); letter-spacing: .1em; }
.section-head { display: flex; align-items: center; gap: 12px; margin: 0 0 12px; }
.section-head h3 { font-family: var(--serif); font-size: 16px; letter-spacing: .05em; font-weight: 600; }
.section-head .line { flex: 1; height: 1px; background: var(--line); }
.section-head .more { font-size: 11px; color: var(--muted); display: inline-flex; align-items: center; gap: 5px; }
.section-head .more:hover { color: var(--copper); }

/* ---------------- KPI ---------------- */
.kpi-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; margin-bottom: 20px; }
.kpi-grid.five { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.kpi-card {
  position: relative; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 17px 18px 15px; box-shadow: var(--shadow-1); overflow: hidden;
}
.kpi-card::after { content: ""; position: absolute; left: 0; top: 0; width: 38px; height: 2px; background: var(--copper); }
.kpi-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 8px; }
.kpi-label { font-size: 10.5px; letter-spacing: .14em; color: var(--muted); }
.kpi-icon { width: 28px; height: 28px; display: inline-flex; align-items: center; justify-content: center; border: 1px solid var(--line); color: var(--copper); font-size: 11px; border-radius: 50%; background: var(--paper-2); }
.kpi-value { font-family: var(--serif); font-size: 29px; line-height: 1.1; letter-spacing: .01em; margin-top: 11px; color: var(--ink); }
.kpi-value small { font-family: var(--sans); font-size: 11px; color: var(--muted); margin-left: 4px; letter-spacing: .04em; }
.kpi-foot { display: flex; align-items: center; gap: 6px; margin-top: 8px; font-size: 10.5px; color: var(--muted-2); }
.trend-up { color: var(--success); }
.trend-down { color: var(--danger); }
.kpi-foot .sep { width: 1px; height: 9px; background: var(--line); }

/* ---------------- 卡片 ---------------- */
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow-1); }
.card-pad { padding: 20px 22px; }
.card-head { display: flex; align-items: center; gap: 12px; padding: 16px 20px; border-bottom: 1px solid var(--line-2); }
.card-head h3 { font-family: var(--serif); font-size: 15.5px; letter-spacing: .05em; }
.card-head .sub { font-size: 10.5px; color: var(--muted-2); letter-spacing: .08em; }
.card-head .spacer { flex: 1; }
.card-body { padding: 18px 20px; }
.card-body.tight { padding: 0; }
.grid-2 { display: grid; grid-template-columns: 1.55fr 1fr; gap: 16px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.split-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.stack { display: flex; flex-direction: column; gap: 16px; }

/* ---------------- 按钮 ---------------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  height: 34px; padding: 0 15px; border-radius: 2px; border: 1px solid var(--line-dark);
  background: var(--card); color: var(--text); font-size: 12.5px; letter-spacing: .02em;
  transition: all .18s; white-space: nowrap;
}
.btn i { font-size: 11px; }
.btn:hover { border-color: var(--copper); color: var(--copper); background: #fffdf8; }
.btn-primary { background: var(--ink); border-color: var(--ink); color: #f3ecdd; }
.btn-primary:hover { background: var(--ink-3); border-color: var(--ink-3); color: #fff; }
.btn-copper { background: var(--copper); border-color: var(--copper); color: #fff; }
.btn-copper:hover { background: #a76c3f; border-color: #a76c3f; color: #fff; }
.btn-ghost { background: transparent; }
.btn-ghost:hover { background: var(--card); }
.btn-danger { color: var(--danger); border-color: #d9b9b1; background: #fdf7f5; }
.btn-danger:hover { background: var(--danger); border-color: var(--danger); color: #fff; }
.btn-sm { height: 27px; padding: 0 10px; font-size: 11.5px; }
.btn-xs { height: 24px; padding: 0 8px; font-size: 11px; }
.btn-lg { height: 44px; padding: 0 20px; font-size: 13.5px; }
.btn-block { width: 100%; }
.btn[disabled] { opacity: .5; pointer-events: none; }
.text-btn { background: none; border: 0; color: var(--copper); font-size: 12px; padding: 0; display: inline-flex; align-items: center; gap: 5px; }
.text-btn:hover { color: var(--ink); }
.text-btn.danger { color: var(--danger); }

/* ---------------- 工具栏 / 筛选 ---------------- */
.toolbar { display: flex; align-items: center; gap: 10px; padding: 14px 16px; border-bottom: 1px solid var(--line-2); flex-wrap: wrap; }
.toolbar .spacer { flex: 1; }
.search-box { display: flex; align-items: center; gap: 8px; height: 34px; padding: 0 11px; border: 1px solid var(--line); background: var(--paper-2); border-radius: 2px; min-width: 240px; }
.search-box i { color: var(--muted-2); font-size: 11px; }
.search-box input { border: 0; background: none; outline: none; flex: 1; font-size: 12.5px; }
.select-mini { height: 34px; border: 1px solid var(--line); background: var(--paper-2); border-radius: 2px; padding: 0 9px; font-size: 12px; color: var(--text); outline: none; }
.select-mini:focus { border-color: var(--copper); }
.chips { display: flex; gap: 6px; flex-wrap: wrap; }
.chip {
  display: inline-flex; align-items: center; gap: 6px; height: 29px; padding: 0 12px;
  border: 1px solid var(--line); border-radius: 15px; background: transparent;
  color: var(--muted); font-size: 11.5px; letter-spacing: .02em;
}
.chip:hover { border-color: var(--copper); color: var(--copper); }
.chip.active { background: var(--ink); border-color: var(--ink); color: #f2e9d8; }
.chip em { font-style: normal; font-size: 10px; opacity: .7; }
.view-toggle { display: inline-flex; border: 1px solid var(--line); border-radius: 2px; overflow: hidden; }
.view-toggle button { width: 32px; height: 32px; border: 0; background: var(--paper-2); color: var(--muted); }
.view-toggle button + button { border-left: 1px solid var(--line); }
.view-toggle button.active { background: var(--ink); color: var(--copper-3); }

/* ---------------- 表格 ---------------- */
.table-wrap { width: 100%; overflow-x: auto; }
table.dt { width: 100%; border-collapse: collapse; font-size: 12.5px; }
table.dt th {
  text-align: left; font-weight: 500; font-size: 10.5px; letter-spacing: .12em; color: var(--muted);
  padding: 11px 14px; border-bottom: 1px solid var(--line); white-space: nowrap; background: var(--paper-2);
}
table.dt td { padding: 12px 14px; border-bottom: 1px solid var(--line-2); vertical-align: middle; }
table.dt tbody tr:last-child td { border-bottom: 0; }
table.dt tbody tr:hover { background: #faf6ec; }
.td-num { font-family: var(--serif); font-size: 13.5px; letter-spacing: .02em; white-space: nowrap; }
.td-strong { font-weight: 600; color: var(--ink); }
.td-sub { display: block; font-size: 10.5px; color: var(--muted-2); margin-top: 3px; }
.row-link { color: var(--ink); font-weight: 600; border-bottom: 1px solid transparent; }
.row-link:hover { color: var(--copper); border-bottom-color: var(--copper); }
.table-actions { display: flex; gap: 4px; justify-content: flex-end; white-space: nowrap; }
.table-actions button { background: none; border: 0; color: var(--muted); font-size: 11.5px; padding: 3px 6px; border-radius: 2px; }
.table-actions button:hover { color: var(--copper); background: var(--copper-soft); }
.table-actions .danger:hover { color: var(--danger); background: var(--danger-soft); }
.table-foot { display: flex; align-items: center; gap: 10px; padding: 12px 16px; border-top: 1px solid var(--line-2); font-size: 11.5px; color: var(--muted); }
.table-foot .spacer { flex: 1; }
.pager { display: flex; gap: 4px; }
.pager button { min-width: 26px; height: 26px; border: 1px solid var(--line); background: var(--card); border-radius: 2px; color: var(--muted); font-size: 11px; }
.pager button.active { background: var(--ink); border-color: var(--ink); color: #f2e9d8; }
.pager button[disabled] { opacity: .35; }

/* ---------------- 状态标签 ---------------- */
.pill { display: inline-flex; align-items: center; gap: 5px; height: 21px; padding: 0 8px; border-radius: 11px; font-size: 10.5px; letter-spacing: .03em; border: 1px solid; white-space: nowrap; }
.pill::before { content: ""; width: 4px; height: 4px; border-radius: 50%; background: currentColor; }
.pill.muted { color: #7d837a; border-color: #ddd7c9; background: #f6f3eb; }
.pill.warn { color: var(--warn); border-color: #e6d3ae; background: #fcf5e7; }
.pill.success { color: var(--success); border-color: #c3d6c8; background: #f0f6f1; }
.pill.info { color: var(--info); border-color: #c4d5e0; background: #f0f5f8; }
.pill.danger { color: var(--danger); border-color: #e0c3bc; background: #fbf1ee; }
.pill.copper { color: var(--copper); border-color: #e0c9b4; background: var(--copper-soft); }
.tag { display: inline-flex; align-items: center; height: 19px; padding: 0 7px; border-radius: 2px; background: var(--copper-soft); color: var(--copper); font-size: 10px; letter-spacing: .04em; }
.tag.ink { background: rgba(17, 28, 23, .07); color: var(--ink-3); }
.tag.danger { background: var(--danger-soft); color: var(--danger); }
.level-badge { display: inline-flex; align-items: center; justify-content: center; width: 24px; height: 24px; font-family: var(--serif); font-size: 13px; border: 1px solid; border-radius: 50%; }
.level-A { color: var(--copper); border-color: var(--copper); background: var(--copper-soft); }
.level-B { color: var(--sage); border-color: var(--sage); background: var(--sage-soft); }
.level-C { color: var(--muted); border-color: var(--line-dark); background: var(--paper-2); }

/* ---------------- 表单 ---------------- */
.field { display: flex; flex-direction: column; gap: 6px; }
.field-label { font-size: 11px; color: var(--muted); letter-spacing: .05em; }
.field-label b { color: var(--danger); font-weight: 500; margin-left: 2px; }
.field-wrap { display: flex; align-items: center; gap: 9px; border: 1px solid var(--line); background: var(--card); padding: 0 11px; height: 38px; border-radius: 2px; transition: border .18s, box-shadow .18s; }
.field-wrap:focus-within { border-color: var(--copper); box-shadow: 0 0 0 3px rgba(181, 122, 75, .1); }
.field-wrap i { color: var(--muted-2); font-size: 12px; }
.field-wrap input { border: 0; outline: 0; background: none; flex: 1; height: 100%; font-size: 13px; }
.field-wrap .eye { background: none; border: 0; color: var(--muted-2); font-size: 12px; }
.form-control { width: 100%; height: 38px; border: 1px solid var(--line); background: var(--card); border-radius: 2px; padding: 0 10px; outline: none; transition: border .18s, box-shadow .18s; }
textarea.form-control { height: auto; min-height: 76px; padding: 9px 10px; line-height: 1.6; resize: vertical; }
.form-control:focus { border-color: var(--copper); box-shadow: 0 0 0 3px rgba(181, 122, 75, .1); }
.form-control:disabled { background: var(--paper-2); color: var(--muted); }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px 16px; }
.form-grid .col-full { grid-column: 1 / -1; }
.form-grid.three { grid-template-columns: repeat(3, 1fr); }
.checkbox { display: inline-flex; align-items: center; gap: 7px; font-size: 12px; color: var(--muted); }
.checkbox input { accent-color: var(--copper); width: 14px; height: 14px; }
.form-error { margin-top: 12px; padding: 9px 12px; border-left: 2px solid var(--danger); background: var(--danger-soft); color: var(--danger); font-size: 12px; }
.form-tip { font-size: 10.5px; color: var(--muted-2); line-height: 1.6; }
.switch { position: relative; display: inline-flex; width: 38px; height: 21px; flex: none; }
.switch input { position: absolute; opacity: 0; }
.switch em { position: absolute; inset: 0; background: #d8d2c4; border-radius: 12px; transition: .2s; }
.switch em::after { content: ""; position: absolute; width: 15px; height: 15px; background: #fff; border-radius: 50%; top: 3px; left: 3px; transition: .2s; box-shadow: 0 1px 2px rgba(0,0,0,.2); }
.switch input:checked + em { background: var(--sage); }
.switch input:checked + em::after { left: 20px; }

/* ---------------- 标签页 ---------------- */
.tabs { display: flex; gap: 20px; border-bottom: 1px solid var(--line); padding: 0 2px; }
.tab { position: relative; background: none; border: 0; padding: 11px 1px 10px; color: var(--muted); font-size: 12.5px; letter-spacing: .02em; }
.tab::after { content: ""; position: absolute; left: 0; right: 0; bottom: -1px; height: 2px; background: transparent; }
.tab:hover { color: var(--ink); }
.tab.active { color: var(--ink); font-weight: 600; }
.tab.active::after { background: var(--copper); }
.tab em { font-style: normal; font-size: 10px; margin-left: 4px; color: var(--muted-2); }
.tab-pane { display: none; }
.tab-pane.active { display: block; }

/* ---------------- 票据卡片（报价单） ---------------- */
.q-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.q-card {
  position: relative; background: var(--card); border: 1px solid var(--line); box-shadow: var(--shadow-1);
  display: grid; grid-template-columns: 1fr 170px; min-height: 168px;
}
.q-main { padding: 17px 18px 14px; min-width: 0; }
.q-code { font-family: var(--serif); font-size: 11px; letter-spacing: .14em; color: var(--copper); }
.q-title { font-family: var(--serif); font-size: 15.5px; line-height: 1.4; margin: 7px 0 6px; color: var(--ink); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.q-meta { font-size: 11px; color: var(--muted); display: flex; flex-wrap: wrap; gap: 6px 12px; }
.q-meta i { font-size: 10px; color: var(--muted-2); margin-right: 3px; }
.q-side { position: relative; border-left: 1px dashed #d6cbb7; display: flex; flex-direction: column; justify-content: center; align-items: flex-end; padding: 18px 16px; background: linear-gradient(180deg, #fcf9f1, #f8f3e6); }
.q-side::before, .q-side::after { content: ""; position: absolute; left: -8px; width: 15px; height: 15px; border-radius: 50%; background: var(--paper); border: 1px solid var(--line); }
.q-side::before { top: -8px; }
.q-side::after { bottom: -8px; }
.q-amount { font-family: var(--serif); font-size: 21px; color: var(--ink); letter-spacing: .01em; text-align: right; }
.q-amount small { font-size: 10px; color: var(--muted); display: block; margin-top: 2px; letter-spacing: .12em; }
.q-margin { margin-top: 10px; font-size: 10.5px; color: var(--muted); }
.q-margin b { font-family: var(--serif); font-size: 14px; color: var(--sage); font-weight: 600; }
.q-margin b.low { color: var(--danger); }
.q-bottom { grid-column: 1 / -1; border-top: 1px solid var(--line-2); display: flex; align-items: center; gap: 8px; padding: 9px 16px; }
.q-bottom .spacer { flex: 1; }
.q-actions { display: flex; gap: 4px; }
.q-actions button { background: none; border: 0; color: var(--muted); font-size: 11px; padding: 3px 6px; }
.q-actions button:hover { color: var(--copper); }
.stamp { position: absolute; top: 14px; right: 186px; transform: rotate(-8deg); border: 1px solid currentColor; padding: 2px 7px; font-size: 9px; letter-spacing: .18em; opacity: .55; }
.stamp.success { color: var(--success); }
.stamp.warn { color: var(--warn); }
.stamp.danger { color: var(--danger); }
.stamp.muted { color: var(--muted); }
.special-mark { display: inline-flex; align-items: center; gap: 4px; font-size: 9.5px; color: var(--danger); letter-spacing: .06em; }

/* ---------------- 模板卡片 ---------------- */
.tpl-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.tpl-card { background: var(--card); border: 1px solid var(--line); padding: 18px; position: relative; box-shadow: var(--shadow-1); display: flex; flex-direction: column; gap: 10px; }
.tpl-card::before { content: ""; position: absolute; top: 0; left: 18px; width: 32px; height: 2px; background: var(--copper); }
.tpl-kicker { display: flex; justify-content: space-between; font-size: 10px; letter-spacing: .12em; color: var(--muted-2); }
.tpl-name { font-family: var(--serif); font-size: 16px; line-height: 1.4; color: var(--ink); }
.tpl-desc { font-size: 11.5px; color: var(--muted); line-height: 1.6; min-height: 34px; }
.tpl-stat { display: flex; gap: 16px; padding: 9px 0; border-top: 1px solid var(--line-2); border-bottom: 1px solid var(--line-2); }
.tpl-stat div { display: flex; flex-direction: column; }
.tpl-stat b { font-family: var(--serif); font-size: 15px; color: var(--ink); font-weight: 600; }
.tpl-stat span { font-size: 9.5px; color: var(--muted-2); letter-spacing: .08em; }
.tpl-foot { display: flex; gap: 6px; align-items: center; margin-top: auto; }
.tpl-foot .spacer { flex: 1; }

/* ---------------- 产品卡片 ---------------- */
.p-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 13px; }
.p-card { background: var(--card); border: 1px solid var(--line); padding: 15px 16px 13px; position: relative; box-shadow: var(--shadow-1); }
.p-head { display: flex; align-items: flex-start; gap: 10px; }
.p-icon { width: 34px; height: 34px; flex: none; display: inline-flex; align-items: center; justify-content: center; background: var(--ink); color: var(--copper-3); font-size: 13px; border-radius: 2px; }
.p-name { font-family: var(--serif); font-size: 14.5px; line-height: 1.35; color: var(--ink); }
.p-code { font-size: 9.5px; color: var(--muted-2); letter-spacing: .12em; }
.p-spec { font-size: 11px; color: var(--muted); margin: 8px 0 10px; line-height: 1.5; height: 33px; overflow: hidden; }
.p-prices { display: flex; align-items: flex-end; justify-content: space-between; border-top: 1px solid var(--line-2); padding-top: 9px; }
.p-price { font-family: var(--serif); font-size: 18px; color: var(--ink); }
.p-price small { font-size: 9px; color: var(--muted-2); display: block; letter-spacing: .1em; }
.p-margin { text-align: right; font-size: 10px; color: var(--muted); }
.p-margin b { display: block; font-family: var(--serif); font-size: 14px; color: var(--sage); }
.p-foot { display: flex; gap: 4px; margin-top: 10px; }
.p-foot .spacer { flex: 1; }

/* ---------------- 客户卡片 ---------------- */
.c-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 13px; }
.cust-card { background: var(--card); border: 1px solid var(--line); padding: 16px 17px; box-shadow: var(--shadow-1); position: relative; }
.cust-head { display: flex; gap: 11px; align-items: flex-start; }
.cust-name { font-family: var(--serif); font-size: 15px; line-height: 1.4; color: var(--ink); }
.cust-meta { font-size: 10.5px; color: var(--muted); margin-top: 4px; }
.cust-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 13px; padding-top: 11px; border-top: 1px solid var(--line-2); }
.cust-stats div { display: flex; flex-direction: column; gap: 2px; }
.cust-stats b { font-family: var(--serif); font-size: 15px; color: var(--ink); font-weight: 600; }
.cust-stats span { font-size: 9.5px; color: var(--muted-2); letter-spacing: .05em; }
.cust-foot { display: flex; align-items: center; gap: 6px; margin-top: 11px; }
.cust-foot .spacer { flex: 1; }

/* ---------------- 看板 ---------------- */
.kanban { display: grid; grid-template-columns: repeat(5, minmax(190px, 1fr)); gap: 12px; overflow-x: auto; padding-bottom: 6px; }
.kanban-col { background: var(--paper-2); border: 1px solid var(--line); border-radius: 2px; min-height: 220px; display: flex; flex-direction: column; }
.kb-head { display: flex; align-items: center; gap: 8px; padding: 10px 12px; border-bottom: 1px solid var(--line-2); font-size: 11px; letter-spacing: .08em; color: var(--muted); }
.kb-head b { font-family: var(--serif); font-size: 14px; color: var(--ink); margin-left: auto; }
.kb-body { padding: 9px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.k-card { background: var(--card); border: 1px solid var(--line); padding: 11px 12px; box-shadow: 0 6px 14px -12px rgba(17,28,23,.5); }
.k-card:hover { border-color: var(--copper); }
.k-title { font-size: 12px; font-weight: 600; line-height: 1.45; }
.k-meta { display: flex; justify-content: space-between; align-items: center; margin-top: 8px; font-size: 10px; color: var(--muted); }
.k-amount { font-family: var(--serif); font-size: 13px; color: var(--ink); }

/* ---------------- 时间轴 ---------------- */
.timeline { position: relative; padding-left: 18px; }
.timeline::before { content: ""; position: absolute; left: 4px; top: 6px; bottom: 6px; border-left: 1px dashed #d3c7b2; }
.tl-item { position: relative; padding: 0 0 15px 6px; }
.tl-dot { position: absolute; left: -18px; top: 4px; width: 8px; height: 8px; border-radius: 50%; background: var(--card); border: 1.5px solid var(--copper); }
.tl-item.ok .tl-dot { border-color: var(--success); background: var(--success); }
.tl-item.warn .tl-dot { border-color: var(--warn); }
.tl-title { font-size: 12px; font-weight: 600; line-height: 1.45; }
.tl-meta { font-size: 10.5px; color: var(--muted-2); margin-top: 3px; }
.tl-text { font-size: 11.5px; color: var(--muted); margin-top: 4px; line-height: 1.55; }

/* ---------------- 列表项 ---------------- */
.task-item { display: flex; align-items: center; gap: 12px; padding: 11px 16px; border-bottom: 1px solid var(--line-2); }
.task-item:last-child { border-bottom: 0; }
.task-item:hover { background: #faf6ec; }
.task-main { flex: 1; min-width: 0; }
.task-title { font-size: 12.5px; font-weight: 600; color: var(--ink); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.task-meta { font-size: 10.5px; color: var(--muted); margin-top: 3px; display: flex; gap: 10px; flex-wrap: wrap; }
.task-right { text-align: right; }
.task-right b { font-family: var(--serif); font-size: 15px; display: block; }
.task-right span { font-size: 10px; color: var(--muted-2); }
.list-row { display: flex; align-items: center; gap: 10px; padding: 10px 16px; border-bottom: 1px solid var(--line-2); }
.list-row:last-child { border-bottom: 0; }
.list-row:hover { background: #faf6ec; }
.list-row .lr-main { flex: 1; min-width: 0; }
.list-row .lr-title { font-size: 12px; color: var(--ink); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.list-row .lr-sub { font-size: 10px; color: var(--muted-2); margin-top: 2px; }
.list-row .lr-val { font-family: var(--serif); font-size: 13px; }
.list-row .lr-val.small { font-size: 11px; color: var(--muted); }
.avatar-stack { display: flex; }
.avatar-stack span { width: 24px; height: 24px; border-radius: 50%; background: var(--ink); color: var(--copper-3); font-family: var(--serif); font-size: 10px; display: inline-flex; align-items: center; justify-content: center; border: 2px solid var(--card); margin-left: -6px; }
.avatar-stack span:first-child { margin-left: 0; }

/* ---------------- 图表 ---------------- */
.chart-box { position: relative; width: 100%; }
.chart-box svg { display: block; width: 100%; overflow: visible; }
.chart-legend { display: flex; gap: 14px; flex-wrap: wrap; margin-top: 10px; font-size: 10.5px; color: var(--muted); }
.chart-legend i { display: inline-block; width: 8px; height: 8px; border-radius: 2px; margin-right: 5px; }
.chart-empty { height: 160px; display: flex; align-items: center; justify-content: center; color: var(--muted-2); font-size: 12px; }
.bar-row { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
.bar-label { width: 106px; font-size: 11px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bar-track { flex: 1; height: 6px; background: var(--line-2); border-radius: 3px; overflow: hidden; }
.bar-fill { height: 100%; background: linear-gradient(90deg, var(--copper), var(--copper-3)); border-radius: 3px; }
.bar-fill.sage { background: linear-gradient(90deg, var(--sage), var(--sage-2)); }
.bar-val { width: 74px; text-align: right; font-family: var(--serif); font-size: 11.5px; color: var(--ink); }
.donut-wrap { display: flex; align-items: center; gap: 18px; }
.donut-center { display: flex; flex-direction: column; align-items: center; }
.stat-big { font-family: var(--serif); font-size: 24px; color: var(--ink); }
.stat-cap { font-size: 9.5px; letter-spacing: .12em; color: var(--muted-2); }

/* ---------------- 详情 / 进度 ---------------- */
.detail-strip { display: flex; gap: 0; border: 1px solid var(--line); background: var(--paper-2); flex-wrap: wrap; }
.detail-strip > div { padding: 10px 16px; border-right: 1px solid var(--line); min-width: 120px; }
.detail-strip > div:last-child { border-right: 0; }
.detail-strip span { display: block; font-size: 9.5px; letter-spacing: .1em; color: var(--muted-2); margin-bottom: 4px; }
.detail-strip b { font-family: var(--serif); font-size: 14px; font-weight: 600; color: var(--ink); }
.progress { height: 5px; background: var(--line-2); border-radius: 3px; overflow: hidden; }
.progress > i { display: block; height: 100%; background: var(--sage); }
.progress.warn > i { background: var(--warn); }
.progress.danger > i { background: var(--danger); }
.node-chain { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.node-chip { display: inline-flex; align-items: center; gap: 6px; padding: 5px 9px; border: 1px solid var(--line); background: var(--paper-2); font-size: 10.5px; color: var(--muted); border-radius: 2px; }
.node-chip.done { border-color: #c3d6c8; color: var(--success); background: var(--success-soft); }
.node-chip.current { border-color: var(--copper); color: var(--copper); background: var(--copper-soft); }
.node-arrow { color: #ccc2af; font-size: 9px; }

/* ---------------- 弹窗 ---------------- */
.modal-mask {
  position: fixed; inset: 0; z-index: 100; display: flex; align-items: flex-start; justify-content: center;
  padding: 5vh 24px 40px; overflow-y: auto;
  background: rgba(12, 20, 16, .5); backdrop-filter: blur(3px);
  animation: maskIn .2s ease both;
}
@keyframes maskIn { from { opacity: 0 } to { opacity: 1 } }
.modal {
  position: relative; width: 620px; max-width: 100%; background: var(--card);
  border: 1px solid #d8cdb9; border-radius: 2px;
  box-shadow: 0 2px 0 #ece5d6, 0 40px 80px -30px rgba(10, 18, 14, .6);
  animation: modalIn .24s cubic-bezier(.22, .8, .3, 1) both;
}
.modal::before { content: ""; position: absolute; inset: 5px -5px -5px 5px; border: 1px solid rgba(203, 191, 169, .55); z-index: -1; pointer-events: none; }
@keyframes modalIn { from { opacity: 0; transform: translateY(14px) scale(.99); } to { opacity: 1; transform: none; } }
.modal.lg { width: 880px; }
.modal.xl { width: 1080px; }
.modal.sm { width: 440px; }
.modal-head { display: flex; align-items: flex-start; gap: 16px; padding: 20px 24px 15px; border-bottom: 1px solid var(--line); background: linear-gradient(180deg, #fdfbf6, #faf6ec); }
.modal-head .eyebrow { font-size: 8.5px; }
.modal-title { font-family: var(--serif); font-size: 19px; letter-spacing: .02em; margin-top: 5px; color: var(--ink); }
.modal-sub { font-size: 11px; color: var(--muted); margin-top: 4px; line-height: 1.5; }
.modal-head .spacer { flex: 1; }
.modal-close { width: 28px; height: 28px; border: 1px solid var(--line); background: var(--card); color: var(--muted); border-radius: 2px; display: inline-flex; align-items: center; justify-content: center; font-size: 11px; }
.modal-close:hover { color: var(--danger); border-color: #d9b9b1; }
.modal-body { padding: 20px 24px; max-height: 66vh; overflow-y: auto; }
.modal-foot { display: flex; align-items: center; gap: 9px; padding: 14px 24px; border-top: 1px solid var(--line); background: var(--paper-2); }
.modal-foot .spacer { flex: 1; }
.modal-foot .hint { font-size: 10.5px; color: var(--muted-2); }
.modal-close-x { background: none; border: 0; font-size: 16px; color: var(--muted-2); }
.modal-tabs { margin: -4px 0 0; }

/* ---------------- Toast ---------------- */
#toast-root { position: fixed; top: 18px; left: 50%; transform: translateX(-50%); z-index: 400; display: flex; flex-direction: column; gap: 8px; align-items: center; }
.toast { display: flex; align-items: center; gap: 9px; padding: 10px 16px; background: var(--ink); color: #f0e9da; font-size: 12.5px; border-radius: 2px; box-shadow: 0 20px 40px -20px rgba(10, 18, 14, .7); animation: toastIn .25s ease both; border-left: 2px solid var(--copper-3); }
.toast.success { border-left-color: #7fae92; }
.toast.error { border-left-color: #d08a7d; }
@keyframes toastIn { from { opacity: 0; transform: translateY(-8px); } to { opacity: 1; transform: none; } }
.toast i { font-size: 12px; color: var(--copper-3); }
.toast.success i { color: #9ac7ac; }
.toast.error i { color: #e0a397; }

/* ---------------- 空态 / 骨架 ---------------- */
.empty { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; padding: 44px 20px; color: var(--muted-2); text-align: center; }
.empty i { font-size: 24px; color: #cfc4b0; }
.empty p { font-size: 12px; }
.empty span { font-size: 10.5px; color: #b3b0a4; }
.skeleton { background: linear-gradient(90deg, #f1ece1 25%, #f7f3ea 37%, #f1ece1 63%); background-size: 400% 100%; animation: shimmer 1.2s infinite; border-radius: 2px; }
@keyframes shimmer { 0% { background-position: 100% 0 } 100% { background-position: 0 0 } }
.loading-block { padding: 40px; display: flex; flex-direction: column; gap: 10px; }
.loading-block .skeleton { height: 14px; }
.loading-block .skeleton:nth-child(2n) { width: 82%; }

/* ---------------- 登录 / 注册 ---------------- */
.auth-body { min-height: 100vh; background: #0d1713; }
.auth-shell { display: grid; grid-template-columns: 1.12fr .88fr; min-height: 100vh; }
.auth-hero {
  position: relative; display: flex; flex-direction: column; padding: 34px 46px 26px; overflow: hidden;
  background:
    radial-gradient(780px 420px at 78% 16%, rgba(181, 122, 75, .2), transparent 60%),
    radial-gradient(520px 380px at 12% 92%, rgba(60, 103, 84, .24), transparent 65%),
    linear-gradient(165deg, #15241d 0%, #101c16 55%, #0b1511 100%);
  color: #e9e1d1;
}
.auth-hero::before {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background-image:
    linear-gradient(rgba(226, 185, 143, .05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(226, 185, 143, .04) 1px, transparent 1px);
  background-size: 68px 68px;
  mask-image: radial-gradient(900px 600px at 40% 30%, #000, transparent 82%);
}
.auth-hero > * { position: relative; z-index: 1; }
.hero-top { display: flex; align-items: center; justify-content: space-between; }
.hero-version { font-size: 9px; letter-spacing: .28em; color: #8d7f69; border: 1px solid rgba(226, 185, 143, .25); padding: 5px 9px; }
.hero-main { margin-top: auto; padding: 40px 0 10px; max-width: 560px; }
.hero-main .eyebrow { color: var(--copper-3); }
.hero-main h1 { font-family: var(--serif); font-size: 46px; line-height: 1.25; letter-spacing: .02em; margin: 18px 0 16px; color: #f6efe0; font-weight: 600; }
.hero-main h1 em { color: var(--copper-3); font-style: normal; position: relative; }
.hero-main h1 em::after { content: ""; position: absolute; left: 0; right: 0; bottom: 4px; height: 1px; background: linear-gradient(90deg, var(--copper), transparent); }
.hero-desc { color: #a9b0a4; font-size: 13px; line-height: 1.9; max-width: 470px; }
.hero-metrics { display: flex; gap: 40px; margin-top: 30px; padding-top: 20px; border-top: 1px solid rgba(226, 185, 143, .16); }
.hero-metrics div { display: flex; flex-direction: column; gap: 4px; }
.hero-metrics strong { font-family: var(--serif); font-size: 26px; color: #f0e6d4; letter-spacing: .02em; font-weight: 500; }
.hero-metrics span { font-size: 9.5px; letter-spacing: .14em; color: #848d80; }
.hero-art { position: absolute; right: -70px; bottom: 4%; width: 540px; opacity: .9; pointer-events: none; }
.hero-foot { display: flex; align-items: center; gap: 12px; margin-top: auto; padding-top: 34px; font-size: 10px; color: #6e7b6f; letter-spacing: .05em; }
.hf-sep { width: 18px; height: 1px; background: #4b5b50; }
.auth-panel { display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 40px 34px; background: var(--paper); background-image: radial-gradient(700px 400px at 100% 0%, rgba(181, 122, 75, .08), transparent 60%); }
.auth-card { width: 100%; max-width: 452px; background: var(--card); border: 1px solid var(--line); box-shadow: var(--shadow-2); padding: 34px 36px 30px; position: relative; }
.auth-card::before { content: ""; position: absolute; top: 0; left: 36px; width: 42px; height: 2px; background: var(--copper); }
.auth-card h2 { font-family: var(--serif); font-size: 25px; letter-spacing: .03em; margin: 10px 0 6px; color: var(--ink); }
.auth-sub { font-size: 11.5px; color: var(--muted); line-height: 1.6; margin-bottom: 22px; }
.auth-card form { display: flex; flex-direction: column; gap: 14px; }
.auth-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.auth-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin: 2px 0 4px; }
.auth-muted { font-size: 10px; color: var(--muted-2); }
.auth-alt { margin-top: 18px; padding-top: 16px; border-top: 1px solid var(--line-2); font-size: 11.5px; color: var(--muted); text-align: center; }
.auth-alt a { color: var(--copper); border-bottom: 1px solid rgba(181, 122, 75, .35); }
.auth-alt a:hover { color: var(--ink); }
.auth-hint { margin-top: 14px; display: flex; align-items: center; justify-content: center; gap: 6px; font-size: 9.5px; color: var(--muted-2); letter-spacing: .03em; }
.auth-hint i { color: var(--sage); }
.auth-copy { margin-top: 22px; font-size: 9.5px; color: var(--muted-2); letter-spacing: .04em; }
.forbidden { min-height: 100vh; display: flex; align-items: center; justify-content: center; background: var(--paper); background-image: radial-gradient(700px 400px at 50% 0%, rgba(181, 122, 75, .1), transparent 60%); padding: 30px; }
.forbidden-card { position: relative; max-width: 540px; background: var(--card); border: 1px solid var(--line); box-shadow: var(--shadow-2); padding: 42px 44px; text-align: center; }
.forbidden-code { font-family: var(--serif); font-size: 64px; color: rgba(181, 122, 75, .28); line-height: 1; letter-spacing: .08em; }
.forbidden-card h1 { font-family: var(--serif); font-size: 22px; margin: 10px 0 12px; }
.forbidden-card p { font-size: 12.5px; color: var(--muted); line-height: 1.8; }
.forbidden-actions { display: flex; gap: 10px; justify-content: center; margin-top: 24px; }

/* ---------------- 其他局部 ---------------- */
.split-panel { display: grid; grid-template-columns: 300px 1fr; gap: 16px; align-items: start; }
.side-list { border: 1px solid var(--line); background: var(--card); box-shadow: var(--shadow-1); }
.side-list-head { padding: 13px 15px; border-bottom: 1px solid var(--line-2); font-size: 11px; letter-spacing: .1em; color: var(--muted); }
.side-item { padding: 12px 15px; border-bottom: 1px solid var(--line-2); cursor: pointer; }
.side-item:last-child { border-bottom: 0; }
.side-item:hover { background: #faf6ec; }
.side-item.active { background: var(--card-2); border-left: 2px solid var(--copper); }
.side-item .si-title { font-size: 12px; font-weight: 600; line-height: 1.4; }
.side-item .si-sub { font-size: 10px; color: var(--muted-2); margin-top: 2px; }
.metric-inline { display: flex; gap: 22px; flex-wrap: wrap; }
.metric-inline div { display: flex; flex-direction: column; gap: 3px; }
.metric-inline b { font-family: var(--serif); font-size: 18px; color: var(--ink); font-weight: 600; }
.metric-inline span { font-size: 9.5px; letter-spacing: .1em; color: var(--muted-2); }
.warn-note { display: flex; gap: 9px; align-items: flex-start; padding: 11px 13px; background: var(--warn-soft); border-left: 2px solid var(--warn); font-size: 11.5px; line-height: 1.6; color: #7a5a20; }
.warn-note i { margin-top: 2px; }
.info-note { display: flex; gap: 9px; align-items: flex-start; padding: 11px 13px; background: var(--info-soft); border-left: 2px solid var(--info); font-size: 11.5px; line-height: 1.6; color: #3c5a70; }
.divider { height: 1px; background: var(--line-2); margin: 16px 0; }
.mono { font-family: ui-monospace, SFMono-Regular, Consolas, monospace; font-size: 11px; }
.muted { color: var(--muted); }
.muted-2 { color: var(--muted-2); }
.small { font-size: 11px; }
.right { text-align: right; }
.nowrap { white-space: nowrap; }
.flex { display: flex; align-items: center; gap: 8px; }
.flex-wrap { flex-wrap: wrap; }
.flex-1 { flex: 1; }
.mt-8 { margin-top: 8px; } .mt-12 { margin-top: 12px; } .mt-16 { margin-top: 16px; } .mt-20 { margin-top: 20px; }
.mb-12 { margin-bottom: 12px; } .mb-16 { margin-bottom: 16px; }
.w-100 { width: 100%; }
.only-mobile { display: none; }

/* 表单内明细编辑 */
.item-editor { border: 1px solid var(--line); background: var(--paper-2); }
.item-editor-head, .item-row { display: grid; grid-template-columns: 2.2fr 74px 74px 88px 96px 54px; gap: 8px; align-items: center; padding: 8px 10px; }
.item-editor-head { font-size: 9.5px; letter-spacing: .1em; color: var(--muted); border-bottom: 1px solid var(--line); background: var(--card-2); }
.item-row { border-bottom: 1px solid var(--line-2); }
.item-row:last-child { border-bottom: 0; }
.item-row .form-control { height: 30px; font-size: 11.5px; padding: 0 7px; }
.item-row .cell-amount { font-family: var(--serif); font-size: 12.5px; text-align: right; }
.item-row .remove-item { background: none; border: 0; color: var(--muted-2); }
.item-row .remove-item:hover { color: var(--danger); }
.item-total { display: flex; justify-content: flex-end; gap: 26px; padding: 11px 12px; font-size: 11.5px; color: var(--muted); border-top: 1px solid var(--line); background: var(--card); }
.item-total b { font-family: var(--serif); font-size: 16px; color: var(--ink); margin-left: 6px; }
.item-picker { position: relative; }
.steps { display: flex; align-items: center; gap: 0; margin-bottom: 20px; }
.step { display: flex; align-items: center; gap: 9px; }
.step .num { width: 26px; height: 26px; border: 1px solid var(--line-dark); border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; font-family: var(--serif); font-size: 12px; color: var(--muted); background: var(--card); }
.step .txt { font-size: 11.5px; color: var(--muted); }
.step.active .num { border-color: var(--ink); background: var(--ink); color: var(--copper-3); }
.step.active .txt { color: var(--ink); font-weight: 600; }
.step.done .num { border-color: var(--sage); background: var(--sage); color: #fff; }
.step-line { width: 46px; height: 1px; background: var(--line); margin: 0 12px; }
.summary-panel { background: var(--ink); color: #e7dfcf; padding: 22px 22px 18px; position: sticky; top: 90px; }
.summary-panel h4 { font-family: var(--serif); font-size: 14px; letter-spacing: .06em; color: #f0e8d8; margin-bottom: 14px; }
.sum-row { display: flex; justify-content: space-between; padding: 7px 0; font-size: 11.5px; color: #a7b0a4; border-bottom: 1px solid rgba(226,185,143,.12); }
.sum-row b { font-family: var(--serif); font-size: 13px; color: #ece3d2; font-weight: 500; }
.sum-total { display: flex; justify-content: space-between; align-items: flex-end; padding: 14px 0 4px; }
.sum-total span { font-size: 10px; letter-spacing: .12em; color: #98a294; }
.sum-total b { font-family: var(--serif); font-size: 27px; color: var(--copper-3); font-weight: 500; }
.sum-margin { margin-top: 10px; padding-top: 10px; border-top: 1px solid rgba(226,185,143,.2); display: flex; justify-content: space-between; font-size: 11px; color: #a7b0a4; }
.sum-margin b { color: #dfeadf; font-family: var(--serif); font-size: 14px; }
.summary-panel .warn-note { background: rgba(181,126,40,.15); border-left-color: var(--copper-3); color: #e3c89e; margin-top: 12px; }
.pick-table { width: 100%; border-collapse: collapse; }
.pick-table th { font-size: 9.5px; letter-spacing: .1em; color: var(--muted); font-weight: 500; text-align: left; padding: 8px 10px; border-bottom: 1px solid var(--line); }
.pick-table td { padding: 8px 10px; border-bottom: 1px solid var(--line-2); font-size: 11.5px; }
.pick-table tr:hover { background: #faf6ec; }
.pick-table .form-control { height: 29px; font-size: 11.5px; }
.qty-input { width: 64px; text-align: center; }
.scroll-y { max-height: 420px; overflow-y: auto; }
.rule-card { border: 1px solid var(--line); background: var(--card); padding: 14px 16px; box-shadow: var(--shadow-1); display: flex; gap: 13px; }
.rule-card .rc-index { font-family: var(--serif); font-size: 13px; color: var(--copper); width: 26px; flex: none; }
.rule-card .rc-main { flex: 1; min-width: 0; }
.rule-name { font-family: var(--serif); font-size: 14.5px; color: var(--ink); }
.rule-desc { font-size: 11px; color: var(--muted); line-height: 1.55; margin-top: 4px; }
.rule-tags { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 8px; }
.rule-actions { display: flex; flex-direction: column; gap: 6px; align-items: flex-end; }
.node-editor { border: 1px solid var(--line); background: var(--paper-2); }
.node-editor-row { display: grid; grid-template-columns: 26px 1.4fr 1fr .8fr 62px 26px; gap: 7px; align-items: center; padding: 7px 9px; border-bottom: 1px solid var(--line-2); }
.node-editor-row:last-child { border-bottom: 0; }
.node-editor-row .form-control { height: 30px; font-size: 11.5px; }
.node-editor-row .idx { font-family: var(--serif); color: var(--copper); font-size: 12px; text-align: center; }
.flow-map { display: flex; align-items: center; gap: 5px; flex-wrap: wrap; margin-top: 10px; }
.flow-node { font-size: 10px; padding: 4px 8px; border: 1px solid var(--line); background: var(--paper-2); color: var(--muted); }
.flow-node.first { border-color: var(--copper); color: var(--copper); background: var(--copper-soft); }
.perm-matrix { width: 100%; border-collapse: collapse; font-size: 10.5px; }
.perm-matrix th, .perm-matrix td { border: 1px solid var(--line-2); padding: 6px 7px; text-align: center; }
.perm-matrix th { background: var(--paper-2); font-weight: 500; color: var(--muted); font-size: 9.5px; letter-spacing: .06em; }
.perm-matrix td:first-child { text-align: left; white-space: nowrap; }
.perm-matrix input { accent-color: var(--copper); }
.dept-tree-item { display: flex; align-items: center; gap: 8px; padding: 9px 12px; border-bottom: 1px solid var(--line-2); font-size: 12px; cursor: pointer; }
.dept-tree-item:hover { background: #faf6ec; }
.dept-tree-item.active { background: var(--card-2); color: var(--copper); border-left: 2px solid var(--copper); }
.dept-tree-item .cnt { margin-left: auto; font-size: 10px; color: var(--muted-2); }
.sens-card { border: 1px solid var(--line); background: var(--card); padding: 14px 16px; }
.sens-card .sc-name { font-size: 11px; color: var(--muted); letter-spacing: .04em; }
.sens-card .sc-margin { font-family: var(--serif); font-size: 26px; margin-top: 6px; color: var(--ink); }
.sens-card .sc-profit { font-size: 10.5px; color: var(--muted-2); margin-top: 4px; }
.sens-card.danger .sc-margin { color: var(--danger); }
.sens-card.warn .sc-margin { color: var(--warn); }
.diff-up { color: var(--danger); }
.diff-down { color: var(--success); }
.diff-same { color: var(--muted-2); }
.insight-card { display: flex; gap: 12px; padding: 13px 15px; border: 1px solid var(--line); background: var(--card); border-left: 2px solid var(--copper); }
.insight-card.warn { border-left-color: var(--warn); }
.insight-card.danger { border-left-color: var(--danger); }
.insight-card.success { border-left-color: var(--success); }
.insight-card i { color: var(--copper); margin-top: 2px; }
.insight-card.warn i { color: var(--warn); }
.insight-card.danger i { color: var(--danger); }
.insight-card.success i { color: var(--success); }
.insight-card b { display: block; font-size: 12px; margin-bottom: 3px; }
.insight-card p { font-size: 11px; color: var(--muted); line-height: 1.6; }
.thread { display: flex; flex-direction: column; gap: 12px; }
.thread-item { display: flex; gap: 10px; }
.thread-body { background: var(--paper-2); border: 1px solid var(--line-2); padding: 10px 13px; flex: 1; }
.thread-head { display: flex; justify-content: space-between; gap: 10px; font-size: 10.5px; color: var(--muted-2); margin-bottom: 4px; }
.thread-text { font-size: 12px; line-height: 1.65; color: var(--text); }
.detail-json { background: var(--ink); color: #cfe0d4; padding: 14px 16px; font-family: ui-monospace, Consolas, monospace; font-size: 11px; line-height: 1.7; white-space: pre-wrap; word-break: break-all; max-height: 300px; overflow: auto; }

/* ---------------- 响应式 ---------------- */
@media (max-width: 1360px) {
  .p-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .tpl-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .kpi-grid.five { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 1180px) {
  .c-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .q-list { grid-template-columns: 1fr; }
  .grid-2 { grid-template-columns: 1fr; }
  .kpi-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .split-panel { grid-template-columns: 1fr; }
}
@media (max-width: 1024px) {
  .auth-shell { grid-template-columns: 1fr; }
  .auth-hero { display: none; }
  .auth-panel { min-height: 100vh; }
}
@media (max-width: 900px) {
  .sidebar { transform: translateX(-100%); transition: transform .25s; }
  .sidebar.open { transform: none; }
  .sidebar-mask { display: none; position: fixed; inset: 0; background: rgba(10,18,14,.45); z-index: 45; }
  .sidebar-mask.show { display: block; }
  .shell-body { margin-left: 0; }
  .only-mobile { display: inline-flex; }
  .search-trigger span, .search-trigger kbd { display: none; }
  .search-trigger { min-width: 34px; width: 34px; padding: 0; justify-content: center; }
  .main { padding: 22px 18px 30px; }
  .topbar { padding: 0 16px; height: 60px; }
  .p-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .item-editor-head, .item-row { grid-template-columns: 1.6fr 58px 62px 70px 80px 30px; }
}
@media (max-width: 680px) {
  .kpi-grid, .kpi-grid.five, .p-grid, .c-grid, .tpl-grid, .grid-3, .split-2 { grid-template-columns: 1fr; }
  .page-title { font-size: 24px; }
  .form-grid, .form-grid.three, .auth-grid { grid-template-columns: 1fr; }
  .modal-mask { padding: 2vh 10px 20px; }
  .modal-body { padding: 16px; }
  .modal-head, .modal-foot { padding-left: 16px; padding-right: 16px; }
  .q-card { grid-template-columns: 1fr; }
  .q-side { border-left: 0; border-top: 1px dashed #d6cbb7; align-items: flex-start; }
  .q-side::before, .q-side::after { display: none; }
  .stamp { right: 14px; }
  .top-actions { gap: 4px; }
  .uc-text, .user-chip > i { display: none; }
  .main { padding: 18px 12px 26px; }
}
