:root {
  --green: #0f4c3a;
  --green-dark: #0a3328;
  --gold: #d9be8a;
  --gold-dark: #b8955a;
  --bg: #faf8f3;
  --paper: #ffffff;
  --text: #1c2b26;
  --muted: #5c6b66;
  --line: #e6e1d6;
  --red: #b3261e;
  --amber-bg: #fbf3e2;
  --radius: 12px;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--text);
  font: 16px/1.6 "PingFang SC", "Microsoft YaHei", "Noto Sans SC", system-ui, -apple-system, "Segoe UI", sans-serif;
}
a { color: var(--green); }
a:hover { color: var(--green-dark); }
h1 { font-size: 28px; line-height: 1.3; margin: 0 0 12px; color: var(--green); }
h2 { font-size: 20px; margin: 24px 0 12px; }
h3 { font-size: 17px; margin: 0 0 6px; }
.wrap { max-width: 1200px; margin: 0 auto; padding: 0 20px; }
.narrow { max-width: 560px; margin: 40px auto; padding: 0 20px; }
main { min-height: 60vh; padding-bottom: 48px; }
.row { display: flex; flex-wrap: wrap; align-items: center; gap: 16px; }
.row.gap { gap: 10px; }
.row.between { justify-content: space-between; }
.spacer { flex: 1; }
.muted { color: var(--muted); }
.small { font-size: 14px; }
.pre { white-space: pre-wrap; word-break: break-word; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.neg { color: var(--red); }
.up { color: #2e7d4f; }
.down { color: var(--red); }

/* 按钮 */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  background: var(--green); color: #fff; border: 1px solid var(--green); border-radius: 10px;
  padding: 10px 18px; font: inherit; font-weight: 600; text-decoration: none; cursor: pointer;
}
.btn:hover { background: var(--green-dark); color: #fff; }
.btn:disabled { opacity: .55; cursor: default; }
.btn.big { padding: 14px 28px; font-size: 17px; }
.btn.small { padding: 6px 12px; font-size: 14px; }
.btn.ghost { background: transparent; color: var(--green); }
.btn.ghost:hover { background: #eef3f0; }
.btn.gold { background: var(--gold); border-color: var(--gold); color: var(--green-dark); }
.btn.ghost-light { background: transparent; border-color: rgba(255,255,255,.5); color: #fff; }
.link { background: none; border: 0; padding: 0; font: inherit; color: var(--green); cursor: pointer; text-decoration: underline; }
.link.danger { color: var(--red); }
.link-light { background: none; border: 0; color: #fff; font: inherit; cursor: pointer; text-decoration: none; }
form { margin: 0; }
.file-btn { position: relative; }

/* 页头页脚 */
.site-header { background: var(--paper); border-bottom: 1px solid var(--line); }
.site-header .row { padding: 14px 20px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--green); font-weight: 700; font-size: 19px; }
.brand.light { color: #fff; }
.site-nav { display: flex; gap: 20px; flex: 1; justify-content: center; }
.site-nav a { text-decoration: none; color: var(--text); }
.app-header { background: var(--green); color: #fff; }
.app-header .row { padding: 10px 20px; gap: 14px; }
.app-nav { display: flex; flex-wrap: wrap; gap: 4px; flex: 1; }
.app-nav a { color: #fff; text-decoration: none; padding: 6px 12px; border-radius: 8px; }
.app-nav a[aria-current="page"] { background: var(--gold); color: var(--green-dark); font-weight: 700; }
.muted-light { color: #c5d4ce; font-size: 14px; }
.banner { background: var(--amber-bg); border-bottom: 1px solid #ead9b5; padding: 10px 20px; text-align: center; }
.site-footer { border-top: 1px solid var(--line); padding: 24px 0; font-size: 14px; color: var(--muted); }

/* 首页 */
.hero { background: var(--green); color: #fff; padding: 64px 0; }
.hero-grid { display: grid; grid-template-columns: 1.1fr 1fr; gap: 48px; align-items: center; }
.hero h1 { color: #fff; font-size: 40px; }
.eyebrow { letter-spacing: 3px; font-size: 13px; color: var(--gold); font-weight: 700; }
.eyebrow.dark { color: var(--gold-dark); }
.lead { font-size: 18px; color: #e8efec; }
.slogan { color: var(--gold); font-weight: 600; }
.ticks { list-style: none; padding: 0; display: flex; flex-wrap: wrap; gap: 8px 20px; color: #c5d4ce; font-size: 14px; }
.ticks li::before { content: "✓ "; color: var(--gold); }
.demo { background: var(--paper); color: var(--text); border-radius: 18px; padding: 20px; display: flex; flex-direction: column; gap: 12px; box-shadow: 0 20px 50px rgba(0,0,0,.25); }
.demo-head, .chat-head { display: flex; align-items: center; gap: 10px; }
.demo-head small, .chat-head small { display: block; color: var(--muted); font-size: 13px; }
.avatar { width: 36px; height: 36px; border-radius: 50%; background: var(--green); color: var(--gold); display: inline-flex; align-items: center; justify-content: center; font-weight: 700; flex: none; }
.section { padding: 64px 0; }
.section.alt { background: var(--paper); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.cards { display: grid; gap: 20px; margin: 20px 0; }
.cards.three { grid-template-columns: repeat(3, 1fr); }
.cards.two { grid-template-columns: repeat(2, 1fr); }
.cards > *, .kpis > * { min-width: 0; }
.card { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; overflow-x: auto; }
.card h2:first-child { margin-top: 0; }
.card.warn { background: var(--amber-bg); border-color: #ead9b5; }
.step-num { display: block; color: var(--gold-dark); font-weight: 700; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { border: 1px solid var(--line); background: var(--paper); border-radius: 999px; padding: 4px 12px; font-size: 14px; }
.plan .price, .plan-option .price { font-size: 30px; font-weight: 700; color: var(--green); margin: 6px 0; display: block; }
.plan.featured { border: 2px solid var(--green); }
.founder { background: var(--amber-bg); border: 1px solid #ead9b5; border-radius: 10px; padding: 10px 14px; }

/* 表单 */
.form { display: flex; flex-direction: column; gap: 14px; }
.form label { display: flex; flex-direction: column; gap: 6px; font-weight: 600; }
.form label.check { flex-direction: row; align-items: flex-start; gap: 8px; font-weight: 400; }
.form input:not([type=radio]):not([type=checkbox]), .form select, textarea {
  font: inherit; padding: 10px 12px; border: 1px solid #cfc8b8; border-radius: 10px; background: #fff; width: 100%;
}
fieldset { border: 1px solid var(--line); border-radius: 10px; padding: 10px 14px; margin: 0; display: flex; flex-wrap: wrap; gap: 6px 20px; }
legend { font-weight: 600; padding: 0 4px; }
.alert { background: #fdecea; border: 1px solid #f3c4bf; color: #7a1c15; border-radius: 10px; padding: 10px 14px; margin: 8px 0; }
.alert p, .warn p { margin: 4px 0; }
.warn { background: var(--amber-bg); border: 1px solid #ead9b5; border-radius: 10px; padding: 10px 14px; margin: 8px 0; }
.ok { color: #2e7d4f; font-weight: 600; }
.notice { background: #eef5f1; border: 1px solid #cfe2d8; border-radius: 10px; padding: 12px 14px; margin: 12px 0; }
.steps { list-style: none; padding: 0; display: flex; flex-wrap: wrap; gap: 8px 20px; color: var(--muted); font-size: 14px; margin: 0 0 20px; }
.steps li { counter-increment: s; }
.steps li::before { content: counter(s) ". "; }
.steps li.done { color: var(--green); }
.steps li[aria-current] { color: var(--green); font-weight: 700; }

/* 付款页 */
.pricing { margin-top: 32px; }
.form.wide { max-width: 980px; }
.plans { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 16px; }
.plan-option { position: relative; background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px 18px 16px; cursor: pointer; font-weight: 400 !important; }
.plan-option input { position: absolute; top: 14px; right: 14px; }
.plan-option:has(input:checked) { border: 2px solid var(--green); box-shadow: 0 6px 18px rgba(15,76,58,.12); }
.plan-option b { font-size: 18px; }
.founder-card { background: #fffaf0; }
.tag { position: absolute; top: -12px; left: 16px; background: var(--green); color: #fff; font-size: 12px; font-weight: 700; border-radius: 999px; padding: 2px 10px; }
.tag.gold { background: var(--gold); color: var(--green-dark); }

/* 表格 */
.table { width: 100%; border-collapse: collapse; background: var(--paper); font-size: 15px; }
.table th, .table td { padding: 8px 10px; border-bottom: 1px solid #eee9df; text-align: left; vertical-align: top; }
.table thead th { color: var(--muted); font-weight: 600; font-size: 14px; }
.table td.num, .table th.num { text-align: right; }
.table tr.strong th, .table tr.strong td { font-weight: 700; }
.warn-row { background: var(--amber-bg); }
.ledger td:nth-child(3) { min-width: 260px; }

/* 记账对话 */
.chat-layout { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 20px; margin-top: 20px; align-items: start; }
.chat { background: var(--paper); border: 1px solid var(--line); border-radius: 16px; display: flex; flex-direction: column; min-height: 70vh; }
.chat-head { padding: 14px 18px; border-bottom: 1px solid #eee9df; }
.chat .notice { margin: 12px 18px 0; }
.messages { flex: 1; overflow-y: auto; padding: 18px; display: flex; flex-direction: column; gap: 12px; max-height: 65vh; }
.msg { display: flex; }
.msg.me { justify-content: flex-end; }
.bubble { max-width: 85%; border-radius: 14px; padding: 10px 14px; display: flex; flex-direction: column; gap: 6px; }
.bubble p { margin: 0; }
.bubble.me { background: var(--green); color: #fff; border-bottom-right-radius: 4px; }
.bubble.ai { background: #f3f0e8; border-bottom-left-radius: 4px; }
.bubble.error { background: #fdecea; color: #7a1c15; }
.demo .bubble { max-width: 100%; }
.proposal { background: #fff; border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; display: flex; flex-direction: column; gap: 8px; }
.proposal .actions { margin: 0; padding-left: 20px; }
.composer { border-top: 1px solid #eee9df; padding: 12px 18px; display: flex; flex-direction: column; gap: 10px; }
.composer textarea { resize: vertical; min-height: 56px; }
.attachments { display: flex; flex-wrap: wrap; gap: 6px; }
.attachments:empty { display: none; }
.side .today { background: var(--paper); border: 1px solid var(--line); border-radius: 16px; padding: 16px 18px; }
.side h2 { margin-top: 0; font-size: 17px; }
.warn-list { padding-left: 18px; font-size: 14px; color: #7a5a18; }

/* 报表 */
.tabs { display: flex; flex-wrap: wrap; gap: 4px; background: #efebe2; border-radius: 10px; padding: 4px; }
.tabs a { padding: 6px 14px; border-radius: 8px; text-decoration: none; color: var(--text); }
.tabs a[aria-current="page"] { background: var(--paper); color: var(--green); font-weight: 700; box-shadow: 0 1px 3px rgba(0,0,0,.08); }
.report h1 { margin-top: 20px; font-size: 24px; }
.kpis { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin: 16px 0 8px; }
.kpis > div { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px; }
.kpis dt { color: var(--muted); font-size: 14px; }
.kpis dd { margin: 4px 0 0; font-size: 24px; font-weight: 700; font-variant-numeric: tabular-nums; }
.small-kpis { grid-template-columns: 1fr 1fr; }
.small-kpis > div { padding: 10px 12px; }
.small-kpis dd { font-size: 18px; }
.deadlines { padding-left: 18px; }
.summary { background: #f6f4ee; border-radius: 10px; padding: 12px; white-space: pre-wrap; font-size: 14px; }
.legal h2 { font-size: 18px; }

@media (max-width: 900px) {
  .hero-grid, .cards.three, .cards.two, .chat-layout { grid-template-columns: 1fr; }
  .kpis { grid-template-columns: 1fr 1fr; }
  .kpis dd { font-size: 18px; }
  .report h1 { font-size: 20px; }
  .card { padding: 14px; }
  .hero h1 { font-size: 30px; }
  .site-nav { display: none; }
  .company { display: none; }
  .app-header .row { gap: 8px 12px; }
  .app-header form { margin-left: auto; }
  .app-nav { order: 3; width: 100%; flex: none; flex-wrap: nowrap; overflow-x: auto; -webkit-overflow-scrolling: touch; }
  .app-nav a { white-space: nowrap; }
  .messages { max-height: none; }
  .chat { min-height: 0; }
  .table { font-size: 14px; }
  .ledger, .report .table { display: block; overflow-x: auto; }
  .report .table th { white-space: nowrap; }
}

@media print {
  .app-header, .site-footer, .banner, .no-print { display: none !important; }
  body { background: #fff; }
  .card, .kpis > div { break-inside: avoid; }
}

/* 蜜罐字段：真人看不见 */
.hp { position: absolute !important; left: -10000px; width: 1px; height: 1px; overflow: hidden; }

/* 语言切换 */
.lang-switch { display: inline-flex; gap: 8px; font-size: 14px; }
.lang-switch a { text-decoration: none; color: var(--muted); }
.lang-switch a[aria-current] { color: var(--green); font-weight: 700; }

/* 用量 */
.usage { display: flex; flex-direction: column; gap: 6px; font-size: 14px; color: var(--muted); }
.usage .bar { display: block; height: 8px; background: #eee9df; border-radius: 99px; overflow: hidden; }
.usage .bar span { display: block; height: 100%; background: var(--green); }
.usage .bar span.hot { background: var(--red); }
.side .today + .today { margin-top: 12px; }

/* 危险操作 */
.btn.danger { background: var(--red); border-color: var(--red); }
.btn.danger:hover { background: #8e1d17; }
.danger-zone { border: 1px solid #f3c4bf; border-radius: 12px; padding: 14px; background: #fffafa; }

/* 知识库 */
.kb-nav { display: flex; flex-wrap: wrap; gap: 6px; margin: 12px 0 20px; }
.kb-nav a { text-decoration: none; padding: 6px 12px; border-radius: 999px; border: 1px solid var(--line); background: var(--paper); color: var(--text); font-size: 14px; }
.kb-nav a[aria-current] { background: var(--green); color: #fff; border-color: var(--green); }
.link-card { text-decoration: none; color: var(--text); display: block; }
.link-card:hover { border-color: var(--green); }
.kb article ul { padding-left: 20px; }
.kb article li { margin: 4px 0; }
.lead-dark { font-size: 17px; color: var(--green); font-weight: 600; }
a.chip { text-decoration: none; color: var(--text); }
main > section.wrap:first-child { padding-top: 24px; }


/* ---------- 库存与成本导入工作台：视觉升级 ---------- */
.import-workspace { padding-top: 22px; }
.import-hero {
  position: relative; display: grid; grid-template-columns: minmax(0,1fr) 300px; gap: 32px;
  overflow: hidden; border-radius: 22px; padding: 34px 40px; margin: 10px 0 22px;
  color: #fff; background: linear-gradient(118deg, #0a3328 0%, #124b3b 62%, #1d6650 100%);
  box-shadow: 0 18px 42px rgba(10,51,40,.16);
}
.import-hero-copy { position: relative; z-index: 1; max-width: 740px; }
.import-eyebrow { display: inline-block; color: #dbc38f; font-size: 11px; letter-spacing: 2.5px; font-weight: 800; }
.import-eyebrow.dark { color: var(--gold-dark); }
.import-hero h1 { color: #fff; font-size: clamp(28px,4vw,40px); margin: 12px 0 10px; }
.import-hero p { color: #d3e2db; max-width: 680px; margin: 0; font-size: 16px; }
.import-hero-stats { display: flex; flex-wrap: wrap; gap: 34px; margin-top: 28px; }
.import-hero-stats div { display: flex; flex-direction: column; gap: 2px; }
.import-hero-stats strong { color: #fff; font-size: 25px; line-height: 1.2; font-variant-numeric: tabular-nums; }
.import-hero-stats span { color: #c0d5ca; font-size: 12px; }
.import-hero-art { position: relative; min-height: 185px; display: flex; align-items: center; justify-content: center; }
.import-art-orbit { position: absolute; width: 230px; height: 230px; border: 1px solid rgba(219,195,143,.3); border-radius: 50%; box-shadow: 0 0 0 24px rgba(255,255,255,.025), 0 0 0 48px rgba(255,255,255,.02); }
.import-art-sheet { position: relative; z-index: 1; width: 150px; height: 172px; padding: 18px 16px; border-radius: 13px; background: #f8f5eb; color: #12382d; transform: rotate(-7deg); box-shadow: 0 22px 36px rgba(0,0,0,.25); }
.import-art-sheet span { display: block; font-size: 9px; letter-spacing: 1.5px; font-weight: 800; margin-bottom: 14px; }
.import-art-sheet i { display: block; width: 100%; height: 6px; margin: 10px 0; border-radius: 10px; background: #d8e3dc; }
.import-art-sheet i:nth-of-type(2) { width: 74%; }
.import-art-sheet i:nth-of-type(3) { width: 88%; }
.import-art-sheet b { position: absolute; right: 15px; bottom: 12px; font-size: 30px; color: #b8955a; }
.import-art-tag { position: absolute; z-index: 2; right: 4px; bottom: 8px; border: 1px solid rgba(255,255,255,.35); background: #d9be8a; color: #12382d; padding: 9px 12px; border-radius: 9px; font-size: 10px; line-height: 1.2; letter-spacing: 1px; font-weight: 900; transform: rotate(7deg); }
.import-instruction { display: flex; gap: 14px; align-items: flex-start; margin: 18px 0 24px; padding: 16px 18px; border: 1px solid #e8dfca; border-radius: 14px; background: #fbf7ed; }
.import-instruction-icon { flex: none; width: 28px; height: 28px; display: grid; place-items: center; border-radius: 50%; background: #e9ddc1; color: #765b2f; font-weight: 800; }
.import-instruction strong { display: block; margin-bottom: 2px; color: #4d422c; }
.import-instruction p { margin: 0; color: #716957; font-size: 14px; }
.import-stepper { display: flex; align-items: center; gap: 12px; margin: 22px 0 30px; padding: 14px 18px; border: 1px solid var(--line); border-radius: 14px; background: #fff; }
.import-step { display: flex; align-items: center; gap: 10px; min-width: 0; }
.import-step > span { flex: none; display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; background: #edf3ef; color: var(--green); font-size: 12px; font-weight: 800; }
.import-step.active > span { color: #18372c; background: var(--gold); }
.import-step b, .import-step small { display: block; }
.import-step b { font-size: 13px; }
.import-step small { color: var(--muted); font-size: 11px; }
.import-step-line { flex: 1; height: 1px; min-width: 14px; background: var(--line); }
.import-section-heading { display: flex; justify-content: space-between; align-items: end; gap: 18px; margin: 12px 0 16px; }
.import-section-heading h2 { margin: 5px 0 2px; font-size: 23px; }
.import-section-heading p { margin: 0; color: var(--muted); font-size: 14px; }
.import-total-pill { flex: none; padding: 7px 12px; border-radius: 999px; background: #edf3ef; color: var(--green); font-size: 12px; font-weight: 700; }
.template-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 18px; margin: 16px 0 24px; }
.template-card { --accent: #527d68; --accent-bg: #edf4ef; min-width: 0; padding: 20px; border: 1px solid var(--line); border-radius: 17px; background: #fff; box-shadow: 0 5px 18px rgba(29,43,38,.035); transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease; }
.template-card:hover { transform: translateY(-2px); border-color: #c9d8cd; box-shadow: 0 12px 28px rgba(29,43,38,.08); }
.template-stock { --accent: #21684e; --accent-bg: #eaf3ed; }
.template-product { --accent: #6b6390; --accent-bg: #f0eef7; }
.template-cost { --accent: #aa7a3d; --accent-bg: #f8f1e5; }
.template-people { --accent: #577b92; --accent-bg: #edf3f7; }
.template-card-head { display: flex; justify-content: space-between; align-items: flex-start; }
.template-icon { display: grid; place-items: center; width: 46px; height: 46px; border-radius: 13px; background: var(--accent-bg); color: var(--accent); font-size: 23px; font-weight: 800; }
.template-step { color: #a9aaa4; font-size: 10px; font-weight: 800; letter-spacing: 1.5px; }
.template-card-meta { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: 15px; }
.template-card-meta > span:first-child { color: var(--accent); font-size: 11px; letter-spacing: .8px; font-weight: 800; }
.template-count { color: var(--muted); background: #f5f4f0; border-radius: 99px; padding: 3px 9px; font-size: 11px; white-space: nowrap; }
.template-card h3 { margin: 6px 0; font-size: 20px; color: #20332b; }
.template-hint { min-height: 42px; color: var(--muted); font-size: 13px; margin: 0 0 12px; }
.template-field-chips { display: flex; flex-wrap: wrap; gap: 5px; min-height: 28px; }
.template-field-chips span { display: inline-flex; padding: 3px 8px; border-radius: 6px; background: var(--accent-bg); color: var(--accent); font-size: 10px; font-weight: 700; }
.template-preview { margin: 15px 0 10px; overflow: hidden; border: 1px solid #eceae3; border-radius: 10px; background: #fafaf8; }
.template-preview-head { display: flex; justify-content: space-between; padding: 8px 10px; border-bottom: 1px solid #eceae3; color: var(--muted); font-size: 10px; font-weight: 700; }
.template-preview-scroll { overflow-x: auto; }
.template-preview table { border-collapse: collapse; min-width: 100%; white-space: nowrap; font-size: 11px; }
.template-preview th { padding: 7px 9px; background: #f0f2ed; color: #5b6d62; text-align: left; font-weight: 700; }
.template-preview td { padding: 8px 9px; color: #273a30; border-top: 1px solid #e9e9e2; }
.template-field-note { min-height: 38px; margin: 9px 0 12px; color: #68766e; font-size: 12px; }
.template-downloads { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; padding: 12px 0; border-top: 1px solid #eeeae1; }
.template-xlsx { background: var(--accent); border-color: var(--accent); }
.template-xlsx:hover { filter: brightness(.92); }
.template-csv-link { font-size: 12px; color: var(--muted); text-decoration: none; }
.template-csv-link:hover { color: var(--green); text-decoration: underline; }
.template-upload { display: grid; grid-template-columns: 1fr auto; gap: 9px; align-items: end; padding-top: 11px; border-top: 1px solid #eeeae1; }
.template-date { grid-column: 1 / -1; display: flex; flex-direction: column; gap: 4px; color: var(--muted); font-size: 11px; }
.template-date input { width: 100%; padding: 7px 9px; border: 1px solid #dcd8ce; border-radius: 8px; font: inherit; }
.template-file-label { display: flex; min-width: 0; align-items: center; justify-content: center; min-height: 39px; padding: 7px 10px; border: 1px dashed #c6cec8; border-radius: 9px; background: #f9faf8; color: var(--accent); font-size: 12px; font-weight: 700; cursor: pointer; }
.template-file-label input { max-width: 100%; min-width: 0; font-size: 11px; }
.template-submit { min-height: 39px; background: #203d31; white-space: nowrap; font-size: 12px; padding: 7px 12px; }
.template-submit span { font-size: 16px; }
.template-upload .import-result { grid-column: 1 / -1; }
.import-bottom-note { display: flex; gap: 13px; align-items: flex-start; margin: 24px 0 12px; padding: 18px 20px; border-radius: 14px; background: #f0f4ef; border: 1px solid #dce7dc; }
.import-bottom-mark { display: grid; place-items: center; flex: none; width: 29px; height: 29px; border-radius: 50%; background: #d9e8d9; color: #286447; font-weight: 900; }
.import-bottom-note strong { color: #254734; }
.import-bottom-note p { margin: 3px 0 0; color: #64746a; font-size: 13px; }

/* ---------- 知识中心：分类、搜索、专题阅读 ---------- */
.kb { padding-top: 24px; }
.kb-hero { display: grid; grid-template-columns: minmax(0,1fr) 300px; gap: 28px; overflow: hidden; padding: 32px 36px; border-radius: 22px; color: #fff; background: linear-gradient(115deg,#0a3328,#14513e 72%,#246a50); box-shadow: 0 18px 40px rgba(10,51,40,.12); }
.kb-hero-copy { min-width: 0; }
.kb-eyebrow { display: inline-block; color: #d9be8a; font-size: 10px; font-weight: 800; letter-spacing: 2px; }
.kb-eyebrow.dark { color: var(--gold-dark); }
.kb-hero h1 { color: #fff; margin: 8px 0; font-size: 36px; }
.kb-hero-copy > p { max-width: 660px; color: #d5e3dc; margin: 0 0 20px; }
.kb-search { display: flex; align-items: center; gap: 8px; max-width: 630px; padding: 6px; border-radius: 11px; background: #fff; box-shadow: 0 7px 20px rgba(0,0,0,.12); }
.kb-search-symbol { padding: 0 5px 0 9px; color: #6b7a71; font-size: 24px; line-height: 1; }
.kb-search input { flex: 1; min-width: 0; padding: 8px 4px; border: 0; outline: 0; background: transparent; color: var(--text); font: inherit; font-size: 14px; }
.kb-search button { flex: none; padding: 9px 18px; border: 0; border-radius: 8px; background: var(--gold); color: #1a382b; font: inherit; font-size: 13px; font-weight: 800; cursor: pointer; }
.kb-hero-foot { display: flex; gap: 10px; margin-top: 14px; color: #c6d8cd; font-size: 11px; }
.kb-hero-side { position: relative; align-self: stretch; padding: 20px 21px; border: 1px solid rgba(255,255,255,.18); border-radius: 16px; background: rgba(255,255,255,.08); backdrop-filter: blur(4px); }
.kb-feature-label { color: #e6d5ae; font-size: 10px; letter-spacing: 1.5px; font-weight: 800; }
.kb-feature-icon { display: grid; place-items: center; width: 42px; height: 42px; margin: 15px 0 9px; border-radius: 12px; background: var(--gold); color: #17372a; font-size: 23px; }
.kb-hero-side h2 { margin: 4px 0; color: #fff; font-size: 19px; }
.kb-hero-side p { color: #d4e1da; font-size: 12px; margin: 6px 0 14px; }
.kb-hero-side a { color: #f0dba9; font-size: 12px; font-weight: 800; text-decoration: none; }
.kb-section-heading { display: flex; justify-content: space-between; align-items: end; gap: 16px; margin: 30px 0 13px; }
.kb-section-heading h2 { margin: 3px 0 0; font-size: 22px; }
.kb-groups { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 12px; }
.kb-group-tile { position: relative; display: flex; flex-direction: column; min-height: 150px; overflow: hidden; padding: 17px; border: 1px solid var(--line); border-radius: 15px; background: #fff; color: var(--text); text-decoration: none; transition: transform .16s ease, box-shadow .16s ease; }
.kb-group-tile:hover { transform: translateY(-2px); box-shadow: 0 12px 24px rgba(29,43,38,.08); color: var(--text); }
.kb-group-icon { display: grid; place-items: center; width: 35px; height: 35px; margin-bottom: 11px; border-radius: 10px; background: #edf3ef; color: var(--green); font-size: 17px; font-weight: 800; }
.kb-group-count { position: absolute; top: 17px; right: 14px; color: #a0a69e; font-size: 10px; }
.kb-group-tile strong { font-size: 15px; }
.kb-group-tile small { margin-top: 3px; color: var(--muted); font-size: 11px; line-height: 1.45; }
.kb-group-arrow { position: absolute; right: 15px; bottom: 12px; color: #9aa99f; }
.kb-group-finance .kb-group-icon { background: #eef1fa; color: #596e9b; }
.kb-group-inventory .kb-group-icon { background: #f7f0e4; color: #9b733a; }
.kb-group-operations .kb-group-icon { background: #f1eff7; color: #726590; }
.kb-results-heading { margin-top: 34px; }
.kb-nav { display: flex; flex-wrap: wrap; gap: 7px; margin: 10px 0 16px; }
.kb-nav a { text-decoration: none; padding: 7px 13px; border-radius: 999px; border: 1px solid var(--line); background: #fff; color: var(--text); font-size: 12px; }
.kb-nav a[aria-current] { background: var(--green); color: #fff; border-color: var(--green); }
.kb-card-grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 14px; margin: 16px 0 28px; }
.kb-card { position: relative; display: flex; flex-direction: column; min-width: 0; min-height: 220px; padding: 17px 18px 15px; border: 1px solid var(--line); border-radius: 15px; background: #fff; color: var(--text); text-decoration: none; transition: transform .16s ease, box-shadow .16s ease, border-color .16s ease; }
.kb-card:hover { transform: translateY(-2px); border-color: #c7d8cc; box-shadow: 0 12px 26px rgba(29,43,38,.075); color: var(--text); }
.kb-card-top { display: flex; justify-content: space-between; align-items: center; }
.kb-icon { display: grid; place-items: center; min-width: 36px; height: 36px; padding: 0 7px; border-radius: 10px; background: #edf3ef; color: #226347; font-size: 14px; font-weight: 900; }
.kb-card-index { color: #b3b6ae; font-size: 10px; letter-spacing: 1px; font-weight: 800; }
.kb-card-category { margin-top: 14px; color: #a0824c; font-size: 10px; font-weight: 800; letter-spacing: .8px; }
.kb-card h3 { margin: 5px 0 6px; font-size: 17px; color: #20362b; }
.kb-card p { margin: 0 0 14px; color: var(--muted); font-size: 12px; line-height: 1.65; }
.kb-card-link { display: flex; justify-content: space-between; align-items: center; margin-top: auto; padding-top: 10px; border-top: 1px solid #efeee8; color: var(--green); font-size: 11px; font-weight: 800; }
.kb-card-finance .kb-icon { background: #eef1fa; color: #596e9b; }
.kb-card-inventory .kb-icon { background: #f7f0e4; color: #9b733a; }
.kb-card-operations .kb-icon { background: #f1eff7; color: #726590; }
.kb-empty { margin: 16px 0 28px; padding: 38px 20px; border: 1px dashed #cfd8d0; border-radius: 15px; background: #fff; text-align: center; }
.kb-empty > span { color: #91a397; font-size: 32px; }
.kb-empty h3 { margin: 4px 0; }
.kb-empty p { color: var(--muted); font-size: 13px; }
.kb-industry-panel { display: grid; grid-template-columns: .8fr 1.2fr; gap: 28px; align-items: center; margin: 30px 0 18px; padding: 23px 25px; border-radius: 17px; background: #f0f3ee; }
.kb-industry-panel h2 { margin: 4px 0; font-size: 19px; }
.kb-industry-panel p { margin: 3px 0 0; color: var(--muted); font-size: 12px; }
.kb-industry-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.kb-industry-chip { display: inline-flex; align-items: center; gap: 10px; padding: 8px 12px; border: 1px solid #dce4db; border-radius: 9px; background: #fff; color: #315844; font-size: 12px; font-weight: 700; text-decoration: none; }
.kb-industry-chip span { color: #ad8e58; }
.kb-source-note { display: flex; gap: 10px; margin: 18px 0 10px; padding: 13px 15px; border-radius: 11px; background: #f7f4ec; color: #756c59; }
.kb-source-note p { margin: 0; font-size: 11px; line-height: 1.6; }
.kb-source-mark { display: grid; place-items: center; flex: none; width: 20px; height: 20px; border-radius: 50%; background: #e8ddc2; color: #765b2f; font-size: 11px; font-weight: 900; }
.kb-detail { max-width: 980px; }
.kb-detail-hero { position: relative; overflow: hidden; margin: 10px 0 18px; padding: 26px 32px 30px; border-radius: 20px; color: #fff; background: linear-gradient(112deg,#0b362a,#185640 72%,#2a7656); }
.kb-detail-hero::after { content: ""; position: absolute; right: -55px; top: -100px; width: 280px; height: 280px; border: 1px solid rgba(255,255,255,.12); border-radius: 50%; box-shadow: 0 0 0 28px rgba(255,255,255,.025),0 0 0 56px rgba(255,255,255,.02); }
.kb-detail-tax { background: linear-gradient(112deg,#263a4e,#345d70); }
.kb-detail-finance { background: linear-gradient(112deg,#263d4b,#526b82); }
.kb-detail-inventory { background: linear-gradient(112deg,#4b3b27,#98764b); }
.kb-detail-operations { background: linear-gradient(112deg,#352e4d,#625b7e); }
.kb-back { position: relative; z-index: 1; display: inline-block; margin-bottom: 19px; color: #e5d6b1; font-size: 12px; text-decoration: none; }
.kb-detail-meta { position: relative; z-index: 1; display: flex; gap: 8px; color: #d7e4dc; font-size: 11px; }
.kb-detail-hero h1 { position: relative; z-index: 1; margin: 7px 0; color: #fff; font-size: 32px; }
.kb-detail-hero > p { position: relative; z-index: 1; max-width: 710px; margin: 0; color: #e2e9e5; font-size: 15px; }
.kb-keywords { position: relative; z-index: 1; display: flex; flex-wrap: wrap; gap: 7px; margin-top: 17px; }
.kb-keywords span { display: inline-block; padding: 5px 10px; border-radius: 999px; border: 1px solid rgba(255,255,255,.22); background: rgba(255,255,255,.1); color: #fff; font-size: 10px; }
.kb-article { padding: 6px 0; }
.kb-article-section { display: grid; grid-template-columns: 48px minmax(0,1fr); gap: 15px; padding: 22px 23px; margin: 12px 0; border: 1px solid var(--line); border-radius: 14px; background: #fff; }
.kb-section-number { display: grid; place-items: center; width: 38px; height: 38px; border-radius: 11px; background: #edf3ef; color: var(--green); font-size: 12px; font-weight: 900; }
.kb-section-content h2 { margin: 3px 0 10px; font-size: 18px; }
.kb-section-content ul { margin: 0; padding: 0; list-style: none; }
.kb-section-content li { position: relative; margin: 7px 0; padding-left: 17px; color: #52645b; font-size: 13px; line-height: 1.75; }
.kb-section-content li::before { content: ""; position: absolute; left: 0; top: .72em; width: 6px; height: 6px; border-radius: 50%; background: #c3a36b; }
.kb-reminder { margin: 17px 0; padding: 18px 20px; border-left: 3px solid var(--gold-dark); border-radius: 0 12px 12px 0; background: #f7f3e9; }
.kb-reminder strong { color: #6e5631; }
.kb-reminder p { margin: 5px 0 0; color: #716856; font-size: 12px; }
.kb-related { margin: 30px 0 8px; }
.kb-related .kb-section-heading { align-items: center; }
.kb-related .kb-section-heading > a { font-size: 12px; text-decoration: none; }
.kb-card-grid.compact .kb-card { min-height: 185px; }
.kb-related-inline { padding-top: 18px; }
.kb-related-inline h2 { margin-top: 0; }

@media (max-width: 900px) {
  .import-hero, .kb-hero { grid-template-columns: 1fr; }
  .import-hero-art { display: none; }
  .template-grid { grid-template-columns: 1fr 1fr; }
  .kb-groups { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .kb-card-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .kb-industry-panel { grid-template-columns: 1fr; }
}
@media (max-width: 600px) {
  .import-hero { padding: 25px 22px; border-radius: 16px; }
  .import-hero-stats { gap: 19px; }
  .import-stepper { align-items: flex-start; flex-direction: column; gap: 9px; }
  .import-step-line { display: none; }
  .import-section-heading { align-items: flex-start; flex-direction: column; }
  .template-grid, .kb-groups, .kb-card-grid { grid-template-columns: 1fr; }
  .template-upload { grid-template-columns: 1fr; }
  .template-submit { width: 100%; }
  .kb-hero { padding: 24px 20px; }
  .kb-hero h1 { font-size: 29px; }
  .kb-hero-side { display: none; }
  .kb-section-heading { align-items: flex-start; flex-direction: column; }
  .kb-detail-hero { padding: 22px 20px; }
  .kb-detail-hero h1 { font-size: 26px; }
  .kb-article-section { grid-template-columns: 34px minmax(0,1fr); gap: 10px; padding: 16px 13px; }
  .kb-section-number { width: 30px; height: 30px; }
}

/* ========================================================================
   V2.8.0 · MRS. YE BRAND SYSTEM + PRODUCT WORKSPACE
   Retains the V2.7.3 business UI and tokens; this layer refreshes presentation.
   ======================================================================== */
:root {
  --green: #0f4c3a;
  --green-dark: #0a3328;
  --gold: #d9be8a;
  --gold-dark: #b8955a;
  --bg: #faf8f3;
  --paper: #ffffff;
  --text: #1c2b26;
  --muted: #5c6b66;
  --line: #e6e1d6;
  --radius: 12px;
  --surface-soft: #f3f5f1;
  --shadow-card: 0 8px 24px rgba(19, 45, 34, .055);
  --shadow-float: 0 16px 38px rgba(19, 45, 34, .11);
  --focus-ring: 0 0 0 3px rgba(217, 190, 138, .35);
}

html { scroll-behavior: smooth; }
body {
  color: var(--text);
  font-family: "Noto Sans SC", "Noto Sans", "PingFang SC", "Microsoft YaHei", system-ui, -apple-system, "Segoe UI", sans-serif;
  letter-spacing: .005em;
}
button, input, select, textarea { font: inherit; }
button, a, input, select, textarea { -webkit-tap-highlight-color: transparent; }
:focus-visible { outline: 0; box-shadow: var(--focus-ring); }
a { text-underline-offset: 3px; }
h1, h2, h3 { letter-spacing: -.018em; }
h1 { font-weight: 740; }
h2 { font-weight: 700; }

/* Main app shell: persistent navigation + compact workspace header */
.app-body { background: #f5f6f2; }
.app-shell { display: grid; grid-template-columns: 252px minmax(0, 1fr); min-height: 100vh; }
.app-sidebar {
  position: sticky; top: 0; display: flex; flex-direction: column; min-width: 0; height: 100vh;
  padding: 26px 17px 18px; color: #fff; background: var(--green-dark); border-right: 1px solid rgba(255,255,255,.06);
}
.app-brand { display: flex; gap: 11px; align-items: center; padding: 0 9px 27px; color: #fff; font-size: 18px; }
.app-brand svg { width: 38px; height: 38px; flex: none; }
.app-brand > span { display: flex; flex-direction: column; gap: 1px; line-height: 1.2; }
.app-brand b { color: #fff; font-size: 17px; letter-spacing: .02em; }
.app-brand small { color: #a9c0b5; font-size: 9px; font-weight: 700; letter-spacing: 1.6px; }
.app-sidebar-label { padding: 0 11px 10px; color: #92ad9f; font-size: 10px; font-weight: 800; letter-spacing: 1.8px; text-transform: uppercase; }
.app-nav { display: flex; flex-direction: column; gap: 6px; flex: 1; min-width: 0; }
.app-nav-item, .app-kb-link {
  display: grid; grid-template-columns: 34px minmax(0,1fr) 14px; align-items: center; gap: 9px; min-height: 46px;
  padding: 6px 10px; border: 1px solid transparent; border-radius: 10px; color: #d9e5dd; text-decoration: none;
  font-size: 14px; font-weight: 560; transition: background .16s ease, color .16s ease, border-color .16s ease;
}
.app-nav-item:hover, .app-kb-link:hover { color: #fff; background: rgba(255,255,255,.075); }
.app-nav-item[aria-current="page"] { color: var(--green-dark); background: var(--gold); border-color: rgba(255,255,255,.17); font-weight: 750; }
.app-nav-glyph { display: grid; place-items: center; width: 31px; height: 31px; border: 1px solid rgba(255,255,255,.14); border-radius: 9px; color: #e5d4ae; font-size: 16px; line-height: 1; }
.app-nav-item[aria-current="page"] .app-nav-glyph { color: var(--green-dark); border-color: rgba(10,51,40,.18); background: rgba(255,255,255,.25); }
.app-nav-arrow { justify-self: end; color: #8da99a; font-size: 17px; }
.app-nav-item[aria-current="page"] .app-nav-arrow { color: #6c5833; }
.app-sidebar-bottom { margin-top: auto; padding-top: 15px; border-top: 1px solid rgba(255,255,255,.13); }
.app-kb-link { min-height: 42px; margin-bottom: 16px; color: #d9e5dd; font-size: 13px; }
.app-sidebar-signature { display: flex; align-items: center; gap: 10px; padding: 12px 8px 4px; border-top: 1px solid rgba(255,255,255,.08); }
.app-signature-mark { display: grid; place-items: center; width: 31px; height: 31px; border-radius: 50%; background: rgba(217,190,138,.17); color: var(--gold); font: 700 14px/1 Georgia, serif; }
.app-sidebar-signature > span:last-child { display: flex; flex-direction: column; gap: 2px; }
.app-sidebar-signature b { color: #e9eee9; font-size: 9px; letter-spacing: 1.5px; }
.app-sidebar-signature small { color: #8fa99a; font-size: 11px; }
.app-column { min-width: 0; display: flex; flex-direction: column; }
.app-topbar {
  position: sticky; z-index: 20; top: 0; display: flex; align-items: center; justify-content: space-between; gap: 20px;
  min-height: 76px; padding: 11px clamp(20px, 3vw, 42px); background: rgba(255,255,255,.96);
  border-bottom: 1px solid var(--line); box-shadow: 0 2px 9px rgba(20,40,30,.025); backdrop-filter: blur(12px);
}
.app-topbar-title { display: flex; flex-direction: column; gap: 2px; }
.app-topbar-title > span { color: #9a9b90; font-size: 9px; font-weight: 800; letter-spacing: 1.8px; }
.app-topbar-title strong { color: var(--green-dark); font-size: 18px; font-weight: 720; }
.app-topbar-actions { display: flex; align-items: center; justify-content: flex-end; gap: 18px; min-width: 0; }
.app-company-context { display: flex; flex-direction: column; min-width: 0; max-width: 240px; padding-left: 16px; border-left: 1px solid var(--line); }
.app-company-context small { color: #929a93; font-size: 10px; }
.app-company-context b { overflow: hidden; color: #31443a; font-size: 12px; font-weight: 650; text-overflow: ellipsis; white-space: nowrap; }
.app-topbar .lang-switch { gap: 10px; padding: 8px 11px; border: 1px solid var(--line); border-radius: 9px; background: #fff; }
.app-topbar .lang-switch a { font-size: 12px; }
.app-topbar .app-logout { border-color: var(--line); color: #4c6056; background: #fff; }
.app-topbar .app-logout:hover { border-color: #c8d5cc; color: var(--green); background: #f4f7f3; }
.app-main { flex: 1; min-height: 70vh; padding: 27px clamp(18px, 3vw, 42px) 48px; }
.app-main > .wrap { width: 100%; max-width: 1450px; margin: 0 auto; padding: 0; }
.app-main h1 { color: var(--green-dark); font-size: clamp(23px, 2.2vw, 29px); }
.app-main h2 { color: #273d32; }
.app-main .muted { color: #68766e; }
.app-footer { display: flex; align-items: center; flex-wrap: wrap; gap: 12px 22px; padding: 17px clamp(18px, 3vw, 42px); border-top: 1px solid var(--line); color: #8a948d; background: rgba(255,255,255,.58); font-size: 11px; }
.app-footer a { color: #62766b; text-decoration: none; }
.app-footer a:hover { color: var(--green); text-decoration: underline; }
.app-banner { margin: 0; border-bottom: 1px solid #eadfc7; border-radius: 0; text-align: left; }

/* Surface, form, button and table language */
.card, .kpis > div, .side .today, .chat, .template-card, .kb-card, .kb-group-tile {
  border-color: var(--line); border-radius: var(--radius); box-shadow: var(--shadow-card);
}
.card { padding: 22px; background: #fff; }
.card:hover { border-color: #d7ddd3; }
.btn { min-height: 40px; border-radius: 9px; font-weight: 680; transition: background .15s ease, border-color .15s ease, transform .15s ease, box-shadow .15s ease; }
.btn:not(:disabled):hover { transform: translateY(-1px); box-shadow: 0 4px 11px rgba(10,51,40,.12); }
.btn.gold { color: var(--green-dark); }
.btn.ghost { border-color: #dfe5de; background: #fff; }
.btn.ghost:hover { border-color: #c6d6ca; background: #f2f6f2; }
.form input:not([type=radio]):not([type=checkbox]), .form select, textarea,
.template-date input, .template-file-label, .kb-search {
  border-color: #d9dfd7; border-radius: 9px;
}
.form input:focus, .form select:focus, textarea:focus, .template-date input:focus, .kb-search input:focus {
  outline: none; border-color: var(--gold-dark); box-shadow: var(--focus-ring);
}
.table { border-radius: 10px; overflow: hidden; }
.table th, .table td { padding: 10px 12px; border-bottom-color: #edf0ea; }
.table thead th { background: #f5f6f2; color: #68766e; font-size: 11px; letter-spacing: .03em; }
.table tbody tr:hover { background: #fafbf8; }
.tabs { border: 1px solid #e3e7df; background: #eef1eb; border-radius: 10px; }
.tabs a[aria-current="page"] { color: var(--green-dark); border: 1px solid #e2e7df; box-shadow: 0 1px 4px rgba(20,40,30,.07); }
.kpis > div { padding: 16px 18px; background: #fff; }
.kpis dt { color: #77847c; font-size: 12px; }
.kpis dd { color: var(--green-dark); font-size: clamp(19px, 2vw, 25px); letter-spacing: -.025em; }
.proposal { border-color: #e5e0d4; border-radius: 11px; }
.bubble.ai { background: #f3f5f0; }
.bubble.me { background: var(--green); }
.notice { background: #f1f5f0; border-color: #dbe6da; }
.warn, .card.warn { background: #fbf6e9; border-color: #eadfc8; }
.alert { border-radius: 10px; }

/* More restrained, single-color hero treatments */
.hero { background: var(--green-dark); }
.import-hero, .kb-hero, .kb-detail-hero,
.kb-detail-tax, .kb-detail-finance, .kb-detail-inventory, .kb-detail-operations {
  background: var(--green-dark); box-shadow: none;
}
.import-hero { border: 1px solid rgba(217,190,138,.24); border-radius: 16px; }
.kb-hero, .kb-detail-hero { border: 1px solid rgba(217,190,138,.24); border-radius: 16px; }
.demo { border: 1px solid rgba(217,190,138,.22); border-radius: 14px; box-shadow: var(--shadow-float); }
.import-instruction { border-radius: 11px; }
.import-stepper { border-radius: 11px; box-shadow: var(--shadow-card); }
.template-card, .kb-card, .kb-group-tile { border-radius: 12px; }
.template-card:hover, .kb-card:hover, .kb-group-tile:hover { transform: translateY(-1px); box-shadow: var(--shadow-card); }
.template-product { --accent: #557465; --accent-bg: #edf3ee; }
.template-cost { --accent: #9b7847; --accent-bg: #f7f2e8; }
.template-people { --accent: #65796f; --accent-bg: #eef2ef; }
.kb-group-finance .kb-group-icon, .kb-card-finance .kb-icon { background: #edf2ee; color: #557465; }
.kb-group-inventory .kb-group-icon, .kb-card-inventory .kb-icon { background: #f5f0e5; color: #987849; }
.kb-group-operations .kb-group-icon, .kb-card-operations .kb-icon { background: #f0f1ed; color: #68786d; }

/* Small hierarchy details */
.site-header { position: relative; background: rgba(255,255,255,.97); }
.site-header .row { min-height: 70px; }
.brand { gap: 9px; }
.site-nav { gap: 26px; }
.site-nav a { font-size: 14px; color: #52645a; }
.site-nav a:hover { color: var(--green); }
.site-footer { background: #fff; }
.lang-switch a[aria-current] { color: var(--green); }
.eyebrow, .import-eyebrow, .kb-eyebrow { letter-spacing: 1.7px; }

@media (max-width: 1100px) {
  .app-shell { grid-template-columns: 224px minmax(0,1fr); }
  .app-sidebar { padding-left: 13px; padding-right: 13px; }
  .app-main { padding-left: 22px; padding-right: 22px; }
  .app-topbar { padding-left: 22px; padding-right: 22px; }
}
@media (max-width: 900px) {
  .app-shell { display: flex; flex-direction: column; }
  .app-sidebar { position: relative; top: auto; width: 100%; height: auto; padding: 12px 18px 10px; }
  .app-brand { padding: 0 4px 10px; }
  .app-brand svg { width: 32px; height: 32px; }
  .app-sidebar-label, .app-sidebar-bottom { display: none; }
  .app-nav { display: flex; flex-direction: row; flex: none; width: 100%; gap: 5px; overflow-x: auto; padding: 0 0 2px; }
  .app-nav-item { display: inline-flex; flex: none; gap: 7px; min-height: 39px; padding: 4px 10px; white-space: nowrap; font-size: 12px; }
  .app-nav-glyph { width: 25px; height: 25px; font-size: 13px; }
  .app-nav-arrow { display: none; }
  .app-topbar { position: relative; min-height: 64px; }
  .app-main { min-height: 60vh; }
}
@media (max-width: 600px) {
  .app-sidebar { padding: 10px 12px 8px; }
  .app-brand { padding-bottom: 8px; }
  .app-brand b { font-size: 15px; }
  .app-nav-item { min-height: 36px; padding: 4px 8px; }
  .app-topbar { align-items: flex-start; flex-direction: column; gap: 9px; padding: 11px 14px; }
  .app-topbar-title strong { font-size: 16px; }
  .app-topbar-actions { justify-content: space-between; flex-wrap: wrap; width: 100%; gap: 8px 10px; }
  .app-company-context { max-width: min(44vw, 190px); padding-left: 0; border: 0; }
  .app-topbar .lang-switch { padding: 6px 8px; }
  .app-main { padding: 18px 14px 34px; }
  .app-footer { padding: 14px; gap: 9px 15px; }
  .app-main .report > .row { align-items: flex-start; }
  .app-main .kpis { gap: 8px; }
  .app-main .kpis > div { padding: 11px 12px; }
  .app-main .card { padding: 15px; }
  .app-main .chat-layout { margin-top: 0; }
  .app-main .chat-head { padding: 12px 14px; }
  .app-main .messages { padding: 13px; }
  .app-main .composer { padding: 11px 13px; }
  .site-header .wrap { padding-top: 10px; padding-bottom: 10px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition-duration: .01ms !important; animation-duration: .01ms !important; }
}

/* 右侧"今天"小卡片比较窄：数字大时（如 −56,585.47）不能超出卡片 */
.kpis > div { min-width: 0; }
.small-kpis dd { font-size: clamp(15px, 1.3vw, 19px); overflow-wrap: anywhere; }

/* Four-language selector */
.lang-switch { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.lang-switch a { white-space: nowrap; padding: 3px 2px; }
