/* ==========================================================================
 * DigiSomm platform panel — the owner's working application
 *
 * Rewritten 27 September 2026. One stylesheet, in
 * this order: tokens (day, night, and auto following the device), base, the
 * shell (rail, top bar, phone tab bar), primitives (type, buttons, fields,
 * surfaces, tables, badges), then each page's own parts, the sign-in pages,
 * the QR sticker (identical to the restaurant panel's, asserted by a test),
 * phones and print.
 *
 * Rules of thumb that keep it efficient to use:
 * - one accent (the brand's bordeaux) for what acts and what is current;
 *   green only for "accepted", amber for "look at this", red for "risk";
 * - dense but never cramped: 14px text, 36px controls, 44px on touch;
 * - every surface is a white card on a quiet ground, one border, no shadows
 *   except for what floats (menus, the tab bar, toasts);
 * - the system font of the device: fast, sharp, and nothing to download.
 * ====================================================================== */

:root {
  color-scheme: light;
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI Variable Text", "Segoe UI", Inter, Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-mono: ui-monospace, "SF Mono", SFMono-Regular, Menlo, Consolas, monospace;

  --bg: #f5f3f0;
  --surface: #ffffff;
  --surface-2: #faf8f6;
  --surface-3: #f1ede9;
  --line: #e7e2dd;
  --line-strong: #d5cdc6;
  --text: #1c1917;
  --text-2: #57504b;
  --text-3: #8b847e;

  --accent: #8b1d34;
  --accent-hover: #751629;
  --accent-text: #8b1d34;
  --accent-soft: #f7e9ec;
  --accent-line: #e6c3cb;
  --on-accent: #ffffff;

  --ok: #1d7a4b;
  --ok-soft: #e4f3ea;
  --warn: #8f5b00;
  --warn-soft: #fbf0d9;
  --danger: #b3263a;
  --danger-soft: #fbe8ea;

  --rail-bg: #ffffff;
  --rail-line: #ebe6e1;

  --radius-s: 6px;
  --radius: 10px;
  --radius-l: 14px;
  --shadow-float: 0 1px 2px rgba(28, 25, 23, 0.06), 0 12px 32px -12px rgba(28, 25, 23, 0.28);
  --focus: 0 0 0 3px rgba(139, 29, 52, 0.22);
  --rail-width: 248px;
  --content-width: 1200px;

  /* Names the shared pieces (choice-field.js, the wine card) already read. */
  --ds-surface: var(--surface);
  --ds-surface-2: var(--surface-3);
  --ds-line: var(--line);
  --ds-line-strong: var(--line-strong);
  --ds-text: var(--text);
  --ds-text-muted: var(--text-2);
  --ds-accent: var(--accent-text);
  --ds-accent-soft: var(--accent-soft);
  --ds-radius: var(--radius);
}

/* Night, chosen or followed from the device. */
:root[data-ds-mode="night"] {
  color-scheme: dark;
  --bg: #121011;
  --surface: #1b1819;
  --surface-2: #201c1d;
  --surface-3: #2a2527;
  --line: #2e292a;
  --line-strong: #3f3739;
  --text: #f2edea;
  --text-2: #bdb4af;
  --text-3: #8e8581;
  --accent: #b3344f;
  --accent-hover: #c64260;
  --accent-text: #f09aac;
  --accent-soft: #3a1d25;
  --accent-line: #5a2a36;
  --ok: #6fce9b;
  --ok-soft: #173124;
  --warn: #e7b862;
  --warn-soft: #362a12;
  --danger: #f28c98;
  --danger-soft: #3c1b20;
  --rail-bg: #171415;
  --rail-line: #272223;
  --shadow-float: 0 1px 2px rgba(0, 0, 0, 0.4), 0 16px 40px -12px rgba(0, 0, 0, 0.7);
  --focus: 0 0 0 3px rgba(240, 154, 172, 0.3);
}

@media (prefers-color-scheme: dark) {
  :root:not([data-ds-mode]) {
    color-scheme: dark;
    --bg: #121011;
    --surface: #1b1819;
    --surface-2: #201c1d;
    --surface-3: #2a2527;
    --line: #2e292a;
    --line-strong: #3f3739;
    --text: #f2edea;
    --text-2: #bdb4af;
    --text-3: #8e8581;
    --accent: #b3344f;
    --accent-hover: #c64260;
    --accent-text: #f09aac;
    --accent-soft: #3a1d25;
    --accent-line: #5a2a36;
    --ok: #6fce9b;
    --ok-soft: #173124;
    --warn: #e7b862;
    --warn-soft: #362a12;
    --danger: #f28c98;
    --danger-soft: #3c1b20;
    --rail-bg: #171415;
    --rail-line: #272223;
    --shadow-float: 0 1px 2px rgba(0, 0, 0, 0.4), 0 16px 40px -12px rgba(0, 0, 0, 0.7);
    --focus: 0 0 0 3px rgba(240, 154, 172, 0.3);
  }
}

/* --- Base ----------------------------------------------------------------- */

*,
*::before,
*::after {
  box-sizing: border-box;
}

/* The hidden attribute always wins; several components set a display of
   their own (the catalogue's bulk bar once said "0 geselecteerd" forever). */
[hidden] {
  display: none !important;
}

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  margin: 0;
  color: var(--text);
  background: var(--bg);
  font: 400 14px/1.5 var(--font);
  font-feature-settings: "tnum" 0;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

h1, h2, h3, h4 {
  margin: 0;
  color: var(--text);
  font-weight: 650;
  letter-spacing: -0.012em;
  line-height: 1.25;
  text-wrap: balance;
}

h1 { font-size: 26px; letter-spacing: -0.02em; }
h2 { font-size: 16px; }
h3 { font-size: 15px; }
h4 { font-size: 14px; }

p { margin: 0; }
p + p { margin-top: 8px; }

a { color: var(--accent-text); }

code, kbd, samp {
  font-family: var(--font-mono);
  font-size: 0.9em;
}

code {
  padding: 1px 5px;
  background: var(--surface-3);
  border-radius: 4px;
  overflow-wrap: anywhere;
}

img, svg { max-width: 100%; }

hr {
  height: 1px;
  margin: 20px 0;
  background: var(--line);
  border: 0;
}

:focus-visible {
  outline: 2px solid var(--accent-text);
  outline-offset: 2px;
}

::selection { background: var(--accent-soft); }

.sr-only,
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: fixed;
  z-index: 100;
  top: 8px;
  left: 8px;
  padding: 8px 14px;
  color: var(--on-accent);
  background: var(--accent);
  border-radius: var(--radius-s);
  transform: translateY(-160%);
}

.skip-link:focus { transform: none; }

/* --- Icons: one drawing each, coloured by the text around them ------------- */

.ui-icon {
  display: block;
  flex: 0 0 auto;
  width: 18px;
  height: 18px;
  background: currentColor;
  -webkit-mask: var(--icon) center / contain no-repeat;
  mask: var(--icon) center / contain no-repeat;
}

.ui-icon--dashboard { --icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.7' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3.5' y='3.5' width='7' height='7' rx='1.5'/%3E%3Crect x='13.5' y='3.5' width='7' height='7' rx='1.5'/%3E%3Crect x='3.5' y='13.5' width='7' height='7' rx='1.5'/%3E%3Crect x='13.5' y='13.5' width='7' height='7' rx='1.5'/%3E%3C/svg%3E"); }
.ui-icon--submissions { --icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.7' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M3.5 13.5 6 5h12l2.5 8.5'/%3E%3Cpath d='M3.5 13.5V19a1.5 1.5 0 0 0 1.5 1.5h14a1.5 1.5 0 0 0 1.5-1.5v-5.5h-5a3.5 3.5 0 0 1-7 0z'/%3E%3C/svg%3E"); }
.ui-icon--wine-scans { --icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.7' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M14 3.5H7A1.5 1.5 0 0 0 5.5 5v14A1.5 1.5 0 0 0 7 20.5h10a1.5 1.5 0 0 0 1.5-1.5V8z'/%3E%3Cpath d='M14 3.5V8h4.5'/%3E%3Cpath d='M8.5 12.5h7M8.5 16h5'/%3E%3C/svg%3E"); }
.ui-icon--tenants { --icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.7' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 9.5 5.5 4h13L20 9.5'/%3E%3Cpath d='M4 9.5c0 1.4 1.1 2.5 2.7 2.5S9.3 10.9 9.3 9.5c0 1.4 1.2 2.5 2.7 2.5s2.7-1.1 2.7-2.5c0 1.4 1.1 2.5 2.6 2.5S20 10.9 20 9.5'/%3E%3Cpath d='M5.5 12v8h13v-8'/%3E%3Cpath d='M10 20v-4.5h4V20'/%3E%3C/svg%3E"); }
.ui-icon--catalog { --icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.7' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M10 2.8h4v4.4c0 1 2.5 2 2.5 5V20a1.2 1.2 0 0 1-1.2 1.2H8.7A1.2 1.2 0 0 1 7.5 20v-7.8c0-3 2.5-4 2.5-5z'/%3E%3Cpath d='M7.5 13.5h9'/%3E%3C/svg%3E"); }
.ui-icon--assortments { --icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.7' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M9 6h11M9 12h11M9 18h11'/%3E%3Ccircle cx='4.8' cy='6' r='1.1'/%3E%3Ccircle cx='4.8' cy='12' r='1.1'/%3E%3Ccircle cx='4.8' cy='18' r='1.1'/%3E%3C/svg%3E"); }
.ui-icon--styles { --icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.7' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 3.5a8.5 8.5 0 1 0 0 17c1.2 0 1.8-.8 1.8-1.7 0-1.4-1.3-1.7-1.3-3 0-1 .8-1.8 1.8-1.8h2.2c2.3 0 4-1.7 4-4 0-3.6-3.8-6.5-8.5-6.5z'/%3E%3Ccircle cx='7.5' cy='11' r='1'/%3E%3Ccircle cx='10' cy='7.2' r='1'/%3E%3Ccircle cx='14.6' cy='7.4' r='1'/%3E%3C/svg%3E"); }
.ui-icon--statistics { --icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.7' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 20.5h16'/%3E%3Cpath d='M7 20.5v-6M12 20.5V8M17 20.5v-10'/%3E%3C/svg%3E"); }
.ui-icon--users { --icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.7' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='9' cy='8' r='3.2'/%3E%3Cpath d='M3.5 19c0-3.2 2.5-5.5 5.5-5.5s5.5 2.3 5.5 5.5'/%3E%3Cpath d='M15.5 5.2a3 3 0 0 1 0 5.6'/%3E%3Cpath d='M17.5 13.8c1.8.7 3 2.6 3 5.2'/%3E%3C/svg%3E"); }
/* Beheerders and Activiteit (2 November 2026): a shield, a clock turning back. */
.ui-icon--admins { --icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.7' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 3.5 5 6.2v5.3c0 4.3 3 7.7 7 9 4-1.3 7-4.7 7-9V6.2z'/%3E%3Cpath d='m9 12 2.2 2.2L15.2 10'/%3E%3C/svg%3E"); }
.ui-icon--activity { --icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.7' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 12a8 8 0 1 0 2.3-5.6'/%3E%3Cpath d='M4 4.5V8h3.5'/%3E%3Cpath d='M12 8v4.4l3 1.8'/%3E%3C/svg%3E"); }
.ui-icon--sales { --icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.7' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M3.5 5h17l-6.5 7.6v5.9l-4 1.9v-7.8z'/%3E%3C/svg%3E"); }
.ui-icon--notifications { --icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.7' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 10a6 6 0 0 1 12 0c0 5 2 6.5 2 6.5H4s2-1.5 2-6.5'/%3E%3Cpath d='M10 19.5a2.2 2.2 0 0 0 4 0'/%3E%3C/svg%3E"); }
.ui-icon--search { --icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.7' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='10.5' cy='10.5' r='6'/%3E%3Cpath d='m15 15 5 5'/%3E%3C/svg%3E"); }
.ui-icon--more { --icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.7' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='5.5' cy='12' r='1.3'/%3E%3Ccircle cx='12' cy='12' r='1.3'/%3E%3Ccircle cx='18.5' cy='12' r='1.3'/%3E%3C/svg%3E"); }
.ui-icon--check { --icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.7' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m5 12.5 4.5 4.5L19 7.5'/%3E%3C/svg%3E"); }
.ui-icon--close { --icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.7' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6.5 6.5l11 11M17.5 6.5l-11 11'/%3E%3C/svg%3E"); }
.ui-icon--chevron { --icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.7' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m9 6 6 6-6 6'/%3E%3C/svg%3E"); }
.ui-icon--external { --icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.7' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M14 4.5h5.5V10'/%3E%3Cpath d='M19.5 4.5 11 13'/%3E%3Cpath d='M17 14v4.5A1.5 1.5 0 0 1 15.5 20h-10A1.5 1.5 0 0 1 4 18.5v-10A1.5 1.5 0 0 1 5.5 7H10'/%3E%3C/svg%3E"); }

/* ==========================================================================
 * Shell: the rail on the left, the bar on top, the content in between
 * ====================================================================== */

.cellar-rail {
  position: fixed;
  z-index: 20;
  inset: 0 auto 0 0;
  display: flex;
  flex-direction: column;
  width: var(--rail-width);
  padding: 18px 12px 14px;
  overflow-y: auto;
  background: var(--rail-bg);
  border-right: 1px solid var(--rail-line);
}

.platform-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0 6px 18px;
  padding: 4px 4px;
  color: var(--text);
  text-decoration: none;
  border-radius: var(--radius-s);
}

.platform-brand strong {
  display: block;
  font-size: 15px;
  font-weight: 700;
  letter-spacing: -0.01em;
  line-height: 1.1;
}

.platform-brand small {
  display: block;
  color: var(--text-3);
  font-size: 12px;
}

/* The product mark: the broken drop with both engraved contours, as a mask so
   it takes the accent here and on the sign-in card without a second file. */
.brand-mark {
  display: block;
  width: 34px;
  height: 34px;
  flex: 0 0 auto;
  background: var(--accent-text);
  -webkit-mask: url("digisomm-mark.svg") center / contain no-repeat;
  mask: url("digisomm-mark.svg") center / contain no-repeat;
}

.platform-nav {
  display: grid;
  gap: 1px;
}

.nav-group {
  margin: 14px 10px 4px;
  color: var(--text-3);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.nav-group:first-child { margin-top: 0; }

.platform-nav a {
  position: relative;
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 36px;
  padding: 6px 10px;
  color: var(--text-2);
  font-weight: 500;
  text-decoration: none;
  border-radius: 8px;
}

.platform-nav a .ui-icon { color: var(--text-3); }

.platform-nav a:hover {
  color: var(--text);
  background: var(--surface-3);
}

.platform-nav a[aria-current="page"] {
  color: var(--accent-text);
  font-weight: 600;
  background: var(--accent-soft);
}

.platform-nav a[aria-current="page"] .ui-icon { color: var(--accent-text); }

.nav-badge {
  min-width: 20px;
  margin-left: auto;
  padding: 1px 6px;
  color: var(--on-accent);
  background: var(--accent);
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  line-height: 1.5;
  text-align: center;
}

.rail-foot {
  display: grid;
  gap: 12px;
  margin-top: auto;
  padding-top: 16px;
}

.rail-mode {
  display: grid;
  gap: 6px;
  padding: 0 6px;
}

.rail-mode__label {
  color: var(--text-3);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.mode-switch {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  padding: 3px;
  background: var(--surface-3);
  border-radius: 8px;
}

.mode-switch button {
  min-height: 28px;
  padding: 0 6px;
  color: var(--text-2);
  font: 500 12px/1 var(--font);
  background: transparent;
  border: 0;
  border-radius: 6px;
  cursor: pointer;
}

.mode-switch button[aria-pressed="true"] {
  color: var(--text);
  background: var(--surface);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

.rail-user {
  display: grid;
  grid-template-columns: 30px minmax(0, 1fr);
  align-items: center;
  gap: 2px 10px;
  padding: 10px 6px 0;
  border-top: 1px solid var(--rail-line);
}

.user-monogram {
  display: grid;
  width: 30px;
  height: 30px;
  place-items: center;
  color: var(--accent-text);
  background: var(--accent-soft);
  border-radius: 50%;
  font-size: 13px;
  font-weight: 700;
}

.rail-user-copy { min-width: 0; }
.rail-version { margin: 6px 0 0 12px; color: var(--text-3); font-size: 11px; letter-spacing: .02em; }

.rail-user-copy strong,
.rail-user-copy small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.rail-user-copy strong { font-size: 13px; }
.rail-user-copy small { color: var(--text-3); font-size: 12px; }

.rail-user-actions {
  display: flex;
  grid-column: 2;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px 14px;
}

.rail-user-actions a[aria-current="page"] { color: var(--text); }

.platform-main {
  min-width: 0;
  min-height: 100vh;
  margin-left: var(--rail-width);
}

.page-body {
  width: 100%;
  max-width: var(--content-width);
  margin: 0 auto;
  padding: 24px 32px 64px;
}

/* --- Top bar: a search that is always there, and the environment ---------- */

.utility-bar {
  position: sticky;
  z-index: 15;
  top: 0;
  display: flex;
  align-items: center;
  gap: 14px;
  min-height: 56px;
  padding: 8px 32px;
  /* Opaque on a laptop (12 October 2026): a blurred sticky bar over a long
     table is repainted on every scrolled frame; the glass stays on a phone,
     where the bar is the app's chrome (below, with the tab bar). */
  background: color-mix(in srgb, var(--bg) 97%, transparent);
  border-bottom: 1px solid var(--line);
}

.utility-title {
  display: none;
  min-width: 0;
  overflow: hidden;
  font-size: 15px;
  font-weight: 650;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.rail-toggle {
  display: none;
  width: 38px;
  height: 38px;
  padding: 0;
  color: var(--text);
  background: transparent;
  border: 1px solid var(--line);
  border-radius: 8px;
  cursor: pointer;
}

.rail-toggle span {
  display: block;
  width: 16px;
  height: 1.5px;
  margin: 4px auto;
  background: currentColor;
}

.quick-search {
  position: relative;
  display: flex;
  align-items: center;
  width: min(100%, 380px);
  color: var(--text-3);
}

.quick-search .ui-icon {
  position: absolute;
  left: 11px;
  width: 16px;
  height: 16px;
  pointer-events: none;
}

.quick-search input[type="search"] {
  width: 100%;
  min-height: 36px;
  padding: 6px 34px 6px 34px;
  color: var(--text);
  font: inherit;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 9px;
}

.quick-search input[type="search"]:focus {
  border-color: var(--accent-line);
  outline: 0;
  box-shadow: var(--focus);
}

.quick-search kbd {
  position: absolute;
  right: 8px;
  padding: 0 6px;
  color: var(--text-3);
  font-size: 11px;
  line-height: 18px;
  background: var(--surface-3);
  border-radius: 4px;
  pointer-events: none;
}

.quick-search input:focus + kbd { display: none; }

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

.environment-badge {
  padding: 2px 8px;
  color: var(--warn);
  background: var(--warn-soft);
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.install-app-button {
  min-height: 30px;
  padding: 0 12px;
  color: var(--text);
  font: 600 12px/1 var(--font);
  background: var(--surface);
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  cursor: pointer;
}

/* --- Phone: a tab bar at the thumb, the rail as a drawer ------------------- */

.tab-bar,
.rail-backdrop { display: none; }

/* --- Toasts: what an in-place action reports --------------------------------- */

.toast-region {
  position: fixed;
  z-index: 60;
  right: 20px;
  bottom: 20px;
  display: grid;
  justify-items: end;
  gap: 8px;
  pointer-events: none;
}

.toast {
  max-width: min(420px, calc(100vw - 32px));
  margin: 0;
  padding: 10px 14px;
  color: #fff;
  background: #22201f;
  border-radius: 10px;
  box-shadow: var(--shadow-float);
  font-size: 13px;
  font-weight: 500;
  animation: toast-in 180ms ease-out;
}

.toast--error { background: #9c2033; }

@keyframes toast-in {
  from { opacity: 0; transform: translateY(6px); }
}

/* ==========================================================================
 * Primitives
 * ====================================================================== */

/* --- Page headers ----------------------------------------------------------- */

.page-heading,
.page-intro {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 12px 24px;
  margin: 4px 0 20px;
}

.page-heading > div,
.page-intro > div { min-width: 0; max-width: 72ch; }

.page-heading p,
.page-intro p {
  margin-top: 4px;
  color: var(--text-2);
  font-size: 14px;
}

/* The assortments page puts its intro inside the heading. */
.page-heading .page-intro { margin: 0; }

.page-heading--actions,
.page-heading--split { align-items: flex-end; }

.quick-actions,
.button-row,
.record-actions,
.form-actions,
.review-actions,
.merge-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.section-heading {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px 16px;
  margin-bottom: 12px;
}

.section-count,
.toolbar-status,
.meta,
.table-note,
.utility-label {
  color: var(--text-3);
  font-size: 12px;
}

.utility-label {
  display: block;
  margin-bottom: 2px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.count {
  display: inline-block;
  min-width: 22px;
  margin-left: 6px;
  padding: 0 7px;
  color: var(--text-2);
  background: var(--surface-3);
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  line-height: 20px;
  text-align: center;
  vertical-align: 2px;
}

.hint,
.empty-note,
.proposal-hint {
  margin: 0 0 12px;
  color: var(--text-2);
  font-size: 13px;
}

.empty-state {
  margin: 0;
  padding: 18px;
  color: var(--text-2);
  text-align: center;
  background: var(--surface-2);
  border: 1px dashed var(--line-strong);
  border-radius: var(--radius);
}

.empty-note { color: var(--text-3); }

/* --- Notices ------------------------------------------------------------------ */

.notice {
  margin: 0 0 16px;
  padding: 10px 14px;
  color: var(--text);
  background: var(--surface);
  border: 1px solid var(--line);
  border-left: 3px solid var(--ok);
  border-radius: var(--radius-s);
}

.notice-success { border-left-color: var(--ok); }
.notice--once { border-left-color: var(--warn); background: var(--warn-soft); }

.notice-error,
.error-summary {
  margin: 0 0 16px;
  padding: 12px 14px;
  color: var(--danger);
  background: var(--danger-soft);
  border-radius: var(--radius-s);
}

.error-summary ul { margin: 6px 0 0; padding-left: 18px; }
.error-summary h2 { color: inherit; font-size: 14px; }

.field-error {
  display: block;
  margin-top: 4px;
  color: var(--danger);
  font-size: 12px;
  font-weight: 500;
}

.warning-note,
.warning-line,
.duplicate-warning {
  margin: 0 0 14px;
  padding: 10px 14px;
  color: var(--text);
  background: var(--warn-soft);
  border-radius: var(--radius-s);
  font-size: 13px;
}

.warning-line code { margin-right: 4px; }
.duplicate-warning ul { margin: 6px 0; padding-left: 18px; }
.duplicate-warning p { color: var(--text-2); }

/* --- Links and buttons -------------------------------------------------------- */

.text-link {
  color: var(--accent-text);
  font-weight: 500;
  text-decoration: none;
}

.text-link:hover { text-decoration: underline; text-underline-offset: 3px; }

.primary-button,
.secondary-button,
.risk-button,
.decision-button,
.auth-submit {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 36px;
  padding: 0 14px;
  font: 600 13.5px/1.2 var(--font);
  text-align: center;
  text-decoration: none;
  white-space: nowrap;
  border: 1px solid transparent;
  border-radius: 8px;
  cursor: pointer;
  transition: background-color 120ms, border-color 120ms, color 120ms;
  -webkit-tap-highlight-color: transparent;
}

.primary-button {
  color: var(--on-accent);
  background: var(--accent);
}

.primary-button:hover { background: var(--accent-hover); }

.secondary-button {
  color: var(--text);
  background: var(--surface);
  border-color: var(--line-strong);
}

.secondary-button:hover { background: var(--surface-3); }

.risk-button {
  color: var(--danger);
  background: var(--surface);
  border-color: color-mix(in srgb, var(--danger) 40%, transparent);
}

.risk-button:hover { background: var(--danger-soft); }

.text-button {
  display: inline;
  padding: 0;
  color: var(--accent-text);
  font: 600 13px/1.4 var(--font);
  background: none;
  border: 0;
  cursor: pointer;
}

.text-button:hover { text-decoration: underline; text-underline-offset: 3px; }
.text-button--risk { color: var(--danger); }

:is(.primary-button, .secondary-button, .risk-button, .decision-button):focus-visible {
  outline: 0;
  box-shadow: var(--focus);
}

:is(.primary-button, .secondary-button, .risk-button, .decision-button):disabled {
  cursor: default;
  opacity: 0.55;
}

.summary-action {
  color: var(--accent-text);
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
}

/* --- Fields ------------------------------------------------------------------ */

input:not([type="checkbox"], [type="radio"], [type="file"], [type="hidden"]),
select,
textarea {
  width: 100%;
  min-height: 36px;
  padding: 7px 10px;
  color: var(--text);
  font: 14px/1.4 var(--font);
  background: var(--surface);
  border: 1px solid var(--line-strong);
  border-radius: 8px;
}

textarea { min-height: 84px; resize: vertical; }

select {
  padding-right: 30px;
  appearance: none;
  background-image: linear-gradient(45deg, transparent 50%, var(--text-3) 50%), linear-gradient(135deg, var(--text-3) 50%, transparent 50%);
  background-position: calc(100% - 15px) 52%, calc(100% - 10px) 52%;
  background-size: 5px 5px;
  background-repeat: no-repeat;
}

input:not([type="checkbox"], [type="radio"], [type="file"]):focus,
select:focus,
textarea:focus {
  border-color: var(--accent-line);
  outline: 0;
  box-shadow: var(--focus);
}

input::placeholder,
textarea::placeholder { color: var(--text-3); }

input[type="checkbox"],
input[type="radio"] {
  width: 16px;
  height: 16px;
  margin: 0;
  accent-color: var(--accent);
}

input[type="file"] { font: 13px var(--font); color: var(--text-2); }

.field,
:is(.stack-form, .compact-form, .filter-bar, .record-form) > label:not(.import-confirmation, .file-drop, .auth-checkbox) {
  display: grid;
  align-content: start;
  gap: 5px;
  min-width: 0;
  color: var(--text-2);
  font-size: 12.5px;
  font-weight: 600;
}

.field > span:first-child small,
.field small,
.stack-form small {
  color: var(--text-3);
  font-weight: 400;
}

.field > small { font-size: 12px; font-weight: 400; }

.field--full,
.field--wide { grid-column: 1 / -1; }

.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px 16px;
  margin-bottom: 16px;
}

.form-grid--two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.form-grid--three { grid-template-columns: repeat(3, minmax(0, 1fr)); }

.entity-form,
.stack-form {
  display: grid;
  gap: 14px;
}

.entity-form > .form-grid { margin-bottom: 0; }

/* A form's button is as wide as its words, at the start, where the eye ends. */
:is(.entity-form, .stack-form, .compact-form, .record-form, .inline-form) > :is(button, .primary-button, .secondary-button, .text-button) {
  justify-self: start;
}
.entity-form--compact { gap: 12px; }

.compact-form {
  display: grid;
  gap: 10px;
  padding: 12px 0 4px;
}

.inline-form,
.record-form {
  display: grid;
  gap: 10px;
}

.form-actions {
  justify-content: space-between;
  padding-top: 14px;
  border-top: 1px solid var(--line);
}

.form-actions p {
  max-width: 60ch;
  color: var(--text-2);
  font-size: 12.5px;
}

.conditional-fields { display: grid; gap: 14px; }

.choice-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 10px;
  margin: 0;
  padding: 0;
  border: 0;
}

.choice-cards legend {
  margin-bottom: 8px;
  padding: 0;
  color: var(--text-2);
  font-size: 12.5px;
  font-weight: 600;
}

.choice-cards label {
  position: relative;
  display: block;
  cursor: pointer;
}

.choice-cards input {
  position: absolute;
  top: 14px;
  left: 14px;
}

.choice-cards label > span {
  display: grid;
  gap: 2px;
  height: 100%;
  padding: 12px 14px 12px 40px;
  background: var(--surface);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
}

.choice-cards strong { font-size: 14px; }
.choice-cards small { color: var(--text-2); font-size: 12.5px; }

.choice-cards input:checked + span {
  background: var(--accent-soft);
  border-color: var(--accent-line);
}

.theme-choice-grid { grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); }

.import-confirmation {
  display: flex;
  font-weight: 400;
  align-items: flex-start;
  gap: 10px;
  padding: 12px 14px;
  color: var(--text-2);
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: var(--radius-s);
  font-size: 13px;
}

.import-confirmation input { margin-top: 2px; }

.file-drop {
  position: relative;
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px;
  background: var(--surface-2);
  border: 1px dashed var(--line-strong);
  border-radius: var(--radius);
  cursor: pointer;
}

.file-drop:hover { border-color: var(--accent-line); background: var(--accent-soft); }

.file-drop input {
  position: absolute;
  inset: 0;
  width: 100%;
  opacity: 0;
  cursor: pointer;
}

.file-drop > span:not(.file-drop__mark) { display: grid; gap: 2px; }
.file-drop small { color: var(--text-3); font-size: 12px; }

.file-drop__mark {
  display: grid;
  width: 36px;
  height: 36px;
  flex: 0 0 auto;
  place-items: center;
  color: var(--accent-text);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 50%;
  font-size: 16px;
  font-weight: 700;
}

.selected-file {
  margin: -6px 0 0;
  color: var(--text-3);
  font-size: 12px;
}

/* --- Filters: one row above a list ------------------------------------------ */

.filter-bar {
  display: grid;
  grid-template-columns: minmax(220px, 2fr) repeat(auto-fit, minmax(150px, 1fr));
  align-items: end;
  gap: 10px;
  margin: 0 0 16px;
  padding: 12px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.filter-bar > .secondary-button,
.filter-bar > .primary-button { align-self: end; }
.filter-bar--compact { grid-template-columns: minmax(200px, 1fr) auto; }

.search-field { position: relative; }

/* --- Surfaces ---------------------------------------------------------------- */

.panel,
.data-panel,
.record-card,
.attention-ledger,
.audit-ledger,
.upload-vault,
.approved-styles,
.deployed-theme-panel,
.collection-import-card,
.contract-ledger,
.assortment-context,
.catalog-edit-panel,
.proposal,
.push-panel {
  margin: 0 0 16px;
  padding: 18px 20px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-l);
}

.panel > h2,
.data-panel > h2,
.record-list > h2,
.proposal-section > h2 {
  margin-bottom: 12px;
}

.record-list,
.proposal-section { margin: 0 0 28px; }

.record-list > h2,
.proposal-section > h2 {
  display: flex;
  align-items: center;
  font-size: 15px;
}

.record-card header {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 4px 12px;
  margin-bottom: 10px;
}

.record-card header strong { font-size: 15px; }

.two-column {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  align-items: start;
}

.two-column > .panel { margin-bottom: 0; }
.two-column + .panel,
.two-column + section { margin-top: 16px; }

/* Label and value, side by side. */
.detail-list {
  display: grid;
  gap: 0;
  margin: 0 0 12px;
}

.detail-list > div {
  display: grid;
  grid-template-columns: minmax(120px, 34%) minmax(0, 1fr);
  gap: 12px;
  padding: 8px 0;
  border-bottom: 1px solid var(--line);
}

.detail-list > div:last-child { border-bottom: 0; }
.detail-list dt { color: var(--text-2); font-size: 13px; }
.detail-list dd { margin: 0; min-width: 0; overflow-wrap: anywhere; }

.submission-note {
  margin: 10px 0 0;
  padding: 8px 12px;
  color: var(--text-2);
  background: var(--surface-2);
  border-left: 3px solid var(--line-strong);
  border-radius: 0 var(--radius-s) var(--radius-s) 0;
  font-size: 13px;
}

/* --- Disclosures: a row that opens into its form ----------------------------- */

.creation-drawer,
.inline-editor,
.category-ledger__item,
.assigned-wine-row {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-l);
}

.creation-drawer { margin: 0 0 16px; }

.creation-drawer > summary,
.inline-editor > summary,
.category-ledger__item > summary,
.assigned-wine-row > summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 48px;
  padding: 10px 16px;
  list-style: none;
  cursor: pointer;
  border-radius: inherit;
}

:is(.creation-drawer, .inline-editor, .category-ledger__item, .assigned-wine-row) > summary::-webkit-details-marker { display: none; }

:is(.creation-drawer, .inline-editor, .category-ledger__item, .assigned-wine-row) > summary:hover { background: var(--surface-2); }

:is(.creation-drawer, .inline-editor, .category-ledger__item, .assigned-wine-row) > summary > span:first-child {
  display: grid;
  min-width: 0;
}

:is(.creation-drawer, .inline-editor, .category-ledger__item) > summary small {
  color: var(--text-3);
  font-size: 12px;
}

:is(.creation-drawer, .inline-editor, .category-ledger__item, .assigned-wine-row)[open] > summary {
  border-bottom: 1px solid var(--line);
  border-radius: var(--radius-l) var(--radius-l) 0 0;
}

:is(.creation-drawer, .inline-editor, .category-ledger__item, .assigned-wine-row)[open] .summary-action { color: var(--text-3); }

.creation-drawer > :not(summary) { margin: 16px; }

.inline-editor { border-radius: var(--radius); }
.inline-editor > summary { min-height: 40px; padding: 6px 10px; }
.inline-editor > :not(summary) { margin: 0 10px 10px; }

/* --- Tables ------------------------------------------------------------------ */

.table-wrap,
.table-scroll {
  max-width: 100%;
  overflow-x: auto;
}

.data-table,
.panel table,
.data-panel table,
.catalog-edit-panel table,
.merge-form table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13.5px;
}

:is(.data-table, .panel table, .data-panel table, .catalog-edit-panel table, .merge-form table) th {
  padding: 8px 10px;
  color: var(--text-3);
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: 0.03em;
  text-align: left;
  text-transform: uppercase;
  white-space: nowrap;
  background: var(--surface-2);
  border-bottom: 1px solid var(--line);
}

:is(.data-table, .panel table, .data-panel table, .catalog-edit-panel table, .merge-form table) td {
  padding: 10px;
  vertical-align: top;
  border-bottom: 1px solid var(--line);
}

:is(.data-table, .panel table, .data-panel table) tbody tr:last-child td { border-bottom: 0; }
.data-table tbody tr:hover td { background: var(--surface-2); }

:is(.data-table, .panel table, .data-panel table) td small {
  display: block;
  color: var(--text-3);
  font-size: 12px;
}

.table-note { display: block; }

/* --- Badges and marks --------------------------------------------------------- */

.status-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 2px 8px;
  color: var(--text-2);
  background: var(--surface-3);
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  line-height: 1.5;
  white-space: nowrap;
}

.status-badge--approved,
.status-badge--live,
.status-badge--active,
.status-badge--customer { color: var(--ok); background: var(--ok-soft); }

.status-badge--flagged,
.status-badge--received,
.status-badge--pending,
.status-badge--trial { color: var(--warn); background: var(--warn-soft); }

.status-badge--demo { color: var(--accent-text); background: var(--accent-soft); }

.status-badge--closed,
.status-badge--archived,
.status-badge--rejected,
.status-badge--inactive { color: var(--text-3); background: var(--surface-3); }

/* An invoice past its due date and not paid (Billit's reading). */
.status-badge--overdue { color: var(--danger); background: var(--danger-soft); }

/* The wine's colour as a small disc. */
.wine-type-mark {
  display: inline-block;
  width: 10px;
  height: 10px;
  flex: 0 0 auto;
  background: #9a8f85;
  border-radius: 50%;
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.12);
}

.wine-type-mark--red { background: #8b2f3c; }
.wine-type-mark--white { background: #e2cd84; }
.wine-type-mark--rose { background: #e8a4ae; }
.wine-type-mark--sparkling { background: #efe2ae; }
.wine-type-mark--orange { background: #d98b3a; }
.wine-type-mark--sweet,
.wine-type-mark--dessert { background: #c9892b; }
.wine-type-mark--fortified { background: #6b3f2a; }

.tenant-seal,
.collection-type-mark {
  display: inline-block;
  width: 4px;
  align-self: stretch;
  min-height: 34px;
  flex: 0 0 auto;
  background: var(--ok);
  border-radius: 4px;
}

.tenant-seal--demo,
.collection-type-mark--demo { background: var(--accent-text); }
.collection-type-mark--tenant { background: var(--ok); }

/* ==========================================================================
 * Pages
 * ====================================================================== */

/* --- Overzicht: the work first ------------------------------------------------ */

.attention-ledger { padding: 6px 8px; }

.attention-ledger .section-heading { margin: 10px 12px 6px; }

.attention-row {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  color: var(--text-2);
  text-decoration: none;
  border-radius: var(--radius);
}

.attention-row:hover { background: var(--surface-2); }
.attention-row > span:nth-child(2) { display: grid; }
.attention-row strong { color: var(--text); font-size: 14px; }
.attention-row small { color: var(--text-3); font-size: 12.5px; }
.attention-row > span:last-child { color: var(--text-3); }

.attention-count {
  display: grid;
  height: 36px;
  place-items: center;
  color: var(--text-3);
  background: var(--surface-3);
  border-radius: 9px;
  font-size: 15px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.attention-row--waiting .attention-count {
  color: var(--on-accent);
  background: var(--accent);
}

.attention-row--waiting > span:last-child { color: var(--accent-text); }

.work-ledger .empty-state { margin: 4px 12px 12px; }

.dashboard-actions { margin: 0 0 16px; }

.metric-flight {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin: 0 0 16px;
}

.metric {
  display: grid;
  gap: 2px;
  padding: 14px 16px;
  color: var(--text);
  text-decoration: none;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-l);
}

.metric:hover { border-color: var(--line-strong); }

.metric strong {
  font-size: 26px;
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.1;
  font-variant-numeric: tabular-nums;
}

.metric span { color: var(--text-2); font-size: 13px; }

.audit-list {
  display: grid;
  margin: 0;
  padding: 0;
  list-style: none;
}

.audit-list li {
  display: grid;
  grid-template-columns: 8px minmax(0, 1fr) auto;
  align-items: baseline;
  gap: 12px;
  padding: 9px 0;
  border-bottom: 1px solid var(--line);
}

.audit-list li:last-child { border-bottom: 0; }
.audit-list li > span:nth-child(2) { display: grid; min-width: 0; }
.audit-list strong { font-size: 13.5px; font-weight: 600; }
.audit-list small { color: var(--text-3); font-size: 12px; }
.audit-list time { color: var(--text-3); font-size: 12px; white-space: nowrap; }

.audit-dot {
  width: 7px;
  height: 7px;
  background: var(--line-strong);
  border-radius: 50%;
}

/* --- Inzendingen: every change on one line, one click each ------------------ */

.proposal { padding: 0; overflow: hidden; }

.proposal.is-busy { opacity: 0.6; pointer-events: none; }

.proposal.is-leaving {
  opacity: 0;
  transform: translateX(12px);
  transition: opacity 240ms ease, transform 240ms ease;
}

.proposal-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px 20px;
  padding: 16px 20px 14px;
}

.proposal-title { min-width: 0; }

.proposal-title h3 { font-size: 16px; }

.proposal-title h3 a {
  color: var(--text);
  text-decoration: none;
}

.proposal-title h3 a:hover { color: var(--accent-text); }

.proposal-title p {
  margin: 2px 0 0;
  color: var(--text-2);
  font-size: 13px;
}

.proposal-byline { color: var(--text-3) !important; }
.proposal-byline strong { color: var(--text-2); font-weight: 600; }

.proposal-bulk {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.proposal > .proposal-hint,
.proposal > .submission-note,
.proposal > .change-flag,
.proposal > .duplicate-warning,
.proposal > .proposal-bulk { margin: 0 20px 16px; }

.change-list {
  margin: 0;
  padding: 0;
  list-style: none;
  border-top: 1px solid var(--line);
}

.change {
  display: grid;
  grid-template-columns: minmax(120px, 170px) minmax(0, 1fr) auto;
  grid-template-areas:
    "field values actions"
    ".     context actions";
  align-items: center;
  gap: 4px 16px;
  padding: 12px 20px;
  border-bottom: 1px solid var(--line);
}

.change:last-child { border-bottom: 0; }

.change-field {
  grid-area: field;
  color: var(--text-2);
  font-size: 13px;
  font-weight: 600;
}

.change-values {
  grid-area: values;
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 4px 10px;
  min-width: 0;
  font-size: 14px;
}

.change-values del {
  color: var(--text-3);
  text-decoration: line-through;
  text-decoration-color: color-mix(in srgb, var(--text-3) 70%, transparent);
}

.change-values ins {
  padding: 1px 6px;
  color: var(--text);
  font-weight: 600;
  text-decoration: none;
  background: var(--ok-soft);
  border-radius: 4px;
}

.change-arrow { color: var(--text-3); }

/* A description is a paragraph, not a word: the old above the new. */
.change--long .change-values {
  display: grid;
  gap: 6px;
}

.change--long .change-arrow { display: none; }

.change--long .change-values del,
.change--long .change-values ins {
  display: block;
  padding: 8px 10px;
  border-radius: var(--radius-s);
  line-height: 1.5;
}

.change--long .change-values del { background: var(--surface-2); }
.change--long .change-values ins { font-weight: 500; }

.change-context {
  grid-area: context;
  display: flex;
  flex-wrap: wrap;
  gap: 4px 10px;
}

.change-context:empty { display: none; }

.change-flag {
  display: inline-block;
  color: var(--text-2);
  font-size: 12px;
}

.change-flag--warn {
  padding: 1px 7px;
  color: var(--warn);
  background: var(--warn-soft);
  border-radius: 4px;
  font-weight: 600;
}

.change-history,
.judgement-history {
  color: var(--text-3);
  font-size: 12px;
}

.change-actions { grid-area: actions; }

.change-actions form {
  display: flex;
  gap: 6px;
}

.decision-button {
  min-height: 34px;
  padding: 0 12px;
  color: var(--text-2);
  background: var(--surface);
  border-color: var(--line-strong);
}

.decision-button:hover { color: var(--text); background: var(--surface-3); }

.decision-button--accept {
  color: #fff;
  background: var(--ok);
  border-color: var(--ok);
}

:root[data-ds-mode="night"] .decision-button--accept { color: #0d1f15; }
@media (prefers-color-scheme: dark) { :root:not([data-ds-mode]) .decision-button--accept { color: #0d1f15; } }

.decision-button--accept:hover {
  color: #fff;
  background: color-mix(in srgb, var(--ok) 88%, #000);
}

.decision-done {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 0 10px;
  color: var(--text-3);
  font-size: 13px;
  font-weight: 600;
}

.decision-done--accepted { color: var(--ok); }

.change--accepted,
.change--ignored { background: var(--surface-2); }

.change--accepted .change-values,
.change--ignored .change-values { opacity: 0.6; }

/* --- Catalogue --------------------------------------------------------------- */

.workbench-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin: 0 0 12px;
}

.toolbar-status { margin-left: auto; }

.colour-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 0 0 12px;
}

.colour-tab {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 32px;
  padding: 0 12px;
  color: var(--text-2);
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 999px;
}

.colour-tab:hover { border-color: var(--line-strong); }

.colour-tab--active {
  color: var(--accent-text);
  background: var(--accent-soft);
  border-color: var(--accent-line);
}

.colour-tab .count { margin-left: 0; background: transparent; }

.bulk-bar {
  position: sticky;
  z-index: 5;
  top: 64px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin: 0 0 10px;
  padding: 8px 10px 8px 14px;
  color: #fff;
  background: #22201f;
  border-radius: var(--radius);
  box-shadow: var(--shadow-float);
}

.bulk-bar .secondary-button { color: #fff; background: rgba(255, 255, 255, 0.08); border-color: rgba(255, 255, 255, 0.2); }
.bulk-bar .risk-button { color: #ffb4bd; background: transparent; border-color: rgba(255, 180, 189, 0.4); }

.catalog-table-wrap,
form[data-bulk-form] > .table-scroll {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-l);
}

.cb-col { width: 36px; }

.row-title {
  color: var(--text);
  font-weight: 600;
  text-decoration: none;
}

.row-title:hover { color: var(--accent-text); }

.row--flagged td:first-child { box-shadow: inset 3px 0 0 var(--warn); }
.row--inactive td { color: var(--text-3); }

.row-actions {
  white-space: nowrap;
}

.row-actions a + a { margin-left: 12px; }

.conflict-mark {
  display: inline-block;
  margin-top: 4px;
  color: var(--warn);
  font-size: 12px;
  font-weight: 600;
  text-decoration: none;
}

/* The owner's own star on a catalogue row (12 October 2026): a bookmark,
   nothing else reads it. Quiet until starred. */
.fav-form { display: inline; }
.fav-toggle {
  display: inline-grid;
  place-items: center;
  width: 28px;
  height: 28px;
  margin: -4px 4px -4px -6px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: var(--text-2);
  font-size: 16px;
  line-height: 1;
  cursor: pointer;
  vertical-align: middle;
}
.fav-toggle:hover, .fav-toggle:focus-visible { background: var(--surface-2); color: var(--text); }
.fav-toggle[aria-pressed="true"] { color: var(--accent); }

.export-fields {
  margin: 0;
  padding: 12px 14px;
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.export-fields legend {
  padding: 0 4px;
  color: var(--text-2);
  font-size: 12.5px;
  font-weight: 600;
}

.export-field-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 6px 14px;
  margin: 0;
  padding: 0;
  border: 0;
}

.export-field-grid label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
}

/* The catalogue's wine form: the same fields as every panel (WineFields). */
.wine-fact-group {
  min-width: 0;
  margin: 0 0 18px;
  padding: 0;
  border: 0;
}

.wine-fact-group > legend {
  margin: 0 0 10px;
  padding: 0;
  font-size: 14px;
  font-weight: 650;
}

.score-flight {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin: 0 0 16px;
  padding: 0;
  border: 0;
}

.score-flight legend {
  margin-bottom: 8px;
  padding: 0;
  font-size: 14px;
  font-weight: 650;
}

.score-flight label { display: grid; gap: 5px; color: var(--text-2); font-size: 12.5px; font-weight: 600; }
.score-flight label span small { color: var(--text-3); font-weight: 400; }

/* The proposal for the four scores, under the scales: one line, one button,
   the reasons folded. Spans the fieldset's four columns. */
.structure-suggestion { grid-column: 1 / -1; display: grid; gap: 8px; margin-top: 4px; }
.structure-suggestion .hint { margin: 0; }

/* Afgeleide waarden nakijken (13 October 2026): one row per wine whose scales
   or region an import derived; the five values in place, the proposal's
   reasons beside them, Opslaan and Klopt. */
.derived-intro { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px 20px; }
.derived-intro .hint { flex: 1 1 420px; margin: 0; }
.derived-all { flex: none; margin: 0; }
.derived-profile { margin: 0 0 10px; }
.derived-list { display: grid; gap: 12px; }
.derived-list > .record-card { margin: 0; }
.derived-card header { align-items: flex-start; margin-bottom: 12px; }
.derived-card header > div { display: grid; gap: 2px; min-width: 0; }
.derived-card header small { color: var(--text-3); font-size: 12.5px; }
.derived-since { flex: none; padding: 3px 9px; border-radius: 999px; background: var(--accent-soft); color: var(--accent-text); font-size: 12px; font-weight: 600; }
.derived-form { display: grid; gap: 12px; }
.derived-fields { display: grid; grid-template-columns: minmax(150px, 1.2fr) minmax(150px, 1.2fr) repeat(4, minmax(88px, 1fr)); gap: 12px; align-items: end; }
.derived-fields .field { display: grid; gap: 5px; font-size: 12.5px; font-weight: 600; color: var(--text-2); }
.derived-fields .field > span { display: flex; align-items: baseline; gap: 6px; white-space: nowrap; }
.derived-fields .field em { font-style: normal; font-size: 11px; font-weight: 600; letter-spacing: 0.02em; text-transform: uppercase; color: var(--accent-text); }
.derived-fields .field.is-derived input { border-color: var(--accent); background: color-mix(in srgb, var(--accent-soft) 45%, var(--surface)); }
.derived-fields input[type="number"] { font-variant-numeric: tabular-nums; }
.derived-why { margin-top: 0; }
.derived-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; }
.derived-confirm { display: none; }
@media (max-width: 860px) {
  .derived-fields { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
.structure-suggestion [data-structure-actions] { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; }
.structure-reasons { font-size: 12.5px; color: var(--text-2); }
.structure-reasons summary { cursor: pointer; color: var(--accent); font-weight: 600; }
.structure-reasons ul { margin: 6px 0 0; padding-left: 18px; display: grid; gap: 3px; }
.structure-reasons li { line-height: 1.45; }

.wine-engine-tags {
  margin: 0 0 16px;
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.wine-engine-tags > summary {
  padding: 10px 14px;
  color: var(--text-2);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
}

.wine-engine-tags > :not(summary) { margin: 0 14px 14px; }

.profile-tags { display: grid; gap: 8px; min-width: 0; padding: 0; border: 0; }
.profile-tags legend { margin: 0 0 4px; padding: 0; color: var(--text-2); font-size: 13px; font-weight: 600; }
.profile-tags legend small { display: block; font-weight: 400; }
.profile-tag { display: flex; align-items: flex-start; gap: 10px; padding: 8px 10px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-s); cursor: pointer; }
.profile-tag input { flex: none; margin: 2px 0 0; }
.profile-tag strong { display: block; font-size: 13.5px; }
.profile-tag small { display: block; color: var(--text-2); font-size: 12.5px; }
.profile-tag:has(input:checked) { border-color: var(--accent); background: var(--accent-soft); }
/* What the card reads as by itself (WineProfile::reading), ticked on its own. */
.profile-tag-derived { margin-left: 4px; color: var(--text-2); font-size: 11.5px; font-style: normal; font-weight: 500; }
.profile-tag-derived[hidden] { display: none; }
.profile-tags .hint { margin: 0; }

/* --- Tenants ------------------------------------------------------------------ */

.tenant-identity {
  display: flex;
  align-items: stretch;
  gap: 10px;
}

.tenant-identity > span:last-child { display: grid; gap: 1px; min-width: 0; }
.tenant-identity strong { font-size: 14px; }
.tenant-identity small { color: var(--text-3); font-size: 12px; }

.logo-preview {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 8px 0;
}

.logo-preview img {
  max-width: 120px;
  max-height: 56px;
  padding: 6px;
  object-fit: contain;
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: var(--radius-s);
}

.logo-preview small { color: var(--text-3); font-size: 12px; }

.branding-form,
.logo-form { min-width: 240px; }

.compact-form--status { min-width: 180px; }

.sommelier-url {
  margin: 0 0 6px;
  font-size: 15px;
  overflow-wrap: anywhere;
}

.colour-summary {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 10px 0 0;
}

.colour-count-pill {
  padding: 2px 10px;
  color: var(--text-2);
  background: var(--surface-3);
  border-radius: 999px;
  font-size: 12px;
}

.submission-list {
  display: grid;
  margin: 0;
  padding: 0;
  list-style: none;
}

.submission-list li {
  padding: 10px 0;
  border-top: 1px solid var(--line);
}

.submission-list li:first-child { border-top: 0; }

.once-password {
  display: inline-block;
  margin: 6px 0;
  padding: 8px 12px;
  font-family: var(--font-mono);
  font-size: 16px;
  letter-spacing: 0.04em;
  background: var(--surface);
  border: 1px dashed var(--line-strong);
  border-radius: var(--radius-s);
  user-select: all;
}

/* The temporary password as a field with Kopiëren beside it (2 November 2026:
   the text could not be copied on a phone). */
.once-copy { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 8px 0; }
.once-copy .once-password { flex: 1 1 240px; min-width: 0; max-width: 420px; margin: 0; color: var(--text); }

.swatch-inline {
  display: inline-block;
  width: 16px;
  height: 16px;
  margin-right: 6px;
  vertical-align: -3px;
}

/* A button that reads as a link (tenant access: Loskoppelen, invitations). */
button.text-link {
  padding: 0;
  font: 600 13px/1.4 var(--font);
  background: none;
  border: 0;
  cursor: pointer;
}

/* Inside a table cell the access controls sit in a row, not a stack. */
td > .compact-form {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 12px;
  padding: 0;
}

td > .compact-form + .compact-form { margin-top: 6px; }

/* A heading that follows a form inside the same card starts a new part. */
.panel > h3 { margin: 22px 0 6px; }
.panel > h3 + p { margin-bottom: 12px; color: var(--text-2); font-size: 13px; }
.panel > h2 + p:not([class]) { margin-bottom: 12px; color: var(--text-2); font-size: 13px; }
.panel > .creation-drawer,
.panel > details { margin: 0 0 8px; }

.swatch-chip.swatch-inline {
  display: inline-block;
  width: 16px;
  height: 16px;
  margin-right: 6px;
  vertical-align: -3px;
  box-shadow: none;
}

/* --- Assortments ------------------------------------------------------------ */

.assortment-selector { margin: 0 0 16px; }

.assortment-selector__grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.assortment-scope-card {
  display: grid;
  grid-template-columns: 4px minmax(0, 1fr);
  gap: 10px 14px;
  padding: 16px 18px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-l);
}

.assortment-scope-card > :not(.collection-type-mark) { grid-column: 2; }
.assortment-scope-card .collection-type-mark { grid-row: 1 / span 4; }
.assortment-scope-card p { color: var(--text-2); font-size: 13px; }
.assortment-scope-card .secondary-button { justify-self: start; }

.assortment-context {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px 20px;
}

.assortment-context h2 { font-size: 20px; }
.assortment-context p { margin-top: 2px; color: var(--text-2); font-size: 13px; }

.assortment-context__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.publish-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px 20px;
  margin: 0 0 16px;
  padding: 14px 18px;
  background: var(--warn-soft);
  border-radius: var(--radius-l);
}

.publish-bar-copy strong { display: block; font-size: 14px; }

.publish-bar-copy span {
  display: block;
  max-width: 72ch;
  margin-top: 2px;
  color: var(--text-2);
  font-size: 12.5px;
}

.assortment-management-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.6fr) minmax(260px, 1fr);
  gap: 16px;
  align-items: start;
}

.assortment-management-grid > * { margin-bottom: 0; }
.assortment-management-grid + .data-panel { margin-top: 16px; }

.category-ledger {
  display: grid;
  gap: 8px;
  margin: 0 0 16px;
}

.category-ledger__item { border-radius: var(--radius); }
.category-ledger__item > summary { min-height: 42px; padding: 8px 12px; }
.category-ledger__item > form { margin: 12px; }

.assigned-wine-list {
  display: grid;
  gap: 6px;
}

.assigned-wine-row { border-radius: var(--radius); }

.assigned-wine-row > summary {
  display: grid;
  grid-template-columns: 10px minmax(0, 1fr) auto auto auto;
  gap: 12px;
  min-height: 48px;
  padding: 8px 14px;
}

.assigned-wine-row__identity { display: grid; min-width: 0; }
.assigned-wine-row__identity strong { font-size: 14px; }
.assigned-wine-row__identity small { overflow: hidden; color: var(--text-3); font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
.assigned-wine-row__category { color: var(--text-2); font-size: 12.5px; }
.assigned-wine-row > form { margin: 14px; }

.collection-workspace {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(240px, 1fr);
  gap: 16px;
  align-items: start;
  margin-top: 16px;
}

.collection-workspace > * { margin-bottom: 0; }
.collection-import-card h2,
.contract-ledger h2 { margin-bottom: 6px; }
.collection-import-card > p,
.contract-ledger > p { margin-bottom: 12px; color: var(--text-2); font-size: 13px; }

.contract-ledger dl { display: grid; gap: 8px; margin: 12px 0; }
.contract-ledger dt { font-size: 13px; font-weight: 600; }
.contract-ledger dd { margin: 0; color: var(--text-2); font-size: 13px; }

.assortment-empty-state { text-align: center; }
.assortment-empty-state p { color: var(--text-2); }

/* --- Themes -------------------------------------------------------------------- */

.style-custody-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  align-items: start;
}

.style-custody-grid > * { margin-bottom: 0; }
.style-custody-grid + * { margin-top: 16px; }

.upload-vault h2,
.approved-styles h2 { margin-bottom: 6px; }
.upload-vault > p,
.approved-styles > p { margin-bottom: 12px; color: var(--text-2); font-size: 13px; }

.theme-publication-steps {
  margin: 0 0 14px;
  padding-left: 20px;
  color: var(--text-2);
  font-size: 13px;
  line-height: 1.7;
}

.stylesheet-preview {
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
}

.result-line { margin-bottom: 10px; font-size: 13px; }

.swatch-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 0 0 16px;
}

.swatch {
  display: grid;
  width: 72px;
  justify-items: center;
  gap: 4px;
}

.swatch-chip {
  display: block;
  width: 100%;
  height: 32px;
  border-radius: 6px;
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.08);
}

.swatch-name {
  width: 100%;
  overflow: hidden;
  color: var(--text-3);
  font-family: var(--font-mono);
  font-size: 10px;
  text-align: center;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.deployed-theme-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 12px;
}

.deployed-theme-grid > article {
  display: grid;
  gap: 8px;
  align-content: start;
  padding: 16px;
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.deployed-theme-grid > article > div:first-child {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.style-index {
  color: var(--text-3);
  font-family: var(--font-mono);
  font-size: 13px;
}

.palette-codes {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}

.palette-codes code { font-size: 11px; }

.registry-detail { color: var(--text-3); font-size: 12.5px; }

.review-form { display: grid; gap: 8px; min-width: 220px; }
.review-form--table textarea { min-height: 56px; }
.hash-fragment { font-size: 11.5px; }

/* --- Statistics ---------------------------------------------------------------- */

.stat-tiles {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 12px;
  margin: 0 0 12px;
}

.stat-tile {
  display: grid;
  gap: 2px;
  padding: 14px 16px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-l);
}

.stat-value {
  font-size: 26px;
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.1;
  font-variant-numeric: tabular-nums;
}

.stat-label { color: var(--text-2); font-size: 13px; }

.stat-bar-row {
  display: grid;
  grid-template-columns: minmax(0, 160px) minmax(0, 1fr) 48px;
  align-items: center;
  gap: 14px;
  padding: 6px 0;
}

.stat-bar-label {
  overflow: hidden;
  font-size: 13px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* A <progress>, because a style attribute is refused by this panel's CSP. */
.stat-bar-track {
  width: 100%;
  height: 8px;
  overflow: hidden;
  appearance: none;
  background: var(--surface-3);
  border: 0;
  border-radius: 999px;
}

.stat-bar-track::-webkit-progress-bar { background: var(--surface-3); border-radius: 999px; }
.stat-bar-track::-webkit-progress-value { background: var(--accent); border-radius: 999px; }
.stat-bar-track::-moz-progress-bar { background: var(--accent); border-radius: 999px; }

.stat-bar-value {
  color: var(--text-2);
  font-size: 12.5px;
  text-align: right;
  font-variant-numeric: tabular-nums;
}

/* --- Duplicates and merging ---------------------------------------------------- */

.duplicate-cluster + .duplicate-cluster { margin-top: 16px; }

.merge-choice td:first-child,
.merge-choice td:nth-child(2),
.merge-choice th:first-child,
.merge-choice th:nth-child(2) {
  width: 1%;
  text-align: center;
  white-space: nowrap;
}

.merge-actions { margin-top: 12px; }
.merge-actions small { color: var(--text-3); font-size: 12px; }

/* The plan is the loudest thing on the page: it is the last thing between a
   click and rows that stop existing. */
.merge-plan { border-left: 3px solid var(--danger); }
.merge-plan h3 { margin: 18px 0 8px; font-size: 14px; }
.merge-effects { margin: 0 0 16px; padding-left: 20px; line-height: 1.7; }
/* Per restaurant what the merge does with its listings (listingPlan). */
.merge-listings { margin: 0 0 12px; padding-left: 20px; line-height: 1.6; }
.merge-listings li + li { margin-top: 4px; }
.merge-listing-line { display: block; color: var(--text-2); }
.merge-confirm-why { flex-basis: 100%; margin: 0; }

.merge-confirm {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 12px;
  padding: 14px;
  background: var(--danger-soft);
  border-radius: var(--radius);
}

.merge-confirm label { display: grid; gap: 5px; font-size: 12.5px; font-weight: 600; }
.merge-confirm input[type="text"] { min-width: 220px; }

.fill-score {
  display: inline-block;
  padding: 1px 8px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.fill-score--high { color: var(--ok); background: var(--ok-soft); }
.fill-score--mid { color: var(--text-2); background: var(--surface-3); }
.fill-score--low { color: var(--danger); background: var(--danger-soft); }

.compare-table th[scope="row"] { font-weight: 600; white-space: nowrap; }
.compare-table td,
.compare-table th { vertical-align: top; }
.compare-differs > * { background: var(--accent-soft) !important; }
.compare-keep { box-shadow: inset 2px 0 0 var(--ok), inset -2px 0 0 var(--ok); }
.compare-result { font-weight: 600; background: var(--surface-2); }
.compare-result small { display: block; color: var(--text-3); font-size: 11px; font-weight: 400; }

.pick-cell {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  margin: -6px;
  padding: 6px;
  border-radius: var(--radius-s);
  cursor: pointer;
}

.pick-cell:hover { background: var(--surface-3); }
.pick-empty { color: var(--text-3); }

.rehearsal {
  margin: 0 0 14px;
  padding: 10px 14px;
  border-radius: var(--radius-s);
  font-size: 13px;
}

.rehearsal--ok { color: var(--ok); background: var(--ok-soft); }
.rehearsal--fail { color: var(--danger); background: var(--danger-soft); }
.rehearsal p { margin: 0; }
.rehearsal p + p { margin-top: 6px; }

.conflict-appellation { font-weight: 600; }

/* --- Sent-in wine lists ----------------------------------------------------------- */

.scan-card header { align-items: center; }
.scan-note { margin: 6px 0 10px; color: var(--text-2); font-size: 13px; }

.scan-tally {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
  gap: 10px;
  margin: 0 0 14px;
}

.scan-tally > div {
  padding: 10px 12px;
  background: var(--surface-2);
  border-radius: var(--radius-s);
}

.scan-tally dt { color: var(--text-2); font-size: 12px; }
.scan-tally dd { margin: 2px 0 0; font-size: 20px; font-weight: 700; }

.scan-pages {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 10px;
  margin: 0 0 16px;
}

.scan-page {
  display: grid;
  gap: 6px;
  padding: 10px;
  color: var(--text);
  text-decoration: none;
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  font-size: 13px;
}

.scan-page img {
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  border-radius: var(--radius-s);
}

.scan-page--gone { color: var(--text-3); border-style: dashed; }
.scan-summary { margin-bottom: 14px; }
.scan-finish,
.scan-reject { margin-top: 16px; padding-top: 16px; border-top: 1px solid var(--line); }

/* --- Meldingen -------------------------------------------------------------------- */

.push-panel h2 { margin: 0 0 8px; }
.push-state { margin: 0 0 12px; font-weight: 600; }
.push-hint { margin: 0 0 12px; color: var(--text-2); }
.push-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.push-heading { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 6px; }
.push-heading h2 { margin: 0; }
.push-devices { margin: 0; padding: 0; list-style: none; }
.push-devices li { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 0; border-top: 1px solid var(--line); }
.push-devices li > span { display: grid; gap: 2px; min-width: 0; }
.push-devices small { color: var(--text-3); font-size: 12px; }

/* --- Error page --------------------------------------------------------------------- */

.error-page {
  max-width: 560px;
  margin: 40px auto;
  padding: 28px;
  text-align: center;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-l);
}

.error-code {
  display: block;
  margin-bottom: 8px;
  color: var(--accent-text);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.06em;
}

.error-page p { margin: 8px 0 16px; color: var(--text-2); }
.request-reference { color: var(--text-3); font-family: var(--font-mono); font-size: 12px; }

/* The QR page: the card (one SVG, drawn by server/assets/qr-card.js and the
   same file that is downloaded) beside its choices and the downloads. Both
   panels carry these rules; tests/qr-code.test.js holds them to it. */
.qr-generator {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(300px, 1fr);
  gap: 18px 24px;
  align-items: start;
  max-width: 1100px;
  margin: 0 0;
  padding-bottom: 40px;
}

.qr-preview-stage {
  position: sticky;
  top: 16px;
  display: grid;
  min-height: 520px;
  place-items: center;
  padding: clamp(20px, 4vw, 52px);
  background-color: var(--surface-3);
  background-image: radial-gradient(color-mix(in srgb, var(--text-3) 30%, transparent) 1px, transparent 1px);
  background-size: 18px 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius-l);
}

.qr-poster {
  display: grid;
  width: min(100%, 480px);
  aspect-ratio: 1;
  place-items: center;
  overflow: hidden;
  /* The die-cut radius belongs to the artwork (88 of 1080). */
  border-radius: 8.15%;
  /* A sticker lying flat on the card: an edge, no halo around it. */
  box-shadow: 0 0 0 1px rgba(23, 32, 35, 0.1), 0 1px 3px rgba(23, 32, 35, 0.12);
  print-color-adjust: exact;
}

/* The round sticker is cut as a circle (qr-card.js sets data-shape). */
.qr-poster[data-shape="round"] {
  border-radius: 50%;
}

.qr-poster > svg {
  display: block;
  width: 100%;
  height: 100%;
}

.qr-poster-pending {
  color: var(--text-2);
  font-size: 0.8rem;
}

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

.qr-style-form,
.qr-action-panel {
  display: grid;
  gap: 14px;
  padding: 18px 20px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-l);
}

.qr-style-form h2,
.qr-action-panel h2,
.qr-action-panel p {
  margin: 0;
}

.qr-style-form h2,
.qr-action-panel h2 {
  font-size: 1rem;
}

.qr-action-panel > div:first-child p {
  margin-top: 4px;
  color: var(--text-2);
  font-size: 0.8rem;
}

.qr-choice {
  display: grid;
  gap: 6px;
  min-width: 0;
  margin: 0;
  padding: 0;
  border: 0;
}

.qr-choice legend {
  margin-bottom: 6px;
  padding: 0;
  color: var(--text-2);
  font-size: 0.78rem;
  font-weight: 600;
}

.qr-choice:disabled {
  opacity: 0.45;
}

.qr-choice-options {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.qr-option {
  position: relative;
  display: inline-flex;
  cursor: pointer;
}

.qr-option input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.qr-option span {
  padding: 7px 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  font-size: 0.85rem;
}

.qr-option input:checked + span {
  color: var(--accent-text);
  background: var(--accent-soft);
  border-color: var(--accent-text);
  font-weight: 600;
}

.qr-option input:focus-visible + span {
  outline: 2px solid var(--accent-text);
  outline-offset: 2px;
}

.qr-option input:disabled + span {
  cursor: not-allowed;
  opacity: 0.45;
}

.qr-text-field {
  display: grid;
  gap: 5px;
}

.qr-text-field span {
  color: var(--text-2);
  font-size: 0.78rem;
  font-weight: 600;
}

.qr-text-field input {
  width: 100%;
  min-height: 40px;
  padding: 8px 10px;
  font: inherit;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.qr-colour-field {
  display: inline-flex;
  gap: 8px;
  align-items: center;
  font-size: 0.8rem;
}

.qr-colour-field input {
  width: 40px;
  height: 32px;
  padding: 2px;
  cursor: pointer;
  background: none;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.qr-font-fields {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  min-width: 0;
  margin: 0;
  padding: 0;
  border: 0;
}

.qr-font-fields legend {
  grid-column: 1 / -1;
  margin-bottom: 6px;
  padding: 0;
  color: var(--text-2);
  font-size: 0.78rem;
  font-weight: 600;
}

.qr-font-fields:disabled { opacity: 0.45; }

/* A choice the chosen look or shape does not use: dimmed, still sent. */
.qr-unused { opacity: 0.45; }

.qr-text-field select {
  width: 100%;
  min-height: 40px;
  padding: 8px 10px;
  font: inherit;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
}

.qr-adjusted:empty { display: none; }

.qr-note {
  margin: 0;
  color: var(--text-2);
  font-size: 0.78rem;
}

.qr-notice,
.qr-error {
  margin: 0;
  padding: 10px 12px;
  border-radius: 8px;
  font-size: 0.85rem;
}

.qr-notice { color: var(--ok); background: var(--ok-soft); }
.qr-error { color: var(--danger); background: color-mix(in srgb, var(--danger) 10%, transparent); }

.qr-style-form > .primary-button {
  justify-self: start;
}

.qr-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.qr-actions button:disabled {
  cursor: wait;
  opacity: 0.5;
}

.qr-status {
  color: var(--text-2);
  font-size: 0.76rem;
}

.qr-target {
  grid-column: 1 / -1;
  margin: 0;
  color: var(--text-2);
  font-size: 0.76rem;
  text-align: center;
}

.qr-target a {
  color: inherit;
  overflow-wrap: anywhere;
}

.qr-noscript {
  grid-column: 1 / -1;
  margin: 0;
  color: var(--danger);
}

@media (max-width: 900px) {
  .qr-generator {
    grid-template-columns: minmax(0, 1fr);
  }

  .qr-preview-stage {
    position: static;
    min-height: 0;
    padding: 18px;
  }
}

@media print {
  .qr-generator {
    display: block;
    width: 105mm;
    max-width: none;
    margin: 0 auto;
    padding: 0;
  }

  .qr-preview-stage {
    position: static;
    min-height: 0;
    padding: 0;
    background: #fff;
    border: 0;
  }

  .qr-poster {
    width: 105mm;
    height: 105mm;
    box-shadow: none;
    break-inside: avoid;
    page-break-inside: avoid;
  }
}


/* A value chosen from a list (server/assets/choice-field.js): grapes one by
   one as chips, a country or appellation as one field; the options open
   under it. The same rules in every panel that loads the script. */
.choice { position: relative; min-width: 0; }
.choice-multiple { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; min-height: 46px; padding: 6px 8px; background: var(--ds-surface); border: 1px solid var(--ds-line-strong); border-radius: var(--ds-radius); cursor: text; }
.choice-multiple:focus-within { border-color: var(--ds-accent); box-shadow: 0 0 0 3px var(--ds-accent-soft); }
.choice-chips { display: contents; margin: 0; padding: 0; list-style: none; }
.choice-chips li { display: inline-flex; align-items: center; gap: 2px; min-height: 32px; padding: 0 4px 0 12px; background: var(--ds-accent-soft); color: var(--ds-text); border-radius: 999px; font-size: 15px; font-weight: 500; }
.choice-remove { display: inline-grid; place-items: center; width: 28px; height: 28px; margin: 0; padding: 0; background: transparent; border: 0; border-radius: 999px; color: var(--ds-text-muted); font-size: 18px; line-height: 1; cursor: pointer; }
.choice-remove:hover { background: var(--ds-surface); color: var(--ds-text); }
.choice-multiple .choice-input { flex: 1 1 120px; min-width: 120px; min-height: 32px; margin: 0; padding: 4px; background: transparent; border: 0; box-shadow: none; outline: 0; font-size: 16px; }
/* A blend's shares, in a panel of their own under the grapes (14 October
   2026: a number field inside the chip was too cramped).
   The chip only says the share; the panel holds a bar of the blend and one
   row per grape with a stepper. The number is written into the field's value
   as "Merlot 60 %", which the server reads. */
.choice-chips .choice-chip-share { margin-left: 6px; padding: 1px 7px; border-radius: 999px; background: var(--ds-surface); color: var(--ds-text-muted); font-size: 12px; font-weight: 600; font-variant-numeric: tabular-nums; }
.choice-blend { margin-top: 8px; }
.choice-blend[hidden] { display: none; }
.choice-blend-open { display: inline-flex; align-items: center; gap: 6px; min-height: 36px; margin: 0; padding: 0 2px; border: 0; background: transparent; color: var(--ds-accent); font: inherit; font-size: 14px; font-weight: 600; cursor: pointer; }
.choice-blend-open span { display: inline-grid; place-items: center; width: 22px; height: 22px; border-radius: 999px; background: var(--ds-accent-soft); font-size: 15px; line-height: 1; }
.choice-blend-open small { color: var(--ds-text-muted); font-size: 12px; font-weight: 400; }
.choice-blend.is-open { padding: 14px 14px 12px; border: 1px solid var(--ds-line); border-radius: var(--ds-radius); background: var(--ds-surface); }
.choice-blend-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 10px; margin-bottom: 10px; }
.choice-blend-title { font-size: 14px; font-weight: 600; color: var(--ds-text); }
.choice-blend-total { order: 3; flex-basis: 100%; color: var(--ds-text-muted); font-size: 13px; font-variant-numeric: tabular-nums; }
.choice-blend-total.is-over { color: var(--ds-danger, #a3242c); font-weight: 600; }
.choice-blend-clear { margin: 0 0 0 auto; padding: 4px 2px; border: 0; background: transparent; color: var(--ds-text-muted); font: inherit; font-size: 13px; text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
.choice-blend-bar { display: block; width: 100%; height: 10px; border-radius: 999px; background: var(--ds-line); overflow: hidden; }
.choice-blend-seg { fill: var(--ds-accent); transition: fill-opacity .2s ease; }
.choice-blend-seg.seg-2 { fill: color-mix(in srgb, var(--ds-accent) 68%, var(--ds-surface)); }
.choice-blend-seg.seg-3 { fill: color-mix(in srgb, var(--ds-accent) 44%, var(--ds-surface)); }
.choice-blend-seg.seg-4 { fill: color-mix(in srgb, var(--ds-accent) 28%, var(--ds-text-muted)); }
.choice-blend-seg.seg-5 { fill: color-mix(in srgb, var(--ds-accent) 16%, var(--ds-text-muted)); }
.choice-blend-seg.is-derived { fill-opacity: .32; }
.choice-blend-rows { margin: 10px 0 0; padding: 0; list-style: none; }
.choice-blend-rows li { display: flex; align-items: center; gap: 10px; min-height: 48px; border-top: 1px solid var(--ds-line); }
.choice-blend-rows li:first-child { border-top: 0; }
.choice-blend-dot { flex: none; width: 10px; height: 10px; }
.choice-blend-name { flex: 1; min-width: 0; overflow-wrap: anywhere; font-size: 15px; font-weight: 500; color: var(--ds-text); }
.choice-blend-stepper { display: inline-flex; flex: none; align-items: center; height: 38px; border-radius: 999px; background: var(--ds-accent-soft); }
.choice-blend-step { display: inline-grid; place-items: center; width: 38px; height: 38px; margin: 0; padding: 0; border: 0; border-radius: 999px; background: transparent; color: var(--ds-text); font: inherit; font-size: 19px; line-height: 1; cursor: pointer; touch-action: manipulation; }
.choice-blend-step:active { background: color-mix(in srgb, var(--ds-accent) 14%, transparent); }
body .choice-blend .choice-blend-stepper input.choice-share { width: 3.4ch; min-width: 0; min-height: 0; height: 30px; margin: 0; padding: 0; border: 0; border-radius: 0; background: transparent; box-shadow: none; outline: 0; color: var(--ds-text); font-size: 16px; font-weight: 600; font-variant-numeric: tabular-nums; text-align: right; }
body .choice-blend .choice-blend-stepper input.choice-share:focus { outline: 0; border: 0; box-shadow: none; }
.choice-blend-stepper .choice-share::placeholder { color: var(--ds-text-muted); opacity: .6; font-weight: 500; }
.choice-blend-stepper .choice-share-unit { margin: 0 2px 0 3px; color: var(--ds-text-muted); font-size: 14px; }
.choice-blend-stepper:focus-within { box-shadow: 0 0 0 2px var(--ds-accent); }
.choice-blend-note { margin: 8px 0 0; color: var(--ds-text-muted); font-size: 12.5px; line-height: 1.45; }
.grape-shares { margin: 6px 0 0; }
.grape-shares-warning { font-weight: 600; }
.choice-options { position: absolute; z-index: 30; top: calc(100% + 4px); left: 0; right: 0; max-height: 280px; margin: 0; padding: 4px; overflow-y: auto; overscroll-behavior: contain; list-style: none; background: var(--ds-surface); border: 1px solid var(--ds-line-strong); border-radius: var(--ds-radius); box-shadow: 0 12px 32px rgba(20, 16, 14, 0.16); }
.choice-options[hidden] { display: none; }
.choice-option { display: flex; justify-content: space-between; align-items: center; gap: 12px; min-height: 44px; padding: 8px 12px; border-radius: calc(var(--ds-radius) - 2px); color: var(--ds-text); font-size: 15px; font-weight: 400; cursor: pointer; }
.choice-option small { color: var(--ds-text-muted); font-size: 12px; }
.choice-option[aria-selected="true"] { background: var(--ds-accent-soft); }
@media (hover: hover) { .choice-option:hover { background: var(--ds-surface-2); } }
.choice-option-new { border-top: 1px solid var(--ds-line); margin-top: 4px; color: var(--ds-accent); font-weight: 600; }
.choice-empty { padding: 10px 12px; color: var(--ds-text-muted); font-size: 14px; }
/* A field the script filled in (the region, from the appellation) lights up for a
   moment, with a line saying where it came from. */
.choice-filled { animation: choice-filled 1.6s ease-out; }
@keyframes choice-filled { from { background-color: var(--ds-accent-soft); border-color: var(--ds-accent); } }
.choice-fill-note { margin: 6px 0 0; color: var(--ds-text-muted); font-size: 13px; font-weight: 400; }
.choice-fill-note[hidden] { display: none; }
.choice-fill-pick { min-height: 32px; margin: 4px 4px 0 0; padding: 4px 12px; background: var(--ds-surface); border: 1px solid var(--ds-line-strong); border-radius: 999px; color: var(--ds-text); font-size: 13px; font-weight: 600; cursor: pointer; }
.choice-fill-pick:hover { border-color: var(--ds-accent); }
@media (prefers-reduced-motion: reduce) { .choice-filled { animation: none; } }

/* ==========================================================================
 * Unified authentication and in-rail appearance controls
 *
 * The sign-in pages: one card on the quiet ground, always by day. The markup
 * contract (.auth-*) is shared with the restaurant panel.
 * ====================================================================== */

body.entry-shell::after,
body.login-shell::after {
  content: none;
}

.login-main {
  display: grid;
  min-height: 100vh;
  min-height: 100dvh;
  place-items: center;
  padding: clamp(16px, 4vw, 40px);
  background: var(--bg);
}

.auth-card {
  position: relative;
  z-index: 1;
  width: min(100%, 420px);
  padding: clamp(24px, 5vw, 36px);
  color: var(--text);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 18px;
  box-shadow: 0 1px 2px rgba(28, 25, 23, 0.04), 0 24px 48px -24px rgba(28, 25, 23, 0.2);
}

.auth-card--wide { width: min(100%, 640px); }

.auth-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 26px;
}

.auth-brand .brand-mark { width: 34px; height: 34px; }
.auth-brand > span:last-child { display: grid; gap: 1px; }
.auth-brand strong { font-size: 16px; font-weight: 700; line-height: 1.1; }
.auth-brand small { color: var(--text-3); font-size: 12px; }

.auth-card h1 { font-size: 24px; }

.auth-intro {
  margin: 6px 0 0;
  color: var(--text-2);
  line-height: 1.55;
}

.auth-step {
  margin: 0 0 6px;
  color: var(--accent-text);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.auth-form {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 6px;
  margin-top: 22px;
}

.auth-field {
  display: block;
  color: var(--text-2);
  font-size: 13px;
  font-weight: 600;
}

.auth-form > input:not([type="hidden"]) {
  position: relative;
  min-height: 44px;
  margin: 0 0 8px;
  font-size: 16px;
  pointer-events: auto;
}

.auth-submit {
  width: 100%;
  min-height: 44px;
  margin-top: 6px;
  color: var(--on-accent);
  font-size: 15px;
  background: var(--accent);
}

.auth-submit:hover { background: var(--accent-hover); }

.auth-checkbox {
  display: flex;
  align-items: center;
  gap: 9px;
  margin: 4px 0 2px;
  color: var(--text);
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
}

.auth-checkbox input { width: 18px; height: 18px; }

.auth-error,
.auth-card .notice-error {
  margin: 18px 0 0;
  padding: 10px 12px;
  color: var(--danger);
  background: var(--danger-soft);
  border-radius: var(--radius-s);
  font-size: 13.5px;
}

.auth-note {
  margin: 18px 0 0;
  color: var(--text-3);
  font-size: 12.5px;
  line-height: 1.5;
}

.auth-form .auth-note { margin: -2px 0 10px 27px; }

.auth-secret,
.mfa-secret {
  display: grid;
  gap: 8px;
  margin: 16px 0 0;
  padding: 14px;
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.auth-secret code,
.mfa-secret code {
  font-size: 15px;
  letter-spacing: 0.08em;
  overflow-wrap: anywhere;
}

.auth-secret details summary { color: var(--accent-text); font-size: 13px; font-weight: 600; cursor: pointer; }

.owner-recovery-codes {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 8px;
  margin: 16px 0;
  padding: 0;
  list-style: none;
}

.owner-recovery-codes li,
.owner-recovery-codes code {
  display: block;
  padding: 8px 10px;
  font-family: var(--font-mono);
  font-size: 14px;
  text-align: center;
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: var(--radius-s);
}

/* ==========================================================================
 * Narrower screens
 * ====================================================================== */

@media (max-width: 1100px) {
  .page-body { padding: 20px 24px 56px; }
  .utility-bar { padding: 8px 24px; }
  .assortment-management-grid,
  .collection-workspace,
  .style-custody-grid { grid-template-columns: 1fr; }
  .form-grid--three { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* Below 860px the rail is a drawer, and a tab bar sits at the thumb. */
@media (max-width: 860px) {
  .cellar-rail {
    z-index: 40;
    width: min(300px, 86vw);
    padding-bottom: calc(14px + env(safe-area-inset-bottom, 0px));
    box-shadow: var(--shadow-float);
    transform: translateX(-105%);
    transition: transform 200ms ease;
  }

  .rail-is-open .cellar-rail { transform: none; }

  .rail-backdrop:not([hidden]) {
    position: fixed;
    z-index: 35;
    inset: 0;
    display: block;
    background: rgba(18, 16, 17, 0.42);
  }

  .platform-main { margin-left: 0; }

  .utility-bar {
    min-height: 52px;
    padding: 6px 16px;
    padding-top: max(6px, env(safe-area-inset-top, 0px));
  }

  .utility-title { display: block; flex: 1 1 auto; }
  .quick-search { display: none; }
  .utility-actions { margin-left: 0; }

  .page-body { padding: 16px 16px calc(100px + env(safe-area-inset-bottom, 0px)); }

  .page-heading,
  .page-intro { margin-top: 0; }

  h1 { font-size: 22px; }

  .tab-bar {
    position: fixed;
    z-index: 30;
    right: max(10px, env(safe-area-inset-right, 0px));
    bottom: calc(10px + env(safe-area-inset-bottom, 0px));
    left: max(10px, env(safe-area-inset-left, 0px));
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    padding: 5px;
    background: color-mix(in srgb, var(--surface) 90%, transparent);
    border: 1px solid var(--line);
    border-radius: 24px;
    box-shadow: var(--shadow-float);
    -webkit-backdrop-filter: saturate(1.6) blur(18px);
    backdrop-filter: saturate(1.6) blur(18px);
  }

  .tab-bar > a,
  .tab-bar > button {
    position: relative;
    display: grid;
    justify-items: center;
    align-content: center;
    gap: 3px;
    min-width: 0;
    min-height: 52px;
    padding: 5px 2px;
    color: var(--text-3);
    font: 500 10.5px/1.1 var(--font);
    text-decoration: none;
    background: none;
    border: 0;
    border-radius: 19px;
    cursor: pointer;
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
  }

  .tab-bar .ui-icon { width: 22px; height: 22px; }

  .tab-label {
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .tab-bar [aria-current="page"] {
    color: var(--accent-text);
    font-weight: 650;
    background: var(--accent-soft);
  }

  .tab-bar > :active .ui-icon { transform: scale(0.88); }

  .tab-badge {
    position: absolute;
    top: 3px;
    left: calc(50% + 5px);
    min-width: 17px;
    padding: 0 5px;
    color: var(--on-accent);
    background: var(--accent);
    border: 2px solid var(--surface);
    border-radius: 999px;
    font-size: 10px;
    font-weight: 700;
    line-height: 13px;
    text-align: center;
  }

  .toast-region {
    right: 16px;
    bottom: calc(86px + env(safe-area-inset-bottom, 0px));
    left: 16px;
    justify-items: center;
  }

  /* Surfaces: a little tighter, still cards. */
  .panel, .data-panel, .record-card, .attention-ledger, .audit-ledger,
  .upload-vault, .approved-styles, .deployed-theme-panel, .collection-import-card,
  .contract-ledger, .assortment-context, .catalog-edit-panel, .push-panel {
    padding: 14px;
    border-radius: 12px;
  }

  .proposal { border-radius: 12px; }

  .form-grid,
  .form-grid--two,
  .form-grid--three,
  .two-column,
  .assortment-selector__grid,
  .score-flight { grid-template-columns: minmax(0, 1fr); }

  .filter-bar { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .filter-bar > .search-field { grid-column: 1 / -1; }
  .filter-bar > button { grid-column: 1 / -1; }
  .filter-bar--compact { grid-template-columns: minmax(0, 1fr); }

  .metric-flight { gap: 8px; }
  .metric { padding: 12px; }
  .metric strong { font-size: 22px; }
  .metric span { font-size: 12px; }

  .detail-list > div { grid-template-columns: minmax(0, 1fr); gap: 2px; }

  /* A proposal's change: the values, then its two buttons under them. */
  .change {
    grid-template-columns: minmax(0, 1fr);
    grid-template-areas: "field" "values" "context" "actions";
    gap: 6px;
    padding: 12px 14px;
  }

  .change-actions form { display: grid; grid-template-columns: 1fr 1fr; }
  .change-actions .decision-button { min-height: 42px; }
  .proposal-head { padding: 14px; }
  .proposal-bulk { width: 100%; display: grid; grid-template-columns: 1fr 1fr; }
  .proposal-bulk > * { min-height: 42px; }
  .proposal > .proposal-hint,
  .proposal > .submission-note,
  .proposal > .change-flag,
  .proposal > .duplicate-warning,
  .proposal > .proposal-bulk { margin: 0 14px 14px; width: auto; }

  /* Tables become cards: each row a block, the cells in their own order. */
  .table-scroll { overflow-x: visible; }
  .data-table,
  .data-table tbody,
  .data-table tr,
  .data-table td { display: block; width: auto; }
  .data-table thead { display: none; }
  /* table.data-table: stronger than the desktop cell rules above. */
  table.data-table tr { padding: 12px 4px; border-bottom: 1px solid var(--line); }
  table.data-table tbody tr:last-child { border-bottom: 0; }
  table.data-table td { padding: 2px 0; border: 0; overflow-wrap: anywhere; }
  table.data-table td:empty { display: none; }
  table.data-table tbody tr:hover td { background: transparent; }

  table.catalog-table tr {
    display: grid;
    grid-template-columns: 28px minmax(0, 1fr) auto;
    grid-template-areas:
      "check wine   wine"
      "check type   state"
      "check grapes grapes"
      "check origin origin"
      "check linked actions";
    align-items: start;
    gap: 2px 10px;
    padding: 12px;
  }

  .catalog-table td:nth-child(1) { grid-area: check; padding-top: 3px; }
  table.catalog-table tr.row--flagged { box-shadow: inset 3px 0 0 var(--warn); }
  table.catalog-table .row--flagged td:first-child { box-shadow: none; }
  .catalog-table td:nth-child(2) { grid-area: wine; }
  .catalog-table td:nth-child(3) { grid-area: grapes; color: var(--text-2); font-size: 13px; }
  .catalog-table td:nth-child(4) { grid-area: type; font-size: 13px; }
  .catalog-table td:nth-child(5) { grid-area: origin; color: var(--text-2); font-size: 13px; }
  .catalog-table td:nth-child(6) { grid-area: state; justify-self: end; }
  .catalog-table td:nth-child(7) { grid-area: linked; color: var(--text-3); font-size: 12.5px; }
  .catalog-table td:nth-child(7)::before { content: "Gevoerd door "; }
  .catalog-table td:nth-child(8) { grid-area: actions; justify-self: end; }
  .catalog-table td small { display: inline; margin-left: 4px; }
  .catalog-table td:nth-child(2) small { display: block; margin-left: 0; }

  .workbench-toolbar > .secondary-button { padding: 0 11px; }
  .toolbar-status { width: 100%; margin-left: 0; }
  .bulk-bar { top: 58px; }

  .assigned-wine-row > summary { grid-template-columns: 10px minmax(0, 1fr) auto; }
  .assigned-wine-row__category { display: none; }
  .assigned-wine-row > summary .summary-action { display: none; }

  .stat-bar-row { grid-template-columns: minmax(0, 110px) minmax(0, 1fr) 40px; gap: 10px; }

}

@media (max-width: 860px) and (prefers-reduced-motion: reduce) {
  .cellar-rail { transition: none; }
}

@media (prefers-reduced-motion: reduce) {
  .toast { animation: none; }
  .proposal.is-leaving { transition: none; }
}

/* ==========================================================================
 * Print: only the QR sticker prints
 * ====================================================================== */

@media print {
  .cellar-rail,
  .utility-bar,
  .tab-bar,
  .no-print {
    display: none !important;
  }

  body { background: #fff; }
  .platform-main { margin: 0; }
  .page-body { padding: 0; }
  /* The card itself: with the other QR rules above. */
}

/* --- View tabs (partials/tabs.php) ------------------------------------------- */

/* Scrolls sideways only (14 October 2026: on a phone the row also
   moved up and down while swiping between a restaurant's tabs). overflow-x
   alone makes overflow-y auto too, and the current tab's line reached 1px
   below the row, so the row could scroll that pixel vertically. The base line
   is an inset shadow, painted under the tabs, so nothing reaches past the row
   and overflow-y can be hidden; a sideways swipe does not pass to the page. */
.view-tabs {
  display: flex;
  gap: 4px;
  margin: 0 0 16px;
  overflow-x: auto;
  overflow-y: hidden;
  overscroll-behavior-x: contain;
  scrollbar-width: none;
  box-shadow: inset 0 -1px 0 var(--line);
}

.view-tabs::-webkit-scrollbar { display: none; }

.view-tabs a {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 8px 12px;
  color: var(--text-2);
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
  border-bottom: 2px solid transparent;
  flex: none;
}

.view-tabs a:hover { color: var(--text); }
.view-tabs a[aria-current="page"] { color: var(--accent-text); border-bottom-color: var(--accent); }

/* ==========================================================================
 * Statistics (templates/statistics.php, src/Chart.php)
 * ====================================================================== */

.segmented {
  display: inline-flex;
  padding: 3px;
  background: var(--surface-3);
  border-radius: 9px;
}

.segmented a {
  padding: 6px 12px;
  color: var(--text-2);
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
  border-radius: 7px;
}

.segmented a[aria-current="page"] {
  color: var(--text);
  background: var(--surface);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

/* The period on Gebruik (25 October 2026: an evening, hours, days or a
   span): the day presets, the
   two evenings and "Eigen periode" in one row that scrolls sideways on a
   phone, as the view tabs do (overflow-y hidden, the sideways swipe kept to
   the row). The form for a span by hand is positioned against the outer
   wrapper, not the scrolling row, so the row's overflow cannot clip it. */
.period-chooser {
  position: relative;
  max-width: 100%;
}

.period-row {
  display: flex;
  gap: 4px;
  padding: 3px;
  background: var(--surface-3);
  border-radius: 9px;
  overflow-x: auto;
  overflow-y: hidden;
  overscroll-behavior-x: contain;
  scrollbar-width: none;
}

.period-row::-webkit-scrollbar { display: none; }

.period-row > a,
.period-row summary {
  flex: none;
  padding: 6px 12px;
  color: var(--text-2);
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
  border-radius: 7px;
  cursor: pointer;
  list-style: none;
}

.period-row summary::-webkit-details-marker { display: none; }

/* The fold is static on purpose: its form is positioned against the wrapper. */
.period-custom { position: static; flex: none; }

.period-row > a[aria-current="page"],
.period-row summary.is-current,
.period-custom[open] > summary {
  color: var(--text);
  background: var(--surface);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

.period-form {
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  left: 0;
  z-index: 5;
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 8px 12px;
  margin-left: auto;
  padding: 12px;
  max-width: 560px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 10px;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.12);
}

.period-field {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 68px;
  gap: 6px;
  align-items: center;
  flex: 1 1 200px;
}

.period-field > span {
  grid-column: 1 / -1;
  color: var(--text-2);
  font-size: 12.5px;
  font-weight: 600;
}

.period-form .hint {
  flex-basis: 100%;
  margin: 0;
  font-size: 12.5px;
}

.period-note { margin: -8px 0 16px; font-size: 13px; }

/* What stands out: sentences before numbers. */
.insights {
  margin: 0 0 16px;
  padding: 16px 20px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-l);
}

.insights h2 { margin-bottom: 10px; font-size: 15px; }
.insights ul { display: grid; gap: 8px; margin: 0; padding: 0; list-style: none; }

.insight {
  position: relative;
  padding-left: 18px;
  color: var(--text);
  font-size: 14px;
}

.insight::before {
  position: absolute;
  top: 7px;
  left: 2px;
  width: 8px;
  height: 8px;
  content: "";
  background: var(--text-3);
  border-radius: 50%;
}

.insight--good::before { background: var(--ok); }
.insight--warn::before { background: var(--warn); }
.insight--info::before { background: var(--accent-text); }

.kpi-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin: 0 0 16px;
}

.kpi {
  display: grid;
  align-content: start;
  gap: 4px;
  padding: 16px 18px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-l);
}

.kpi--warn { border-color: color-mix(in srgb, var(--warn) 45%, var(--line)); background: color-mix(in srgb, var(--warn-soft) 55%, var(--surface)); }
.kpi--accent { border-color: var(--accent-line); background: color-mix(in srgb, var(--accent-soft) 50%, var(--surface)); }

.kpi-label { color: var(--text-2); font-size: 13px; font-weight: 600; }

.kpi-value {
  font-size: 28px;
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.1;
  font-variant-numeric: tabular-nums;
}

.kpi-value small { color: var(--text-3); font-size: 16px; font-weight: 600; }
.kpi-foot { color: var(--text-3); font-size: 12.5px; }

.delta {
  display: inline-block;
  margin-right: 4px;
  padding: 0 6px;
  color: var(--text-2);
  background: var(--surface-3);
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
  line-height: 1.6;
  white-space: nowrap;
}

.delta--up { color: var(--ok); background: var(--ok-soft); }
.delta--down { color: var(--danger); background: var(--danger-soft); }

.chart-card {
  margin: 0 0 16px;
  padding: 16px 20px 12px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-l);
}

.chart-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 6px 16px;
  margin-bottom: 10px;
}

.chart-head h2 { font-size: 15px; }
.chart-note { color: var(--text-3); font-size: 12.5px; }

.chart-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin: 0;
  padding: 0;
  color: var(--text-2);
  font-size: 12.5px;
  list-style: none;
}

.chart-legend li { display: inline-flex; align-items: center; gap: 6px; }
.legend-swatch { display: inline-block; width: 10px; height: 10px; border-radius: 3px; }
.legend-swatch--accent { background: var(--accent); }
.legend-swatch--muted { background: color-mix(in srgb, var(--accent) 22%, var(--surface-3)); }

.chart {
  display: block;
  width: 100%;
  height: auto;
  overflow: visible;
}

.chart-grid { stroke: var(--line); stroke-width: 1; }
.chart-axis { fill: var(--text-3); font: 500 11px var(--font); }
.chart-hit { fill: transparent; }
.chart-bar { fill: color-mix(in srgb, var(--accent) 78%, var(--surface)); }
.chart-bar--strong { fill: var(--accent); }
.chart-bar--behind { fill: color-mix(in srgb, var(--accent) 16%, var(--surface-3)); }
.chart g:hover .chart-bar:not(.chart-bar--behind) { fill: var(--accent-hover); }
.chart g:hover .chart-hit { fill: color-mix(in srgb, var(--text) 4%, transparent); }

.chart-pair {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  align-items: start;
}

.chart-pair > * { margin-bottom: 16px; }
.chart-pair--wide-left { grid-template-columns: minmax(0, 1.7fr) minmax(0, 1fr); }

.chart-spark { display: block; width: 120px; height: 28px; }
.chart-spark-line { fill: none; stroke: var(--accent); stroke-width: 1.6; vector-effect: non-scaling-stroke; }
.chart-spark-area { fill: color-mix(in srgb, var(--accent) 12%, transparent); }

/* Bars in lists: a native meter, styled once. */
meter {
  width: 100%;
  height: 8px;
  appearance: none;
  background: var(--surface-3);
  border: 0;
  border-radius: 999px;
}

meter::-webkit-meter-bar { height: 8px; background: var(--surface-3); border: 0; border-radius: 999px; }
meter::-webkit-meter-optimum-value,
meter::-webkit-meter-suboptimum-value,
meter::-webkit-meter-even-less-good-value { background: var(--accent); border-radius: 999px; }
meter::-moz-meter-bar { background: var(--accent); border-radius: 999px; }

.leader-list,
.share-list,
.plain-list,
.wine-rank {
  display: grid;
  margin: 0;
  padding: 0;
  list-style: none;
}

.leader-list li,
.share-list li {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  padding: 8px 0;
  border-bottom: 1px solid var(--line);
}

.leader-list li:last-child,
.share-list li:last-child { border-bottom: 0; }

.leader-list a { overflow: hidden; color: var(--text); font-weight: 600; text-decoration: none; text-overflow: ellipsis; white-space: nowrap; }
.leader-list a:hover { color: var(--accent-text); }
.leader-list li > span:last-child,
.share-list li > span:last-child { min-width: 48px; color: var(--text-2); font-size: 13px; font-weight: 600; text-align: right; font-variant-numeric: tabular-nums; }
.share-list li > span:first-child { display: inline-flex; align-items: center; gap: 8px; min-width: 0; font-weight: 500; }
.share-list small { color: var(--text-3); }
.plain-list li { padding: 6px 0; border-bottom: 1px solid var(--line); }
.plain-list li:last-child { border-bottom: 0; }
.plain-list small { margin-left: 6px; color: var(--text-3); }

.wine-rank li {
  display: grid;
  grid-template-columns: 10px minmax(0, 1fr) minmax(60px, 140px) 44px 52px;
  align-items: center;
  gap: 12px;
  padding: 9px 0;
  border-bottom: 1px solid var(--line);
}

.wine-rank li:last-child { border-bottom: 0; }
.wine-rank__name { display: grid; min-width: 0; }
.wine-rank__name a { overflow: hidden; color: var(--text); font-weight: 600; text-decoration: none; text-overflow: ellipsis; white-space: nowrap; }
.wine-rank__name a:hover { color: var(--accent-text); }
.wine-rank__name small { color: var(--text-3); font-size: 12px; }
.wine-rank__count { color: var(--text-2); font-weight: 600; text-align: right; font-variant-numeric: tabular-nums; }
/* The weak list has no bar: name, count, match. */
.wine-rank li:not(:has(meter)) { grid-template-columns: 10px minmax(0, 1fr) 52px 52px; }
/* What guests chose: name, bar, how often; no match. */
.wine-rank--chosen li { grid-template-columns: 10px minmax(0, 1fr) minmax(60px, 140px) 52px; }

.match-pill {
  justify-self: end;
  padding: 1px 7px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.match-pill--high { color: var(--ok); background: var(--ok-soft); }
.match-pill--mid { color: var(--text-2); background: var(--surface-3); }
.match-pill--low { color: var(--danger); background: var(--danger-soft); }

.stats-table .num { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
.stats-table td meter { width: 110px; vertical-align: middle; }
.stats-table td small { display: block; }

@media (max-width: 1100px) {
  .kpi-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 860px) {
  .kpi-grid { gap: 8px; }
  .kpi { padding: 12px; }
  .kpi-value { font-size: 22px; }
  .chart-pair,
  .chart-pair--wide-left { grid-template-columns: minmax(0, 1fr); gap: 0; }
  .chart-card { padding: 14px 12px 8px; }
  .insights { padding: 14px; }
  .segmented { width: 100%; }
  .segmented a { flex: 1; text-align: center; }
  .period-chooser { width: 100%; }
  .period-form { max-width: none; }
  .wine-rank li { grid-template-columns: 10px minmax(0, 1fr) 40px 48px; }
  .wine-rank--chosen li { grid-template-columns: 10px minmax(0, 1fr) 48px; }
  .wine-rank li meter { display: none; }
  /* A restaurant: its name across, then the figures in two labelled columns. */
  table.stats-table tr { display: grid; grid-template-columns: 1fr 1fr; gap: 6px 12px; padding: 14px 4px; }
  table.stats-table td:first-child { grid-column: 1 / -1; }
  table.stats-table td:nth-child(2) { display: none; }
  table.stats-table td[data-label]::before {
    display: block;
    color: var(--text-3);
    font-size: 11.5px;
    font-weight: 600;
    content: attr(data-label);
  }
  .stats-table .num { text-align: left; }
  .stats-table td meter { width: 100%; }

  /* The day chart keeps its readable size and scrolls sideways. */
  .chart-card--wide { overflow-x: auto; }
  .chart-card--wide .chart { min-width: 680px; }
}

/* --- One restaurant's workplace (partials/tenant-header.php) ----------------- */

.tenant-head { margin: 0 0 8px; }

.tenant-back {
  display: inline-block;
  margin-bottom: 8px;
  color: var(--text-2);
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
}

.tenant-back:hover { color: var(--accent-text); }

.tenant-head__main {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 12px 20px;
}

.tenant-head__main p {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 6px;
}

.status-badge--suspended { color: var(--warn); background: var(--warn-soft); }

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

.usage-cell .chart-spark { width: 88px; height: 24px; }

.tenant-table .num { text-align: right; white-space: nowrap; }

@media (max-width: 860px) {
  table.tenant-table tr { display: grid; grid-template-columns: 1fr 1fr; gap: 6px 12px; padding: 14px 4px; }
  table.tenant-table td:first-child { grid-column: 1 / -1; }
  table.tenant-table td[data-label]::before {
    display: block;
    color: var(--text-3);
    font-size: 11.5px;
    font-weight: 600;
    content: attr(data-label);
  }
  .tenant-table .num { text-align: left; }
}

/* --- Verkoop (templates/sales.php, sales-lead.php, partials/sales-pilot.php) -- */
.kpi-grid--six { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.kpi-grid--compact { grid-template-columns: repeat(4, minmax(0, 1fr)); margin: 12px 0; }
.kpi-grid--compact .kpi-value { font-size: 20px; }

.stage-badge {
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  color: var(--text-2);
  background: var(--surface-3);
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  line-height: 1.5;
  white-space: nowrap;
}
.stage-badge--gecontacteerd { color: var(--accent-text); background: var(--accent-soft); }
.stage-badge--demo,
.stage-badge--pilot { color: var(--warn); background: var(--warn-soft); }
.stage-badge--klant,
.stage-badge--partner { color: var(--ok); background: var(--ok-soft); }
.stage-badge--verloren,
.stage-badge--niet_contacteren { color: var(--text-3); background: var(--surface-3); }

.goal-list,
.funnel,
.next-steps,
.history-list { display: grid; margin: 0; padding: 0; list-style: none; }

.goal-list li,
.funnel li {
  display: grid;
  grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr) auto;
  align-items: center;
  gap: 4px 12px;
  padding: 9px 0;
  border-bottom: 1px solid var(--line);
}
.goal-list li:last-child,
.funnel li:last-child { border-bottom: 0; }
.goal-list li > span:first-child,
.funnel li > span:first-child { font-weight: 600; }
.goal-list small { margin-left: 6px; color: var(--text-3); font-weight: 400; }
.goal-list li > span:last-child,
.funnel li > span:nth-of-type(2) { min-width: 56px; color: var(--text-2); font-size: 13px; font-weight: 600; text-align: right; font-variant-numeric: tabular-nums; }
.goal-list meter,
.funnel meter { width: 100%; height: 8px; }
.funnel-step { grid-column: 1 / -1; color: var(--text-3); font-size: 12px; }

.next-steps li,
.history-list li {
  display: grid;
  grid-template-columns: 84px minmax(0, auto) minmax(0, 1fr);
  align-items: baseline;
  gap: 10px;
  padding: 8px 0;
  border-bottom: 1px solid var(--line);
}
.next-steps li:last-child,
.history-list li:last-child { border-bottom: 0; }
.next-steps time,
.history-list time { color: var(--text-3); font-size: 12.5px; font-variant-numeric: tabular-nums; }
.next-steps a { color: var(--text); font-weight: 600; text-decoration: none; }
.next-steps a:hover { color: var(--accent-text); }
.next-steps span,
.history-list span { color: var(--text-2); font-size: 13px; }
.history-list strong { font-size: 12.5px; }
.history-list li.is-move strong,
.history-list li.is-move span { color: var(--text-3); }
.next-steps li.is-late time,
td.is-late,
.hint.is-late { color: var(--danger); font-weight: 600; }

.row-sub { display: block; color: var(--text-3); font-size: 12px; font-weight: 400; }
td > .row-sub:only-child { display: inline; }
.subheading { margin: 18px 0 6px; font-size: 13px; }
.breadcrumb { margin: 0 0 4px; color: var(--text-3); font-size: 12.5px; }
.breadcrumb a { color: inherit; }
.page-heading .stage-badge { margin-right: 6px; }
.pilot-card .section-heading h2 a { color: inherit; text-decoration: none; }
.pilot-card .inline-editor { margin-top: 10px; }
.danger-zone { margin: 0 16px 16px; padding-top: 14px; border-top: 1px solid var(--line); }
/* Deleting a restaurant (Gegevens tab): the panel's own padding, not the card's inset. */
.danger-zone.tenant-delete { margin: 18px 0 0; }

/* Quiet links one under the other (the Huisstijl tab: download, upload). */
.link-row { display: flex; flex-direction: column; align-items: flex-start; gap: 6px; }

@media (max-width: 1100px) {
  .kpi-grid--six,
  .kpi-grid--compact { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 860px) {
  table.sales-table tr { display: grid; grid-template-columns: 1fr 1fr; gap: 6px 12px; padding: 12px 4px; }
  table.sales-table td:first-child { grid-column: 1 / -1; }
  table.sales-table td[data-label]::before {
    display: block;
    color: var(--text-3);
    font-size: 11.5px;
    font-weight: 600;
    content: attr(data-label);
  }
  .sales-table .num { text-align: left; }
  .next-steps li,
  .history-list li { grid-template-columns: 70px minmax(0, 1fr); }
  .next-steps li > span,
  .history-list li > span { grid-column: 2; }
}

/* --- Smaakkaart (partials/statistics-tastemap.php): "Wat Leuven drinkt" ----- */
.tastemap-filter { grid-template-columns: repeat(3, minmax(0, 1fr)) auto; }
.tastemap-export { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; margin: 0 0 8px; }
.tastemap-export .hint { margin: 0; }
.tastemap-heading { margin: 26px 0 10px; font-size: 18px; }
.tastemap-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.tastemap-question { margin: 0; }
.tastemap-question h3 { margin: 0; font-size: 15px; }
.tastemap-question .hint { margin: 2px 0 8px; }
.share-cell { display: grid; grid-template-columns: minmax(48px, 1fr) 38px 30px; align-items: center; gap: 6px; }
.share-cell small { color: var(--text-3); font-size: 11.5px; font-variant-numeric: tabular-nums; }
.delta--chance { color: var(--text-3); background: var(--surface-3); }
.share-cell meter { width: 100%; height: 8px; }
.share-cell strong { font-variant-numeric: tabular-nums; text-align: right; }
.tastemap-table td { font-variant-numeric: tabular-nums; }
.tastemap-table tr.is-internal td { color: var(--text-3); }
.tastemap-table th small { font-weight: 400; text-transform: none; letter-spacing: 0; }
.tastemap-table td, .tastemap-table th { white-space: nowrap; }
.tastemap-table td:first-child { white-space: normal; min-width: 90px; }
.headline-list li small { display: block; color: var(--text-3); font-size: 12px; }
.tastemap-method { margin-top: 18px; }
.tastemap-method-body { display: grid; gap: 4px; max-width: 72ch; color: var(--text-2); font-size: 13.5px; }

@media (max-width: 1320px) {
  .tastemap-grid { grid-template-columns: minmax(0, 1fr); }
}

@media (max-width: 1100px) {
  .tastemap-filter { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 860px) {
  .tastemap-filter { grid-template-columns: minmax(0, 1fr); }
  table.tastemap-table tr { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 6px 12px; padding: 12px 4px; }
  table.tastemap-table td:first-child,
  table.tastemap-table td:nth-child(2) { grid-column: 1 / -1; }
  table.tastemap-table td[data-label]::before {
    display: block;
    color: var(--text-3);
    font-size: 11.5px;
    font-weight: 600;
    content: attr(data-label);
  }
  .tastemap-table .num { text-align: left; }
}

/* Prevent focus-triggered iOS zoom without disabling the reader's own zoom.
   Keep the floor above compact table, authentication and card field rules. */
@media (max-width: 900px), (pointer: coarse) {
  input:not([type="hidden"], [type="checkbox"], [type="radio"], [type="range"], [type="color"], [type="button"], [type="submit"]),
  select, textarea, [contenteditable="true"] {
    font-size: max(16px, 1em) !important;
  }
}

/* The per-restaurant approvals above the new wines: one button per
   restaurant with two or more approvable wines. */
.proposal-bulk--restaurants { display: flex; flex-wrap: wrap; gap: 8px 10px; margin: 0 0 14px; }
.proposal-bulk--restaurants form { display: contents; }

/* A draft put back by the form memory (server/assets/form-memory.js): said
   once, at the top of the form, with one button to start over. */
.form-memory-note { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; margin: 0 0 14px; padding: 10px 12px; border: 1px solid rgba(122, 27, 46, 0.28); border-radius: 10px; background: rgba(122, 27, 46, 0.06); font-size: 13px; line-height: 1.45; }
.form-memory-forget { appearance: none; border: 1px solid rgba(122, 27, 46, 0.5); border-radius: 999px; padding: 5px 12px; background: transparent; color: #7A1B2E; font: inherit; font-size: 12.5px; font-weight: 600; cursor: pointer; }
.form-memory-forget:hover { background: rgba(122, 27, 46, 0.1); }
.form-memory-hint { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; margin: 0 0 12px; padding: 8px 12px; border: 1px dashed rgba(122, 27, 46, 0.4); border-radius: 10px; font-size: 13px; line-height: 1.45; }
.form-memory-hint a { color: #7A1B2E; font-weight: 600; }

/* --- One family with the restaurant app (9 October 2026) --------------------
   The same visual guidelines and criteria. The restaurant app's porcelain neutrals (no
   beige or brown), its wine red, its two self-hosted faces (DigiSomm Display for
   titles, Commissioner for text, served from our own host through the shared
   font route), its glass capsule at the thumb and its movement. Written as
   one block over the earlier tokens, so every rule above keeps working. */
@font-face { font-family: "DigiSomm Display"; font-style: normal; font-weight: 400 900; font-display: swap; src: url("/assets/shared/site-fonts/digisomm-display-latin.woff2") format("woff2"); }
@font-face { font-family: "Commissioner"; font-style: normal; font-weight: 100 900; font-display: swap; src: url("/assets/shared/site-fonts/commissioner-latin.woff2") format("woff2"); }
:root {
  --font: "Commissioner", "Avenir Next", "Segoe UI", ui-sans-serif, system-ui, sans-serif;
  --font-display: "DigiSomm Display", Georgia, serif;
  --bg: #f6f5f8;
  --surface: #ffffff;
  --surface-2: #faf9fb;
  --surface-3: #efedf2;
  --line: #e3dfe7;
  --line-strong: #cfc9d4;
  --text: #221b26;
  --text-2: #5e5664;
  --text-3: #857c8c;
  --accent: #7a1b2e;
  --accent-hover: #611526;
  --accent-text: #7a1b2e;
  --accent-soft: #f4e8ec;
  --accent-line: #e2c3cb;
  --rail-bg: #ffffff;
  --rail-line: #e9e5ec;
  --glass-fill: rgba(255, 255, 255, 0.72);
  --glass-edge: rgba(255, 255, 255, 0.8);
  --glass-lens: rgba(255, 255, 255, 0.66);
  --glass-lens-edge: rgba(255, 255, 255, 0.95);
  --glass-shade: rgba(34, 27, 38, 0.1);
  --raise-2: rgba(34, 27, 38, 0.07);
  --raise-3: rgba(34, 27, 38, 0.13);
}
:root[data-ds-mode="night"] {
  color-scheme: dark;
  --bg: #141116;
  --surface: #1d1920;
  --surface-2: #211c24;
  --surface-3: #27222b;
  --line: #342e39;
  --line-strong: #4a4250;
  --text: #f1edf4;
  --text-2: #b3aab9;
  --text-3: #8e8595;
  --accent: #b3344f;
  --accent-hover: #c64260;
  --accent-text: #eb5d66;
  --accent-soft: #3a151d;
  --accent-line: #5a2a36;
  --rail-bg: #19151b;
  --rail-line: #2a242e;
  --glass-fill: rgba(40, 34, 44, 0.74);
  --glass-edge: rgba(255, 255, 255, 0.14);
  --glass-lens: rgba(255, 255, 255, 0.12);
  --glass-lens-edge: rgba(255, 255, 255, 0.24);
  --glass-shade: rgba(0, 0, 0, 0.4);
  --raise-2: rgba(0, 0, 0, 0.3);
  --raise-3: rgba(0, 0, 0, 0.45);
}
@media (prefers-color-scheme: dark) {
  :root:not([data-ds-mode]) {
    color-scheme: dark;
    --bg: #141116;
    --surface: #1d1920;
    --surface-2: #211c24;
    --surface-3: #27222b;
    --line: #342e39;
    --line-strong: #4a4250;
    --text: #f1edf4;
    --text-2: #b3aab9;
    --text-3: #8e8595;
    --accent: #b3344f;
    --accent-hover: #c64260;
    --accent-text: #eb5d66;
    --accent-soft: #3a151d;
    --accent-line: #5a2a36;
    --rail-bg: #19151b;
    --rail-line: #2a242e;
    --glass-fill: rgba(40, 34, 44, 0.74);
    --glass-edge: rgba(255, 255, 255, 0.14);
    --glass-lens: rgba(255, 255, 255, 0.12);
    --glass-lens-edge: rgba(255, 255, 255, 0.24);
    --glass-shade: rgba(0, 0, 0, 0.4);
    --raise-2: rgba(0, 0, 0, 0.3);
    --raise-3: rgba(0, 0, 0, 0.45);
  }
}
body { font-family: var(--font); }
/* Titles in the display face, as the restaurant app's page titles. */
.page-heading h1, .page-intro h1, .auth-card h1 { font-family: var(--font-display); font-weight: 500; letter-spacing: -0.01em; }

/* Movement, as in the restaurant app: a page arrives rather than appears.
   On a phone only (12 October 2026, the panel had grown slow): a
   cross-document view transition snapshots the whole old page
   before the new one may paint, and on a laptop the panel's pages are long
   (the catalogue, the inbox, the restaurants), so every click paid for a
   screenshot of a thousand rows. The phone's pages are short and the
   transition is what makes the installed app feel like one. */
@media (max-width: 860px) {
  @view-transition { navigation: auto; }
}
::view-transition-old(root) { animation: 140ms ease-out both ds-vt-out; }
::view-transition-new(root) { animation: 260ms cubic-bezier(0.2, 0.7, 0.2, 1) both ds-vt-in; }
@keyframes ds-vt-out { to { opacity: 0; } }
@keyframes ds-vt-in { from { opacity: 0; transform: translateY(10px); } }
@keyframes ds-settle { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
details[open] > :not(summary) { animation: ds-settle 220ms cubic-bezier(0.2, 0.7, 0.2, 1) both; }
:is(.primary-button, .secondary-button, .danger-button, .button, button.btn) { transition: transform 120ms ease, background-color 160ms ease, border-color 160ms ease, box-shadow 160ms ease, color 160ms ease; }
:is(.primary-button, .secondary-button, .danger-button, .button, button.btn):active { transform: scale(0.98); }
.card, .panel { box-shadow: 0 1px 2px var(--raise-2), 0 10px 24px -20px var(--raise-3); }
@media (prefers-reduced-motion: reduce) {
  ::view-transition-group(*), ::view-transition-old(*), ::view-transition-new(*) { animation: none !important; }
  details[open] > :not(summary) { animation: none; }
  :is(.primary-button, .secondary-button, .danger-button, .button, button.btn):active { transform: none; }
}

@media (max-width: 860px) {
  /* The top bar: the denser veil, so what scrolls under it never reads through. */
  .utility-bar { background: color-mix(in srgb, var(--surface) 94%, transparent); -webkit-backdrop-filter: saturate(1.4) blur(12px); backdrop-filter: saturate(1.4) blur(12px); view-transition-name: ds-topbar; }
  /* The tab bar: the restaurant app's glass capsule, the current tab under a
     lens with a touch of bordeaux. */
  .tab-bar {
    right: auto;
    left: 50%;
    bottom: calc(8px + env(safe-area-inset-bottom, 0px));
    width: min(calc(100% - 24px), 440px);
    min-height: 60px;
    padding: 4px;
    background: var(--glass-fill);
    border: 1px solid var(--glass-edge);
    border-radius: 999px;
    box-shadow: inset 0 1px 0 var(--glass-lens-edge), inset 0 -1px 0 var(--glass-shade), 0 1px 2px var(--raise-2), 0 18px 40px -16px var(--raise-3);
    -webkit-backdrop-filter: blur(24px) saturate(1.8);
    backdrop-filter: blur(24px) saturate(1.8);
    transform: translateX(-50%);
    view-transition-name: ds-tabbar;
  }
  .tab-bar > a, .tab-bar > button { min-height: 52px; gap: 2px; padding: 5px 2px 4px; border-radius: 999px; font-size: 10.5px; }
  .tab-bar .ui-icon { width: 21px; height: 21px; }
  .tab-bar [aria-current="page"] {
    color: var(--accent-text);
    background: color-mix(in srgb, var(--accent) 11%, var(--glass-lens));
    box-shadow: inset 0 1px 0 var(--glass-lens-edge), inset 0 0 0 1px var(--glass-edge), inset 0 -2px 4px var(--glass-shade), 0 8px 18px -10px color-mix(in srgb, var(--accent) 55%, transparent);
  }
}

/* "Meer" menus, as in the restaurant app. */
.action-menu { position: relative; display: inline-block; }
.action-menu > summary { list-style: none; cursor: pointer; }
.action-menu > summary::-webkit-details-marker { display: none; }
.action-menu-list { position: absolute; top: calc(100% + 6px); left: 0; z-index: 20; display: grid; width: min(300px, calc(100vw - 32px)); padding: 6px; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; box-shadow: 0 18px 40px -16px var(--raise-3); }
.action-menu-list a { display: grid; gap: 2px; padding: 10px 12px; color: var(--text); border-radius: 10px; font-weight: 600; text-decoration: none; }
.action-menu-list a small { color: var(--text-2); font-size: 12.5px; font-weight: 400; }
@media (hover: hover) { .action-menu-list a:hover { background: var(--surface-3); } }

/* The restaurant switch above a wine list (Assortimenten folded into the
   restaurant's workplace, 9 October 2026). */
.restaurant-switch {
  display: flex;
  align-items: flex-end;
  gap: 8px;
  margin-right: auto;
}
.restaurant-switch .field { margin: 0; min-width: min(320px, 100%); }
.restaurant-switch .field > span { font-size: 12px; color: var(--text-3); }
@media (max-width: 860px) {
  .restaurant-switch { flex: 1 1 100%; }
  .restaurant-switch .field { flex: 1; min-width: 0; }
}

/* Facturatie: whether an invoice can be made, and what the restaurant filled in
   (9 October 2026). */
.invoice-ready { margin: 0 0 16px; padding: 10px 14px; border-radius: 10px; border: 1px solid var(--line); }
.invoice-ready--ok { background: var(--ok-soft); border-color: color-mix(in srgb, var(--ok) 30%, transparent); }
.invoice-ready--gap { background: var(--warn-soft); border-color: color-mix(in srgb, var(--warn) 30%, transparent); }
.invoice-identity { margin-bottom: 8px; }

/* "Klaar voor gasten" on a restaurant's overview (9 October 2026). */
.onboarding-steps { margin-bottom: 16px; }
.onboarding-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.onboarding-list li { display: flex; align-items: flex-start; gap: 10px; }
.onboarding-list small { display: block; color: var(--text-3); }
.onboarding-mark {
  flex: none; width: 20px; height: 20px; border-radius: 999px;
  display: inline-grid; place-items: center; font-size: 12px; line-height: 1;
  border: 1.5px solid var(--line);
}
.onboarding-list .is-done .onboarding-mark { background: var(--ok); border-color: var(--ok); color: #fff; }
.onboarding-list .is-done strong { color: var(--text-3); font-weight: 500; }

/* A wine list into a restaurant's concept without a scan (9 October 2026). */
.concept-import { margin-top: 16px; }
.concept-import > summary small { display: block; margin-top: 2px; color: var(--text-3); font-weight: 400; }

/* --- Assortimenten (9 October 2026) ---------------------------------------------
   Every restaurant's list at a glance, and per restaurant the card and its
   concept side by side, so what happens to a wine is said, not guessed. */
.assortment-overview { margin-bottom: 16px; }
.assortment-summary { margin: 12px 0 16px; }
.assortment-group-title {
  margin: 18px 0 8px;
  color: var(--text-2);
  font-size: 13px;
  font-weight: 600;
}
.assortment-group-title:first-of-type { margin-top: 4px; }
.assortment-badges { display: flex; flex-wrap: wrap; gap: 4px; justify-content: flex-end; }
.assortment-diff { margin: 12px 14px 0; }
.assortment-layer-title {
  margin: 0 0 10px;
  color: var(--text-2);
  font-size: 12.5px;
  font-weight: 600;
}
.assigned-wine-row > form + form { padding-top: 14px; border-top: 1px solid var(--line); }
.layer-choice {
  display: grid;
  gap: 8px;
  margin: 4px 0 12px;
  padding: 0;
  border: 0;
}
.layer-choice legend { margin-bottom: 6px; font-weight: 600; font-size: 13.5px; }

@media (max-width: 860px) {
  .assortment-badges { justify-content: flex-start; }
}

/* A fixed width (9 October 2026): no zoom, and nothing beyond the screen.
   The viewport refuses zoom, a double tap does not zoom, and nothing
   may push the page sideways: what is wider (a long table) scrolls inside its
   own box. clip, not hidden, so sticky bars keep working. */
html { touch-action: manipulation; }
html, body { max-width: 100%; overflow-x: clip; }
img, video, canvas { max-width: 100%; }

/* The Facturatie tab (10 October 2026): invoices first, the agreement as a
   line that opens to change it, the restaurant's details in two columns, each
   part separated by a hairline instead of one long column of forms. */
.billing-block { margin-top: 22px; padding-top: 18px; border-top: 1px solid var(--line); }
.billing-block > h3 { margin-top: 0; }
.billing-block .button-row { margin: 4px 0 16px; }
.billing-agreement > summary > span:first-child { display: grid; gap: 2px; min-width: 0; }
.billing-agreement__terms { color: var(--text-2); font-size: 13px; }
.billing-agreement > form { padding: 4px 16px 16px; }
.billing-agreement[open] > summary { border-bottom: 1px solid var(--line); border-bottom-left-radius: 0; border-bottom-right-radius: 0; }
@media (min-width: 900px) {
  .invoice-identity { grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 32px; }
  .invoice-identity > div:nth-last-child(2) { border-bottom: 0; }
}
.invoice-table .num { white-space: nowrap; }
.invoice-table td small { display: block; margin-top: 4px; color: var(--text-2); }
@media (max-width: 860px) {
  table.invoice-table tr { display: grid; grid-template-columns: 1fr 1fr; gap: 8px 12px; }
  table.invoice-table td:nth-child(4), table.invoice-table td:nth-child(5) { grid-column: 1 / -1; }
  table.invoice-table td[data-label]::before {
    display: block;
    color: var(--text-3);
    font-size: 11.5px;
    font-weight: 600;
    content: attr(data-label);
  }
  .invoice-table .num { text-align: left; }
}

/* A label that names no grape (11 October 2026): what the appellation usually
   is, under the appellation, a tap per grape into the grapes field. */
.grape-hint { grid-column: 1 / -1; padding: 12px 14px; border-radius: var(--radius); background: var(--surface-2); color: var(--text); }
.grape-hint[hidden] { display: none; }
.grape-hint p { margin: 0 0 8px; }
.grape-hint-grapes { display: flex; flex-wrap: wrap; gap: 6px; }
.grape-hint-grapes:empty { display: none; }
.grape-hint-grape { min-height: 36px; padding: 6px 12px; border: 1px solid var(--line-strong); border-radius: 999px; background: var(--surface); color: var(--text); font: inherit; font-weight: 600; cursor: pointer; }
.grape-hint-grape[aria-pressed="true"] { border-color: var(--accent-line); background: var(--accent-soft); color: var(--accent-text); }
.grape-hint-grape[aria-pressed="true"]::before { content: "✓ "; }
/* What the EU register permits beside the usual grapes (19 October 2026): a quieter row. */
.grape-hint-allowed-label { flex-basis: 100%; margin-top: 6px; color: var(--text-2); font-size: 0.875rem; }
.grape-hint-grape.is-allowed { min-height: 32px; padding: 4px 10px; border-color: var(--line); font-weight: 500; }

/* The live layer (12 October 2026): a page that arrives settles in, and a thin
   line at the top says the panel is fetching. */
.region-enter { animation: ds-settle 240ms cubic-bezier(0.2, 0.7, 0.2, 1) both; }
.live-progress { position: fixed; top: 0; left: 0; z-index: 60; width: 100%; height: 2px; background: linear-gradient(90deg, transparent, var(--accent) 40%, var(--accent) 60%, transparent); transform: translateX(-100%); opacity: 0; pointer-events: none; }
.live-progress.is-on { opacity: 1; animation: live-progress 900ms cubic-bezier(0.4, 0, 0.2, 1) infinite; }
@keyframes live-progress { from { transform: translateX(-100%); } to { transform: translateX(100%); } }
[aria-busy="true"] { opacity: 0.6; }
.is-leaving { transition: opacity 240ms ease, transform 240ms ease; opacity: 0; transform: translateY(-6px); }
/* The owner's favourites as a tab beside the colours, not a tick in the filter bar. */
.colour-tab--fav { margin-left: auto; }
.colour-tab--fav .fav-star { color: var(--accent); }
@media (prefers-reduced-motion: reduce) {
  .region-enter, .live-progress.is-on { animation: none; }
  .is-leaving { transition: none; }
}

/* --- The press has an answer before the server does (14 October 2026) -----
 * The restaurant app's answers, here too: a pressed control dims
 * at once and shows a small orb in its own ink past a blink; a screen on its
 * way shows a larger orb over the dimmed page. The orbs come from the shared
 * orbs.js and take the panel's tokens. No focus ring for a finger or a mouse
 * (html[data-modality], set by app.js); Tab brings it back. */
.is-busy { position: relative; opacity: 0.65; pointer-events: none; }
.orb { --orb-accent: var(--accent); --orb-ink: var(--text-2); display: block; flex: none; }
.orb-20 { width: 20px; height: 20px; }
.orb-64 { width: 64px; height: 64px; }
:is(button, a).is-busy.is-thinking { opacity: 1; color: transparent; text-shadow: none; }
.is-thinking > :not(.orb) { visibility: hidden; }
.orb-in-control { position: absolute; top: 50%; left: 50%; margin: -10px 0 0 -10px; }
.screen-orb { position: fixed; inset: 0; z-index: 30; display: grid; place-items: center; pointer-events: none; animation: ds-settle 240ms cubic-bezier(0.2, 0.7, 0.2, 1) both; }
.screen-orb > .orb { box-sizing: content-box; padding: 14px; background: var(--surface); border-radius: 50%; box-shadow: var(--shadow-float); }
main#main-content.is-loading { opacity: 0.55; transition: opacity 180ms ease; }
@media (min-width: 861px) { .screen-orb { left: var(--rail-width); } }
html[data-modality="pointer"] .platform-shell :focus-visible:not(input, select, textarea) { outline: none; }
html[data-modality="pointer"] .platform-shell :focus-visible:not(input, select, textarea) * { outline: none; }
@media (prefers-reduced-motion: reduce) {
  .screen-orb { animation: none; }
  main#main-content.is-loading { transition: none; }
}

/* The tab bar shines and flows as the restaurant app's does (14 October
   2026). The current
   tab is no longer a tinted block that jumps: one lens, clearer glass with a
   highlight along its top, slides to the tab just tapped (before the page
   arrives; app.js moveTabLens) with a small overshoot, and the bar is kept
   across page swaps so it can. The same values as the restaurant app's
   .tab-indicator. */
.tab-indicator { display: none; }
@media (max-width: 860px) {
  .tab-bar { isolation: isolate; overflow: hidden; }
  .tab-bar::before {
    content: "";
    position: absolute;
    inset: 0 0 auto;
    height: 50%;
    background: linear-gradient(180deg, color-mix(in srgb, var(--glass-lens-edge) 55%, transparent), transparent);
    border-radius: 999px 999px 0 0;
    opacity: 0.55;
    pointer-events: none;
  }
  .tab-indicator {
    position: absolute;
    top: 4px;
    bottom: 4px;
    left: 4px;
    z-index: 0;
    display: block;
    width: calc((100% - 8px) / 5);
    overflow: hidden;
    background: color-mix(in srgb, var(--accent) 11%, var(--glass-lens));
    border-radius: 999px;
    box-shadow:
      inset 0 1px 0 var(--glass-lens-edge),
      inset 0 0 0 1px var(--glass-edge),
      inset 0 -2px 4px var(--glass-shade),
      0 8px 18px -10px color-mix(in srgb, var(--accent) 55%, transparent),
      0 3px 10px -4px var(--glass-shade);
    pointer-events: none;
    transform: translateX(calc(var(--slot, 0) * 100%));
    /* A small overshoot, as a finger-flicked thing would. */
    transition: transform 460ms cubic-bezier(0.34, 1.4, 0.5, 1), opacity 180ms linear;
  }
  .tab-indicator::after {
    content: "";
    position: absolute;
    inset: 2px 10px auto;
    height: 46%;
    background: linear-gradient(180deg, var(--glass-lens-edge), transparent);
    border-radius: 999px 999px 50% 50%;
    opacity: 0.7;
  }
  .tab-bar[data-active="0"] .tab-indicator { --slot: 0; }
  .tab-bar[data-active="1"] .tab-indicator { --slot: 1; }
  .tab-bar[data-active="2"] .tab-indicator { --slot: 2; }
  .tab-bar[data-active="3"] .tab-indicator { --slot: 3; }
  .tab-bar[data-active="4"] .tab-indicator { --slot: 4; }
  .tab-bar > a, .tab-bar > button {
    z-index: 1;
    color: var(--text-3);
    font-weight: 500;
    -webkit-user-select: none;
    user-select: none;
    transition: color 200ms ease;
  }
  /* The lens says where you are; the tab itself carries no block of its own. */
  .tab-bar > [aria-current="page"] { color: var(--text-3); font-weight: 500; background: none; box-shadow: none; }
  .tab-bar .ui-icon { transition: transform 360ms cubic-bezier(0.34, 1.5, 0.5, 1); }
  /* Current follows the lens's slot, so colour and lens move together, on
     the tap rather than on the server's reply. */
  .tab-bar[data-active="0"] > [data-tab="0"],
  .tab-bar[data-active="1"] > [data-tab="1"],
  .tab-bar[data-active="2"] > [data-tab="2"],
  .tab-bar[data-active="3"] > [data-tab="3"],
  .tab-bar[data-active="4"] > [data-tab="4"] { color: var(--accent-text); font-weight: 650; }
  .tab-bar[data-active="0"] > [data-tab="0"] .ui-icon,
  .tab-bar[data-active="1"] > [data-tab="1"] .ui-icon,
  .tab-bar[data-active="2"] > [data-tab="2"] .ui-icon,
  .tab-bar[data-active="3"] > [data-tab="3"] .ui-icon,
  .tab-bar[data-active="4"] > [data-tab="4"] .ui-icon { transform: translateY(-1px) scale(1.06); }
  /* The press: the icon gives under the thumb and springs back. */
  .tab-bar > :active .ui-icon { transform: scale(0.84); transition-duration: 90ms; }
  .tab-badge { z-index: 2; }
}
@media (max-width: 860px) and (prefers-reduced-motion: reduce) {
  .tab-indicator, .tab-bar .ui-icon { transition: none; }
}

/* Fouten (19 October 2026): the applications' failures, per kind. */
.ui-icon--errors { --icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.7' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 3.5 21.5 20h-19z'/%3E%3Cpath d='M12 10v4.5'/%3E%3Cpath d='M12 17.3v.2'/%3E%3C/svg%3E"); }
.error-kinds { display: grid; gap: 10px; margin: 8px 0 0; padding: 0; list-style: none; }
.error-kind { display: grid; gap: 6px; padding: 12px 14px; border: 1px solid var(--line); border-radius: var(--radius, 10px); background: var(--surface); }
.error-kind.is-resolved { opacity: .72; }

/* Opmerkingen (26 October 2026): what the restaurants send, settled in place. */
.ui-icon--feedback { --icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.7' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 5h16v11h-9l-5 4v-4H4z'/%3E%3Cpath d='M8 9h8m-8 3.5h5'/%3E%3C/svg%3E"); }
/* A wine glass: La Festa del Vino's temporary link (1 November 2026). */
.ui-icon--chains { --icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.7' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M3.5 5h2l2.2 10.5h10.6L20.5 8H7'/%3E%3Ccircle cx='9.5' cy='19' r='1.3'/%3E%3Ccircle cx='17' cy='19' r='1.3'/%3E%3C/svg%3E"); }
.ui-icon--events { --icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.7' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M7.5 3.5h9c.4 3.6-.6 7.6-4.5 8.4-3.9-.8-4.9-4.8-4.5-8.4z'/%3E%3Cpath d='M12 12v7.5m-3.5 1h7'/%3E%3Cpath d='M7.9 7h8.2'/%3E%3C/svg%3E"); }
.feedback-items { display: grid; gap: 10px; margin: 8px 0 0; padding: 0; list-style: none; }
.feedback-item { display: grid; gap: 6px; padding: 14px 16px; border: 1px solid var(--line); border-radius: var(--radius, 10px); background: var(--surface); }
.feedback-item.is-handled { opacity: .78; }
.feedback-head { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 8px; }
.feedback-restaurant { margin-right: 4px; color: var(--text); font-weight: 600; text-decoration: none; }
.feedback-restaurant:hover { text-decoration: underline; text-underline-offset: 3px; }
.status-badge.is-quiet { color: var(--text-3); background: transparent; border: 1px solid var(--line); }
.status-badge.is-urgent { color: var(--warn); background: var(--warn-soft); }
.status-badge.is-outcome { color: var(--ok); background: var(--ok-soft); }
.feedback-title { color: var(--text); font-size: 15px; line-height: 1.35; }
.feedback-body { margin: 0; max-width: 72ch; color: var(--text-2); line-height: 1.55; white-space: pre-line; overflow-wrap: anywhere; }
.feedback-meta { margin: 0; color: var(--text-3); font-size: 12px; }
.feedback-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 4px; }
@media (max-width: 640px) {
  .feedback-actions { display: grid; }
  .feedback-actions .text-button { justify-self: start; }
}

/* Automatisch doorgevoerd (26 October 2026): what the tally adopted, undone in place. */
.consensus-rule { display: grid; gap: 4px; margin: 0 0 14px; padding: 12px 14px; border: 1px solid var(--line); border-radius: var(--radius, 10px); background: var(--surface-2); color: var(--text-2); font-size: 13px; line-height: 1.5; }
.consensus-rule strong { color: var(--text); }
.consensus-items { display: grid; gap: 10px; margin: 8px 0 0; padding: 0; list-style: none; }
.consensus-item { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 4px 16px; align-items: center; padding: 12px 14px; border: 1px solid var(--line); border-radius: var(--radius, 10px); background: var(--surface); }
.consensus-item.is-undone { opacity: .7; }
.consensus-wine { grid-column: 1; color: var(--text); font-weight: 600; text-decoration: none; }
.consensus-wine:hover { text-decoration: underline; text-underline-offset: 3px; }
.consensus-move { grid-column: 1; display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 8px; color: var(--text-2); }
.consensus-move .status-badge { color: var(--accent-text); background: var(--accent-soft); }
.consensus-move code { padding: 1px 6px; border-radius: 6px; background: var(--surface-3); color: var(--text); font-size: 13px; }
.consensus-move .consensus-arrow { color: var(--text-3); }
.consensus-meta { grid-column: 1; margin: 0; color: var(--text-3); font-size: 12px; }
.consensus-item > form, .consensus-item > .consensus-undone { grid-column: 2; grid-row: 1 / span 3; }
.consensus-undone { color: var(--text-3); font-size: 12px; white-space: nowrap; }
@media (max-width: 640px) {
  .consensus-item { grid-template-columns: minmax(0, 1fr); }
  .consensus-item > form, .consensus-item > .consensus-undone { grid-column: 1; grid-row: auto; margin-top: 6px; }
}
.error-kind-head { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.error-kind-head code { font-size: .82rem; }
.error-kind-count { margin-left: auto; font-variant-numeric: tabular-nums; font-weight: 650; }
.error-kind-message { margin: 0; overflow-wrap: anywhere; }
.error-kind-meta { margin: 0; color: var(--text-3); font-size: .82rem; overflow-wrap: anywhere; }
.error-kind form { justify-self: start; }

/* Actions in a page heading (19 October 2026: "Catalogus nu controleren" beside the way back). */
.page-heading-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.page-heading-actions form { margin: 0; }

/* Corrections a catalogue import could not make, wine by wine (19 October 2026). */
.import-refused { padding: 12px 14px; border: 1px solid var(--line-strong); border-left: 3px solid var(--warn); border-radius: 10px; background: var(--surface); }
.import-refused ul { margin: 8px 0 0; padding-left: 18px; }
.import-refused li { margin: 4px 0; overflow-wrap: anywhere; }

/* A wine changed on its card (Catalogus na te kijken, 19 October 2026). */
.quick-edit { display: grid; gap: 8px; margin: 8px 0 4px; }
.quick-edit-fields { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 8px 12px; }
.quick-edit .field { margin: 0; }
.quick-edit .button-row { margin: 0; }
.origin-wines { list-style: none; margin: 0 0 12px; padding: 0; display: grid; gap: 12px; }
.origin-wines > li { padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); }
.origin-wines > li > a { font-weight: 600; }
.origin-wines .hint { margin: 4px 0 0; }
.origin-all { border-top: 1px solid var(--line); padding-top: 12px; }
.finding-actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-top: 10px; }
.finding-actions .record-actions, .finding-actions .record-form, .finding-actions .button-row { display: contents; }
.quick-filled { font-style: normal; font-weight: 500; color: var(--text-2); font-size: 0.8125rem; }

/* --- Wine entry (catalog-new.php, 20 October 2026) -------------------------------- */
/* Laid out as the restaurant's wine entry: the fields in cards on the left, the guest's card beside them,
   sticky while the fields scroll. The card's own look is the shared guest-view.css;
   here only where it stands and the colours it wears. */
.wine-entry { display: grid; gap: 20px; }
.wine-entry-layout { display: grid; grid-template-columns: minmax(0, 1fr) 342px; gap: 24px; align-items: start; }
.wine-entry-fields { display: grid; gap: 16px; min-width: 0; }
.wine-entry-fields > .panel { margin: 0; }
.wine-entry-group .form-grid { margin-bottom: 0; align-items: start; }
.wine-entry-group [data-register-result] { color: var(--text-2); font-size: 14px; }
.wine-entry-group [data-register-result][data-status="warning"] { color: var(--warn); }
.wine-entry-group [data-register-result] ul { margin: 8px 0 0; padding-left: 18px; }
.wine-entry-card { position: sticky; top: 72px; display: grid; gap: 12px; }
.wine-entry-card > .hint { margin: 0; }
.wine-entry-card .wc-frame { width: 342px; max-width: 100%; }
/* A catalogue wine has no price: every restaurant sets its own. */
.wine-entry-card .wc-prices { display: none; }
.wine-entry-card .structure-suggestion { margin-top: 0; }
.wine-entry-save { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; justify-content: flex-end; }
.wine-entry-save .hint { margin: 0 auto 0 0; }
/* The card in DigiSomm's own colours, day and night: a catalogue wine belongs to
   no restaurant's house style. */
.wine-entry-card .house-style {
  --theme-background: var(--surface-2);
  --theme-background-alt: var(--surface-3);
  --theme-surface: var(--surface);
  --theme-text: var(--text);
  --theme-muted: var(--text-2);
  --theme-accent: var(--accent);
  --theme-signal: var(--accent);
  --theme-action: var(--accent);
  --theme-action-text: var(--on-accent);
  --theme-faint: var(--accent-soft);
  --theme-selected: var(--accent-soft);
  --theme-panel: var(--surface-2);
  --theme-card-background: var(--surface);
  --theme-display-font: var(--font-display, Georgia, serif);
  --theme-body-font: var(--font);
}
@media (max-width: 1000px) {
  .wine-entry-layout { grid-template-columns: minmax(0, 1fr); }
  .wine-entry-card { position: static; justify-items: center; }
}
@media (max-width: 760px) {
  .wine-entry-save > .primary-button { width: 100%; }
}

/* Pages of a long list (22 October 2026: the catalogue, the review pages):
   the way on, quiet, under the list. */
.pager { display: flex; align-items: center; justify-content: center; gap: 16px; margin: 18px 0 8px; color: var(--text-2); font-size: 14px; }
.pager .secondary-button { min-width: 96px; justify-content: center; }

/* Gebruikers (users.php): everyone who can sign in to a restaurant app. */
.user-search { display: flex; align-items: flex-end; gap: 10px; flex-wrap: wrap; margin: 0 0 8px; }
.user-search .field { flex: 1 1 260px; max-width: 420px; }
.user-list { display: grid; gap: 10px; margin: 0; padding: 0; list-style: none; }
.user-row { padding: 14px 16px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); scroll-margin-top: 80px; }
.user-row:target { border-color: var(--accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 18%, transparent); }
.user-name-form { display: flex; align-items: flex-end; gap: 10px; flex-wrap: wrap; }
.user-name-form .field { flex: 1 1 240px; max-width: 420px; margin: 0; }
.user-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 12px; margin: 10px 0 0; color: var(--muted); font-size: 0.86rem; }
.user-restaurants { display: flex; flex-wrap: wrap; gap: 6px 14px; margin: 8px 0 0; padding: 0; list-style: none; font-size: 0.9rem; }
.user-restaurants small { margin-left: 4px; color: var(--muted); }

/* Beheerders (2 November 2026): the platform's own accounts, in the same rows
   as Gebruikers; blocking and a new temporary password under each. */
.admin-list { margin-bottom: 16px; }
.user-restaurants__label { color: var(--text-3); }
.admin-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 16px; margin: 12px 0 0; padding-top: 10px; border-top: 1px solid var(--line); }
.admin-actions form { margin: 0; }
.admin-new { max-width: 560px; }

/* Activiteit (2 November 2026): what was done, by whom, as the overview's
   "Recente wijzigingen"; the filters as Gebruikers' search. */
.activity-filter { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 10px; margin: 0 0 14px; }
.activity-filter .field { flex: 1 1 200px; max-width: 320px; margin: 0; }
.activity-list small a.text-link { color: inherit; text-decoration-color: var(--line-strong); }
.activity-list small a.text-link:hover { color: var(--accent-text); }
.activity-actor { color: var(--text-2); font-weight: 600; }
.activity-count { margin-left: 4px; color: var(--text-3); font-weight: 500; font-variant-numeric: tabular-nums; }
.audit-dot--auto { background: transparent; box-shadow: inset 0 0 0 1.5px var(--line-strong); }
.activity-pages { display: flex; justify-content: space-between; gap: 10px; margin-top: 12px; }
.activity-block { margin-top: 16px; }
.done-by { color: var(--text-3); font-size: 12px; }

/* La Festa del Vino (1 November 2026): the fair's sommelier, its wine houses
   with logo and stand, their wines, and what guests chose per house. */
.festa-settings dd small { display: block; margin-top: 3px; color: var(--text-3); font-size: 12px; line-height: 1.45; }
.festa-settings dd .status-badge { margin-left: 6px; vertical-align: 1px; }
.festa-inline-form { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; margin: 0; }
.festa-inline-form > span { color: var(--text); }
.festa-panel-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 16px; margin: 0 0 12px; }
.festa-panel-head h2 { margin: 0; }
.festa-panel-head form { margin: 0; }
.house-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 340px), 1fr)); align-items: start; gap: 12px; }
.house-card { display: grid; align-content: start; gap: 10px; min-width: 0; padding: 14px 16px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); scroll-margin-top: 80px; }
.house-card:target { border-color: var(--accent-line); box-shadow: var(--focus); }
.house-card-head { display: flex; align-items: center; gap: 12px; min-width: 0; }
.house-card-mark { flex: 0 0 auto; display: grid; place-items: center; width: 48px; height: 48px; overflow: hidden; border: 1px solid var(--line); border-radius: var(--radius-s); background: var(--surface-3); color: var(--accent-text); font-weight: 600; font-size: 16px; letter-spacing: .02em; }
.house-card-mark img { display: block; width: 86%; height: 86%; object-fit: contain; }
.house-card-title { display: grid; flex: 1; min-width: 0; gap: 2px; }
.house-card-title strong { color: var(--text); font-size: 15px; line-height: 1.3; overflow-wrap: anywhere; }
.house-card-title small { color: var(--text-3); font-size: 12px; }
.house-stand { flex: 0 0 auto; display: grid; justify-items: center; min-width: 50px; padding: 5px 8px 6px; border-radius: var(--radius-s); background: var(--accent); color: var(--on-accent); line-height: 1; }
.house-stand small { font-size: 9px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; opacity: .85; }
.house-stand b { margin-top: 3px; font-size: 18px; font-variant-numeric: tabular-nums; }
.house-card-intro { margin: 0; color: var(--text-2); font-size: 13px; line-height: 1.5; }
.house-card .empty-note { margin: 0; }
.house-wines { display: grid; margin: 0; padding: 0; list-style: none; border-top: 1px solid var(--line); }
.house-wines > li { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 4px 12px; padding: 8px 0; border-bottom: 1px solid var(--line); }
.house-wines > li:last-child { border-bottom: 0; }
.house-wine-name { display: grid; flex: 1 1 200px; min-width: 0; gap: 1px; color: var(--text); font-size: 14px; line-height: 1.35; overflow-wrap: anywhere; }
.house-wine-name small { color: var(--text-3); font-size: 12px; }
.house-wine-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 12px; margin: 0; }
.house-wine-actions form { margin: 0; }
.house-wine-actions select { width: auto; min-width: 0; max-width: 220px; }
.house-wine-actions .secondary-button { flex: 0 0 auto; }
.house-wines--unlinked { margin-top: 4px; }
.house-fold { border-top: 1px solid var(--line); }
.house-fold > summary { padding: 10px 0 2px; color: var(--accent-text); font-size: 13px; font-weight: 600; cursor: pointer; }
.house-fold > summary:focus-visible { outline: none; box-shadow: var(--focus); border-radius: var(--radius-s); }
.house-fold[open] > summary { padding-bottom: 8px; }
.house-fold .entity-form { margin: 0 0 12px; }
.festa-delete { display: grid; gap: 10px; justify-items: start; margin: 4px 0 8px; padding-top: 12px; border-top: 1px dashed var(--line); }
.festa-danger { color: var(--danger); }
.secondary-button.festa-danger { border-color: color-mix(in srgb, var(--danger) 35%, var(--line)); }
.festa-days { display: flex; flex-wrap: wrap; gap: 6px 22px; margin: 0 0 12px; color: var(--text-2); font-size: 13px; }
.festa-days strong { color: var(--text); font-weight: 600; }
.house-card-website { margin: -4px 0 0; font-size: 12.5px; overflow-wrap: anywhere; }
.house-card-website a { color: var(--accent-text); }
.festa-notebook-figures { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 8px; margin: 0 0 16px; }
.festa-notebook-figures > div { padding: 10px 12px; border: 1px solid var(--line); border-radius: var(--radius-s); background: var(--surface-3); }
.festa-notebook-figures dt { color: var(--text-3); font-size: 12px; line-height: 1.35; }
.festa-notebook-figures dd { margin: 4px 0 0; color: var(--text); font-size: 20px; font-weight: 600; font-variant-numeric: tabular-nums; }
#proefnotities .entity-form > .hint { margin: -4px 0 4px; }
#proefnotities { scroll-margin-top: 80px; }
.festa-subhead { margin: 20px 0 8px; font-size: 14px; }
/* Evenementen (2 November 2026): every fair and tasting, the form that adds
   one with what each kind means, and an event's own page (checklist, guests'
   address, supplier links). The fair's house cards above serve both. */
.page-intro .event-eyebrow { margin: 0 0 6px; color: var(--text-3); font-size: 12px; font-weight: 600; letter-spacing: .04em; }
.event-eyebrow a { color: var(--accent-text); text-decoration: none; }
.event-eyebrow a:hover { text-decoration: underline; text-underline-offset: 3px; }
.event-create { gap: 14px; }
.event-kinds { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr)); gap: 10px; margin: 0; padding: 0; border: 0; }
.event-kinds > legend { margin: 0 0 8px; padding: 0; color: var(--text); font-size: 14px; font-weight: 600; }
.event-kind { display: flex; align-items: flex-start; gap: 10px; padding: 12px 14px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); cursor: pointer; }
.event-kind:has(input:checked) { border-color: var(--accent-line); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 14%, transparent); }
.event-kind input { flex: 0 0 auto; margin-top: 3px; accent-color: var(--accent); }
.event-kind > span { display: grid; gap: 4px; min-width: 0; }
.event-kind strong { color: var(--text); font-size: 14px; }
.event-kind small { color: var(--text-2); font-size: 13px; line-height: 1.5; }
.event-form-head { margin: 8px 0 -4px; color: var(--text); font-size: 14px; }
.event-language { max-width: 260px; }
.event-next { padding: 12px 14px; border: 1px dashed var(--line); border-radius: var(--radius); background: var(--surface-3); color: var(--text-2); font-size: 13px; }
.event-next p { margin: 0; }
.event-next p strong { color: var(--text); }
.event-next ol { margin: 6px 0 8px; padding-left: 20px; display: grid; gap: 3px; line-height: 1.45; }
.event-list { display: grid; margin: 0; padding: 0; list-style: none; border-top: 1px solid var(--line); }
.event-row { border-bottom: 1px solid var(--line); }
.event-row-link { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 6px 16px; padding: 12px 4px; color: inherit; text-decoration: none; }
.event-row-link:hover .event-row-title strong { color: var(--accent-text); }
.event-row-link:focus-visible { outline: none; box-shadow: var(--focus); border-radius: var(--radius-s); }
.event-row-title { display: grid; gap: 2px; min-width: 0; }
.event-row-title strong { color: var(--text); font-size: 15px; overflow-wrap: anywhere; }
.event-row-title small { color: var(--text-3); font-size: 12.5px; }
.event-row-figures { display: flex; align-items: center; gap: 10px; color: var(--text-2); font-size: 13px; font-variant-numeric: tabular-nums; }
.event-row.is-past .event-row-title strong { color: var(--text-2); }
.event-optional { margin-left: 4px; color: var(--text-3); font-size: 11px; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; }
.event-host-steps { margin-top: 14px; }
.event-host-list { margin: 0 0 10px; padding-left: 20px; display: grid; gap: 6px; color: var(--text-2); font-size: 13px; line-height: 1.5; }
.event-host-list code, .event-next code { overflow-wrap: anywhere; }
.event-look-form { margin: 8px 0 0; }
.event-link-made { border-color: var(--accent-line); }
.event-link-copy { display: flex; flex-wrap: wrap; gap: 8px; margin: 10px 0; }
.event-link-copy input { flex: 1 1 260px; min-width: 0; font-family: var(--font-mono, ui-monospace, monospace); font-size: 13px; }
.event-link-wines > summary { padding-top: 6px; }
.event-link-choices { display: grid; gap: 4px; max-height: 320px; margin: 4px 0 10px; padding: 0 0 0 2px; overflow-y: auto; list-style: none; }
.event-link-choices small { color: var(--text-3); font-size: 12px; }
.event-links { display: grid; margin: 0 0 8px; padding: 0; list-style: none; border-top: 1px solid var(--line); }
.event-link-row { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 6px 16px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.event-link-title { display: grid; gap: 2px; min-width: 0; }
.event-link-title strong { color: var(--text); font-size: 14px; }
.event-link-title small { color: var(--text-3); font-size: 12.5px; overflow-wrap: anywhere; }
.event-link-state { display: flex; align-items: center; gap: 10px; }
.event-link-state form { margin: 0; }
.billing-subhead { margin: 16px 0 6px; color: var(--text); font-size: 14px; }
.event-judgement-shifts { margin: -4px 0 14px; color: var(--text-2); font-size: 13.5px; }
.event-judgements td { vertical-align: top; }
.event-judgements td small { display: block; color: var(--text-3); font-size: 12px; }
.event-judgements s { color: var(--text-3); }
.event-judgements .num strong { color: var(--accent-text); }
.event-judgement-status { font-weight: 600; }
.event-judgements tr.is-changed .event-judgement-status { color: var(--accent-text); }
.event-judgements tr.is-open .event-judgement-status, .event-judgement-quiet { color: var(--text-3); }
.event-judgement-ok { color: var(--ok); font-weight: 700; }
.event-judgement-other { margin-top: 4px; overflow-wrap: anywhere; }
.festa-notebook-figures dd small { color: var(--text-3); font-size: 12px; font-weight: 500; }
#smaakprofiel { scroll-margin-top: 80px; }
@media (max-width: 860px) {
  /* A wine across, who and when across, the four scores side by side with their names, the aromas across. */
  table.event-judgements tr { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px 10px; padding: 14px 4px; }
  table.event-judgements td { display: block; padding: 0; border: 0; }
  table.event-judgements td:first-child, table.event-judgements td:nth-child(2), table.event-judgements td:last-child { grid-column: 1 / -1; }
  table.event-judgements td.num { text-align: left; }
  table.event-judgements td.num[data-label]::before, table.event-judgements td:last-child[data-label]::before {
    display: block;
    color: var(--text-3);
    font-size: 11.5px;
    font-weight: 600;
    content: attr(data-label);
  }
}
#gegevens, #sommelier, #wijnen, #wijnhuizen, #zonder-wijnhuis, #leverancier, #leverancierslinks, #facturatie, #link-gemaakt { scroll-margin-top: 80px; }

/* What suppliers said (7 November 2026): the wines still waiting, and on
   Oordelen van leveranciers every party's vote per axis as a chip. */
.supplier-judgements-waiting { margin: 14px 0 0; }
.supplier-judgements-waiting > summary { color: var(--text-2); font-size: 13.5px; cursor: pointer; }
.supplier-judgements-waiting ul { display: grid; gap: 4px; max-height: 280px; margin: 8px 0 0; padding: 0 0 0 2px; overflow-y: auto; list-style: none; font-size: 13.5px; }
.supplier-judgements-waiting small { color: var(--text-3); font-size: 12px; }
.supplier-judgements-waiting + .hint { margin-top: 14px; }
.vote-legend { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 12px; }
.vote-row { display: flex; flex-wrap: wrap; gap: 4px; }
.vote {
  display: inline-flex;
  align-items: center;
  min-height: 22px;
  padding: 1px 8px;
  border: 1px solid transparent;
  border-radius: 999px;
  font-size: 12.5px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  line-height: 1.4;
  white-space: nowrap;
}
.vote--supplier { color: var(--accent-text); background: var(--accent-soft); border-color: var(--accent-line); }
.vote--correction { color: var(--text); background: var(--surface-3); border-color: var(--line); }
.vote--confirmation { color: var(--text-2); background: transparent; border: 1px dashed var(--line-strong, var(--line)); }
.supplier-wines td { vertical-align: top; }
.supplier-wines td small { display: block; color: var(--text-3); font-size: 12px; }
.supplier-wines .vote-now { margin-top: 5px; font-size: 11.5px; white-space: nowrap; }
.supplier-wine-who { display: block; }
.supplier-wine-who + .supplier-wine-who { margin-top: 6px; }
.supplier-wine-who strong { color: var(--text); font-size: 13.5px; font-weight: 600; }
.supplier-wine-restaurants { margin-top: 6px; }
@media (max-width: 860px) {
  /* The wine and who across, the four axes two by two with their names. */
  table.supplier-wines tr { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px 14px; padding: 14px 4px; }
  table.supplier-wines td { display: block; padding: 0; border: 0; }
  table.supplier-wines td:first-child, table.supplier-wines td:nth-child(2) { grid-column: 1 / -1; }
  table.supplier-wines td:nth-child(n + 3)[data-label]::before {
    display: block;
    margin-bottom: 3px;
    color: var(--text-3);
    font-size: 11.5px;
    font-weight: 600;
    content: attr(data-label);
  }
}
@media (max-width: 640px) {
  .house-wine-actions { flex: 1 1 100%; }
  .house-wine-actions select { flex: 1 1 auto; max-width: none; }
}

/* Event houses start with only their identity, stand and wine count. */
details.event-house { display: block; }
.event-house > summary { cursor: pointer; list-style: none; min-height: 48px; }
.event-house > summary::-webkit-details-marker { display: none; }
.event-house > summary::after { content: '+'; color: var(--text-3); font-size: 20px; }
.event-house[open] > summary::after { content: '−'; }
.event-house > summary:focus-visible { outline: 2px solid var(--accent-text); outline-offset: 4px; }
.event-house-body { display: grid; gap: 10px; padding-top: 12px; }

/* A restaurant set up at the door, made in one click (Verkoop, 7 November 2026). */
.lead-along {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 10px 18px;
  margin: 14px 0;
  padding-top: 12px;
  border-top: 1px solid var(--line);
}
.lead-along div { display: grid; gap: 2px; }
.lead-along dt { color: var(--text-3); font-size: 12px; }
.lead-along dd { margin: 0; font-size: 13.5px; }
.lead-activate { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 10px; }
.lead-activate .field { flex: 0 1 220px; margin: 0; }
.lead-agreement,
.lead-custom { margin: 14px 0; padding: 10px 14px 14px; border: 1px solid var(--line); border-radius: var(--radius); }
.lead-agreement legend,
.lead-custom legend { padding: 0 6px; font-weight: 600; font-size: 13px; }
.lead-file-row { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 12px 24px; margin-bottom: 14px; }
.lead-file { display: grid; gap: 4px; align-content: start; }
.lead-custom-piece { display: grid; grid-template-columns: minmax(0, 3fr) minmax(72px, 1fr); gap: 10px; }
.lead-custom-piece + .lead-custom-piece { margin-top: 8px; }
/* Each row keeps its labels for a screen reader; the eye reads them once. */
.lead-custom-piece + .lead-custom-piece .field > span {
  position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap;
}
.lead-files .scan-pages { grid-template-columns: repeat(auto-fill, minmax(112px, 140px)); }
.lead-files .scan-page { padding: 6px; font-size: 12px; }
.lead-order-list { list-style: none; margin: 16px 0 0; padding: 12px 0 0; border-top: 1px solid var(--line); display: grid; gap: 10px; }
.lead-order-list li { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.lead-order-list small { display: block; color: var(--text-3); font-size: 12px; }
.lead-order-list .is-done strong { color: var(--text-3); font-weight: 500; }
#klaarzetten, #restaurant-gegevens, #fotos, #bestellen, #zaak-gegevens, #uit-de-zaak { scroll-margin-top: 80px; }
@media (max-width: 640px) {
  .lead-activate .field,
  .lead-activate .primary-button { flex: 1 1 100%; }
  .lead-file-row { align-items: stretch; }
  .lead-file-row .lead-upload { flex: 1 1 100%; }
  .lead-files .scan-pages { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

/* Ketens (16 November 2026): a feed's example, readable and scrollable. */
.code-block {
  margin: 8px 0 0;
  padding: 12px 14px;
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: var(--radius, 10px);
  background: var(--surface);
  font-size: 13px;
  line-height: 1.5;
  white-space: pre;
}

.chain-feeds h3 { margin: 22px 0 8px; font-size: 15px; }
.chain-feeds .detail-list code { overflow-wrap: anywhere; }

@media (max-width: 860px) {
  table.store-table tr { display: grid; grid-template-columns: 1fr 1fr; gap: 6px 12px; padding: 14px 4px; }
  table.store-table td:nth-child(2) { grid-column: 1 / -1; grid-row: 1; }
  table.store-table td[data-label]::before {
    display: block;
    color: var(--text-3);
    font-size: 11.5px;
    font-weight: 600;
    content: attr(data-label);
  }
}

/* A restaurant's Post tab (16 November 2026, templates/partials/tenant-post.php):
   the steps on the left, the post itself on the right at the width of a phone
   screen; the preview takes the two screens dropped on it. */
.social-post { display: block; }
.social-post__step { margin: 22px 0 8px; font-size: 15px; }
.social-post__files { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.social-post__files .file-drop { padding: 12px 14px; }
.social-post__files .file-drop small { overflow-wrap: anywhere; }
.social-post__fields { display: grid; gap: 12px; }
.social-post__fields textarea { resize: vertical; }
.social-post__fields--pair { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.social-post__fields input[type="color"] { width: 100%; height: 40px; padding: 3px; }
/* The house's colours as swatches (19 November 2026): the ground, the name and the band. */
.post-swatches { min-width: 0; margin: 0; padding: 0; border: 0; }
.post-swatches[hidden] { display: none; }
.post-swatches legend { margin-bottom: 6px; padding: 0; color: var(--text-2); font-size: 0.78rem; font-weight: 600; }
.post-swatches__row { display: flex; flex-wrap: wrap; gap: 4px 2px; }
.post-swatch { position: relative; display: grid; width: 60px; align-content: start; justify-items: center; gap: 4px; padding: 6px 2px 5px; border-radius: 10px; color: var(--text-2); cursor: pointer; }
.post-swatch input { position: absolute; opacity: 0; pointer-events: none; }
.post-swatch__chip { display: block; width: 32px; height: 32px; border-radius: 50%; }
.post-swatch__name { width: 100%; font-size: 10.5px; line-height: 1.2; text-align: center; text-wrap: balance; overflow-wrap: break-word; }
.post-swatch:hover { background: var(--surface-2); }
.post-swatch:has(input:checked) { color: var(--accent-text); background: var(--accent-soft); font-weight: 600; }
.post-swatch:has(input:checked) .post-swatch__chip { box-shadow: 0 0 0 2px var(--surface), 0 0 0 4px var(--accent-text); }
.post-swatch:has(input:focus-visible) { outline: 2px solid var(--accent-text); outline-offset: 1px; }
.post-swatch:has(input:disabled) { cursor: not-allowed; opacity: 0.32; }
.post-swatch:has(input:disabled):hover { background: none; }
.social-post__preview { position: sticky; top: 76px; }
.social-post__frame { width: min(100%, 432px); aspect-ratio: 1080 / 1350; margin: 4px 0 14px; border-radius: 14px; overflow: hidden; background: var(--surface-3); box-shadow: 0 1px 2px var(--raise-2, rgba(0, 0, 0, .06)), 0 18px 40px -26px rgba(20, 10, 22, .45); }
.social-post__frame img, .social-post__frame canvas { display: block; width: 100%; height: 100%; }
.social-post__preview.is-over .social-post__frame { outline: 2px dashed var(--accent-line); outline-offset: 4px; }
@media (max-width: 860px) {
  .social-post__preview { position: static; }
  .social-post__files, .social-post__fields--pair { grid-template-columns: minmax(0, 1fr); }
}
