/* ---------- Farver & grundværdier (Røret) ---------- */
:root {
  --bg: #fafaf8;
  --surface: #ffffff;
  --surface-2: #f3f2ee;
  --text: #171412;
  --muted: #6b645d;
  --border: #e7e4de;
  --tomato: #e8452c;      /* Røret-rød (accent) */
  --tomato-soft: #fdece8;
  --basil: #18946a;       /* grøn: klar / åben */
  --basil-soft: #e3f4ed;
  --crust: #d08a12;       /* rav: i gang / advarsel */
  --crust-soft: #fbf1dc;
  --on-accent: #ffffff;
  --sidebar: #141210;
  --sidebar-text: #ece6df;
  --sidebar-muted: #8f877e;
  --sidebar-active: #26221e;
  --shadow: 0 1px 2px rgb(23 20 18 / .05), 0 0 0 1px rgb(23 20 18 / .04);
  --radius: 14px;
  --radius-sm: 10px;
  --font-display: "Bricolage Grotesque", "Inter", system-ui, sans-serif;
  --font-body: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #121110;
    --surface: #1c1a18;
    --surface-2: #252220;
    --text: #f2eee9;
    --muted: #a39a90;
    --border: #34302b;
    --tomato: #ff6a52;
    --tomato-soft: #3d1c16;
    --basil: #4fd3a0;
    --basil-soft: #15322a;
    --crust: #f0b13f;
    --crust-soft: #3a2c12;
    --on-accent: #ffffff;
    --sidebar: #0b0a09;
    --sidebar-active: #221f1c;
    --shadow: 0 1px 2px rgb(0 0 0 / .4), 0 0 0 1px rgb(255 255 255 / .04);
    color-scheme: dark;
  }
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { height: 100%; }
body {
  margin: 0;
  font: 16px/1.5 var(--font-body);
  background: var(--bg);
  color: var(--text);
  -webkit-tap-highlight-color: transparent;
}
h1, h2, h3 { font-family: var(--font-display); font-weight: 700; margin: 0; line-height: 1.15; letter-spacing: -.025em; }
h1 { font-size: 1.9rem; }
h2 { font-size: 1.3rem; }
h3 { font-size: 1.1rem; }
.muted { color: var(--muted); }
.error { color: var(--tomato); min-height: 1.4em; }
a { color: inherit; }
code, pre { font-family: ui-monospace, Menlo, monospace; font-size: 13px; }
pre { background: var(--surface-2); border-radius: var(--radius-sm); padding: 14px; overflow: auto; white-space: pre-wrap; max-height: 480px; margin: 0; }

/* ---------- Formularer ---------- */
input, textarea, select {
  font: inherit; color: inherit; width: 100%;
  background: var(--surface); border: 1.5px solid var(--border); border-radius: var(--radius-sm);
  padding: 11px 13px; min-height: 48px;
}
input:focus, textarea:focus, select:focus { outline: none; border-color: var(--crust); box-shadow: 0 0 0 3px var(--crust-soft); }
textarea { min-height: 96px; resize: vertical; }
label { display: block; margin-bottom: 14px; font-weight: 600; font-size: 15px; }
label > input, label > textarea, label > select { margin-top: 6px; font-weight: 400; }
.hint { display: block; font-weight: 400; color: var(--muted); font-size: 13px; }

/* Vippekontakt (bruges i stedet for afkrydsningsfelter) */
.toggle { appearance: none; -webkit-appearance: none; width: 52px; min-height: 0; height: 30px; padding: 0; border-radius: 999px; border: 0; background: var(--border); position: relative; cursor: pointer; flex-shrink: 0; transition: background .15s; }
.toggle::after { content: ""; position: absolute; top: 3px; left: 3px; width: 24px; height: 24px; border-radius: 50%; background: var(--surface); box-shadow: 0 1px 3px rgb(0 0 0 / .25); transition: transform .15s; }
.toggle:checked { background: var(--basil); }
.toggle:checked::after { transform: translateX(22px); }
.toggle:focus { box-shadow: 0 0 0 3px var(--basil-soft); }
.toggle-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; font-weight: 600; margin-bottom: 14px; min-height: 48px; }

/* ---------- Knapper ---------- */
.btn {
  font: inherit; font-weight: 700; cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  min-height: 48px; padding: 0 20px; border-radius: var(--radius-sm);
  border: 1.5px solid var(--border); background: var(--surface); color: var(--text);
  transition: transform .05s, background .15s;
}
.btn:active { transform: scale(.97); }
.btn.primary { background: var(--tomato); border-color: var(--tomato); color: var(--on-accent); }
.btn.go { background: var(--basil); border-color: var(--basil); color: var(--on-accent); }
.btn.ghost { background: transparent; border-color: transparent; color: var(--muted); }
.btn.small { min-height: 40px; padding: 0 14px; font-size: 14px; }
.btn.danger { color: var(--tomato); }
.btn.block { width: 100%; }
.icon-btn { min-width: 44px; padding: 0 10px; }

/* ---------- App-skal ---------- */
.app { display: grid; grid-template-columns: 240px 1fr; min-height: 100vh; }

.sidebar {
  background: var(--sidebar); color: var(--sidebar-text);
  display: flex; flex-direction: column; gap: 24px;
  padding: 22px 14px; position: sticky; top: 0; height: 100vh;
}
.brand { display: flex; align-items: center; gap: 12px; padding: 0 8px; }
.brand-mark { font-size: 30px; line-height: 1; }
.roeret-mark { width: 36px; height: 36px; border-radius: 10px; background: #e8452c; color: #fff; display: inline-grid; place-items: center; transform: rotate(-8deg); flex-shrink: 0; }
.roeret-mark svg { width: 19px; height: 19px; }
.brand-text { display: flex; flex-direction: column; min-width: 0; }
.brand-text strong { font-family: var(--font-display); font-size: 1.1rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.brand-text small { color: var(--sidebar-muted); font-size: 12px; }

.nav { display: flex; flex-direction: column; gap: 4px; }
.nav button, .nav-link {
  font: inherit; font-weight: 600; color: var(--sidebar-muted);
  display: flex; align-items: center; gap: 14px;
  background: none; border: 0; border-radius: var(--radius-sm);
  min-height: 52px; padding: 0 14px; cursor: pointer; text-align: left; width: 100%;
}
.nav button:hover, .nav-link:hover { color: var(--sidebar-text); }
.nav button.active { background: var(--sidebar-active); color: #fff; }
.nav button.active svg { stroke: var(--crust); }
.nav svg, .nav-link svg { width: 24px; height: 24px; flex-shrink: 0; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.badge { margin-left: auto; background: var(--tomato); color: #fff; border-radius: 999px; min-width: 24px; height: 24px; padding: 0 7px; font-size: 13px; display: grid; place-items: center; }

.sidebar-foot { margin-top: auto; display: flex; flex-direction: column; gap: 8px; }
.status-pill {
  font: inherit; font-weight: 700; cursor: pointer;
  display: flex; align-items: center; gap: 10px; justify-content: center;
  min-height: 52px; border-radius: 999px; border: 0;
  background: var(--basil); color: #fff;
}
.status-pill .dot { width: 10px; height: 10px; border-radius: 50%; background: #fff; box-shadow: 0 0 0 4px rgb(255 255 255 / .25); }
.status-pill.closed { background: var(--sidebar-active); color: var(--sidebar-muted); }
.status-pill.closed .dot { background: var(--tomato); box-shadow: none; }

.main { min-width: 0; padding: 28px 32px 48px; }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 24px; }
.page-head p { margin: 4px 0 0; }
.page-actions { display: flex; gap: 10px; flex-wrap: wrap; }

.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 20px; box-shadow: var(--shadow); }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 14px; flex-wrap: wrap; }
.stack > * + * { margin-top: 18px; }
.grid-2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(340px, 1fr)); gap: 20px; align-items: start; }
.empty { text-align: center; color: var(--muted); padding: 28px 12px; border: 2px dashed var(--border); border-radius: var(--radius); }

/* ---------- Ordretavle ---------- */
.board { display: grid; grid-template-columns: repeat(auto-fit, minmax(270px, 1fr)); gap: 18px; align-items: start; }
.column { background: var(--surface-2); border-radius: var(--radius); padding: 14px; min-height: 240px; }
.column-head { display: flex; align-items: center; gap: 10px; padding: 4px 4px 14px; }
.column-head h2 { font-size: 1.15rem; }
.column-head .count { margin-left: auto; font-weight: 700; background: var(--surface); border-radius: 999px; padding: 2px 12px; }
.column[data-status="new"] .column-head h2::before { content: "●"; color: var(--tomato); margin-right: 8px; }
.column[data-status="accepted"] .column-head h2::before { content: "●"; color: var(--crust); margin-right: 8px; }
.column[data-status="ready"] .column-head h2::before { content: "●"; color: var(--basil); margin-right: 8px; }

/* Faner til ordretavlen – kun på stående tablet og mobil */
.board-tabs { display: none; gap: 6px; padding: 5px; background: var(--surface-2); border-radius: 16px; margin-bottom: 16px; position: sticky; top: 8px; z-index: 4; }
.board-tabs button { flex: 1; display: flex; align-items: center; justify-content: center; gap: 10px; font: 700 17px var(--font-body); color: var(--muted); background: none; border: 0; border-radius: 12px; min-height: 58px; padding: 0 10px; cursor: pointer; }
.board-tabs button[aria-selected="true"] { background: var(--surface); color: var(--text); box-shadow: var(--shadow); }
.tab-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--border); }
.tab-dot[data-status="new"] { background: var(--tomato); }
.tab-dot[data-status="accepted"] { background: var(--crust); }
.tab-dot[data-status="ready"] { background: var(--basil); }
.tab-count { min-width: 30px; height: 30px; padding: 0 9px; border-radius: 999px; background: var(--surface-2); display: inline-grid; place-items: center; font-size: 15px; }
.board-tabs button[aria-selected="true"] .tab-count { background: var(--surface-2); }
.board-tabs button.alert { color: var(--tomato); animation: tab-alert 1.4s ease-in-out infinite; }
.board-tabs button.alert .tab-count { background: var(--tomato); color: var(--on-accent); }
@keyframes tab-alert { 50% { background: var(--tomato-soft); } }
@media (max-width: 480px) {
  .board-tabs { gap: 4px; padding: 4px; }
  .board-tabs button { font-size: 15px; gap: 6px; padding: 0 6px; white-space: nowrap; }
  .tab-dot { display: none; }
  .tab-count { min-width: 26px; height: 26px; padding: 0 7px; font-size: 14px; }
}
@media (prefers-reduced-motion: reduce) { .board-tabs button.alert { animation: none; background: var(--tomato-soft); } }
@media (max-width: 1100px) and (orientation: portrait), (max-width: 760px) {
  .board-tabs { display: flex; }
  .board { grid-template-columns: 1fr; }
  .board .column:not(.is-active) { display: none; }
  .board .column { background: none; padding: 0; min-height: 0; }
  .board .column-head { display: none; }
}

.order { background: var(--surface); border-radius: var(--radius); box-shadow: var(--shadow); margin-bottom: 14px; overflow: hidden; border-top: 5px solid var(--border); }
.order[data-status="new"] { border-top-color: var(--tomato); }
.order[data-status="accepted"] { border-top-color: var(--crust); }
.order[data-status="ready"] { border-top-color: var(--basil); }
.order.flash { animation: flash .9s ease 4; }
@keyframes flash { 50% { box-shadow: 0 0 0 5px var(--tomato-soft), var(--shadow); } }
.order-body { padding: 14px 16px; }
.order-top { display: flex; align-items: center; gap: 6px 8px; flex-wrap: wrap; }
.order-top .tag, .order-top .age { white-space: nowrap; }
.order-num { font-family: var(--font-display); font-size: 1.7rem; font-weight: 700; line-height: 1; }
.age { margin-left: auto; font-weight: 700; font-size: 14px; color: var(--muted); }
.age.late { color: var(--tomato); }
.tag { display: inline-flex; align-items: center; gap: 4px; font-size: 13px; font-weight: 700; padding: 3px 10px; border-radius: 999px; }
.tag.delivery { background: var(--crust-soft); color: var(--crust); }
.tag.pickup { background: var(--basil-soft); color: var(--basil); }
.customer { margin-top: 10px; font-weight: 700; }
.customer a { font-weight: 400; color: var(--muted); text-decoration: none; }
.meta { color: var(--muted); font-size: 14px; margin-top: 2px; }
.lines { list-style: none; margin: 12px 0 0; padding: 12px 0 0; border-top: 1px dashed var(--border); }
.lines li { display: grid; grid-template-columns: 34px 1fr; padding: 4px 0; font-size: 17px; }
.lines .qty { font-weight: 800; color: var(--tomato); }
.lines small { display: block; font-size: 14px; color: var(--muted); }
.lines small.warn { display: inline-block; margin-top: 3px; background: var(--crust-soft); color: var(--text); font-weight: 700; padding: 1px 8px; border-radius: 6px; }
.order-note { margin-top: 10px; background: var(--crust-soft); border-radius: 8px; padding: 8px 10px; font-size: 14px; }
.order-foot { display: flex; align-items: center; gap: 10px; padding: 12px 16px; background: var(--surface-2); }
.order-foot .total { font-weight: 800; font-size: 18px; margin-right: auto; white-space: nowrap; }
.order-foot .btn:not(.icon-btn) { padding: 0 18px; }

/* ---------- Lister (menu, info, historik) ---------- */
.list { list-style: none; margin: 0; padding: 0; }
.list-row { display: flex; align-items: center; gap: 14px; padding: 12px 4px; border-top: 1px solid var(--border); min-height: 64px; }
.list-row:first-child { border-top: 0; }
.list-row.off { opacity: .5; }
.list-row .num { width: 36px; height: 36px; flex-shrink: 0; border-radius: 50%; display: grid; place-items: center; background: var(--surface-2); font-weight: 800; font-size: 14px; }
.list-row .main-col { flex: 1; min-width: 0; }
.list-row .title { font-weight: 700; }
.list-row .desc { color: var(--muted); font-size: 14px; }
.list-row .price { font-weight: 700; text-align: right; white-space: nowrap; }
.list-row .price small { display: block; font-weight: 400; color: var(--muted); font-size: 13px; }
.list-row .row-actions { display: flex; gap: 6px; }
.status-chip { font-size: 13px; font-weight: 700; padding: 3px 10px; border-radius: 999px; background: var(--surface-2); color: var(--muted); }
.status-chip.cancelled { background: var(--tomato-soft); color: var(--tomato); }

.info-card { border-left: 5px solid var(--crust); }
.info-card.off { border-left-color: var(--border); opacity: .6; }
.info-card p { margin: 8px 0 0; white-space: pre-wrap; }

/* ---------- Plan ---------- */

.segmented { display: inline-flex; background: var(--surface-2); border-radius: 999px; padding: 4px; }
.segmented button { font: inherit; font-weight: 700; border: 0; background: none; color: var(--muted); min-height: 44px; padding: 0 18px; border-radius: 999px; cursor: pointer; display: inline-flex; align-items: center; gap: 8px; }
.segmented button.active { background: var(--surface); color: var(--text); box-shadow: var(--shadow); }
.segmented button:disabled { opacity: .45; cursor: not-allowed; }
.segmented .save { font-size: 12px; font-weight: 800; color: var(--basil); background: var(--basil-soft); padding: 2px 8px; border-radius: 999px; }
.plan-bar { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-top: 28px; }
.bind-note { margin: 12px 0 0; font-size: 15px; }
.package .price s { font-weight: 600; font-size: 1rem; margin-right: 4px; }
.current-plan .small-value { font-size: 1.15rem; }
.current-plan .small-value .muted { font-family: var(--font-body); font-size: 14px; font-weight: 500; }
.current-plan { display: flex; flex-wrap: wrap; align-items: center; gap: 20px 32px; border-left: 5px solid var(--basil); }
.current-plan .label { font-size: 13px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .05em; }
.current-plan .value { font-family: var(--font-display); font-size: 1.5rem; font-weight: 700; }
.usage { flex: 1; min-width: 240px; }
.usage-bar { height: 12px; background: var(--surface-2); border-radius: 999px; overflow: hidden; margin: 8px 0 4px; }
.usage-bar span { display: block; height: 100%; background: var(--basil); border-radius: inherit; }
.usage-bar span.high { background: var(--crust); }
.usage-bar span.full { background: var(--tomato); }

.packages { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 18px; margin-top: 18px; }
.package { display: flex; flex-direction: column; gap: 10px; position: relative; border: 2px solid var(--border); }
.package.popular { border-color: var(--crust); }
.package.selected { border-color: var(--basil); }
.package .ribbon { position: absolute; top: -12px; left: 20px; background: var(--crust); color: #fff; font-size: 12px; font-weight: 800; padding: 3px 12px; border-radius: 999px; }
.package.selected .ribbon { background: var(--basil); }
.package .calls { font-family: var(--font-display); font-size: 2.4rem; font-weight: 700; line-height: 1; }
.package .calls small { font-family: var(--font-body); font-size: 15px; font-weight: 600; color: var(--muted); }
.package .price { font-size: 1.25rem; font-weight: 800; }
.package .price small { font-size: 14px; font-weight: 600; color: var(--muted); }
.package .btn { margin-top: auto; }


/* ---------- Super-admin ---------- */
.topbar { display: flex; align-items: center; justify-content: space-between; gap: 16px; background: var(--sidebar); color: var(--sidebar-text); padding: 12px 24px; position: sticky; top: 0; z-index: 5; }
.topbar .nav-link { width: auto; padding: 0 14px; }
.super-main { max-width: 1200px; margin: 0 auto; }
.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 18px; }
.kpi .label { font-size: 13px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .05em; }
.kpi .value { font-family: var(--font-display); font-size: 2rem; font-weight: 700; line-height: 1.2; margin: 4px 0; }
.kpi .muted { font-size: 14px; }
.search { width: min(340px, 100%); }
.stat-col { width: 130px; flex-shrink: 0; display: flex; flex-direction: column; align-items: flex-start; }
.stat-col small { color: var(--muted); font-size: 13px; }
.status-chip.warn { background: var(--crust-soft); color: var(--crust); }
.list-row .title .status-chip { margin-left: 6px; vertical-align: 2px; }
.setup-list { list-style: none; padding: 0; margin: 0 0 16px; display: grid; gap: 6px; }
.setup-list li { display: flex; align-items: center; gap: 10px; font-size: 14px; font-weight: 600; }
.setup-list span { width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; font-size: 12px; font-weight: 800; flex-shrink: 0; }
.setup-list .ok span { background: var(--basil-soft); color: var(--basil); }
.setup-list .missing span { background: var(--crust-soft); color: var(--crust); }
.setup-list .missing { color: var(--muted); }
.status-chip.on { background: var(--basil-soft); color: var(--basil); }
.ai-number { font-size: 1.1rem; margin: 0 0 6px; }
.ai-number strong { font-family: var(--font-display); font-size: 1.4rem; letter-spacing: -.01em; }
.codes { width: 100%; border-collapse: collapse; margin: 10px 0 8px; font-size: 15px; }
.codes td { padding: 9px 0; border-top: 1px solid var(--border); }
.codes td:last-child { text-align: right; }
.codes code { font-size: 15px; font-weight: 700; background: var(--surface-2); padding: 4px 8px; border-radius: 6px; }
.small-note { font-size: 13px; margin: 0 0 16px; }
.ai-card .btn { margin-top: 2px; }
.tag.src { background: var(--surface-2); color: var(--text); }
.tag.src-just-eat { background: #fff0e0; color: #b35600; }
.tag.src-wolt { background: #e0f4fc; color: #00729f; }
.tag.src-webshop { background: #ece8fb; color: #5b3fb8; }
.paid { font-size: 12px; font-weight: 800; color: var(--basil); background: var(--basil-soft); padding: 2px 8px; border-radius: 999px; vertical-align: 2px; margin-left: 4px; }
.copy-row { display: flex; gap: 8px; align-items: center; margin: 4px 0 12px; }
.copy-row code { flex: 1; font-size: 15px; font-weight: 700; background: var(--surface-2); padding: 10px 12px; border-radius: 10px; overflow-wrap: anywhere; }
.howto { border-top: 1px solid var(--border); padding: 12px 0 4px; }
.howto summary { cursor: pointer; font-weight: 700; }
.howto ol { margin: 10px 0 6px; padding-left: 20px; display: grid; gap: 8px; font-size: 15px; }
.sub-h { font-size: 1.05rem; margin: 18px 0 4px; }
.credentials { display: grid; grid-template-columns: auto 1fr; gap: 10px 18px; background: var(--surface-2); border-radius: var(--radius-sm); padding: 16px 18px; margin: 0 0 16px; }
.credentials dt { font-weight: 700; color: var(--muted); }
.credentials dd { margin: 0; word-break: break-all; }
.credentials .password { font-family: ui-monospace, Menlo, monospace; font-size: 1.15rem; font-weight: 700; letter-spacing: .05em; }
@media (max-width: 1100px) {
  .topbar .brand-text, .topbar .nav-link span { display: inline; }
  .topbar .brand-text { display: flex; }
}
@media (max-width: 640px) {
  .topbar { padding: 10px 16px; }
  .topbar .brand { display: flex; }
  .super-main { padding-bottom: 40px; }
  .super-main .list-row .main-col { flex-basis: 100%; }
  .stat-col { width: auto; flex: 1; }
  .kpis { gap: 12px; }
  .kpi .value { font-size: 1.6rem; }
}

/* ---------- Dialog ---------- */
dialog { border: 0; border-radius: var(--radius); background: var(--surface); color: var(--text); width: min(560px, calc(100vw - 32px)); padding: 26px; box-shadow: 0 20px 60px rgb(0 0 0 / .3); }
dialog::backdrop { background: rgb(20 18 16 / .5); }
dialog h2 { margin-bottom: 18px; }
.dialog-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 10px; }
dialog.wide { width: min(860px, calc(100vw - 32px)); }

/* ---------- Menukort-scanner ---------- */
.scan-drop { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; text-align: center; padding: 32px 16px; border: 2px dashed var(--crust); border-radius: var(--radius); background: var(--crust-soft); cursor: pointer; min-height: 180px; margin: 0; }
.scan-drop:hover { border-style: solid; }
.scan-drop-icon { font-size: 44px; line-height: 1; margin-bottom: 6px; }
.scan-drop strong { font-size: 1.1rem; }
.scan-drop .muted { font-weight: 400; font-size: 14px; }
.scan-files { list-style: none; margin: 12px 0 0; padding: 0; }
.scan-files li { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 4px 0 4px 4px; border-bottom: 1px solid var(--border); }
.scan-files li span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.scan-loading { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 8px; padding: 28px 8px 8px; }
.scan-loading h2 { margin: 10px 0 0; }
.spinner { width: 56px; height: 56px; border-radius: 50%; border: 5px solid var(--crust-soft); border-top-color: var(--tomato); animation: spin 0.9s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .spinner { animation-duration: 3s; } }
.scan-review { max-height: min(52vh, 560px); overflow: auto; border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 4px 14px; margin-bottom: 16px; }
.scan-review section + section { margin-top: 8px; }
.scan-cat { display: flex; align-items: center; gap: 12px; margin: 0; padding: 12px 0 4px; font-family: var(--font-display); font-size: 1.15rem; position: sticky; top: 0; background: var(--surface); z-index: 1; }
.scan-review .list-row { min-height: 56px; }
.scan-mode { border: 0; padding: 0; margin: 0 0 4px; display: grid; gap: 8px; }
.radio-row { display: flex; align-items: flex-start; gap: 12px; margin: 0; padding: 10px 12px; border: 1.5px solid var(--border); border-radius: var(--radius-sm); cursor: pointer; }
.radio-row:has(input:checked) { border-color: var(--crust); background: var(--crust-soft); }
.radio-row input { width: 22px; min-height: 22px; height: 22px; margin: 2px 0 0; accent-color: var(--tomato); flex-shrink: 0; }
.radio-row span { display: flex; flex-direction: column; }
.radio-row small { font-weight: 400; font-size: 13px; }
@media (min-width: 700px) { .scan-mode { grid-template-columns: 1fr 1fr; } }
@media (max-width: 640px) {
  dialog { padding: 20px 16px; }
  .scan-review { padding: 4px 10px; }
  .scan-review .list-row { flex-wrap: wrap; gap: 4px 12px; }
  .scan-review .list-row .num { display: none; }
  .scan-review .list-row .main-col { flex: 1 1 0; }
  .scan-review .list-row .price { width: 100%; padding-left: 64px; text-align: left; }
  .dialog-actions { flex-wrap: wrap; }
}

/* ---------- Login ---------- */
.login-page { display: grid; place-items: center; min-height: 100vh; padding: 16px; background: var(--sidebar); }
.login-card { width: min(400px, 100%); padding: 32px; }
.login-card h1 { margin-bottom: 4px; }
.login-card .brand-mark { font-size: 44px; display: grid; margin-bottom: 14px; width: 48px; height: 48px; }
.login-card .roeret-mark svg { width: 24px; height: 24px; }

/* ---------- Tablet (stående) & mindre: ikon-sidemenu ---------- */
@media (max-width: 1100px) {
  .app { grid-template-columns: 84px 1fr; }
  .sidebar { padding: 18px 10px; align-items: stretch; }
  .brand { justify-content: center; padding: 0; }
  .brand-text, .nav button span:not(.badge), .nav-link span { display: none; }
  .nav button, .nav-link { justify-content: center; padding: 0; position: relative; min-height: 60px; }
  .badge { position: absolute; top: 6px; right: 8px; margin: 0; }
  .status-pill { padding: 0; }
  .status-pill #accepting-label { display: none; }
  .status-pill .dot { width: 14px; height: 14px; }
  .main { padding: 22px 22px 40px; }
}

/* ---------- Mobil: bundmenu ---------- */
@media (max-width: 640px) {
  .app { grid-template-columns: 1fr; }
  .sidebar {
    position: fixed; inset: auto 0 0 0; height: auto; z-index: 10;
    flex-direction: row; padding: 6px 8px calc(6px + env(safe-area-inset-bottom)); gap: 4px;
  }
  .brand { display: none; }
  .nav { flex-direction: row; flex: 1; }
  .nav button { flex: 1; min-height: 56px; }
  .sidebar-foot { flex-direction: row; margin: 0; }
  .sidebar-foot .nav-link { display: none; }
  .status-pill { width: 56px; }
  .main { padding: 16px 16px 100px; }
  h1 { font-size: 1.5rem; }
  .grid-2 { grid-template-columns: 1fr; }
  .list-row { flex-wrap: wrap; }
  .list-row .row-actions { width: 100%; justify-content: flex-end; }
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .tag.src-just-eat { background: #3a2410; color: #ffb066; }
  :root:not([data-theme="light"]) .tag.src-wolt { background: #0f2f3d; color: #6fd0f5; }
  :root:not([data-theme="light"]) .tag.src-webshop { background: #2a2245; color: #b9a6ff; }
}
