:root {
  --side: #0d2a23;
  --side-deep: #0a211b;
  --side-line: rgba(255, 255, 255, 0.07);
  --gold: #d8a24a;
  --gold-soft: rgba(216, 162, 74, 0.14);
  --bg: #f3f0ea;
  --card: #ffffff;
  --text: #1b2420;
  --muted: #6f7a73;
  --faint: #9aa39c;
  --line: #e7e1d6;
  --line-soft: #f0ece4;
  --green: #2c7a58;
  --green-bg: #e6f2ec;
  --amber: #b0731a;
  --amber-bg: #fbf0dc;
  --red: #b3433a;
  --red-bg: #fbeae7;
  --blue: #2b6785;
  --blue-bg: #e9f2f7;
  --gray: #6c756f;
  --gray-bg: #eef0ed;
  --shadow: 0 1px 2px rgba(23, 36, 29, 0.04), 0 10px 30px rgba(23, 36, 29, 0.05);
  --radius: 16px;
}

* { box-sizing: border-box; }

html, body { height: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: "PingFang SC", "Noto Sans SC", "Microsoft YaHei", system-ui, -apple-system, sans-serif;
  font-size: 14px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

svg { fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }

a { color: inherit; text-decoration: none; }

/* ---------------------------------------------------------------- 侧边栏 */

.sidebar {
  position: fixed;
  inset: 0 auto 0 0;
  width: 236px;
  background:
    radial-gradient(120% 60% at 0% 0%, rgba(216, 162, 74, 0.08), transparent 60%),
    linear-gradient(180deg, var(--side) 0%, var(--side-deep) 100%);
  color: #e8efe9;
  display: flex;
  flex-direction: column;
  z-index: 30;
  transition: transform 0.25s ease;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 22px 20px 20px;
  border-bottom: 1px solid var(--side-line);
}

.brand-mark {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: linear-gradient(145deg, #e0b062, #b9802e);
  color: #20301f;
  font-weight: 700;
  font-size: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  letter-spacing: 0.05em;
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.25);
  flex: none;
}

.brand-text { display: flex; flex-direction: column; line-height: 1.25; }
.brand-text strong { font-size: 16px; letter-spacing: 0.08em; font-weight: 600; }
.brand-text span { font-size: 11px; color: rgba(232, 239, 233, 0.5); letter-spacing: 0.16em; margin-top: 4px; }

.nav {
  flex: 1;
  overflow-y: auto;
  padding: 14px 12px 20px;
  scrollbar-width: thin;
  scrollbar-color: rgba(255,255,255,.14) transparent;
}
.nav::-webkit-scrollbar { width: 5px; }
.nav::-webkit-scrollbar-thumb { background: rgba(255,255,255,.14); border-radius: 4px; }

.nav-group { margin-bottom: 6px; }

.nav-label {
  display: block;
  font-size: 10.5px;
  letter-spacing: 0.18em;
  color: rgba(232, 239, 233, 0.38);
  padding: 12px 12px 6px;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  height: 40px;
  padding: 0 12px;
  border-radius: 9px;
  color: rgba(232, 239, 233, 0.74);
  font-size: 13.5px;
  position: relative;
  transition: background 0.15s ease, color 0.15s ease;
}

.nav-item svg { width: 18px; height: 18px; flex: none; opacity: 0.75; }

.nav-item:hover { background: rgba(255, 255, 255, 0.05); color: #fff; }

.nav-item.active {
  background: var(--gold-soft);
  color: #f4d79e;
  font-weight: 500;
}
.nav-item.active svg { opacity: 1; stroke: var(--gold); }
.nav-item.active::before {
  content: "";
  position: absolute;
  left: -12px;
  top: 10px;
  bottom: 10px;
  width: 3px;
  border-radius: 0 3px 3px 0;
  background: var(--gold);
}

.side-foot {
  padding: 16px 18px 18px;
  border-top: 1px solid var(--side-line);
  font-size: 11px;
  color: rgba(232, 239, 233, 0.4);
}

.db-state { display: flex; align-items: center; gap: 7px; margin-bottom: 8px; color: rgba(232, 239, 233, 0.68); font-size: 11.5px; }
.db-state i { width: 7px; height: 7px; border-radius: 50%; background: var(--gold); flex: none; animation: pulse 2s infinite; }
.db-state.ok i { background: #5ecb92; animation: none; }
.db-state.bad i { background: #e4776b; animation: none; }

@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.35; } }

.side-ver { letter-spacing: 0.05em; }

/* ---------------------------------------------------------------- 顶栏 */

.topbar {
  position: fixed;
  top: 0;
  left: 236px;
  right: 0;
  height: 64px;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 0 30px;
  z-index: 20;
}

.crumb { display: flex; align-items: center; gap: 9px; font-size: 13px; color: var(--faint); }
.crumb i { font-style: normal; color: #c9c2b4; }
.crumb strong { color: var(--text); font-size: 15px; font-weight: 600; letter-spacing: 0.02em; }

.top-right { margin-left: auto; display: flex; align-items: center; gap: 18px; }

.live { display: flex; align-items: center; gap: 7px; font-size: 12px; color: var(--muted); }
.live i { width: 6px; height: 6px; border-radius: 50%; background: #47a97a; }

.today { font-size: 12px; color: var(--muted); font-variant-numeric: tabular-nums; }

.avatar {
  width: 34px; height: 34px; border-radius: 50%;
  background: var(--side); color: #f3dfb5;
  display: flex; align-items: center; justify-content: center;
  font-size: 14px; font-weight: 600;
}

.nav-toggle {
  display: none;
  width: 36px; height: 36px;
  border: 1px solid var(--line); border-radius: 9px;
  background: #fff; color: var(--text);
  cursor: pointer; align-items: center; justify-content: center;
}
.nav-toggle svg { width: 18px; height: 18px; }

/* ---------------------------------------------------------------- 主区 */

.main {
  margin-left: 236px;
  padding: 64px 0 0;
  min-height: 100vh;
}

.main-inner {
  padding: 28px 30px 64px;
  max-width: 1480px;
  margin: 0 auto;
  animation: fadeIn 0.35s ease both;
}

@keyframes fadeIn { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

/* ---------------------------------------------------------------- 页头 */

.page-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 22px;
  flex-wrap: wrap;
}

.page-head h1 {
  margin: 0;
  font-size: 24px;
  font-weight: 600;
  letter-spacing: 0.02em;
}

.page-head p { margin: 5px 0 0; font-size: 13px; color: var(--muted); }

.page-actions { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }

.date-chip {
  display: inline-flex; align-items: center; gap: 8px;
  height: 34px; padding: 0 14px; border-radius: 999px;
  background: #fff; border: 1px solid var(--line);
  font-size: 12.5px; color: var(--muted);
}
.date-chip b { color: var(--text); font-weight: 600; font-variant-numeric: tabular-nums; }

/* ---------------------------------------------------------------- 按钮 */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  height: 36px;
  padding: 0 15px;
  border-radius: 9px;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--text);
  font-family: inherit;
  font-size: 13px;
  cursor: pointer;
  white-space: nowrap;
  transition: border-color 0.15s ease, background 0.15s ease, box-shadow 0.15s ease;
}
.btn:hover { border-color: #cfc6b5; box-shadow: 0 2px 8px rgba(23,36,29,.06); }
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: 0.55; cursor: not-allowed; }

.btn-icon { width: 15px; height: 15px; }

.btn-primary {
  background: var(--side);
  border-color: var(--side);
  color: #f4efe4;
}
.btn-primary:hover { background: #17453a; border-color: #17453a; box-shadow: 0 4px 14px rgba(13,42,35,.22); }

.btn-gold { background: linear-gradient(145deg, #e0b062, #c08a34); border-color: #c08a34; color: #2a2415; font-weight: 600; }
.btn-gold:hover { box-shadow: 0 4px 14px rgba(192,138,52,.3); }

.btn-sm { height: 32px; padding: 0 11px; font-size: 12.5px; border-radius: 8px; }

.btn-ghost { border-color: transparent; background: transparent; color: var(--muted); }
.btn-ghost:hover { background: var(--line-soft); box-shadow: none; }

.btn-danger { color: var(--red); border-color: #eccfc9; background: #fff; }
.btn-danger:hover { background: var(--red-bg); }

.btn-link { background: none; border: none; padding: 0; color: var(--blue); font-size: 12.5px; cursor: pointer; font-family: inherit; }
.btn-link:hover { text-decoration: underline; }
.btn-link.danger { color: var(--red); }

/* ---------------------------------------------------------------- 客户/报价工具栏 */

.toolbar {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  padding: 16px 18px;
  border-bottom: 1px solid var(--line-soft);
}

.search {
  position: relative;
  flex: 1;
  min-width: 220px;
  max-width: 380px;
}
.search svg {
  position: absolute; left: 13px; top: 50%; transform: translateY(-50%);
  width: 16px; height: 16px; color: var(--faint);
}
.search input {
  width: 100%;
  height: 38px;
  padding: 0 12px 0 38px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: #fbfaf7;
  font-family: inherit;
  font-size: 13px;
  color: var(--text);
  outline: none;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.search input:focus { border-color: #b9ab92; box-shadow: 0 0 0 3px rgba(216,162,74,.12); background: #fff; }
.search input::placeholder { color: #a9b0a8; }

.select {
  height: 38px;
  padding: 0 34px 0 12px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: #fbfaf7 url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath d='M3 4.5l3 3 3-3' fill='none' stroke='%23727b74' stroke-width='1.4'/%3E%3C/svg%3E") no-repeat right 12px center;
  font-family: inherit;
  font-size: 13px;
  color: var(--text);
  cursor: pointer;
  outline: none;
  appearance: none;
  min-width: 120px;
}
.select:focus { border-color: #b9ab92; box-shadow: 0 0 0 3px rgba(216,162,74,.12); }

.toolbar .spacer { flex: 1; }

.count-note { font-size: 12.5px; color: var(--faint); white-space: nowrap; }

/* ---------------------------------------------------------------- 卡片 / 面板 */

.panel {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 18px 20px 12px;
}
.panel-head h2 { margin: 0; font-size: 15px; font-weight: 600; letter-spacing: 0.01em; }
.panel-head .sub { font-size: 12px; color: var(--faint); }
.panel-body { padding: 0 20px 20px; }

/* ---------------------------------------------------------------- KPI */

.kpi-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 18px;
}

.kpi {
  position: relative;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 18px 18px 16px;
  box-shadow: var(--shadow);
  overflow: hidden;
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}
.kpi:hover { transform: translateY(-2px); box-shadow: 0 12px 30px rgba(23,36,29,.09); }

.kpi::after {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 3px;
  background: transparent;
}
.kpi.c-green::after { background: linear-gradient(90deg, #2c7a58, #6db08c); }
.kpi.c-gold::after { background: linear-gradient(90deg, #c08a34, #e3bc74); }
.kpi.c-blue::after { background: linear-gradient(90deg, #2b6785, #6fa4bd); }
.kpi.c-red::after { background: linear-gradient(90deg, #b3433a, #d98a80); }

.kpi-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; }
.kpi-label { font-size: 12.5px; color: var(--muted); letter-spacing: 0.04em; }

.kpi-icon {
  width: 32px; height: 32px; border-radius: 9px;
  display: flex; align-items: center; justify-content: center;
  flex: none;
}
.kpi-icon svg { width: 17px; height: 17px; }
.kpi.c-green .kpi-icon { background: var(--green-bg); color: var(--green); }
.kpi.c-gold .kpi-icon { background: var(--amber-bg); color: var(--amber); }
.kpi.c-blue .kpi-icon { background: var(--blue-bg); color: var(--blue); }
.kpi.c-red .kpi-icon { background: var(--red-bg); color: var(--red); }

.kpi-value {
  margin-top: 10px;
  font-size: 29px;
  font-weight: 600;
  letter-spacing: -0.01em;
  font-variant-numeric: tabular-nums;
  line-height: 1.15;
}
.kpi-value small { font-size: 13px; font-weight: 500; color: var(--muted); margin-left: 3px; letter-spacing: 0; }

.kpi-foot { margin-top: 7px; font-size: 12px; color: var(--faint); display: flex; align-items: center; gap: 6px; }
.kpi-foot b { color: var(--muted); font-weight: 500; }

/* ---------------------------------------------------------------- 表格 */

.table-wrap { width: 100%; overflow-x: auto; }

table.table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

.table th {
  text-align: left;
  font-size: 11.5px;
  font-weight: 500;
  letter-spacing: 0.06em;
  color: var(--faint);
  padding: 11px 14px;
  background: #fbfaf6;
  border-bottom: 1px solid var(--line);
  white-space: nowrap;
}

.table td {
  padding: 12px 14px;
  border-bottom: 1px solid var(--line-soft);
  color: var(--text);
  vertical-align: middle;
}
.table tbody tr:last-child td { border-bottom: none; }
.table tbody tr:hover td { background: #faf8f2; }

.table .num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.table .mono { font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace; font-size: 12.5px; letter-spacing: 0.01em; }
.table .muted { color: var(--muted); }
.table .tiny { font-size: 12px; color: var(--faint); }
.table .strong { font-weight: 600; }

.table th.num { text-align: right; }

.table-link { color: var(--blue); font-weight: 500; cursor: pointer; }
.table-link:hover { text-decoration: underline; }

.row-actions { display: flex; align-items: center; gap: 10px; white-space: nowrap; }

/* 可点击行（采购 / 库存列表） */
.table tbody tr.row-click { cursor: pointer; }
.table tbody tr.row-click:hover td { background: #f5f1e8; }

/* 详情弹窗里的行内编辑控件 */
.input-sm, .select-sm { height: 32px; font-size: 12.5px; border-radius: 7px; }
.input-sm { padding: 0 8px; }
.select-sm { padding: 0 26px 0 8px; background-position: right 8px center; }
.table .input-sm, .table .select-sm { width: 100%; min-width: 76px; }
.table .pl-qty, .table .pl-price { max-width: 112px; }
.table .pl-rate { max-width: 80px; }
.table .pl-remark { min-width: 132px; }
.pl-total-row td { background: #fbfaf6; font-weight: 600; border-top: 1px solid var(--line); }
.st-adjust-foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 12px; flex-wrap: wrap; }

/* ---------------------------------------------------------------- 状态徽标 */

.pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 23px;
  padding: 0 9px;
  border-radius: 999px;
  font-size: 11.5px;
  font-weight: 500;
  white-space: nowrap;
}
.pill i { width: 5px; height: 5px; border-radius: 50%; flex: none; }

.pill.green { background: var(--green-bg); color: var(--green); }
.pill.green i { background: var(--green); }
.pill.amber { background: var(--amber-bg); color: var(--amber); }
.pill.amber i { background: var(--amber); }
.pill.red { background: var(--red-bg); color: var(--red); }
.pill.red i { background: var(--red); }
.pill.blue { background: var(--blue-bg); color: var(--blue); }
.pill.blue i { background: var(--blue); }
.pill.gray { background: var(--gray-bg); color: var(--gray); }
.pill.gray i { background: var(--gray); }

/* ---------------------------------------------------------------- 看板布局 */

.dash-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}
.dash-grid .span-1 { grid-column: span 1; }
.dash-grid .span-2 { grid-column: span 2; }
.dash-grid .span-3 { grid-column: span 3; }
.dash-grid .span-4 { grid-column: span 3; }
@media (max-width: 980px) {
  .dash-grid .span-1, .dash-grid .span-2, .dash-grid .span-3, .dash-grid .span-4 { grid-column: span 1; }
}

/* 状态分布条 */
.status-bars { padding: 4px 20px 20px; display: flex; flex-direction: column; gap: 13px; }
.status-bar-row { display: grid; grid-template-columns: 76px 1fr 42px; align-items: center; gap: 10px; font-size: 12.5px; }
.status-bar-row .name { color: var(--muted); }
.status-bar-row .track { height: 8px; border-radius: 999px; background: var(--line-soft); overflow: hidden; }
.status-bar-row .fill { height: 100%; border-radius: 999px; background: linear-gradient(90deg, #18453a, #3f8a69); transition: width 0.6s ease; }
.status-bar-row .val { text-align: right; font-variant-numeric: tabular-nums; color: var(--text); font-weight: 500; }

.mini-stats { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; padding: 2px 20px 20px; }
.mini-stat { background: #faf8f3; border: 1px solid var(--line-soft); border-radius: 10px; padding: 12px 14px; }
.mini-stat .l { font-size: 11.5px; color: var(--faint); }
.mini-stat .v { font-size: 17px; font-weight: 600; margin-top: 3px; font-variant-numeric: tabular-nums; }
.mini-stat .v small { font-size: 11px; color: var(--muted); font-weight: 400; }

/* ---------------------------------------------------------------- 摘要条 */

.summary-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 16px;
}
.summary-chip {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 9px 15px;
  font-size: 12.5px;
  color: var(--muted);
  display: flex;
  align-items: baseline;
  gap: 8px;
  box-shadow: 0 1px 2px rgba(23,36,29,.03);
}
.summary-chip b { color: var(--text); font-size: 15px; font-variant-numeric: tabular-nums; font-weight: 600; }
.summary-chip.warn b { color: var(--amber); }
.summary-chip.bad b { color: var(--red); }
.summary-chip.good b { color: var(--green); }

/* ---------------------------------------------------------------- 空状态 / 加载 */

.empty {
  padding: 52px 20px;
  text-align: center;
  color: var(--faint);
}
.empty svg { width: 44px; height: 44px; color: #cfc7b8; margin-bottom: 12px; }
.empty .title { color: var(--muted); font-size: 14px; font-weight: 500; }
.empty .hint { font-size: 12.5px; margin-top: 5px; }

.loading {
  padding: 50px 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  color: var(--faint);
  font-size: 13px;
}
.spinner {
  width: 17px; height: 17px;
  border: 2px solid #ded7c8;
  border-top-color: var(--gold);
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------------------------------------------------------------- 提示条 */

.db-banner {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  background: #fff7ea;
  border: 1px solid #f0d9ae;
  border-radius: 12px;
  padding: 13px 16px;
  margin-bottom: 18px;
  color: #7a5413;
  font-size: 13px;
}
.db-banner svg { width: 18px; height: 18px; flex: none; margin-top: 2px; color: #b0731a; }
.db-banner .txt { flex: 1; }
.db-banner strong { display: block; font-size: 13.5px; margin-bottom: 2px; }
.db-banner .hint { font-size: 12px; color: #9a7734; margin-top: 4px; line-height: 1.5; }
.db-banner.bad { background: #fdeeea; border-color: #efcfc8; color: #8c342b; }
.db-banner.bad svg { color: var(--red); }

/* ---------------------------------------------------------------- 弹窗 / 抽屉 */

.overlay {
  position: fixed;
  inset: 0;
  background: rgba(12, 24, 19, 0.42);
  backdrop-filter: blur(2px);
  z-index: 60;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  animation: fadeIn 0.2s ease both;
}
.overlay.right { justify-content: flex-end; padding: 0; }

.modal {
  width: min(720px, 94vw);
  max-height: 90vh;
  background: #fff;
  border-radius: 18px;
  box-shadow: 0 24px 70px rgba(8, 18, 14, 0.28);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  animation: popIn 0.22s ease both;
}
.modal.wide { width: min(880px, 96vw); }

@keyframes popIn { from { opacity: 0; transform: translateY(10px) scale(0.99); } to { opacity: 1; transform: none; } }

.modal-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding: 22px 24px 16px;
  border-bottom: 1px solid var(--line-soft);
}
.modal-head h3 { margin: 0; font-size: 17px; font-weight: 600; }
.modal-head .sub { font-size: 12.5px; color: var(--faint); margin-top: 3px; }

.icon-close {
  width: 32px; height: 32px; border-radius: 8px;
  border: 1px solid var(--line); background: #fff; color: var(--muted);
  cursor: pointer; display: flex; align-items: center; justify-content: center; flex: none;
}
.icon-close:hover { background: var(--line-soft); }
.icon-close svg { width: 16px; height: 16px; }

.modal-body { padding: 20px 24px; overflow-y: auto; }
.modal-foot {
  display: flex; justify-content: flex-end; gap: 10px;
  padding: 15px 24px 20px;
  border-top: 1px solid var(--line-soft);
  background: #fbfaf7;
}

.drawer {
  width: min(800px, 96vw);
  height: 100%;
  background: #fff;
  box-shadow: -20px 0 60px rgba(8, 18, 14, 0.22);
  display: flex;
  flex-direction: column;
  animation: slideIn 0.28s ease both;
}
@keyframes slideIn { from { transform: translateX(40px); opacity: 0.6; } to { transform: none; opacity: 1; } }

.drawer-body { flex: 1; overflow-y: auto; padding: 22px 26px 30px; }

/* ---------------------------------------------------------------- 表单 */

.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px 18px; }
.form-grid .full { grid-column: 1 / -1; }

.field { display: flex; flex-direction: column; gap: 6px; }
.field label { font-size: 12px; color: var(--muted); letter-spacing: 0.02em; }
.field label em { font-style: normal; color: var(--red); margin-left: 2px; }
.field .tip { font-size: 11.5px; color: var(--faint); }

/* 原材料贸易 */
.tag { display: inline-block; font-size: 11.5px; padding: 1px 8px; border-radius: 999px; background: var(--gray-bg); color: var(--gray); white-space: nowrap; }
.tag.good { background: var(--green-bg); color: var(--green); }
.tag.warn { background: var(--amber-bg); color: var(--amber); }
.tag.blue { background: var(--blue-bg, #e8eefb); color: var(--blue, #3559a8); }
.calc-preview {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px 16px;
  background: #f8f5ee;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 14px 16px;
}
.calc-cell { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.calc-cell span { font-size: 11.5px; color: var(--faint); }
.calc-cell b { font-size: 15px; font-variant-numeric: tabular-nums; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* 对账单 */
.bill-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 20px; border-bottom: 2px solid var(--text); padding-bottom: 12px; margin-bottom: 14px; }
.bill-head h2 { margin: 0 0 4px; font-size: 19px; }
.bill-meta { text-align: right; font-size: 12.5px; color: var(--muted); line-height: 1.9;white-space: nowrap; }
.bill-meta b { color: var(--text); }
.bill-table tfoot td { background: #f8f5ee; font-weight: 600; }

/* 经营知识库 */
.kb-sug { border: 1px solid var(--line); border-radius: 10px; padding: 11px 12px; margin-bottom: 10px; background: #fbfaf7; }
.kb-sug-head { display: flex; align-items: center; gap: 8px; margin-bottom: 5px; }
.kb-sug-head b { font-size: 13.5px; }
.kb-price-sum { display: flex; gap: 22px; padding: 4px 0 12px; border-bottom: 1px dashed var(--line); }
.kb-price-sum div { display: flex; flex-direction: column; gap: 2px; }
.kb-price-sum b { font-size: 20px; font-variant-numeric: tabular-nums; }
.kb-price-sum span { font-size: 11.5px; color: var(--faint); }
.kb-price-rows { margin-top: 10px; }
.kb-price-row { display: flex; justify-content: space-between; font-size: 12.5px; color: var(--muted); padding: 5px 0; border-bottom: 1px dotted var(--line-soft); }
.kb-price-row b { color: var(--text); font-variant-numeric: tabular-nums; }
.kb-rule-line { display: flex; gap: 22px; align-items: center; flex-wrap: wrap; font-size: 13px; margin-bottom: 12px; }
.kb-rule-line input[type="checkbox"] { margin-right: 5px; }
.kb-rule-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 12px; max-width: 780px; }
.kb-rule-grid label { display: flex; flex-direction: column; gap: 5px; font-size: 12px; color: var(--muted); }
.kb-rule-grid .input { height: 34px; font-size: 13px; }
.kb-rule-fields { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin: 14px 0 12px; }
.kb-chip { display: inline-flex; align-items: center; gap: 5px; padding: 4px 9px; border: 1px solid var(--line); border-radius: 999px; background: #fbfaf7; font-size: 12px; cursor: pointer; }
.kb-chip:hover { border-color: #cfc6b5; }
.kb-chip input { margin: 0; }
.kb-rule-foot { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.tag.amber { background: var(--amber-bg); color: var(--amber); }
.kb-share-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 22px; }
@media (max-width: 980px) { .kb-share-cols { grid-template-columns: 1fr; } }
.kb-share-head { display: flex; align-items: center; gap: 10px; font-size: 13px; font-weight: 600; padding-bottom: 8px; border-bottom: 1px solid var(--line-soft); }
.kb-share-list { max-height: 320px; overflow: auto; }
.kb-share-row { display: flex; align-items: center; gap: 10px; justify-content: space-between; padding: 8px 0; border-bottom: 1px dotted var(--line-soft); font-size: 12.5px; }
.kb-pool-item { padding: 10px 0; border-bottom: 1px dotted var(--line-soft); }
.kb-pool-head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-size: 13px; }
.kb-redact { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.kb-redact-col h4 { margin: 0 0 6px; font-size: 12px; color: var(--muted); font-weight: 600; }
.kb-redact-text { background: #fbfaf7; border: 1px solid var(--line-soft); border-radius: 10px; padding: 12px; font-size: 12.5px; line-height: 1.7; min-height: 90px; white-space: pre-wrap; }
.kb-warn { margin-top: 12px; padding: 9px 12px; border-radius: 9px; background: var(--amber-bg); color: var(--amber); font-size: 12.5px; }
.kb-block { margin-top: 12px; padding: 9px 12px; border-radius: 9px; background: var(--red-bg); color: var(--red); font-size: 12.5px; }
.bill-foot { display: flex; justify-content: space-between; margin-top: 22px; font-size: 12.5px; color: var(--muted); }


.input, .textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: #fbfaf7;
  padding: 0 12px;
  height: 40px;
  font-family: inherit;
  font-size: 13.5px;
  color: var(--text);
  outline: none;
  transition: border-color 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}
.textarea { height: auto; min-height: 76px; padding: 10px 12px; resize: vertical; line-height: 1.5; }
.input:focus, .textarea:focus { border-color: #b9ab92; box-shadow: 0 0 0 3px rgba(216,162,74,.12); background: #fff; }
.input:disabled { background: #f2efe8; color: var(--muted); }
.input[readonly] { background: #f6f3ec; color: var(--muted); }

.input-group { display: flex; align-items: center; gap: 8px; }
.input-group .input { flex: 1; }
.input-group .unit { font-size: 12px; color: var(--faint); flex: none; }

.form-section { margin-top: 22px; }
.form-section:first-child { margin-top: 0; }
.form-section-title {
  font-size: 12px; letter-spacing: 0.1em; color: var(--faint);
  margin-bottom: 12px; padding-bottom: 8px;
  border-bottom: 1px dashed var(--line);
}

.total-preview {
  margin-top: 18px;
  background: #f8f5ee;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 14px 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.total-preview .l { font-size: 12.5px; color: var(--muted); }
.total-preview .v { font-size: 22px; font-weight: 600; font-variant-numeric: tabular-nums; }
.total-preview .v small { font-size: 12px; color: var(--muted); font-weight: 400; margin-left: 4px; }

.form-note {
  margin-top: 14px;
  font-size: 12px;
  line-height: 1.6;
  color: var(--faint);
  background: #fbfaf6;
  border-left: 3px solid #e3d7bd;
  padding: 9px 12px;
  border-radius: 0 8px 8px 0;
}

/* 地址卡 */
.addr-list { display: flex; flex-direction: column; gap: 10px; margin-bottom: 20px; }
.addr-card {
  border: 1px solid var(--line);
  border-radius: 11px;
  padding: 12px 15px;
  background: #fbfaf7;
  display: flex;
  align-items: flex-start;
  gap: 12px;
}
.addr-card .main { flex: 1; min-width: 0; }
.addr-card .tag { font-size: 11px; color: var(--blue); background: var(--blue-bg); border-radius: 5px; padding: 1px 7px; margin-right: 7px; }
.addr-card .name { font-weight: 600; font-size: 13px; }
.addr-card .line { font-size: 12.5px; color: var(--muted); margin-top: 4px; }
.addr-card .meta { font-size: 11.5px; color: var(--faint); margin-top: 3px; }

/* 抽屉内容 */
.drawer-head {
  padding: 22px 26px 18px;
  border-bottom: 1px solid var(--line-soft);
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}
.drawer-head .no { font-size: 21px; font-weight: 600; letter-spacing: 0.01em; font-family: "SFMono-Regular", Consolas, monospace; }
.drawer-head .meta { font-size: 12.5px; color: var(--muted); margin-top: 5px; display: flex; gap: 14px; flex-wrap: wrap; }
.drawer-title-row { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }

.stat-row {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 22px;
}
.stat-box { background: #faf8f3; border: 1px solid var(--line-soft); border-radius: 11px; padding: 12px 14px; }
.stat-box .l { font-size: 11.5px; color: var(--faint); }
.stat-box .v { font-size: 18px; font-weight: 600; margin-top: 2px; font-variant-numeric: tabular-nums; }
.stat-box .v small { font-size: 11px; color: var(--muted); font-weight: 400; }

.detail-section { margin-top: 24px; }
.detail-section-title {
  display: flex; align-items: center; justify-content: space-between;
  font-size: 13px; font-weight: 600; margin-bottom: 10px;
  padding-bottom: 8px; border-bottom: 1px solid var(--line-soft);
}
.detail-section-title .sub { font-size: 11.5px; color: var(--faint); font-weight: 400; }

.detail-note {
  background: var(--blue-bg); color: var(--blue);
  border-radius: 9px; padding: 10px 14px; font-size: 12.5px; margin-bottom: 18px;
}

.mini-table td, .mini-table th { padding: 9px 11px; font-size: 12.5px; }

/* ---------------------------------------------------------------- Toast */

.toast-wrap {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 100;
  display: flex;
  flex-direction: column;
  gap: 10px;
  align-items: flex-end;
  pointer-events: none;
}
.toast {
  background: var(--side);
  color: #f2efe6;
  padding: 11px 18px;
  border-radius: 10px;
  font-size: 13px;
  box-shadow: 0 12px 34px rgba(8,18,14,.25);
  animation: toastIn 0.25s ease both;
  max-width: 420px;
}
.toast.error { background: #8c342b; }
.toast.ok { background: #1f5c46; }
@keyframes toastIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

/* ---------------------------------------------------------------- 响应式 */

@media (max-width: 1180px) {
  .kpi-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .dash-grid { grid-template-columns: 1fr; }
  .dash-grid .span-2, .dash-grid .span-3 { grid-column: span 1; }
  .stat-row { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 900px) {
  .sidebar { transform: translateX(-100%); }
  .sidebar.open { transform: none; }
  .topbar { left: 0; padding: 0 18px; }
  .nav-toggle { display: flex; }
  .main { margin-left: 0; }
  .main-inner { padding: 22px 18px 60px; }
  .top-right .today, .top-right .live { display: none; }
  .page-head h1 { font-size: 21px; }
  .form-grid { grid-template-columns: 1fr; }
  .toast-wrap { right: 14px; bottom: 14px; left: 14px; align-items: stretch; }
}

@media (max-width: 560px) {
  .kpi-grid { grid-template-columns: 1fr; }
  .kpi-value { font-size: 25px; }
  .toolbar { gap: 9px; }
  .search { max-width: none; }
  .select { flex: 1; }
  .stat-row { grid-template-columns: 1fr; }
}

/* ---------------------------------------------------------------- 核算单价 */

.overlay.calc { z-index: 90; }
.calc-modal { width: min(1040px, 96vw); }

.calc-tabs { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 18px; border-bottom: 1px solid var(--line-soft); padding-bottom: 12px; }
.calc-tab {
  border: 1px solid var(--line); background: #fbfaf7; color: var(--muted);
  border-radius: 9px; padding: 8px 14px; font-size: 13px; cursor: pointer; font-family: inherit;
}
.calc-tab.on { background: var(--side); border-color: var(--side); color: #fff; }

.calc-table-wrap { width: 100%; overflow-x: auto; }
.calc-table { width: 100%; border-collapse: collapse; font-size: 12.5px; }
.calc-table th {
  background: #f7f4ed; color: var(--muted); font-weight: 600;
  padding: 7px 8px; text-align: right; white-space: nowrap;
  border-bottom: 1px solid var(--line);
}
.calc-table th:first-child, .calc-table td:first-child { text-align: left; }
.calc-table td {
  border-bottom: 1px solid var(--line-soft);
  padding: 5px 8px; text-align: right; white-space: nowrap;
}
.calc-table tbody tr:hover td { background: #fcfbf7; }
.calc-table .input { height: 32px; padding: 0 8px; font-size: 12.5px; border-radius: 7px; min-width: 62px; }
.calc-table td .input[type="text"] { min-width: 92px; }

.calc-prod { border: 1px solid var(--line); border-radius: 12px; padding: 14px; margin-bottom: 14px; background: #fbfaf7; }
.calc-prod-head { display: flex; align-items: center; gap: 10px; font-size: 13.5px; margin-bottom: 10px; }
.calc-prod-head .input { max-width: 360px; height: 34px; }

.calc-result { margin-top: 24px; border-top: 2px solid var(--line); padding-top: 18px; }
.calc-summary { display: flex; justify-content: space-between; gap: 20px; flex-wrap: wrap; align-items: flex-end; margin-bottom: 14px; }
.calc-label { font-size: 12px; color: var(--muted); }
.calc-big { font-size: 30px; font-weight: 700; letter-spacing: -0.02em; }
.calc-big small { font-size: 12px; color: var(--muted); font-weight: 400; margin-left: 4px; }
.calc-kpis { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; flex: 1; min-width: 340px; }
.calc-kpi { background: #f8f5ee; border: 1px solid var(--line); border-radius: 10px; padding: 9px 12px; }
.calc-kpi .l { font-size: 11.5px; color: var(--muted); }
.calc-kpi .v { font-size: 14px; font-weight: 600; margin-top: 3px; font-variant-numeric: tabular-nums; }
.calc-lines { display: flex; flex-wrap: wrap; gap: 8px 18px; margin-top: 12px; font-size: 12.5px; color: var(--muted); }
.calc-lines b { color: var(--text); }
.calc-actions { display: flex; justify-content: flex-end; margin-top: 14px; }
.calc-empty { padding: 26px; text-align: center; color: var(--faint); font-size: 13px; background: #fbfaf7; border: 1px dashed var(--line); border-radius: 12px; }
.calc-freight { background: #f0f7f3; border: 1px solid #d8e6dd; border-radius: 10px; padding: 10px 14px; font-size: 12.5px; color: var(--muted); margin-bottom: 16px; }
.calc-prod-result { border-top: 1px dashed var(--line); padding-top: 18px; margin-top: 18px; }
.calc-prod-result:first-child { border-top: 0; padding-top: 0; margin-top: 0; }

/* AI 文字核算 */
.ai-panel { display: flex; flex-direction: column; gap: 12px; }
.ai-textarea { min-height: 150px; font-size: 13px; font-family: inherit; }
.ai-quick { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.ai-state { font-size: 12px; color: var(--muted); }
.ai-state.ok { color: var(--green); }
.ai-state.warn { color: var(--amber); }
.ai-settings { border: 1px solid var(--line); background: #fbfaf7; border-radius: 12px; padding: 14px; }
.ai-settings-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 10px; }
.ai-chat { display: flex; flex-direction: column; gap: 8px; max-height: 220px; overflow: auto; padding: 4px 0; }
.ai-msg { display: flex; gap: 8px; font-size: 12.5px; line-height: 1.55; }
.ai-msg-label { flex: none; width: 28px; color: var(--faint); font-size: 11.5px; padding-top: 4px; }
.ai-msg-text { background: #f6f3ec; border-radius: 10px; padding: 7px 11px; max-width: 92%; }
.ai-msg.user .ai-msg-text { background: #e9f2ed; }
.ai-follow { display: flex; gap: 8px; }
.ai-follow .input { flex: 1; }
.ai-summary { margin-bottom: 16px; }
.ai-summary-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.ai-badge { font-size: 11.5px; padding: 2px 8px; border-radius: 999px; background: #f1ece2; color: var(--amber); }
.ai-badge.ai { background: var(--green-bg); color: var(--green); }
.ai-type { font-weight: 600; font-size: 13.5px; }
.ai-note { margin-top: 8px; font-size: 12px; color: var(--amber); }
.ai-questions { margin-top: 10px; border: 1px solid #f0e0c2; background: var(--amber-bg); border-radius: 10px; padding: 10px 12px; }
.ai-q-title { font-size: 12px; color: var(--amber); font-weight: 600; margin-bottom: 4px; }
.ai-questions ul { margin: 0; padding-left: 18px; font-size: 12.5px; color: var(--text); line-height: 1.6; }
.ai-actions { display: flex; justify-content: flex-end; margin-top: 12px; }

@media (max-width: 760px) {
  .calc-kpis { grid-template-columns: 1fr; min-width: 0; }
  .calc-big { font-size: 24px; }
}

/* ---------------------------------------------------------------- 演示数据 / 生产进度 */

.demo-chip {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 11.5px; line-height: 1; padding: 5px 9px;
  border-radius: 999px; background: #fff3dc; color: #8a5b12;
  border: 1px solid #f0d9ae; font-weight: 500; white-space: nowrap;
}
.demo-chip i { width: 6px; height: 6px; border-radius: 50%; background: #d79a2b; }

.db-state.demo { color: rgba(255, 226, 170, 0.9); }
.db-state.demo i { background: #e0ae55; animation: none; }

.db-banner.demo { background: #fff8e8; border-color: #ecd9ad; color: #7a5413; }
.db-banner.demo svg { color: #b0731a; }

.prog { display: flex; align-items: center; gap: 8px; min-width: 104px; }
.prog-track { flex: 1; height: 6px; border-radius: 3px; background: #ece6d9; overflow: hidden; }
.prog-fill { display: block; height: 100%; border-radius: 3px; transition: width .3s ease; }
.prog-fill.gray { background: #b9b3a6; }
.prog-fill.blue { background: #5b93ad; }
.prog-fill.amber { background: #d69c3f; }
.prog-fill.green { background: #3f8f6b; }
.prog-val { font-size: 11.5px; color: var(--muted); font-variant-numeric: tabular-nums; width: 34px; text-align: right; }

/* ---------------------------------------------------------------- 财务模块 */

.fin-tabs {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 5px;
  margin-bottom: 18px;
  background: #f3eee4;
  border: 1px solid var(--line);
  border-radius: 12px;
}
.fin-tabs-line { margin-bottom: 10px; }
.fin-tabs-label { font-size: 11.5px; color: var(--faint); padding: 0 8px 0 6px; letter-spacing: 0.04em; }
.fin-tab {
  height: 34px;
  padding: 0 20px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  font-family: inherit;
  font-size: 13px;
  color: var(--muted);
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease;
}
.fin-tab:hover { color: var(--text); }
.fin-tab.active {
  background: #fff;
  color: var(--text);
  font-weight: 600;
  box-shadow: 0 1px 3px rgba(23, 36, 29, 0.10);
}

.fin-stack { display: flex; flex-direction: column; gap: 16px; }
.fin-stack .summary-strip { margin-bottom: 0; }

.fin-stack .panel-head { flex-wrap: wrap; }
.fin-head-text { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.fin-head-text .sub { line-height: 1.5; }

.fin-head-tools { display: flex; align-items: center; gap: 8px; flex: none; }

.fin-filter { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 0 20px 18px; }
.fin-filter .label { font-size: 12.5px; color: var(--faint); }
.fin-filter .spacer { flex: 1; }

.fin-note { padding: 0 20px 18px; font-size: 12.5px; color: var(--muted); line-height: 1.95; }
.fin-note b { color: var(--text); font-weight: 600; }

.fin-table tfoot td { background: #f8f5ee; border-top: 1px solid var(--line); font-weight: 600; }

@media (max-width: 720px) {
  .fin-tabs { display: flex; width: 100%; overflow-x: auto; }
  .fin-tab { flex: 1 0 auto; padding: 0 14px; }
  .fin-head-tools { width: 100%; }
}

/* ---------------------------------------------------------------- 纸种价格 */

.pp-group + .pp-group { border-top: 1px solid var(--line-soft); }
.pp-group-head {
  display: flex;
  align-items: baseline;
  gap: 10px;
  flex-wrap: wrap;
  padding: 14px 20px 10px;
}
.pp-group-head b { font-size: 13px; font-weight: 600; color: var(--text); }
.pp-group-head span { font-size: 12px; color: var(--faint); }


/* 知识库页签与分类 */
.kn-tabs { display: flex; flex-wrap: wrap; gap: 6px; margin: 16px 0 12px; padding: 4px; background: #f4f1ea; border-radius: 12px; }
.kn-tab { border: 1px solid transparent; background: transparent; color: var(--muted); font-size: 13px; padding: 7px 14px; border-radius: 9px; cursor: pointer; display: inline-flex; align-items: center; gap: 6px; transition: all .15s; }
.kn-tab:hover { color: var(--text); background: #fff; }
.kn-tab.on { background: #fff; color: var(--text); border-color: var(--line); font-weight: 600; box-shadow: 0 1px 3px rgba(0,0,0,.05); }
.kn-badge { display: inline-block; min-width: 18px; padding: 0 5px; line-height: 17px; text-align: center; font-size: 11px; font-weight: 600; border-radius: 999px; background: var(--gray-bg); color: var(--gray); }
.kn-tab.on .kn-badge { background: var(--blue-bg, #e8eefb); color: var(--blue, #3559a8); }
.kn-panel { margin: 0; }
.kb-cats { display: flex; flex-wrap: wrap; gap: 8px; margin: 4px 0 12px; }
.kb-cat { border: 1px solid var(--line); background: #fff; color: var(--muted); font-size: 12.5px; padding: 5px 12px; border-radius: 999px; cursor: pointer; display: inline-flex; align-items: center; gap: 6px; }
.kb-cat:hover { border-color: var(--text); color: var(--text); }
.kb-cat.on { background: var(--text, #1f1f1f); border-color: var(--text, #1f1f1f); color: #fff; }
.kb-cat b { font-weight: 600; font-variant-numeric: tabular-nums; }

/* 智能体接入 */
.mcp-row { display: flex; align-items: center; gap: 14px; padding: 11px 0; border-bottom: 1px dashed var(--line); flex-wrap: wrap; }
.mcp-row:last-of-type { border-bottom: 0; }
.mcp-row > span { width: 80px; flex: 0 0 80px; font-size: 12.5px; color: var(--faint); }
.mcp-row > b { font-size: 13px; font-weight: 600; }
.mcp-copyline { display: flex; align-items: center; gap: 8px; flex: 1; min-width: 240px; flex-wrap: wrap; }
.mcp-copyline code { background: #f6f4ef; border: 1px solid var(--line); border-radius: 7px; padding: 5px 10px; font-size: 12.5px; word-break: break-all; }
.mcp-tip { margin-top: 12px; padding: 9px 12px; border-radius: 9px; background: #fbf7ee; border: 1px solid #efe3c9; color: #7a5a1e; font-size: 12.5px; line-height: 1.7; }
.mcp-tip code, .mcp-steps code { background: rgba(0,0,0,.05); padding: 1px 5px; border-radius: 4px; font-size: 12px; }
.mcp-steps { margin: 4px 0 0; padding-left: 20px; color: var(--muted); font-size: 13px; line-height: 1.9; }
.mcp-steps li { margin-bottom: 4px; }
.mcp-test { display: flex; flex-direction: column; gap: 10px; }
.mcp-test .select { max-width: 320px; }
.mcp-actions { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.mcp-hint { font-size: 12px; color: var(--faint); }
.mcp-out { margin: 0; padding: 14px; border-radius: 10px; background: #1f2328; color: #d7e0ea; font-size: 12.5px; line-height: 1.7; max-height: 340px; overflow: auto; white-space: pre-wrap; word-break: break-all; }
.kb-panel-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
.kb-panel-head h3 { margin: 0 0 3px; font-size: 15px; }
.kb-panel-head p { margin: 0; font-size: 12.5px; color: var(--faint); }
