/* =====================================================================
   Indkøb — visual identity: the kitchen "bon" (order ticket on the pass).
   Cool stainless background, slate ink, grease-pen blue for actions and
   day-dot yellow reserved for urgency/deadlines. Quantities are set in a
   condensed bold face so they read at arm's length.
   ===================================================================== */
:root {
  --bg: #E9EDEF;
  --panel: #FFFFFF;
  --ink: #1D2730;
  --ink-2: #4E5B66;
  --ink-3: #75818B;
  --line: #D2D9DE;
  --line-2: #E3E8EB;
  --action: #1B4DB1;
  --action-hover: #163E8F;
  --action-soft: #E5ECFA;
  --urgent: #F4C21C;
  --urgent-soft: #FFF4CC;
  --urgent-ink: #6B4E00;
  --ok: #1E7A46;
  --ok-soft: #E1F2E8;
  --danger: #B42318;
  --danger-soft: #FCE8E6;
  --warn: #9A5300;
  --warn-soft: #FDEFD9;
  --info: #285E8E;
  --info-soft: #E2EDF7;
  --violet: #5B3FA8;
  --violet-soft: #ECE7F8;

  --font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-num: "Barlow Condensed", "Roboto Condensed", "Arial Narrow", "Helvetica Neue", system-ui, sans-serif;
  --r-sm: 6px;
  --r: 10px;
  --tap: 48px;
  --tabbar-h: 64px;
  color-scheme: light;
  --chrome: #1D2730;
}

/* Colour themes (Tilpas appen → Udseende). Default: Bistro wine red & cream. */
:root, html[data-theme="bistro"] {
  --chrome: #4A1214;
  --action: #9A1F24;
  --action-hover: #7D181C;
  --action-soft: #F6E3E1;
  --bg: #EFEAE4;
  --line: #D9D1C8;
  --line-2: #E8E2DB;
}
html[data-theme="slate"] { --chrome: #1D2730; --action: #1B4DB1; --action-hover: #163E8F; --action-soft: #E5ECFA; --bg: #E9EDEF; --line: #D2D9DE; --line-2: #E3E8EB; }
html[data-theme="forest"] { --chrome: #1F3A2E; --action: #2E6B4F; --action-hover: #23533D; --action-soft: #E2F0E8; --bg: #EBEEEA; --line: #D3DAD4; --line-2: #E4E8E4; }
html[data-theme="black"] { --chrome: #1A1A1A; --action: #2B2B2B; --action-hover: #000; --action-soft: #ECECEC; --bg: #EEEEEE; --line: #D6D6D6; --line-2: #E6E6E6; }

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--ink); font-family: var(--font);
  font-size: 1rem; line-height: 1.45; -webkit-font-smoothing: antialiased;
}
h1, h2, h3 { line-height: 1.2; margin: 0 0 .5em; letter-spacing: -0.01em; }
h1 { font-size: 1.6rem; font-weight: 750; }
h2 { font-size: 1.1rem; font-weight: 700; }
h3 { font-size: 1rem; font-weight: 650; margin-top: 1.2em; }
p { margin: 0 0 .75em; }
a { color: var(--action); }
small, .small { font-size: .85rem; }
.muted { color: var(--ink-2); }
.center { text-align: center; }
.right { text-align: right; margin-left: auto; }
.grow { flex: 1; min-width: 0; }
.warn-text { color: var(--warn); }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.mono-num { font-family: var(--font-num); font-weight: 700; font-variant-numeric: tabular-nums; letter-spacing: .01em; font-stretch: condensed; }
.stack > * + * { margin-top: .6rem; }
:focus-visible { outline: 3px solid var(--action); outline-offset: 2px; border-radius: 4px; }

/* ---------------- form controls ---------------- */
input, select, textarea {
  font: inherit; color: var(--ink); background: #fff; border: 1.5px solid var(--line); border-radius: var(--r-sm);
  min-height: var(--tap); padding: 10px 12px; width: 100%;
}
textarea { min-height: auto; resize: vertical; }
input:focus, select:focus, textarea:focus { border-color: var(--action); outline: none; box-shadow: 0 0 0 3px var(--action-soft); }
input:disabled, select:disabled, textarea:disabled { background: var(--line-2); color: var(--ink-2); }
fieldset { border: 0; padding: 0; margin: 0; min-width: 0; }
legend { font-weight: 600; margin-bottom: .4rem; padding: 0; }

.field { margin-bottom: 1rem; }
.field > label, .field > .label { display: block; font-weight: 600; font-size: .92rem; margin-bottom: .35rem; }
.field-hint { font-size: .85rem; color: var(--ink-2); margin: .3rem 0 0; }
.field-error, .form-error { color: var(--danger); font-weight: 600; font-size: .92rem; margin: .4rem 0; }
.form-info { color: var(--ok); font-weight: 600; }
.has-error input, .has-error select, .has-error textarea { border-color: var(--danger); }
.check { display: flex; align-items: center; gap: .6rem; min-height: var(--tap); cursor: pointer; }
.check input { width: 22px; height: 22px; min-height: 0; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem; min-height: var(--tap);
  padding: 0 18px; border-radius: var(--r-sm); border: 1.5px solid transparent; font: inherit; font-weight: 650;
  cursor: pointer; text-decoration: none; white-space: nowrap; transition: background-color .12s, border-color .12s;
}
.btn:disabled { opacity: .55; cursor: not-allowed; }
.btn-primary { background: var(--action); color: #fff; }
.btn-primary:hover:not(:disabled) { background: var(--action-hover); }
.btn-secondary { background: #fff; color: var(--ink); border-color: var(--line); }
.btn-secondary:hover:not(:disabled) { border-color: var(--ink-3); }
.btn-ghost { background: transparent; color: var(--ink); }
.btn-ghost:hover:not(:disabled) { background: var(--line-2); }
.btn-quiet { background: transparent; color: var(--ink-2); border-color: var(--line); }
.btn-danger { background: #fff; color: var(--danger); border-color: #EBC1BC; }
.btn-danger:hover:not(:disabled) { background: var(--danger-soft); }
.btn-block { width: 100%; }
.btn-lg { min-height: 56px; font-size: 1.05rem; }
.btn-sm { min-height: 38px; padding: 0 12px; font-size: .9rem; }
.icon-btn {
  display: inline-grid; place-items: center; width: var(--tap); height: var(--tap); border: 0; background: transparent;
  color: var(--ink); border-radius: var(--r-sm); cursor: pointer; flex: none;
}
.icon-btn:hover:not(:disabled) { background: var(--line-2); }
.icon-btn:disabled { opacity: .35; }
.linkish { background: none; border: 0; color: var(--action); font: inherit; font-weight: 600; padding: .5rem 0; cursor: pointer; text-decoration: underline; text-underline-offset: 3px; }

.spinner { width: 18px; height: 18px; border: 2.5px solid currentColor; border-right-color: transparent; border-radius: 50%; display: inline-block; animation: spin .7s linear infinite; }
.spinner.sm { width: 12px; height: 12px; border-width: 2px; }
@keyframes spin { to { transform: rotate(360deg); } }

.segmented { display: inline-flex; background: var(--line-2); border-radius: var(--r-sm); padding: 3px; }
.segmented button { border: 0; background: transparent; font: inherit; font-weight: 600; font-size: .9rem; padding: 0 14px; min-height: 38px; border-radius: 4px; color: var(--ink-2); cursor: pointer; }
.segmented button.on { background: #fff; color: var(--ink); box-shadow: 0 1px 2px rgba(29,39,48,.15); }

.toggle { display: flex; align-items: center; gap: .75rem; min-height: var(--tap); cursor: pointer; margin-bottom: .5rem; }
.toggle input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.toggle-track { width: 46px; height: 28px; border-radius: 14px; background: var(--line); position: relative; flex: none; transition: background .15s; }
.toggle-thumb { position: absolute; top: 3px; left: 3px; width: 22px; height: 22px; border-radius: 50%; background: #fff; box-shadow: 0 1px 2px rgba(0,0,0,.25); transition: transform .15s; }
.toggle input:checked + .toggle-track { background: var(--action); }
.toggle input:checked + .toggle-track .toggle-thumb { transform: translateX(18px); }
.toggle input:focus-visible + .toggle-track { outline: 3px solid var(--action); outline-offset: 2px; }
.toggle-text { display: flex; flex-direction: column; font-weight: 600; }

.chips { display: flex; flex-wrap: wrap; gap: .5rem; }
.chip { min-height: 44px; min-width: 56px; padding: 0 14px; border-radius: 22px; border: 1.5px solid var(--line); background: #fff; font: inherit; font-weight: 650; cursor: pointer; color: var(--ink); }
.chip.on { background: var(--ink); border-color: var(--ink); color: #fff; }
.small-chips .chip { min-height: 36px; font-size: .88rem; }

.stepper { display: grid; grid-template-columns: 64px 1fr 64px; border: 1.5px solid var(--line); border-radius: var(--r); overflow: hidden; background: #fff; max-width: 340px; }
.stepper-btn { border: 0; background: var(--line-2); min-height: 64px; display: grid; place-items: center; cursor: pointer; color: var(--ink); }
.stepper-btn:active { background: var(--line); }
.stepper-input { border: 0; border-radius: 0; text-align: center; font-family: var(--font-num); font-weight: 700; font-size: 2rem; min-height: 64px; font-variant-numeric: tabular-nums; }
.stepper-input:focus { box-shadow: inset 0 0 0 3px var(--action-soft); }

.badge { display: inline-flex; align-items: center; gap: .35rem; padding: 2px 9px; border-radius: 12px; font-size: .78rem; font-weight: 700; white-space: nowrap; vertical-align: middle; }
.badge .dot { width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.tone-neutral { background: var(--line-2); color: var(--ink-2); }
.tone-warning { background: var(--warn-soft); color: var(--warn); }
.tone-info { background: var(--info-soft); color: var(--info); }
.tone-success { background: var(--ok-soft); color: var(--ok); }
.tone-danger { background: var(--danger-soft); color: var(--danger); }
.tone-accent { background: var(--violet-soft); color: var(--violet); }
.tone-urgent { background: var(--urgent); color: #2A2100; }

.callout { background: var(--info-soft); border-radius: var(--r-sm); padding: 10px 14px; font-size: .93rem; }
.callout-warn { background: var(--warn-soft); color: #5E3500; }
.block-link { display: flex; align-items: center; gap: .5rem; text-decoration: none; margin-bottom: 1rem; font-weight: 600; }
.error-box { display: flex; align-items: center; gap: .6rem; flex-wrap: wrap; background: var(--danger-soft); color: var(--danger); padding: 14px; border-radius: var(--r-sm); font-weight: 600; margin: 1rem 0; }
.loading { display: flex; align-items: center; gap: .6rem; color: var(--ink-2); padding: 2rem 0; justify-content: center; }
.empty { text-align: center; padding: 2.5rem 1rem; color: var(--ink-2); border: 2px dashed var(--line); border-radius: var(--r); margin: 1rem 0; }
.empty p { max-width: 36ch; margin: 0 auto 1rem; }
.offline-banner { display: flex; gap: .5rem; align-items: flex-start; background: var(--ink); color: #fff; padding: 10px 14px; border-radius: var(--r-sm); font-size: .9rem; margin: .5rem 0; }

/* ---------------- shell ---------------- */
.shell { min-height: 100vh; }
.rail { display: none; }
.main-col { min-width: 0; }
.topbar {
  position: sticky; top: 0; z-index: 20; display: flex; align-items: center; justify-content: space-between; gap: .75rem;
  background: var(--chrome); color: #fff; padding: 0 16px; min-height: 52px; padding-top: env(safe-area-inset-top);
}
.restaurant-name { font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.restaurant-select { background: transparent; color: #fff; border: 0; padding: 0; min-height: 44px; font-weight: 700; width: auto; max-width: 60vw; }
.restaurant-select option { color: var(--ink); }
.sync { display: inline-flex; align-items: center; gap: .35rem; font-size: .8rem; font-weight: 600; padding: 4px 10px; border-radius: 12px; white-space: nowrap; }
.sync-ok { color: #BFE6CF; }
.sync-busy { color: #fff; }
.sync-off { background: var(--urgent); color: #2A2100; }
.demo-strip { background: repeating-linear-gradient(135deg, var(--urgent-soft) 0 14px, #fff7da 14px 28px); color: var(--urgent-ink); font-size: .82rem; font-weight: 650; text-align: center; padding: 5px 12px; }
.content { padding: 16px 16px calc(var(--tabbar-h) + 96px + env(safe-area-inset-bottom)); max-width: 1180px; margin: 0 auto; }

.tabbar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 30; display: grid; grid-auto-flow: column; grid-auto-columns: 1fr;
  background: #fff; border-top: 1px solid var(--line); height: calc(var(--tabbar-h) + env(safe-area-inset-bottom)); padding-bottom: env(safe-area-inset-bottom);
}
.tab { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; color: var(--ink-2); text-decoration: none; font-size: .72rem; font-weight: 650; }
.tab.on { color: var(--action); }
.tab-primary .tab-icon { background: var(--action); color: #fff; width: 52px; height: 40px; border-radius: 12px; display: grid; place-items: center; }
.tab-primary.on .tab-icon { background: var(--chrome); }
.tab-primary { color: var(--ink); }

@media (min-width: 900px) {
  .shell { display: grid; grid-template-columns: 232px 1fr; }
  .tabbar { display: none; }
  .rail { display: flex; flex-direction: column; position: sticky; top: 0; height: 100vh; background: var(--chrome); color: #D9E0E5; padding: 18px 12px; }
  .rail-brand { display: flex; align-items: center; gap: .6rem; font-weight: 800; font-size: 1.15rem; color: #fff; padding: 0 8px 18px; }
  .rail nav { display: flex; flex-direction: column; gap: 2px; flex: 1; }
  .rail-link { display: flex; align-items: center; gap: .7rem; min-height: 44px; padding: 0 10px; border-radius: var(--r-sm); color: #D9E0E5; text-decoration: none; font-weight: 600; background: none; border: 0; font: inherit; cursor: pointer; width: 100%; text-align: left; }
  .rail-link:hover { background: rgba(255,255,255,.07); color: #fff; }
  .rail-link.on { background: rgba(255,255,255,.12); color: #fff; }
  .rail-primary { background: var(--action); color: #fff; margin-bottom: 8px; }
  .rail-primary:hover, .rail-primary.on { background: var(--action-hover); }
  .rail-sep { height: 1px; background: rgba(255,255,255,.12); margin: 10px 4px; }
  .rail-user { padding: 10px; font-size: .9rem; color: #fff; }
  .rail-user .muted { color: #9FB0BC; }
  .topbar { background: transparent; color: var(--ink); border-bottom: 1px solid var(--line); }
  .restaurant-select { color: var(--ink); }
  .sync-ok { color: var(--ok); }
  .sync-busy { color: var(--ink-2); }
  .content { padding: 24px 32px 64px; }
}

.brand-mark {
  display: inline-grid; place-items: center; height: 30px; padding: 0 8px; background: #fff; color: var(--ink);
  font-family: var(--font-num); font-weight: 800; font-size: 1rem; letter-spacing: .02em; border-radius: 3px 3px 0 0;
  clip-path: polygon(0 0, 100% 0, 100% 82%, 88% 100%, 75% 82%, 62% 100%, 50% 82%, 38% 100%, 25% 82%, 12% 100%, 0 82%);
  padding-bottom: 4px;
}

.page-head { margin-bottom: 1rem; }
.page-head-row { display: flex; align-items: center; gap: .5rem; min-height: var(--tap); margin-bottom: .5rem; flex-wrap: wrap; }
.page-head-row h1 { margin: 0; flex: 1 1 auto; min-width: 0; overflow-wrap: break-word; }
.page-actions { flex-wrap: wrap; }
.page-actions { display: flex; gap: .5rem; align-items: center; }
.panel { background: var(--panel); border: 1px solid var(--line); border-radius: var(--r); padding: 16px; margin-bottom: 1rem; }
.panel h2 { margin-bottom: .75rem; }

.search-input { position: relative; display: flex; align-items: center; margin-bottom: .75rem; }
.search-input svg { position: absolute; left: 12px; color: var(--ink-3); pointer-events: none; }
.search-input input { padding-left: 42px; }
.filter-row { display: flex; gap: .5rem; flex-wrap: wrap; align-items: center; margin-bottom: .75rem; }
.filter-row select { width: auto; }
.pill { display: inline-flex; align-items: center; min-height: 40px; padding: 0 14px; border-radius: 20px; background: #fff; border: 1.5px solid var(--line); color: var(--ink); text-decoration: none; font-weight: 600; font-size: .9rem; white-space: nowrap; }
.pill.on { background: var(--ink); border-color: var(--ink); color: #fff; }

/* ---------------- quantity numerals ---------------- */
.qty { display: flex; flex-direction: column; align-items: flex-end; min-width: 64px; line-height: 1; flex: none; }
.qty-num { font-family: var(--font-num); font-weight: 750; font-size: 1.9rem; font-variant-numeric: tabular-nums; font-stretch: condensed; letter-spacing: -0.01em; }
.qty-unit { font-size: .78rem; font-weight: 650; color: var(--ink-2); margin-top: 2px; }

/* ---------------- shopping list ---------------- */
.list-head { position: sticky; top: 52px; z-index: 10; background: var(--bg); padding-top: 4px; margin: -16px -16px 0; padding: 12px 16px 4px; }
@media (min-width: 900px) { .list-head { top: 53px; margin: -24px -32px 0; padding: 16px 32px 4px; } }
.add-bar {
  width: 100%; display: flex; align-items: center; gap: .7rem; min-height: 58px; padding: 0 8px 0 14px; border-radius: var(--r);
  border: 2px solid var(--ink); background: #fff; color: var(--ink-2); font: inherit; font-size: 1.05rem; cursor: pointer; text-align: left;
}
.add-bar span:nth-child(2) { flex: 1; }
.add-bar-plus { background: var(--action); color: #fff; width: 44px; height: 44px; border-radius: 8px; display: grid; place-items: center; }
.add-bar:disabled { opacity: .6; }
.list-tools { display: flex; justify-content: space-between; align-items: center; gap: .5rem; margin: .75rem 0 .25rem; flex-wrap: wrap; font-size: .9rem; }
.list-tabs { display: flex; gap: .4rem; overflow-x: auto; padding-bottom: 8px; scrollbar-width: none; }
.list-tab { display: inline-flex; align-items: center; gap: .4rem; min-height: 40px; padding: 0 14px; border-radius: 20px; background: #fff; border: 1.5px solid var(--line); color: var(--ink); text-decoration: none; font-weight: 650; white-space: nowrap; font: inherit; cursor: pointer; }
.list-tab.on { background: var(--ink); color: #fff; border-color: var(--ink); }
.list-tab .count { font-family: var(--font-num); font-weight: 700; opacity: .75; }

.group { margin-top: 1rem; }
.group-title { display: flex; justify-content: space-between; align-items: baseline; font-size: .95rem; font-weight: 750; color: var(--ink); padding: 0 2px 6px; border-bottom: 2px solid var(--ink); margin: 0; }
.group-title .count { font-family: var(--font-num); color: var(--ink-2); }
.group-warn .group-title { color: var(--warn); border-color: var(--warn); }
.rows { list-style: none; margin: 0; padding: 0; background: var(--panel); border-radius: 0 0 var(--r) var(--r); }
.row { display: flex; align-items: stretch; border-bottom: 1px solid var(--line-2); position: relative; }
.row:last-child { border-bottom: 0; }
.row-urgent { background: linear-gradient(90deg, var(--urgent-soft), #fff 60%); }
.row-urgent::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 5px; background: var(--urgent); }
.row-main { flex: 1; min-width: 0; display: flex; align-items: center; gap: 14px; padding: 12px 8px 12px 10px; background: none; border: 0; font: inherit; color: inherit; text-align: left; cursor: pointer; }
.row-text { display: flex; flex-direction: column; min-width: 0; gap: 2px; flex: 1; }
.row-name { font-weight: 700; font-size: 1.02rem; display: flex; align-items: center; gap: .4rem; flex-wrap: wrap; }
.row-note { font-size: .9rem; color: var(--ink); background: var(--line-2); border-radius: 4px; padding: 1px 6px; align-self: flex-start; }
.row-meta { display: flex; flex-wrap: wrap; gap: 0 .9rem; font-size: .8rem; color: var(--ink-2); }
.row-stepper { display: flex; align-items: center; gap: 2px; padding-right: 6px; }
.step-btn { width: 48px; height: 48px; border-radius: 10px; border: 1.5px solid var(--line); background: #fff; display: grid; place-items: center; cursor: pointer; color: var(--ink); }
.step-btn:active:not(:disabled) { background: var(--line-2); }
.step-btn:disabled { opacity: .4; }

.list-footer {
  position: fixed; left: 0; right: 0; bottom: calc(var(--tabbar-h) + env(safe-area-inset-bottom)); z-index: 25;
  padding: 10px 16px; background: linear-gradient(rgba(233,237,239,0), var(--bg) 30%);
}
@media (min-width: 900px) { .list-footer { position: sticky; bottom: 0; left: auto; right: auto; padding: 16px 0; max-width: 420px; margin-left: auto; } }

/* add sheet */
.add-search .results { list-style: none; margin: 0 0 .75rem; padding: 0; }
.result { width: 100%; display: flex; align-items: center; gap: .75rem; min-height: 60px; padding: 8px 6px; border: 0; border-bottom: 1px solid var(--line-2); background: none; font: inherit; color: inherit; text-align: left; cursor: pointer; }
.result:hover { background: var(--line-2); }
.result-text { display: flex; flex-direction: column; flex: 1; min-width: 0; }
.result-name { font-weight: 700; }
.result-meta { font-size: .82rem; color: var(--ink-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.on-list { font-family: var(--font-num); font-weight: 700; background: var(--ink); color: #fff; padding: 2px 8px; border-radius: 4px; font-size: .95rem; white-space: nowrap; }
.sheet-actions { display: flex; justify-content: space-between; gap: .75rem; margin-top: 1rem; position: sticky; bottom: 0; background: #fff; padding-top: .5rem; }
.sheet-actions .btn-primary { flex: 1; }

/* ---------------- sheet (dialog) ---------------- */
.sheet { border: 0; padding: 0; background: transparent; max-width: 100vw; max-height: 100dvh; width: 100%; margin: auto 0 0; }
.sheet::backdrop { background: rgba(20,28,34,.55); }
.sheet-inner { background: #fff; border-radius: 16px 16px 0 0; max-height: 92dvh; display: flex; flex-direction: column; padding-bottom: env(safe-area-inset-bottom); }
.sheet-head { display: flex; align-items: center; justify-content: space-between; gap: .5rem; padding: 12px 8px 4px 18px; }
.sheet-head h2 { margin: 0; font-size: 1.2rem; }
.sheet-body { padding: 8px 18px 16px; overflow-y: auto; }
.sheet-foot { display: flex; justify-content: space-between; gap: .75rem; padding: 12px 18px; border-top: 1px solid var(--line-2); }
.sheet-foot .btn-primary { flex: 1; }
.sheet[open] .sheet-inner { animation: rise .18s ease-out; }
@keyframes rise { from { transform: translateY(24px); opacity: .6; } to { transform: none; opacity: 1; } }
@media (min-width: 700px) {
  .sheet { width: 520px; margin: auto; }
  .sheet-wide { width: 760px; }
  .sheet-inner { border-radius: 14px; max-height: 86vh; }
  .sheet-foot .btn-primary { flex: none; }
}
@media (prefers-reduced-motion: reduce) { .sheet[open] .sheet-inner { animation: none; } .spinner { animation-duration: 2s; } }

/* ---------------- toasts ---------------- */
.toasts { position: fixed; left: 50%; transform: translateX(-50%); bottom: calc(var(--tabbar-h) + 84px + env(safe-area-inset-bottom)); z-index: 100; display: flex; flex-direction: column; gap: .5rem; width: min(560px, calc(100vw - 24px)); pointer-events: none; }
@media (min-width: 900px) { .toasts { bottom: 24px; left: auto; right: 24px; transform: none; width: 380px; } }
.toast { display: flex; align-items: center; gap: .6rem; background: var(--ink); color: #fff; padding: 12px 14px; border-radius: var(--r-sm); box-shadow: 0 6px 20px rgba(20,28,34,.25); font-weight: 600; pointer-events: auto; }
.toast-error { background: var(--danger); }
.toast-info { background: var(--info); }
.toast span { flex: 1; }
.toast-action { background: #fff; color: var(--ink); border: 0; border-radius: 4px; font: inherit; font-weight: 700; padding: 6px 12px; min-height: 36px; cursor: pointer; }

/* ---------------- dashboard ---------------- */
.dash-greeting { font-size: 1.5rem; }
.list-hero { display: flex; align-items: center; gap: 1rem; background: var(--chrome); color: #fff; border-radius: var(--r); padding: 14px 16px; text-decoration: none; margin-bottom: 1rem; }
.list-hero-num { font-family: var(--font-num); font-weight: 800; font-size: 3rem; line-height: 1; min-width: 2ch; text-align: center; }
.list-hero-text { display: flex; flex-direction: column; flex: 1; }
.list-hero-text span { color: #C5D0D8; font-size: .9rem; }
.dash-grid { display: grid; gap: 1rem; }
.dash-grid .panel { margin: 0; }
@media (min-width: 1000px) { .dash-grid { grid-template-columns: 1.15fr 1fr; } .dash-grid .panel:last-child { grid-column: 1 / -1; } }
.bucket { border-bottom: 1px solid var(--line-2); padding: 4px 0; }
.bucket-head { display: flex; justify-content: space-between; align-items: center; min-height: 44px; text-decoration: none; color: var(--ink); font-weight: 700; }
.bucket-head .count { font-family: var(--font-num); font-size: 1.5rem; font-weight: 800; min-width: 2ch; text-align: right; color: var(--ink-3); }
.bucket-hot .bucket-head .count { color: var(--ink); background: var(--urgent); border-radius: 6px; padding: 0 8px; }
.bucket-list { list-style: none; margin: 0 0 6px; padding: 0; }
.bucket-list a { display: flex; gap: .6rem; align-items: center; min-height: 40px; color: var(--ink); text-decoration: none; padding: 0 4px; border-radius: 4px; font-size: .93rem; }
.bucket-list a:hover { background: var(--line-2); }
.bucket-list .mono-num, .table .mono-num { white-space: nowrap; }
.list-note { margin-top: 1rem; }
.value-line { display: flex; flex-wrap: wrap; align-items: baseline; gap: .5rem 1rem; padding: 12px 0 4px; }
.value-line strong { font-size: 1.6rem; }
.value-line small { flex-basis: 100%; }
.deadlines { list-style: none; margin: 0; padding: 0; }
.deadlines li { display: flex; align-items: center; gap: .9rem; padding: 10px 0; border-bottom: 1px solid var(--line-2); }
.dl-time { display: flex; flex-direction: column; align-items: center; min-width: 64px; padding: 6px 4px; border-radius: 8px; background: var(--line-2); line-height: 1.1; }
.dl-time strong { font-family: var(--font-num); font-size: 1.4rem; }
.dl-time small { font-size: .72rem; color: var(--ink-2); }
.deadlines li.soon .dl-time { background: var(--urgent); }
.deadlines li.soon .dl-time small { color: #2A2100; }
.dl-text { display: flex; flex-direction: column; flex: 1; min-width: 0; font-size: .92rem; }
.activity { list-style: none; margin: 0; padding: 0; }
.activity li { display: flex; justify-content: space-between; gap: 1rem; padding: 7px 0; border-bottom: 1px solid var(--line-2); font-size: .9rem; }
.activity time { white-space: nowrap; font-size: .8rem; }

/* ---------------- orders ---------------- */
.table { width: 100%; border-collapse: collapse; background: var(--panel); border-radius: var(--r); overflow: hidden; border: 1px solid var(--line); }
.table th { text-align: left; font-size: .8rem; font-weight: 700; color: var(--ink-2); padding: 10px 12px; border-bottom: 2px solid var(--line); background: #F6F8F9; }
.table td { padding: 12px; border-bottom: 1px solid var(--line-2); vertical-align: middle; }
.table .num { text-align: right; }
.table tr.clickable { cursor: pointer; }
.table tr.clickable:hover td { background: #F6F8F9; }
.table.compact td { padding: 6px 8px; font-size: .9rem; }
.urgent-icon { color: var(--warn); vertical-align: -2px; margin-left: 4px; }
.orders-table { display: none; }
.order-cards { list-style: none; margin: 0; padding: 0; display: grid; gap: .6rem; }
.order-card { display: flex; flex-direction: column; gap: 4px; padding: 14px; background: var(--panel); border: 1px solid var(--line); border-radius: var(--r); color: var(--ink); text-decoration: none; }
.oc-top { display: flex; justify-content: space-between; align-items: center; }
.oc-top .mono-num { font-size: 1.15rem; }
.oc-supplier { font-size: 1.05rem; }
.oc-meta { font-size: .88rem; }
@media (min-width: 900px) { .orders-table { display: table; } .order-cards { display: none; } }

/* the ticket */
.order-layout { display: grid; gap: 1rem; }
@media (min-width: 1000px) { .order-layout { grid-template-columns: minmax(0, 1.6fr) minmax(300px, 1fr); align-items: start; } .order-side { position: sticky; top: 72px; } }
.ticket {
  background: #fff; position: relative; padding-top: 14px; border-radius: 0 0 var(--r) var(--r);
  box-shadow: 0 1px 0 var(--line), 0 10px 24px -14px rgba(29,39,48,.35);
}
.ticket::before {
  content: ""; position: absolute; left: 0; right: 0; top: -9px; height: 10px;
  background: radial-gradient(circle at 9px 0, transparent 7px, #fff 7.5px) 0 0 / 18px 10px repeat-x;
}
.ticket-head { padding: 6px 18px 12px; border-bottom: 2px dashed var(--line); }
.ticket-supplier { font-size: 1.4rem; margin-bottom: .2rem; }
.ticket-facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: .75rem 1rem; padding: 14px 18px; border-bottom: 2px dashed var(--line); }
.fact { display: flex; flex-direction: column; gap: 4px; }
.fact-label { font-size: .8rem; color: var(--ink-2); font-weight: 600; }
.fact input[type=date] { max-width: 220px; }
.fact-warn strong { color: var(--danger); }
.ticket-lines { list-style: none; margin: 0; padding: 0; }
.tline { border-bottom: 1px solid var(--line-2); position: relative; }
.tline-urgent::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 5px; background: var(--urgent); }
.tline-main { width: 100%; display: flex; align-items: center; gap: 14px; padding: 12px 18px 12px 12px; background: none; border: 0; font: inherit; color: inherit; text-align: left; cursor: pointer; }
.tline-main:disabled { cursor: default; color: inherit; }
.tline-text { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.tline-price { display: flex; flex-direction: column; align-items: flex-end; white-space: nowrap; }
.ticket-pad { padding: 12px 18px; }
.totals { padding: 12px 18px; border-top: 2px dashed var(--line); }
.totals > div { display: flex; justify-content: space-between; padding: 3px 0; }
.totals-grand { font-weight: 800; font-size: 1.15rem; border-top: 1px solid var(--ink); margin-top: 4px; padding-top: 8px !important; }
.action-panel .btn-primary { margin-bottom: .6rem; }
.action-secondary { display: flex; flex-wrap: wrap; gap: .5rem; }
.doc-buttons { display: grid; gap: .5rem; margin: .5rem 0; }
.timeline { list-style: none; margin: 0; padding: 0; }
.timeline li { display: flex; gap: .7rem; padding: 6px 0; font-size: .9rem; }
.tl-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--ink-3); margin-top: 6px; flex: none; }
.radio-list { display: grid; gap: .4rem; margin-bottom: 1rem; }
.radio { display: flex; align-items: center; gap: .6rem; min-height: var(--tap); padding: 0 12px; border: 1.5px solid var(--line); border-radius: var(--r-sm); cursor: pointer; font-weight: 600; }
.radio.on { border-color: var(--action); background: var(--action-soft); }
.radio input { width: 20px; height: 20px; min-height: 0; }
.radio.inline { border: 0; padding: 0 6px; min-height: 40px; font-size: .9rem; }

/* ---------------- catalog & forms ---------------- */
.catalog-list { list-style: none; margin: 0; padding: 0; background: var(--panel); border: 1px solid var(--line); border-radius: var(--r); }
.catalog-list li + li { border-top: 1px solid var(--line-2); }
.catalog-row { display: flex; align-items: center; gap: .8rem; padding: 12px 10px 12px 16px; color: var(--ink); text-decoration: none; min-height: 64px; }
.catalog-row:hover { background: #F6F8F9; }
.catalog-price { display: flex; flex-direction: column; align-items: flex-end; white-space: nowrap; }
.form-page { max-width: 860px; }
.form-grid { display: grid; gap: 0 1rem; margin-bottom: 1rem; }
@media (min-width: 700px) { .form-grid { grid-template-columns: 1fr 1fr; } .span-2 { grid-column: 1 / -1; } }
.form-actions { display: flex; justify-content: flex-end; margin: 1rem 0 2rem; }
.offer { border: 1.5px solid var(--line); border-radius: var(--r); padding: 12px; margin-bottom: .75rem; }
.offer-head { display: flex; align-items: center; gap: .5rem; margin-bottom: .6rem; flex-wrap: wrap; }
.offer-head select { flex: 1; min-width: 180px; font-weight: 700; }
.offer-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 0 .75rem; }
.conv-row { display: flex; align-items: center; gap: .5rem; margin-bottom: .5rem; flex-wrap: wrap; }
.conv-row select, .conv-row input { width: auto; flex: 1; min-width: 80px; }
.inline-form { display: flex; gap: .5rem; align-items: center; margin-bottom: 1rem; flex-wrap: wrap; }
.inline-form input { flex: 1; min-width: 160px; }
.cat-list { list-style: none; margin: 0; padding: 0; background: var(--panel); border: 1px solid var(--line); border-radius: var(--r); }
.cat-list li { display: flex; align-items: center; gap: .5rem; padding: 6px 8px 6px 16px; min-height: 60px; border-bottom: 1px solid var(--line-2); flex-wrap: wrap; }
.cat-list li.inactive, .plain-list li.inactive { opacity: .6; }
.cat-actions { display: flex; align-items: center; }
.plain-list { list-style: none; margin: 0; padding: 0; }
.plain-list li { padding: 10px 0; border-bottom: 1px solid var(--line-2); }
.plain-list a { color: var(--ink); }
.split { display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap; }
.row-actions { display: flex; gap: .4rem; align-items: center; flex-wrap: wrap; }
.row-actions select { width: auto; min-height: 38px; padding: 4px 8px; }
.perm-list { list-style: none; margin: 0; padding: 0; }
.invite-link { display: block; word-break: break-all; background: #fff; border: 1px solid var(--line); padding: 8px; border-radius: 4px; margin: .5rem 0; font-size: .85rem; }
.menu-list { list-style: none; margin: 1rem 0; padding: 0; background: var(--panel); border-radius: var(--r); border: 1px solid var(--line); }
.menu-list li + li { border-top: 1px solid var(--line-2); }
.menu-list a, .menu-list button { display: flex; align-items: center; gap: .8rem; min-height: 60px; padding: 0 16px; width: 100%; background: none; border: 0; font: inherit; font-weight: 650; color: var(--ink); text-decoration: none; cursor: pointer; }
.menu-list a span, .menu-list button span { flex: 1; text-align: left; }

/* ---------------- auth ---------------- */
.auth-page, .center-page { min-height: 100vh; display: grid; place-items: center; padding: 24px 16px; }
.auth-card { width: 100%; max-width: 420px; background: #fff; border-radius: var(--r); padding: 28px 22px; border: 1px solid var(--line); }
.auth-brand { display: flex; align-items: center; gap: .6rem; font-weight: 800; font-size: 1.2rem; margin-bottom: 1.4rem; }
.auth-brand .brand-mark { background: var(--chrome); color: #fff; }
.auth-links { display: flex; flex-direction: column; align-items: flex-start; margin-top: 1rem; }
.lead { font-size: 1.1rem; }

/* ---------------- print document ---------------- */
.print-page { background: #fff; min-height: 100vh; }
.print-toolbar { display: flex; gap: .75rem; align-items: center; padding: 12px 16px; border-bottom: 1px solid var(--line); flex-wrap: wrap; position: sticky; top: 0; background: #fff; }
.doc { max-width: 800px; margin: 0 auto; padding: 32px 24px; color: #000; }
.doc-demo { border: 2px solid #000; padding: 6px 10px; font-weight: 800; text-align: center; margin-bottom: 18px; }
.doc-head { display: flex; justify-content: space-between; gap: 2rem; border-bottom: 3px solid #000; padding-bottom: 14px; margin-bottom: 18px; }
.doc-head h1 { font-size: 2rem; margin: 0; }
.doc-number { font-family: var(--font-num); font-weight: 800; font-size: 1.5rem; margin: 0; }
.doc-from { text-align: right; font-size: .92rem; }
.doc-meta { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; margin-bottom: 18px; font-size: .92rem; }
.doc-meta span, .doc-notes span { display: block; font-size: .78rem; color: #444; }
.doc-table { width: 100%; border-collapse: collapse; font-size: .95rem; }
.doc-table th { text-align: left; border-bottom: 2px solid #000; padding: 6px; font-size: .8rem; }
.doc-table td { border-bottom: 1px solid #bbb; padding: 8px 6px; vertical-align: top; }
.doc-table .num { text-align: right; }
.doc-qty { font-family: var(--font-num); font-weight: 800; font-size: 1.3rem; }
.doc-sub { color: #444; font-size: .85rem; }
.doc-note { font-style: italic; font-size: .88rem; }
.doc-totals { margin-top: 14px; text-align: right; font-size: .9rem; }
.doc-totals p { color: #444; font-size: .8rem; }
.doc-notes { margin-top: 18px; border: 1px solid #000; padding: 10px; }
.doc-foot { margin-top: 28px; font-size: .85rem; color: #444; }
@media print {
  .no-print, .toasts { display: none !important; }
  body, .print-page { background: #fff; }
  .doc { padding: 0; max-width: none; }
  @page { size: A4; margin: 16mm; }
}

/* ---------------- menu-driven list ---------------- */
.section-title { display: flex; align-items: baseline; gap: .5rem; font-size: 1.05rem; margin: 1.4rem 0 0; }
.section-title .count { font-family: var(--font-num); color: var(--ink-2); }
.check-panel { margin-top: .75rem; background: var(--panel); border: 2px solid var(--urgent); border-radius: var(--r); overflow: hidden; }
.check-head { display: flex; justify-content: space-between; align-items: flex-start; gap: .75rem; flex-wrap: wrap; padding: 12px 14px 10px; background: var(--urgent-soft); }
.check-head h2 { display: flex; align-items: center; gap: .5rem; margin: 0 0 2px; font-size: 1.05rem; }
.check-head p { margin: 0; }
.check-head-actions { display: flex; gap: .4rem; flex-wrap: wrap; }
.check-done { display: flex; align-items: center; gap: .5rem; padding: 12px 14px; margin: 0; color: var(--ok); font-weight: 600; }
.check-rows { list-style: none; margin: 0; padding: 0; }
.check-row { display: flex; align-items: center; gap: .5rem; border-top: 1px solid var(--line-2); padding-right: 8px; flex-wrap: wrap; }
.check-main { flex: 1 1 220px; min-width: 0; display: flex; align-items: center; gap: .75rem; padding: 10px 6px 10px 14px; background: none; border: 0; font: inherit; color: inherit; text-align: left; cursor: pointer; }
.suggest { display: flex; flex-direction: column; align-items: flex-end; line-height: 1; min-width: 56px; flex: none; }
.suggest-num { font-family: var(--font-num); font-weight: 750; font-size: 1.45rem; color: var(--ink-2); font-variant-numeric: tabular-nums; }
.check-actions { display: flex; gap: .4rem; margin-left: auto; padding: 6px 0; }
.check-actions .btn { min-height: 44px; }
.dish-ref { font-style: italic; }
@media (max-width: 480px) { .check-actions { width: 100%; justify-content: flex-end; padding: 0 0 8px 14px; margin-top: -6px; } .check-actions .btn { min-width: 104px; } }

.dash-menu { display: flex; align-items: center; gap: .4rem; flex-wrap: wrap; margin: -.4rem 0 1rem; }

.menu-card-head { display: flex; justify-content: space-between; align-items: center; gap: .75rem; flex-wrap: wrap; }
.menu-card-head h2 { margin: 0; font-size: 1.3rem; }
.menu-off { opacity: .7; }
.menu-dishes, .menu-dishes ul { list-style: none; margin: 0; padding: 0; }
.course-group { margin: .75rem 0; }
.course-title { font-size: .85rem; color: var(--ink-2); margin: 0 0 .25rem; font-weight: 700; border-bottom: 2px solid var(--ink); padding-bottom: 4px; }
.menu-dish { display: flex; align-items: center; gap: .6rem; padding: 8px 0; border-bottom: 1px solid var(--line-2); flex-wrap: wrap; }
.menu-dish-name { flex: 1 1 140px; min-width: 0; display: flex; flex-direction: column; text-decoration: none; color: var(--ink); }
.menu-dish-actions { display: flex; align-items: center; gap: .2rem; }
.portions { display: flex; flex-direction: column; align-items: center; gap: 0; }
.portions input { width: 72px; min-height: 40px; text-align: center; font-family: var(--font-num); font-weight: 700; font-size: 1.15rem; padding: 4px; }
.portions small { font-size: .7rem; color: var(--ink-2); }

.ing-list { list-style: none; margin: 0 0 1rem; padding: 0; }
.ing-row { display: grid; grid-template-columns: 1fr auto; gap: .4rem .6rem; align-items: center; padding: 10px 0; border-bottom: 1px solid var(--line-2); }
.ing-name { grid-column: 1; }
.ing-row > .icon-btn { grid-column: 2; grid-row: 1; }
.ing-qty { display: flex; align-items: center; gap: .4rem; grid-column: 1 / -1; }
.ing-qty input { width: 84px; min-height: 42px; text-align: right; font-family: var(--font-num); font-weight: 700; font-size: 1.1rem; }
.ing-qty select { width: auto; min-height: 42px; }
.ing-note { grid-column: 1 / -1; min-height: 40px; font-size: .92rem; }
@media (min-width: 760px) {
  .ing-row { grid-template-columns: minmax(160px, 1.2fr) auto minmax(140px, 1fr) auto; }
  .ing-name, .ing-qty, .ing-note { grid-column: auto; }
  .ing-row > .icon-btn { grid-column: auto; grid-row: auto; }
}

/* ---------------- text size (Tilpas appen → Denne enhed) ---------------- */
html[data-text-size="large"] { font-size: 112.5%; }
html[data-text-size="xlarge"] { font-size: 125%; }

/* ---------------- sharing ---------------- */
.list-tools-right { display: flex; gap: .5rem; align-items: center; flex-wrap: wrap; }
.share-options { display: grid; gap: 0; margin-bottom: .5rem; }
.share-preview {
  white-space: pre-wrap; font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace; font-size: .85rem; line-height: 1.5;
  background: #F6F8F9; border: 1px solid var(--line); border-radius: var(--r-sm); padding: 12px; max-height: 40vh; overflow: auto; margin: 0 0 1rem;
}
.share-actions { display: grid; gap: .5rem; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); }

.check-group-title { display: flex; align-items: baseline; gap: .4rem; font-size: .85rem; font-weight: 750; margin: 0; padding: 10px 14px 4px; border-top: 1px solid var(--line); background: #FFFBEA; }
.check-group-title .count { font-family: var(--font-num); color: var(--ink-2); }
.check-group:first-child .check-group-title { border-top: 0; }

.cat-preview { display: flex; flex-wrap: wrap; gap: .4rem; list-style: none; padding: 0; margin: 0 0 1rem; counter-reset: cat; }
.cat-preview li { counter-increment: cat; background: var(--line-2); border-radius: 14px; padding: 4px 12px; font-weight: 650; font-size: .9rem; }
.cat-preview li::before { content: counter(cat) ". "; color: var(--ink-2); }
.menu-list.flat { margin: 0; border: 0; }

/* printable shopping list */
.list-doc h1 { font-size: 1.3rem; border-bottom: 3px solid #000; padding-bottom: 8px; }
.list-doc-groups { columns: 2 280px; column-gap: 32px; }
.list-doc-group { break-inside: avoid; margin-bottom: 18px; }
.list-doc-group h2 { font-size: 1rem; border-bottom: 2px solid #000; padding-bottom: 3px; margin: 0 0 6px; }
.list-doc-group ul { list-style: none; margin: 0; padding: 0; }
.list-doc-group li { display: flex; gap: 8px; align-items: baseline; padding: 4px 0; border-bottom: 1px solid #ccc; font-size: .95rem; }
.list-doc-qty { font-family: var(--font-num); font-weight: 800; min-width: 74px; white-space: nowrap; }
.tick { width: 14px; height: 14px; border: 1.5px solid #000; border-radius: 2px; flex: none; transform: translateY(2px); }

/* ---------------- front page (logo image) ---------------- */
.auth-page.has-hero { display: block; place-items: normal; padding: 0; min-height: 100vh; background: var(--chrome); }
.auth-hero { position: relative; height: min(46vh, 420px); overflow: hidden; }
.auth-hero img { width: 100%; height: 100%; object-fit: cover; object-position: center 42%; display: block; }
.auth-hero::after { content: ""; position: absolute; inset: auto 0 0 0; height: 40%; background: linear-gradient(transparent, var(--chrome)); }
.auth-page.has-hero .auth-card { position: relative; margin: -56px auto 32px; width: calc(100% - 32px); box-shadow: 0 18px 40px -20px rgba(0,0,0,.5); }
@media (min-width: 900px) {
  .auth-page.has-hero { display: grid; grid-template-columns: 1.1fr 1fr; align-items: center; }
  .auth-hero { height: 100vh; }
  .auth-hero::after { display: none; }
  .auth-page.has-hero .auth-card { margin: 0 auto; }
}
.front-banner { position: relative; margin: -4px 0 1rem; border-radius: var(--r); overflow: hidden; height: 150px; background: var(--chrome); }
.front-banner img { width: 100%; height: 100%; object-fit: cover; object-position: center 45%; display: block; }
@media (min-width: 900px) { .front-banner { height: 230px; } }
.theme-swatches { display: flex; gap: .6rem; flex-wrap: wrap; }
.swatch { display: flex; align-items: center; gap: .5rem; min-height: 48px; padding: 0 14px 0 8px; border: 2px solid var(--line); border-radius: 24px; background: #fff; font: inherit; font-weight: 650; cursor: pointer; }
.swatch[aria-checked="true"] { border-color: var(--ink); }
.swatch-dots { display: inline-flex; }
.swatch-dots span { width: 22px; height: 22px; border-radius: 50%; border: 2px solid #fff; }
.swatch-dots span + span { margin-left: -8px; }
.front-preview { width: 100%; max-width: 420px; aspect-ratio: 16/9; object-fit: cover; border-radius: var(--r); border: 1px solid var(--line); display: block; margin-bottom: .75rem; background: var(--line-2); }
.file-btn { position: relative; overflow: hidden; }
.file-btn input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }

/* list date + previous list */
.list-date { display: flex; align-items: baseline; justify-content: space-between; gap: .5rem; flex-wrap: wrap; margin: .6rem 0 0; }
.list-date strong { font-size: 1.05rem; }
.list-date a { font-size: .9rem; font-weight: 600; }
.status-pill { font-size: .75rem; font-weight: 700; padding: 1px 8px; border-radius: 10px; white-space: nowrap; }
.st-to_buy { background: var(--urgent-soft); color: var(--urgent-ink); }
.st-ordered { background: var(--info-soft); color: var(--info); }
.st-unchecked { background: var(--line-2); color: var(--ink-2); }
.st-skipped { background: var(--ok-soft); color: var(--ok); }

.demo-picker { margin: .5rem 0 1.25rem; padding-bottom: 1rem; border-bottom: 1px solid var(--line); }
.demo-picker .stack { margin-bottom: .5rem; }

/* trial version: the hosting page cannot open the print dialog */
html[data-trial] .print-action { display: none !important; }

/* receipt scanning */
.member-title { font-weight: 600; color: var(--ink-2); }
.receipt-start { text-align: center; display: grid; gap: .8rem; justify-items: center; }
.receipt-start .stack { width: 100%; max-width: 420px; }
.receipt-reading { display: grid; justify-items: center; gap: .5rem; text-align: center; padding: 48px 16px; }
.spinner-lg { width: 44px; height: 44px; border-width: 4px; color: var(--action, var(--chrome)); }
.callout-ok { background: var(--ok-soft); color: #0F4D2A; }
.receipt-lines { list-style: none; margin: 0 0 .75rem; padding: 0; display: grid; gap: .6rem; }
.receipt-line { background: #fff; border: 1px solid var(--line); border-radius: var(--r-sm); padding: 12px; display: grid; gap: .55rem; }
.receipt-line.is-off { background: var(--bg); }
.receipt-line.is-off .receipt-line-price input { opacity: .6; }
.receipt-line-top { display: flex; flex-wrap: wrap; justify-content: space-between; gap: .25rem .75rem; align-items: baseline; }
.receipt-text { font-family: ui-monospace, Menlo, Consolas, monospace; font-size: .92rem; font-weight: 700; background: var(--line-2); padding: 2px 6px; border-radius: 4px; }
.receipt-text-input { flex: 1; min-width: 0; }
.receipt-qty { font-size: .88rem; }
.receipt-line-product { display: flex; align-items: center; gap: .5rem; flex-wrap: wrap; }
.receipt-pick { display: inline-flex; align-items: center; gap: .4rem; min-height: 44px; padding: 6px 12px; border-radius: 10px; border: 1.5px solid var(--line); background: #fff; font: inherit; font-weight: 700; color: var(--ink); cursor: pointer; text-align: left; flex: 1; min-width: 0; }
.receipt-pick.is-empty { border-style: dashed; color: var(--ink-2); font-weight: 600; }
.receipt-line-price { display: grid; grid-template-columns: 1fr auto; gap: .4rem .75rem; align-items: center; }
.receipt-price { display: flex; align-items: center; gap: .5rem; flex-wrap: wrap; }
.receipt-price input { width: 7.5em; font-size: 1.1rem; font-weight: 700; text-align: right; }
.receipt-price span { font-size: .9rem; color: var(--ink-2); }
.receipt-old { font-size: .9rem; text-align: right; }
.receipt-note { grid-column: 1 / -1; margin: 0; font-size: .85rem; color: var(--warn); }
.receipt-include { grid-column: 1 / -1; display: flex; align-items: center; gap: .5rem; font-weight: 600; min-height: 36px; }
.receipt-include input { width: 22px; height: 22px; }
.receipt-result .num { text-align: right; white-space: nowrap; }
.sticky-actions {
  position: sticky; bottom: calc(var(--tabbar-h) + env(safe-area-inset-bottom)); z-index: 15; display: flex; justify-content: space-between; gap: .75rem;
  padding: 10px 0; background: linear-gradient(rgba(233,237,239,0), var(--bg) 30%);
}
.sticky-actions .btn-primary { flex: 1; max-width: 360px; }
@media (min-width: 900px) { .sticky-actions { bottom: 0; } }

/* compact list head: search + basket */
.list-head-row { display: flex; gap: .5rem; align-items: stretch; }
.list-head-row .add-bar { flex: 1; min-width: 0; }
.basket-btn { position: relative; flex: none; width: 58px; min-height: 58px; border-radius: var(--r); border: 2px solid var(--ink); background: #fff; color: var(--ink); display: grid; place-items: center; cursor: pointer; }
.basket-btn:active { background: var(--line-2); }
.basket-count { position: absolute; top: -7px; right: -7px; min-width: 24px; height: 24px; padding: 0 6px; border-radius: 12px; background: var(--action); color: #fff; font-family: var(--font-num); font-weight: 800; font-size: .95rem; display: grid; place-items: center; border: 2px solid var(--bg); }
.list-head { padding-bottom: 10px; }
.basket-sheet .basket-actions { display: grid; grid-template-columns: 1fr 1fr; gap: .5rem; margin: .25rem 0 1rem; }
.basket-sheet .field > .label { display: block; font-weight: 600; font-size: .92rem; margin-bottom: .35rem; }
.basket-lists a[aria-current="page"] { color: var(--action); }
.basket-lists .count { flex: none !important; font-family: var(--font-num); }

/* pickup ("vi henter selv") */
.pickup-cards { list-style: none; margin: .5rem 0 1rem; padding: 0; display: grid; gap: .5rem; }
.pickup-card { display: flex; align-items: center; gap: .75rem; padding: 12px 12px 12px 14px; min-height: 64px; background: var(--panel); border: 1.5px solid var(--line); border-radius: var(--r); color: var(--ink); text-decoration: none; }
.pickup-card.is-backup { border-color: var(--urgent); background: var(--urgent-soft); }
.pickup-card.is-locked { border-style: dashed; }
.pickup-card-text { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.pickup-card-text small { color: var(--ink-2); font-size: .85rem; }
.pickup-card-count { display: flex; flex-direction: column; align-items: flex-end; line-height: 1.1; }
.pickup-card-count .mono-num { font-size: 1.6rem; }
.pickup-card-count small { font-size: .75rem; color: var(--ok); font-weight: 700; white-space: nowrap; }
.pickup-cards.compact .pickup-card { min-height: 52px; padding: 8px 10px; }
.pickup-cards.compact .pickup-card-count .mono-num { font-size: 1.3rem; }
.row-dest { display: inline-flex; align-items: center; gap: 3px; font-weight: 600; }
.pick-row { display: flex; align-items: stretch; border-bottom: 1px solid var(--line-2); flex-wrap: wrap; }
.pick-row:last-child { border-bottom: 0; }
.pick-main { flex: 1 1 240px; min-width: 0; display: flex; align-items: center; gap: 12px; padding: 12px 10px 12px 12px; background: none; border: 0; font: inherit; color: inherit; text-align: left; cursor: pointer; min-height: 64px; }
.pick-box { width: 34px; height: 34px; border-radius: 8px; border: 2.5px solid var(--ink-3); display: grid; place-items: center; flex: none; background: #fff; }
.pick-row.is-picked { background: var(--ok-soft); }
.pick-row.is-picked .pick-box { background: var(--ok); border-color: var(--ok); color: #fff; }
.pick-row.is-picked .row-name { text-decoration: line-through; color: var(--ink-2); }
.pick-move { align-self: center; margin: 0 10px 0 auto; min-height: 40px; padding: 0 12px; border-radius: 8px; border: 1.5px solid var(--line); background: #fff; font: inherit; font-weight: 650; font-size: .88rem; color: var(--ink-2); display: inline-flex; align-items: center; gap: 4px; cursor: pointer; }
@media (max-width: 480px) { .pick-move { margin: -6px 10px 10px 58px; } }
.st-bought { background: var(--ok-soft); color: var(--ok); }
.order-tabs { flex-wrap: wrap; }
.pickup-history { list-style: none; margin: .5rem 0 1rem; padding: 0; display: grid; gap: .5rem; }
.pickup-history details { background: var(--panel); border: 1.5px solid var(--line); border-radius: var(--r); }
.pickup-history summary { display: flex; align-items: center; gap: .75rem; padding: 12px 14px; min-height: 60px; cursor: pointer; list-style: none; }
.pickup-history summary::-webkit-details-marker { display: none; }
.pickup-history details[open] summary svg:last-child { transform: rotate(180deg); }
.pickup-history-body { padding: 0 14px 12px 50px; }
.pickup-history-body h3 { font-size: .85rem; color: var(--ink-2); margin: .5rem 0 .25rem; }
.pickup-history-body ul { list-style: none; margin: 0; padding: 0; }
.pickup-history-body li { padding: 3px 0; font-size: .95rem; }
.pickup-history-body .mono-num { display: inline-block; min-width: 4.5em; }
.order-tabs { display: grid; grid-template-columns: auto 1fr auto; gap: .4rem; }
.order-tabs .pill { white-space: normal; text-align: center; justify-content: center; line-height: 1.15; padding: 6px 14px; }
.urgent-supplier { max-width: 420px; }
.qc-row { display: grid; grid-template-columns: 1fr 1fr; gap: 0 .75rem; }
.qc-qty { text-align: center; font-family: var(--font-num); font-weight: 700; font-size: 1.3rem; }
.pickup-order-btn { margin: .25rem 0 1rem; }
.sent-status { display: flex; flex-wrap: wrap; align-items: center; gap: .35rem .5rem; margin-bottom: .75rem; }
.sent-new { flex-basis: 100%; color: var(--warn); }
.sent-badge { margin-left: .4rem; }
.pick-box { border-color: var(--ok); color: var(--ok); }
.pick-row.is-missing { background: var(--danger-soft); }
.pick-row.is-missing .pick-box { background: var(--danger); border-color: var(--danger); color: #fff; }
.pick-row.is-missing .row-name { color: var(--danger); }
.moved-group .rows { background: var(--danger-soft); }
.moved-group .pick-box { background: var(--danger); border-color: var(--danger); color: #fff; }
.moved-group .row-name { color: var(--danger); }

/* ---------------------------------------------------------------------
   Sign-in: Ejer/køkkenchef vs Medarbejder; staff names on the link
   --------------------------------------------------------------------- */
.who-switch { margin: -.2rem 0 1.1rem; }
.who-switch .segmented { width: 100%; }
.who-switch .segmented button { flex: 1; }
.staff-restaurant { display: flex; align-items: center; gap: .4rem; color: var(--ink-2); font-weight: 650; margin: 0 0 .25rem; }
.staff-q { font-size: 1.35rem; margin: 0 0 .9rem; }
.staff-names { list-style: none; margin: 0 0 1rem; padding: 0; display: grid; gap: .5rem; }
.staff-name { display: flex; align-items: center; gap: .8rem; width: 100%; min-height: 60px; padding: 8px 14px; background: var(--panel);
  border: 1px solid var(--line); border-radius: var(--r); font: inherit; color: var(--ink); text-align: left; cursor: pointer; }
.staff-name:hover { border-color: var(--action); background: var(--action-soft); }
.staff-name:disabled { opacity: .6; cursor: default; }
.staff-name-text { flex: 1; display: flex; flex-direction: column; }
.staff-name-text small { color: var(--ink-3); font-size: .85rem; }
.staff-avatar { flex: none; width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; background: var(--chrome); color: #fff; font-weight: 800; }
.pin-input { font-family: var(--font-num); font-size: 1.8rem; letter-spacing: .5em; text-align: center; }
.back-link { display: inline-flex; align-items: center; gap: .3rem; align-self: flex-start; }

/* Team: two access levels */
.access-explain { display: grid; gap: .9rem; }
.access-explain > div { display: flex; gap: .7rem; align-items: flex-start; }
.access-explain span { display: flex; flex-direction: column; }
.access-explain small { color: var(--ink-2); }
@media (min-width: 760px) { .access-explain { grid-template-columns: 1fr 1fr; } }
.staff-link-panel h2 { display: flex; align-items: center; gap: .4rem; }
.member-list { list-style: none; margin: 0; padding: 0; }
.member-row { display: flex; flex-wrap: wrap; gap: .4rem .8rem; align-items: center; padding: .7rem 0; }
.member-row + .member-row { border-top: 1px solid var(--line-2); }
.member-row.inactive { opacity: .65; }
.member-main { flex: 1 1 220px; min-width: 0; }
.member-sub { display: block; }
.member-links { display: flex; gap: 1rem; }
.member-row .row-actions { margin-left: auto; }
.panel h2 .count { font-weight: 600; font-size: .9em; }
.owner-invite { margin-top: .8rem; }
.more-note { margin-top: 1rem; }

/* Mere → Backoffice */
.bo-entry { display: flex; align-items: center; gap: .9rem; padding: 14px 16px; margin: 1rem 0 0; background: var(--chrome); color: #fff; border-radius: var(--r); text-decoration: none; }
.bo-entry span:nth-child(2) { flex: 1; display: flex; flex-direction: column; }
.bo-entry small { opacity: .8; }
.bo-entry-icon { width: 44px; height: 44px; border-radius: 10px; background: rgba(255,255,255,.14); display: grid; place-items: center; }
.rail-bo { background: rgba(255,255,255,.12); }

/* ---------------------------------------------------------------------
   Backoffice (#/bo): its own desktop-first layout
   --------------------------------------------------------------------- */
.bo { min-height: 100vh; display: grid; grid-template-columns: 1fr; background: var(--bg); }
.bo-side { background: var(--chrome); color: #fff; display: flex; flex-direction: column; }
.bo-brand { display: flex; align-items: center; gap: .7rem; padding: 14px 16px; }
.bo-brand .brand-mark { background: #fff; color: var(--chrome); }
.bo-brand span:last-child { display: flex; flex-direction: column; line-height: 1.2; }
.bo-brand small { opacity: .75; font-size: .85rem; }
.bo-nav { display: flex; gap: .25rem; overflow-x: auto; padding: 0 12px 10px; scrollbar-width: none; }
.bo-nav::-webkit-scrollbar { display: none; }
.bo-nav-group { display: contents; }
.bo-nav-label { display: none; }
.bo-link { display: flex; align-items: center; gap: .55rem; padding: 9px 12px; border-radius: 8px; color: rgba(255,255,255,.88); text-decoration: none;
  white-space: nowrap; font-weight: 600; background: none; border: 0; font: inherit; cursor: pointer; width: auto; }
.bo-link:hover { background: rgba(255,255,255,.1); color: #fff; }
.bo-link.on { background: #fff; color: var(--chrome); }
.bo-foot { display: none; }
.bo-main { min-width: 0; display: flex; flex-direction: column; }
.bo-top { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: 10px 16px; background: var(--panel); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 5; }
.bo-crumb { display: flex; align-items: center; gap: .35rem; color: var(--ink-2); font-weight: 600; min-width: 0; }
.bo-crumb a { color: var(--ink-2); }
.bo-content { padding: 16px; width: 100%; max-width: 1280px; }
.bo-content .form-page { max-width: 860px; }
@media (min-width: 900px) {
  .bo { grid-template-columns: 248px minmax(0, 1fr); }
  .bo-side { position: sticky; top: 0; height: 100vh; }
  .bo-brand { padding: 20px 18px 14px; }
  .bo-nav { flex-direction: column; overflow: auto; padding: 4px 12px; flex: 1; }
  .bo-nav-group { display: flex; flex-direction: column; gap: 2px; margin-bottom: .8rem; }
  .bo-nav-label { display: block; text-transform: uppercase; letter-spacing: .06em; font-size: .72rem; opacity: .6; padding: 4px 12px; }
  .bo-foot { display: flex; flex-direction: column; gap: 2px; padding: 12px; border-top: 1px solid rgba(255,255,255,.15); }
  .bo-user { padding: 8px 12px; display: flex; flex-direction: column; font-weight: 600; }
  .bo-user small { opacity: .7; font-weight: 500; }
  .bo-top { padding: 12px 32px; }
  .bo-top-app { display: none; }
  .bo-content { padding: 24px 32px 48px; }
}

.bo-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: .75rem; margin-bottom: 1rem; }
.bo-stat { display: grid; grid-template-columns: auto 1fr; grid-template-rows: auto auto; column-gap: .6rem; align-items: center; padding: 14px 16px;
  background: var(--panel); border: 1px solid var(--line); border-radius: var(--r); color: var(--ink); text-decoration: none; }
.bo-stat svg { grid-row: 1 / 3; color: var(--action); }
.bo-stat strong { font-size: 1.9rem; line-height: 1; font-family: var(--font-num); }
.bo-stat span { color: var(--ink-2); font-size: .9rem; }
.bo-stat:hover { border-color: var(--action); }
.bo-grid { display: grid; gap: 1rem; }
.bo-grid .panel { margin: 0; }
@media (min-width: 1000px) { .bo-grid { grid-template-columns: 1fr 1.3fr; align-items: start; } }
.bo-quick { display: flex; flex-wrap: wrap; gap: .5rem; }
.bo-todo li { padding: .5rem 0; }

.bo-filters { display: flex; flex-wrap: wrap; gap: .6rem; align-items: center; margin-top: .6rem; }
.bo-filters .search-input { flex: 1 1 240px; margin: 0; }
.bo-filters select { flex: 0 1 200px; }
.bo-table-wrap { overflow-x: auto; background: var(--panel); border: 1px solid var(--line); border-radius: var(--r); }
.bo-table { width: 100%; border-collapse: collapse; font-size: .95rem; }
.bo-table th { text-align: left; font-size: .78rem; text-transform: uppercase; letter-spacing: .04em; color: var(--ink-3); font-weight: 700;
  padding: 10px 10px; border-bottom: 1px solid var(--line); background: var(--panel); position: sticky; top: 0; white-space: nowrap; }
.bo-table td { padding: 6px 10px; border-bottom: 1px solid var(--line-2); vertical-align: middle; }
.bo-table tr:last-child td { border-bottom: 0; }
.bo-table tr:hover td { background: #FAFAF8; }
.bo-table .num { text-align: right; }
.bo-table select, .bo-table input { min-height: 36px; padding: 4px 8px; font-size: .95rem; width: 100%; min-width: 110px; border-color: transparent; background: transparent; }
.bo-table select:hover, .bo-table input:hover, .bo-table select:focus, .bo-table input:focus { border-color: var(--line); background: #fff; }
.bo-name { min-width: 200px; font-weight: 650; }
.bo-name a { color: var(--ink); }
.bo-unit { font-family: var(--font-num); font-size: 1.05rem; }
.bo-price { display: inline-flex; align-items: center; gap: .2rem; justify-content: flex-end; }
.bo-price input { width: 90px; min-width: 90px; text-align: right; font-family: var(--font-num); font-size: 1.05rem; }
.bo-row-actions { white-space: nowrap; text-align: right; }
.bo-table tr.is-saving td { opacity: .55; }
.bo-table tr.is-skipped td { color: var(--ink-3); }
.bo-paste { width: 100%; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: .9rem; margin-top: .8rem; tab-size: 18; }
.bo-steps { margin: .4rem 0 1rem; padding-left: 1.2rem; color: var(--ink-2); }
.bo-callout { border-left: 4px solid var(--chrome); }
.bo-table tr.is-saved td { background: var(--ok-soft); transition: background .6s; }
.bo-saved { display: inline-flex; align-items: center; gap: .2rem; margin-left: .5rem; color: var(--ok); font-size: .82rem; font-weight: 700; }
.access-explain svg { flex: none; margin-top: 2px; color: var(--action); }
.bo { grid-template-columns: minmax(0, 1fr); }
.bo-side { min-width: 0; }
@media (min-width: 900px) { .bo { grid-template-columns: 248px minmax(0, 1fr); } }
.password-row { position: relative; }
.password-row input { width: 100%; padding-right: 72px; }
.show-password { position: absolute; right: 4px; top: 50%; transform: translateY(-50%); min-height: 40px; padding: 0 12px; background: none; border: 0; font: inherit; font-weight: 700; font-size: .9rem; color: var(--action); cursor: pointer; }
