:root {
  --bg: #f0f2f7;
  --ink: #323a4a;
  --muted: #6e7a90;
  --line: #e4e8f0;
  --card: #ffffff;
  --accent: #467fcf;
  --sidebar: #2a2e3f;
  --shadow: 0 1px 2px rgba(28, 39, 60, .04), 0 6px 18px rgba(62, 57, 107, .06);
  --pad-x: 20px;
  --pad-y: 16px;
}
*, *::before, *::after { box-sizing: border-box; }
body {
  margin: 0;
  font-family: "Poppins", "Segoe UI", system-ui, sans-serif;
  font-size: 13px;
  line-height: 1.4;
  color: var(--ink);
  background: var(--bg);
}
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
.app { display: flex; min-height: 100vh; align-items: stretch; }
.sidebar {
  width: 230px;
  background: var(--sidebar);
  color: #c5cbe0;
  padding: 12px 10px 10px;
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  position: sticky;
  top: 0;
  height: 100vh;
  border-right: 1px solid #232736;
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0 6px 8px;
  padding-bottom: 12px;
  border-bottom: 1px solid rgba(255, 255, 255, .08);
}
.brand-mark {
  width: 32px;
  height: 32px;
  border-radius: 6px;
  display: grid;
  place-items: center;
  font-size: .9rem;
  font-weight: 700;
  color: #fff;
  background: var(--accent);
}
.brand strong { display: block; color: #fff; font-size: .92rem; letter-spacing: -.01em; font-weight: 600; }
.brand small { color: #8b93ad; font-size: .66rem; letter-spacing: .08em; text-transform: uppercase; }
.sidebar nav { flex: 1; overflow: auto; padding: 8px 2px 8px; }
.nav-label {
  margin: 12px 10px 4px;
  font-size: .64rem;
  font-weight: 600;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: #8b93ad;
}
.sidebar nav a {
  display: flex;
  align-items: center;
  gap: 8px;
  color: #c5cbe0;
  padding: 7px 10px;
  border-radius: 4px;
  margin-bottom: 1px;
  font-weight: 500;
}
.sidebar nav a svg {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.sidebar nav a:hover { background: rgba(255, 255, 255, .06); color: #fff; text-decoration: none; }
.sidebar nav a.active {
  background: rgba(70, 127, 207, .22);
  color: #fff;
  box-shadow: inset 3px 0 0 #467fcf;
  text-decoration: none;
}
.side-user {
  margin-top: 8px;
  padding: 10px;
  border-radius: 6px;
  background: rgba(255, 255, 255, .04);
  border: 1px solid rgba(255, 255, 255, .06);
}
.side-user .who { display: flex; gap: 8px; align-items: center; min-width: 0; }
.avatar {
  width: 30px;
  height: 30px;
  border-radius: 6px;
  display: grid;
  place-items: center;
  font-size: .7rem;
  font-weight: 600;
  color: #fff;
  background: var(--accent);
  flex-shrink: 0;
}
.side-user strong { display: block; color: #fff; font-size: .78rem; font-weight: 600; }
.side-user .muted { display: block; color: #8b93ad; font-size: .72rem; word-break: break-word; }
.side-user form { margin: 8px 0 0; }
.side-user .btn {
  width: 100%;
  background: transparent;
  color: #c5cbe0;
  border: 1px solid rgba(255, 255, 255, .12);
}
.side-user .btn:hover { background: rgba(255, 255, 255, .08); color: #fff; filter: none; }
.main { flex: 1; min-width: 0; padding: var(--pad-y) var(--pad-x) 32px; background: var(--bg); }
.topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  background: #fff;
  margin: calc(var(--pad-y) * -1) calc(var(--pad-x) * -1) 14px;
  padding: 14px var(--pad-x);
  border-bottom: 1px solid var(--line);
}
.topbar h1 { letter-spacing: -.02em; font-weight: 600; font-size: 1.15rem !important; margin: 0 !important; color: var(--ink); }
.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 7px;
  padding: 12px 14px;
  margin-bottom: 12px;
  box-shadow: var(--shadow);
}
.card h2 { margin: 0 0 8px; font-size: .95rem; letter-spacing: -.01em; font-weight: 600; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
@media (max-width: 800px) {
  :root { --pad-x: 12px; --pad-y: 12px; }
  .app { flex-direction: column; }
  .sidebar { width: auto; height: auto; position: relative; }
  .sidebar nav { display: flex; flex-wrap: nowrap; gap: 4px; overflow-x: auto; padding-bottom: 4px; }
  .nav-label { display: none; }
  .sidebar nav > a, .sidebar nav .subnav { flex: 0 0 auto; }
  .side-user { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
  .side-user form { margin: 0; }
  .side-user .btn { width: auto; }
  .grid-2, .dash-split { grid-template-columns: 1fr; }
}
.field { margin-bottom: 10px; }
.field label { display: block; font-size: 0.72rem; color: var(--muted); margin-bottom: 3px; font-weight: 600; }
.field input, .field select, .field textarea {
  width: 100%;
  box-sizing: border-box;
  padding: 7px 10px;
  border: 1px solid #d5dbe6;
  border-radius: 4px;
  font: inherit;
  background: #fff;
  color: var(--ink);
}
.field input:focus, .field select:focus, .field textarea:focus,
table.rpt td input:focus, .line-grid input:focus, .line-grid select:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(70, 127, 207, .18);
}
.btn {
  display: inline-block;
  border: 0;
  border-radius: 4px;
  padding: 7px 12px;
  font: inherit;
  font-weight: 600;
  cursor: pointer;
  background: var(--accent);
  color: #fff;
  transition: background .12s ease;
}
.btn:hover { background: #3a6fbf; text-decoration: none; }
.btn:disabled { background: #d5dbe6; color: #7b8699; cursor: not-allowed; }
.btn-secondary { background: #5a6a85; }
.btn-secondary:hover { background: #4c5b74; }
.btn-ghost { background: #eef1f6; color: #3d4e67; }
.btn-ghost:hover { background: #e2e7f0; }
.btn-row { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.alert { padding: 8px 12px; border-radius: 4px; margin-bottom: 10px; border: 1px solid transparent; }
.check { display: flex; align-items: center; gap: 8px; margin: 10px 0 4px; }
.check input { width: auto; }
.alert-ok { background: #e8f8ef; color: #146c43; border-color: #b7ebc9; }
.alert-error { background: #fdecec; color: #9b1c1c; border-color: #f5c2c2; }
.table-wrap { overflow: auto; max-height: 480px; border: 1px solid var(--line); border-radius: 4px; }
table { width: 100%; border-collapse: collapse; font-size: 0.9rem; }
th, td { border-bottom: 1px solid #eef1f6; padding: 6px 8px; text-align: left; vertical-align: middle; }
th { background: #f7f8fc; position: sticky; top: 0; font-size: .72rem; letter-spacing: .04em; text-transform: uppercase; color: var(--muted); font-weight: 600; }
tbody tr:hover td { background: #f5f8fc; }
.num { text-align: right; font-variant-numeric: tabular-nums; }
.muted { color: var(--muted); font-size: 0.9rem; }
.auth-wrap {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: #e8ecf3;
}
.auth-card {
  width: 100%;
  max-width: 400px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 28px 26px 24px;
  box-shadow: 0 12px 40px rgba(28, 39, 60, .1);
}
.auth-brand { display: flex; align-items: center; gap: 10px; margin-bottom: 16px; }
.auth-brand strong { display: block; font-size: 1.05rem; }
.auth-brand span { color: var(--muted); font-size: .82rem; }
.receipt-ideas { margin-top: 6px; }
.receipt-ideas form { display: flex; gap: 8px; align-items: flex-start; margin: 3px 0; }
.receipt-ideas .btn { padding: 2px 8px; font-size: 0.78rem; }
.receipt-ideas .why { color: var(--muted); }
.line-grid { display: grid; grid-template-columns: 1.5fr 1fr 130px 130px 120px 24px; gap: 6px; margin-bottom: 6px; align-items: center; }
.line-grid input, .line-grid select { width: 100%; box-sizing: border-box; padding: 6px 8px; border: 1px solid #d5dbe6; border-radius: 4px; font: inherit; }
@media (max-width: 900px) {
  .line-grid { grid-template-columns: 1fr 1fr; }
}
.metrics, .stats, .kpis {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(148px, 100%), 1fr));
  gap: 12px;
  margin-bottom: 14px;
}
.metric, .stat, .kpi {
  position: relative;
  overflow: hidden;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 7px;
  padding: 12px 14px 13px;
  min-width: 0;
  box-shadow: var(--shadow);
}
.metric::before, .stat::before, .kpi::before {
  content: "";
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 3px;
  background: var(--accent);
}
.metric:hover, .stat:hover, .kpi:hover {
  border-color: #cdd6e4;
  box-shadow: 0 8px 22px rgba(62, 57, 107, .08);
}
.metric-label, .metric span, .stat span, .kpi span {
  display: block;
  color: var(--muted);
  font-size: .68rem;
  font-weight: 600;
  letter-spacing: .05em;
  text-transform: uppercase;
}
.metric strong, .stat strong, .kpi strong {
  display: block;
  margin-top: 4px;
  font-size: 1.4rem;
  line-height: 1.05;
  letter-spacing: -.03em;
  font-variant-numeric: tabular-nums;
}
.metric em, .kpi em {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-style: normal;
  font-size: .78rem;
}
.metric.tone-good, .kpi.good { --accent: #2dce89; }
.metric.tone-warn, .kpi.warn { --accent: #f7b731; }
.metric.tone-bad, .kpi.bad { --accent: #fb5c7c; }
.metric.tone-sales, .kpi.sales { --accent: #467fcf; }
.metric.tone-recon, .kpi.recon { --accent: #45aaf2; }
.metric.tone-buy, .kpi.buy { --accent: #5b73e8; }
.badge { display: inline-block; padding: 2px 8px; border-radius: 4px; background: #e8eef8; color: #2c4a7c; font-size: 0.75rem; font-weight: 600; }
.help { color: var(--muted); font-size: 0.85rem; margin: 0 0 8px; }

.sidebar nav .subnav { margin: 0 0 6px 28px; border-left: 2px solid rgba(70, 127, 207, .45); padding-left: 8px; }
.sidebar nav .subnav a { padding: 5px 8px; font-size: 0.84rem; margin-bottom: 2px; font-weight: 500; box-shadow: none; }
.sidebar nav .subnav a.active { box-shadow: none; background: rgba(255, 255, 255, .08); }
.tabs { display: flex; flex-wrap: wrap; gap: 2px; margin-bottom: 8px; border-bottom: 1px solid var(--line); }
.tabs a { padding: 6px 12px; color: var(--muted); border-radius: 4px 4px 0 0; margin-bottom: -1px; border-bottom: 2px solid transparent; font-weight: 500; }
.tabs a:hover { background: #f5f8fc; color: var(--ink); text-decoration: none; }
.tabs a.active { color: var(--accent); font-weight: 600; border-bottom-color: var(--accent); }
.filters { display: flex; flex-wrap: wrap; gap: 6px 10px; align-items: flex-end; }
.filters .field { margin: 0; min-width: 130px; flex: 1 1 130px; max-width: 200px; }
.filter-actions { display: flex; gap: 6px; padding-bottom: 1px; }
.chart { width: 100%; height: auto; display: block; }
.card-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.card h2 .more { float: right; font-size: 0.8rem; font-weight: 400; }
.btn-sm { padding: 4px 10px; font-size: 0.82rem; }
table.rpt tfoot td { font-weight: 700; background: #f7f8fc; border-top: 2px solid var(--line); position: sticky; bottom: 0; }
table.rpt .neg, .neg { color: #d12b4a; }
table.summary td { padding: 7px 10px; }
table.summary tr.tot td { font-weight: 700; background: #f7f8fc; border-top: 1px solid var(--line); }
.abc { display: inline-block; min-width: 20px; text-align: center; border-radius: 4px; padding: 1px 6px; font-size: 0.75rem; font-weight: 700; color: #fff; }
.abc-A { background: #2dce89; } .abc-B { background: #f7b731; } .abc-C { background: #8b93ad; }
.insights { margin: 0; padding-left: 0; list-style: none; }
.insights li { padding: 8px 10px 8px 12px; margin-bottom: 6px; border-left: 3px solid var(--accent); background: #f4f7fb; border-radius: 0 4px 4px 0; }
.insights li.warn { border-left-color: #f7b731; background: #fff8eb; }
.badge-bad { background: #fdecec; color: #9b1c1c; }
.badge-ok { background: #e8f8ef; color: #146c43; }
.badge.kind-sales { background: #e8eef8; color: #2c4a7c; }
.badge.kind-recon { background: #e7f5fd; color: #1a5f8a; }
.badge.kind-purchase { background: #eef0ff; color: #3d3a8a; }
.badge.kind-bank { background: #e8f6f8; color: #0f6670; }
@media print {
  .sidebar, .tabs, .filters, .no-print, .btn { display: none !important; }
  .app { display: block; } .main { padding: 0; } body { background: #fff; }
  .card { break-inside: avoid; border-color: #cbd5e1; box-shadow: none; }
  .table-wrap { max-height: none; overflow: visible; }
  .topbar, .dash-hero, .manual-hero { margin: 0 0 12px; box-shadow: none; }
}

.rgrid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(360px, 100%), 1fr)); gap: 12px; }
.rgrid > .card { min-width: 0; }
@media (max-width: 520px) { .rgrid { grid-template-columns: 1fr; } }

.chart { max-width: 640px; margin: 0 auto; }
.chart.wide { max-width: none; }
details.tbl > summary { list-style: none; cursor: pointer; display: flex; justify-content: space-between; align-items: center; gap: 10px; font-size: 1.05rem; font-weight: 600; }
details.tbl > summary::-webkit-details-marker { display: none; }
details.tbl > summary .t::before { content: "\25B8"; display: inline-block; width: 1.1em; color: var(--muted); }
details.tbl[open] > summary .t::before { content: "\25BE"; }
details.tbl > summary .t::after { content: "Show"; margin-left: 10px; font-size: 0.75rem; font-weight: 500; color: var(--accent); }
details.tbl[open] > summary .t::after { content: "Hide"; }
details.tbl[open] > summary { margin-bottom: 10px; }
.gate .btn-row { margin-top: 4px; }
.btn-primary { background: var(--accent); }
.btn-primary:hover { background: #3a6fbf; }
.card h2 { font-size: .95rem; }
.main { max-width: none; }
@media print { details.tbl > summary .t::after { content: ""; } }
table.rpt td input { width: 100%; min-width: 180px; box-sizing: border-box; padding: 6px 8px; border: 1px solid #d5dbe6; border-radius: 4px; font: inherit; }

.pager{display:flex;flex-wrap:wrap;align-items:center;gap:6px;margin:10px 0}
.pager .pg{padding:4px 10px;border:1px solid #d5dbe6;border-radius:4px;text-decoration:none;color:var(--ink);background:#fff}
.pager .pg:hover{border-color:var(--accent);color:var(--accent);text-decoration:none}
.pager .pg-current{background:var(--accent);color:#fff;border-color:var(--accent)}

.export-page .tabs a.tab-sales.active { color: #467fcf; border-bottom-color: #467fcf; }
.export-page .tabs a.tab-purchases.active { color: #5b73e8; border-bottom-color: #5b73e8; }
.dl-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 12px; margin-bottom: 18px; }
.dl-card { border-radius: 7px; padding: 14px 16px; border: 1px solid var(--line); background: #fff; }
.dl-card h3 { margin: 0 0 6px; font-size: 1rem; }
.dl-card p { margin: 0 0 12px; color: var(--muted); font-size: 0.86rem; min-height: 2.6em; }
.dl-card.sales { border-top: 3px solid #467fcf; }
.dl-card.recon { border-top: 3px solid #45aaf2; }
.dl-card.buy { border-top: 3px solid #5b73e8; }
.extract-head { margin: 8px 0 12px; font-size: 1.15rem; }
.tally-sheet {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 7px;
  padding: 14px 16px;
}
.tally-sheet header { display: flex; justify-content: space-between; gap: 12px; border-bottom: 2px solid #2a2e3f; margin-bottom: 10px; padding-bottom: 8px; }
.tally-sheet .vch-type { color: #2a2e3f; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; }
.tally-sheet .vch-view { color: var(--muted); font-size: 0.8rem; margin-top: 2px; }
.tally-sheet .vch-meta { text-align: right; font-variant-numeric: tabular-nums; }
.tally-sheet .vch-meta span { color: var(--muted); font-size: 0.75rem; text-transform: uppercase; margin-right: 6px; }
.tally-sheet .vch-party { margin: 0 0 10px; }
.tally-sheet h3 { margin: 14px 0 8px; font-size: 0.95rem; color: #2a2e3f; }
.tally-lines th { background: #f7f8fc; }
.tally-lines td.dr { color: #1d4ed8; font-variant-numeric: tabular-nums; }
.tally-lines td.cr { color: #15803d; font-variant-numeric: tabular-nums; }
.tally-lines tfoot td { font-weight: 700; border-top: 2px solid var(--line); background: #f7f8fc; }
.vch-narr { margin: 12px 0 0; padding-top: 8px; border-top: 1px dashed #d5dbe6; }
.vch-narr span { display: block; font-size: 0.72rem; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); }
.tally-summary { max-height: 520px; }
.tally-summary thead th { position: sticky; top: 0; z-index: 1; }
.tally-summary tfoot td { position: sticky; bottom: 0; z-index: 1; }
.extract-sub { margin: 14px 0 8px; font-size: 0.95rem; }
.xml-fold { margin-top: 10px; }
.xml-fold summary { cursor: pointer; color: var(--accent); font-size: 0.88rem; }
.xml-fold pre {
  background: #2a2e3f;
  color: #e6e9f2;
  padding: 12px;
  border-radius: 4px;
  overflow: auto;
  max-height: 320px;
  font-size: 12px;
  line-height: 1.45;
  white-space: pre;
}
.badge.kind-ledger { background: #e8eef8; color: #2c4a7c; }
.badge.kind-stock-item { background: #e8f8ef; color: #146c43; }
.badge.kind-cost-centre, .badge.kind-cost-category { background: #eef0ff; color: #3d3a8a; }
.badge.kind-godown, .badge.kind-unit { background: #fff4e8; color: #9a4d12; }
.busy-overlay {
  position: fixed;
  inset: 0;
  background: rgba(42, 46, 63, .45);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 80;
}
.busy-overlay[hidden] { display: none; }
.busy-card {
  background: #fff;
  border-radius: 8px;
  padding: 22px 26px 18px;
  width: min(360px, calc(100% - 32px));
  text-align: center;
  box-shadow: 0 20px 50px rgba(28, 39, 60, .2);
}
.busy-spin {
  width: 48px;
  height: 48px;
  border: 4px solid #e4e8f0;
  border-top-color: var(--accent);
  border-radius: 50%;
  margin: 0 auto 12px;
  animation: busy-spin .8s linear infinite;
}
.busy-label { font-weight: 600; min-height: 1.3em; }
.busy-bar { height: 6px; background: #e4e8f0; border-radius: 99px; overflow: hidden; margin-top: 14px; }
.busy-bar > span {
  display: block;
  height: 100%;
  width: 35%;
  background: var(--accent);
  border-radius: 99px;
  animation: busy-bar 1.1s ease-in-out infinite;
}
.busy-bar.known > span { animation: none; transition: width .2s ease; }
@keyframes busy-spin { to { transform: rotate(360deg); } }
@keyframes busy-bar { 0% { transform: translateX(-120%); } 100% { transform: translateX(380%); } }

.dash-hero {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  color: var(--ink);
  background: #fff;
  margin: calc(var(--pad-y) * -1) calc(var(--pad-x) * -1) 14px;
  padding: 16px var(--pad-x);
  border-bottom: 1px solid var(--line);
}
.dash-hero .eyebrow { margin: 0; color: var(--accent); font-size: .68rem; letter-spacing: .08em; text-transform: uppercase; font-weight: 600; }
.dash-hero h1 { margin: 2px 0 0; font-size: 1.2rem; letter-spacing: -.02em; font-weight: 600; }
.dash-hero p { display: none; }
.hero-side { text-align: right; }
.hero-org { font-weight: 600; font-size: .9rem; }
.chips { display: flex; flex-wrap: wrap; gap: 4px; justify-content: flex-end; margin-top: 4px; }
.chip {
  background: #eef2f8;
  border: 1px solid #e1e6ef;
  color: #3d4e67;
  border-radius: 4px;
  padding: 3px 8px;
  font-size: .75rem;
  font-weight: 500;
}
.dash-stats { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 12px; }
.dash-stats .stat { min-width: 110px; flex: 1; padding: 8px 12px; }
.dash-stats .stat strong { font-size: 1.05rem; letter-spacing: -.02em; }
.action-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 10px;
  margin-bottom: 12px;
}
.action-tile {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-height: 0;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 7px;
  padding: 10px 12px 10px 14px;
  color: inherit;
  box-shadow: var(--shadow);
  position: relative;
  overflow: hidden;
}
.action-tile::before {
  content: "";
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 3px;
  background: var(--accent);
}
.action-tile.tone-in::before { background: #467fcf; }
.action-tile.tone-sa::before { background: #2dce89; }
.action-tile.tone-rc::before { background: #45aaf2; }
.action-tile.tone-bk::before { background: #17a2b8; }
.action-tile.tone-ex::before { background: #5b73e8; }
.action-tile.tone-pu::before { background: #f7b731; }
.action-tile.tone-rp::before { background: #467fcf; }
.action-tile.tone-st::before { background: #5a6a85; }
.action-tile:hover {
  text-decoration: none;
  border-color: #cdd6e4;
  box-shadow: 0 8px 22px rgba(62, 57, 107, .08);
}
.dl-card { transition: box-shadow .15s ease; }
.dl-card:hover { box-shadow: 0 8px 22px rgba(62, 57, 107, .08); }
.action-tile strong { font-size: .86rem; letter-spacing: -.01em; }
.action-tile > span { color: var(--muted); font-size: .75rem; line-height: 1.35; }
.tile-go { margin-top: 4px; padding-top: 0; color: var(--accent) !important; font-weight: 600; font-size: .72rem !important; }
.dash-split { display: grid; grid-template-columns: minmax(0, 1.7fr) minmax(220px, .7fr); gap: 12px; align-items: start; }
.dash-side .card:last-child { margin-bottom: 0; }
.meta-list { margin: 0; }
.meta-list > div { display: flex; justify-content: space-between; gap: 8px; padding: 6px 0; border-bottom: 1px solid var(--line); }
.meta-list > div:last-child { border-bottom: 0; }
.meta-list dt { color: var(--muted); font-size: .78rem; }
.meta-list dd { margin: 0; font-weight: 600; text-align: right; }
.org-list { list-style: none; margin: 0; padding: 0; }
.org-list li { display: flex; justify-content: space-between; gap: 8px; align-items: center; padding: 6px 0; border-bottom: 1px solid var(--line); }
.org-list li:last-child { border-bottom: 0; }
.empty-state { padding: 8px 2px 4px; }
.empty-state strong { display: block; margin-bottom: 4px; }
@media (max-width: 800px) {
  .dash-hero, .hero-side, .chips { display: block; text-align: left; }
  .chips { display: flex; justify-content: flex-start; }
  .flow { flex-direction: column; }
  .flow li { margin-right: 0; margin-bottom: 18px; }
  .flow li:not(:last-child)::after { top: auto; right: auto; left: 22px; bottom: -14px; width: 2px; height: 12px; }
}

.manual-hero {
  margin: calc(var(--pad-y) * -1) calc(var(--pad-x) * -1) 14px;
  padding: 16px var(--pad-x);
  background: #fff;
  border-bottom: 1px solid var(--line);
}
.manual-hero h1 { margin: 0 0 4px; font-size: 1.2rem; letter-spacing: -.02em; font-weight: 600; }
.manual-toc { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 14px; padding: 0; list-style: none; }
.manual-toc a {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 4px;
  background: #fff;
  border: 1px solid var(--line);
  color: var(--muted);
  font-size: .78rem;
  font-weight: 600;
}
.manual-toc a:hover { text-decoration: none; background: #f4f7fb; border-color: #cdd6e4; color: var(--accent); }
.manual-section { scroll-margin-top: 12px; }
.manual-section h2 { margin-top: 0; }
.system-map { width: 100%; height: auto; display: block; }
.system-map text { font-family: "Poppins", "Segoe UI", system-ui, sans-serif; }
.flow { list-style: none; display: flex; gap: 0; margin: 8px 0 4px; padding: 0; }
.flow li {
  position: relative;
  flex: 1 1 0;
  min-width: 0;
  margin-right: 22px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 7px;
  padding: 10px 10px 10px 12px;
  box-shadow: var(--shadow);
}
.flow li:last-child { margin-right: 0; }
.flow li:not(:last-child)::after {
  content: "";
  position: absolute;
  top: 50%;
  right: -16px;
  width: 8px;
  height: 8px;
  margin-top: -5px;
  border-right: 2px solid var(--accent);
  border-bottom: 2px solid var(--accent);
  transform: rotate(-45deg);
}
.flow-n {
  display: inline-grid;
  place-items: center;
  width: 20px;
  height: 20px;
  margin-bottom: 6px;
  border-radius: 4px;
  background: var(--accent);
  color: #fff;
  font-size: .72rem;
  font-weight: 700;
}
.flow strong { display: block; font-size: .84rem; margin-bottom: 2px; }
.flow .flow-n { color: #fff; }
.flow li > span:last-child { display: block; color: var(--muted); font-size: .75rem; line-height: 1.35; }
.manual-note { margin: 8px 0 0; }
