/* ============================================================
   设计系统 - 所有组件类名以 ds- 为前缀
   新代码必须用设计系统类名，禁止写 inline style
   ============================================================ */

:root {
  --primary: #1B2A4A;
  --accent: #E63946;
  --success: #2E7D32;
  --warning: #FF9800;
  --danger: #c0392b;
  --bg: #f5f6fa;
  --card-bg: #fff;
  --text: #333;
  --muted: #888;
  --border: #e8e8e8;
  --hover: #f8f9fa;
  --radius: 8px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

body {
  font-family: -apple-system, "PingFang SC", "Microsoft YaHei", sans-serif;
  background: var(--bg);
  color: var(--text);
  font-size: 14px;
  line-height: 1.6;
}

/* ---------- 导航栏 ---------- */
.ds-navbar {
  display: flex;
  align-items: center;
  background: var(--primary);
  color: #fff;
  padding: 0 1.5em;
  height: 56px;
  position: sticky;
  top: 0;
  z-index: 100;
}
.ds-navbar-brand { font-size: 18px; font-weight: 700; margin-right: 2em; }
.ds-navbar-menu { display: flex; gap: .5em; flex: 1; }
.ds-navbar-menu a {
  color: rgba(255,255,255,0.7);
  text-decoration: none;
  padding: .5em 1em;
  border-radius: var(--radius);
  transition: all .2s;
}
.ds-navbar-menu a:hover,
.ds-navbar-menu a.active { color: #fff; background: rgba(255,255,255,0.15); }
.ds-navbar-user { font-size: 13px; color: rgba(255,255,255,0.8); }

/* ---------- 主内容 ---------- */
.ds-main { padding: 1.5em; max-width: 1400px; margin: 0 auto; }

/* ---------- 卡片 ---------- */
.ds-card {
  background: var(--card-bg);
  border-radius: var(--radius);
  padding: 1.2em 1.5em;
  box-shadow: 0 1px 3px rgba(0,0,0,0.08);
  margin-bottom: 1em;
}
.ds-card-title {
  font-size: 16px;
  font-weight: 600;
  margin-bottom: .8em;
  padding-bottom: .5em;
  border-bottom: 1px solid var(--border);
}

/* ---------- 按钮 ---------- */
.ds-btn {
  display: inline-flex;
  align-items: center;
  gap: .4em;
  padding: .5em 1.2em;
  border: none;
  border-radius: var(--radius);
  cursor: pointer;
  font-size: 14px;
  transition: all .2s;
}
.ds-btn-primary { background: var(--primary); color: #fff; }
.ds-btn-primary:hover { opacity: .85; }
.ds-btn-danger { background: var(--accent); color: #fff; }
.ds-btn-outline { background: transparent; border: 1px solid var(--border); color: var(--text); }

/* ---------- 表格 ---------- */
.ds-table {
  width: 100%;
  border-collapse: collapse;
  table-layout: fixed;
}
.ds-table th {
  position: sticky;
  top: 0;
  z-index: 2;
  background: var(--hover);
  text-align: left;
  padding: .6em .8em;
  font-weight: 600;
  font-size: 13px;
  border-bottom: 2px solid var(--border);
}
.ds-table td {
  padding: .5em .8em;
  border-bottom: 1px solid var(--border);
  font-size: 13px;
}
.ds-table tr:hover { background: var(--hover); }

/* ---------- 拖拽把手 ---------- */
.col-resize-handle {
  position: absolute;
  right: 0;
  top: 0;
  width: 4px;
  height: 100%;
  cursor: col-resize;
  background: rgba(0,0,0,0.08);
}

/* ---------- 输入框清空按钮 ---------- */
.inp-clear-wrap { position: relative; display: inline-flex; align-items: center; }
.inp-clear-btn {
  position: absolute;
  right: 8px;
  background: none;
  border: none;
  color: #aaa;
  cursor: pointer;
  font-size: 16px;
  display: none;
}
.inp-clear-wrap input:not(:placeholder-shown) + .inp-clear-btn { display: block; }

/* ---------- 徽章 ---------- */
.ds-badge {
  display: inline-block;
  padding: .15em .6em;
  border-radius: 12px;
  font-size: 12px;
  font-weight: 600;
}
.ds-badge-success { background: #e8f5e9; color: var(--success); }
.ds-badge-warning { background: #fff3e0; color: #e65100; }
.ds-badge-danger { background: #fef2f2; color: var(--danger); }

/* ---------- 提示 ---------- */
.ds-toast {
  position: fixed;
  top: 72px;
  right: 1.5em;
  background: var(--primary);
  color: #fff;
  padding: .8em 1.5em;
  border-radius: var(--radius);
  z-index: 9999;
  animation: slideIn .3s ease;
}
@keyframes slideIn { from { transform: translateX(100%); opacity: 0; } }

/* ---------- 布局工具类 ---------- */
.flex { display: flex; }
.flex-col { flex-direction: column; }
.flex-wrap { flex-wrap: wrap; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.gap-sm { gap: .5em; }
.gap-md { gap: 1em; }
.gap-lg { gap: 1.5em; }
.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1em; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1em; }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1em; }

/* ---------- 机器人通知演示（notify_demo，命名空间 ds-nd-）---------- */
.ds-nd-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); gap: 1.2em; }
.ds-nd-card {
  background: var(--card-bg);
  border-radius: var(--radius);
  border: 1px solid var(--border);
  border-left: 4px solid var(--muted);
  box-shadow: 0 1px 3px rgba(0,0,0,0.08);
  padding: 1.1em 1.3em;
  display: flex;
  flex-direction: column;
}
.ds-nd-card.lv-info { border-left-color: #1E88E5; }
.ds-nd-card.lv-warning { border-left-color: var(--warning); }
.ds-nd-card.lv-critical { border-left-color: var(--danger); }
.ds-nd-head { display: flex; align-items: center; gap: .5em; margin-bottom: .5em; }
.ds-nd-icon { font-size: 22px; }
.ds-nd-name { font-size: 16px; font-weight: 600; flex: 1; }
.ds-nd-desc { color: var(--muted); font-size: 13px; margin-bottom: .9em; }
.ds-nd-label { font-size: 12px; font-weight: 600; color: var(--muted); margin: .2em 0 .4em; }
.ds-nd-biz {
  background: var(--hover);
  border-radius: 6px;
  padding: .6em .8em;
  font-size: 12px;
  color: #555;
  margin-bottom: .8em;
}
.ds-nd-biz div { padding: .1em 0; }
.ds-nd-preview {
  background: #f0f4fb;
  border: 1px dashed #c5d4ec;
  border-radius: 6px;
  padding: .7em .9em;
  font-size: 12.5px;
  line-height: 1.7;
  white-space: pre-wrap;
  color: #333;
  max-height: 220px;
  overflow-y: auto;
  margin-bottom: 1em;
}
.ds-nd-preview strong { color: var(--primary); }
.ds-nd-foot { margin-top: auto; display: flex; align-items: center; gap: .6em; }
.ds-nd-btn { flex: 1; justify-content: center; }
.ds-badge-info { background: #e3f2fd; color: #1565c0; }

/* ---------- 识别图片（vision，命名空间 ds-vis-）---------- */
.ds-vis-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1em; align-items: start; }
@media (max-width: 900px) { .ds-vis-grid { grid-template-columns: 1fr; } }
.ds-vis-col { display: flex; flex-direction: column; }
.ds-vis-label { font-size: 13px; font-weight: 600; color: var(--muted); margin-bottom: .6em; }
.ds-vis-drop {
  border: 2px dashed var(--border);
  border-radius: var(--radius);
  padding: 2.2em 1em;
  text-align: center;
  color: var(--muted);
  cursor: pointer;
  transition: border-color .2s, background .2s;
}
.ds-vis-drop:hover, .ds-vis-drop.is-over { border-color: var(--primary); background: var(--hover); }
.ds-vis-drop-icon { font-size: 30px; margin-bottom: .3em; }
.ds-vis-drop-hint { font-size: 12px; color: #b0b0b0; margin-top: .4em; }
.ds-vis-preview { margin-top: 1em; text-align: center; }
.ds-vis-img { max-width: 100%; max-height: 340px; border-radius: var(--radius); border: 1px solid var(--border); }
.ds-vis-file {
  display: flex; align-items: center; gap: .7em;
  background: var(--hover); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 1em 1.2em; text-align: left;
}
.ds-vis-file-icon { font-size: 30px; }
.ds-vis-file-name { flex: 1; font-weight: 600; word-break: break-all; }
.ds-vis-file-size { font-size: 12px; color: var(--muted); margin-top: .4em; }
.ds-vis-actions { display: flex; gap: .6em; margin-top: 1em; }
.ds-vis-result-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: .6em; }
.ds-vis-result-tools { display: flex; align-items: center; gap: .8em; }
.ds-vis-count { font-size: 12px; color: var(--muted); }
.ds-vis-output {
  width: 100%; min-height: 340px; resize: vertical;
  border: 1px solid var(--border); border-radius: var(--radius);
  padding: .8em 1em; font-size: 13px; line-height: 1.7;
  font-family: -apple-system, "PingFang SC", "Microsoft YaHei", sans-serif;
  color: var(--text); background: var(--hover); white-space: pre-wrap;
}
.ds-vis-output:focus { outline: none; border-color: var(--primary); background: #fff; }

/* ---------- 全链路库存（inventory_total，命名空间 ds-inv-）---------- */
.ds-inv-hero {
  display: flex; align-items: flex-end; justify-content: space-between; gap: 2em;
  padding: 2.2em 2.4em; margin-bottom: 1em; overflow: hidden;
  color: #fff; background: #14213d; border-radius: 14px;
  box-shadow: 0 12px 30px rgba(20,33,61,.16);
}
.ds-inv-eyebrow { color: #9fb5d7; font-size: 11px; font-weight: 700; letter-spacing: .18em; }
.ds-inv-hero h1 { margin: .12em 0; font-size: 34px; line-height: 1.2; letter-spacing: -.04em; }
.ds-inv-hero p { color: #cad5e7; font-size: 13px; }
.ds-inv-dates { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: .55em; max-width: 520px; }
.ds-inv-dates span { padding: .48em .72em; border: 1px solid rgba(255,255,255,.16); border-radius: 6px; color: #b9c6da; font-size: 12px; }
.ds-inv-dates strong { margin-left: .35em; color: #fff; }
.ds-inv-section { padding: 1.35em 1.5em; margin-bottom: 1em; background: #fff; border: 1px solid #e5e9f0; border-radius: 10px; }
.ds-inv-section-head { display: flex; align-items: center; justify-content: space-between; gap: 1em; margin-bottom: 1em; }
.ds-inv-section-head > div { display: flex; align-items: center; gap: .65em; }
.ds-inv-section-head h2 { font-size: 17px; color: #14213d; }
.ds-inv-index { color: #8190a8; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 11px; letter-spacing: .08em; }
.ds-inv-caption { color: #7d8798; font-size: 12px; }
.ds-inv-chain { display: grid; grid-template-columns: 1fr 32px 1fr 32px 1fr; align-items: stretch; margin-bottom: 1em; }
.ds-inv-chain-cell { display: grid; grid-template-columns: auto 1fr auto; align-items: baseline; gap: .7em; padding: .8em 1em; border-top: 3px solid currentColor; background: #f7f9fc; }
.ds-inv-chain-cell strong { justify-self: end; color: #14213d; font-size: 20px; }
.ds-inv-chain-cell > span:last-child { font-size: 12px; font-weight: 700; }
.ds-inv-chain-label { color: #4b5668; font-size: 12px; font-weight: 700; }
.ds-inv-arrow { display: flex; align-items: center; justify-content: center; color: #aab3c0; font-size: 17px; }
.ds-inv-metrics { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: .85em; }
.ds-inv-metric { position: relative; min-height: 118px; padding: 1em 1.05em; overflow: hidden; border: 1px solid #e4e8ee; border-radius: 8px; background: #fff; }
.ds-inv-metric::after { content: ''; position: absolute; left: 0; top: 0; bottom: 0; width: 3px; background: currentColor; }
.ds-inv-metric-label { color: #6f7989; font-size: 12px; }
.ds-inv-metric-value { margin: .22em 0 .14em; color: #14213d; font-size: clamp(21px, 2vw, 28px); font-weight: 750; line-height: 1.25; letter-spacing: -.035em; }
.ds-inv-metric-note { color: #929aaa; font-size: 11px; }
.ds-inv-total { color: #14213d; }
.ds-inv-stock { color: #315d9e; }
.ds-inv-transit { color: #c7771a; }
.ds-inv-factory { color: #3d7a63; }
.ds-inv-note { margin-top: .9em; padding: .7em .85em; border-left: 3px solid #d68a2d; background: #fff8ed; color: #6d5b42; font-size: 12px; }
.ds-inv-note-light { margin: 0 0 .8em; border-left-color: #8fa3bf; background: #f5f7fa; color: #667184; }
.ds-inv-table-wrap { overflow: auto; max-height: 420px; border: 1px solid #edf0f4; border-radius: 7px; }
.ds-inv-country-table { min-width: 760px; }
.ds-inv-item-wrap { max-height: 620px; }
.ds-inv-item-table { min-width: 1700px; }
.ds-inv-country-table th, .ds-inv-item-table th { background: #f4f6f9; color: #505b6c; }
.ds-inv-item-table th:nth-child(1) { width: 70px; }
.ds-inv-item-table th:nth-child(2) { width: 220px; }
.ds-inv-item-table th:nth-child(3), .ds-inv-item-table th:nth-child(4), .ds-inv-item-table th:nth-child(5) { width: 120px; }
.ds-inv-item-table th:nth-child(n+6):nth-child(-n+9) { width: 90px; }
.ds-inv-item-table th:nth-child(n+10) { width: 135px; }
.ds-inv-item-table td small { display: block; max-width: 210px; overflow: hidden; color: #929aaa; font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }
.ds-inv-num { text-align: right; font-variant-numeric: tabular-nums; }
.ds-inv-strong { color: #14213d; font-weight: 750; }
.ds-inv-money { color: #315d9e; font-weight: 700; }
.ds-inv-country { display: inline-block; min-width: 30px; padding: .1em .45em; border: 1px solid #d9e0ea; border-radius: 4px; color: #33445d; text-align: center; font-size: 11px; font-weight: 700; }
.ds-inv-filters { display: grid; grid-template-columns: minmax(180px, 1.35fr) repeat(3, minmax(130px, 1fr)) auto auto; gap: .65em; margin-bottom: .85em; }
.ds-inv-input, .ds-inv-select { min-width: 0; height: 36px; padding: 0 .75em; border: 1px solid #dfe4eb; border-radius: 7px; background: #fff; color: #333; font: inherit; font-size: 13px; }
.ds-inv-filters .inp-clear-wrap, .ds-inv-filters .inp-clear-wrap .ds-inv-input { width: 100%; }
.ds-inv-input:focus, .ds-inv-select:focus { outline: 2px solid rgba(49,93,158,.16); border-color: #315d9e; }
.ds-inv-loading { padding: 5em 1em; border: 1px solid #e5e9f0; border-radius: 10px; background: #fff; color: #7d8798; text-align: center; }
.ds-inv-error { color: #a63b3b; }
.ds-inv-empty { padding: 2.5em !important; color: #929aaa; text-align: center !important; }
.ds-inv-target { padding: .25em .65em; border: 1px solid #a9d3bf; border-radius: 99px; color: #2c6c55; background: #f1faf6; font-size: 11px; font-weight: 750; }
.ds-inv-coverage-section { border-color: #d9e5df; }
.ds-inv-coverage-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .85em; }
.ds-inv-coverage { padding: 1em; border: 1px solid #e1e6ec; border-radius: 8px; background: #fbfcfd; }
.ds-inv-coverage.has-gap { background: #fffdf8; }
.ds-inv-coverage-head, .ds-inv-coverage-foot { display: flex; align-items: center; justify-content: space-between; gap: 1em; }
.ds-inv-coverage-head span { color: #536071; font-size: 12px; font-weight: 700; }
.ds-inv-coverage-head strong { color: currentColor; font-size: 24px; letter-spacing: -.04em; }
.ds-inv-coverage-track { height: 7px; margin: .75em 0 .55em; overflow: hidden; border-radius: 99px; background: #e8ecf1; }
.ds-inv-coverage-track span { display: block; width: 0; height: 100%; border-radius: inherit; background: currentColor; transition: width .45s ease; }
.ds-inv-coverage-foot { color: #8a94a3; font-size: 10.5px; }
.ds-inv-chart-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .85em; }
.ds-inv-chart-card { min-width: 0; padding: 1em; border: 1px solid #e8ebf0; border-radius: 8px; background: #fbfcfd; }
.ds-inv-chart-card h3 { margin-bottom: .5em; color: #536071; font-size: 12px; }
.ds-inv-chart-canvas { position: relative; height: 280px; }

/* ---------- 月度到货预测（inventory_arrival，命名空间 ds-arr-）---------- */
.ds-arr-hero {
  position: relative; display: flex; align-items: flex-end; justify-content: space-between; gap: 2em;
  min-height: 190px; padding: 2.3em 2.5em; margin-bottom: 1em; overflow: hidden;
  border-radius: 14px; color: #fff; background: #17243e;
  box-shadow: 0 14px 32px rgba(23,36,62,.16);
}
.ds-arr-hero::after {
  content: ''; position: absolute; right: -95px; top: -115px; width: 330px; height: 330px;
  border: 48px solid rgba(214,138,45,.18); border-radius: 50%;
}
.ds-arr-hero > * { position: relative; z-index: 1; }
.ds-arr-kicker { color: #e4a857; font: 700 11px/1.2 ui-monospace, SFMono-Regular, Menlo, monospace; letter-spacing: .18em; }
.ds-arr-hero h1 { margin: .18em 0 .25em; font-size: clamp(29px, 4vw, 42px); line-height: 1.1; letter-spacing: -.045em; }
.ds-arr-hero p { max-width: 650px; color: #c6d1e2; font-size: 13px; }
.ds-arr-hero-meta { display: grid; justify-items: end; gap: .45em; min-width: 260px; }
.ds-arr-hero-meta span { padding: .48em .75em; border: 1px solid rgba(255,255,255,.18); border-radius: 6px; color: #bcc9dc; font-size: 12px; }
.ds-arr-hero-meta strong { margin-left: .4em; color: #fff; }
.ds-arr-hero-meta small { color: #93a4bd; }
.ds-arr-filterbar { display: grid; grid-template-columns: repeat(3, minmax(150px, 1fr)) auto auto; gap: .65em; padding: .85em; margin-bottom: 1em; border: 1px solid #e4e8ee; border-radius: 10px; background: #fff; }
.ds-arr-metrics { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: .8em; margin-bottom: 1em; }
.ds-arr-metric { position: relative; min-height: 112px; padding: 1em; overflow: hidden; border: 1px solid #e2e6ec; border-radius: 9px; background: #fff; }
.ds-arr-metric::before { content: ''; position: absolute; inset: 0 auto 0 0; width: 3px; background: currentColor; }
.ds-arr-metric span { display: block; color: #657185; font-size: 12px; }
.ds-arr-metric strong { display: block; margin: .18em 0 .12em; color: #17243e; font-size: clamp(23px, 2.2vw, 31px); line-height: 1.25; letter-spacing: -.04em; }
.ds-arr-metric small { color: #929cab; font-size: 11px; }
.ds-arr-stock { color: #315d9e; } .ds-arr-transit { color: #d68a2d; }
.ds-arr-overdue { color: #c84b4b; background: #fffafa; } .ds-arr-abnormal { color: #985f9b; background: #fdf9fd; }
.ds-arr-factory { color: #779486; background: #f8fbf9; }
.ds-arr-pending { padding: .25em .7em; border: 1px dashed #94aa9f; border-radius: 99px; color: #627f71; background: #f4f9f6; font-size: 11px; font-weight: 700; }
.ds-arr-chart { height: 330px; margin-bottom: 1em; }
.ds-arr-months { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: .65em; }
.ds-arr-month-card { padding: .8em .9em; border: 1px solid #e4e8ee; border-top: 3px solid #8ea0b8; border-radius: 7px; background: #fbfcfd; }
.ds-arr-month-card.is-current { border-top-color: #315d9e; background: #f7f9fd; }
.ds-arr-month-card.is-overdue { border-top-color: #c84b4b; background: #fffafa; }
.ds-arr-month-card.is-future { border-top-color: #d68a2d; }
.ds-arr-month-head { display: flex; align-items: center; justify-content: space-between; gap: .6em; }
.ds-arr-month-head strong { color: #17243e; font-size: 13px; }
.ds-arr-month-head span { color: #8290a3; font-size: 10px; }
.ds-arr-month-total { margin: .18em 0; color: #17243e; font-size: 23px; font-weight: 760; letter-spacing: -.035em; }
.ds-arr-month-split { display: flex; flex-wrap: wrap; gap: .25em .65em; color: #7b8797; font-size: 10.5px; }
.ds-arr-overdue-note { margin-top: .5em; padding-top: .45em; border-top: 1px solid #f1d3d3; color: #b14343; font-size: 10.5px; font-weight: 700; }
.ds-arr-empty { padding: 2em; color: #929aaa; text-align: center; }
.ds-arr-callouts { display: grid; grid-template-columns: 1fr 1fr; gap: .75em; }
.ds-arr-callouts button { display: grid; gap: .25em; padding: 1em 1.1em; border: 1px solid #eadede; border-left: 4px solid #c84b4b; border-radius: 7px; background: #fffafa; color: #596474; text-align: left; cursor: pointer; }
.ds-arr-callouts button:last-child { border-color: #eadfeb; border-left-color: #985f9b; background: #fdfafd; }
.ds-arr-callouts button:hover { transform: translateY(-1px); box-shadow: 0 6px 16px rgba(23,36,62,.08); }
.ds-arr-callouts strong { color: #28364d; font-size: 13px; } .ds-arr-callouts span { font-size: 11.5px; }
.ds-arr-detail-filters { display: grid; grid-template-columns: minmax(200px, 1.35fr) repeat(4, minmax(125px, 1fr)) auto auto; gap: .6em; margin-bottom: .8em; }
.ds-arr-detail-wrap { max-height: 650px; }
.ds-arr-detail-table { min-width: 1900px; }
.ds-arr-detail-table th { position: sticky; top: 0; z-index: 2; background: #f3f5f8; }
.ds-arr-detail-table th:nth-child(6) { min-width: 210px; }
.ds-arr-detail-table td small { display: block; max-width: 210px; overflow: hidden; color: #929aaa; font-size: 10.5px; text-overflow: ellipsis; white-space: nowrap; }
.ds-arr-stage { display: inline-block; min-width: 34px; padding: .1em .45em; border: 1px solid #dce3ec; border-radius: 4px; color: #43536b; background: #f7f9fb; font-size: 11px; font-weight: 700; text-align: center; }
.ds-arr-status { display: inline-block; min-width: 48px; padding: .12em .48em; border-radius: 99px; font-size: 10.5px; font-weight: 700; text-align: center; }
.ds-arr-status.is-normal { color: #2d6e56; background: #edf8f2; }
.ds-arr-status.is-overdue { color: #a73d3d; background: #fcecec; }
.ds-arr-status.is-abnormal { color: #7b477e; background: #f6eaf7; }

/* ---------- 成本问题独立页（inventory_cost，命名空间 ds-cost-）---------- */
.ds-cost-hero { display: flex; align-items: flex-end; justify-content: space-between; gap: 2em; padding: 2em 2.3em; margin-bottom: 1em; border-radius: 14px; color: #fff; background: #20354c; }
.ds-cost-hero span { color: #9fb2c6; font: 700 11px/1 ui-monospace, SFMono-Regular, Menlo, monospace; letter-spacing: .16em; }
.ds-cost-hero h1 { margin: .18em 0; font-size: 34px; letter-spacing: -.04em; }
.ds-cost-hero p { color: #cad4df; font-size: 12px; } .ds-cost-hero > strong { color: #dfe7ef; font-size: 13px; }
.ds-cost-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .85em; margin-bottom: 1em; }
.ds-cost-card { padding: 1.1em; border: 1px solid #e1e6ec; border-radius: 9px; background: #fff; color: #315d9e; }
.ds-cost-card > div:first-child { display: flex; align-items: center; justify-content: space-between; gap: 1em; }
.ds-cost-card span { color: #596679; font-size: 12px; font-weight: 700; }
.ds-cost-card strong { color: currentColor; font-size: 27px; letter-spacing: -.04em; }
.ds-cost-track { height: 8px; margin: .7em 0 .55em; overflow: hidden; border-radius: 99px; background: #e7ebf0; }
.ds-cost-track i { display: block; width: 0; height: 100%; border-radius: inherit; background: currentColor; transition: width .4s ease; }
.ds-cost-card small { color: #8893a2; font-size: 10.5px; }
.ds-cost-transit { color: #c7771a; } .ds-cost-factory { color: #3d7a63; }

@media (max-width: 1100px) {
  .ds-arr-metrics { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .ds-arr-detail-filters { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 760px) {
  .ds-arr-hero { align-items: flex-start; flex-direction: column; padding: 1.6em; }
  .ds-arr-hero-meta { justify-items: start; min-width: 0; }
  .ds-arr-filterbar, .ds-arr-metrics, .ds-arr-callouts, .ds-cost-grid { grid-template-columns: 1fr; }
  .ds-arr-detail-filters { grid-template-columns: 1fr 1fr; }
  .ds-arr-chart { height: 270px; }
}
.ds-inv-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 1em; margin-bottom: .8em; }
.ds-inv-segmented { display: inline-flex; padding: 3px; border: 1px solid #dfe4eb; border-radius: 8px; background: #f4f6f9; }
.ds-inv-segmented button { padding: .4em .9em; border: 0; border-radius: 5px; color: #6f7989; background: transparent; cursor: pointer; font: inherit; font-size: 12px; }
.ds-inv-segmented button.is-active { color: #fff; background: #14213d; box-shadow: 0 1px 3px rgba(20,33,61,.22); }
.ds-inv-segmented button:focus-visible { outline: 2px solid #668cc4; outline-offset: 2px; }
.ds-inv-category-wrap { max-height: 560px; }
.ds-inv-category-table { min-width: 1450px; }
.ds-inv-category-table th { background: #f4f6f9; }
.ds-inv-category-table th:nth-child(1), .ds-inv-category-table th:nth-child(2) { width: 160px; }
.ds-inv-category-table th:nth-child(n+3):nth-child(-n+8) { width: 90px; }
.ds-inv-category-table th:nth-child(n+9) { width: 130px; }
.ds-inv-gap-section { border-color: #eadfcb; }
.ds-inv-gap-banner { display: flex; align-items: center; gap: .8em; margin-bottom: .85em; padding: .65em .8em; border: 1px solid #ead3aa; border-radius: 7px; background: #fff8ed; color: #755a32; font-size: 12px; }
.ds-inv-gap-banner strong { color: #9a5912; }
.ds-inv-gap-filters { grid-template-columns: minmax(180px, 1.3fr) repeat(3, minmax(130px, 1fr)) auto auto; }
.ds-inv-gap-wrap { max-height: 560px; }
.ds-inv-gap-table { min-width: 1220px; }
.ds-inv-gap-table th { background: #fbf6ed; }
.ds-inv-gap-table th:nth-child(1), .ds-inv-gap-table th:nth-child(2) { width: 72px; }
.ds-inv-gap-table th:nth-child(3) { width: 170px; }
.ds-inv-gap-table th:nth-child(4), .ds-inv-gap-table th:nth-child(5) { width: 140px; }
.ds-inv-gap-table th:nth-child(n+6):nth-child(-n+8) { width: 95px; }
.ds-inv-gap-table th:nth-child(9) { width: 270px; }
.ds-inv-gap-type { display: inline-block; padding: .08em .5em; border-radius: 99px; background: #fff1dc; color: #9a5912; font-size: 11px; font-weight: 700; }
.ds-inv-gap-number { color: #b45423; font-weight: 750; }

@media (max-width: 1050px) {
  .ds-inv-metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .ds-inv-filters { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .ds-inv-coverage-grid, .ds-inv-chart-grid { grid-template-columns: 1fr; }
}
@media (max-width: 680px) {
  .ds-main { padding: .8em; }
  .ds-inv-hero { display: block; padding: 1.5em; }
  .ds-inv-dates { justify-content: flex-start; margin-top: 1em; }
  .ds-inv-section { padding: 1.05em; }
  .ds-inv-section-head { align-items: flex-start; flex-direction: column; }
  .ds-inv-chain { grid-template-columns: 1fr; gap: .4em; }
  .ds-inv-arrow { transform: rotate(90deg); }
  .ds-inv-metrics, .ds-inv-filters { grid-template-columns: 1fr; }
  .ds-inv-toolbar, .ds-inv-gap-banner { align-items: stretch; flex-direction: column; }
  .ds-inv-segmented { width: 100%; }
  .ds-inv-segmented button { flex: 1; }
}

@media (prefers-reduced-motion: reduce) {
  .ds-inv-coverage-track span { transition: none; }
}
