/* Baobab Alutech — UI v3 shell (design tokens + app shell, docs/design/README.md
   "Design Tokens" + "Screens 0/1" + "Interactions" sections).
   Common layout + shared components. Page-specific rules stay in each
   template's own <style> block. */

:root {
  /* ---- colour tokens (README "Design Tokens" > Colours) ---- */
  --brand: #1e4a41;        /* primary green — buttons, selected nav, rules */
  --brand-deep: #122e29;   /* pressed / link hover */
  --brass: #9d7b3c;        /* single accent: print kicker, login rule, in-progress dots, bars */
  --brass-tint: #f7f1e4;
  --ink: #1b2926;          /* body text */
  --muted: #6f7a77;        /* secondary text */
  --faint: #98a29f;        /* tertiary / labels */
  --hair: #e7eae9;         /* hairlines, control borders */
  --bg: #f4f5f5;           /* app background */
  --surface: #ffffff;      /* cards */
  --amber: #8a5a10;        /* on --amber-tint: due / warning */
  --amber-tint: #fbf3e6;
  --amber-ink: #5f4110;    /* on --amber-tint: notice-banner body copy */
  --blue: #1f5470;         /* on --blue-tint: ratios */
  --blue-tint: #eaf0f4;
  --green-tint: #e9f0ee;   /* settled / received */
  --rose: #8c2f3f;         /* on --rose-tint: locked / discount / declined */
  --rose-tint: #f9e9eb;
  --lane: #ebedec;         /* kanban lanes */

  /* ---- sidebar material (light, per Screen 1) ---- */
  --sidebar-w: 238px;
  --side-bg: #ebedec;
  --side-ink: #1b2926;
  --side-faint: #98a29f;
  --side-hair: #dfe2e1;
  --side-item: #39443f;
  --side-active: var(--brand);
  --side-active-ink: #ffffff;

  /* ---- shadows ---- */
  --shadow-card: 0 1px 2px rgba(20, 40, 36, .05), 0 6px 18px rgba(20, 40, 36, .035);
  --shadow-btn: 0 1px 1.5px rgba(20, 40, 36, .05);
  --shadow-dialog: 0 12px 32px rgba(45, 43, 43, .22);
  --shadow-kanban: 0 1px 2px rgba(20, 40, 36, .07); /* Screen 5/6 kanban cards */

  /* ---- radii (README "Design Tokens" > Radii) ---- */
  --radius-tag: 6px;       /* tags */
  --radius-nav: 8px;       /* nav items */
  --radius-control: 9px;   /* buttons / inputs / segmented */
  --radius-kanban: 11px;   /* kanban cards */
  --radius-card: 14px;     /* cards / lanes */
  --radius-sidebar: 16px;  /* sidebar & dialog */
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Helvetica Neue",
               "PingFang SC", "Hiragino Sans GB", sans-serif;
  font-size: 13px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  font-variant-numeric: tabular-nums;
}

a { color: inherit; }

/* ---------- shell layout ---------- */

.shell {
  display: flex;
  align-items: flex-start;
  min-height: 100vh;
}

/* Mobile-only top bar (hamburger + brand + compact language switch) and the
   drawer backdrop. Hidden unconditionally here so desktop (>768px) never
   sees them; the @media block near the bottom of this file is what actually
   turns them on for narrow screens. */
.mobile-topbar { display: none; }
.sidebar-backdrop { display: none; }

/* Sticky 238px sidebar. Outer <aside> only carries the sticky/flex-basis
   geometry + the gap to the viewport edge; the inner .sidebar-inner is the
   actual light card (docs/design/README.md Screen 1: "sticky left sidebar
   238px"). */
.sidebar {
  flex: 0 0 var(--sidebar-w);
  position: sticky;
  top: 0;
  align-self: flex-start;
  height: 100vh;
  padding: 14px 0 14px 14px;
}

.sidebar-inner {
  height: 100%;
  background: var(--side-bg);
  border-radius: var(--radius-sidebar);
  padding: 20px 12px 16px;
  display: flex;
  flex-direction: column;
  color: var(--side-ink);
  overflow: hidden;
}

.sidebar-logo {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 6px 8px 18px;
  flex: none;
}

.sidebar-logo img {
  width: 132px;
  max-width: 100%;
  height: auto;
  display: block;
}

.nav {
  display: flex;
  flex-direction: column;
  gap: 1px;
  margin-top: 10px;
  overflow-y: auto;
  flex: 1;
}

.nav-group {
  font-size: 12px;
  font-weight: 600;
  color: var(--side-faint);
  padding: 14px 12px 5px;
}

.nav-item {
  display: block;
  padding: 7px 11px;
  border-radius: var(--radius-nav);
  color: var(--side-item);
  text-decoration: none;
  font-size: 13px;
  font-weight: 500;
  transition: background-color .12s ease, color .12s ease;
}

.nav-item:hover {
  background: rgba(27, 41, 38, .06);
}

.nav-item.active {
  background: var(--side-active);
  color: var(--side-active-ink);
  font-weight: 590;
}

.sidebar-bottom {
  flex: none;
  border-top: 1px solid var(--side-hair);
  padding-top: 14px;
  margin-top: 14px;
}

.sidebar-user {
  display: flex;
  align-items: center;
  gap: 9px;
}

.user-avatar {
  width: 28px;
  height: 28px;
  min-width: 28px;
  border-radius: 50%;
  background: var(--brand);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 600;
}

.user-meta { min-width: 0; }

.user-name {
  font-size: 13px;
  font-weight: 590;
  color: var(--side-ink);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.user-role {
  font-size: 12px;
  color: var(--side-faint);
  margin-top: 1px;
}

/* 自助改密入口（2026-08-08）：本人名字下方的小链接，弱化呈现不抢导航 */
.user-pw-link {
  display: inline-block;
  font-size: 11px;
  color: var(--side-faint);
  text-decoration: underline;
  margin-top: 3px;
}
.user-pw-link:hover { color: #fff; }

.logout-form { margin: 11px 0 0; }

.logout-btn {
  background: none;
  border: none;
  padding: 0;
  font-size: 12px;
  font-weight: 400;
  color: var(--side-faint);
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.logout-btn:hover { color: var(--side-ink); }

.content {
  flex: 1;
  min-width: 0;
  padding: 16px 26px 64px 22px;
}

/* ---------- top utility bar (breadcrumb + search + lang toggle) ---------- */

.topbar {
  display: flex;
  align-items: center;
  gap: 12px;
  height: 44px;
  margin-bottom: 14px;
}

.topbar .breadcrumb {
  font-size: 12px;
  color: var(--faint);
}

.topbar-actions {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 8px;
}

/* v2 CHANGES#5: 搜索框可收缩、语言按钮不收缩不折行，防止挤压把工具条撑高。 */
.topbar-search { flex: 0 1 220px; min-width: 120px; }
.lang-switch-form { flex: none; }

.topbar-search input {
  width: 100%;
  box-sizing: border-box;
  min-height: 32px;
  font-size: 13px;
  padding: 0 10px;
  border: 1px solid var(--hair);
  border-radius: var(--radius-control);
  background: #fff;
}

.topbar-search input:focus-visible,
.lang-toggle-btn:focus-visible {
  outline: none;
  border-color: var(--brand);
  box-shadow: 0 0 0 3px rgba(30, 74, 65, .14);
}

.lang-toggle-btn {
  background: #fff;
  border: 1px solid var(--hair);
  border-radius: var(--radius-control);
  padding: 6px 13px;
  cursor: pointer;
  font: inherit;
  font-size: 13px;
  font-weight: 590;
  color: var(--brand);
  box-shadow: var(--shadow-btn);
  white-space: nowrap;
}

.lang-switch-form { margin: 0; }

/* ---------- page head: H1 + subtitle, action block directly below ---------- */

.page-head { margin-bottom: 0; }

.page-title {
  font-size: 28px;
  font-weight: 600;
  letter-spacing: -0.026em;
  margin: 0 0 4px;
  color: var(--ink);
}

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

.page-actions-bar {
  display: flex;
  align-items: center;
  gap: 9px;
  flex-wrap: wrap;
  margin: 14px 0 20px;
}

/* Structural only — lets a template still define {% block page_actions %}
   without adding an extra flex/box layer inside .page-actions-bar. */
.page-actions { display: contents; }

/* Legacy fallback for any page-header link that hasn't been converted to the
   .btn system below — kept scoped with :not(.btn) so it never fights the
   button component's own color/decoration rules. */
.page-actions-bar a:not(.btn) {
  color: var(--brand);
  text-decoration: none;
}

.page-actions-bar a:not(.btn):hover { text-decoration: underline; }

/* ---------- page action buttons (page_actions_bar / toolbar) ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  border-radius: var(--radius-control);
  font-size: 13px;
  font-weight: 590;
  letter-spacing: -0.01em;
  text-decoration: none;
  line-height: 1;
  cursor: pointer;
  border: 1px solid transparent;
  box-shadow: var(--shadow-btn);
  transition: background-color .15s ease, border-color .15s ease, color .15s ease;
  white-space: nowrap;
}

.btn-primary {
  background: var(--brand);
  border-color: var(--brand);
  color: #fff;
}

.btn-primary:hover { background: var(--brand-deep); border-color: var(--brand-deep); }

.btn-secondary {
  background: #fff;
  border-color: var(--hair);
  color: var(--ink);
}

.btn-secondary:hover {
  border-color: #c3cac6;
  background: #f7f8f8;
}

.btn-back {
  background: none;
  border-color: transparent;
  color: var(--muted);
  padding: 8px 6px;
  box-shadow: none;
}

.btn-back:hover { color: var(--ink); }

/* Compact variant for buttons that sit in tight spaces (kanban cards, table
   rows) — same .btn/.btn-secondary look, smaller footprint. */
.btn-sm {
  padding: 5px 10px;
  font-size: 12px;
}

.content-card {
  background: var(--surface);
  border-radius: var(--radius-card);
  padding: 22px 24px;
  box-shadow: var(--shadow-card);
}

/* ---------- shared components reused across list/detail pages ---------- */

table { border-collapse: collapse; width: 100%; }

th, td {
  padding: 9px 12px;
  font-size: 13px;
  text-align: left;
  border-bottom: 1px solid var(--hair);
}

th { background: #eef1f0; color: var(--muted); }

td.num, th.num { text-align: right; font-variant-numeric: tabular-nums; }

a.no, a.name {
  color: var(--brand);
  font-weight: 600;
  text-decoration: none;
}

.pill, .tag, .badge {
  font-size: 11px;
  padding: 2px 9px;
  border-radius: var(--radius-tag);
  background: #eef3f1;
  color: var(--brand);
  display: inline-block;
}

.pill.warn { background: #fff3cd; color: #6b5300; }
.pill.ok { background: #e6f4ea; color: #1e7a3d; }

.empty { color: var(--faint); padding: 24px; text-align: center; }

.msgs { margin-bottom: 14px; }

.msg { padding: 8px 12px; border-radius: 8px; font-size: 13px; margin-bottom: 6px; }

.msg.warning { background: #fff4e5; color: #8a5300; }

form.inline { display: inline; }

button {
  background: var(--brand);
  color: #fff;
  border: none;
  border-radius: 6px;
  padding: 5px 12px;
  font-size: 12px;
  cursor: pointer;
}

/* .card 是 v2 遗留容器，.panel 是 UI v3 的正式容器——两套并存导致同类小标题
   一个 14px 品牌绿、一个 17px 墨色，间距也不同（2026-08-04 用户："每个小标题
   的大小不一样大，间距，这样看着很不舒服"）。这里让 .card 视觉完全对齐
   .panel，模板不必逐个改类名。 */
.card {
  background: var(--surface);
  border-radius: var(--radius-card);
  box-shadow: var(--shadow-card);
  padding: 22px 24px;
  margin-bottom: 18px;
}

.card h2 { font-size: 17px; font-weight: 700; margin: 0 0 16px; color: var(--ink); }

.filters { margin-bottom: 14px; }

.filters a {
  display: inline-block;
  font-size: 12px;
  padding: 5px 12px;
  margin-right: 8px;
  border-radius: 16px;
  text-decoration: none;
  color: var(--brand);
  background: #eef3f1;
  border: 1px solid transparent;
}

.filters a.on { background: var(--brand); color: #fff; }

/* Opt-in helper for pages with very wide tables (e.g. the quotation entry
   grid). Lets just that page's own content scroll horizontally instead of
   widening the whole shell — doesn't affect pages that don't use it. */
.scroll-x { overflow-x: auto; }

/* Generic wrapper for list-page tables that aren't already inside .scroll-x.
   No rule outside the mobile media query below — a bare div has no visual
   effect on its own, so wrapping a table in it is a zero-risk no-op at
   desktop widths (M1: mobile responsive + PWA manifest). */
.table-scroll { }

/* ==========================================================================
   UI v3 phase 2 — Workbench (Screen 1) + Quotation register (Screen 2)
   docs/design/README.md. Both pages opt out of the generic white
   `.content-card` shell wrapper (they lay out several independent white
   cards directly on the grey `--bg`, per the design) via `body.page-flat`;
   every other page keeps the untouched default `.content-card` look.
   ========================================================================== */

body.page-flat .content-card {
  background: none;
  box-shadow: none;
  border-radius: 0;
  padding: 0;
}

/* ---------- generic inputs (search box, etc.) ---------- */

.input {
  border: 1px solid var(--hair);
  border-radius: var(--radius-control);
  background: #fff;
  font: inherit;
  font-size: 13px;
  padding: 7px 10px;
  color: var(--ink);
}

.input:focus-visible {
  outline: none;
  border-color: var(--brand);
  box-shadow: 0 0 0 3px rgba(30, 74, 65, .14);
}

/* ---------- ghost / block button variants ---------- */

.btn-ghost {
  background: none;
  border-color: transparent;
  color: var(--brand);
  box-shadow: none;
  padding: 6px 8px;
}

.btn-ghost:hover { color: var(--brand-deep); text-decoration: underline; }

.btn-ghost:focus-visible {
  outline: none;
  border-color: var(--brand);
  box-shadow: 0 0 0 3px rgba(30, 74, 65, .14);
}

.btn-block { width: 100%; justify-content: flex-start; }

.toolbar-divider {
  width: 1px;
  height: 22px;
  background: var(--hair);
}

/* ---------- segmented control (stage filter) ---------- */

.seg {
  display: inline-flex;
  border: 1px solid var(--hair);
  border-radius: var(--radius-control);
  background: #eceeed;
  padding: 2px;
  gap: 2px;
}

.seg-opt {
  display: inline-flex;
  align-items: center;
  border-radius: 7px;
  font-size: 13px;
  font-weight: 500;
  padding: 5px 11px;
  color: var(--muted);
  text-decoration: none;
  white-space: nowrap;
}

.seg-opt:hover { color: var(--ink); }

.seg-opt:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px rgba(30, 74, 65, .14);
}

.seg-opt.active {
  background: #fff;
  color: var(--ink);
  font-weight: 590;
  box-shadow: 0 1px 2px rgba(20, 40, 36, .10);
}

/* 历史档案两个页签互链（订单/报价，历史数据导入 Track 1+2）——同一份 .seg
   控件，放在 page_subtitle 区块顶部，跟下面的副标题文字留点呼吸空间。 */
.archive-tabs { margin-bottom: 8px; }

/* ---------- stage tags (Quotation.Status, shared by dashboard + register) ----------
   Colour-only modifiers layered on the existing shared `.pill, .tag, .badge`
   base rule above (geometry untouched — other pages' plain `.tag`/`.pill`
   usages must not shift). */

.tag-draft { background: #eceeed; color: var(--muted); }
.tag-pending { background: var(--amber-tint); color: var(--amber); }
.tag-won { background: var(--green-tint); color: var(--brand); }
.tag-shelved { background: var(--blue-tint); color: var(--blue); }
.tag-lost { background: var(--rose-tint); color: var(--rose); }

/* ---------- shared white panel (KPI tiles, follow-up table, stage mix, jump-to) ---------- */

.panel {
  background: var(--surface);
  border-radius: var(--radius-card);
  box-shadow: var(--shadow-card);
  padding: 22px 24px;
}

.panel-table { padding: 8px 24px 16px; }

.panel-title-row {
  display: flex;
  align-items: baseline;
  gap: 12px;
  margin-bottom: 16px;
}

.panel-title { margin: 0; font-size: 17px; }

.panel-sub { font-size: 12px; color: var(--faint); }

.panel-link { margin-left: auto; font-size: 13px; }

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

.kpi-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(216px, 1fr));
  gap: 14px;
  margin-bottom: 22px;
}

.kpi-tile {
  background: var(--surface);
  border-radius: var(--radius-card);
  box-shadow: var(--shadow-card);
  padding: 18px 20px 17px;
}

.kpi-head { display: flex; align-items: center; gap: 8px; }

.kpi-mark {
  width: 6px;
  height: 6px;
  min-width: 6px;
  border-radius: 50%;
}

.kpi-mark-brand { background: var(--brand); }
.kpi-mark-blue { background: var(--blue); }
.kpi-mark-faint { background: var(--faint); }
.kpi-mark-brass { background: var(--brass); }

.kpi-label { font-size: 13px; color: var(--muted); }

.kpi-value {
  font-size: 24px;
  font-weight: 600;
  letter-spacing: -0.015em;
  margin: 12px 0 6px;
  font-variant-numeric: tabular-nums;
}

.kpi-note { font-size: 12px; color: var(--muted); }

/* ---------- prominent notice banner (archive stats "reference only" caveat) ---------- */

.notice-amber {
  background: var(--amber-tint);
  color: var(--amber-ink);
  border-radius: 10px;
  padding: 13px 15px;
  font-size: 13px;
  line-height: 1.75;
  margin-bottom: 16px;
}

.notice-amber strong { color: var(--amber); }

/* ---------- two-column dashboard body ---------- */

.dash-grid {
  display: grid;
  /* v2 CHANGES#4: auto-fit 自适应——窄屏自动落成单栏，右栏卡片不会被压穿。 */
  grid-template-columns: repeat(auto-fit, minmax(430px, 1fr));
  gap: 16px;
  align-items: start;
}

.dash-grid > * { min-width: 0; }

.dash-col-side {
  display: grid;
  gap: 16px;
}

/* 15-day follow-up window row tint (README Screen 1). */
tr.row-followup { background: #fdfaf3; }

.ageing-near { color: var(--brass); }
.ageing-over { color: var(--muted); }

/* ---------- stage mix bars ---------- */

.stage-mix-row + .stage-mix-row { margin-top: 13px; }

.stage-mix-label {
  display: flex;
  justify-content: space-between;
  font-size: 13px;
  margin-bottom: 6px;
}

.stage-mix-count { color: var(--faint); }

.stage-mix-track {
  height: 5px;
  border-radius: 3px;
  background: #eff1f0;
}

.stage-mix-fill {
  height: 5px;
  border-radius: 3px;
  background: var(--brand);
}

/* ---------- jump-to button stack ---------- */

.jump-stack { display: grid; gap: 8px; }

@media (max-width: 768px) {
  .dash-grid { grid-template-columns: 1fr; }
  .kpi-grid { grid-template-columns: 1fr; }
}

/* ==========================================================================
   Mobile (<=768px) overrides — M1: 手机响应式适配 + PWA manifest, extended
   for UI v3's light sidebar.
   Everything that can change how the shell *looks* on a real desktop screen
   must live inside this one @media block. Nothing above this line (other
   than the .mobile-topbar/.sidebar-backdrop hidden-by-default rules, which
   only ever show up once this query matches) may differ for >768px viewports
   — that is the zero-regression contract for this change.
   ========================================================================== */
@media (max-width: 768px) {
  .mobile-topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 52px;
    padding: 0 12px;
    background: var(--brand);
    color: #fff;
    z-index: 30;
  }

  .nav-toggle {
    background: none;
    border: none;
    color: #fff;
    font-size: 22px;
    line-height: 1;
    padding: 6px 8px;
    min-height: 40px;
    min-width: 40px;
    cursor: pointer;
  }

  .mobile-brand {
    font-size: 14px;
    font-weight: 700;
    flex: 1;
    text-align: center;
  }

  .mobile-lang-form {
    display: flex;
    gap: 4px;
  }

  .mobile-lang-form button {
    background: rgba(255, 255, 255, .15);
    color: #fff;
    font-size: 11px;
    padding: 6px 8px;
    min-height: 32px;
    border-radius: 6px;
  }

  .mobile-lang-form button.on {
    background: #fff;
    color: var(--brand);
  }

  .sidebar-backdrop.open {
    display: block;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, .4);
    z-index: 40;
  }

  /* Sidebar becomes an off-canvas drawer: hidden by default, slides in when
     JS toggles .open (see base.html's inline script). The gap-padding that
     makes it a floating card on desktop is dropped so the drawer is a
     full-bleed panel instead. */
  .sidebar {
    position: fixed;
    top: 0;
    left: 0;
    height: 100vh;
    width: 78vw;
    max-width: 300px;
    padding: 0;
    transform: translateX(-100%);
    transition: transform .25s ease;
    z-index: 45;
  }

  .sidebar.open {
    transform: translateX(0);
  }

  .sidebar-inner {
    border-radius: 0;
  }

  .shell {
    display: block;
  }

  .content {
    padding: 68px 12px 16px;
    width: 100%;
  }

  .content-card {
    padding: 16px 14px;
  }

  /* The desktop topbar's own language switch/search are replaced by the
     compact one in .mobile-topbar — hide the desktop topbar-actions here to
     avoid showing duplicate controls. */
  .topbar-actions {
    display: none;
  }

  .topbar {
    height: auto;
    flex-wrap: wrap;
    gap: 8px;
  }

  /* Button group in the page header must wrap onto its own line(s) instead
     of squeezing/overflowing next to the title on narrow screens. */
  .page-actions-bar {
    flex-wrap: wrap;
    row-gap: 8px;
  }

  /* Any list-page table wrapped in .table-scroll (or already using
     .scroll-x) scrolls on its own instead of blowing out the page width. */
  .table-scroll {
    overflow-x: auto;
  }

  /* Touch-friendly tap targets. */
  button {
    min-height: 40px;
  }
}

/* ---------- pagination (2026-08-03 真分页取代 200 条上限) ---------- */

.pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin: 16px 0 4px;
}

.page-btn {
  display: inline-block;
  padding: 6px 13px;
  font-size: 13px;
  font-weight: 590;
  color: var(--brand);
  background: #fff;
  border: 1px solid var(--hair);
  border-radius: var(--radius-control);
  text-decoration: none;
  box-shadow: var(--shadow-btn);
  white-space: nowrap;
}

.page-btn:hover { border-color: var(--brand); }

.page-btn.is-disabled {
  color: var(--faint);
  pointer-events: none;
  box-shadow: none;
}

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

/* 确认弹窗（原 _workorder_confirm.html 内联样式，2026-08-04 收款确认也改弹窗后
   两个组件共用，挪进公共表——用户铁律：所有二次确认都是居中弹窗）。 */
.complete-dialog { width: min(400px, 100%); border: none; border-radius: 16px;
                    padding: 24px 26px; background: var(--surface); box-shadow: var(--shadow-dialog); }
.complete-dialog::backdrop { background: rgba(27, 41, 38, .45); }
.complete-dialog-title { font-size: 20px; font-weight: 600; margin: 0 0 10px; color: var(--ink); }
.complete-dialog-desc { font-size: 13px; color: var(--muted); line-height: 1.75; margin: 0 0 16px; }
.complete-dialog-recap { background: var(--bg); border-radius: 10px; padding: 13px 15px;
                          font-size: 12px; display: grid; grid-template-columns: auto 1fr;
                          row-gap: 6px; column-gap: 14px; margin-bottom: 20px; }
.complete-dialog-recap .k { color: var(--muted); }
.complete-dialog-recap .v { color: var(--ink); font-weight: 590; }
.complete-dialog-actions { display: flex; justify-content: flex-end; gap: 10px; }

/* 收款确认表单（原 finance_receipts.html 与 order_detail.html 各写一份内联
   样式，两处规则完全相同，顺手清理批次挪进公共表；order_detail 那份多带
   margin-top，留在该模板自己的 <style> 里按更具体上下文补，视觉不变）。 */
.receipt-form { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
