/* Tiny Elephant — Bestillingsverktøy
 *
 * Tokens are the Arnu design system (arnu/design-tokens/tokens.css). The
 * mockup carried them as inline styles; here they are component classes so
 * the templates stay readable.
 */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&family=JetBrains+Mono:wght@400;500&display=swap');

:root {
  --warm-0: #FFFFFF;
  --warm-50: #F4F2F0;
  --warm-100: #E9E5E2;
  --warm-200: #D2CECB;
  --warm-400: #A39D99;
  --warm-500: #6E6A68;
  --warm-900: #1A1919;

  --brand-yellow: #E4F222;
  --status-red: #CF491E;
  --status-amber: #AF7A2B;
  --status-green: #24863E;
  --status-green-tint: #F5FFF9;
  /* A whisper of the brand yellow, for the order-sent note. */
  --brand-tint: #FBFEE4;
  --status-red-tint: #FFF8F4;

  --background: var(--warm-0);
  --foreground: var(--warm-900);
  --muted-foreground: var(--warm-500);
  --border: var(--warm-200);
  --brand: var(--brand-yellow);
  --brand-foreground: var(--warm-900);

  --radius: 10px;
  --radius-md: 8px;
  --radius-sm: 6px;
  --radius-xs: 4px;
  --radius-full: 9999px;

  --shadow-xs: 0 1px 0 0 rgba(26, 25, 25, 0.04);
  --shadow-sm: 0 1px 2px 0 rgba(26, 25, 25, 0.05), 0 1px 3px 0 rgba(26, 25, 25, 0.06);
  --shadow-md: 0 4px 12px -2px rgba(26, 25, 25, 0.08), 0 2px 4px -2px rgba(26, 25, 25, 0.04);
  --shadow-lg: 0 12px 32px -4px rgba(26, 25, 25, 0.10), 0 4px 8px -2px rgba(26, 25, 25, 0.04);
  --ring-focus: 0 0 0 3px rgba(26, 25, 25, 0.15);

  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-mono: 'JetBrains Mono', ui-monospace, 'SF Mono', Menlo, monospace;

  /* Row heights carried over from the design: the overview is a short list
     that can breathe, the working tables are dense on purpose. */
  --row-default: 44px;
  --row-tight: 40px;
  --row-roomy: 48px;

  --body-font-features: 'case', 'ss01';
}

* { box-sizing: border-box; }

/* Our own display rules (.btn is inline-flex) outrank the user agent's
   [hidden] { display: none }, so state it here where it wins. */
[hidden] { display: none !important; }

html, body { margin: 0; padding: 0; }

body {
  background: var(--warm-50);
  color: var(--foreground);
  font-family: var(--font-sans);
  font-weight: 300;
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  font-feature-settings: var(--body-font-features);
  font-variant-numeric: tabular-nums;
}

h1, h2, h3, h4 { margin: 0; }
h2 { font-size: 24px; font-weight: 600; letter-spacing: -0.01em; }
h4 { font-size: 15px; font-weight: 600; }
p { margin: 0; }

a { color: var(--warm-900); text-decoration: underline; text-underline-offset: 2px; }
a:hover { color: var(--warm-500); }

input, select, button { font-family: var(--font-sans); }
input:focus-visible, select:focus-visible, button:focus-visible {
  outline: none;
  box-shadow: var(--ring-focus);
}

::selection { background: var(--brand); color: var(--brand-foreground); }

/* ---------- top bar ---------- */

.topbar {
  height: 52px;
  background: var(--warm-0);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 24px;
  position: sticky;
  top: 0;
  z-index: 5;
}
.topbar-left { display: flex; align-items: center; gap: 14px; }
.topbar-right { display: flex; align-items: center; gap: 4px; }
.wordmark {
  font-weight: 600;
  letter-spacing: 0.07em;
  text-transform: lowercase;
  font-size: 14px;
  text-decoration: none;
}
.divider { width: 1px; height: 18px; background: var(--border); }
.divider-x { width: 1px; height: 18px; background: var(--border); margin: 0 10px; }

.navlink {
  height: 30px;
  padding: 0 11px;
  border: none;
  background: transparent;
  border-radius: var(--radius-sm);
  font-size: 13px;
  cursor: pointer;
  color: var(--warm-900);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
}
.navlink:hover { background: var(--warm-50); color: var(--warm-900); }
.navlink.is-active { background: var(--warm-100); }

.badge-count {
  margin-left: 6px;
  background: var(--warm-900);
  color: var(--warm-0);
  border-radius: 9999px;
  font-size: 10.5px;
  padding: 1px 6px;
}
.account-name { font-size: 12.5px; color: var(--muted-foreground); }

/* ---------- sync ---------- */

/* One control instead of a label plus a button: the icon says what it does,
   the time says how fresh the numbers are, and the tooltip carries the full
   sentence. Costs about a third of the width the pair did. */
.syncform { display: flex; align-items: center; }
.syncbtn { gap: 6px; padding: 0 10px; }
.syncbtn-icon { font-size: 13px; line-height: 1; color: var(--muted-foreground); }
.syncbtn-time {
  font-size: 12.5px;
  color: var(--muted-foreground);
  font-variant-numeric: tabular-nums;
}
.syncbtn.is-failed .syncbtn-icon,
.syncbtn.is-failed .syncbtn-time { color: var(--status-red); }
.syncbtn.is-never .syncbtn-icon,
.syncbtn.is-never .syncbtn-time { color: var(--status-amber); }

.syncbtn-icon.is-spinning { animation: spin 1.1s linear infinite; display: inline-block; }
@keyframes spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) {
  .syncbtn-icon.is-spinning { animation: none; }
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.btn[disabled] {
  color: var(--warm-400);
  background: var(--warm-50);
  cursor: default;
}

/* ---------- tool switcher ---------- */

.tools { position: relative; }
.tools-menu {
  position: absolute;
  top: 38px;
  left: 0;
  width: 250px;
  background: var(--warm-0);
  border: 1px solid var(--warm-200);
  border-radius: var(--radius);
  box-shadow: var(--shadow-md);
  padding: 6px;
  z-index: 10;
}
.tools-menu-active {
  height: 34px;
  padding: 0 10px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--warm-100);
  border-radius: var(--radius-sm);
  font-size: 13px;
}
.tools-menu-note {
  padding: 10px;
  font-size: 12.5px;
  color: var(--muted-foreground);
  line-height: 1.5;
}

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

.page { max-width: 1180px; margin: 0 auto; padding: 36px 24px 72px; }
.page-narrow { max-width: 1000px; margin: 0 auto; padding: 36px 24px 72px; }
.page-form { max-width: 820px; margin: 0 auto; padding: 28px 24px 72px; }

.row-between {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
}
.section-head { display: flex; align-items: baseline; gap: 10px; margin-bottom: 10px; }
.section-note { font-size: 12.5px; color: var(--muted-foreground); }

.backlink {
  height: 28px;
  padding: 0;
  border: none;
  background: transparent;
  font-size: 12.5px;
  color: var(--muted-foreground);
  cursor: pointer;
  margin-bottom: 12px;
  display: inline-block;
  text-decoration: none;
}
.backlink:hover { color: var(--warm-900); }

/* ---------- card ---------- */

.card {
  background: var(--warm-0);
  border: 1px solid var(--warm-200);
  border-radius: var(--radius);
  box-shadow: var(--shadow-xs);
  overflow: hidden;
}
.card-pad { padding: 20px 22px; }
/* Cards clip their contents so table corners stay round — but a card that
   holds a popover has to let it out. */
.card-spills { overflow: visible; }
.card-head {
  padding: 12px 18px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.card-label {
  padding: 10px 18px;
  border-bottom: 1px solid var(--warm-100);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--muted-foreground);
}
.card-foot {
  padding: 12px 18px;
  background: var(--warm-50);
  border-top: 1px solid var(--border);
  font-size: 12.5px;
  color: var(--muted-foreground);
}
.card-foot-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 16px 20px;
}

/* Standing explanation inside a card — not an error, just context. */
.notice {
  padding: 10px 20px;
  background: var(--warm-50);
  border-bottom: 1px solid var(--border);
  font-size: 12.5px;
  color: var(--muted-foreground);
}

.form-actions { display: flex; align-items: center; justify-content: flex-end; gap: 12px; margin-top: 12px; }

/* ---------- pager ---------- */

.pager { display: flex; align-items: center; gap: 10px; }
.pager-count { font-size: 12.5px; color: var(--muted-foreground); white-space: nowrap; }
.pager-total { display: flex; align-items: center; gap: 12px; }
.pager-total strong { font-weight: 600; color: var(--foreground); }

.btn.is-disabled {
  color: var(--warm-400);
  background: var(--warm-50);
  cursor: default;
  pointer-events: none;
}

/* ---------- table ---------- */

.tbl { width: 100%; border-collapse: collapse; font-size: 13px; }
.tbl th {
  text-align: left;
  padding: 9px 18px;
  border-bottom: 1px solid var(--border);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--muted-foreground);
  white-space: nowrap;
}
.tbl td { padding: 0 18px; border-bottom: 1px solid var(--warm-100); }
.tbl tbody tr { height: var(--row-default); }
.tbl-tight tbody tr { height: var(--row-tight); }
.tbl-roomy tbody tr { height: var(--row-roomy); }
.tbl .num { text-align: right; font-variant-numeric: tabular-nums; }
.tbl th.num { text-align: right; }
.tbl .tight { padding-left: 12px; padding-right: 12px; }
.tbl tfoot td {
  height: var(--row-default);
  background: var(--warm-50);
  font-weight: 600;
  font-size: 13px;
  border-bottom: 0;
}

.cell-line { display: flex; align-items: center; gap: 10px; }

/* A deactivated row is still readable, just clearly out of play. */
.tbl tbody tr.is-off td { color: var(--warm-400); }
.tbl tbody tr.is-off .sku, .tbl tbody tr.is-off .sub { color: var(--warm-400); }

.sku { font-family: var(--font-mono); font-size: 11.5px; color: var(--muted-foreground); }
.sub { font-size: 11.5px; color: var(--muted-foreground); }
.low { color: var(--status-red); }
.muted { color: var(--muted-foreground); }

.sort-btn {
  border: none;
  background: transparent;
  cursor: pointer;
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--muted-foreground);
  padding: 0;
  text-decoration: none;
  white-space: nowrap;
}
.sort-btn:hover { color: var(--warm-900); }
.sort-btn.is-sorted { color: var(--warm-900); }

/* Quiet inline control — the "endret ↺" reset next to a changed quantity. */
.linkbtn {
  border: none;
  background: transparent;
  padding: 0;
  font-size: 11px;
  color: var(--status-amber);
  cursor: pointer;
  white-space: nowrap;
}
.linkbtn:hover { text-decoration: underline; }
.linkbtn[hidden] { display: none; }

/* Per-row action that repeats down a long table. It has to be reachable, but
   it is not what the page is for — so it sits at the edge of legibility and
   only comes forward on the row you are actually pointing at. */
.rowaction {
  border: none;
  background: transparent;
  padding: 0;
  font-size: 11.5px;
  color: var(--warm-400);
  cursor: pointer;
  white-space: nowrap;
}
.tbl tbody tr:hover .rowaction { color: var(--muted-foreground); }
.rowaction:hover,
.tbl tbody tr:hover .rowaction:hover { color: var(--warm-900); text-decoration: underline; }
.rowaction:focus-visible { color: var(--warm-900); }

/* A control that is only a symbol. Quiet until the row is hovered, so a dense
   table does not read as a field of buttons — same bargain as .rowaction, but
   sized to sit beside an input without pushing the column around. */
.iconaction {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  flex: none;
  padding: 0;
  border: 1px solid transparent;
  border-radius: var(--radius-md);
  background: transparent;
  color: var(--warm-400);
  cursor: pointer;
}
.tbl tbody tr:hover .iconaction { color: var(--muted-foreground); }
.iconaction:hover,
.tbl tbody tr:hover .iconaction:hover {
  color: var(--warm-900);
  border-color: var(--border);
  background: var(--warm-0);
}
.iconaction:focus-visible { color: var(--warm-900); border-color: var(--border); }

/* Min, maks and the suggestion belong together: one is derived from the other
   two, and reading them as three unrelated columns is what made the control
   look like it had wandered in. A tint rather than rules, so the band groups
   without adding lines to an already dense table. */
.tbl .levels { background: var(--warm-50); }
.tbl .levels-start { border-left: 1px solid var(--warm-100); }
.tbl .levels-end { border-right: 1px solid var(--warm-100); }
.tbl tbody tr:hover .levels { background: var(--warm-100); }

/* On/off as a switch rather than a symbol: a circle-slash says what will
   happen, a switch says what is true now — and in a table of a thousand rows,
   the state is the thing you scan for. */
.switch {
  display: inline-flex;
  align-items: center;
  width: 32px;
  height: 18px;
  padding: 2px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--warm-100);
  cursor: pointer;
  transition: background 120ms ease, border-color 120ms ease;
}
.switch-knob {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--warm-400);
  transition: transform 120ms ease, background 120ms ease;
}
.switch.is-on {
  background: var(--warm-900);
  border-color: var(--warm-900);
}
.switch.is-on .switch-knob {
  background: var(--warm-0);
  transform: translateX(14px);
}
.switch:hover { border-color: var(--warm-400); }
.switch.is-on:hover { background: var(--warm-500); border-color: var(--warm-500); }
.switch:focus-visible { outline: 2px solid var(--warm-900); outline-offset: 2px; }

@media (prefers-reduced-motion: reduce) {
  .switch, .switch-knob { transition: none; }
}

/* Names the symbol for screen readers without showing the word. */
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

.overline {
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--muted-foreground);
}
.metric { font-size: 20px; font-variant-numeric: tabular-nums; }

/* A headline figure with its label and its caveat on one line. */
.stat { display: flex; align-items: baseline; gap: 10px; margin-top: 8px; flex-wrap: wrap; }

/* ---------- buttons ---------- */

.btn {
  height: 36px;
  padding: 0 14px;
  border: 1px solid var(--border);
  background: var(--warm-0);
  border-radius: var(--radius-md);
  font-size: 13px;
  cursor: pointer;
  color: var(--warm-900);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  white-space: nowrap;
}
.btn:hover { background: var(--warm-50); color: var(--warm-900); }
.btn-sm { height: 30px; padding: 0 12px; font-size: 12.5px; }
.btn-brand {
  border-color: var(--warm-900);
  background: var(--brand);
  color: var(--brand-foreground);
  font-weight: 500;
}
.btn-brand:hover { background: var(--brand); filter: brightness(0.96); }
.btn-dark {
  border-color: var(--warm-900);
  background: var(--warm-900);
  color: var(--warm-0);
}
.btn-dark:hover { background: var(--warm-900); color: var(--warm-0); filter: brightness(1.25); }
.btn-quiet { color: var(--muted-foreground); }

.segmented {
  display: flex;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  overflow: hidden;
  height: 36px;
}
.segmented a, .segmented button {
  height: 100%;
  padding: 0 14px;
  border: none;
  background: var(--warm-0);
  color: var(--warm-900);
  font-size: 12.5px;
  cursor: pointer;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  white-space: nowrap;
}
.segmented .is-on { background: var(--warm-100); }
.segmented .sep { width: 1px; background: var(--border); padding: 0; }

/* ---------- inputs ---------- */

.inp {
  height: 36px;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 0 10px;
  font-size: 13px;
  background: var(--warm-0);
  color: var(--warm-900);
}
.inp-num {
  height: 30px;
  width: 64px;
  text-align: right;
  padding: 0 8px;
  font-variant-numeric: tabular-nums;
}
/* Quiet cell input: invisible until hovered, so a dense table stays calm. */
.inp-cell {
  height: 28px;
  width: 56px;
  text-align: right;
  border: 1px solid transparent;
  border-radius: var(--radius-md);
  padding: 0 7px;
  font-size: 13px;
  font-variant-numeric: tabular-nums;
  background: transparent;
  color: var(--muted-foreground);
}
.inp-cell:hover { border-color: var(--border); background: var(--warm-0); }
.inp-cell:focus { border-color: var(--border); background: var(--warm-0); color: var(--warm-900); }
.inp-wide { width: 76px; }
.inp-select { width: 100%; height: 30px; font-size: 12.5px; padding: 0 8px; }

.field-row { display: flex; align-items: center; justify-content: flex-end; gap: 6px; }
.unit { font-size: 11.5px; color: var(--muted-foreground); }

/* ---------- autosave ---------- */

/* Confirmation happens in the field you just left, so the eye does not have
   to travel. It fades rather than disappears — a flash that is gone before
   you look up has confirmed nothing. */
.inp.is-saved,
.inp-cell.is-saved {
  border-color: var(--status-green);
  background: var(--status-green-tint);
  transition: border-color 900ms ease-out 400ms, background-color 900ms ease-out 400ms;
}
.inp.is-error,
.inp-cell.is-error {
  border-color: var(--status-red);
  background: var(--status-red-tint);
  color: var(--warm-900);
}

.autosave-status { font-size: 12.5px; color: var(--muted-foreground); min-height: 1em; }
.autosave-status.is-ok { color: var(--status-green); }
.autosave-status.is-error { color: var(--status-red); }

@media (prefers-reduced-motion: reduce) {
  .inp.is-saved, .inp-cell.is-saved { transition: none; }
}

/* ---------- popover ---------- */

/* Anchored to its own summary, not the viewport: `position: relative` here is
   what the absolutely positioned panel resolves against. */
.popover { position: relative; }
.popover > summary::-webkit-details-marker { display: none; }
.popover-panel {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  width: 420px;
  z-index: 10;
  box-shadow: var(--shadow-md);
  text-align: left;
}

.popover-left > .popover-panel { right: auto; left: 0; }

/* ``min-width: 0`` is what lets these sit in a grid row. Without it a field
   is a grid item at the default ``min-width: auto``, whose min-content width
   is the input's own intrinsic size — three of those overflow any panel
   narrower than about 550px, and the last one gets clipped. */
.field { display: grid; gap: 4px; min-width: 0; }
/* And the control inside it needs the same release, for the same reason: a
   grid item cannot shrink below its own intrinsic width unless told to. Two
   fields to a row fit either way; three did not, and the last one hung out
   past the panel. */
.field > .inp { min-width: 0; width: 100%; }

/* A field that reports rather than accepts: same rhythm as an input beside
   it, but flat, so it does not invite a click that would do nothing. */
.field-static {
  height: 36px;
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: var(--warm-900);
}
.field-note {
  font-size: 11.5px;
  line-height: 1.5;
  color: var(--muted-foreground);
  margin-top: -2px;
}
.field-label { font-size: 11.5px; color: var(--muted-foreground); }

/* The supplier's details, with its edit control sitting in the same line —
   close to what it edits, and quiet enough not to compete with "Bestill". */
.supplier-meta {
  display: flex;
  align-items: baseline;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 6px;
}
.supplier-meta .popover { display: inline-block; }
.supplier-meta summary::-webkit-details-marker { display: none; }

/* ---------- pills ---------- */

.pill {
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  border-radius: 9999px;
  padding: 2px 9px;
  background: var(--warm-50);
  border: 1px solid var(--border);
  white-space: nowrap;
}
.pill-open { color: var(--warm-900); }
.pill-partial { color: var(--status-amber); }
.pill-received { color: var(--status-green); }
.pill-cancelled { color: var(--muted-foreground); }
.pill-quiet { color: var(--muted-foreground); background: transparent; }

.flag { font-size: 11px; color: var(--muted-foreground); }
.flag-amber { color: var(--status-amber); }

/* ---------- order rows ---------- */

.orderrow {
  padding: 0 18px;
  min-height: 48px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  border-bottom: 1px solid var(--warm-100);
}
.orderrow:last-child { border-bottom: 0; }
.orderrow-left { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.orderrow-date { font-family: var(--font-mono); font-size: 12px; color: var(--muted-foreground); }
.orderrow-meta { font-size: 13px; }
.orderrow-actions { display: flex; gap: 8px; }

/* ---------- modal ---------- */

.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(26, 25, 25, 0.28);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 20;
}
.modal {
  background: var(--warm-0);
  border: 1px solid var(--warm-200);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  width: 460px;
  padding: 22px;
}
.modal h4 { font-size: 16px; }
.modal p { font-size: 13.5px; color: var(--muted-foreground); margin-top: 8px; line-height: 1.55; }
.modal-actions { display: flex; gap: 8px; justify-content: flex-end; margin-top: 20px; }

/* ---------- sign in ---------- */

.signin { min-height: 100vh; display: grid; place-items: center; padding: 24px; }
.signin-card { width: 380px; }
.signin-fields { display: flex; flex-direction: column; gap: 10px; }
.signin-fields .inp { width: 100%; }
.signin-error {
  font-size: 12.5px;
  color: var(--status-red);
  background: var(--status-red-tint);
  border: 1px solid var(--status-red);
  border-radius: var(--radius-md);
  padding: 8px 10px;
}

/* ---------- order sent ---------- */

.confetti-canvas {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 50;
}

/* Not an alert — nothing needs attending to. A small, warm note that hugs its
   own text rather than spanning the page like a warning banner. */
.cheer {
  display: flex;
  width: fit-content;
  max-width: 100%;
  align-items: center;
  gap: 10px;
  margin-bottom: 14px;
  padding: 9px 16px 9px 10px;
  background: var(--brand-tint);
  border: none;
  /* Pill while it fits on one line; softens to a rounded box if a longer
     cheer has to wrap, so the corners never swallow the text. */
  border-radius: var(--radius-full);
  box-shadow: var(--shadow-xs);
  opacity: 1;
  transform: translateY(0);
  transition: opacity 600ms ease-out, transform 600ms ease-out;
}
@media (max-width: 720px) {
  .cheer { border-radius: var(--radius); align-items: flex-start; }
}
.cheer.is-leaving { opacity: 0; transform: translateY(-4px); }
.cheer-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  width: 22px;
  height: 22px;
  border-radius: var(--radius-full);
  background: var(--brand);
  color: var(--brand-foreground);
  font-size: 12px;
}
.cheer-text { font-size: 14px; font-weight: 500; }
.cheer-detail { font-size: 12.5px; color: var(--muted-foreground); }

@media (prefers-reduced-motion: reduce) {
  .cheer { transition: opacity 600ms ease-out; }
  .cheer.is-leaving { transform: none; }
}

/* ---------- empty state ---------- */

.empty { padding: 40px 18px; text-align: center; color: var(--muted-foreground); font-size: 13px; }

/* ---------- print ---------- */

.print-sheet { background: #fff; color: #000; min-height: 100vh; padding: 24px 0; font-weight: 400; }
.print-bar {
  max-width: 760px;
  margin: 0 auto 24px;
  display: flex;
  gap: 8px;
  align-items: center;
}
.print-body { max-width: 760px; margin: 0 auto; padding: 0 8px; }
.print-head { border-bottom: 1.5px solid #000; padding-bottom: 12px; }
.print-title { font-size: 19px; font-weight: 600; letter-spacing: -0.01em; }
.print-meta { font-size: 12.5px; color: #444; margin-top: 6px; }
.print-tbl { width: 100%; border-collapse: collapse; margin-top: 22px; font-size: 12.5px; }
.print-tbl th {
  text-align: left;
  padding: 6px 8px;
  border-bottom: 1.5px solid #000;
  font-weight: 600;
}
.print-tbl td { padding: 6px 8px; border-bottom: 0.5px solid #999; }
/* Flush the outer edges so the block squares up with the rule above it. */
.print-tbl th:first-child, .print-tbl td:first-child { padding-left: 0; }
.print-tbl th:last-child, .print-tbl td:last-child { padding-right: 0; }
.print-tbl .num { text-align: right; font-variant-numeric: tabular-nums; }
.print-tbl tfoot td { border-bottom: 0; padding-top: 8px; font-weight: 600; }

@media print {
  body { background: #fff; }
  .no-print { display: none !important; }
  @page { size: A4; margin: 18mm 16mm; }
}
