/* ─────────────────────────────────────────────────────────────
   Tire recycling system — UI ported from the nidava-dashboard template
   (src/app/globals.css). Customer brand: accent #2E7D4F, ♻ mark.
   Template sections are kept as-is; app-specific rules are at the end.
   ───────────────────────────────────────────────────────────── */

:root {
  color-scheme: light;

  /* brand slots (overridden by BrandProvider) */
  --accent: #2E7D4F;
  --on-accent: #FFFFFF;
  --accent-text: var(--accent);
  --font-brand: "Alexandria", system-ui, sans-serif;

  /* derived accent tints — every chart, active state and focus ring uses these */
  --accent-hover: color-mix(in oklab, var(--accent) 86%, black);
  --accent-soft: color-mix(in oklab, var(--accent) 8%, white);
  --accent-soft-2: color-mix(in oklab, var(--accent) 16%, white);
  --accent-line: color-mix(in oklab, var(--accent) 38%, white);
  --accent-deep: color-mix(in oklab, var(--accent) 38%, #0B0D10);

  /* neutrals (NIDAVA paper + ink; kept for every client) */
  --paper: #F2F2EE;
  --paper-2: #E9E9E3;
  --surface: #FFFFFF;
  --ink: #151515;
  --ink-2: #3B3B37;
  --muted: #707069;
  --line: rgba(21, 21, 21, .08);
  --line-strong: rgba(21, 21, 21, .16);

  /* meaning only — never decoration */
  --pos: #2E7D4F;
  --pos-soft: #E6F2EA;
  --neg: #A2412A;
  --neg-soft: #F7E8E3;
  --warn: #9A6410;
  --warn-soft: #F7EEDC;

  /* shape + rhythm */
  --r-card: 18px;
  --r-ctrl: 10px;
  --r-pill: 999px;
  --ctrl-h: 40px;
  --gutter: 28px;
  --topbar-h: 68px;
  --shadow-card: 0 1px 2px rgba(15, 29, 51, .04), 0 10px 30px -18px rgba(15, 29, 51, .18);
  --shadow-lift: 0 2px 4px rgba(15, 29, 51, .05), 0 22px 44px -22px rgba(15, 29, 51, .28);
  --shadow-pop: 0 16px 40px rgba(15, 29, 51, .16), 0 2px 6px rgba(15, 29, 51, .06);
  --ease: cubic-bezier(.2, .8, .2, 1);
  --spring: cubic-bezier(.34, 1.36, .5, 1);
}

@media (max-width: 1199px) { :root { --gutter: 22px; } }
@media (max-width: 767px)  { :root { --gutter: 16px; --topbar-h: 60px; --r-card: 16px; } }

* { box-sizing: border-box; margin: 0; padding: 0; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
body {
  background:
    radial-gradient(900px 420px at 100% -8%, var(--accent-soft-2), transparent 62%),
    radial-gradient(700px 380px at 0% 0%, color-mix(in oklab, var(--accent) 6%, transparent), transparent 70%),
    var(--paper);
  background-attachment: fixed;
  color: var(--ink);
  font-family: var(--font-brand);
  font-size: 14px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
button, input, select { font: inherit; color: inherit; }
button { cursor: pointer; background: none; border: 0; }
::selection { background: var(--accent); color: var(--on-accent); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.num { font-variant-numeric: tabular-nums; }
.ltr { direction: ltr; unicode-bidi: isolate; }
[dir="rtl"] .flip-rtl { transform: scaleX(-1); }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.muted { color: var(--muted); }
@media (max-width: 767px) { .hide-sm { display: none !important; } }

/* ── motion primitives ─────────────────────────────────── */
.reveal { opacity: 0; transform: translateY(18px) scale(.985); transition: opacity .7s var(--ease), transform .8s var(--ease); transition-delay: calc(var(--i, 0) * 80ms); }
.reveal.in { opacity: 1; transform: none; }
.page-in { animation: pageIn .5s var(--ease) both; }
@keyframes pageIn { from { opacity: 0; transform: translateY(10px); } }
@keyframes fade { from { opacity: 0; } }
@keyframes pop { from { opacity: 0; transform: translateY(-4px) scale(.98); } }
@keyframes draw { to { stroke-dashoffset: 0; } }
@keyframes rowIn { from { opacity: 0; transform: translateY(6px); } }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; animation-delay: 0s !important; transition-duration: .001ms !important; transition-delay: 0s !important; }
  .reveal { opacity: 1; transform: none; }
}

/* ── shell: topbar + floating dock + command palette (no sidebar) ── */
.app { min-height: 100dvh; display: flex; flex-direction: column; }
.content { padding: 8px var(--gutter) 128px; width: 100%; max-width: 1480px; margin-inline: auto; }
.scrim { position: fixed; inset: 0; background: rgba(11, 13, 16, .34); backdrop-filter: blur(2px); z-index: 25; animation: fade .25s; }

/* topbar — transparent at rest, glass once the page scrolls */
.topbar {
  position: sticky; top: 0; z-index: 20;
  display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); align-items: center; gap: 16px;
  height: var(--topbar-h); padding-inline: var(--gutter);
  border-bottom: 1px solid transparent;
  transition: background .3s, border-color .3s, box-shadow .3s, backdrop-filter .3s;
}
.topbar[data-scrolled="true"] {
  background: color-mix(in srgb, var(--paper) 78%, transparent);
  backdrop-filter: blur(16px) saturate(1.4);
  border-bottom-color: var(--line);
  box-shadow: 0 8px 24px -20px rgba(15, 29, 51, .4);
}
.top-start, .top-end { display: flex; align-items: center; gap: 8px; min-width: 0; }
.top-end { justify-content: flex-end; }
.top-brand { display: flex; align-items: center; gap: 10px; flex: none; }
.top-brand .wordmark { font-weight: 500; letter-spacing: .08em; font-size: 15px; direction: ltr; white-space: nowrap; }
.top-brand .mark { transition: transform .5s var(--spring); }
.top-brand:hover .mark { transform: rotate(-8deg) scale(1.06); }
.top-branch {
  display: flex; align-items: center; gap: 6px; min-width: 0;
  height: 32px; padding-inline: 10px; margin-inline-start: 6px; border-radius: var(--r-pill);
  background: color-mix(in srgb, var(--surface) 70%, transparent); border: 1px solid var(--line);
  color: var(--muted); cursor: pointer; transition: background .2s, border-color .2s;
}
.top-branch:hover { background: var(--surface); border-color: var(--line-strong); }
.top-branch select { appearance: none; border: 0; background: none; font-size: 12.5px; color: var(--ink-2); cursor: pointer; outline: none; min-width: 0; text-overflow: ellipsis; }

/* the command bar is the centre of the screen: search, jump, act, ask */
.cmd-trigger {
  position: relative; display: flex; align-items: center; gap: 10px;
  width: clamp(320px, 34vw, 520px); height: 42px; padding-inline: 14px 8px;
  border-radius: 14px; color: var(--muted); font-size: 13.5px;
  background: color-mix(in srgb, var(--surface) 88%, transparent);
  border: 1px solid var(--line);
  box-shadow: 0 1px 2px rgba(0,0,0,.03), 0 8px 24px -18px rgba(15,29,51,.25);
  transition: border-color .25s, box-shadow .3s, transform .3s var(--ease);
}
.cmd-trigger::before {
  content: ""; position: absolute; inset: -1px; border-radius: inherit; padding: 1px; pointer-events: none;
  background: linear-gradient(100deg, transparent 20%, var(--accent-line), var(--accent), var(--accent-line), transparent 80%) 0 0 / 250% 100%;
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor; mask-composite: exclude;
  opacity: 0; transition: opacity .3s;
}
.cmd-trigger:hover { transform: translateY(-1px); box-shadow: 0 1px 2px rgba(0,0,0,.03), 0 14px 30px -18px color-mix(in oklab, var(--accent) 60%, transparent); }
.cmd-trigger:hover::before { opacity: 1; animation: sheen 2.2s linear infinite; }
@keyframes sheen { to { background-position: -250% 0; } }
.cmd-trigger .txt { flex: 1; text-align: start; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
kbd { font-family: inherit; font-size: 11px; color: var(--muted); background: var(--paper); border: 1px solid var(--line); border-radius: 6px; padding: 1px 6px; white-space: nowrap; }
kbd span { direction: ltr; unicode-bidi: isolate; }

.avatar { width: 36px; height: 36px; border-radius: 50%; background: linear-gradient(135deg, var(--accent-soft-2), var(--accent-soft)); color: var(--accent-text); display: grid; place-items: center; font-weight: 500; font-size: 13px; flex: none; box-shadow: inset 0 0 0 1px color-mix(in oklab, var(--accent) 16%, transparent); }
.dot-badge { position: relative; }
.dot-badge::after { content: ""; position: absolute; top: 9px; inset-inline-end: 10px; width: 7px; height: 7px; border-radius: 50%; background: var(--neg); box-shadow: 0 0 0 2px var(--paper); animation: ping 2.4s ease-out infinite; }
@keyframes ping { 0%, 70%, 100% { box-shadow: 0 0 0 2px var(--paper), 0 0 0 2px rgba(162,65,42,.0); } 80% { box-shadow: 0 0 0 2px var(--paper), 0 0 0 6px rgba(162,65,42,.18); } }

@media (max-width: 1199px) {
  .top-branch { display: none; }
  .cmd-trigger { width: clamp(240px, 36vw, 380px); }
}
@media (max-width: 767px) {
  .topbar { grid-template-columns: minmax(0, 1fr) auto auto; gap: 8px; }
  .cmd-trigger { grid-column: 2; grid-row: 1; width: 40px; height: 40px; padding: 0; justify-content: center; border-radius: var(--r-ctrl); }
  .cmd-trigger .txt, .cmd-trigger kbd { display: none; }
  .top-end { grid-column: 3; grid-row: 1; }
}

/* floating dock — magnifies around the pointer (desktop), hides while scrolling down */
.dock {
  position: fixed; bottom: calc(16px + env(safe-area-inset-bottom)); left: 50%; z-index: 22;
  translate: -50% 0;
  display: flex; align-items: flex-end; gap: 4px;
  padding: 8px; border-radius: 24px;
  background: color-mix(in srgb, var(--surface) 82%, transparent);
  backdrop-filter: blur(18px) saturate(1.5);
  border: 1px solid var(--line);
  box-shadow: 0 1px 0 rgba(255,255,255,.7) inset, 0 24px 50px -24px rgba(15, 29, 51, .38), 0 4px 12px rgba(15, 29, 51, .06);
  transition: translate .55s var(--spring), opacity .3s;
  animation: dockIn .8s var(--spring) both .15s;
}
.dock[data-hidden="true"] { translate: -50% calc(100% + 28px); opacity: 0; }
@keyframes dockIn { from { translate: -50% 120%; opacity: 0; } }
.dock-sep { width: 1px; height: 28px; margin: 0 6px 10px; background: var(--line-strong); flex: none; }
.dock-item {
  --s: 1;
  position: relative; display: grid; place-items: end center; flex: none;
  width: calc(46px * var(--s)); height: calc(46px * var(--s));
  transition: width .2s var(--ease), height .2s var(--ease);
}
.dock-item .dock-tile {
  position: relative; display: grid; place-items: center; width: 100%; height: 100%;
  border-radius: calc(14px * var(--s)); color: var(--ink-2);
  background: linear-gradient(var(--surface), color-mix(in srgb, var(--paper) 60%, var(--surface)));
  box-shadow: inset 0 0 0 1px var(--line), 0 2px 4px -2px rgba(15,29,51,.12);
  transition: background .3s, color .3s, box-shadow .3s, border-radius .2s;
}
.dock-item .dock-tile svg { width: calc(22px * var(--s)); height: calc(22px * var(--s)); transition: width .2s var(--ease), height .2s var(--ease); }
.dock-item:hover .dock-tile { color: var(--ink); }
.dock-item:active .dock-tile { transform: scale(.92); }
.dock-item[aria-current="page"] .dock-tile {
  color: var(--on-accent);
  background: linear-gradient(160deg, color-mix(in oklab, var(--accent) 72%, white), var(--accent) 55%, var(--accent-hover));
  box-shadow: inset 0 1px 0 rgba(255,255,255,.25), 0 10px 20px -10px var(--accent);
}
.dock-item[aria-current="page"]::after {
  content: ""; position: absolute; bottom: -6px; left: 50%; translate: -50% 0;
  width: 4px; height: 4px; border-radius: 50%; background: var(--accent);
  animation: fade .4s;
}
.dock-badge { z-index: 2;
  position: absolute; top: -5px; inset-inline-end: -5px; min-width: 18px; height: 18px; padding-inline: 5px;
  border-radius: 9px; background: var(--neg); color: #fff; font-size: 10.5px; font-style: normal; font-weight: 500;
  display: grid; place-items: center; box-shadow: 0 0 0 2px var(--surface);
}
.dock-cmd .dock-tile { background: var(--accent-deep); color: #EDEDE8; box-shadow: inset 0 1px 0 rgba(255,255,255,.12); }
.dock-cmd:hover .dock-tile { color: #fff; }
.dock-tip {
  position: absolute; bottom: calc(100% + 12px); left: 50%;
  display: flex; align-items: center; gap: 8px;
  padding: 6px 10px; border-radius: 9px; background: var(--ink); color: #fff;
  font-size: 12.5px; white-space: nowrap; pointer-events: none;
  opacity: 0; translate: -50% 6px; scale: .94; transition: opacity .18s, translate .25s var(--ease), scale .25s var(--ease);
}
.dock-tip::after { content: ""; position: absolute; top: 100%; left: 50%; translate: -50% 0; border: 5px solid transparent; border-top-color: var(--ink); }
.dock-tip kbd { background: rgba(255,255,255,.12); border-color: rgba(255,255,255,.16); color: rgba(255,255,255,.75); }
.dock-item:hover .dock-tip, .dock-item:focus-visible .dock-tip { opacity: 1; translate: -50% 0; scale: 1; }
@media (max-width: 1023px) {
  .dock { gap: 3px; padding: 6px; border-radius: 20px; }
  .dock-item { width: 40px; height: 40px; }
  .dock-item .dock-tile { border-radius: 12px; }
  .dock-item .dock-tile svg { width: 20px; height: 20px; }
  .dock-sep { margin: 0 3px 8px; height: 24px; }
}

/* mobile: four shortcuts + the palette */
.bottom-nav { display: none; }
@media (max-width: 767px) {
  .dock { display: none; }
  .content { padding-bottom: 104px; }
  .bottom-nav {
    position: fixed; inset-inline: 12px; bottom: calc(10px + env(safe-area-inset-bottom)); z-index: 20;
    display: grid; grid-template-columns: repeat(5, 1fr);
    padding: 6px; border-radius: 20px;
    background: color-mix(in srgb, var(--surface) 88%, transparent); backdrop-filter: blur(16px);
    border: 1px solid var(--line); box-shadow: var(--shadow-pop);
  }
  .bottom-nav a, .bottom-nav button { position: relative; z-index: 1; display: grid; justify-items: center; gap: 2px; padding: 6px 2px; font-size: 10.5px; color: var(--muted); min-width: 0; transition: color .2s; }
  .bottom-nav span { max-width: 100%; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .bottom-nav [aria-current="page"] { color: var(--accent-text); font-weight: 500; }
  .bn-pill { position: absolute; top: 0; left: 0; border-radius: 14px; background: var(--accent-soft); transition: transform .5s var(--spring), width .3s, opacity .2s; }
}

/* command palette */
.cmdk-layer {
  position: fixed; inset: 0; z-index: 60;
  display: grid; justify-items: center; align-items: start; padding: 12vh 16px 16px;
  background: rgba(11, 13, 16, .32); backdrop-filter: blur(6px);
  animation: fade .2s;
}
.cmdk {
  width: min(640px, 100%); max-height: min(560px, 76vh);
  display: flex; flex-direction: column; overflow: hidden;
  background: var(--surface); border-radius: 20px;
  box-shadow: 0 40px 90px -30px rgba(11, 13, 16, .55), 0 0 0 1px var(--line);
  animation: cmdkIn .38s var(--spring);
}
@keyframes cmdkIn { from { opacity: 0; transform: translateY(-10px) scale(.96); } }
.cmdk-input { display: flex; align-items: center; gap: 12px; padding: 16px 18px; border-bottom: 1px solid var(--line); color: var(--muted); }
.cmdk-input input { flex: 1; min-width: 0; border: 0; outline: none; background: none; font-size: 16px; color: var(--ink); }
.cmdk-input input::placeholder { color: var(--muted); }
.cmdk-list { position: relative; flex: 1; overflow-y: auto; padding: 6px 8px 10px; scrollbar-width: thin; }
.cmdk-ind {
  position: absolute; top: 0; left: 0; z-index: 0; pointer-events: none; border-radius: 12px;
  background: var(--accent-soft); box-shadow: inset 0 0 0 1px color-mix(in oklab, var(--accent) 12%, transparent);
  transition: transform .3s var(--spring), height .2s, width .2s, opacity .15s;
}
.cmdk-group { display: grid; gap: 1px; }
.cmdk-label { font-size: 11.5px; color: var(--muted); padding: 10px 12px 4px; }
:lang(en) .cmdk-label { text-transform: uppercase; letter-spacing: .08em; font-size: 10.5px; }
.cmdk-item {
  position: relative; z-index: 1; display: flex; align-items: center; gap: 12px;
  min-height: 44px; padding: 6px 10px; border-radius: 12px; text-align: start; color: var(--ink-2);
  animation: rowIn .35s var(--ease) both; animation-delay: calc(min(var(--i), 12) * 18ms);
}
.cmdk-item .ico { width: 32px; height: 32px; border-radius: 10px; display: grid; place-items: center; background: var(--paper); color: var(--ink-2); flex: none; transition: background .2s, color .2s; }
.cmdk-item .lbl { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cmdk-item .go { color: var(--accent); opacity: 0; transform: translateX(-4px); transition: opacity .2s, transform .25s var(--ease); }
[dir="rtl"] .cmdk-item .go { transform: scaleX(-1) translateX(-4px); }
.cmdk-item[aria-selected="true"] { color: var(--ink); }
.cmdk-item[aria-selected="true"] .ico { background: var(--surface); color: var(--accent); }
.cmdk-item[aria-selected="true"] .go { opacity: 1; transform: none; }
[dir="rtl"] .cmdk-item[aria-selected="true"] .go { transform: scaleX(-1); }
.cmdk-empty { padding: 8px 12px 0; color: var(--muted); font-size: 13px; }
.cmdk-foot { display: flex; gap: 16px; padding: 10px 18px; border-top: 1px solid var(--line); background: var(--paper); color: var(--muted); font-size: 12px; }
.cmdk-foot span { display: flex; align-items: center; gap: 6px; }
.cmdk-foot kbd { background: var(--surface); }
@media (max-width: 767px) {
  .cmdk-layer { padding: 0; align-items: end; }
  .cmdk { width: 100%; max-height: 88dvh; border-radius: 22px 22px 0 0; animation: sheetUp .4s var(--ease); }
  .cmdk-foot { display: none; }
}
@keyframes sheetUp { from { transform: translateY(40%); opacity: 0; } }

/* ── page header ───────────────────────────────────────── */
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px 24px; flex-wrap: wrap; margin-bottom: 22px; }
.eyebrow { font-size: 12.5px; color: var(--muted); display: flex; align-items: center; gap: 8px; margin-bottom: 6px; }
.eyebrow::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--pos); box-shadow: 0 0 0 4px var(--pos-soft); }
/* no negative tracking: it breaks joined Arabic letters */
.page-head h1 { font-weight: 300; font-size: 32px; line-height: 1.25; }
.page-head p { color: var(--muted); margin-top: 4px; }
.page-actions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
@media (max-width: 767px) { .page-head h1 { font-size: 24px; } .page-actions { width: 100%; } }

/* ── controls ──────────────────────────────────────────── */
.btn {
  position: relative;
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: var(--ctrl-h); padding-inline: 16px;
  border-radius: var(--r-ctrl); border: 1px solid var(--line-strong);
  background: var(--surface); color: var(--ink);
  font-weight: 500; font-size: 13.5px; white-space: nowrap;
  transition: background .2s, border-color .2s, color .2s, transform .2s var(--ease), box-shadow .2s;
}
.btn:hover { background: var(--paper); }
.btn:active { transform: scale(.97); }
.btn-primary { background: var(--accent); border-color: var(--accent); color: var(--on-accent); box-shadow: 0 6px 16px -8px var(--accent), inset 0 1px 0 rgba(255,255,255,.18); }
.btn-primary:hover { background: var(--accent-hover); border-color: var(--accent-hover); box-shadow: 0 10px 22px -10px var(--accent), inset 0 1px 0 rgba(255,255,255,.18); }
.btn-ghost { border-color: transparent; background: transparent; }
.btn-ghost:hover { background: color-mix(in srgb, var(--paper-2) 80%, transparent); }
.btn-sm { height: 34px; padding-inline: 12px; font-size: 13px; }
.icon-btn { display: inline-grid; place-items: center; width: var(--ctrl-h); height: var(--ctrl-h); border-radius: var(--r-ctrl); color: var(--ink-2); flex: none; transition: background .2s, color .2s, transform .2s; }
.icon-btn:hover { background: color-mix(in srgb, var(--paper-2) 80%, transparent); color: var(--ink); }
.icon-btn:active { transform: scale(.92); }
.icon-btn.sm { width: 32px; height: 32px; }
.icon-btn:disabled, .btn:disabled { opacity: .4; pointer-events: none; }

.input, .select {
  height: var(--ctrl-h); width: 100%;
  padding-inline: 12px;
  border: 1px solid var(--line-strong); border-radius: var(--r-ctrl);
  background: var(--surface);
  transition: border-color .2s, box-shadow .2s;
}
.input::placeholder { color: var(--muted); }
.input:focus, .select:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 4px var(--accent-soft-2); }
.select { appearance: none; padding-inline-end: 34px; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='none' stroke='%23707069' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 6l4 4 4-4'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 10px center; }
[dir="rtl"] .select { background-position: left 10px center; }

.checkbox { width: 16px; height: 16px; accent-color: var(--accent); cursor: pointer; }

/* segmented control with a sliding thumb */
.segmented { position: relative; display: inline-flex; padding: 4px; gap: 2px; background: color-mix(in srgb, var(--paper-2) 85%, transparent); border-radius: 12px; border: 1px solid var(--line); }
.segmented .thumb { position: absolute; top: 0; left: 0; border-radius: 9px; background: var(--surface); box-shadow: 0 1px 3px rgba(15,29,51,.12), 0 4px 10px -4px rgba(15,29,51,.12); transition: transform .45s var(--spring), width .3s var(--ease), opacity .2s; }
.segmented button { position: relative; z-index: 1; height: 32px; padding-inline: 14px; border-radius: 9px; font-size: 13px; color: var(--muted); white-space: nowrap; transition: color .2s; }
.segmented button:hover { color: var(--ink); }
.segmented button[aria-pressed="true"] { color: var(--ink); font-weight: 500; }

/* tabs with a sliding ink bar */
.tabs { position: relative; display: flex; gap: 4px; border-bottom: 1px solid var(--line); overflow-x: auto; scrollbar-width: none; }
.tabs .ink { position: absolute; top: 0; left: 0; pointer-events: none; transition: transform .45s var(--spring), width .3s var(--ease), opacity .2s; }
.tabs .ink::after { content: ""; position: absolute; inset-inline: 10px; bottom: 0; height: 2.5px; border-radius: 3px 3px 0 0; background: var(--accent); }
.tabs button { position: relative; display: inline-flex; align-items: center; gap: 8px; height: 46px; padding-inline: 12px; color: var(--muted); white-space: nowrap; transition: color .2s; }
.tabs button:hover { color: var(--ink); }
.tabs button[aria-selected="true"] { color: var(--ink); font-weight: 500; }
.count { font-size: 11.5px; min-width: 22px; padding: 1px 7px; border-radius: var(--r-pill); background: var(--paper-2); color: var(--ink-2); font-weight: 400; text-align: center; transition: background .2s, color .2s; }
.tabs button[aria-selected="true"] .count { background: var(--accent); color: var(--on-accent); }

.chip { display: inline-flex; align-items: center; gap: 6px; height: 24px; padding-inline: 9px; border-radius: var(--r-pill); font-size: 12px; font-weight: 500; white-space: nowrap; }
.chip::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.chip.draft { background: var(--paper-2); color: var(--muted); }
.chip.sent { background: var(--accent-soft); color: var(--accent-text); }
.chip.partial { background: var(--warn-soft); color: var(--warn); }
.chip.paid { background: var(--pos-soft); color: var(--pos); }
.chip.overdue { background: var(--neg-soft); color: var(--neg); }
.chip.overdue::before { animation: blink 1.6s ease-in-out infinite; }
@keyframes blink { 50% { opacity: .3; } }

.delta { display: inline-flex; align-items: center; gap: 2px; height: 22px; padding-inline: 6px 8px; border-radius: var(--r-pill); font-size: 12px; font-weight: 500; direction: ltr; }
.delta.up { color: var(--pos); background: var(--pos-soft); }
.delta.down { color: var(--neg); background: var(--neg-soft); }

.badge { font-size: 11px; min-width: 20px; height: 20px; padding-inline: 6px; border-radius: var(--r-pill); display: inline-grid; place-items: center; background: var(--accent); color: var(--on-accent); font-weight: 500; }

/* menus / popovers */
.menu { position: absolute; z-index: 40; min-width: 210px; padding: 6px; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; box-shadow: var(--shadow-pop); animation: pop .18s var(--ease); transform-origin: top; }
.menu button { display: flex; width: 100%; align-items: center; gap: 10px; padding: 9px 10px; border-radius: 9px; text-align: start; font-size: 13.5px; transition: background .15s; }
.menu button:hover { background: var(--paper); }
.menu button svg { color: var(--muted); }
.menu hr { border: 0; border-top: 1px solid var(--line); margin: 4px 0; }

/* ── cards ─────────────────────────────────────────────── */
.card { position: relative; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-card); padding: 22px; min-width: 0; box-shadow: var(--shadow-card); }
.lift { transition: transform .45s var(--ease), box-shadow .45s var(--ease), opacity .7s var(--ease); }
.lift:hover { transform: translateY(-3px); box-shadow: var(--shadow-lift); }
.card-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; margin-bottom: 18px; }
.card-head h2 { font-size: 15.5px; font-weight: 500; }
.card-head p { color: var(--muted); font-size: 12.5px; margin-top: 2px; }
.link-more { display: inline-flex; align-items: center; gap: 4px; font-size: 13px; font-weight: 500; color: var(--accent-text); padding: 4px 8px; border-radius: 8px; transition: background .2s, gap .25s var(--ease); }
.link-more:hover { background: var(--accent-soft); gap: 8px; }

/* ── dashboard ─────────────────────────────────────────── */
.dash { display: grid; gap: 18px; }
.kpis { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 18px; }
@media (max-width: 1199px) { .kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

.kpi { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: end; gap: 0 12px; padding: 20px; overflow: hidden; }
.kpi .k-top { grid-column: 1 / -1; display: flex; align-items: center; gap: 10px; margin-bottom: 14px; }
.kpi .k-ico { width: 36px; height: 36px; border-radius: 11px; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent); flex: none; transition: transform .5s var(--spring); }
.kpi:hover .k-ico { transform: rotate(-8deg) scale(1.08); }
.kpi .label { color: var(--muted); font-size: 13px; }
.kpi .value { grid-column: 1 / -1; font-size: 30px; font-weight: 300; line-height: 1.2; padding-inline-end: 4px; white-space: nowrap; }
.kpi .value small { font-size: 13px; font-weight: 400; color: var(--muted); margin-inline-start: 8px; }
.kpi .foot { display: flex; align-items: center; gap: 8px; margin-top: 10px; font-size: 12px; color: var(--muted); flex-wrap: wrap; }
.kpi .spark { width: 92px; height: 38px; align-self: end; }

.kpi.hero { background: var(--accent); color: var(--on-accent); border-color: transparent; box-shadow: 0 18px 40px -22px var(--accent), var(--shadow-card); --trace-bg: var(--accent); }
.kpi.hero .traces { position: absolute; inset: 0; width: 100%; height: 100%; color: var(--on-accent); opacity: .14; pointer-events: none; }
.kpi.hero .traces path { stroke-dasharray: 1; stroke-dashoffset: 1; animation: draw 2.6s var(--ease) forwards; animation-delay: calc(var(--i) * 120ms + .4s); }
.kpi.hero > :not(.traces) { position: relative; }
.kpi.hero .k-ico { background: rgba(255,255,255,.16); color: var(--on-accent); }
.kpi.hero .label, .kpi.hero .value small, .kpi.hero .foot { color: color-mix(in srgb, var(--on-accent) 75%, transparent); }
.kpi.hero .delta { background: rgba(255,255,255,.16); color: var(--on-accent); }

@media (max-width: 767px) {
  .kpis { gap: 10px; }
  .kpis .kpi { padding: 14px; }
  .kpis .kpi .k-top { margin-bottom: 10px; }
  .kpis .kpi .k-ico { width: 30px; height: 30px; }
  .kpis .kpi .value { font-size: 24px; white-space: normal; }
  .kpis .kpi .value small { display: block; margin: 0; }
  .kpis .kpi .spark { display: none; }
}

.chart-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; flex-wrap: wrap; margin-bottom: 8px; }
.chart-total { font-size: 34px; font-weight: 300; line-height: 1.15; margin-top: 6px; display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.chart-total small { font-size: 13px; color: var(--muted); font-weight: 400; }
.legend { display: flex; gap: 16px; font-size: 12.5px; color: var(--muted); }
.legend span { display: inline-flex; align-items: center; gap: 8px; }
.legend i { width: 18px; height: 3px; border-radius: 3px; background: var(--accent); }
.legend i.prev { background: repeating-linear-gradient(90deg, var(--muted) 0 4px, transparent 4px 7px); }

.chart { position: relative; height: 310px; outline: none; }
@media (max-width: 767px) { .chart { height: 240px; } }
.chart svg { display: block; width: 100%; height: 100%; overflow: visible; direction: ltr; /* anchors are set explicitly per locale */ }
.chart:focus-visible { outline: 2px solid var(--accent); outline-offset: 6px; border-radius: 6px; }
.chart .axis { fill: var(--muted); font-size: 11.5px; font-family: var(--font-brand); }
.chart .grid { stroke: var(--line); stroke-dasharray: 3 5; }
.chart .line { stroke-dasharray: 1; stroke-dashoffset: 1; }
.chart .area, .chart .prev { opacity: 0; transition: opacity .9s var(--ease) .5s; }
.chart[data-in="true"] .line { animation: draw 1.6s var(--ease) forwards; }
.chart[data-in="true"] .area, .chart[data-in="true"] .prev { opacity: 1; }
.chart .hover-g { transition: transform .18s var(--ease); }
.chart .tip {
  position: absolute; pointer-events: none; min-width: 150px;
  padding: 10px 12px; background: color-mix(in srgb, var(--surface) 92%, transparent); backdrop-filter: blur(8px);
  border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--shadow-pop);
  font-size: 12px; color: var(--muted); translate: -50% calc(-100% - 16px); white-space: nowrap;
  transition: left .18s var(--ease), top .18s var(--ease);
}
.chart .tip b { display: block; font-size: 17px; font-weight: 500; color: var(--accent-text); margin-top: 2px; }
.chart .tip span { display: block; margin-top: 4px; }

.dash-row { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }
@media (max-width: 1199px) { .dash-row { grid-template-columns: repeat(2, minmax(0, 1fr)); } .dash-row > :last-child { grid-column: 1 / -1; } }
@media (max-width: 767px)  { .dash-row { grid-template-columns: minmax(0, 1fr); } }

/* needs-action tiles */
.tiles { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.attention { display: flex; flex-direction: column; height: 100%; }
.attention .tiles { flex: 1; grid-auto-rows: 1fr; }
.attention .tile { display: flex; flex-direction: column; }
.attention .tile .t-n { margin-top: auto; }
.tile {
  position: relative; display: grid; gap: 6px; align-content: start;
  padding: 14px; border-radius: 14px; background: var(--paper); min-height: 128px;
  transition: transform .35s var(--ease), background .25s, box-shadow .35s;
  overflow: hidden;
}
.tile:hover { transform: translateY(-2px); background: var(--surface); box-shadow: inset 0 0 0 1px var(--line), var(--shadow-lift); }
.tile .t-ico { width: 32px; height: 32px; border-radius: 10px; display: grid; place-items: center; background: var(--surface); color: var(--accent); box-shadow: 0 1px 2px rgba(0,0,0,.06); }
.tile .t-n { font-size: 28px; font-weight: 300; line-height: 1.1; margin-top: 4px; }
.tile .t-l { font-size: 12.5px; color: var(--ink-2); line-height: 1.45; }
.tile .t-go { position: absolute; top: 14px; inset-inline-end: 14px; color: var(--accent); opacity: 0; transform: translateX(-6px); transition: opacity .25s, transform .35s var(--ease); }
[dir="rtl"] .tile .t-go { transform: translateX(6px) scaleX(-1); }
.tile:hover .t-go { opacity: 1; transform: none; }
[dir="rtl"] .tile:hover .t-go { transform: scaleX(-1); }
.tile.urgent { background: var(--neg-soft); }
.tile.urgent .t-ico { color: var(--neg); }
.tile.urgent .t-n { color: var(--neg); }
.tile.urgent:hover { background: var(--neg-soft); }

/* ranked bars */
/* top-selling items — grouped columns */
.top-items { display: flex; flex-direction: column; height: 100%; }
.top-items .card-head { align-items: center; margin-bottom: 10px; }
.segmented.sm { padding: 3px; border-radius: 10px; }
.segmented.sm .thumb { border-radius: 7px; }
.segmented.sm button { height: 28px; padding-inline: 11px; font-size: 12.5px; border-radius: 7px; }
.vb-legend { display: flex; gap: 16px; font-size: 12px; color: var(--muted); margin-bottom: 14px; }
.vb-legend span, .vb-tip span { display: flex; align-items: center; gap: 6px; }
.vb-legend i, .vb-tip i { width: 10px; height: 10px; border-radius: 3px; flex: none; }
i.cur { background: var(--accent); }
i.prev { background: var(--accent-soft-2); box-shadow: inset 0 0 0 1px var(--accent-line); }

.vb { --axis: 46px; --lbl: 30px; position: relative; flex: 1; min-height: 250px; }
.vb-grid { position: absolute; inset: 6px 0 var(--lbl) 0; display: flex; flex-direction: column; justify-content: space-between; pointer-events: none; }
.vb-tick { position: relative; height: 0; margin-inline-start: var(--axis); border-top: 1px dashed var(--line-strong); }
.vb-tick:last-child { border-top: 1px solid var(--line-strong); }
.vb-tick span { position: absolute; inset-inline-end: calc(100% + 8px); top: -8px; font-size: 11px; line-height: 16px; color: var(--muted); white-space: nowrap; }
.vb-cols { position: absolute; inset: 6px 0 0 var(--axis); display: flex; }
[dir="rtl"] .vb-cols { inset: 6px var(--axis) 0 0; }
.vb-col { position: relative; flex: 1; min-width: 0; display: grid; grid-template-rows: minmax(0, 1fr) var(--lbl); outline: none; }
.vb-col::before {
  content: ""; position: absolute; inset: -4px 6% var(--lbl); border-radius: 12px;
  background: linear-gradient(transparent, var(--accent-soft)); opacity: 0; transition: opacity .25s;
}
.vb-col[data-hover="true"]::before, .vb-col:focus-visible::before { opacity: 1; }
.vb-bars { position: relative; display: flex; align-items: flex-end; justify-content: center; gap: 5px; height: 100%; }
.vb-bar {
  position: relative; width: clamp(10px, 22%, 22px); border-radius: 7px 7px 3px 3px;
  transition: height 1s var(--spring), opacity .25s, filter .25s;
  transition-delay: calc(var(--i) * 80ms + .1s), 0s, 0s;
}
.vb-bar.cur { background: linear-gradient(color-mix(in oklab, var(--accent) 78%, white), var(--accent)); }
.vb-bar.prev { background: var(--accent-soft-2); box-shadow: inset 0 0 0 1px var(--accent-line); transition-delay: calc(var(--i) * 80ms + .2s), 0s, 0s; }
.vb-col[data-lead="true"] .vb-bar.cur { background: linear-gradient(color-mix(in oklab, var(--accent) 70%, white), var(--accent-hover)); box-shadow: 0 10px 22px -10px var(--accent); }
.vb-cols[data-hovering="true"] .vb-col:not([data-hover="true"]) .vb-bar { opacity: .4; filter: saturate(.6); }
.vb-label { align-self: center; text-align: center; font-size: 12.5px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; padding-inline: 2px; transition: color .2s; }
.vb-col[data-lead="true"] .vb-label, .vb-col[data-hover="true"] .vb-label { color: var(--ink); font-weight: 500; }

/* value flag over the leader, swapped for the tooltip on hover */
.vb-peak {
  position: absolute; bottom: calc(var(--h) + 8px); left: 50%; translate: -50% 0;
  padding: 2px 8px; border-radius: 7px; background: var(--ink); color: #fff; font-size: 11.5px; white-space: nowrap;
  transition: bottom 1s var(--spring), opacity .2s; transition-delay: calc(var(--i) * 80ms + .1s), 0s;
}
.vb-peak::after { content: ""; position: absolute; top: 100%; left: 50%; translate: -50% 0; border: 4px solid transparent; border-top-color: var(--ink); }
.vb-cols[data-hovering="true"] .vb-peak { opacity: 0; }
.vb-tip {
  position: absolute; bottom: calc(var(--h) + 10px); left: 50%; z-index: 5; translate: -50% 0;
  display: grid; gap: 5px; min-width: 176px; padding: 10px 12px; border-radius: 12px;
  background: var(--surface); box-shadow: var(--shadow-pop), 0 0 0 1px var(--line);
  font-size: 12px; color: var(--muted); white-space: nowrap; pointer-events: none;
  animation: tipIn .22s var(--ease);
}
.vb-tip b { color: var(--ink); font-weight: 500; font-size: 12.5px; }
.vb-tip em { margin-inline-start: auto; padding-inline-start: 12px; font-style: normal; color: var(--ink); font-weight: 500; }
.vb-tip .delta { justify-self: start; height: 20px; font-size: 11px; }
@keyframes tipIn { from { opacity: 0; transform: translateY(4px) scale(.97); } }
.vb-col:first-child .vb-tip { left: auto; inset-inline-start: 0; translate: 0 0; }
.vb-col:last-child .vb-tip { left: auto; inset-inline-end: 0; translate: 0 0; }
.ranks { display: grid; gap: 16px; }
.rank { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 6px 12px; }
.rank .r-n { width: 26px; height: 26px; border-radius: 8px; display: grid; place-items: center; font-size: 11.5px; font-weight: 500; background: var(--paper); color: var(--muted); grid-row: 1 / 3; }
.rank:first-child .r-n { background: var(--accent); color: var(--on-accent); }
.rank .r-name { font-size: 13.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rank .r-v { font-size: 12.5px; color: var(--muted); }
.rank .track { grid-column: 2 / -1; height: 8px; border-radius: 99px; background: var(--paper); overflow: hidden; }
.rank .fill { height: 100%; width: 0; border-radius: 99px; background: color-mix(in oklab, var(--accent) var(--a, 100%), var(--accent-soft-2)); transition: width 1.2s var(--ease); transition-delay: calc(var(--i) * 110ms + .15s); }

/* recent list */
/* recent invoices — each divider is the invoice's payment line */
.recent { display: flex; flex-direction: column; height: 100%; }
.rc-list { flex: 1; display: grid; grid-auto-rows: 1fr; }
.rc-row {
  --st: var(--accent);
  position: relative; display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding-block: 12px; min-height: 60px;
}
.rc-row[data-status="paid"] { --st: var(--pos); }
.rc-row[data-status="partial"] { --st: var(--warn); }
.rc-row[data-status="overdue"] { --st: var(--neg); }
.rc-row::before, .rc-row::after { content: ""; position: absolute; bottom: 0; inset-inline-start: 0; height: 2px; border-radius: 2px; transition: height .25s var(--ease); }
.rc-row::before { inset-inline-end: 0; background: var(--paper-2); }
.rc-row::after { width: var(--fill); background: var(--st); transition: width 1.1s var(--ease) calc(var(--i) * 90ms + .2s), height .25s var(--ease); }
.rc-row:hover::before, .rc-row:hover::after { height: 4px; }
.rc-main, .rc-side { display: grid; line-height: 1.45; min-width: 0; }
.rc-main b { font-weight: 500; font-size: 13.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; transition: color .2s; }
.rc-row:hover .rc-main b { color: var(--accent-text); }
.rc-main small, .rc-side small { font-size: 11.5px; color: var(--muted); white-space: nowrap; }
.rc-side { justify-items: end; flex: none; }
.rc-side b { font-weight: 500; font-size: 13.5px; white-space: nowrap; }
.rc-row:is([data-status="partial"], [data-status="overdue"]) .rc-side small { color: var(--st); }
.feed { display: grid; }
.feed a { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 2px 12px; padding: 10px 8px; margin-inline: -8px; border-radius: 12px; transition: background .2s, transform .3s var(--ease); animation: rowIn .5s var(--ease) both; animation-delay: calc(var(--i) * 60ms + .2s); }
.feed a:hover { background: var(--paper); }
.feed .f-av { width: 38px; height: 38px; border-radius: 12px; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent-text); font-weight: 500; font-size: 14px; grid-row: 1 / 3; }
.feed .f-name { font-size: 13.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.feed .f-sub { font-size: 12px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.feed .f-amt { font-size: 13.5px; font-weight: 500; text-align: end; }
.feed .f-st { justify-self: end; }

/* ── data table ────────────────────────────────────────── */
.table-card { padding: 0; overflow: hidden; }
.table-card .tabs { padding-inline: 14px; }
.toolbar { display: flex; align-items: center; gap: 8px; padding: 14px 18px; flex-wrap: wrap; border-bottom: 1px solid var(--line); }
.toolbar .search { position: relative; flex: 1 1 260px; max-width: 360px; }
.toolbar .search input { padding-inline-start: 38px; background: var(--paper); border-color: transparent; }
.toolbar .search input:focus { background: var(--surface); }
.toolbar .search svg { position: absolute; inset-inline-start: 12px; top: 50%; translate: 0 -50%; color: var(--muted); pointer-events: none; }
.toolbar .select { width: auto; min-width: 150px; }
@media (max-width: 767px) { .toolbar .search { max-width: none; flex-basis: 100%; } .toolbar .select { flex: 1; min-width: 0; } }

.bulkbar { display: flex; align-items: center; gap: 8px; padding: 10px 18px; background: var(--accent-soft); border-bottom: 1px solid var(--accent-line); font-size: 13.5px; flex-wrap: wrap; animation: pop .25s var(--ease); }
.bulkbar b { font-weight: 500; color: var(--accent-text); margin-inline-end: 8px; }

.table-wrap { overflow-x: auto; overflow-y: hidden; }
table.table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.table th {
  position: sticky; top: 0; z-index: 1;
  text-align: start; font-weight: 500; font-size: 12.5px; color: var(--muted);
  padding: 11px 14px; background: color-mix(in srgb, var(--paper) 55%, var(--surface));
  border-bottom: 1px solid var(--line); white-space: nowrap;
}
.table td { padding: 13px 14px; border-bottom: 1px solid var(--line); vertical-align: middle; white-space: nowrap; }
.table tbody tr { transition: background .15s; animation: rowIn .4s var(--ease) both; animation-delay: calc(var(--i, 0) * 22ms); }
.table tbody tr:hover { background: color-mix(in srgb, var(--accent-soft) 45%, var(--surface)); }
.table tbody tr[aria-selected="true"] { background: var(--accent-soft); }
.table .end { text-align: end; }
.table .w-check { width: 44px; padding-inline-end: 0; }
.table .w-act { width: 52px; padding-inline: 6px; }
.table .sub { display: block; color: var(--muted); font-size: 12px; }
.table .strong { font-weight: 500; }
.table .link { color: var(--accent-text); font-weight: 500; }
.table .link:hover { text-decoration: underline; }
.table .w-act .icon-btn { opacity: .5; transition: opacity .2s, background .2s; }
.table tbody tr:hover .w-act .icon-btn, .table .w-act .icon-btn[aria-expanded="true"] { opacity: 1; }
.cust-cell { display: flex; align-items: center; gap: 10px; }
.cust-cell .f-av { width: 32px; height: 32px; border-radius: 10px; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent-text); font-weight: 500; font-size: 13px; flex: none; }
.sort { display: inline-flex; align-items: center; gap: 4px; font-weight: 500; color: inherit; }
.sort:hover, .sort[data-active="true"] { color: var(--ink); }
.cell-menu { position: relative; }
.cell-menu .menu { inset-inline-end: 0; top: calc(100% + 4px); }
.due-late { color: var(--neg); }
@media (max-width: 1199px) { .table .hide-md { display: none; } }

.pager { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 18px; font-size: 13px; color: var(--muted); flex-wrap: wrap; }
.pager .ctl { display: flex; align-items: center; gap: 8px; }
.pager .select { width: auto; height: 32px; min-width: 76px; }

.empty { display: grid; justify-items: center; gap: 8px; padding: 56px 16px; text-align: center; animation: pageIn .4s var(--ease); }
.empty .ico { width: 56px; height: 56px; border-radius: 16px; background: var(--paper); display: grid; place-items: center; color: var(--muted); margin-bottom: 4px; }
.empty h3 { font-size: 16px; font-weight: 500; }
.empty p { color: var(--muted); }

/* phones and portrait tablets: rows become cards */
.row-cards { display: none; }
@media (max-width: 959px) {
  .table-wrap { display: none; }
  .row-cards { display: grid; }
  .row-card { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 4px 12px; padding: 14px 16px; border-bottom: 1px solid var(--line); align-items: center; animation: rowIn .4s var(--ease) both; animation-delay: calc(var(--i, 0) * 30ms); }
  .row-card[aria-selected="true"] { background: var(--accent-soft); }
  .row-card .checkbox { grid-row: 1 / 3; }
  .row-card .top { display: flex; align-items: center; gap: 8px; min-width: 0; white-space: nowrap; }
  .row-card .cust { grid-column: 2; color: var(--ink-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .row-card .amt { grid-column: 3; grid-row: 1; text-align: end; font-weight: 500; }
  .row-card .date { grid-column: 3; grid-row: 2; text-align: end; color: var(--muted); font-size: 12px; }
}
/* ── logo primitives ───────────────────────────────────── */
.mark { --s: 32px; width: var(--s); height: var(--s); border-radius: 7%; background: var(--accent); position: relative; flex: none; display: inline-grid; place-items: center; color: var(--on-accent); font-weight: 600; font-size: calc(var(--s) * .4); overflow: hidden; }
.mark.masked::after { content: ""; position: absolute; inset: 0; background: var(--on-accent); -webkit-mask: var(--mask) center / 100% 100% no-repeat; mask: var(--mask) center / 100% 100% no-repeat; }
.mark.image { background: transparent; }
.mark.image img { width: 100%; height: 100%; object-fit: contain; }

/* ── record detail template ────────────────────────────── */
.back-link { display: inline-flex; align-items: center; gap: 4px; margin-bottom: 10px; font-size: 13px; color: var(--muted); padding: 4px 8px 4px 4px; margin-inline-start: -4px; border-radius: 8px; transition: color .2s, background .2s, gap .25s var(--ease); }
.back-link:hover { color: var(--ink); background: color-mix(in srgb, var(--paper-2) 70%, transparent); gap: 8px; }
.doc-title { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.doc-title h1 { font-weight: 300; }

/* payment line: the dashboard row divider, promoted to the page */
.pay-line { --st: var(--accent); margin-bottom: 22px; }
.pay-line[data-status="paid"] { --st: var(--pos); }
.pay-line[data-status="partial"] { --st: var(--warn); }
.pay-line[data-status="overdue"] { --st: var(--neg); }
.pl-bar { display: block; height: 4px; border-radius: 4px; background: var(--paper-2); overflow: hidden; }
.pl-bar i { display: block; height: 100%; width: var(--p); border-radius: inherit; background: var(--st); transition: width 1.2s var(--ease) .15s; }
.pl-meta { display: flex; justify-content: space-between; gap: 16px; margin-top: 8px; font-size: 12.5px; color: var(--muted); }
.pl-meta .late { color: var(--neg); font-weight: 500; }

.doc-grid { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 20px; align-items: start; }
@media (max-width: 1099px) { .doc-grid { grid-template-columns: minmax(0, 1fr); } }

.paper { padding: clamp(20px, 3.4vw, 40px); }
.paper-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; padding-bottom: 22px; border-bottom: 1px solid var(--line); }
.paper-brand { display: flex; align-items: center; gap: 10px; }
.paper-brand .wordmark { font-weight: 500; letter-spacing: .08em; direction: ltr; }
.paper-no { display: grid; justify-items: end; gap: 2px; }
.paper-no small { font-size: 11.5px; color: var(--muted); }
.paper-no b { font-weight: 500; font-size: 15px; }
.paper-meta { display: grid; grid-template-columns: 1.6fr repeat(3, 1fr); gap: 16px; padding-block: 22px; }
.paper-meta dt { font-size: 11.5px; color: var(--muted); margin-bottom: 4px; }
.paper-meta dd { font-size: 13.5px; }
.paper-meta .bill dd { display: grid; }
.paper-meta .bill b { font-weight: 500; }
.paper-meta .bill span { color: var(--muted); font-size: 12.5px; }
@media (max-width: 767px) { .paper-meta { grid-template-columns: 1fr 1fr; } .paper-meta .bill { grid-column: 1 / -1; } }
.lines-wrap { overflow-x: auto; overflow-y: hidden; }
.lines { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.lines th { text-align: start; font-size: 11.5px; font-weight: 400; color: var(--muted); padding: 10px 12px; background: var(--paper); white-space: nowrap; }
.lines th:first-child { border-start-start-radius: 10px; border-end-start-radius: 10px; }
.lines th:last-child { border-start-end-radius: 10px; border-end-end-radius: 10px; }
.lines td { padding: 14px 12px; border-bottom: 1px solid var(--line); white-space: nowrap; animation: rowIn .4s var(--ease) both; animation-delay: calc(var(--i) * 60ms + .1s); }
.lines td b { font-weight: 500; }
.lines .end { text-align: end; }
.totals { display: grid; gap: 8px; margin-inline-start: auto; width: min(320px, 100%); padding-top: 18px; font-size: 13.5px; }
.totals > div { display: flex; justify-content: space-between; gap: 16px; color: var(--ink-2); }
.totals .grand { padding-top: 12px; margin-top: 4px; border-top: 1px solid var(--line-strong); font-size: 17px; font-weight: 500; color: var(--ink); }
.thanks { margin-top: 32px; padding-top: 16px; border-top: 1px dashed var(--line-strong); color: var(--muted); font-size: 12.5px; text-align: center; }

.doc-side { display: grid; gap: 16px; }
.side-card { padding: 20px; display: grid; gap: 14px; }
.side-card h2 { font-size: 14px; font-weight: 500; }
.side-card .who { display: flex; align-items: center; gap: 12px; }
.side-card .who span:last-child { display: grid; line-height: 1.4; min-width: 0; }
.side-card .who b { font-weight: 500; }
.side-card .who small { color: var(--muted); font-size: 12px; }
.side-card .f-av { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent-text); font-weight: 500; flex: none; }
.side-card .kv { display: flex; justify-content: space-between; gap: 12px; padding: 12px 14px; border-radius: 12px; background: var(--paper); font-size: 12.5px; color: var(--muted); }
.side-card .kv b { color: var(--ink); font-weight: 500; }
.side-card .link-more { justify-self: start; margin-inline-start: -8px; }
.activity { list-style: none; display: grid; gap: 14px; position: relative; }
.activity::before { content: ""; position: absolute; inset-inline-start: 13px; top: 8px; bottom: 8px; width: 1.5px; background: var(--line); }
.activity li { position: relative; display: flex; gap: 12px; align-items: flex-start; animation: rowIn .4s var(--ease) both; animation-delay: calc(var(--i) * 70ms + .2s); }
.activity .a-ico { width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; background: var(--surface); color: var(--muted); box-shadow: inset 0 0 0 1.5px var(--line-strong); flex: none; }
.activity [data-kind="payment"] .a-ico { color: var(--pos); box-shadow: inset 0 0 0 1.5px currentColor; }
.activity [data-kind="reminder"] .a-ico { color: var(--neg); box-shadow: inset 0 0 0 1.5px currentColor; }
.activity li > span:last-child { display: grid; line-height: 1.45; padding-top: 3px; }
.activity b { font-weight: 400; font-size: 13px; }
.activity small { font-size: 11.5px; color: var(--muted); }

/* ── form template ─────────────────────────────────────── */
.form-grid { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 20px; align-items: start; }
.form-main { display: grid; gap: 16px; min-width: 0; }
@media (max-width: 1099px) { .form-grid { grid-template-columns: minmax(0, 1fr); } }
.form-sec h2 { display: flex; align-items: center; gap: 10px; font-size: 15px; font-weight: 500; margin-bottom: 18px; }
.form-sec .step { width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; font-size: 12px; background: var(--accent-soft); color: var(--accent-text); }
.fields { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.field { display: grid; gap: 6px; align-content: start; min-width: 0; }
.field.wide { grid-column: 1 / -1; }
.field > span { font-size: 12.5px; color: var(--ink-2); }
.field[data-error="true"] .select { border-color: var(--neg); box-shadow: 0 0 0 4px var(--neg-soft); }
@media (max-width: 767px) { .fields { grid-template-columns: minmax(0, 1fr); } }
.err { color: var(--neg); font-size: 12px; }
.choice { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.choice button { height: 36px; padding-inline: 14px; border-radius: var(--r-pill); border: 1px solid var(--line-strong); font-size: 13px; color: var(--ink-2); transition: background .2s, border-color .2s, color .2s; }
.choice button:hover { background: var(--paper); }
.choice button[aria-checked="true"] { background: var(--accent-soft); border-color: var(--accent-line); color: var(--accent-text); font-weight: 500; }
.choice small { margin-inline-start: auto; font-size: 12px; color: var(--muted); }
.textarea { height: auto; padding-block: 10px; resize: vertical; line-height: 1.6; }

.lines-edit { display: grid; gap: 8px; }
.le-head, .le-row { display: grid; grid-template-columns: minmax(0, 2.4fr) minmax(70px, .7fr) minmax(90px, 1fr) minmax(90px, 1fr) 32px; gap: 10px; align-items: center; }
.le-head { font-size: 11.5px; color: var(--muted); padding-inline: 2px; }
.le-head .end, .le-total { text-align: end; }
.le-row { animation: rowIn .35s var(--ease) both; }
.le-total { font-weight: 500; font-size: 13.5px; }
.add-line { justify-self: start; display: inline-flex; align-items: center; gap: 6px; height: 36px; padding-inline: 12px; margin-top: 4px; border-radius: var(--r-ctrl); border: 1px dashed var(--accent-line); color: var(--accent-text); font-size: 13px; font-weight: 500; transition: background .2s, border-color .2s; }
.add-line:hover { background: var(--accent-soft); border-color: var(--accent); }
@media (max-width: 767px) {
  .le-head { display: none; }
  .le-row { grid-template-columns: 1fr 1fr 32px; padding-bottom: 12px; border-bottom: 1px solid var(--line); }
  .le-row .select { grid-column: 1 / -1; }
  .le-row .le-total { grid-column: 1 / 3; text-align: start; }
}

.form-summary { position: sticky; top: calc(var(--topbar-h) + 12px); display: grid; gap: 10px; }
.form-summary h2 { font-size: 15px; font-weight: 500; }
.form-summary .totals { width: 100%; padding-top: 4px; margin-bottom: 6px; }
.form-summary .disc { align-items: center; }
.disc-in { position: relative; width: 74px; margin-inline-start: auto; }
.disc-in .input { height: 32px; padding-inline: 8px 22px; text-align: center; }
.disc-in i { position: absolute; inset-inline-end: 8px; top: 50%; translate: 0 -50%; font-style: normal; font-size: 12px; color: var(--muted); }
.form-summary .grand .num { animation: pop .35s var(--spring); }
@keyframes pop { from { transform: scale(1.06); color: var(--accent-text); } }
.due-note { font-size: 12px; margin-bottom: 4px; }
.form-summary .btn { width: 100%; }
.errs { list-style: none; display: grid; gap: 4px; font-size: 12px; color: var(--neg); padding: 10px 12px; border-radius: 10px; background: var(--neg-soft); }

.toast {
  position: fixed; bottom: calc(100px + env(safe-area-inset-bottom)); left: 50%; translate: -50% 0; z-index: 70;
  display: flex; align-items: center; gap: 8px; padding: 10px 16px; border-radius: 12px;
  background: var(--ink); color: #fff; font-size: 13.5px; box-shadow: var(--shadow-pop);
  animation: toastIn .4s var(--spring);
}
.toast svg { color: #7fd3a1; }
@keyframes toastIn { from { opacity: 0; translate: -50% 12px; } }

/* ── module pages ──────────────────────────────────────── */
/* figures: a quiet row of numbers above a list, split by hairlines */
.figures { display: flex; flex-wrap: wrap; margin-bottom: 18px; }
.fig { display: grid; gap: 2px; padding-inline: 24px; border-inline-start: 1px solid var(--line-strong); animation: rowIn .45s var(--ease) both; animation-delay: calc(var(--i) * 70ms + .05s); }
.fig:first-child { padding-inline-start: 0; border: 0; }
.fig .v { font-size: 26px; font-weight: 300; line-height: 1.25; }
.fig .v small { font-size: 12px; color: var(--muted); font-weight: 400; }
.fig .l { font-size: 12.5px; color: var(--muted); }
.fig[data-tone="neg"] .v { color: var(--neg); }
.fig[data-tone="warn"] .v { color: var(--warn); }
.fig[data-tone="pos"] .v { color: var(--pos); }
@media (max-width: 767px) { .figures { display: grid; grid-template-columns: 1fr 1fr; gap: 14px 0; } .fig { padding-inline: 12px; } .fig:nth-child(odd) { padding-inline-start: 0; border: 0; } .fig .v { font-size: 22px; } }

.f-av.round { border-radius: 50%; }
.row-action { display: inline-flex; align-items: center; gap: 8px; }
.row-action .btn { height: 28px; padding-inline: 10px; font-size: 12px; }
.table .sub.ltr { text-align: start; }
@media (max-width: 959px) {
  .row-card.dl-card { grid-template-columns: minmax(0, 1fr) auto; }
  .dl-card .top { grid-column: 1; overflow: hidden; }
  .dl-card .top > :first-child { min-width: 0; overflow: hidden; text-overflow: ellipsis; }
  .dl-card .top .chip { flex: none; }
  .dl-card .cust { grid-column: 1; }
  .dl-card .amt { grid-column: 2; grid-row: 1; }
  .dl-card .date { grid-column: 2; grid-row: 2; }
  a.dl-card:hover { background: var(--paper); }
}

/* stock level: quantity over a short line; the tick marks the reorder point */
.lvl { --c: var(--accent); display: inline-grid; gap: 5px; min-width: 120px; }
.lvl[data-state="low"] { --c: var(--warn); }
.lvl[data-state="out"] { --c: var(--neg); }
.lvl small { color: var(--muted); font-size: 11.5px; }
.lvl[data-state="out"] .num { color: var(--neg); }
.lvl i { position: relative; display: block; height: 3px; border-radius: 3px; background: var(--paper-2); }
.lvl i::before { content: ""; position: absolute; inset-block: 0; inset-inline-start: 0; width: var(--p); border-radius: inherit; background: var(--c); animation: grow 1s var(--ease) both .2s; transform-origin: right; }
[dir="ltr"] .lvl i::before { transform-origin: left; }
.lvl i::after { content: ""; position: absolute; top: -3px; bottom: -3px; inset-inline-start: var(--r); width: 1.5px; background: var(--ink-2); opacity: .45; }
@keyframes grow { from { transform: scaleX(0); } }

.file-cell { display: flex; align-items: center; gap: 10px; }
.ext { width: 34px; height: 40px; border-radius: 4px 10px 4px 4px; display: grid; place-items: end center; padding-bottom: 5px; font-size: 9.5px; font-weight: 600; text-transform: uppercase; letter-spacing: .04em; color: var(--accent-text); background: var(--accent-soft); box-shadow: inset 0 0 0 1px var(--accent-line); flex: none; }
.ext[data-ext="xlsx"] { color: var(--pos); background: var(--pos-soft); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--pos) 30%, transparent); }
.ext[data-ext="jpg"] { color: var(--warn); background: var(--warn-soft); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--warn) 30%, transparent); }
.ext[data-ext="pdf"] { color: var(--neg); background: var(--neg-soft); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--neg) 30%, transparent); }

/* ═════════════ app-specific (tire recycling system) ═════════════ */

/* the brand mark is a glyph, not a masked image */
.mark.glyph { font-size: calc(var(--s) * .62); font-weight: 400; border-radius: 28%; }

/* plain form controls get the template's input look */
:where(input:not([type="checkbox"], [type="radio"], [type="hidden"]), select, textarea) {
  height: var(--ctrl-h); width: 100%; padding-inline: 12px;
  border: 1px solid var(--line-strong); border-radius: var(--r-ctrl);
  background-color: var(--surface); color: var(--ink); font: inherit;
  transition: border-color .2s, box-shadow .2s;
}
:where(textarea) { height: auto; min-height: 84px; padding-block: 10px; resize: vertical; line-height: 1.6; }
:where(select) { appearance: none; padding-inline-end: 34px; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='none' stroke='%23707069' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 6l4 4 4-4'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: left 10px center; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 4px var(--accent-soft-2); }
input[readonly] { background-color: var(--paper); color: var(--ink-2); }
input[type="number"] { direction: ltr; text-align: end; }
input[type="checkbox"] { width: 16px; height: 16px; accent-color: var(--accent); cursor: pointer; }
.field > span small, .hint { font-size: 11.5px; color: var(--muted); }

/* tables are kept on small screens (scroll sideways) instead of turning into cards */
@media (max-width: 959px) { .table-wrap { display: block; } }
.table td.wrap { white-space: normal; min-width: 180px; }
.table td.actions { width: 1%; }
.table td.actions form { display: inline; }
.table tfoot td { font-weight: 500; background: color-mix(in srgb, var(--paper) 55%, var(--surface)); border-bottom: 0; }
.table .neg { color: var(--neg); }
.row-acts { display: inline-flex; gap: 2px; align-items: center; }
.card-flush { padding: 0; overflow: hidden; }
.card-flush > .card-head { padding: 18px 22px 0; }

/* server-side filters live in the template's toolbar */
.toolbar form { display: contents; }
.toolbar input, .toolbar select { width: auto; min-width: 150px; }
.toolbar .search input { width: 100%; }
.toolbar .spacer { flex: 1; }
.tabs a { position: relative; display: inline-flex; align-items: center; gap: 8px; height: 46px; padding-inline: 12px; color: var(--muted); white-space: nowrap; transition: color .2s; }
.tabs a:hover { color: var(--ink); }
.tabs a[aria-selected="true"] { color: var(--ink); font-weight: 500; }
.tabs a[aria-selected="true"]::after { content: ""; position: absolute; inset-inline: 10px; bottom: 0; height: 2.5px; border-radius: 3px 3px 0 0; background: var(--accent); }
.tabs a[aria-selected="true"] .count { background: var(--accent); color: var(--on-accent); }
.month-pick { display: inline-flex; align-items: center; gap: 6px; height: var(--ctrl-h); padding-inline: 12px 4px; border: 1px solid var(--line-strong); border-radius: var(--r-ctrl); background: var(--surface); color: var(--muted); }
.month-pick input { border: 0 !important; height: 34px !important; padding-inline: 4px !important; width: auto !important; box-shadow: none !important; background: none !important; }

/* chips used for app states */
.chip.neutral { background: var(--paper-2); color: var(--muted); }
.chip.info { background: var(--accent-soft); color: var(--accent-text); }
.chip.pos { background: var(--pos-soft); color: var(--pos); }
.chip.warn { background: var(--warn-soft); color: var(--warn); }
.chip.neg { background: var(--neg-soft); color: var(--neg); }
button.chip { border: 0; cursor: pointer; }

/* forms */
.form-grid.single { grid-template-columns: minmax(0, 1fr); max-width: 980px; }
.form-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.fields.three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
@media (max-width: 1099px) { .fields.three { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 767px) { .fields.three { grid-template-columns: minmax(0, 1fr); } }
.le-head.sale, .le-row.sale { grid-template-columns: minmax(0, 2.2fr) minmax(90px, 1fr) minmax(110px, 1fr) minmax(100px, 1fr) 32px; }
@media (max-width: 767px) { .le-row.sale { grid-template-columns: 1fr 1fr 32px; } }

/* flash messages appear as the template's toast */
.toast { animation: toastIn .4s var(--spring), toastOut .4s var(--ease) 5s forwards; }
.toast.error { background: var(--neg); }
.toast.error svg { color: #fff; }
@keyframes toastOut { to { opacity: 0; visibility: hidden; } }
.alert { display: flex; align-items: center; gap: 10px; padding: 12px 14px; border-radius: 12px; background: var(--accent-soft); color: var(--accent-text); font-size: 13.5px; margin-bottom: 16px; }
.alert.warn { background: var(--warn-soft); color: var(--warn); }
.alert a { text-decoration: underline; }

/* account menu under the avatar */
.acct { position: relative; }
.acct .menu { inset-inline-end: 0; top: calc(100% + 8px); }
.acct .menu .who { display: grid; padding: 8px 10px 10px; border-bottom: 1px solid var(--line); margin-bottom: 4px; }
.acct .menu .who b { font-weight: 500; }
.acct .menu .who small { color: var(--muted); font-size: 12px; }
.menu a { display: flex; width: 100%; align-items: center; gap: 10px; padding: 9px 10px; border-radius: 9px; font-size: 13.5px; transition: background .15s; }
.menu a:hover { background: var(--paper); }
.menu a svg { color: var(--muted); }
.menu form { display: block; }
.top-co { font-size: 13px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* weighbridge */
.scale-display { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; padding: 14px 18px; border-radius: 14px; background: #0B0D10; color: #FF453A; font-family: ui-monospace, Consolas, monospace; font-size: 40px; direction: ltr; letter-spacing: 2px; }
.scale-display small { font-size: 14px; color: #4CD964; }
.weights { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.weights .w { display: grid; gap: 4px; padding: 14px; border-radius: 14px; background: var(--paper); }
.weights .w .label { color: var(--muted); font-size: 12.5px; }
.weights .w .value { font-size: 26px; font-weight: 300; line-height: 1.2; }
.weights .w.net { background: var(--accent-soft); }
.weights .w.net .value { color: var(--accent-text); font-weight: 400; }
@media (max-width: 767px) { .weights { grid-template-columns: minmax(0, 1fr); } }
.scale-panel { display: grid; gap: 8px; margin-bottom: 16px; }
.scale-status { display: flex; align-items: center; justify-content: space-between; gap: 10px; font-size: 12.5px; }
.weigh-input { display: flex; gap: 8px; }
.weigh-input input { flex: 1; min-width: 0; }
.weigh-input .btn { flex: none; }

/* add a supplier / customer / driver from inside a form */
.quick-dialog { margin: auto; border: 0; padding: 0; background: transparent; width: min(460px, calc(100vw - 32px)); max-width: none; }
.quick-dialog::backdrop { background: rgba(15, 20, 25, .35); }
.quick-dialog .form-sec { margin: 0; }
.quick-dialog .form-actions { margin-top: 16px; }
.quick-error { margin-top: 10px; color: var(--neg); font-size: 13px; }

/* attendance grid */
.att-table th, .att-table td { padding: 6px 4px; text-align: center; font-size: 12px; }
.att-table td.name, .att-table th.name { text-align: start; padding-inline: 14px; position: sticky; inset-inline-start: 0; background: var(--surface); z-index: 1; }
.att-table th.name { background: color-mix(in srgb, var(--paper) 55%, var(--surface)); z-index: 2; }
.att-table .link-btn:hover { color: var(--accent-text); }

/* settings */
.inline-table td { padding: 8px 10px; }
.inline-table input, .inline-table select { height: 34px; }

/* login */
.login { min-height: 100dvh; display: grid; place-items: center; padding: 16px; }
.login .card { width: min(400px, 100%); padding: 32px; display: grid; gap: 18px; }
.login .brand { display: flex; align-items: center; gap: 12px; }
.login .brand b { font-weight: 500; font-size: 16px; }
.login .brand small { display: block; color: var(--muted); font-size: 12.5px; }
.login h1 { font-weight: 300; font-size: 26px; }
.login .btn { width: 100%; height: 44px; }

/* print: documents only */
.print-only { display: none; }
@media print {
  body { background: #fff; }
  .topbar, .dock, .bottom-nav, .no-print, .toast, .page-actions, .toolbar, .tabs { display: none !important; }
  .content { padding: 0; max-width: none; }
  .card { box-shadow: none; border: 0; }
  .print-only { display: block; }
  th.print-only, td.print-only { display: table-cell; }
  .table-wrap { display: block !important; overflow: visible; }
  .table tbody tr, .lines td { animation: none; }
}

/* no reorder points in this plant: hide the level tick */
.lvl i::after { display: none; }
.note b { font-weight: 500; color: var(--ink-2); }
.form-sec > textarea { width: 100%; }
