/* 365-Chiptuningfiles – file service portal
   One stylesheet for the customer portal and the admin panel.
   1 tokens · 2 base · 3 shell · 4 components · 5 forms · 6 tables · 7 charts · 8 pages · 9 utilities */

/* ------------------------------------------------------------------ 1 tokens */
@font-face { font-family: "Inter"; font-weight: 400; font-style: normal; font-display: swap; src: url("../fonts/inter-400.woff") format("woff"); }
@font-face { font-family: "Inter"; font-weight: 500; font-style: normal; font-display: swap; src: url("../fonts/inter-500.woff") format("woff"); }
@font-face { font-family: "Inter"; font-weight: 600; font-style: normal; font-display: swap; src: url("../fonts/inter-600.woff") format("woff"); }
@font-face { font-family: "Inter"; font-weight: 700; font-style: normal; font-display: swap; src: url("../fonts/inter-700.woff") format("woff"); }

:root {
  color-scheme: light;
  --font: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;

  --page: #eceff1;
  --surface: #ffffff;
  --surface-2: #f5f7f8;      /* table heads, hover rows */
  --surface-3: #eceff1;      /* wells inside a card */
  --line: #dde4e7;           /* dividers */
  --line-strong: #7f929c;    /* input borders (3:1 on the surface) */
  --ink: #263238;
  --ink-2: #546e7a;
  --ink-3: #5f7480;

  --brand: #e5202b;          /* the red of the logo: marks, big numerals, focus */
  --brand-solid: #e5202b;    /* filled buttons / banner: white text is readable on it (4.6:1) */
  --brand-solid-hover: #c8151f;
  --brand-ink: #c8151f;      /* red text and links on light surfaces (5.9:1 on white) */
  --on-brand: #ffffff;

  --side: #333333;
  --side-ink: #ffffff;
  --side-ink-2: #c9c9c9;
  --side-hover: #454545;
  --side-active: #5c5c5c;

  --top: #ffffff;

  --info-bg: #c6e9f5;    --info-ink: #01579b;
  --success-bg: #c8e6c9; --success-ink: #1b5e20;
  --warning-bg: #fdecc0; --warning-ink: #6b4400;
  --danger-bg: #fbd5d5;  --danger-ink: #9b1c1c;
  --neutral-bg: #e3e8eb; --neutral-ink: #37474f;
  --danger-solid: #b3261e;

  --series-1: #e5202b;
  --series-2: #2a78d6;
  --series-3: #199e70;
  --grid: #e3e8eb;
  --axis: #b0bec5;

  --shadow: 0 1px 2px rgba(38, 50, 56, 0.14), 0 0 1px rgba(38, 50, 56, 0.10);
  --shadow-pop: 0 8px 24px rgba(38, 50, 56, 0.18), 0 0 1px rgba(38, 50, 56, 0.2);
  --radius: 3px;
  --side-width: 220px;
  --top-height: 64px;
}

@media (prefers-color-scheme: dark) {
  :root:where(:not([data-theme="light"])) {
    color-scheme: dark;
    --page: #13161a; --surface: #1e2226; --surface-2: #252a2f; --surface-3: #171a1d;
    --line: #2f363c; --line-strong: #77848e;
    --ink: #e7ebee; --ink-2: #b0bcc4; --ink-3: #8e9ca6;
    --brand: #f0323c; --brand-solid: #e5202b; --brand-solid-hover: #f0323c; --brand-ink: #ff6b6b;
    --side: #181b1f; --side-ink: #e7ebee; --side-ink-2: #9aa7b0; --side-hover: #23282d; --side-active: #2e343a;
    --top: #1e2226;
    --info-bg: #0f3547;    --info-ink: #a9dcf5;
    --success-bg: #163f25; --success-ink: #9be3ae;
    --warning-bg: #4a3505; --warning-ink: #ffd480;
    --danger-bg: #4f1c1c;  --danger-ink: #ffb4b4;
    --neutral-bg: #2a3036; --neutral-ink: #c5ced4;
    --danger-solid: #c9372c;
    --series-1: #f0323c; --series-2: #3987e5; --series-3: #199e70;
    --grid: #2a3036; --axis: #48525a;
    --shadow: 0 1px 2px rgba(0, 0, 0, 0.5), 0 0 0 1px rgba(255, 255, 255, 0.03);
    --shadow-pop: 0 10px 28px rgba(0, 0, 0, 0.6), 0 0 0 1px rgba(255, 255, 255, 0.06);
  }
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --page: #13161a; --surface: #1e2226; --surface-2: #252a2f; --surface-3: #171a1d;
  --line: #2f363c; --line-strong: #77848e;
  --ink: #e7ebee; --ink-2: #b0bcc4; --ink-3: #8e9ca6;
  --brand: #f0323c; --brand-solid: #e5202b; --brand-solid-hover: #f0323c; --brand-ink: #ff6b6b;
  --side: #181b1f; --side-ink: #e7ebee; --side-ink-2: #9aa7b0; --side-hover: #23282d; --side-active: #2e343a;
  --top: #1e2226;
  --info-bg: #0f3547;    --info-ink: #a9dcf5;
  --success-bg: #163f25; --success-ink: #9be3ae;
  --warning-bg: #4a3505; --warning-ink: #ffd480;
  --danger-bg: #4f1c1c;  --danger-ink: #ffb4b4;
  --neutral-bg: #2a3036; --neutral-ink: #c5ced4;
  --danger-solid: #c9372c;
  --series-1: #f0323c; --series-2: #3987e5; --series-3: #199e70;
  --grid: #2a3036; --axis: #48525a;
  --shadow: 0 1px 2px rgba(0, 0, 0, 0.5), 0 0 0 1px rgba(255, 255, 255, 0.03);
  --shadow-pop: 0 10px 28px rgba(0, 0, 0, 0.6), 0 0 0 1px rgba(255, 255, 255, 0.06);
}

/* --------------------------------------------------------------------- 2 base */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--page); color: var(--ink);
  font: 400 14px/1.5 var(--font); -webkit-font-smoothing: antialiased;
}
h1, h2, h3, h4, p, figure, dl, dd, ul, ol { margin: 0; }
ul, ol { padding: 0; list-style: none; }
h1 { font-size: 22px; line-height: 1.25; font-weight: 600; letter-spacing: -0.01em; }
h2 { font-size: 15px; line-height: 1.35; font-weight: 600; }
h3 { font-size: 14px; line-height: 1.4; font-weight: 600; }
a { color: var(--brand-ink); text-decoration: underline; text-underline-offset: 2px; }
a:hover { text-decoration-thickness: 2px; }
img, svg { max-width: 100%; }
button, input, select, textarea { font: inherit; color: inherit; }
hr { border: 0; border-top: 1px solid var(--line); margin: 16px 0; }
strong, b { font-weight: 600; }
small { font-size: 12.5px; }
code, .mono { font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace; font-size: 13px; }
:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; border-radius: 2px; }
::selection { background: var(--brand); color: #fff; }

.icon {
  width: 18px; height: 18px; flex: none; vertical-align: -4px;
  fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round;
}
.icon-sm { width: 15px; height: 15px; vertical-align: -3px; }
.icon-lg { width: 24px; height: 24px; }
.icon-xl { width: 34px; height: 34px; stroke-width: 1.6; }

.skip-link {
  position: absolute; left: 8px; top: -60px; z-index: 100; background: var(--surface); color: var(--ink);
  padding: 8px 12px; border-radius: var(--radius); box-shadow: var(--shadow-pop);
}
.skip-link:focus { top: 8px; }

/* -------------------------------------------------------------------- 3 shell */
.topbar {
  position: fixed; inset: 0 0 auto 0; height: var(--top-height); z-index: 30;
  display: flex; align-items: center; gap: 8px; padding: 0 20px 0 0;
  background: var(--top); border-bottom: 1px solid var(--line);
}
.topbar-brand {
  width: var(--side-width); flex: none; height: 100%; display: flex; align-items: center; padding: 0 12px 0 16px;
  color: var(--ink); text-decoration: none; font-weight: 700; font-size: 14px; letter-spacing: -0.015em;
}
.topbar-brand img { max-height: 36px; max-width: 170px; }
.topbar-brand img.logo-compact { max-width: 184px; width: auto; height: auto; }
.topbar-brand picture img, .auth-brand picture img { display: block; }
.brand-mark {
  width: 32px; height: 32px; border-radius: 50%; background: var(--ink); color: var(--surface); flex: none;
  display: grid; place-items: center; font-weight: 700; font-size: 15px; margin-right: 10px;
}
.brand-text { line-height: 1.15; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.brand-text span { display: block; font-size: 11px; font-weight: 500; color: var(--ink-2); letter-spacing: 0; }
.logo-light { display: block; }
.logo-dark { display: none; }
:root[data-theme="dark"] .logo-light { display: none; }
:root[data-theme="dark"] .logo-dark { display: block; }
@media (prefers-color-scheme: dark) {
  :root:where(:not([data-theme="light"])) .logo-light { display: none; }
  :root:where(:not([data-theme="light"])) .logo-dark { display: block; }
}

.topbar-left, .topbar-right { display: flex; align-items: center; gap: 4px; min-width: 0; }
.topbar-right { margin-left: auto; }
.top-link {
  display: inline-flex; align-items: center; gap: 8px; height: 40px; padding: 0 10px; border-radius: var(--radius);
  color: var(--ink); text-decoration: none; font-weight: 600; font-size: 13.5px; white-space: nowrap;
  background: none; border: 0; cursor: pointer;
}
.top-link:hover { background: var(--surface-2); }
.top-link .icon { color: var(--brand); }
.top-link.plain .icon { color: var(--ink-2); }
.top-credits { display: inline-flex; align-items: center; gap: 12px; }
.top-credits b { font-weight: 700; font-variant-numeric: tabular-nums; }
.top-credits span { color: var(--ink-2); font-weight: 500; }
.nav-toggle { display: none; margin-left: 8px; position: relative; }
.toggle-dot { position: absolute; top: 8px; right: 6px; width: 9px; height: 9px; border-radius: 50%;
  background: var(--brand-solid); box-shadow: 0 0 0 2px var(--top); }
.mobile-only { display: none !important; }

/* language: NL | EN */
.lang-switch { display: inline-flex; margin: 0 4px; border: 1px solid var(--line-strong); border-radius: 999px; overflow: hidden; background: var(--surface); }
.lang-switch button {
  border: 0; background: none; min-height: 26px; padding: 3px 10px; color: var(--ink-2); cursor: pointer;
  font-weight: 700; font-size: 12px; letter-spacing: 0.04em; line-height: 1.2;
}
.lang-switch button + button { border-left: 1px solid var(--line); }
.lang-switch button:hover { background: var(--surface-2); color: var(--ink); }
.lang-switch button[aria-pressed="true"] { background: var(--ink); color: var(--surface); cursor: default; }
.lang-switch button:focus-visible { outline-offset: -2px; }
.side-lang { display: none; }

/* theme: a switch with the sun or the moon on the knob */
.theme-switch { display: inline-flex; align-items: center; padding: 8px 6px; margin: 0 2px; border: 0; background: none; border-radius: 999px; cursor: pointer; }
.ts-track { position: relative; display: block; width: 44px; height: 24px; border-radius: 12px; background: var(--surface-3); border: 1px solid var(--line-strong); transition: background 0.2s, border-color 0.2s; }
.theme-switch:hover .ts-track { border-color: var(--ink-2); }
.ts-knob {
  position: absolute; top: 2px; left: 2px; width: 18px; height: 18px; border-radius: 50%; display: grid; place-items: center;
  background: var(--surface); color: var(--ink); box-shadow: 0 1px 2px rgba(0, 0, 0, 0.25); transition: transform 0.2s;
}
.ts-knob .icon { width: 12px; height: 12px; }
.ts-moon { display: none; }
:root[data-theme="dark"] .ts-track { background: var(--side-active); }
:root[data-theme="dark"] .ts-knob { transform: translateX(20px); background: var(--ink); color: var(--page); }
:root[data-theme="dark"] .ts-sun { display: none; }
:root[data-theme="dark"] .ts-moon { display: block; }
@media (prefers-color-scheme: dark) {
  :root:where(:not([data-theme="light"])) .ts-track { background: var(--side-active); }
  :root:where(:not([data-theme="light"])) .ts-knob { transform: translateX(20px); background: var(--ink); color: var(--page); }
  :root:where(:not([data-theme="light"])) .ts-sun { display: none; }
  :root:where(:not([data-theme="light"])) .ts-moon { display: block; }
}

.avatar {
  width: 36px; height: 36px; border-radius: 50%; flex: none; display: grid; place-items: center;
  background: #f9d2d4; color: #8a1c24; font-size: 12.5px; font-weight: 700; letter-spacing: 0.02em;
}
:root[data-theme="dark"] .avatar { background: #4a2a2e; color: #ffc9cd; }
@media (prefers-color-scheme: dark) { :root:where(:not([data-theme="light"])) .avatar { background: #4a2a2e; color: #ffc9cd; } }
.avatar-lg { width: 56px; height: 56px; font-size: 18px; }

/* dropdown menus are <details> elements: they work without JavaScript */
.menu { position: relative; }
.menu > summary { list-style: none; cursor: pointer; }
.menu > summary::-webkit-details-marker { display: none; }
.menu-panel {
  position: absolute; right: 0; top: calc(100% + 6px); min-width: 220px; z-index: 40; padding: 6px;
  background: var(--surface); border-radius: var(--radius); box-shadow: var(--shadow-pop);
}
.menu-panel a, .menu-panel button {
  display: flex; align-items: center; gap: 10px; width: 100%; padding: 8px 10px; border: 0; background: none;
  border-radius: var(--radius); color: var(--ink); text-decoration: none; text-align: left; cursor: pointer;
  font-weight: 500;
}
.menu-panel a:hover, .menu-panel button:hover { background: var(--surface-2); }
.menu-panel .icon { color: var(--ink-2); }
.menu-panel hr { margin: 6px 0; }
.menu-head { padding: 8px 10px 10px; border-bottom: 1px solid var(--line); margin-bottom: 6px; }
.menu-head b { display: block; }
.menu-head span { color: var(--ink-2); font-size: 12.5px; word-break: break-all; }
.menu-choice[aria-pressed="true"] { background: var(--surface-2); font-weight: 600; }
.menu-choice[aria-pressed="true"]::after { content: ""; margin-left: auto; width: 8px; height: 8px; border-radius: 50%; background: var(--brand); }

.sidebar {
  position: fixed; top: var(--top-height); bottom: 0; left: 0; width: var(--side-width); z-index: 20;
  background: var(--side); color: var(--side-ink); overflow-y: auto; padding: 16px 16px 24px;
}
.side-title { font-size: 12.5px; font-weight: 700; color: var(--side-ink); padding: 4px 0 12px; }
.side-nav a, .side-nav summary {
  display: flex; align-items: center; gap: 10px; min-height: 36px; padding: 7px 12px; margin-bottom: 2px;
  color: var(--side-ink); text-decoration: none; font-weight: 600; font-size: 13.5px; border-radius: 2px;
  cursor: pointer; list-style: none;
}
.side-nav summary::-webkit-details-marker { display: none; }
.side-nav a:hover, .side-nav summary:hover { background: var(--side-hover); }
.side-nav a[aria-current="page"] { background: var(--side-active); }
.side-nav .icon { color: var(--side-ink-2); }
.side-nav a[aria-current="page"] .icon { color: var(--side-ink); }
.side-nav .chev { margin-left: auto; transition: transform 0.15s ease; }
.side-nav details[open] > summary .chev { transform: rotate(180deg); }
.side-sub { padding: 2px 0 6px 28px; }
.side-sub a { font-weight: 500; font-size: 13px; min-height: 32px; padding: 5px 10px; color: var(--side-ink-2); }
.side-sub a:hover, .side-sub a[aria-current="page"] { color: var(--side-ink); }
.side-count {
  margin-left: auto; min-width: 22px; height: 20px; padding: 0 6px; border-radius: 10px; display: grid; place-items: center;
  background: var(--brand-solid); color: #fff; font-size: 11.5px; font-weight: 700; font-variant-numeric: tabular-nums;
}
.side-foot { margin-top: 20px; padding-top: 14px; border-top: 1px solid rgba(255, 255, 255, 0.12); font-size: 12px; color: var(--side-ink-2); }

.main { margin-left: var(--side-width); padding: calc(var(--top-height) + 20px) 24px 40px; min-width: 0; }
.page-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 16px; }
.page-head p { color: var(--ink-2); margin-top: 4px; max-width: 70ch; }
.page-actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.backlink { display: inline-flex; align-items: center; gap: 6px; margin-bottom: 10px; font-weight: 600; text-decoration: none; color: var(--ink-2); }
.backlink:hover { color: var(--ink); }
.scrim { display: none; }

@media (max-width: 960px) {
  .nav-toggle { display: inline-flex; }
  .topbar { padding-right: 10px; }
  .topbar-brand { width: auto; padding: 0 8px 0 12px; }
  .brand-text span { display: none; }
  .sidebar { transform: translateX(-100%); transition: transform 0.2s ease; box-shadow: none; }
  .nav-open .sidebar { transform: none; box-shadow: var(--shadow-pop); }
  .nav-open .scrim { display: block; position: fixed; inset: var(--top-height) 0 0 0; z-index: 15; background: rgba(0, 0, 0, 0.45); }
  .main { margin-left: 0; padding-left: 14px; padding-right: 14px; }
  .hide-mobile { display: none !important; }
  .side-nav a.mobile-only { display: flex !important; }
  /* the bar must fit on a 320 px phone: the name shrinks, menus stay on the screen */
  .topbar { gap: 2px; }
  .topbar-brand { flex: 0 1 auto; min-width: 0; }
  .brand-text { min-width: 0; }
  .topbar-right { flex: none; }
  .menu-panel { position: fixed; top: calc(var(--top-height) + 4px); right: 8px; max-width: calc(100vw - 16px); }
}
@media (max-width: 600px) {
  .topbar .top-lang { display: none; }
  .side-lang { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin: 18px 0 0; padding-top: 16px; border-top: 1px solid rgba(255, 255, 255, 0.12); }
  .side-lang > span { display: inline-flex; align-items: center; gap: 8px; color: var(--side-ink-2); font-size: 12.5px; font-weight: 600; }
  .side-lang .lang-switch { margin: 0; border-color: rgba(255, 255, 255, 0.35); background: transparent; }
  .side-lang .lang-switch button { color: var(--side-ink-2); }
  .side-lang .lang-switch button + button { border-left-color: rgba(255, 255, 255, 0.2); }
  .side-lang .lang-switch button:hover { background: var(--side-hover); color: var(--side-ink); }
  .side-lang .lang-switch button[aria-pressed="true"] { background: var(--side-ink); color: var(--side); }
}
@media (max-width: 480px) {
  .top-credits { display: none; }
  .brand-text { font-size: 13px; }
  .topbar-brand img.logo-compact { max-width: 150px; }
  .auth-top { flex-wrap: wrap; }
  .auth-brand { flex-basis: 100%; }
  .auth-tools { margin-left: auto; }
  .topbar .top-link { padding: 0 8px; }
}
@media (max-width: 360px) {
  .brand-text { display: none; }
  .topbar-brand img.logo-compact { max-width: 130px; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; animation: none !important; } }

/* --------------------------------------------------------------- 4 components */
.card { background: var(--surface); border-radius: var(--radius); box-shadow: var(--shadow); min-width: 0; }
.card-danger { box-shadow: var(--shadow), inset 3px 0 0 var(--danger-solid); }
.card-head {
  display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap;
  padding: 14px 16px; border-bottom: 1px solid var(--line); min-height: 50px;
}
.card-head a { font-weight: 600; }
.card-body { padding: 16px; }
.card-body + .card-body { border-top: 1px solid var(--line); }
.card-foot { padding: 12px 16px; border-top: 1px solid var(--line); display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.card-flush { padding: 0; }

.grid { display: grid; gap: 16px; }
.main > :is(.grid, .card, .notice, .credit-banner, .deal-banner) + :is(.grid, .card, .notice, .credit-banner, .deal-banner) { margin-top: 16px; }
.cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.cols-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.cols-main { grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); align-items: start; }
.cols-half { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); align-items: start; }
.grid.stretch { align-items: stretch; }
.grid.stretch > .grid { align-items: stretch; }
.span-2 { grid-column: span 2; }
@media (max-width: 1100px) { .cols-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } .cols-main { grid-template-columns: minmax(0, 1fr); } }
/* Mail → Templates: the text on the left, the e-mail it becomes on the right (as wide as a phone) */
.cols-mail { grid-template-columns: minmax(0, 1fr) minmax(340px, 460px); align-items: start; }
@media (max-width: 1100px) { .cols-mail { grid-template-columns: minmax(0, 1fr); } }
/* an e-mail shown in a frame; the script gives the frame the height of the mail */
.mail-frame { display: block; width: 100%; height: 640px; border: 1px solid var(--line); border-radius: var(--radius); background: #e8edef; }
@media (max-width: 800px) { .cols-2, .cols-3, .cols-half { grid-template-columns: minmax(0, 1fr); } .span-2 { grid-column: auto; } }
@media (max-width: 520px) { .cols-4 { grid-template-columns: minmax(0, 1fr); } }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 36px; padding: 7px 14px;
  border: 1px solid var(--line-strong); border-radius: var(--radius); background: var(--surface); color: var(--ink);
  font-weight: 600; font-size: 13.5px; line-height: 1.2; text-decoration: none; cursor: pointer; white-space: nowrap;
}
.btn:hover { background: var(--surface-2); }
.btn-primary { background: var(--brand-solid); border-color: var(--brand-solid); color: var(--on-brand); }
.btn-primary:hover { background: var(--brand-solid-hover); border-color: var(--brand-solid-hover); }
/* Red is the brand colour, so a destructive action is outlined rather than filled: it reads as a warning,
   not as the primary button. */
.btn-danger { background: var(--surface); border-color: var(--danger-solid); color: var(--danger-ink); }
.btn-danger:hover { background: var(--danger-bg); }
.btn-ghost { border-color: transparent; background: none; }
.btn-ghost:hover { background: var(--surface-2); }
.btn-inverse { background: #fff; border-color: #fff; color: #b5121c; }
.btn-inverse:hover { background: #fff1f1; }
.btn-sm { min-height: 30px; padding: 4px 10px; font-size: 13px; }
.btn-block { width: 100%; }
.btn[disabled], .btn[aria-disabled="true"] { opacity: 0.55; cursor: not-allowed; }
.link-button { background: none; border: 0; padding: 0; color: var(--brand-ink); text-decoration: underline; cursor: pointer; font-weight: 600; }

.badge {
  display: inline-flex; align-items: center; gap: 6px; padding: 2px 9px; border-radius: 11px; white-space: nowrap;
  font-size: 12.5px; font-weight: 600; line-height: 1.5; background: var(--neutral-bg); color: var(--neutral-ink);
}
.badge-info { background: var(--info-bg); color: var(--info-ink); }
.badge-success { background: var(--success-bg); color: var(--success-ink); }
.badge-warning { background: var(--warning-bg); color: var(--warning-ink); }
.badge-danger { background: var(--danger-bg); color: var(--danger-ink); }
.dot { width: 8px; height: 8px; border-radius: 50%; background: var(--brand); flex: none; display: inline-block; }

.notice {
  display: flex; gap: 12px; align-items: flex-start; padding: 12px 16px; border-radius: var(--radius);
  background: var(--info-bg); color: var(--info-ink);
}
.notice .icon { margin-top: 1px; }
.notice a { color: inherit; font-weight: 600; }
.notice-body { min-width: 0; flex: 1; }
.notice-success { background: var(--success-bg); color: var(--success-ink); }
.notice-warning { background: var(--warning-bg); color: var(--warning-ink); }
.notice-danger, .notice-error { background: var(--danger-bg); color: var(--danger-ink); }
.notice + .notice { margin-top: 8px; }
.error-links { margin: 6px 0 0; padding-left: 18px; display: grid; gap: 2px; }
.error-links:has(li:only-child) { padding-left: 0; list-style: none; }
.notice-close { margin-left: auto; background: none; border: 0; color: inherit; cursor: pointer; padding: 2px; border-radius: 2px; }

/* Messages after an action: small cards at the bottom right that slide up and go away by themselves. */
.toasts {
  position: fixed; right: 24px; bottom: 24px; z-index: 60; width: 360px; max-width: calc(100vw - 32px);
  display: flex; flex-direction: column; gap: 10px; pointer-events: none;
}
.toasts:empty { display: none; }
.toast {
  position: relative; overflow: hidden; pointer-events: auto; display: flex; gap: 11px; align-items: flex-start;
  background: var(--surface); color: var(--ink); border: 1px solid var(--line); border-radius: 4px;
  box-shadow: 0 8px 24px rgba(38, 50, 56, 0.16); padding: 12px 12px 14px 14px;
  animation: toast-in 260ms cubic-bezier(.2, .8, .2, 1) both;
}
.toast.is-leaving { animation: toast-out 180ms ease-in both; }
.toast-icon { flex: none; width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; margin-top: 1px; }
.toast-icon .icon { width: 14px; height: 14px; }
.toast-success .toast-icon { background: var(--success-bg); color: var(--success-ink); }
.toast-info .toast-icon { background: var(--info-bg); color: var(--info-ink); }
.toast-warning .toast-icon { background: var(--warning-bg); color: var(--warning-ink); }
.toast-error .toast-icon { background: var(--danger-bg); color: var(--danger-ink); }
.toast-text { flex: 1; min-width: 0; display: flex; flex-direction: column; font-size: 13px; color: var(--ink-2); overflow-wrap: anywhere; }
.toast-title { font-size: 13.5px; font-weight: 600; color: var(--ink); }
.toast-text a { color: inherit; font-weight: 600; }
.toast-close { flex: none; border: 0; background: none; color: var(--ink-3); cursor: pointer; padding: 2px; line-height: 0; border-radius: 2px; }
.toast-close:hover { color: var(--ink); }
.toast-bar {
  position: absolute; left: 0; right: 0; bottom: 0; height: 3px; transform-origin: left; background: var(--ink-3);
  animation: toast-bar linear forwards; animation-duration: var(--toast-seconds, 5s);
}
.toast-success .toast-bar { background: var(--success-ink); }
.toast-info .toast-bar { background: var(--info-ink); }
.toast-warning .toast-bar { background: var(--warning-ink); }
.toast-error .toast-bar { background: var(--danger-ink); }
.toast[data-seconds="0"] .toast-bar { display: none; }
.toast:hover .toast-bar, .toast:focus-within .toast-bar, .toast.is-paused .toast-bar { animation-play-state: paused; }
@keyframes toast-in { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: none; } }
@keyframes toast-out { from { opacity: 1; transform: none; } to { opacity: 0; transform: translateY(8px); } }
@keyframes toast-bar { from { transform: scaleX(1); } to { transform: scaleX(0); } }
@media (prefers-reduced-motion: reduce) {
  .toast, .toast.is-leaving { animation: none; }
}
@media (max-width: 1100px) {
  .toasts { left: 16px; right: 16px; width: auto; bottom: 76px; max-width: none; }
  body.has-fs-bar .toasts { bottom: 92px; }
}

.stat-value { font-size: 28px; line-height: 1.1; font-weight: 700; color: var(--brand); letter-spacing: -0.01em; }
:root[data-theme="dark"] .stat-value { color: #ff6b6b; }
@media (prefers-color-scheme: dark) { :root:where(:not([data-theme="light"])) .stat-value { color: #ff6b6b; } }
.stat-label { color: var(--ink); margin-top: 4px; }
.stat-row { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.stat-link { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 16px; text-decoration: none; color: inherit; }
.stat-link .stat-value, .stat-link .stat-label { display: block; }
.stat-link .icon { color: var(--brand); }
.stat-link:hover .stat-label { text-decoration: underline; }
@media (max-width: 520px) { .stat-row { gap: 10px; } .stat-value { font-size: 24px; } .stat-label { font-size: 13px; } }

.credit-banner {
  display: flex; align-items: center; gap: 24px; flex-wrap: wrap; padding: 18px 20px; border-radius: var(--radius);
  background: var(--brand-solid); color: var(--on-brand); box-shadow: var(--shadow);
}
.credit-banner h2 { width: 100%; font-size: 13.5px; font-weight: 600; margin-bottom: -8px; }
.credit-wallets { display: flex; gap: 32px; flex-wrap: wrap; flex: 1; }
.credit-wallet b { display: block; font-size: 30px; line-height: 1.1; font-weight: 700; letter-spacing: -0.01em; }
.credit-wallet span { font-size: 14px; font-weight: 600; }
@media (max-width: 640px) {
  .credit-banner { gap: 16px; }
  .credit-wallets { flex: 1 0 100%; gap: 12px 24px; }
  .credit-wallet b { font-size: 26px; }
  .top-credits { display: none; }
}

.empty { text-align: center; padding: 36px 16px; color: var(--ink-2); }
.empty .icon { color: var(--ink-3); margin-bottom: 8px; }
.empty h3 { color: var(--ink); margin-bottom: 4px; font-size: 15px; }
.empty .btn { margin-top: 14px; }

.dl { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 3fr); gap: 8px 16px; }
.dl dt { color: var(--ink-2); }
.dl dd { min-width: 0; overflow-wrap: anywhere; }
@media (max-width: 520px) { .dl { grid-template-columns: minmax(0, 1fr); gap: 2px; } .dl dd { margin-bottom: 8px; } }

.tabs { display: flex; gap: 20px; border-bottom: 1px solid var(--line); overflow-x: auto; }
.tabs a, .tabs button {
  padding: 10px 0; border: 0; border-bottom: 2px solid transparent; margin-bottom: -1px; background: none; cursor: pointer;
  color: var(--ink); font-weight: 600; text-decoration: none; white-space: nowrap; display: inline-flex; gap: 6px; align-items: center;
}
.tabs a[aria-current="page"], .tabs button[aria-selected="true"] { color: var(--brand-ink); border-bottom-color: var(--brand); }
.tab-count { background: var(--neutral-bg); color: var(--neutral-ink); border-radius: 9px; padding: 0 6px; font-size: 12px; }

/* A conversation reads like a chat: the other side on the left, your own messages on the right
   (the customer sees their own messages on the right, the shop sees its own on the right). */
.thread { display: grid; gap: 12px; }
.msg { padding: 12px 14px; border-radius: var(--radius); background: var(--surface-2); border-left: 3px solid var(--line-strong);
       max-width: min(80%, 720px); justify-self: start; min-width: 0; }
.msg-staff { border-left-color: var(--brand); }
.msg-mine { justify-self: end; border-left: 0; border-right: 3px solid var(--brand); background: color-mix(in srgb, var(--brand) 6%, var(--surface-2)); }
.msg-mine .msg-head, .msg-mine .msg-files, .msg-mine .msg-receipt, .msg-mine .msg-file { justify-content: flex-end; }
.msg-internal { background: var(--warning-bg); color: var(--warning-ink); border-left-color: var(--warning-ink); border-right-color: var(--warning-ink); }
.msg-head { display: flex; gap: 10px; align-items: baseline; flex-wrap: wrap; margin-bottom: 4px; font-size: 13px; }
.msg-head b { font-weight: 600; }
.msg-head time { color: var(--ink-2); }
.msg-ticket { display: inline-flex; gap: 4px; align-items: center; font-size: 12.5px; color: var(--ink-2); }
.icon-link { display: inline-flex; gap: 5px; align-items: center; }
.msg-internal .msg-head time { color: inherit; }
.msg-body { overflow-wrap: anywhere; }
.msg-files { margin-top: 8px; display: flex; gap: 8px; flex-wrap: wrap; }

/* what the customer wrote with the upload, on the file service page of the shop: seen at once */
.customer-note { display: flex; gap: 10px; align-items: flex-start; padding: 12px 14px; border-radius: var(--radius);
                 border-left: 3px solid var(--brand); background: color-mix(in srgb, var(--brand) 7%, var(--surface-2)); }
.customer-note .icon { color: var(--brand); flex: none; margin-top: 2px; }
.customer-note blockquote { margin: 0; font-size: 14.5px; line-height: 1.5; overflow-wrap: anywhere; }

.file-row { display: flex; align-items: center; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.file-row:last-child { border-bottom: 0; }
/* the original and the result of a file service: two clearly separate groups */
.file-group { position: relative; padding-left: 30px; }
.file-group::before { content: ""; position: absolute; left: 14px; top: 16px; bottom: 16px; width: 4px; border-radius: 2px; background: var(--line-strong); }
.file-group-original::before { background: var(--ink-2); }
.file-group-modified::before { background: var(--brand); }
.file-group-title { display: flex; align-items: center; gap: 8px; margin: 0 0 6px; font-size: 14px; font-weight: 700; }
.file-group-title .muted { font-weight: 500; font-size: 12.5px; }
.file-group-modified .file-group-title .icon { color: var(--brand); }
.file-group .file-row:first-of-type { padding-top: 6px; }
.file-group .file-row:last-of-type { border-bottom: 0; }
.file-row > .icon { color: var(--ink-2); }
.file-meta { min-width: 0; flex: 1; }
.file-meta b { display: block; overflow-wrap: anywhere; font-weight: 600; }
.file-meta span { display: block; color: var(--ink-2); font-size: 12.5px; }
/* on a phone the buttons go under the file name instead of squeezing it */
@media (max-width: 640px) {
  .msg { max-width: 94%; }
  .file-row { flex-wrap: wrap; row-gap: 8px; }
  .file-row > .file-meta { flex: 1 1 calc(100% - 48px); }
  .file-row > .file-meta + * { margin-left: 36px; }
}

.steps { display: flex; gap: 0; counter-reset: step; }
.step { flex: 1; position: relative; padding-top: 22px; text-align: center; font-size: 12.5px; font-weight: 600; color: var(--ink-2); }
.step::before { content: ""; position: absolute; top: 6px; left: 0; right: 0; height: 3px; background: var(--line); }
.step::after { content: ""; position: absolute; top: 1px; left: calc(50% - 7px); width: 13px; height: 13px; border-radius: 50%; background: var(--surface); border: 3px solid var(--line); }
.step-done { color: var(--ink); }
.step-done::before { background: var(--brand); }
.step-done::after { border-color: var(--brand); background: var(--brand); }
.step-now { color: var(--ink); }
.step-now::after { border-color: var(--brand); }

.pager { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; padding: 12px 16px; border-top: 1px solid var(--line); color: var(--ink-2); font-size: 13px; }
.pager-links { display: flex; gap: 4px; align-items: center; }
.pager-links a, .pager-links span { min-width: 30px; height: 30px; padding: 0 8px; display: grid; place-items: center; border-radius: var(--radius); text-decoration: none; color: var(--ink); font-weight: 600; font-variant-numeric: tabular-nums; }
.pager-links a:hover { background: var(--surface-2); }
.pager-links [aria-current="page"] { background: var(--brand-solid); color: #fff; }

.order-strip { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(220px, 1fr); gap: 16px; overflow-x: auto; padding: 16px; scroll-snap-type: x proximity; scroll-padding: 0 16px; }
.order-strip > div { scroll-snap-align: start; }
.order-strip a { font-weight: 600; }

.clock { display: flex; gap: 4px; justify-content: center; align-items: center; font-variant-numeric: tabular-nums; }
.clock span { width: 32px; height: 40px; display: grid; place-items: center; border: 1px solid var(--line); border-radius: var(--radius); font-size: 15px; font-weight: 500; background: var(--surface); }
.clock i { font-style: normal; font-weight: 700; color: var(--ink-2); }
.hours { width: 100%; border-collapse: collapse; }
.hours td { padding: 3px 0; }
.hours td:last-child { font-weight: 600; font-variant-numeric: tabular-nums; }
.hours tr.today td { color: var(--brand-ink); }

.greeting { display: flex; align-items: center; gap: 16px; }
.greeting h1 { font-size: 20px; }
.greeting p { color: var(--ink-2); margin-top: 2px; display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.ok { color: var(--success-ink); font-weight: 600; display: inline-flex; gap: 4px; align-items: center; }

.checklist li { display: flex; gap: 10px; align-items: flex-start; padding: 8px 0; border-bottom: 1px solid var(--line); }
.checklist li:last-child { border-bottom: 0; }
.checklist .icon { margin-top: 2px; }
.check-done .icon { color: var(--success-ink); }
.check-todo .icon { color: var(--warning-ink); }

/* -------------------------------------------------------------------- 5 forms */
.form { display: grid; gap: 16px; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.form-grid-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.form-grid .wide, .form-grid-3 .wide { grid-column: 1 / -1; }
@media (max-width: 700px) { .form-grid, .form-grid-3 { grid-template-columns: minmax(0, 1fr); } }
.field { display: grid; gap: 5px; align-content: start; min-width: 0; }
.field > label, .field > .label { font-weight: 600; font-size: 13.5px; }
.field .hint { color: var(--ink-2); font-size: 12.5px; }
.field .error { color: var(--danger-ink); font-size: 13px; font-weight: 500; display: flex; gap: 6px; }
.optional { color: var(--ink-2); font-weight: 400; }
.input, .select, .textarea {
  width: 100%; min-height: 38px; padding: 7px 10px; border: 1px solid var(--line-strong); border-radius: var(--radius);
  background: var(--surface); color: var(--ink);
}
:root[data-theme="dark"] .input, :root[data-theme="dark"] .select, :root[data-theme="dark"] .textarea { background: var(--surface-3); }
@media (prefers-color-scheme: dark) { :root:where(:not([data-theme="light"])) :is(.input, .select, .textarea) { background: var(--surface-3); } }
.textarea { min-height: 110px; resize: vertical; line-height: 1.5; }
/* iPhones zoom into a field whose text is smaller than 16 px */
@media (max-width: 640px) { .input, .select, .textarea { font-size: 16px; } }
.input:focus, .select:focus, .textarea:focus { outline: 2px solid var(--brand); outline-offset: 0; border-color: var(--brand); }
.input[aria-invalid="true"], .select[aria-invalid="true"], .textarea[aria-invalid="true"] { border-color: var(--danger-solid); border-width: 2px; }
.input::placeholder, .textarea::placeholder { color: var(--ink-3); }
.input-sm { min-height: 32px; padding: 4px 8px; width: auto; }
.w-md { width: 13em; }
.w-sm { width: 8em; }
.w-xs { width: 5.5em; }
.w-xxs { width: 4em; }
.table-edit td { padding: 6px 8px; }
.table-edit td:first-child { padding-left: 16px; }
.table-edit .actions { white-space: nowrap; }
.input-num { text-align: right; font-variant-numeric: tabular-nums; }
.check { display: flex; gap: 10px; align-items: flex-start; }
input[type="checkbox"], input[type="radio"] { width: 18px; height: 18px; accent-color: var(--brand-solid); flex: none; }
.check input { margin: 2px 0 0; }
input[type="file"] { max-width: 100%; font-size: 13.5px; color: var(--ink-2); }
input[type="file"]::file-selector-button {
  margin-right: 12px; min-height: 32px; padding: 5px 12px; border: 1px solid var(--line-strong); border-radius: var(--radius);
  background: var(--surface); color: var(--ink); font: inherit; font-weight: 600; cursor: pointer;
}
input[type="file"]::file-selector-button:hover { background: var(--surface-2); }
.check label { font-weight: 500; }
.check .hint { display: block; color: var(--ink-2); font-size: 12.5px; font-weight: 400; }
.form-actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.fieldset { border: 0; padding: 0; margin: 0; min-width: 0; }
.fieldset > legend { font-weight: 600; font-size: 15px; padding: 0; margin-bottom: 12px; }
.inline-form { display: inline; }
.select-sm { width: auto; min-height: 30px; padding: 3px 8px; font-size: 13px; }
/* list pages: the up/down arrows and the delete button sit on one line */
.table .actions form { display: inline-block; vertical-align: middle; }
.order-buttons { display: inline-flex; margin-right: 6px; }
.actions-stack { display: inline-grid; gap: 4px; }
.ini-preview { margin: 8px 0 0; padding: 12px 14px; background: var(--surface-2); border-radius: var(--radius); font-size: 12.5px; line-height: 1.5; overflow-x: auto; white-space: pre; }
.actions-stack .btn { width: 100%; justify-content: flex-start; }
.order-buttons .btn[disabled] { opacity: .3; }
/* a grid of checkboxes (options with a tuning type, tuning types with an option) */
.check-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 10px 20px; }
.filters { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.filters .input, .filters .select { width: auto; min-width: 150px; }
.filters .grow { flex: 1; min-width: 180px; }
.password-wrap { position: relative; }
.password-wrap .input { padding-right: 42px; }
.password-toggle { position: absolute; right: 2px; top: 2px; bottom: 2px; width: 38px; border: 0; background: none; cursor: pointer; color: var(--ink-2); border-radius: var(--radius); }

.option-list { display: grid; gap: 8px; }
.option {
  display: flex; gap: 12px; align-items: flex-start; padding: 10px 12px; border: 1px solid var(--line); border-radius: var(--radius);
  cursor: pointer; background: var(--surface);
}
.option:hover { border-color: var(--line-strong); }
.option input { margin: 2px 0 0; }
.option:has(input:checked) { border-color: var(--brand); box-shadow: inset 0 0 0 1px var(--brand); }
.option:has(input:disabled) { opacity: 0.5; cursor: not-allowed; }
.option-text { flex: 1; min-width: 0; }
.option-text b { display: block; font-weight: 600; }
.option-text span { color: var(--ink-2); font-size: 12.5px; }
.option-price { font-weight: 600; font-variant-numeric: tabular-nums; white-space: nowrap; }
.type-picker { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 8px; }
.type-picker .option { flex-direction: column; gap: 4px; }
.type-picker .option-head { display: flex; gap: 10px; align-items: center; font-weight: 600; }
.type-picker .balance { font-size: 20px; font-weight: 700; color: var(--brand-ink); padding-left: 28px; line-height: 1.2; }
.type-picker .balance small { font-size: 12.5px; font-weight: 500; color: var(--ink-2); }
/* the upload form: tuning types and options as cards with a credits badge, like a price list */
.type-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 10px; }
.type-card {
  position: relative; display: flex; gap: 12px; align-items: flex-start; padding: 14px 12px 12px; border: 1px solid var(--line);
  border-radius: var(--radius); cursor: pointer; background: var(--surface); min-height: 64px;
}
.type-card:hover { border-color: var(--line-strong); }
.type-card:has(input:checked) { border-color: var(--brand); box-shadow: inset 0 0 0 1px var(--brand); background: var(--surface-2); }
.type-card:has(input:disabled) { opacity: .5; cursor: not-allowed; }
.type-card:has(input:focus-visible) { outline: 2px solid var(--brand); outline-offset: 2px; }
.type-card input { margin: 3px 0 0; flex: none; }
.type-card-body { flex: 1; min-width: 0; display: grid; gap: 2px; padding-right: 72px; }
.type-card-name { display: flex; gap: 6px; align-items: flex-start; font-weight: 600; }
.type-card-name .icon { color: var(--brand); flex: none; margin-top: 3px; }
.type-card-text { color: var(--ink-2); font-size: 12.5px; }
.credit-badge {
  position: absolute; top: -1px; right: 10px; padding: 2px 8px; border: 1px solid var(--brand); border-top: 0; border-radius: 0 0 8px 8px;
  background: var(--surface); color: var(--brand-ink); font-size: 12px; font-weight: 700; font-variant-numeric: tabular-nums; white-space: nowrap;
}
.type-card[hidden] { display: none; }
.delivery-note { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; padding: 10px 16px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--line); color: var(--ink); font-size: 13.5px; }
.delivery-dot { flex: none; width: 10px; height: 10px; border-radius: 50%; background: #2e9d4f; box-shadow: 0 0 0 4px var(--success-bg); }
.delivery-note.is-closed .delivery-dot { background: #90a4ae; box-shadow: 0 0 0 4px var(--surface-2); }
.delivery-pill {
  display: inline-flex; align-items: center; gap: 6px; padding: 1px 10px; border-radius: 999px; font-size: 13px; font-weight: 600;
  background: color-mix(in srgb, var(--brand) 10%, var(--surface)); border: 1px solid color-mix(in srgb, var(--brand) 35%, var(--surface)); color: var(--brand-ink);
}
.delivery-pill .icon { flex: none; }
/* closed, or open but a file sent now is only handled when the shop opens again (is-late): the promise is quieter */
.delivery-note.is-closed .delivery-pill, .delivery-note.is-late .delivery-pill { background: var(--surface-2); border-color: var(--line); color: var(--ink-2); }
/* orange bar */
.delivery-note.style-bar { gap: 12px; flex-wrap: nowrap; font-size: 15px; background: color-mix(in srgb, var(--brand) 9%, var(--surface)); border-color: color-mix(in srgb, var(--brand) 35%, var(--surface)); border-left: 4px solid var(--brand); }
.delivery-note.style-bar > .icon { flex: none; width: 22px; height: 22px; color: var(--brand); }
.delivery-strong { color: var(--brand-ink); font-size: 16px; }
.delivery-note.style-bar.is-closed, .delivery-note.style-bar.is-late { background: var(--surface-2); border-color: var(--line); border-left-color: var(--line-strong); }
.delivery-note.style-bar.is-closed > .icon, .delivery-note.style-bar.is-late > .icon { color: var(--ink-2); }
.delivery-note.style-bar.is-closed .delivery-strong, .delivery-note.style-bar.is-late .delivery-strong { color: var(--ink); }
/* big time on the left */
.delivery-note.style-badge { padding: 0; gap: 0; flex-wrap: nowrap; align-items: stretch; overflow: hidden; }
.delivery-big { flex: none; min-width: 84px; padding: 10px 16px; display: flex; flex-direction: column; align-items: center; justify-content: center; background: var(--brand-solid); color: var(--on-brand); }
.delivery-big b { font-size: 26px; line-height: 1; font-weight: 700; font-variant-numeric: tabular-nums; }
.delivery-big span { font-size: 12px; font-weight: 600; }
.delivery-note.style-badge.is-closed .delivery-big, .delivery-note.style-badge.is-late .delivery-big { background: #78909c; color: #fff; }
.delivery-note.style-badge.is-closed .delivery-big b, .delivery-note.style-badge.is-late .delivery-big b { font-size: 22px; }
.delivery-body { padding: 10px 16px; display: flex; flex-direction: column; justify-content: center; gap: 1px; }
.delivery-body b { font-size: 15px; }

/* Management -> Delivery times */
.dt-steps { display: grid; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; background: var(--surface); }
.dt-row { display: grid; grid-template-columns: 110px minmax(0, 1fr) minmax(0, 1.2fr); gap: 8px 18px; align-items: center; padding: 10px 14px; border-top: 1px solid var(--line); }
.dt-row:first-child { border-top: 0; }
.dt-headrow { background: var(--surface-2); color: var(--ink-2); font-size: 12.5px; padding-top: 8px; padding-bottom: 8px; }
.dt-cell { display: inline-flex; align-items: center; gap: 8px; flex-wrap: wrap; color: var(--ink-2); }
.dt-cell b { color: var(--ink); }
.dt-num { width: 78px; }
.dt-from { display: inline-block; min-width: 78px; padding: 0 12px; text-align: right; color: var(--ink-2); font-variant-numeric: tabular-nums; }
.dt-queue { display: grid; gap: 16px; }
.dt-queue > .error { color: var(--danger-ink); font-size: 13px; font-weight: 500; display: flex; gap: 6px; }
.card-body:has(#delivery_by_queue:not(:checked)) .dt-queue { opacity: 0.55; }
.dt-sep { border-top: 1px solid var(--line); margin: 4px 0; }
.field .dt-single { width: 160px; }
.dt-aside { margin-top: 12px; font-size: 13px; }
@media (max-width: 700px) { .dt-row { grid-template-columns: minmax(0, 1fr); } .dt-headrow { display: none; } }
.brand-ink { color: var(--brand-ink); }
.fs-section .card-head h2 { font-size: 16px; }
.fs-section .card-head { border-top: 3px solid var(--brand); border-radius: var(--radius) var(--radius) 0 0; }

.dropzone { border: 1.5px dashed var(--line-strong); border-radius: var(--radius); padding: 16px 18px; background: var(--surface-2); display: grid; gap: 10px; }
.dropzone.is-over { border-color: var(--brand); background: var(--surface); }
.dropzone-prompt { display: flex; gap: 8px; align-items: center; color: var(--ink-2); font-size: 13px; }
.dropzone-prompt b { font-weight: 600; color: var(--ink); }
.dropzone-words { display: grid; gap: 2px; min-width: 0; }
.dropzone-sub { color: var(--ink-2); font-size: 12.5px; }
.dropzone-big { border-color: var(--brand); border-width: 1.5px; padding: 18px 20px; }
.dropzone-big .dropzone-prompt { gap: 14px; }
.dropzone-big .dropzone-prompt > .icon { width: 26px; height: 26px; color: var(--brand); flex: none; }
.dropzone-big { position: relative; cursor: pointer; }
.dropzone-big input[type="file"] { position: absolute; width: 1px; height: 1px; opacity: 0; overflow: hidden; clip: rect(0 0 0 0); }
.dropzone-big:focus-within { outline: 2px solid var(--brand); outline-offset: 2px; }
.dropzone-big .dropzone-prompt { cursor: pointer; }
.dropzone-plus { width: 46px; height: 46px; border-radius: 10px; background: var(--brand-solid); color: var(--on-brand); font-size: 30px;
  font-weight: 500; line-height: 1; display: grid; place-items: center; flex: none; }
.dropzone-big .dropzone-prompt b { font-size: 15px; }
.dropzone-status { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-top: 8px; padding: 10px 14px;
  border: 1px solid var(--line); border-radius: var(--radius); font-size: 13.5px; }
.dropzone-status .muted { font-size: 12.5px; white-space: nowrap; }
.dropzone-status [hidden] { display: none; }
.agreements { display: grid; gap: 10px; }
.dropzone input[type="file"] { width: 100%; }
.file-list { font-size: 13px; color: var(--ink); display: grid; gap: 4px; }
.file-list > div { display: flex; gap: 12px; align-items: baseline; justify-content: space-between; min-width: 0; }
.file-list > div > span { min-width: 0; overflow-wrap: anywhere; }
[aria-busy="true"] { opacity: .55; transition: opacity .15s; }
.file-list:empty { display: none; }
.summary-box { background: var(--surface-2); border-radius: var(--radius); padding: 14px 16px; }
.summary-line { display: flex; justify-content: space-between; gap: 16px; padding: 3px 0; }
.summary-line.total { border-top: 1px solid var(--line); margin-top: 8px; padding-top: 10px; font-weight: 700; font-size: 16px; }
.summary-line span:last-child { font-variant-numeric: tabular-nums; white-space: nowrap; }

/* the compact order summary on the upload page: the total big, the rest small, and what is still missing */
.fs-sum { display: flex; flex-direction: column; gap: 9px; padding: 12px 14px; }
.fs-sum-total { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.fs-sum-big { font-size: 13px; font-weight: 600; white-space: nowrap; }
.fs-sum-big b { font-size: 22px; font-weight: 700; letter-spacing: -0.01em; font-variant-numeric: tabular-nums; }
.fs-sum-line { display: flex; justify-content: space-between; gap: 12px; font-size: 12.5px; }
.fs-sum-line b { color: var(--ink); font-weight: 600; font-variant-numeric: tabular-nums; }
.fs-sum-line > span:last-child { text-align: right; white-space: nowrap; }
.fs-sum-balance { border-top: 1px solid var(--line); padding-top: 8px; }
.fs-note { font-size: 12.5px; margin: 0; }
.fs-need, .fs-ok { border-radius: var(--radius); padding: 8px 10px; font-size: 12.5px; }
.fs-need { background: var(--warning-bg); color: var(--warning-ink); }
.fs-need-title { font-weight: 600; margin-bottom: 5px; }
.fs-chips { display: flex; flex-wrap: wrap; gap: 4px; }
.fs-chip {
  font: inherit; font-size: 12.5px; line-height: 1.5; padding: 1px 9px; border-radius: 999px; cursor: pointer;
  background: var(--surface); color: var(--warning-ink); border: 1px solid var(--warning-ink);
}
.fs-chip:hover { text-decoration: underline; }
.fs-chip-more { font-size: 12.5px; padding: 1px 4px; }
.fs-ok { background: var(--success-bg); color: var(--success-ink); display: flex; gap: 7px; align-items: flex-start; }
.fs-ok .icon { flex: none; margin-top: 2px; }
.check-all { padding-bottom: 8px; margin-bottom: 2px; border-bottom: 1px solid var(--line); font-weight: 600; }
.fs-hint { font-size: 13px; color: var(--warning-ink); }
.btn-primary[disabled] { background: var(--line); border-color: var(--line); color: var(--ink-3); opacity: 1; }
.fs-bar-missing { color: var(--warning-ink); font-weight: 600; }

/* ------------------------------------------------------------------- 6 tables */
.table-wrap { overflow-x: auto; }
.table { width: 100%; border-collapse: collapse; }
.table th { text-align: left; font-size: 12.5px; font-weight: 600; color: var(--ink-2); background: var(--surface-2); padding: 9px 16px; white-space: nowrap; border-bottom: 1px solid var(--line); }
.table td { padding: 11px 16px; border-bottom: 1px solid var(--line); vertical-align: top; }
.table tbody tr:last-child td { border-bottom: 0; }
.table tbody tr:hover td { background: var(--surface-2); }
.row-clickable { cursor: pointer; }
.table tbody tr.row-clickable:hover td { background: var(--surface-2); }
.table tbody tr.row-clickable:hover .row-link { text-decoration: underline; }
.table .num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.table .actions { text-align: right; white-space: nowrap; }
/* a screen-reader label in a heading cell stays inside the cell, so a table that scrolls sideways on a phone
   does not make the whole page scroll */
.table th.actions { position: relative; }
.table a.row-link { font-weight: 600; }
.table .sub { display: block; color: var(--ink-2); font-size: 12.5px; }
.table .unread td:first-child { box-shadow: inset 3px 0 0 var(--brand); }
.table .unread .row-link { font-weight: 700; }
.table-plain th { background: none; }
/* wide lists scroll sideways on a phone instead of squeezing every column */
@media (max-width: 800px) {
  .table-wrap > .table:has(th:nth-child(5)) { min-width: 820px; }
  .table-wrap > .table:has(th:nth-child(7)) { min-width: 1040px; }
}
.amount-pos { color: var(--success-ink); font-weight: 600; }
.amount-neg { color: var(--danger-ink); font-weight: 600; }

/* ------------------------------------------------------------------- 7 charts */
.chart-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 8px; }
.chart-head p { color: var(--ink-2); }
.chart { position: relative; height: 260px; }
.chart svg { display: block; width: 100%; height: 100%; overflow: visible; }
.chart text { font: 500 11.5px var(--font); fill: var(--ink-2); font-variant-numeric: tabular-nums; }
.chart .grid-line { stroke: var(--grid); stroke-width: 1; }
.chart .axis-line { stroke: var(--axis); stroke-width: 1; }
.chart .series-line { fill: none; stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; }
.chart .series-area { stroke: none; opacity: 0.1; }
.chart .series-bar { stroke: none; }
.chart .s1 { stroke: var(--series-1); } .chart .s1.series-area, .chart .s1.series-bar, .chart .s1.marker { fill: var(--series-1); }
.chart .s2 { stroke: var(--series-2); } .chart .s2.series-area, .chart .s2.series-bar, .chart .s2.marker { fill: var(--series-2); }
.chart .s3 { stroke: var(--series-3); } .chart .s3.series-area, .chart .s3.series-bar, .chart .s3.marker { fill: var(--series-3); }
.chart .marker { stroke: var(--surface); stroke-width: 2; }
.chart .crosshair { stroke: var(--axis); stroke-width: 1; }
.chart .hit { fill: transparent; cursor: crosshair; }
.chart-tip {
  position: absolute; z-index: 5; pointer-events: none; min-width: 120px; padding: 8px 10px; border-radius: var(--radius);
  background: var(--surface); box-shadow: var(--shadow-pop); font-size: 12.5px; white-space: nowrap;
}
.chart-tip[hidden] { display: none; }
.chart-tip .tip-label { color: var(--ink-2); margin-bottom: 2px; }
.chart-tip .tip-row { display: flex; align-items: center; gap: 8px; }
.chart-tip .tip-row b { font-weight: 700; font-size: 14px; color: var(--ink); }
.chart-tip .tip-row span { color: var(--ink-2); }
.tip-key { width: 12px; height: 0; border-top: 2px solid var(--series-1); flex: none; }
.tip-key.k2 { border-top-color: var(--series-2); } .tip-key.k3 { border-top-color: var(--series-3); }
.legend { display: flex; gap: 16px; flex-wrap: wrap; font-size: 12.5px; color: var(--ink-2); margin-bottom: 4px; }
.legend span { display: inline-flex; align-items: center; gap: 6px; }
.legend i { width: 14px; height: 0; border-top: 2px solid var(--series-1); }
.legend .k2 { border-top-color: var(--series-2); } .legend .k3 { border-top-color: var(--series-3); }
.chart-table[hidden] { display: none; }
.chart-table { max-height: 260px; overflow: auto; border: 1px solid var(--line); border-radius: var(--radius); }
.segmented { display: inline-flex; border: 1px solid var(--line-strong); border-radius: var(--radius); overflow: hidden; background: var(--surface); }
.segmented a { padding: 6px 12px; text-decoration: none; color: var(--ink); font-weight: 600; font-size: 13px; border-right: 1px solid var(--line); white-space: nowrap; }
.segmented a:last-child { border-right: 0; }
.segmented a:hover { background: var(--surface-2); }
.segmented a[aria-current="true"] { background: var(--ink); color: var(--surface); }
.period-row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin: 16px 0; }
.period-row > span { font-weight: 600; }

/* -------------------------------------------------------------------- 8 pages */
.auth { min-height: 100vh; display: grid; grid-template-columns: minmax(0, 1fr); place-items: start center; align-content: start; padding: 28px 16px 48px; }
.auth-top { width: 100%; max-width: 980px; display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 28px; }
.auth-brand { display: flex; align-items: center; color: var(--ink); text-decoration: none; font-weight: 700; font-size: 16px; }
.auth-brand img { max-height: 44px; max-width: 220px; }
.auth-brand picture img { max-height: 40px; max-width: min(360px, 60vw); width: auto; height: auto; }
.auth-tools { display: flex; gap: 4px; align-items: center; }
.auth-grid { width: 100%; max-width: 980px; display: grid; grid-template-columns: minmax(0, 420px) minmax(0, 1fr); gap: 24px; align-items: start; }
.auth-single { width: 100%; max-width: 460px; }
.auth-wide { width: 100%; max-width: 760px; }
.auth-card { padding: 28px; }
.auth-card h1 { margin-bottom: 6px; }
.auth-card > p { color: var(--ink-2); margin-bottom: 20px; }
.auth-aside { padding: 28px; }
.auth-aside h2 { font-size: 18px; margin-bottom: 12px; }
.auth-aside li { display: flex; gap: 10px; padding: 6px 0; }
.auth-aside li .icon { color: var(--brand); margin-top: 2px; }
.auth-links { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-top: 16px; }
@media (max-width: 800px) { .auth-grid { grid-template-columns: minmax(0, 1fr); } }

.frame { width: 100%; height: calc(100vh - var(--top-height) - 150px); min-height: 480px; border: 0; background: var(--surface); border-radius: var(--radius); box-shadow: var(--shadow); }
.qr { background: #fff; padding: 8px; border-radius: var(--radius); width: 196px; height: 196px; display: block; }
.codes { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px 24px; font-size: 15px; max-width: 320px; }
.error-page { min-height: 100vh; display: grid; place-items: center; padding: 24px; text-align: center; }
.error-page .card { padding: 36px 32px; max-width: 480px; }
.error-code { font-size: 54px; font-weight: 700; color: var(--brand); line-height: 1; margin-bottom: 8px; }
.package-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 12px; }
.package { border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; display: flex; flex-direction: column; gap: 6px; }
.package h3 { font-size: 14px; font-weight: 600; }
.package .price { font-size: 24px; font-weight: 700; line-height: 1.15; letter-spacing: -0.01em; }
.package .price small { font-size: 12.5px; font-weight: 500; color: var(--ink-2); letter-spacing: 0; }
.package .per { color: var(--ink-2); font-size: 12.5px; }
.package .btn { margin-top: auto; }
.package .per { margin-bottom: 8px; }
.matrix th, .matrix td { padding: 8px 10px; }
.logo-preview { max-height: 60px; max-width: 100%; display: block; }
.logo-box-light { background: #ffffff; }
.logo-box-dark { background: #15171b; }
.matrix .input { min-width: 84px; }
.pay-state { text-align: center; padding: 12px 0; }
.pay-state .icon { color: var(--brand); }
.pay-state.ok-state .icon { color: var(--success-ink); }
.spinner { animation: spin 1s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------------------------------------------------------------- 9 utilities */
.muted { color: var(--ink-2); }
.strong { font-weight: 600; }
.right { text-align: right; }
.center { text-align: center; }
.nowrap { white-space: nowrap; }
.wrap-anywhere { overflow-wrap: anywhere; }
/* The audit log keeps whole texts (a message that was changed or removed): they wrap and keep their line breaks; a long one is folded away behind its first words */
.audit-text { max-width: 62ch; margin-top: 4px; white-space: pre-wrap; }
.audit-text:first-child { margin-top: 0; }
.audit-text .muted { font-size: 12.5px; }
.audit-text > summary { cursor: pointer; white-space: normal; }
.audit-text[open] > summary .audit-gist { display: none; }
.audit-full { margin-top: 3px; padding-left: 12px; border-left: 2px solid var(--line); }
.tnum { font-variant-numeric: tabular-nums; }
.stack { display: grid; gap: 12px; align-content: start; }
.stack-lg { display: grid; gap: 20px; align-content: start; }
.cluster { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.card-head-inline { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 0 0 10px; }
.card-head-inline h3 { margin: 0; font-size: 15px; }
.autofilled { box-shadow: 0 0 0 2px color-mix(in srgb, var(--brand) 45%, transparent); }
.autofill-status { font-size: 13.5px; padding: 8px 12px; border-radius: var(--radius); border-left: 3px solid var(--line-strong); background: var(--surface-2); margin-top: 8px; }
.autofill-status:empty { display: none; }
.autofill-status[data-kind="ok"] { border-color: var(--success-ink); background: var(--success-bg); }
.autofill-status[data-kind="warn"] { border-color: var(--warning-ink); background: var(--warning-bg); }
.autofill-status[data-kind="error"] { border-color: var(--brand); }
.between { display: flex; justify-content: space-between; gap: 12px; align-items: center; flex-wrap: wrap; }
.mt-0 { margin-top: 0 !important; } .mt-1 { margin-top: 4px; } .mt-2 { margin-top: 8px; } .mt-3 { margin-top: 16px; } .mt-4 { margin-top: 24px; }
.mb-0 { margin-bottom: 0; } .mb-2 { margin-bottom: 8px; } .mb-3 { margin-bottom: 16px; }
.measure { max-width: 72ch; }
.sticky { position: sticky; top: calc(var(--top-height) + 16px); }
@media (max-width: 1100px) { .sticky { position: static; } }
.narrow { max-width: 720px; }
.hidden, [hidden] { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
.w-auto { width: auto; }
.test-ribbon { background: var(--warning-bg); color: var(--warning-ink); font-weight: 600; text-align: center; padding: 6px 12px; font-size: 13px; border-radius: var(--radius); margin-bottom: 16px; }

@media print {
  .topbar, .sidebar, .page-actions, .toasts, .no-print { display: none !important; }
  .main { margin: 0; padding: 0; }
  body { background: #fff; }
  .card { box-shadow: none; border: 1px solid #ccc; }
}

/* Lists in the customer portal become one block per row on a phone: everything visible
   without swiping sideways. Each cell carries its column name in data-label. */
@media (max-width: 640px) {
  .table-wrap > .table.table-stack { min-width: 0 !important; }
  .table-stack thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  .table-stack, .table-stack tbody { display: block; }
  .table-stack tr { display: grid; grid-template-columns: 1fr 1fr; gap: 6px 14px; padding: 12px 14px; border-bottom: 1px solid var(--line); }
  .table-stack td { display: block; border: 0; padding: 0; text-align: left; min-width: 0; overflow-wrap: anywhere; }
  .table-stack td.num { text-align: left; }
  .table-stack td:first-child { grid-column: 1 / -1; font-weight: 600; }
  .table-stack td[data-label]::before { content: attr(data-label); display: block; font-size: 11.5px; font-weight: 500; color: var(--ink-2); }
  .table-stack td.actions { grid-column: 1 / -1; }
  .table-stack .unread td:first-child { box-shadow: none; }
  .table-stack tr.unread { box-shadow: inset 3px 0 0 var(--brand); }
}
.page-head h1, .page-head p { overflow-wrap: anywhere; }
.nowrap { white-space: nowrap; }
/* free text typed by customers (a model name of 80 characters without spaces) must not widen a list */
.cell-text { max-width: 32ch; overflow-wrap: anywhere; }

/* ------------------------------------------------------ upload form helpers */
.more-fields > summary {
  list-style: none; cursor: pointer; display: inline-flex; align-items: center; gap: 6px; font-weight: 600; font-size: 13.5px;
  color: var(--ink-2); padding: 4px 0;
}
.more-fields > summary::-webkit-details-marker { display: none; }
.more-fields > summary .icon { transition: transform .15s; }
.more-fields[open] > summary .icon { transform: rotate(90deg); }
.more-fields > summary:hover { color: var(--ink); }

/* The bar with the price and the Send button that stays in view on a phone (the summary card
   is far below the fields there). */
.fs-bar { display: none; }
@media (max-width: 1100px) {
  .fs-bar {
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 25; display: flex; align-items: center; justify-content: space-between;
    gap: 12px; padding: 10px 16px; padding-bottom: calc(10px + env(safe-area-inset-bottom, 0px));
    background: var(--surface); border-top: 1px solid var(--line); box-shadow: 0 -4px 16px rgba(0, 0, 0, 0.08);
  }
  .fs-bar-text { min-width: 0; font-size: 13.5px; line-height: 1.35; }
  .fs-bar-text b { font-size: 15px; font-variant-numeric: tabular-nums; }
  .fs-bar-line { display: block; white-space: nowrap; }
  .fs-bar-after { font-size: 12.5px; }
  .fs-bar-after b { font-size: 12.5px; font-weight: 600; }
  .fs-bar .btn { flex: none; }
  body.has-fs-bar .main { padding-bottom: 96px; }
  body.has-fs-bar .bottom-nav { display: none; }
}

/* staff looking at the portal as a customer */
.impersonation-bar {
  display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin: 0 0 16px; padding: 10px 14px; border-radius: var(--radius);
  background: var(--ink); color: var(--surface); font-size: 13.5px; font-weight: 500;
}
.impersonation-bar .icon { color: var(--brand); flex: none; }
.impersonation-bar span { flex: 1 1 320px; }
.impersonation-bar form { margin-left: auto; }

/* own prices of a customer group */
.price-matrix .price-col { width: 190px; }
.price-matrix input.input-num { width: 150px; margin-left: auto; text-align: right; }
.price-matrix .error { display: block; }
.price-matrix .per-credit { display: block; font-size: 12px; margin-top: 3px; min-height: 15px; }

/* ------------------------------------------------------- phone navigation */
.bottom-nav { display: none; }
@media (max-width: 960px) {
  .bottom-nav {
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 25; display: grid; grid-auto-flow: column; grid-auto-columns: 1fr;
    background: var(--surface); border-top: 1px solid var(--line); padding-bottom: env(safe-area-inset-bottom, 0px);
  }
  .bottom-nav a {
    display: flex; flex-direction: column; align-items: center; gap: 3px; padding: 8px 4px 7px; text-decoration: none;
    color: var(--ink-2); font-size: 11.5px; font-weight: 600; position: relative; min-width: 0;
  }
  .bottom-nav a span { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .bottom-nav a .icon { width: 22px; height: 22px; }
  .bottom-nav a[aria-current="page"] { color: var(--brand-ink); }
  .bottom-nav .side-count { position: absolute; top: 4px; left: calc(50% + 6px); }
  body.has-bottom-nav .main { padding-bottom: 84px; }
}

/* ------------------------------------------------------ customer dashboard */
.active-files { list-style: none; margin: 0; padding: 0; }
.active-files li {
  display: grid; grid-template-columns: auto minmax(0, 1fr) auto auto; gap: 6px 14px; align-items: center;
  padding: 10px 20px; border-bottom: 1px solid var(--line);
}
.active-files li:last-child { border-bottom: 0; }
.active-files li.row-clickable:hover { background: var(--surface-2); }
.active-files .row-link { font-weight: 700; text-decoration: none; }
.active-files .active-vehicle { min-width: 0; overflow-wrap: anywhere; }
.active-files .active-state { display: flex; flex-direction: column; gap: 2px; align-items: flex-start; }
.active-files .sub { display: block; color: var(--ink-2); font-size: 12.5px; }
@media (max-width: 640px) {
  .active-files li { grid-template-columns: auto minmax(0, 1fr); padding: 10px 14px; }
  .active-files .active-state { grid-column: 1 / -1; flex-direction: row; align-items: center; gap: 10px; }
  .active-files .btn { grid-column: 1 / -1; justify-self: start; }
}
.expectation { display: flex; gap: 10px; align-items: flex-start; color: var(--ink-2); font-size: 13.5px; border-top: 1px solid var(--line); }
.expectation .icon { color: var(--brand); flex: none; margin-top: 1px; }
.onboarding { margin: 0; padding: 0; list-style: none; counter-reset: step; }
.onboarding li a { font-weight: 600; }
.card .period-row { margin: 0 0 12px; }
.step time { display: block; font-weight: 500; font-size: 11.5px; color: var(--ink-2); margin-top: 2px; }
.revision-box > summary { list-style: none; cursor: pointer; display: inline-flex; align-items: center; gap: 8px; font-weight: 600; color: var(--brand-ink); }
.revision-box > summary::-webkit-details-marker { display: none; }
.revision-box > summary:hover { text-decoration: underline; }
.package-marked { border-color: var(--brand); position: relative; }
.package-label { display: inline-block; align-self: flex-start; background: var(--brand-solid); color: #fff; font-size: 11.5px; font-weight: 700; padding: 2px 8px; border-radius: 10px; margin-bottom: 2px; }

/* -------------------------------------------------------------------- legal documents */
.cols-wide { grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); align-items: start; }
@media (max-width: 1000px) { .cols-wide { grid-template-columns: minmax(0, 1fr); } }
.segmented { flex-wrap: wrap; max-width: 100%; }
.legal-page { width: 100%; max-width: 820px; }
.legal-links, .legal-foot { display: flex; flex-wrap: wrap; gap: 6px 18px; margin-top: 24px; padding-top: 16px; border-top: 1px solid var(--line); font-size: 13.5px; }
.legal-foot { justify-content: center; border-top: 0; color: var(--ink-2); }
.legal-foot a { color: var(--ink-2); }
.plain-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 6px; }
.prose { line-height: 1.65; overflow-wrap: anywhere; }
.prose > * + * { margin-top: 12px; }
.prose > :first-child { margin-top: 0; }
.prose h2 { font-size: 19px; margin-top: 28px; }
.prose h3 { font-size: 16px; margin-top: 22px; }
.prose h4 { font-size: 15px; margin-top: 18px; }
.prose ul, .prose ol { padding-left: 22px; }
.prose li + li { margin-top: 4px; }
.prose blockquote { border-left: 3px solid var(--line-strong); padding-left: 12px; color: var(--ink-2); }
.prose table { border-collapse: collapse; width: 100%; font-size: 14px; }
.prose th, .prose td { border: 1px solid var(--line); padding: 6px 8px; text-align: left; vertical-align: top; }
.prose a { color: var(--brand); }
.side-legal { display: flex; flex-wrap: wrap; gap: 4px 12px; }
.side-legal a { color: var(--side-ink-2); text-decoration: none; }
.side-legal a:hover { text-decoration: underline; }
.prose ul { list-style: disc; }
.prose ol { list-style: decimal; }
.icon-preview { width: 48px; height: 48px; object-fit: contain; }
input[type="color"] { width: 44px; height: 38px; padding: 2px; border: 1px solid var(--line-strong); border-radius: var(--radius); background: var(--surface); cursor: pointer; }

/* customer list: column headers that sort */
.th-sort { display: inline-flex; align-items: center; gap: 4px; color: inherit; text-decoration: none; white-space: nowrap; }
.th-sort:hover { color: var(--brand-ink); }
.th-sort.is-active { color: var(--ink); }
th.num .th-sort { justify-content: flex-end; }

/* --------------------------------------------------------------- tools page */
.tool-group { font-size: 13.5px; font-weight: 600; color: var(--ink-2); margin: 24px 0 10px; }
.tool-group:first-of-type { margin-top: 4px; }
.tool-gap { height: 18px; }
.tool-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 14px; }
.tool-card {
  display: grid; grid-template-columns: auto 1fr; grid-template-rows: 1fr auto; gap: 4px 14px; padding: 18px;
  background: var(--surface); border-radius: var(--radius); box-shadow: var(--shadow); color: var(--ink);
  text-decoration: none; border-top: 3px solid transparent; transition: border-color .15s, box-shadow .15s;
}
a.tool-card:hover { border-top-color: var(--brand); box-shadow: var(--shadow-pop); text-decoration: none; }
a.tool-card:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }
.tool-icon { grid-row: 1 / 3; width: 44px; height: 44px; border-radius: 10px; display: grid; place-items: center; flex: none; }
.tool-icon .icon { width: 22px; height: 22px; }
.tool-icon-sm { width: 32px; height: 32px; border-radius: 8px; }
.tool-icon-sm .icon { width: 17px; height: 17px; }
.tone-brand { background: color-mix(in srgb, var(--brand) 13%, transparent); color: var(--brand-ink); }
.tone-success { background: var(--success-bg); color: var(--success-ink); }
.tone-warning { background: var(--warning-bg); color: var(--warning-ink); }
.tone-danger { background: var(--danger-bg); color: var(--danger-ink); }
.tone-info { background: var(--info-bg); color: var(--info-ink); }
.tone-neutral { background: var(--neutral-bg); color: var(--neutral-ink); }
.tool-body { display: grid; gap: 4px; align-content: start; min-width: 0; }
.tool-name { font-weight: 600; font-size: 15px; }
.tool-text { color: var(--ink-2); font-size: 13.5px; line-height: 1.45; }
.tool-how { display: inline-flex; align-items: center; gap: 5px; color: var(--brand-ink); font-size: 12.5px; font-weight: 600; margin-top: 6px; }
.tool-row { display: flex; gap: 12px; align-items: center; }
.tool-preview { max-width: 360px; border-top-color: var(--brand); }
.tool-images { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 12px; }
.tool-images img { width: 100%; height: auto; border-radius: var(--radius); box-shadow: var(--shadow); display: block; background: var(--surface); }
.download-list { list-style: none; margin: 0; padding: 8px 16px 14px; display: grid; gap: 8px; }
.download-list a { display: inline-flex; gap: 6px; align-items: center; font-weight: 600; }
.icon-picker, .tone-picker { border: 0; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.icon-picker legend, .tone-picker legend { margin-bottom: 6px; width: 100%; }
.icon-picker label { width: 38px; height: 38px; display: grid; place-items: center; border: 1px solid var(--line); border-radius: 8px; cursor: pointer; color: var(--ink-2); background: var(--surface); }
.icon-picker label:hover { border-color: var(--line-strong); color: var(--ink); }
.icon-picker label:has(input:checked) { border-color: var(--brand); box-shadow: inset 0 0 0 1px var(--brand); color: var(--brand-ink); background: var(--surface-2); }
.icon-picker label:has(input:focus-visible), .tone-picker label:has(input:focus-visible) { outline: 2px solid var(--brand); outline-offset: 2px; }
.icon-picker input, .tone-picker input { position: absolute; opacity: 0; pointer-events: none; }
.tone-picker label { display: inline-flex; gap: 7px; align-items: center; padding: 6px 10px 6px 7px; border: 1px solid var(--line); border-radius: 18px; cursor: pointer; font-size: 13px; background: var(--surface); }
.tone-picker label:has(input:checked) { border-color: var(--brand); box-shadow: inset 0 0 0 1px var(--brand); font-weight: 600; }
.swatch { width: 18px; height: 18px; border-radius: 50%; box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .08); }
.kind-cards { grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); }
.kind-cards .type-card-body { padding-right: 0; }
.converter-form { display: flex; flex-wrap: wrap; gap: 12px; align-items: flex-end; }
.converter-form .input-num { width: 140px; }
.converter-result { font-size: 15px; }
.converter-result:empty { display: none; }
/* the dyno chart (a web component with its own styling inside); the chart stays under the fixed top bar when scrolling */
fast-dyno.dyno-tool { display: block; min-height: 320px; --fd-sticky-top: calc(var(--top-height) + 12px); }
.dyno-note { display: flex; align-items: center; gap: 8px; margin-top: 14px; font-size: 13px; }
.dyno-note .icon { flex: none; }

/* --------------------------------------------- upload form: questions of an option */
.option-item { display: grid; align-content: start; min-width: 0; }
.option-item[hidden] { display: none; }
.options-fuel-note { font-size: 13px; }
.options-fuel-note[hidden] { display: none; }
.option-item.has-ask:has(input[data-option]:checked) .type-card { border-radius: var(--radius) var(--radius) 0 0; }
.option-ask {
  display: grid; grid-template-columns: minmax(0, 1fr); gap: 10px; padding: 10px 12px 12px; margin-top: -1px;
  border: 1px solid var(--brand); border-top: 1px dashed var(--line-strong); border-radius: 0 0 var(--radius) var(--radius);
  background: var(--surface-2); font-size: 13px;
}
.option-ask .field > label, .option-ask .field > .label { font-size: 13px; }
.option-ask .input { min-height: 34px; padding-top: 5px; padding-bottom: 5px; }
.option-ask .hint { font-size: 12px; }
.option-ask .segmented label { padding: 5px 10px; font-size: 13px; }
.option-ask[hidden] { display: none; }
.option-ask .field { display: grid; grid-template-columns: minmax(0, 1fr); gap: 6px; min-width: 0; }
.option-ask > * { min-width: 0; }
.input-unit { display: inline-flex; align-items: center; gap: 8px; color: var(--ink-2); font-size: 13px; }
.input-unit .input { width: 100px; }
.segmented { display: inline-flex; flex-wrap: wrap; border: 1px solid var(--line-strong); border-radius: var(--radius); overflow: hidden; width: max-content; max-width: 100%; background: var(--surface); }
.segmented label { position: relative; display: inline-flex; align-items: center; gap: 6px; padding: 7px 14px; font-weight: 600; font-size: 13.5px; cursor: pointer; border-right: 1px solid var(--line); }
.segmented label:last-child { border-right: 0; }
.segmented label:has(input:checked) { background: var(--brand-solid); color: var(--on-brand); }
.segmented label:has(input:focus-visible) { outline: 2px solid var(--brand); outline-offset: -3px; }
.segmented input { position: absolute; opacity: 0; pointer-events: none; }
.dtc-search { position: relative; }
.dtc-list {
  position: absolute; z-index: 20; left: 0; top: calc(100% + 2px); min-width: 100%; width: max-content; max-width: min(460px, calc(100vw - 40px)); display: grid; max-height: 320px; overflow-y: auto;
  border: 1px solid var(--line-strong); border-radius: var(--radius); background: var(--surface); box-shadow: var(--shadow-pop);
}
.dtc-list[hidden] { display: none; }
.dtc-item { padding: 8px 10px; font-size: 13px; display: flex; gap: 10px; align-items: baseline; cursor: pointer; }
.dtc-item b { font-variant-numeric: tabular-nums; flex: none; }
.dtc-item.is-current { background: var(--surface-2); box-shadow: inset 3px 0 0 var(--brand); }
.dtc-item.is-chosen b::after { content: " ✓"; color: var(--success-ink); }
.dtc-own { font-weight: 600; color: var(--brand-ink); }
.dtc-more { padding: 7px 10px; font-size: 12px; border-top: 1px solid var(--line); }
.option-ask .chips { display: flex; flex-wrap: wrap; gap: 6px; }
.option-ask .chips[hidden] { display: none; }
.option-ask .chip { display: inline-flex; gap: 6px; align-items: center; min-width: 0; padding: 3px 4px 3px 10px; border-radius: 14px; border: 1px solid var(--line-strong); background: var(--surface); font-size: 13px; max-width: 100%; }
.option-ask .chip .muted { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 260px; }
.chip-x { border: 0; background: none; color: var(--ink-2); cursor: pointer; font-size: 16px; line-height: 1; width: 22px; height: 22px; border-radius: 50%; }
.chip-x:hover { background: var(--surface-2); color: var(--ink); }
.sub-field { margin-left: 28px; max-width: 480px; }
.answer { display: block; margin-top: 3px; color: var(--ink-2); font-size: 13px; }
.answer b { color: var(--ink); font-weight: 600; }

/* --------------------------------------------------------------- updates (news for customers) */
.chip-filter { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 14px; }
.chip-filter :is(a, button) { padding: 5px 14px; border-radius: 16px; background: var(--surface-2); color: var(--ink-2); font-size: 13.5px; font-weight: 600; text-decoration: none; border: 1px solid var(--line); cursor: pointer; }
.chip-filter :is(a, button):hover { color: var(--ink); border-color: var(--line-strong); }
.chip-filter :is(a[aria-current], button[aria-pressed="true"]) { background: var(--brand-solid); border-color: var(--brand-solid); color: var(--on-brand); }
.update-list { display: grid; }
.update-item { padding: 14px 0; border-top: 1px solid var(--line); display: grid; gap: 4px; }
.update-item:first-child { border-top: 0; padding-top: 2px; }
.update-item.has-image { grid-template-columns: 120px minmax(0, 1fr); gap: 16px; align-items: start; }
.update-item.has-image > div { display: grid; gap: 4px; }
.update-thumb img { width: 120px; height: 80px; object-fit: cover; border-radius: 8px; display: block; background: var(--surface-2); }
.update-cat { font-size: 12.5px; color: var(--ink-2); }
.update-item h3 { font-size: 16.5px; line-height: 1.35; margin: 0; }
.update-item h3 a { color: var(--ink); text-decoration: none; }
.update-item h3 a:hover { color: var(--brand-ink); text-decoration: underline; }
.update-item time { font-size: 12.5px; color: var(--ink-2); }
.update-item p { margin: 2px 0 0; color: var(--ink); font-size: 14px; line-height: 1.5; }
.update-more { font-size: 13.5px; font-weight: 600; justify-self: start; }
.update-page { overflow: hidden; }
.update-page h1 { font-size: 24px; line-height: 1.3; margin: 2px 0 4px; }
.update-hero { width: 100%; max-height: 360px; object-fit: cover; display: block; }
.update-lead { font-size: 16px; line-height: 1.55; margin: 0; }
.update-image-admin { max-width: 280px; border-radius: var(--radius); display: block; }
@media (max-width: 560px) {
  .update-item.has-image { grid-template-columns: 1fr; }
  .update-thumb img { width: 100%; height: 160px; }
}
.no-credits-note { align-items: center; }
.no-credits-note .btn { flex: none; color: var(--on-brand); text-decoration: none; }
.no-credits-note { flex-wrap: wrap; }
.no-credits-note .notice-body { flex: 1 1 260px; }
.date-field { display: inline-flex; align-items: center; gap: 6px; color: var(--ink-2); font-size: 13.5px; }
.date-field .input { min-width: 0; width: auto; }
.period-chips { margin: 14px 0 0; }
.period-chips + .stat-row { margin-top: 16px; }
@media (max-width: 520px) { .date-field { flex: 1 1 100%; } .date-field .input { flex: 1; } }
.order-totals-note { margin-top: 10px; }
@media (max-width: 520px) {
  .order-totals { grid-template-columns: minmax(0, 1fr); gap: 8px; }
  .order-totals > div { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }
  .order-totals .stat-value { font-size: 20px; order: 2; }
}
/* Tools of the kind "table" (a list to look things up in) */
.lookup-filters .select { max-width: 220px; }
.lookup-count { margin-top: 10px; font-size: 13px; }
.lookup-table td { white-space: nowrap; }
.lookup-table td:first-child { font-weight: 600; }
.sort-link { color: inherit; text-decoration: none; display: inline-flex; align-items: center; gap: 3px; }
.sort-link:hover { color: var(--ink); text-decoration: underline; }
th[aria-sort] .sort-link { color: var(--ink); }
.column-editor { display: grid; gap: 8px; }
.column-row { display: grid; grid-template-columns: 64px minmax(0, 1fr) auto; gap: 10px; align-items: center; }
.column-row .check { margin: 0; }
@media (max-width: 640px) {
  .lookup-table td { white-space: normal; }
  .lookup-filters .select { max-width: none; min-width: 0; flex: 1 1 calc(50% - 4px); }
}
/* Read receipts and download states (admin: tickets and file services) */
.file-state { display: inline-flex !important; align-items: center; gap: 5px; color: var(--ink-2); font-size: 12.5px; }
.file-state-ok { color: var(--success-ink); }
.msg-files { flex-direction: column; align-items: flex-start; }
.msg-mine .msg-files { align-items: flex-end; }
.msg-file { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
/* a long file name wraps inside the message instead of pushing the page sideways on a phone */
.msg-files, .msg-file { min-width: 0; max-width: 100%; }
.msg-file .btn, .msg-files > .btn { max-width: 100%; min-width: 0; white-space: normal; overflow-wrap: anywhere; text-align: left; }
.msg-file .file-state { min-width: 0; max-width: 100%; overflow-wrap: anywhere; }
.msg-receipt { display: flex; align-items: center; gap: 5px; margin-top: 8px; font-size: 12.5px; color: var(--ink-2); }
.msg-receipt-ok { color: var(--success-ink); }
/* What the shop sent can be changed afterwards: "edited" next to the time (both sides see it), the buttons under the message (the shop only) */
.msg-edited { display: inline-flex; align-items: center; gap: 4px; color: var(--ink-2); font-size: 12.5px; }
.msg-actions { display: flex; flex-wrap: wrap; gap: 2px; align-items: center; justify-content: flex-end; margin-top: 6px; }
.msg-actions form { display: inline-block; }
.form-actions-end { margin-left: auto; }
.table .sub.receipt { display: flex; align-items: center; gap: 4px; margin-top: 3px; }
.table .sub.receipt-ok { color: var(--success-ink); }
/* The portal as an app */
.dialog { border: 0; border-radius: var(--radius); background: var(--surface); color: var(--ink); padding: 22px 24px; max-width: min(92vw, 420px); box-shadow: var(--shadow-pop); }
.dialog::backdrop { background: rgba(0, 0, 0, .45); }
.dialog h2 { margin: 0 0 8px; font-size: 18px; }
.dialog p, .dialog ol { margin: 0 0 12px; color: var(--ink-2); }
.dialog ol { padding-left: 20px; display: grid; gap: 4px; list-style: decimal; }
.dialog form { margin-top: 6px; text-align: right; }
/* Notifications on a phone (My account) */
.push-state { display: grid; gap: 8px; }
.push-state p { display: flex; gap: 6px; align-items: center; margin: 0; }
.push-state .error { color: var(--danger-ink); }
.device-list { list-style: none; margin: 6px 0 0; padding: 0; display: grid; gap: 6px; }
.device-list li { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 8px 0; border-top: 1px solid var(--line); }
.device-list li > span { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; min-width: 0; }
.device-list .sub { display: block; width: 100%; color: var(--ink-2); font-size: 12.5px; }
/* Files kept by the upload form after an error */
.kept-files { margin-top: 8px; padding: 10px 12px; border-radius: var(--radius); background: var(--success-bg); color: var(--success-ink); display: flex; flex-wrap: wrap; gap: 4px 10px; align-items: center; }
.kept-files-head { display: inline-flex; align-items: center; gap: 5px; font-weight: 600; }
.kept-file { font-weight: 600; overflow-wrap: anywhere; }
.kept-files .hint { flex-basis: 100%; color: inherit; opacity: .85; }
/* Sections of the customer menu */
.side-heading { font-size: 11.5px; font-weight: 700; letter-spacing: .02em; color: var(--side-ink-2); padding: 14px 12px 4px; }
/* The quick upload in the customer menu */
.quick-upload { margin-top: 18px; }
.quick-drop { display: grid; justify-items: center; text-align: center; gap: 4px; padding: 16px 12px; border: 1.5px dashed var(--side-ink-2); border-radius: var(--radius); color: var(--side-ink); cursor: pointer; }
.quick-drop:hover, .quick-drop.is-over { border-color: var(--brand); background: var(--side-hover); }
.quick-drop b { font-size: 13.5px; }
.quick-drop > span:not(.quick-drop-icon) { font-size: 12px; color: var(--side-ink-2); }
.quick-drop-icon { width: 38px; height: 38px; border-radius: 50%; background: var(--side-hover); display: grid; place-items: center; margin-bottom: 4px; }
.quick-drop-icon .icon { width: 18px; height: 18px; }
.quick-upload.is-busy .quick-drop { opacity: .6; pointer-events: none; }
.quick-drop-busy { font-weight: 600; color: var(--side-ink) !important; }

/* Quick messages: a row of buttons above a text field */
.quick-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 8px; margin: 0 0 8px; }
.quick-label { display: inline-flex; align-items: center; gap: 4px; font-size: 0.8125rem; color: var(--ink-2); margin-right: 2px; }
.quick-chip { max-width: 100%; }
.quick-manage { display: inline-flex; align-items: center; gap: 4px; margin-left: auto; font-size: 0.8125rem; }
.quick-text { white-space: pre-wrap; }
.quick-nl { display: block; margin-top: 4px; }

/* ------------------------------------------------------------ user rights (Users → edit) */
.rights-box { display: grid; gap: 12px; border-top: 1px solid var(--line); padding-top: 16px; }
.rights-box[hidden] { display: none; }
.rights-presets { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.rights-group { display: grid; gap: 8px; padding: 10px 0 2px; border-top: 1px solid var(--line); }
.rights-title { margin: 0; font-size: 13px; font-weight: 700; color: var(--ink-2); }
.rights-warning { color: var(--warning-ink); }
.rights-warning .icon { vertical-align: -2px; margin-right: 4px; }
.rights-preview { background: var(--side); color: var(--side-ink-2); border-radius: var(--radius); padding: 8px 0 12px; }
.rights-preview-heading { font-size: 11.5px; font-weight: 700; letter-spacing: .02em; padding: 12px 14px 4px; }
.rights-preview-item { padding: 6px 14px; font-size: 14px; color: var(--side-ink); }
.rights-preview-note { padding: 10px 14px; font-size: 14px; color: var(--side-ink); }

/* ---- Passing a file service on to a partner */
.option-row { display: grid; gap: 8px; padding: 6px 0; border-top: 1px solid var(--line); }
.option-row:first-of-type { border-top: 0; }
.option-row[hidden], [data-ask][hidden] { display: none; }
.forward-box .forward-status { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }

/* Credits on the upload page: one row of pills, or one line when there is nothing to choose. */
.fs-credits { border-top: 3px solid var(--brand); }
.fs-credit-row { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.fs-credit-title { font-weight: 700; margin-right: 4px; }
.fs-pills { display: flex; gap: 10px; flex-wrap: wrap; }
.fs-pill {
  display: flex; align-items: center; gap: 9px; min-height: 44px; box-sizing: border-box; padding: 0 14px; cursor: pointer;
  border: 1px solid var(--line-strong); border-radius: var(--radius); background: var(--surface); font-weight: 600;
}
.fs-pill input { margin: 0; flex: none; }
.fs-pill:has(input:checked) { border-color: var(--brand); box-shadow: inset 0 0 0 1px var(--brand); background: var(--surface-2); }
.fs-pill:has(input:focus-visible) { outline: 2px solid var(--brand); outline-offset: 2px; }
.fs-pill.is-empty:not(:has(input:checked)) { border-color: var(--line); color: var(--ink-2); background: var(--surface-2); }
.fs-pill-bal { font-size: 13px; font-weight: 600; color: var(--brand-ink); font-variant-numeric: tabular-nums; }
.fs-pill.is-empty .fs-pill-bal { color: var(--ink-2); }
.fs-pill a { font-size: 13px; font-weight: 600; }
.fs-tip {
  position: relative; flex: none; width: 18px; height: 18px; padding: 0; border-radius: 50%; cursor: help; line-height: 1;
  border: 1px solid var(--line-strong); background: none; color: var(--ink-2); font: 700 11px/1 inherit;
}
.fs-tip::after {
  content: attr(data-tip); position: absolute; left: 50%; bottom: calc(100% + 8px); transform: translateX(-50%); z-index: 20;
  width: max-content; max-width: 260px; padding: 8px 10px; border-radius: var(--radius); background: var(--ink); color: var(--surface);
  font-size: 12.5px; font-weight: 400; line-height: 1.4; text-align: left; white-space: normal; pointer-events: none; display: none;
}
.fs-tip:hover::after, .fs-tip:focus-visible::after, .fs-tip:focus::after { display: block; }
.fs-credit-ask { margin-left: auto; font-size: 13px; }
.fs-credit-one { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding-top: 12px; padding-bottom: 12px; }
.fs-credit-ok { flex: none; width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; background: var(--success-bg); color: var(--success-ink); }
.fs-credit-ok.is-warn { background: var(--warning-bg); color: var(--warning-ink); }
.fs-credit-buy { margin-left: auto; font-size: 13px; }
@media (max-width: 700px) { .fs-credit-ask, .fs-credit-buy { margin-left: 0; } .fs-pills { width: 100%; } .fs-pill { flex: 1 1 100%; } }

/* ===================================================================== 10 looks of the upload page
   Settings → File service chooses one: classic (the rules above), steps, workshop or compact. Everything
   below is scoped to .fs-layout-steps / -workshop / -compact, so the classic page is not touched by it. */

/* the chooser in Settings → File service: a little drawing per look */
.layout-choices { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
@media (max-width: 1300px) { .layout-choices { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 560px) { .layout-choices { grid-template-columns: minmax(0, 1fr); } }
.layout-choice { display: grid; gap: 8px; align-content: start; padding: 10px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); cursor: pointer; }
.layout-choice:hover { border-color: var(--line-strong); }
.layout-choice:has(input:checked) { border-color: var(--brand); box-shadow: inset 0 0 0 1px var(--brand); background: var(--surface-2); }
.layout-choice:has(input:focus-visible) { outline: 2px solid var(--brand); outline-offset: 2px; }
.layout-thumb { display: block; border-radius: var(--radius); overflow: hidden; border: 1px solid var(--line); }
.layout-thumb .wf { display: block; width: 100%; height: auto; }
.layout-name { display: flex; align-items: center; gap: 8px; font-weight: 600; }
.layout-name input { margin: 0; }
.layout-active { margin-left: auto; padding: 0 8px; border-radius: 999px; background: var(--success-bg); color: var(--success-ink); font-size: 12px; font-weight: 600; }
.layout-text { color: var(--ink-2); font-size: 12.5px; }
.wf-page { fill: var(--surface-3); }
.wf-card { fill: var(--surface); stroke: var(--line); stroke-width: 1; }
.wf-bar { fill: var(--line); }
.wf-line2 { fill: var(--line-strong); opacity: .55; }
.wf-brand { fill: var(--brand); }
.wf-ok { fill: #2e9d4f; }
.wf-ok-soft { fill: var(--success-bg); stroke: #7cc48b; stroke-width: .8; }
.wf-hollow { fill: var(--surface); stroke: var(--line-strong); stroke-width: 1.2; }
.wf-active { stroke: var(--brand); stroke-width: 1.5; }
.wf-dashed { fill: none; stroke: var(--line-strong); stroke-width: 1; stroke-dasharray: 3 2; }
.wf-dash { fill: none; stroke: var(--brand); stroke-width: 1.2; stroke-dasharray: 3 2; }
.wf-tile, .wf-pill { fill: var(--surface); stroke: var(--line-strong); stroke-width: 1; }
.wf-tile.wf-on, .wf-pill.wf-on { stroke: var(--brand); stroke-width: 1.6; fill: color-mix(in srgb, var(--brand) 12%, var(--surface)); }
.wf-warn { fill: var(--warning-bg); }
.wf-dark { fill: #263238; }
.wf-white { fill: #ffffff; }
.wf-dim { opacity: .5; }
.wf-bottom { fill: var(--surface); stroke: var(--line); stroke-width: 1; }

/* ---- parts shared by the three newer looks */
.fs-layout { --fs-done: #2a8a47; }
.fs-grid { display: grid; gap: 14px 16px; align-items: start; }
.fs-grid-2 { grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); }
.fs-grid-3 { grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); }
.fs-grid-4 { grid-template-columns: repeat(auto-fill, minmax(168px, 1fr)); }
.fs-grid > .wide { grid-column: 1 / -1; }
.fs-contents { display: contents; }
.fs-credits-inline { display: block; border-top: 0; }
.fs-credits-inline .fs-credit-one { display: inline-flex; align-items: center; gap: 8px; flex-wrap: wrap; padding: 5px 14px 5px 7px; background: var(--surface); border: 1px solid var(--line); border-radius: 999px; font-size: 13.5px; }
.fs-credits-inline .fs-credit-ok { width: 20px; height: 20px; }
.fs-credits-inline .fs-credit-buy { margin-left: 4px; }
.fs-credits-inline .fs-credit-row { padding: 8px 12px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }
.layout-preview { align-items: center; flex-wrap: wrap; margin-bottom: 16px; }
.layout-preview .notice-body { flex: 1 1 260px; }
.layout-preview-buttons { margin-left: auto; display: flex; gap: 6px; flex-wrap: wrap; }
@media (max-width: 700px) { .layout-preview-buttons { margin-left: 0; flex: 1 1 100%; } }
.layout-preview .btn { text-decoration: none; color: var(--ink); font-weight: 600; }
.layout-preview .btn-primary { color: var(--on-brand); }
/* the choice tiles of the workshop and compact looks: the radio button steps aside, the card is the control */
.fs-layout-workshop .type-card > input[type="radio"], .fs-layout-compact .type-card > input[type="radio"] {
  position: absolute; opacity: 0; width: 1px; height: 1px; margin: 0; pointer-events: none;
}

/* ============================================================== steps */
.fs-steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 14px; }
.fs-step { position: relative; display: grid; grid-template-columns: 34px minmax(0, 1fr); gap: 0 14px; align-items: start; scroll-margin-top: calc(var(--top-height) + 12px); }
.fs-step::before { content: ""; position: absolute; left: 16px; top: 46px; bottom: -25px; width: 2px; background: var(--line); border-radius: 1px; }
.fs-step:last-child::before { display: none; }
.fs-step[data-state="done"]::before { background: var(--fs-done); }
.fs-step-no {
  position: relative; z-index: 1; margin-top: 11px; width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center;
  background: var(--surface); border: 2px solid var(--line-strong); color: var(--ink-2); font-weight: 700; font-size: 14px;
}
.fs-step-no .icon { display: none; width: 18px; height: 18px; }
.fs-step[data-state="active"] .fs-step-no { background: var(--brand-solid); border-color: var(--brand-solid); color: var(--on-brand); box-shadow: 0 0 0 4px color-mix(in srgb, var(--brand) 22%, transparent); }
.fs-step[data-state="done"] .fs-step-no { background: var(--fs-done); border-color: var(--fs-done); color: #fff; }
.fs-step[data-state="done"] .fs-step-no .n, .fs-step[data-state="error"] .fs-step-no .n { display: none; }
.fs-step[data-state="done"] .fs-step-no .fs-step-ok, .fs-step[data-state="error"] .fs-step-no .fs-step-bad { display: block; }
.fs-step[data-state="error"] .fs-step-no { background: var(--danger-solid); border-color: var(--danger-solid); color: #fff; box-shadow: 0 0 0 4px color-mix(in srgb, var(--danger-solid) 20%, transparent); }
.fs-step[data-state="error"]::before { background: var(--line); }
.fs-step-card { min-width: 0; background: var(--surface); border-radius: var(--radius); box-shadow: var(--shadow); border: 1.5px solid transparent; }
.fs-steps.is-live .fs-step.is-open .fs-step-card { border-color: var(--brand); }
.fs-steps.is-live .fs-step:not(.is-open)[data-state="todo"] .fs-step-card { background: transparent; box-shadow: none; border: 1.5px dashed var(--line-strong); }
.fs-steps.is-live .fs-step:not(.is-open)[data-state="todo"] .fs-step-title { color: var(--ink-2); }
.fs-step-head { position: relative; display: flex; align-items: center; gap: 6px 12px; flex-wrap: wrap; padding: 14px 16px; border-radius: var(--radius); }
.fs-step-head:has(.fs-step-toggle:focus-visible) { outline: 2px solid var(--brand); outline-offset: -2px; }
.fs-step-title { font-size: 16px; line-height: 1.3; margin: 0; }
.fs-step-toggle { appearance: none; border: 0; background: none; padding: 0; margin: 0; font: inherit; font-weight: 600; color: inherit; text-align: left; cursor: default; }
.fs-step-toggle:focus-visible { outline: none; }
.fs-step-toggle::after { content: ""; position: absolute; inset: 0; }
.fs-steps.is-live .fs-step:not(.is-open) .fs-step-toggle { cursor: pointer; }
.fs-step-tag { font-size: 12px; font-weight: 600; padding: 1px 9px; border-radius: 4px; background: var(--success-bg); color: var(--success-ink); }
.fs-step-hint, .fs-step-edit { margin-left: auto; font-size: 13px; }
.fs-step-hint { color: var(--ink-2); }
.fs-step-edit { color: var(--brand-ink); font-weight: 600; font-size: 13.5px; }
.fs-step-facts { display: none; margin: 0; padding: 0 16px 14px; gap: 8px 18px; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); }
.fs-step-facts dt { font-size: 12px; color: var(--ink-2); }
.fs-step-facts dd { margin: 0; font-weight: 600; overflow-wrap: anywhere; }
.fs-step-body { display: grid; gap: 18px; padding: 2px 16px 18px; min-width: 0; align-content: start; }
.fs-sub { display: grid; gap: 12px; min-width: 0; align-content: start; }
.fs-sub + .fs-sub { border-top: 1px solid var(--line); padding-top: 16px; }
.fs-sub > h3 { font-size: 14px; display: flex; gap: 8px; align-items: baseline; flex-wrap: wrap; }
.fs-sub > h3 .muted { font-weight: 400; font-size: 13px; }
.fs-step-next { display: flex; justify-content: flex-end; }
/* with script the steps fold; without it every step stays open and the folding controls are not shown */
.fs-steps:not(.is-live) :is(.fs-step-edit, .fs-step-hint, .fs-step-next) { display: none; }
.fs-steps:not(.is-live) .fs-step-toggle::after { display: none; }
.fs-steps.is-live .fs-step:not(.is-open) .fs-step-body { display: none; }
.fs-steps.is-live .fs-step.is-open :is(.fs-step-edit, .fs-step-hint) { display: none; }
.fs-steps.is-live .fs-step[data-state="done"] .fs-step-hint { display: none; }
.fs-steps.is-live .fs-step:not([data-state="done"]) .fs-step-edit { display: none; }
.fs-steps.is-live .fs-step[data-state="done"]:not(.is-open) .fs-step-facts { display: grid; }
@media (max-width: 700px) {
  .fs-step { grid-template-columns: 28px minmax(0, 1fr); gap: 0 10px; }
  .fs-step-no { width: 28px; height: 28px; font-size: 13px; margin-top: 12px; }
  .fs-step-no .icon { width: 15px; height: 15px; }
  .fs-step::before { left: 13px; top: 42px; }
  .fs-step-head { padding: 12px; }
  .fs-step-body { padding: 2px 12px 14px; }
  .fs-step-facts { padding: 0 12px 12px; }
  .fs-step-hint { display: none; }
}

/* ============================================================ workshop */
.fs-layout-workshop { --ws-dark: #263238; --ws-dark-2: #1f272c; --ws-soft: #b0bec5; --ws-accent: color-mix(in srgb, var(--brand) 55%, #fff); display: block; }
.ws-hero { margin: -20px -24px 0; padding: 26px 24px 86px; background: linear-gradient(180deg, var(--ws-dark-2) 0, var(--ws-dark) 100%); color: #fff; }
.layout-preview ~ .fs-layout-workshop .ws-hero { margin-top: 0; }
.ws-hero-top { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px 24px; flex-wrap: wrap; }
.ws-hero h1 { color: #fff; font-size: 26px; font-weight: 700; letter-spacing: -0.02em; }
.ws-hero p { color: var(--ws-soft); margin-top: 2px; }
.ws-hero .autofill-status { background: rgba(255, 255, 255, 0.07); border-left-color: var(--ws-accent); color: #e7ebee; }
.ws-hero .autofill-status[data-kind="ok"] { border-left-color: #4caf6a; }
.ws-hero .error, .ws-hero .dropzone-error { color: #ffb4b4; }
/* the delivery strip on the dark top */
.ws-hero .delivery-note { background: transparent; border-color: transparent; color: #cfd8dc; padding: 0; }
.ws-hero .delivery-note b { color: #fff; }
.ws-hero .delivery-note .muted { color: var(--ws-soft); }
.ws-hero .delivery-dot { box-shadow: 0 0 0 4px rgba(46, 157, 79, 0.25); }
.ws-hero .delivery-note.is-closed .delivery-dot { background: #90a4ae; box-shadow: 0 0 0 4px rgba(255, 255, 255, 0.12); }
.ws-hero .delivery-pill { background: color-mix(in srgb, var(--brand) 24%, transparent); border-color: color-mix(in srgb, var(--brand) 60%, #fff); color: var(--ws-accent); }
.ws-hero .delivery-note.is-closed .delivery-pill, .ws-hero .delivery-note.is-late .delivery-pill { background: rgba(255, 255, 255, 0.08); border-color: rgba(255, 255, 255, 0.22); color: var(--ws-soft); }
.ws-hero .delivery-note.style-bar, .ws-hero .delivery-note.style-badge { padding: 10px 16px; background: rgba(255, 255, 255, 0.06); border: 1px solid rgba(255, 255, 255, 0.16); }
.ws-hero .delivery-note.style-bar { border-left: 4px solid var(--brand); }
.ws-hero .delivery-note.style-bar > .icon, .ws-hero .delivery-strong { color: var(--ws-accent); }
.ws-hero .delivery-note.style-badge { padding: 0; }
.ws-hero .delivery-note.style-bar.is-closed, .ws-hero .delivery-note.style-bar.is-late { border-left-color: #78909c; }
.ws-hero .delivery-note.style-bar.is-closed > .icon, .ws-hero .delivery-note.style-bar.is-closed .delivery-strong,
.ws-hero .delivery-note.style-bar.is-late > .icon, .ws-hero .delivery-note.style-bar.is-late .delivery-strong { color: var(--ws-soft); }
/* the big drop zone */
.ws-drop { margin-top: 20px; display: grid; gap: 12px; }
.ws-drop .dropzone { padding: 24px 26px; border: 2px dashed color-mix(in srgb, var(--brand) 65%, #fff); border-radius: 12px; background: rgba(255, 255, 255, 0.04); gap: 8px; }
.ws-drop .dropzone.is-over { background: rgba(255, 255, 255, 0.11); }
.ws-drop .dropzone:focus-within { outline-color: var(--ws-accent); }
.ws-drop .dropzone-prompt { gap: 20px; color: var(--ws-soft); }
.ws-drop .dropzone-prompt b { color: #fff; font-size: 20px; font-weight: 700; }
.ws-drop .dropzone-plus { width: 60px; height: 60px; border-radius: 14px; font-size: 36px; }
.ws-drop .dropzone-sub { color: var(--ws-soft); font-size: 13.5px; }
.ws-drop .dropzone.has-files .dropzone-prompt { display: none; }
.ws-drop .file-list { font-size: 20px; font-weight: 700; color: #fff; gap: 8px; }
.ws-drop .file-list > div { align-items: center; justify-content: flex-start; gap: 18px; }
.ws-drop .file-list > div::before {
  content: ""; flex: none; width: 60px; height: 60px; border-radius: 14px;
  background: var(--brand-solid) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23fff' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 16V4M7 9l5-5 5 5'/%3E%3Cpath d='M5 20h14'/%3E%3C/svg%3E") center / 30px no-repeat;
}
.ws-drop .file-list .link-button { color: var(--ws-accent); font-size: 14px; }
.ws-drop .dropzone-status { margin-top: 0; background: transparent; border-color: rgba(255, 255, 255, 0.16); color: var(--ws-soft); }
.ws-drop .kept-files { background: rgba(76, 175, 106, 0.18); color: #c8f0d3; }
.ws-read { display: flex; align-items: center; gap: 8px 12px; flex-wrap: wrap; }
.ws-read-title { font-size: 12.5px; font-weight: 600; color: var(--ws-accent); }
.ws-read-chips { display: flex; gap: 6px; flex-wrap: wrap; }
.ws-read-chips span { padding: 2px 11px; border-radius: 999px; font-size: 12.5px; font-weight: 500; background: rgba(255, 255, 255, 0.08); border: 1px solid rgba(255, 255, 255, 0.22); color: #fff; }
/* the panels */
.ws-body { position: relative; display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 22px; align-items: start; margin-top: -56px; }
.ws-main { display: grid; gap: 18px; min-width: 0; align-content: start; }
.ws-panel { display: grid; gap: 16px; align-content: start; min-width: 0; padding: 22px 24px; background: var(--surface); border-radius: 12px; box-shadow: 0 1px 2px rgba(38, 50, 56, 0.08), 0 10px 30px rgba(38, 50, 56, 0.08); }
.ws-panel > h2 { display: flex; align-items: center; gap: 8px; font-size: 16px; font-weight: 700; }
.ws-panel > h2 .icon { color: var(--brand); width: 18px; height: 18px; }
.ws-sub { font-size: 14px; display: flex; gap: 8px; align-items: baseline; flex-wrap: wrap; margin-top: 4px; }
.ws-sub .muted { font-weight: 400; font-size: 13px; }
.ws-tag { margin-left: auto; display: inline-flex; align-items: center; gap: 5px; font-size: 12px; font-weight: 600; padding: 1px 9px; border-radius: 4px; background: var(--success-bg); color: var(--success-ink); }
.ws-more > summary { cursor: pointer; display: inline-flex; align-items: center; gap: 6px; color: var(--ink-2); font-weight: 600; padding: 4px 0; }
.ws-more > summary:hover { color: var(--ink); }
.ws-more[open] > summary { margin-bottom: 10px; }
.fs-layout-steps .autofilled, .fs-layout-workshop .autofilled { box-shadow: none; border-color: #7cc48b; background-color: color-mix(in srgb, var(--success-bg) 40%, var(--surface)); }
/* tuning types: big tiles */
.fs-layout-workshop .type-cards:not(.option-cards) { grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 12px; }
.fs-layout-workshop .type-cards:not(.option-cards) .type-card { flex-direction: column; gap: 0; min-height: 128px; padding: 14px; border-radius: 10px; }
.fs-layout-workshop .type-cards:not(.option-cards) .type-card:has(input:checked) { border: 2px solid var(--brand); padding: 13px; box-shadow: none; background: color-mix(in srgb, var(--brand) 7%, var(--surface)); }
.fs-layout-workshop .type-cards:not(.option-cards) .type-card-body { padding-right: 0; gap: 4px; }
.fs-layout-workshop .type-cards:not(.option-cards) .type-card-name { flex-direction: column; gap: 10px; font-size: 15px; font-weight: 700; }
.fs-layout-workshop .type-cards:not(.option-cards) .type-card-name .icon { width: 36px; height: 36px; padding: 9px; margin: 0; border-radius: 9px; background: var(--surface-3); color: var(--ink-2); }
.fs-layout-workshop .type-cards:not(.option-cards) .type-card:has(input:checked) .type-card-name .icon { background: var(--brand-solid); color: var(--on-brand); }
.fs-layout-workshop .type-cards:not(.option-cards) .credit-badge { top: 14px; right: 14px; padding: 0; border: 0; border-radius: 0; background: none; font-size: 13px; color: var(--ink); }
.fs-layout-workshop .type-cards:not(.option-cards) .type-card:has(input:checked) .credit-badge { top: 13px; right: 13px; }
/* options: a tidy grid (Compact uses the same rules). All tiles of a row are as high as the highest one (a
   subgrid with two rows per option) and the question of a ticked option (DTC, RPM, loudness) hangs directly
   under its own tile. A browser without subgrid shows every tile at its own height, which is still tidy. */
.fs-layout-workshop .option-cards, .fs-layout-compact .option-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 320px), 1fr)); gap: 0 8px; }
.fs-layout-workshop .option-item:not([hidden]), .fs-layout-compact .option-item:not([hidden]) { display: grid; grid-row: span 2; grid-template-rows: subgrid; }
.fs-layout-workshop .option-cards .type-card, .fs-layout-compact .option-cards .type-card { margin-bottom: 8px; }
.fs-layout-workshop .option-ask, .fs-layout-compact .option-ask { margin-top: -9px; margin-bottom: 8px; border: 1px solid var(--brand); border-top: 1px dashed var(--line-strong); }
.fs-layout-workshop .option-cards .type-card { min-height: 54px; padding: 8px 12px; border-radius: 8px; align-items: center; gap: 8px; }
.fs-layout-workshop .option-cards .type-card-body { padding-right: 0; }
.fs-layout-workshop .option-cards .type-card-name { font-size: 14px; line-height: 1.25; }
.fs-layout-workshop .option-cards .type-card-text { font-size: 12px; }
.fs-layout-workshop .option-cards .credit-badge { position: static; padding: 0 0 0 4px; border: 0; background: none; font-size: 12.5px; align-self: center; }
.fs-layout-workshop .option-cards .type-card:has(input:checked) { border-color: var(--brand); box-shadow: inset 0 0 0 1px var(--brand); background: color-mix(in srgb, var(--brand) 7%, var(--surface)); }
.fs-layout-workshop .option-item.has-ask:has(input[data-option]:checked) .type-card { border-radius: 8px 8px 0 0; }
.fs-layout-workshop .option-ask { border-radius: 0 0 8px 8px; }
/* the dark summary */
.ws-summary { background: #2d3a41; color: #fff; border: 1px solid rgba(255, 255, 255, 0.12); border-radius: 12px; box-shadow: 0 10px 30px rgba(38, 50, 56, 0.25); overflow: hidden; }
.ws-summary .card-head { display: none; }
.ws-summary .fs-sum { padding: 20px; gap: 12px; }
.ws-summary .muted { color: var(--ws-soft); }
.ws-summary .fs-sum-total { flex-direction: column; align-items: flex-start; gap: 0; }
.ws-summary .fs-sum-big { font-size: 15px; }
.ws-summary .fs-sum-big b.brand-ink { color: #fff; font-size: 38px; letter-spacing: -0.03em; line-height: 1.1; }
.ws-summary .fs-sum-big span.brand-ink { color: var(--ws-accent); }
.ws-summary .fs-sum-line b { color: #fff; }
.ws-summary .fs-sum-balance { border-top-color: rgba(255, 255, 255, 0.16); }
.ws-summary .fs-need { background: rgba(255, 255, 255, 0.08); color: var(--ws-accent); padding: 10px 12px; }
.ws-summary .fs-chip { background: transparent; color: #ffe3d0; border-color: var(--ws-accent); }
.ws-summary .fs-ok { background: rgba(76, 175, 106, 0.2); color: #c8f0d3; }
.ws-summary .fs-note { color: var(--ws-soft); }
.ws-summary .notice a { color: inherit; }
@media (max-width: 1100px) {
  .ws-body { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 960px) {
  .ws-hero { margin: -20px -14px 0; padding: 22px 14px 70px; }
  .ws-body { margin-top: -48px; }
}
@media (max-width: 700px) {
  .ws-panel { padding: 18px 16px; }
  .ws-drop .dropzone { padding: 18px 16px; }
  .ws-drop .dropzone-prompt { gap: 14px; }
  .ws-drop .dropzone-prompt b { font-size: 17px; }
  .ws-drop .dropzone-plus { width: 48px; height: 48px; font-size: 30px; }
  .ws-drop .file-list { font-size: 16px; }
  .ws-drop .file-list > div::before { width: 44px; height: 44px; background-size: 24px; }
  .fs-layout-workshop .type-cards:not(.option-cards) { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
}
@media (max-width: 560px) {
  /* on a phone a tile is one row (icon, name, price) instead of a tall block */
  .fs-layout-workshop .type-cards:not(.option-cards) { grid-template-columns: minmax(0, 1fr); gap: 8px; }
  .fs-layout-workshop .type-cards:not(.option-cards) .type-card { flex-direction: row; align-items: center; min-height: 0; gap: 10px; }
  .fs-layout-workshop .type-cards:not(.option-cards) .type-card-body { flex: 1; }
  .fs-layout-workshop .type-cards:not(.option-cards) .type-card-name { flex-direction: row; align-items: center; gap: 12px; }
  .fs-layout-workshop .type-cards:not(.option-cards) .type-card-name .icon { flex: none; }
  .fs-layout-workshop .type-cards:not(.option-cards) .credit-badge,
  .fs-layout-workshop .type-cards:not(.option-cards) .type-card:has(input:checked) .credit-badge { position: static; flex: none; align-self: flex-start; }
}

/* ============================================================ compact */
.fs-layout-compact { display: block; }
.cp-head { display: flex; align-items: center; gap: 10px 14px; flex-wrap: wrap; margin-bottom: 16px; }
.cp-head h1 { margin-right: 6px; }
.cp-head .delivery-note { padding: 3px 14px 3px 12px; border-radius: 999px; font-size: 13.5px; }
.cp-head .delivery-note.style-bar { padding: 4px 14px 4px 12px; border-left-width: 1px; border-left-color: color-mix(in srgb, var(--brand) 35%, var(--surface)); }
.cp-head .delivery-note.style-bar > .icon { width: 18px; height: 18px; }
.cp-head .delivery-note.style-badge { padding: 0; }
.cp-head .delivery-big { min-width: 0; padding: 3px 12px; flex-direction: row; gap: 5px; align-items: baseline; }
.cp-head .delivery-big b { font-size: 16px; }
.cp-head .delivery-big span { font-size: 12px; }
.cp-head .delivery-body { padding: 3px 14px; }
.cp-head .delivery-body b { font-size: 13.5px; }
.cp-head .delivery-body .muted { display: none; }
.cp-grid { display: grid; grid-template-columns: 340px minmax(0, 1fr); grid-template-areas: "file vehicle" "tuning tuning" "service service" "agree agree"; gap: 16px; align-items: stretch; }
.cp-file { grid-area: file; display: flex; flex-direction: column; }
.cp-vehicle { grid-area: vehicle; }
.cp-tuning { grid-area: tuning; }
.cp-service { grid-area: service; }
.cp-agree { grid-area: agree; }
@media (max-width: 1100px) {
  .cp-grid { grid-template-columns: minmax(0, 1fr); grid-template-areas: "file" "vehicle" "tuning" "service" "agree"; }
}
.cp-card { padding: 16px 18px; display: grid; gap: 14px; align-content: start; min-width: 0; }
.cp-file { display: flex; }
.cp-card > h2 { display: flex; align-items: center; gap: 8px; font-size: 15px; margin: 0; }
.cp-card > h2 .icon { color: var(--brand); }
.cp-tag { margin-left: auto; display: inline-flex; align-items: center; gap: 5px; font-size: 12px; font-weight: 600; padding: 1px 9px; border-radius: 4px; background: var(--success-bg); color: var(--success-ink); }
.cp-sub { font-size: 13.5px; margin-top: 2px; display: flex; gap: 8px; align-items: baseline; flex-wrap: wrap; }
.cp-sub .muted { font-weight: 400; font-size: 13px; }
.cp-file .field { flex: 1; display: flex; flex-direction: column; gap: 8px; }
.cp-file .dropzone { flex: 1; align-content: center; justify-items: center; text-align: center; padding: 18px 16px; }
.cp-file .dropzone-prompt { flex-direction: column; text-align: center; gap: 10px; }
.cp-file .dropzone-words { justify-items: center; }
.cp-file .dropzone-plus { width: 48px; height: 48px; font-size: 32px; }
.cp-file .dropzone.has-files .dropzone-prompt { display: none; }
.cp-file .file-list { font-weight: 700; justify-items: center; }
.cp-file .file-list > div { flex-direction: column; align-items: center; gap: 2px; text-align: center; }
.cp-file .file-list > div > span { overflow-wrap: anywhere; }
.cp-file .dropzone-status { margin-top: 0; padding: 7px 12px; font-size: 12.5px; }
.cp-service-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 16px 24px; align-items: start; }
.cp-agree .agreements { grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 10px 24px; }
.cp-agree .check-all { grid-column: 1 / -1; }
.fs-layout-compact .autofilled { box-shadow: none; border-color: #7cc48b; background-color: color-mix(in srgb, var(--success-bg) 40%, var(--surface)); }
/* tuning types: one row of tiles; options: the tidy grid of the Workshop block above */
.fs-layout-compact .type-cards:not(.option-cards) { grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 8px; }
.fs-layout-compact .type-cards:not(.option-cards) .type-card { min-height: 0; padding: 10px 12px; }
.fs-layout-compact .type-cards:not(.option-cards) .type-card:has(input:checked) { border: 2px solid var(--brand); padding: 9px 11px; box-shadow: none; background: color-mix(in srgb, var(--brand) 7%, var(--surface)); }
.fs-layout-compact .type-cards:not(.option-cards) .type-card-body { padding-right: 0; gap: 1px; }
.fs-layout-compact .type-cards:not(.option-cards) .type-card-name .icon { display: none; }
.fs-layout-compact .type-cards:not(.option-cards) .credit-badge { position: static; flex: none; padding: 0; border: 0; border-radius: 0; background: none; font-size: 13px; color: var(--ink); }
.cp-options { display: grid; gap: 10px; }
.fs-layout-compact .option-cards .type-card { min-height: 46px; padding: 5px 12px 5px 10px; border-radius: var(--radius); align-items: center; gap: 8px; }
.fs-layout-compact .option-cards .type-card-body { padding-right: 0; }
.fs-layout-compact .option-cards .type-card-name { line-height: 1.2; }
.fs-layout-compact .option-cards .type-card-text { display: none; }
.fs-layout-compact .option-cards .credit-badge { position: static; padding: 0; border: 0; background: none; font-size: 12.5px; align-self: center; }
.fs-layout-compact .option-cards .type-card:has(input:checked) { border-color: var(--brand); box-shadow: inset 0 0 0 1px var(--brand); background: color-mix(in srgb, var(--brand) 7%, var(--surface)); }
.fs-layout-compact .option-item.has-ask:has(input[data-option]:checked) .type-card { border-radius: var(--radius) var(--radius) 0 0; }
.fs-layout-compact .option-ask { border-radius: 0 0 var(--radius) var(--radius); }
@media (max-width: 700px) {
  .fs-layout-compact .option-cards .type-card { padding: 8px 12px 8px 10px; }
  .fs-layout-compact .option-cards .type-card-text { display: block; }
  .fs-layout-compact .type-cards:not(.option-cards) { grid-template-columns: minmax(0, 1fr); }
  .cp-card { padding: 14px 14px; }
}
/* the bar at the bottom: on a wide screen it carries the total, what is missing and the Send button */
body.has-fs-bar-wide .toasts { bottom: 92px; }
body.has-fs-bar-wide .main { padding-bottom: 96px; }
@media (max-width: 1100px) {
  .fs-bar-desk { display: none; }
}
@media (min-width: 1101px) {
  .fs-bar-wide {
    display: flex; position: fixed; left: var(--side-width); right: 0; bottom: 0; z-index: 25; align-items: center;
    padding: 10px 28px; background: var(--surface); border-top: 1px solid var(--line); box-shadow: 0 -6px 20px rgba(38, 50, 56, 0.10);
  }
  .fs-bar-wide .fs-bar-mobile { display: none; }
  .fs-bar-desk { display: flex; align-items: center; gap: 22px; width: 100%; min-height: 56px; }
  .fs-bar-total { display: grid; line-height: 1.15; flex: none; }
  .fs-bar-total .muted { font-size: 12.5px; }
  .fs-bar-big b { font-size: 26px; font-weight: 700; letter-spacing: -0.02em; color: var(--brand-ink); font-variant-numeric: tabular-nums; }
  .fs-bar-big span { font-size: 13px; font-weight: 600; color: var(--brand-ink); }
  .fs-bar-calc { display: grid; gap: 2px; flex: none; padding-left: 22px; border-left: 1px solid var(--line); font-size: 12.5px; line-height: 1.4; }
  .fs-bar-calc b { color: var(--ink); font-weight: 600; font-variant-numeric: tabular-nums; }
  .fs-bar-need { display: flex; align-items: center; gap: 4px 10px; flex-wrap: wrap; min-width: 0; padding: 5px 10px; }
  .fs-bar-need .fs-need-title { margin: 0; white-space: nowrap; }
  .fs-bar-ok { align-items: center; }
  .fs-bar-ok .icon { margin-top: 0; }
  .fs-bar-short { display: inline-flex; align-items: center; gap: 6px; color: var(--warning-ink); font-weight: 600; }
  .fs-bar-send { margin-left: auto; flex: none; }
}
@media (max-width: 1280px) and (min-width: 1101px) {
  .fs-bar-calc { display: none; }
}

/* the field that "Show missing", a chip or an error link has just jumped to */
.fs-nudge { border-radius: var(--radius); animation: fs-nudge 1.7s ease-out; }
@keyframes fs-nudge {
  0% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--warning-ink) 60%, transparent); }
  20% { box-shadow: 0 0 0 7px color-mix(in srgb, var(--warning-ink) 38%, transparent); }
  100% { box-shadow: 0 0 0 0 transparent; }
}
@media (prefers-reduced-motion: reduce) {
  .fs-nudge { animation: none; outline: 2px solid var(--warning-ink); outline-offset: 3px; }
}

/* ===================================================================== 11 the customer picks a look
   Only on the upload page and only when Settings → File service lets customers pick: a row of four small
   buttons above the page (a drawing of the look and its name), outside the upload form. */
.layout-switch { display: flex; align-items: center; justify-content: flex-end; flex-wrap: wrap; gap: 6px 12px; margin: 0 0 14px; }
.layout-switch-label { color: var(--ink-2); font-size: 13px; }
.layout-switch-buttons { display: flex; flex-wrap: wrap; gap: 6px; }
.layout-switch-btn { display: inline-flex; align-items: center; gap: 8px; padding: 4px 11px 4px 4px; border: 1px solid var(--line); border-radius: var(--radius);
  background: var(--surface); color: var(--ink); font: inherit; font-size: 13px; font-weight: 600; line-height: 1.2; cursor: pointer; }
.layout-switch-btn:hover { border-color: var(--line-strong); }
.layout-switch-btn.is-active { border-color: var(--brand); box-shadow: inset 0 0 0 1px var(--brand); background: var(--surface-2); cursor: default; }
.layout-switch-btn:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }
.layout-switch-thumb { display: block; width: 46px; flex: none; overflow: hidden; border: 1px solid var(--line); border-radius: 2px; line-height: 0; }
.layout-switch-thumb .wf { display: block; width: 100%; height: auto; }
.layout-switch-warn { flex: 1 1 100%; align-items: center; flex-wrap: wrap; margin: 4px 0 0; }
.layout-switch-warn .notice-body { flex: 1 1 240px; }
/* the dark top of the workshop look sits against the top of the page; the row above it takes that place */
.layout-switch ~ .fs-layout-workshop .ws-hero { margin-top: 0; }
@media (max-width: 700px) {
  .layout-switch { justify-content: flex-start; }
  .layout-switch-buttons { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); width: 100%; }
  .layout-switch-btn { justify-content: flex-start; }
}

/* ===================================================================== 12 credit deals (acties)
   The banner with the countdown, the pack cards with extra credits, the checkout lines and the admin form. Only the
   portal's own colour tokens are used, so the light and the dark theme both work. */

/* The banner on Buy credits: what the deal is and how long it lasts. */
.deal-banner {
  display: flex; align-items: center; justify-content: space-between; gap: 18px 32px; flex-wrap: wrap;
  padding: 18px 20px; border-radius: var(--radius); background: var(--side); color: var(--side-ink);
  box-shadow: var(--shadow), inset 0 0 0 1px rgba(255, 255, 255, 0.08);
}
.deal-main { flex: 1 1 360px; min-width: 0; display: grid; gap: 6px; justify-items: start; }
.deal-tag {
  display: inline-flex; align-items: center; gap: 6px; padding: 2px 10px 2px 8px; border-radius: 12px;
  background: var(--brand-solid); color: var(--on-brand); font-size: 12.5px; font-weight: 700;
}
.deal-banner h2 { font-size: 20px; line-height: 1.25; font-weight: 700; letter-spacing: -0.01em; }
.deal-banner p { color: var(--side-ink-2); max-width: 62ch; }
.deal-clock { display: grid; gap: 6px; justify-items: end; }
.deal-clock-label { color: var(--side-ink-2); font-size: 12.5px; font-weight: 600; }
.deal-units { display: flex; gap: 8px; }
.deal-units > div { min-width: 60px; padding: 7px 8px 6px; border-radius: var(--radius); background: var(--side-hover); text-align: center; }
.deal-units > div > b { display: block; font-size: 24px; line-height: 1.1; font-weight: 700; font-variant-numeric: tabular-nums; }
.deal-units > div > span { display: block; color: var(--side-ink-2); font-size: 12px; font-weight: 600; }
.deal-clock small { color: var(--side-ink-2); }
.deal-clock.is-over .deal-units { opacity: 0.55; }
@media (max-width: 640px) {
  .deal-banner { padding: 16px; }
  .deal-banner h2 { font-size: 18px; }
  .deal-clock { justify-items: start; width: 100%; }
  .deal-units { width: 100%; }
  .deal-units > div { flex: 1 1 0; min-width: 0; }
}

/* The dashboard: the same deal as one line. */
.deal-slim {
  display: flex; align-items: center; gap: 10px 16px; flex-wrap: wrap; margin-bottom: 16px; padding: 10px 14px;
  border-radius: var(--radius); background: var(--side); color: var(--side-ink); text-decoration: none;
  box-shadow: var(--shadow), inset 0 0 0 1px rgba(255, 255, 255, 0.08);
}
.deal-slim:hover { background: var(--side-hover); }
.deal-slim-text { flex: 1 1 260px; min-width: 0; display: grid; gap: 1px; }
.deal-slim-text b { font-weight: 700; }
.deal-slim-text span { color: var(--side-ink-2); font-size: 12.5px; }
.deal-slim .btn { flex: none; }

/* A package that is part of the deal: the extra credits and what the credit now costs. */
.package-labels { display: flex; flex-wrap: wrap; gap: 4px 6px; }
.package-labels .package-label { margin-bottom: 0; }
.package-label-deal { background: var(--success-bg); color: var(--success-ink); }
.package-bonus {
  display: flex; align-items: flex-start; gap: 8px; padding: 8px 10px; border-radius: var(--radius);
  background: var(--success-bg); color: var(--success-ink); font-weight: 600; line-height: 1.3;
}
.package-bonus .icon { margin-top: 1px; }
.package-bonus small { display: block; font-weight: 500; }
.package .per s { color: var(--ink-3); }

/* Checkout: the extra credits of the order. */
.deal-line { display: flex; align-items: flex-start; gap: 8px; color: var(--success-ink); font-weight: 600; margin-top: 6px; }
.deal-line:empty { display: none; }
.deal-line .icon { margin-top: 2px; }
.deal-line small { display: block; font-weight: 500; }
.deal-total { font-weight: 600; }

/* Admin: the form. */
.input-affix { display: flex; }
.input-affix .input { border-top-right-radius: 0; border-bottom-right-radius: 0; text-align: right; font-variant-numeric: tabular-nums; }
.input-affix > span {
  display: inline-flex; align-items: center; padding: 0 12px; border: 1px solid var(--line-strong); border-left: 0; white-space: nowrap;
  border-radius: 0 var(--radius) var(--radius) 0; background: var(--surface-2); color: var(--ink-2); font-weight: 600;
}
.datetime-pair { display: grid; grid-template-columns: minmax(0, 1fr) 10em; gap: 8px; }
.deal-groups { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 12px; align-items: start; }
.deal-group { border: 1px solid var(--line); border-radius: var(--radius); padding: 12px 14px; display: grid; gap: 10px; align-content: start; }
.deal-group h3 { font-size: 14px; }
.deal-group.is-off { background: var(--surface-2); }
.deal-group .notice { padding: 8px 10px; font-size: 12.5px; gap: 8px; }
.deal-sum { font-size: 14.5px; line-height: 1.55; }
.deal-fine { color: var(--ink-2); font-size: 12.5px; }
.deal-lengths { margin-bottom: 0; }
.deal-cap { max-width: 380px; }
.deal-row {
  display: grid; grid-template-columns: minmax(0, 1fr) auto auto; gap: 4px 16px; padding: 8px 0; border-bottom: 1px solid var(--line);
  font-variant-numeric: tabular-nums;
}
.deal-row > span:nth-child(n+2) { text-align: right; }
.deal-row-head { padding: 0 0 6px; font-size: 12.5px; font-weight: 600; color: var(--ink-2); }
.deal-gets { font-weight: 700; }
.deal-extra { display: block; font-weight: 400; font-size: 12.5px; color: var(--success-ink); }
