/* Hallmark · component: app-shell · genre: modern-minimal · theme: custom (Ledger Current)
 * vibe: "accountable motion — ink-dark channel, cold blue current, one amber strike"
 * paper oklch(96.5% .005 250) · chrome oklch(24.5% .042 253) · accent oklch(50% .125 250) cool-blue
 * display+body: IBM Plex Sans (variable) · data: IBM Plex Mono · axes: light-paper / grotesk-sans / cool
 * states: default · hover · focus · active · disabled · loading · error · success
 * pre-emit critique: P5 H4 E4 S4 R5 V4
 */

/* ---------------- fonts (bundled — offline-safe) ---------------- */
@font-face { font-family: 'IBM Plex Sans'; font-style: normal; font-weight: 100 700; font-display: swap;
  src: url('/fonts/IBMPlexSans.woff2') format('woff2'); }
@font-face { font-family: 'IBM Plex Mono'; font-style: normal; font-weight: 400; font-display: swap;
  src: url('/fonts/IBMPlexMono-400.woff2') format('woff2'); }
@font-face { font-family: 'IBM Plex Mono'; font-style: normal; font-weight: 600; font-display: swap;
  src: url('/fonts/IBMPlexMono-600.woff2') format('woff2'); }

/* ---------------- tokens ---------------- */
:root {
  /* ink chrome (sidebar / topbar-on-dark / print rules) */
  --ink-0: oklch(21% 0.042 255);
  --ink-1: oklch(24.5% 0.042 253);
  --ink-2: oklch(29.5% 0.045 252);
  --ink-line: oklch(38% 0.04 252 / .55);
  --ink-text: oklch(93% 0.008 250);
  --ink-text-dim: oklch(76% 0.02 250);   /* 4.9:1 on the ink sidebar */

  /* paper */
  --paper-0: oklch(96.5% 0.005 250);
  --paper-1: oklch(100% 0 0);
  --paper-2: oklch(95% 0.007 250);
  --paper-3: oklch(92% 0.01 250);
  --line-1: oklch(88.5% 0.012 250);
  --line-2: oklch(93.5% 0.008 250);

  /* text on paper */
  --text-1: oklch(26% 0.035 255);
  --text-2: oklch(44% 0.026 253);
  --text-3: oklch(52% 0.022 252);   /* 4.6:1 on white — AA for small text */

  /* the current — primary accent */
  --cur-6: oklch(43% 0.115 250);
  --cur-5: oklch(50% 0.125 250);
  --cur-4: oklch(60% 0.11 250);
  --cur-wash: oklch(94.5% 0.022 250);
  --cur-line: oklch(84% 0.055 250);

  /* the single amber strike — exceptions only */
  --amber-5: oklch(68% 0.135 75);
  --amber-6: oklch(51% 0.11 70);
  --amber-wash: oklch(95.5% 0.035 85);
  --amber-line: oklch(86% 0.08 80);

  /* settled money / approved */
  --green-5: oklch(56% 0.1 165);
  --green-6: oklch(43% 0.085 165);
  --green-wash: oklch(95.5% 0.03 165);
  --green-line: oklch(86% 0.06 165);

  /* returned / critical */
  --red-5: oklch(52% 0.14 27);
  --red-6: oklch(44% 0.13 27);
  --red-wash: oklch(95.5% 0.02 27);
  --red-line: oklch(87% 0.05 27);

  /* AI voice — quiet violet */
  --ai-5: oklch(47% 0.1 290);
  --ai-wash: oklch(95.5% 0.02 290);
  --ai-line: oklch(87% 0.045 290);

  --font-ui: 'IBM Plex Sans', 'Segoe UI', system-ui, sans-serif;
  --font-data: 'IBM Plex Mono', 'Cascadia Mono', Consolas, monospace;

  --sp-1: 4px; --sp-2: 8px; --sp-3: 12px; --sp-4: 16px; --sp-5: 20px; --sp-6: 24px; --sp-8: 32px;
  --r-1: 4px; --r-2: 5px; --r-3: 8px;
  --shadow-1: none;
  --shadow-2: 0 2px 8px -4px oklch(25% 0.05 255 / .18);
  --shadow-pop: 0 8px 30px -8px oklch(22% 0.05 255 / .30);
  --ease-out: cubic-bezier(.19, .8, .32, 1);
  --ease-in-out: cubic-bezier(.5, 0, .22, 1);
  --dur-1: 130ms; --dur-2: 200ms;
  --focus-ring: 0 0 0 2px var(--paper-1), 0 0 0 4px var(--cur-4);
}

/* ---------------- base ---------------- */
*, *::before, *::after { box-sizing: border-box; }
html, body { overflow-x: clip; margin: 0; }
body {
  font-family: var(--font-ui); font-size: 13px; line-height: 1.5;
  color: var(--text-1); background: var(--paper-0);
  -webkit-font-smoothing: antialiased;
}
h1, h2, h3, h4 { font-style: normal; line-height: 1.25; margin: 0 0 var(--sp-3); color: var(--text-1); overflow-wrap: anywhere; min-width: 0; }
h2 { font-size: 15px; font-weight: 600; letter-spacing: -.01em; }
h3 { font-size: 11px; font-weight: 600; letter-spacing: .09em; text-transform: uppercase; color: var(--text-3); margin: 16px 0 6px; }
p { margin: 0 0 var(--sp-3); }
a { color: var(--cur-6); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 2px; }
button { font: inherit; }
::selection { background: var(--cur-wash); }
:focus-visible { outline: none; box-shadow: var(--focus-ring); border-radius: var(--r-1); }

.mono { font-family: var(--font-data); font-size: .93em; }
.amount { font-family: var(--font-data); font-size: .93em; font-variant-numeric: tabular-nums; white-space: nowrap; font-weight: 600; }
.muted { color: var(--text-3); }
.dim { color: var(--text-2); }
.small { font-size: 12px; }
.center { text-align: center; }
.right { text-align: right; }
.mt8 { margin-top: var(--sp-2); } .mt16 { margin-top: var(--sp-4); } .mb8 { margin-bottom: var(--sp-2); }
.flexrow { display: flex; align-items: center; gap: var(--sp-2); flex-wrap: wrap; }
.sp { flex: 1; }

/* annotation voice — wide-tracked caps (the "surveyed mark") */
.anno {
  font-size: 10.5px; font-weight: 600; letter-spacing: .09em; text-transform: uppercase; color: var(--text-2);
}

svg.ic { width: 16px; height: 16px; flex: none; stroke: currentColor; stroke-width: 1.7; fill: none;
  stroke-linecap: round; stroke-linejoin: round; vertical-align: -3px; }

/* ---------------- shell ---------------- */
.shell { display: flex; min-height: 100vh; }
.side {
  width: 216px; flex: none; background: var(--ink-1); color: var(--ink-text);
  display: flex; flex-direction: column; position: sticky; top: 0; height: 100vh;
  border-right: 1px solid var(--ink-0);
}
.brand { display: flex; gap: 10px; align-items: center; padding: 18px 16px 12px; }
.logo-badge {
  width: 34px; height: 34px; border-radius: 9px; background: linear-gradient(160deg, var(--cur-5), var(--cur-6));
  color: #fff; display: flex; align-items: center; justify-content: center; flex: none; font-weight: 700; font-size: 14px;
}
.logo-badge svg { width: 19px; height: 19px; stroke: #fff; stroke-width: 1.6; fill: none; stroke-linecap: round; stroke-linejoin: round; }
.brand .t { font-weight: 600; font-size: 14.5px; letter-spacing: -.01em; color: #fff; line-height: 1.2; }
.brand .s { font-size: 9px; letter-spacing: .1em; text-transform: uppercase; color: var(--ink-text-dim); margin-top: 2px; white-space: nowrap; }

.nav { flex: 1; overflow-y: auto; padding: 2px 10px 10px; scrollbar-width: thin; scrollbar-color: var(--ink-2) transparent; }
.nav .grp {
  font-size: 10px; font-weight: 600; letter-spacing: .12em; text-transform: uppercase;
  color: var(--ink-text-dim); opacity: .8; margin: 15px 8px 4px;
}
.nav a {
  display: flex; align-items: center; gap: 9px; color: var(--ink-text-dim);
  padding: 6px 10px; border-radius: var(--r-1); font-size: 12.5px; font-weight: 500;
  position: relative; margin-bottom: 1px;
  transition: background var(--dur-1) var(--ease-out), color var(--dur-1) var(--ease-out);
}
.nav a:hover { background: var(--ink-2); color: var(--ink-text); text-decoration: none; }
.nav a.on { background: var(--ink-2); color: #fff; }
.nav a.on::before {
  content: ''; position: absolute; left: -10px; top: 7px; bottom: 7px; width: 3px;
  border-radius: 0 2px 2px 0; background: var(--cur-4);
}
.nav svg.ic { width: 15px; height: 15px; opacity: .85; }
.nav .badge {
  margin-left: auto; background: var(--cur-5); color: #fff; border-radius: 99px;
  font-size: 10.5px; font-weight: 600; padding: 1px 7px; font-family: var(--font-data); line-height: 1.5;
}
.side .foot { padding: 10px 14px; font-size: 9.5px; letter-spacing: .02em; color: var(--ink-text-dim); border-top: 1px solid var(--ink-line); line-height: 1.6; }

.main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.topbar {
  display: flex; align-items: center; gap: var(--sp-3); padding: 8px 20px; min-height: 48px;
  background: var(--paper-1); border-bottom: 1px solid var(--line-1); position: sticky; top: 0; z-index: 40;
}
.topbar .pg { font-size: 13.5px; font-weight: 600; letter-spacing: -.005em; }
.userchip { display: flex; align-items: center; gap: 9px; }
.userchip .nm { font-size: 12.5px; font-weight: 600; line-height: 1.2; }
.userchip .rl { font-size: 11px; color: var(--text-3); line-height: 1.2; }
.av {
  width: 30px; height: 30px; border-radius: 50%; color: #fff; display: flex; align-items: center;
  justify-content: center; font-size: 11px; font-weight: 600; flex: none; letter-spacing: .02em;
}
.content { padding: 16px 20px 80px; max-width: 1380px; width: 100%; margin: 0 auto; }

/* ---------------- buttons — 8 states ---------------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px; cursor: pointer; user-select: none;
  font: 500 12.5px/1.2 var(--font-ui); color: var(--text-1); text-decoration: none;
  background: var(--paper-1); border: 1px solid var(--line-1); border-radius: var(--r-1);
  padding: 7px 13px; min-height: 31px; white-space: nowrap;
  transition: background var(--dur-1) var(--ease-out), border-color var(--dur-1) var(--ease-out),
              color var(--dur-1) var(--ease-out), transform var(--dur-1) var(--ease-out), box-shadow var(--dur-1) var(--ease-out);
}
.btn:hover { background: var(--paper-2); text-decoration: none; }
.btn:focus-visible { box-shadow: var(--focus-ring); }
.btn:active { transform: translateY(1px); }
.btn:disabled, .btn[disabled] { opacity: .5; cursor: not-allowed; transform: none; }
.btn[data-state="loading"] { opacity: .7; pointer-events: none; }
.btn.pri { background: var(--cur-5); border-color: var(--cur-6); color: #fff; }
.btn.pri:hover { background: var(--cur-6); }
.btn.grn { background: var(--green-5); border-color: var(--green-6); color: #fff; }
.btn.grn:hover { background: var(--green-6); }
.btn.red { background: var(--paper-1); border-color: var(--red-line); color: var(--red-6); }
.btn.red:hover { background: var(--red-wash); }
.btn.ai { background: var(--paper-1); border-color: var(--ai-line); color: var(--ai-5); }
.btn.ai:hover { background: var(--ai-wash); }
.btn.sm { padding: 4px 10px; min-height: 26px; font-size: 12px; }
.btn svg.ic { width: 14px; height: 14px; }
.linkbtn { background: none; border: 0; color: var(--cur-6); cursor: pointer; font: 500 12.5px var(--font-ui); padding: 4px 6px; border-radius: var(--r-1); }
.linkbtn:hover { text-decoration: underline; text-underline-offset: 2px; }

/* ---------------- cards / layout ---------------- */
.card {
  background: var(--paper-1); border: 1px solid var(--line-1); border-radius: var(--r-2);
  padding: 0 14px 14px; margin-bottom: 12px; min-width: 0;
}
.card > h2 {
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
  font-size: 11.5px; font-weight: 600; letter-spacing: .04em; color: var(--text-2);
  margin: 0 -14px 12px; padding: 9px 14px 8px; border-bottom: 1px solid var(--line-1);
  background: var(--paper-2);
}
.card > h2 .sp { flex: 1; }
/* a card whose first child is a table gets no side padding — grids run edge to edge */
.card > .scrollx:last-child { margin: 0 -14px -14px; }
.card > .scrollx:last-child > .tbl th:first-child,
.card > .scrollx:last-child > .tbl td:first-child { padding-left: 14px; }
.card > .scrollx:last-child > .tbl th:last-child,
.card > .scrollx:last-child > .tbl td:last-child { padding-right: 14px; }
.split { display: grid; grid-template-columns: minmax(0, 2.05fr) minmax(0, 1fr); gap: 12px; align-items: start; }
.split > .l, .split > .r { min-width: 0; }
.rowgrid { display: grid; gap: 10px; }
.g2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.g3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.g4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }

/* stat tiles — gauge voice */
/* one instrument band, divided by hairlines — the shape real consoles use */
.metricstrip {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(165px, 1fr));
  border: 1px solid var(--line-1); border-radius: var(--r-2); background: var(--paper-1);
  overflow: clip; margin-bottom: 12px;
}
.stat {
  background: var(--paper-1); border: 1px solid var(--line-1); border-radius: var(--r-2);
  padding: 10px 13px; position: relative; min-width: 0;
  display: flex; flex-direction: column; justify-content: flex-start;
}
.metricstrip > .stat { border: 0; border-right: 1px solid var(--line-1); border-radius: 0; }
.metricstrip > .stat:last-child { border-right: 0; }
.stat .v {
  font-family: var(--font-data); font-size: 18.5px; font-weight: 600; letter-spacing: -.02em;
  font-variant-numeric: tabular-nums; line-height: 1.15; overflow-wrap: anywhere; color: var(--text-1);
}
.stat .l {
  order: -1; margin: 0 0 5px; display: block; font-size: 9.5px; font-weight: 600;
  letter-spacing: .1em; text-transform: uppercase; color: var(--text-3); line-height: 1.4;
}
/* status is carried by the figure, not by a coloured stripe */
.stat.amb .v { color: var(--amber-6); }
.stat.grn .v { color: var(--green-6); }
.stat.red .v { color: var(--red-6); }
.stat.ai .v { color: var(--ai-5); }
a.stat { text-decoration: none; transition: background var(--dur-1) var(--ease-out); }
a.stat:hover { text-decoration: none; background: var(--paper-2); }
a.stat::after {
  content: ''; position: absolute; right: 11px; top: 12px; width: 5px; height: 5px;
  border-top: 1.5px solid var(--text-3); border-right: 1.5px solid var(--text-3); transform: rotate(45deg);
}

/* ---------------- tables ---------------- */
table.tbl { width: 100%; border-collapse: collapse; font-size: 12.5px; }
.tbl th {
  text-align: left; padding: 6px 10px; background: var(--paper-1);
  font-size: 9.5px; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; color: var(--text-3);
  border-bottom: 1px solid var(--line-1); white-space: nowrap;
}
.tbl th.right { text-align: right; }
.tbl td { padding: 6px 10px; border-bottom: 1px solid var(--line-2); vertical-align: top; }
.tbl tbody tr:last-child td { border-bottom: 0; }
.tbl .rowlink { cursor: pointer; }
.tbl .rowlink:hover td { background: var(--paper-2); }
.tbl .rowlink:active td { background: var(--paper-3); }
.tbl td.right { text-align: right; }
.tbl .mono { font-size: 12px; }
.scrollx { overflow-x: auto; }

/* ---------------- tags ---------------- */
.tag {
  display: inline-flex; align-items: center; gap: 5px; border-radius: 3px; padding: 1px 6px;
  background: var(--paper-2); border: 1px solid var(--line-1); color: var(--text-2); white-space: nowrap;
  font-size: 9.5px; font-weight: 600; letter-spacing: .07em; text-transform: uppercase;
}
.tag.green { background: var(--green-wash); border-color: var(--green-line); color: var(--green-6); }
.tag.amber { background: var(--amber-wash); border-color: var(--amber-line); color: var(--amber-6); }
.tag.red { background: var(--red-wash); border-color: var(--red-line); color: var(--red-6); }
.tag.blue { background: var(--cur-wash); border-color: var(--cur-line); color: var(--cur-6); }
.tag.grey { }
.tag.sim { background: var(--paper-2); border-style: dashed; color: var(--text-3); text-transform: none; letter-spacing: .02em; }
.tag.ai { background: var(--ai-wash); border-color: var(--ai-line); color: var(--ai-5); }

/* chips (filters) */
.chip {
  border: 1px solid var(--line-1); background: var(--paper-1); color: var(--text-2); cursor: pointer;
  border-radius: 3px; padding: 3px 10px; font: 500 11.5px var(--font-ui);
  transition: border-color var(--dur-1) var(--ease-out), color var(--dur-1) var(--ease-out), background var(--dur-1) var(--ease-out);
}
.chip:hover { border-color: var(--cur-line); color: var(--cur-6); }
.chip.on { background: var(--ink-1); border-color: var(--ink-1); color: #fff; }

/* ---------------- forms ---------------- */
.field { margin-bottom: var(--sp-3); min-width: 0; }
.field > label {
  display: block; margin-bottom: 4px;
  font-size: 10px; font-weight: 600; letter-spacing: .09em; text-transform: uppercase; color: var(--text-3);
}
.inp, .field input[type=text], .field input[type=number], .field input[type=date], .field input[type=month], .field select, .field textarea, select.inp {
  width: 100%; font: 400 13px var(--font-ui); color: var(--text-1);
  background: var(--paper-1); border: 1px solid var(--line-1); border-radius: var(--r-1);
  padding: 6px 9px; transition: border-color var(--dur-1) var(--ease-out), box-shadow var(--dur-1) var(--ease-out);
}
.inp:hover, .field input:hover, .field select:hover, .field textarea:hover { border-color: var(--cur-line); }
.inp:focus, .field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: var(--cur-4); box-shadow: 0 0 0 3px var(--cur-wash); }
.inp:disabled, .inp.locked { background: var(--paper-2); color: var(--text-2); cursor: not-allowed; }
.inp.err { border-color: var(--red-5); }
.field textarea, textarea.inp { min-height: 74px; resize: vertical; }
.inp.right { text-align: right; font-family: var(--font-data); }
.hint { font-size: 11.5px; color: var(--text-3); margin-top: 4px; line-height: 1.5; }
.bad { color: var(--red-6); font-weight: 600; }
input[type=file] { border: 1px dashed var(--line-1); background: var(--paper-2); padding: 8px; border-radius: var(--r-1); max-width: 100%; font-size: 12px; color: var(--text-2); font-family: var(--font-ui); }
input[type=checkbox], input[type=radio] { accent-color: var(--cur-5); width: 15px; height: 15px; }
/* numeric fields read as data, not as widgets — no browser spinners */
input[type=number]::-webkit-outer-spin-button, input[type=number]::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
input[type=number] { appearance: textfield; -moz-appearance: textfield; }
/* a visible ring for keyboard users only */
.btn:focus-visible, .chip:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible { outline: 2px solid var(--cur-5); outline-offset: 1px; }

/* ---------------- callouts ---------------- */
.callout {
  border: 0; border-left: 2px solid var(--cur-4); background: transparent; border-radius: 0;
  padding: 1px 0 1px 11px; font-size: 12px; margin: 10px 0; line-height: 1.55; color: var(--text-2);
}
.callout b { color: var(--text-1); }
.callout.amb { border-left-color: var(--amber-5); }
.callout.red { border-left-color: var(--red-5); background: var(--red-wash); padding: 8px 11px; border-radius: var(--r-1); }
.callout.grn { border-left-color: var(--green-5); }
.callout.ai { border-left-color: var(--ai-5); }

/* AI voice */
.ai-brief {
  border: 1px solid var(--line-1); border-left: 2px solid var(--ai-5); background: var(--paper-1);
  border-radius: var(--r-2); padding: 0 14px 12px; margin-bottom: 12px; font-size: 12px; line-height: 1.55;
}
.ai-brief .hd {
  display: flex; align-items: center; gap: 7px; font-weight: 600; font-size: 10px; color: var(--ai-5);
  margin: 0 -14px 10px; padding: 8px 14px 7px; letter-spacing: .1em; text-transform: uppercase;
  border-bottom: 1px solid var(--line-2); background: var(--paper-2);
}
.ai-brief ul { margin: 4px 0 0; padding-left: 17px; }
.ai-brief li { margin-bottom: 3px; }
.extract {
  font-size: 11.5px; color: var(--ai-5); background: var(--ai-wash); border: 1px solid var(--ai-line);
  border-radius: var(--r-1); padding: 5px 8px; margin-top: 5px; line-height: 1.5;
}

/* ---------------- flow stepper — nodes on a channel ---------------- */
.pill-steps { display: flex; align-items: flex-start; margin: 16px 2px 2px; max-width: 720px; }
.pill-steps .st { display: flex; flex-direction: column; align-items: center; gap: 5px; flex: 1; position: relative; text-align: center; min-width: 0; }
.pill-steps .st::before {
  content: ''; position: absolute; top: 5px; left: calc(-50% + 7px); right: calc(50% + 7px); height: 1.5px; background: var(--line-1);
}
.pill-steps .st:first-child::before { display: none; }
.pill-steps .st .nd { width: 11px; height: 11px; border-radius: 50%; border: 1.5px solid var(--line-1); background: var(--paper-1); z-index: 1; flex: none; }
.pill-steps .st .lb { font-size: 10.5px; color: var(--text-3); line-height: 1.3; max-width: 92px; overflow-wrap: anywhere; }
.pill-steps .st.done .nd { background: var(--cur-5); border-color: var(--cur-5); }
.pill-steps .st.done::before { background: var(--cur-4); }
.pill-steps .st.done .lb { color: var(--text-2); }
.pill-steps .st.cur .nd { border-color: var(--amber-5); box-shadow: 0 0 0 3px var(--amber-wash); }
.pill-steps .st.cur::before { background: var(--cur-4); }
.pill-steps .st.cur .lb { color: var(--amber-6); font-weight: 600; }

/* ---------------- budget gauge ---------------- */
.bw { border: 1px solid var(--line-1); border-radius: var(--r-1); padding: 11px 13px; background: var(--paper-2); margin: var(--sp-2) 0; }
.bw .ttl { display: flex; justify-content: space-between; align-items: center; gap: 8px; font-size: 12.5px; font-weight: 600; margin-bottom: 8px; flex-wrap: wrap; }
.bar {
  height: 12px; border-radius: 2px; background: var(--paper-3); overflow: hidden; display: flex;
  background-image: repeating-linear-gradient(90deg, transparent 0 calc(10% - 1px), var(--line-1) calc(10% - 1px) 10%);
}
.bar .seg { height: 100%; }
.bar .seg.act { background: var(--cur-6); }
.bar .seg.com { background: var(--cur-4); opacity: .55; }
.bar .seg.req { background: var(--amber-5); }
.bw .leg { display: flex; gap: 14px; font-size: 11px; color: var(--text-2); margin-top: 7px; flex-wrap: wrap; }
.bw .leg .sw { display: inline-block; width: 9px; height: 9px; border-radius: 2px; margin-right: 5px; vertical-align: -1px; }
.bw .nums { display: flex; gap: 24px; margin-top: 10px; flex-wrap: wrap; }
.bw .nums .n { font-family: var(--font-data); font-size: 13.5px; font-weight: 600; font-variant-numeric: tabular-nums; }
.bw .nums .n.bad { color: var(--red-5); }
.bw .nums .n.ok { color: var(--green-6); }
.bw .nums .k { font-size: 10px; letter-spacing: .08em; text-transform: uppercase; color: var(--text-3); margin-top: 1px; }

.pb-bar { height: 7px; border-radius: 2px; background: var(--paper-3); overflow: hidden; margin-top: 4px; }
.pb-bar > div { height: 100%; border-radius: 2px; transition: width var(--dur-2) var(--ease-out); }

/* ---------------- key-value ---------------- */
.kv { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 9px 20px; font-size: 12.5px; }
.kv > div { min-width: 0; }
.kv b { display: block; margin-bottom: 1px; font-size: 9.5px; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; color: var(--text-3); }

/* ---------------- timeline (audit) ---------------- */
.tl { list-style: none; margin: 0; padding: 0 0 0 2px; }
.tl li { position: relative; padding: 0 0 11px 18px; }
.tl li::before { content: ''; position: absolute; left: 4px; top: 6px; width: 7px; height: 7px; border-radius: 50%; background: var(--cur-4); }
.tl li::after { content: ''; position: absolute; left: 7px; top: 16px; bottom: -2px; width: 1px; background: var(--line-1); }
.tl li:last-child::after { display: none; }
.tl .a { font-size: 12.5px; font-weight: 600; }
.tl .m { font-size: 11.5px; color: var(--text-3); margin-top: 1px; line-height: 1.5; }

/* ---------------- notifications ---------------- */
.bell { position: relative; background: var(--paper-1); border: 1px solid var(--line-1); border-radius: var(--r-1); width: 34px; height: 34px; cursor: pointer; color: var(--text-2); display: flex; align-items: center; justify-content: center; transition: background var(--dur-1) var(--ease-out), color var(--dur-1) var(--ease-out); }
.bell:hover { background: var(--paper-2); color: var(--text-1); }
.bell .dot {
  position: absolute; top: -5px; right: -5px; background: var(--red-5); color: #fff; border-radius: 99px;
  font-size: 10px; font-weight: 600; min-width: 16px; height: 16px; display: flex; align-items: center; justify-content: center; padding: 0 4px;
  font-family: var(--font-data);
}
.notif-pop {
  position: absolute; right: 0; top: 40px; width: 370px; max-height: 440px; overflow-y: auto;
  background: var(--paper-1); border: 1px solid var(--line-1); border-radius: var(--r-2); box-shadow: var(--shadow-pop); z-index: 90;
}
.notif-pop .hd { padding: 10px 13px; border-bottom: 1px solid var(--line-1); font-weight: 600; font-size: 12.5px; position: sticky; top: 0; background: var(--paper-1); z-index: 1; }
.notif-pop .it { padding: 10px 13px; border-bottom: 1px solid var(--line-2); font-size: 12.5px; cursor: pointer; line-height: 1.5; }
.notif-pop .it:hover { background: var(--cur-wash); }
.notif-pop .it.unread { border-left: 3px solid var(--cur-5); background: oklch(97.5% 0.012 250); }
.notif-pop .ts { font-size: 11px; color: var(--text-3); margin-top: 2px; }

/* ---------------- toasts ---------------- */
.toast-wrap { position: fixed; bottom: 18px; right: 18px; z-index: 300; display: flex; flex-direction: column; gap: 8px; max-width: 380px; }
.toast {
  background: var(--ink-1); color: var(--ink-text); border-radius: var(--r-2); padding: 11px 15px;
  font-size: 13px; box-shadow: var(--shadow-pop); border-left: 3px solid var(--cur-4);
  animation: rise-in var(--dur-2) var(--ease-out); line-height: 1.5;
}
@keyframes rise-in { from { opacity: 0; transform: translateY(8px); } }

/* ---------------- modal ---------------- */
.modal-ov { position: fixed; inset: 0; background: oklch(20% 0.03 255 / .45); z-index: 250; display: flex; align-items: center; justify-content: center; padding: 20px; }
/* click-away layer: a sibling behind the panel, so clicks inside it never close */
.modal-back { position: absolute; inset: 0; }
.modal { position: relative; background: var(--paper-1); border-radius: var(--r-3); box-shadow: var(--shadow-pop); width: 470px; max-width: 100%; padding: 18px 20px; animation: rise-in var(--dur-2) var(--ease-out); }
.modal .mh { font-weight: 600; font-size: 14.5px; margin-bottom: 4px; }
.modal .ms { font-size: 12.5px; color: var(--text-2); margin-bottom: 12px; line-height: 1.55; }
.modal textarea { width: 100%; margin-bottom: 12px; }
.modal .mf { display: flex; justify-content: flex-end; gap: 8px; }
/* wide form modal — scrolls its own body so the footer buttons stay put */
.modal.wide { width: 780px; }
.modal .mhrow { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.modal .mx { flex: none; line-height: 1; padding: 4px 7px; }
.modal .mbody { max-height: 62vh; overflow-y: auto; margin-bottom: 14px; padding: 2px; }

/* ---------------- login ---------------- */
.login-wrap {
  min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 24px;
  background:
    radial-gradient(1100px 520px at 88% -12%, oklch(31% 0.06 250 / .6), transparent 62%),
    radial-gradient(700px 400px at -10% 110%, oklch(28% 0.05 250 / .5), transparent 60%),
    var(--ink-0);
}
.login-card {
  width: 900px; max-width: 100%; background: var(--paper-1); border-radius: 16px; box-shadow: var(--shadow-pop);
  overflow: clip; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.3fr); padding: 0;
}
.login-left {
  background: var(--ink-1); color: var(--ink-text); padding: 30px 28px; display: flex; flex-direction: column; gap: 12px; position: relative;
}
.login-left h1 { color: #fff; font-size: 20px; font-weight: 600; letter-spacing: -.015em; margin: 8px 0 0; }
.login-left .sub { color: var(--ink-text-dim); font-size: 12.5px; line-height: 1.6; }
.login-left .chan { flex: 1; min-height: 12px; }
.login-mods { display: flex; flex-direction: column; gap: 13px; margin-top: 16px; }
.login-mods .m { display: flex; gap: 11px; align-items: flex-start; }
.login-mods .m svg.ic { width: 16px; height: 16px; color: var(--cur-4); margin-top: 2px; }
.login-mods .m b { display: block; color: #fff; font-size: 12.5px; font-weight: 600; line-height: 1.35; }
.login-mods .m span { display: block; color: var(--ink-text-dim); font-size: 11px; line-height: 1.45; }
.ms-btn {
  display: flex; align-items: center; justify-content: center; gap: 9px; background: #fff; color: #1b1b1b;
  border: 0; border-radius: var(--r-1); padding: 11px 14px; font: 600 13px var(--font-ui); cursor: pointer; width: 100%;
}
.ms-btn:hover { background: #f1f3f6; }
.ms-note { font-size: 11px; color: var(--ink-text-dim); line-height: 1.55; }
.login-right { padding: 26px 28px; min-width: 0; }
.persona-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; margin: 12px 0; }
.persona {
  display: flex; align-items: center; gap: 10px; text-align: left; background: var(--paper-1);
  border: 1px solid var(--line-1); border-radius: var(--r-2); padding: 9px 11px; cursor: pointer; min-width: 0;
  transition: border-color var(--dur-1) var(--ease-out), background var(--dur-1) var(--ease-out);
}
.persona:hover { border-color: var(--cur-line); background: var(--cur-wash); }
.persona:focus-visible { box-shadow: var(--focus-ring); outline: none; }
.persona .av { width: 34px; height: 34px; }
.persona .nm { font-size: 13px; font-weight: 600; line-height: 1.25; }
.persona .tt { font-size: 11px; color: var(--text-3); line-height: 1.3; }
.demo-note { font-size: 11.5px; color: var(--text-3); line-height: 1.6; border-top: 1px solid var(--line-2); padding-top: 12px; }

/* ---------------- charts ---------------- */
.chart-wrap { overflow-x: auto; }
.chart-wrap svg text, svg.chart text { font-family: var(--font-ui); }
.sparkline { vertical-align: middle; }

/* ---------------- MIS grid ---------------- */
.mis-grid { font-size: 12.5px; }
.mis-grid td, .mis-grid th { padding: 5px 8px; }
.mis-grid input { padding: 4px 7px; font-size: 12.5px; text-align: right; font-family: var(--font-data); }
.mis-grid .sect td { background: var(--paper-2); font-weight: 600; font-size: 10.5px; letter-spacing: .07em; text-transform: uppercase; color: var(--text-2); }
.mis-grid .total td { border-top: 1.5px solid var(--text-2); font-weight: 600; }

/* ---------------- AI drawer ---------------- */
.ai-fab {
  position: fixed; right: 20px; bottom: 20px; z-index: 120; display: flex; align-items: center; gap: 8px;
  background: var(--ink-1); border: 1px solid var(--ink-2); color: #fff; border-radius: 99px; padding: 10px 16px;
  font: 600 13px var(--font-ui); cursor: pointer; box-shadow: var(--shadow-pop);
  transition: background var(--dur-1) var(--ease-out), transform var(--dur-1) var(--ease-out);
}
.ai-fab:hover { background: var(--ink-2); }
.ai-fab:active { transform: translateY(1px); }
.ai-fab svg.ic { color: var(--cur-4); }
.ai-drawer {
  position: fixed; top: 0; right: 0; bottom: 0; width: 410px; max-width: 94vw; z-index: 240;
  background: var(--paper-1); border-left: 1px solid var(--line-1); box-shadow: var(--shadow-pop);
  display: flex; flex-direction: column; animation: drawer-in var(--dur-2) var(--ease-out);
}
@keyframes drawer-in { from { transform: translateX(30px); opacity: 0; } }
.ai-drawer .hd { display: flex; align-items: center; gap: 8px; padding: 13px 16px; border-bottom: 1px solid var(--line-1); font-weight: 600; font-size: 13.5px; }
.ai-drawer .bd { flex: 1; overflow-y: auto; padding: 14px 16px; display: flex; flex-direction: column; gap: 10px; }
.ai-drawer .ft { padding: 12px 16px; border-top: 1px solid var(--line-1); }
.ai-msg { border-radius: var(--r-2); padding: 9px 12px; font-size: 12.5px; line-height: 1.55; max-width: 95%; overflow-wrap: anywhere; }
.ai-msg.user { background: var(--cur-wash); border: 1px solid var(--cur-line); align-self: flex-end; }
.ai-msg.bot { background: var(--paper-2); border: 1px solid var(--line-1); align-self: flex-start; }
.ai-msg.bot table { border-collapse: collapse; margin: 6px 0 2px; font-size: 12px; width: 100%; }
.ai-msg.bot td, .ai-msg.bot th { border-bottom: 1px solid var(--line-1); padding: 3px 8px 3px 0; text-align: left; }
.ai-msg.bot th { white-space: nowrap; font-size: 10px; letter-spacing: .06em; text-transform: uppercase; color: var(--text-2); }
.ai-msg.bot td.right { text-align: right; }
.ai-sug { display: flex; flex-wrap: wrap; gap: 6px; }

/* ---------------- misc ---------------- */
.rule { border: 0; border-top: 1px solid var(--line-1); margin: var(--sp-4) 0; }
/* sample-document pickers */
.samples { display: flex; flex-wrap: wrap; gap: 5px; align-items: center; margin-top: 6px; }
.samples-lb { font-size: 10px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--text-3); margin-right: 2px; }
.samples .chip { padding: 3px 9px; font-size: 11.5px; }
.samples .chip:hover { background: var(--cur-wash); }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.empty { text-align: center; padding: 34px 16px; color: var(--text-3); font-size: 12.5px; }
.empty svg.ic { width: 26px; height: 26px; stroke-width: 1.4; margin-bottom: 6px; }
.subgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(155px, 1fr)); gap: 8px; }
.subcell { border: 1px solid var(--line-1); border-radius: var(--r-1); padding: 8px 10px; font-size: 12px; background: var(--paper-1); min-width: 0; }
.subcell.ok { border-color: var(--green-line); background: var(--green-wash); }
.subcell.due { border-color: var(--amber-line); background: var(--amber-wash); }
.bottomnav { display: none; }

/* ---------------- print ---------------- */
#printzone { display: none; }
@media print {
  @page { size: A4; margin: 12mm 12mm 10mm; }
  body > *:not(#printzone) { display: none !important; }
  #printzone { display: block; }
  .printonly { font-family: var(--font-ui); color: #16202e; font-size: 10.5px; line-height: 1.45; }
  .printonly .lh { display: flex; justify-content: space-between; align-items: flex-start; border-bottom: 2.5px solid #16233a; padding-bottom: 7px; }
  .printonly .lh .org { font-size: 22px; font-weight: 700; letter-spacing: .1em; color: #16233a; line-height: 1; }
  .printonly .lh .orgsub { font-size: 8.5px; color: #55617a; margin-top: 4px; line-height: 1.5; }
  .printonly .lh-r { text-align: right; }
  .printonly .lh .dt { font-size: 9.5px; font-weight: 600; }
  .printonly .lh .sys { font-size: 8px; color: #7a8496; margin-top: 2px; }
  .printonly h1 { font-size: 14px; font-weight: 700; letter-spacing: .14em; margin: 12px 0 3px; color: #16233a; }
  .printonly .phead { font-size: 9.5px; color: #46536b; margin-bottom: 10px; line-height: 1.5; }
  .printonly .cols { display: flex; gap: 10px; margin-bottom: 9px; }
  .printonly .col { flex: 1; border: 1px solid #b8c1cf; padding: 7px 9px; font-size: 10px; line-height: 1.5; }
  .printonly .ch { font-size: 8px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: #6b7689; margin-bottom: 3px; }
  .printonly table { width: 100%; border-collapse: collapse; margin: 8px 0; }
  .printonly th, .printonly td { border: 1px solid #b8c1cf; padding: 5px 7px; text-align: left; font-size: 10px; vertical-align: top; }
  .printonly th { background: #eef1f5; font-size: 8px; text-transform: uppercase; letter-spacing: .09em; color: #46536b; font-weight: 700; }
  .printonly .words { font-size: 9.5px; font-style: italic; color: #46536b; margin: -2px 0 8px; }
  .printonly .fn { font-size: 8.5px; color: #6b7689; margin: -4px 0 8px; line-height: 1.5; }
  .printonly .tc { border: 1px solid #b8c1cf; padding: 8px 10px; margin: 9px 0; }
  .printonly .tc ol { margin: 4px 0 0; padding-left: 15px; }
  .printonly .tc li { font-size: 9px; line-height: 1.55; margin-bottom: 2.5px; }
  .printonly .tc p { font-size: 9.5px; line-height: 1.6; margin: 3px 0 0; }
  .printonly .hist td, .printonly .hist th { font-size: 8.5px; line-height: 1.6; }
  .printonly .sig { display: flex; gap: 12px; margin-top: 26px; }
  .printonly .sig div { flex: 1; border-top: 1px solid #16233a; padding-top: 5px; font-size: 8.5px; text-align: center; color: #46536b; }
  .printonly .pfoot { margin-top: 14px; border-top: 1px solid #d5dbe4; padding-top: 5px; font-size: 7.5px; color: #8a94a6; text-align: center; letter-spacing: .04em; }
}

/* ---------------- responsive ---------------- */
@media (max-width: 1080px) {
  .split { grid-template-columns: minmax(0, 1fr); }
  .g4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 768px) {
  .side { display: none; }
  .topbar #gsearch { display: none; }
  /* 16px inputs stop iOS Safari from zooming the page on focus */
  input, select, textarea, .inp { font-size: 16px; }
  .content { padding: 14px 12px 90px; }
  .topbar { padding: 8px 12px; }
  .topbar .pg { font-size: 14px; }
  .userchip .rl { display: none; }
  .g2, .g3, .g4 { grid-template-columns: minmax(0, 1fr); }
  .login-card { grid-template-columns: minmax(0, 1fr); }
  .persona-grid { grid-template-columns: minmax(0, 1fr); }
  /* native-style bottom tab bar — the mobile app experience */
  .bottomnav {
    display: flex; position: fixed; left: 0; right: 0; bottom: 0; z-index: 110;
    background: var(--ink-1); border-top: 1px solid var(--ink-0);
    padding: 6px max(8px, env(safe-area-inset-left)) calc(6px + env(safe-area-inset-bottom)) max(8px, env(safe-area-inset-right));
  }
  .bottomnav a {
    flex: 1; display: flex; flex-direction: column; align-items: center; gap: 3px; position: relative;
    color: var(--ink-text-dim); font-size: 10px; font-weight: 600; letter-spacing: .02em;
    padding: 6px 0 4px; border-radius: var(--r-1); min-height: 44px; justify-content: center;
  }
  .bottomnav a:hover { text-decoration: none; }
  .bottomnav a svg.ic { width: 19px; height: 19px; }
  .bottomnav a.on { color: #fff; }
  .bottomnav a.on svg.ic { color: var(--cur-4); }
  .bn-dot {
    position: absolute; top: 1px; right: calc(50% - 21px); font-style: normal;
    background: var(--red-5); color: #fff; border-radius: 99px; font-size: 9px; min-width: 15px; height: 15px;
    display: flex; align-items: center; justify-content: center; padding: 0 3px; font-family: var(--font-data);
  }
  .content { padding-bottom: 120px; }
  .ai-fab { bottom: 76px; }
  .toast-wrap { bottom: 74px; }
  .ai-drawer { width: 100vw; max-width: 100vw; }
  .notif-pop { width: min(370px, 92vw); }
  .pill-steps { flex-wrap: wrap; gap: 8px 0; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 1ms !important; transition-duration: 1ms !important; }
}


/* ---------------- record header — the identity band on a document ---------------- */
.rechead { display: flex; justify-content: space-between; align-items: flex-start; gap: 14px; flex-wrap: wrap; }
.rechead .ttl { display: flex; align-items: center; gap: 9px; flex-wrap: wrap; }
.rechead h2 { font-size: 15px !important; font-weight: 600 !important; letter-spacing: -.01em !important;
  text-transform: none !important; color: var(--text-1) !important; background: none !important;
  border: 0 !important; margin: 0 !important; padding: 0 !important; }
.card.record { padding-top: 14px; }
.card.record > h2 { display: none; }

/* section rule — separates blocks inside a panel without another box */
.secrule { display: flex; align-items: center; gap: 9px; margin: 16px 0 9px; }
.secrule span { font-size: 10px; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; color: var(--text-3); white-space: nowrap; }
.secrule::after { content: ''; flex: 1; height: 1px; background: var(--line-1); }


/* ---------------- panel toolbar (list & workspace headers) ---------------- */
.cardbar {
  display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap;
  margin: 0 -14px 12px; padding: 8px 14px; border-bottom: 1px solid var(--line-1); background: var(--paper-2);
}
.cardbar h2 {
  font-size: 11.5px !important; font-weight: 600 !important; letter-spacing: .04em !important;
  color: var(--text-2) !important; margin: 0 !important; padding: 0 !important;
  border: 0 !important; background: none !important; text-transform: none !important;
}
.cardbar .btn { min-height: 27px; padding: 5px 11px; font-size: 12px; }
/* the gauge is content inside a panel, not another box */
.card > .bw, .card > div > .bw { border: 0; background: transparent; padding: 0; margin: 2px 0 0; }


/* ---------------- empty states never wear a panel header ---------------- */
.card.empty { padding: 30px 18px; text-align: center; }
.card.empty > h2, .card > .empty h2, .empty h2 {
  display: block; font-size: 14px; font-weight: 600; letter-spacing: -.01em; text-transform: none;
  color: var(--text-1); background: none; border: 0; margin: 10px 0 5px; padding: 0;
}
.empty p { max-width: 470px; margin-left: auto !important; margin-right: auto !important; line-height: 1.6; }
.empty svg.ic { width: 24px; height: 24px; stroke-width: 1.5; stroke: var(--text-3); margin: 0; }

/* ---------------- RFQ / vendor bidding ---------------- */
.pmem { font-size: 12px; background: #f0f5ec; border: 1px solid #cfe0c5; border-radius: 8px; padding: 8px 12px; margin-top: 8px; color: #2e4a2a; line-height: 1.55; }
.pmem .bad { color: var(--red-6); } .pmem .good { color: #1b7d4f; }
.good { color: #1b7d4f; font-weight: 600; }

/* vendor magic-link page — standalone, mobile-first */
.vq-wrap { min-height: 100vh; background: linear-gradient(160deg, #0e1a2b 0%, #152439 100%); padding: 26px 14px; display: flex; justify-content: center; align-items: flex-start; }
.vq-card { background: #fff; border-radius: 16px; max-width: 720px; width: 100%; padding: 26px 30px 30px; box-shadow: 0 30px 80px rgba(0,0,0,.45); }
.vq-band { display: flex; align-items: center; gap: 8px; font-weight: 700; color: #0e1a2b; font-size: 13px; letter-spacing: .08em; text-transform: uppercase; border-bottom: 2px solid #0e1a2b; padding-bottom: 10px; margin-bottom: 16px; }
.vq-card h2 { font-size: 20px; margin-bottom: 12px; }
.vq-card h3 { font-size: 11px; letter-spacing: .1em; text-transform: uppercase; color: var(--text-3); margin: 18px 0 10px; }
.vq-req { font-weight: 400; text-transform: none; letter-spacing: 0; color: var(--red-6); }
.vq-meta { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; background: var(--paper-1); border: 1px solid var(--line-2); border-radius: 10px; padding: 12px 14px; }
.vq-meta span { display: block; font-size: 10px; letter-spacing: .08em; text-transform: uppercase; color: var(--text-3); }
.vq-meta b { font-size: 13.5px; }
.vq-note { margin-top: 10px; font-size: 12.5px; background: #fdf6e7; border: 1px solid #ecd9ab; border-radius: 8px; padding: 8px 12px; display: flex; gap: 8px; align-items: flex-start; }
.vq-prog { margin: 14px 0 4px; }
.vq-prog .bar { height: 8px; background: var(--paper-2); border-radius: 5px; overflow: hidden; margin-bottom: 4px; }
.vq-prog .bar i { display: block; height: 100%; background: linear-gradient(90deg, #3d6db5, #2e9e6b); border-radius: 5px; transition: width .3s; }
.vq-prog span { font-size: 11.5px; color: var(--text-3); }
.vq-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 10px 14px; }
.vq-submit { width: 100%; margin-top: 16px; padding: 12px; font-size: 15px; justify-content: center; }
.vq-ok { width: 64px; height: 64px; margin: 8px auto 12px; border-radius: 50%; background: #e7f4ec; color: #1b7d4f; display: flex; align-items: center; justify-content: center; }
.vq-ok svg { width: 32px; height: 32px; }
.vq-sum { display: flex; justify-content: space-between; align-items: center; background: var(--paper-1); border: 1px solid var(--line-2); border-radius: 10px; padding: 12px 16px; margin-top: 14px; font-size: 14px; }
@media (max-width: 560px) { .vq-card { padding: 18px 16px 22px; } .vq-wrap { padding: 10px 6px; } }

/* approver magic-link page — same standalone family as the vendor page */
.al-meta { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 10px; }
.al-facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; background: var(--paper-1); border: 1px solid var(--line-2); border-radius: 10px; padding: 12px 14px; margin-top: 4px; }
.al-facts span i { display: block; font-style: normal; font-size: 10px; letter-spacing: .08em; text-transform: uppercase; color: var(--text-3); }
.al-facts b { font-size: 13.5px; }
.al-warn { margin-top: 10px; font-size: 12.5px; background: #fdeeee; border: 1px solid #ecc0c0; border-radius: 8px; padding: 8px 12px; color: var(--red-6); display: flex; gap: 8px; align-items: flex-start; font-weight: 600; }
.al-warn svg { width: 16px; height: 16px; flex-shrink: 0; margin-top: 1px; }
.al-done { margin-bottom: 14px; font-size: 13px; background: #e7f4ec; border: 1px solid #bfe0cd; border-radius: 8px; padding: 10px 12px; color: #1b7d4f; font-weight: 600; display: flex; gap: 8px; align-items: flex-start; }
.al-done svg { width: 16px; height: 16px; flex-shrink: 0; margin-top: 1px; }

/* per-line specifications */
.specline { font-size: 11px; color: var(--text-3); margin-top: 2px; line-height: 1.45; }
.inp.specin { margin-top: 4px; font-size: 11.5px; color: var(--text-2); }

/* price memory — clickable card + history panel */
.pmcard { display: flex; align-items: center; gap: 12px; width: 100%; text-align: left; cursor: pointer;
  background: #f0f5ec; border: 1px solid #cfe0c5; border-radius: 10px; padding: 9px 14px; margin-top: 8px;
  font-family: var(--font-ui); transition: border-color .15s, box-shadow .15s; }
.pmcard:hover { border-color: #9dbf8e; box-shadow: 0 2px 10px rgba(46,125,84,.12); }
.pmcard .pm-ic { color: #2e7d54; flex: none; }
.pmcard .pm-body { flex: 1; min-width: 0; }
.pmcard .pm-t { display: block; font-size: 9.5px; letter-spacing: .1em; font-weight: 700; color: #2e5a2a; margin-bottom: 4px; }
.pmcard .pm-chips { display: flex; flex-wrap: wrap; gap: 6px 14px; }
.pmcard .pm-chip { font-size: 12px; color: #2e4a2a; }
.pmcard .pm-chip i { font-style: normal; color: #6a8264; margin-right: 5px; font-size: 11px; }
.pmcard .pm-chip b { font-family: var(--font-data); }
.pmcard .pm-chip.hot b { color: var(--red-6); }
.pmcard .pm-chip.cool b { color: #1b7d4f; }
.pmcard .pm-go { flex: none; font-size: 11.5px; font-weight: 600; color: #2e7d54; white-space: nowrap; }
.pm-stats { display: flex; gap: 20px; flex-wrap: wrap; margin: 4px 0 12px; }
.pm-stats span i { font-style: normal; display: block; font-size: 10px; letter-spacing: .08em; text-transform: uppercase; color: var(--text-3); }
.pm-stats span b { font-size: 16px; font-family: var(--font-data); }

/* Excel-style sheet preview */
.xl-modal { max-width: 900px; width: 94vw; }
.xl-bar { display: flex; align-items: center; gap: 6px; background: #1e6e42; color: #fff; border-radius: 8px 8px 0 0; padding: 8px 12px; margin: -18px -18px 0; }
.xl-dot { width: 10px; height: 10px; border-radius: 50%; display: inline-block; }
.xl-dot.r { background: #ff5f57; } .xl-dot.y { background: #febc2e; } .xl-dot.g { background: #28c840; }
.xl-title { margin-left: 8px; font-size: 12px; opacity: .95; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.xl-wrap { max-height: 420px; overflow: auto; border: 1px solid #c9d4e2; margin-top: 0; }
table.xl { border-collapse: collapse; width: 100%; font-size: 11.5px; font-family: 'Calibri', var(--font-ui); }
.xl th.xl-cl { background: #e9edf2; border: 1px solid #c9d4e2; padding: 2px 8px; font-weight: 600; color: #444; width: 19%; }
.xl th.xl-rn { background: #e9edf2; border: 1px solid #c9d4e2; padding: 2px 6px; font-weight: 600; color: #666; width: 34px; text-align: center; font-size: 10.5px; }
.xl td { border: 1px solid #dbe2ea; padding: 3px 8px; white-space: nowrap; max-width: 300px; overflow: hidden; text-overflow: ellipsis; background: #fff; }
.xl td.xl-head { background: #f3f6fa; font-weight: 600; }
.xl td.xl-fill { background: #fff3bf; position: relative; min-width: 110px; }
.xl .xl-cue { color: #b8860b; font-size: 10px; font-style: italic; }
