/* Vewu HQ — all stil. Designvärdena överst, hämtade från vewu.se. */

/* ── tokens: mörkt är standard ───────────────────────── */
:root {
  --bg: #08080A;
  --bg-2: #0F0F12;
  --bg-3: #17171C;
  --fg: #F4F3EE;
  --fg-2: #CFCEC7;
  --mute: #93959E;
  --line: rgba(244, 243, 238, .10);
  --line-2: rgba(244, 243, 238, .22);
  --rec: #FF3B30;            /* accenten, bara till det som är viktigt */
  --rec-deep: #D3241A;
  --rec-svag: rgba(255, 59, 48, .14);
  --slojan: rgba(0, 0, 0, .6);

  --skugga-1: 0 1px 0 rgba(244, 243, 238, .04) inset, 0 10px 30px -18px rgba(0, 0, 0, .9);
  --skugga-2: 0 30px 60px -20px rgba(0, 0, 0, .7);

  --font: "Familjen Grotesk", "Helvetica Neue", Arial, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, Menlo, monospace;
  --text: 17px;
  --text-s: 15px;
  --text-xs: 13px;
  --rubrik-1: clamp(40px, 7vw, 64px);
  --rubrik-2: clamp(19px, 1.6vw, 22px);
  --radhojd: 1.5;
  --spatiering-tat: -0.04em;

  --r: 18px;
  --r-s: 12px;
  --pill: 999px;
  --rorlig: 44px;            /* minsta rör-yta */
  --gutter: clamp(16px, 4vw, 56px);
  --luft: clamp(28px, 4vw, 48px);
  --max: 1360px;

  --ease-out: cubic-bezier(.16, 1, .3, 1);
  --ease-spring: cubic-bezier(.34, 1.36, .64, 1);

  color-scheme: dark;
}

/* ljust: följer systemet tills man väljer själv, eller manuellt */
@media (prefers-color-scheme: light) {
  :root:not([data-theme="dark"]) {
    --bg: #F4F3EE;
    --bg-2: #FBFAF7;
    --bg-3: #E9E8E1;
    --fg: #08080A;
    --fg-2: #2A2A31;
    --mute: #64666E;
    --line: rgba(8, 8, 10, .08);
    --line-2: rgba(8, 8, 10, .18);
    --rec: #D3241A;
    --rec-svag: rgba(211, 36, 26, .10);
    --slojan: rgba(8, 8, 10, .35);
    --skugga-1: 0 1px 2px rgba(8, 8, 10, .04), 0 12px 32px -16px rgba(8, 8, 10, .16);
    --skugga-2: 0 30px 60px -24px rgba(8, 8, 10, .25);
    color-scheme: light;
  }
}
:root[data-theme="light"] {
  --bg: #F4F3EE;
  --bg-2: #FBFAF7;
  --bg-3: #E9E8E1;
  --fg: #08080A;
  --fg-2: #2A2A31;
  --mute: #64666E;
  --line: rgba(8, 8, 10, .08);
  --line-2: rgba(8, 8, 10, .18);
  --rec: #D3241A;
  --rec-svag: rgba(211, 36, 26, .10);
  --slojan: rgba(8, 8, 10, .35);
  --skugga-1: 0 1px 2px rgba(8, 8, 10, .04), 0 12px 32px -16px rgba(8, 8, 10, .16);
  --skugga-2: 0 30px 60px -24px rgba(8, 8, 10, .25);
  color-scheme: light;
}

/* ── grund ───────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; min-height: 100dvh;
  background: var(--bg); color: var(--fg);
  font-family: var(--font); font-size: var(--text); line-height: var(--radhojd);
  -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
  overflow-x: clip; caret-color: var(--rec);
}
h1, h2, p, ul, dl, dd { margin: 0; }
ul { padding: 0; list-style: none; }
a { color: inherit; }
button, input, select, textarea { font: inherit; color: inherit; }
[hidden] { display: none !important; }
:focus-visible { outline: 2px solid var(--fg); outline-offset: 3px; border-radius: 6px; }
.osynlig { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ── skal ────────────────────────────────────────────── */
.skal {
  position: sticky; top: 0; z-index: 10;
  display: flex; align-items: center; gap: 8px 20px; flex-wrap: wrap;
  max-width: var(--max); margin: 0 auto;
  padding: calc(10px + env(safe-area-inset-top)) var(--gutter) 10px;
  background: var(--bg);
}
.logo {
  display: inline-flex; align-items: center; gap: 10px; min-height: var(--rorlig);
  font-weight: 700; font-size: 23px; letter-spacing: -0.05em; text-decoration: none;
}
.logo .hq { color: var(--mute); font-weight: 500; letter-spacing: -0.02em; margin-left: 2px; }
.dot { width: 9px; height: 9px; border-radius: 50%; background: var(--rec); flex: none; }
.meny { display: flex; flex-wrap: wrap; gap: 2px; }
.meny a {
  display: inline-flex; align-items: center; justify-content: center; min-height: var(--rorlig); padding: 0 14px;
  border-radius: var(--pill); color: var(--mute); text-decoration: none; font-weight: 500;
  transition: color .2s ease, background-color .2s ease;
}
.meny a:hover { color: var(--fg); }
.meny a.aktiv { color: var(--fg); background: var(--bg-3); }
.meny a.rec-lank { gap: 8px; color: var(--fg-2); }
.meny a.rec-lank:hover { color: var(--fg); }
.verktyg { margin-left: auto; display: flex; gap: 4px; }

main { max-width: var(--max); margin: 0 auto; padding: 8px var(--gutter) calc(var(--luft) + env(safe-area-inset-bottom)); }
main.laddar > * { opacity: .5; transition: opacity .2s ease .15s; }
main > .vy { animation: in .45s var(--ease-out) both; }
@keyframes in { from { opacity: 0; transform: translateY(8px); } }

/* ── byggstenar ──────────────────────────────────────── */
.knapp {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: var(--rorlig); padding: 0 20px; border: 0; border-radius: var(--pill);
  background: var(--bg-3); color: var(--fg); font-weight: 600; font-size: var(--text-s); line-height: 1.1;
  text-decoration: none; text-align: center; cursor: pointer;
  transition: transform .5s var(--ease-spring), background-color .2s ease, opacity .2s ease;
}
.knapp.primar { background: var(--fg); color: var(--bg); }
.knapp.diskret { background: transparent; color: var(--mute); padding: 0 12px; }
.knapp.diskret:hover { color: var(--fg); }
.knapp:active { transform: scale(.97); }
.knapp:disabled { opacity: .55; cursor: default; transform: none; }
.lank-knapp {
  min-height: var(--rorlig); padding: 0 12px; border: 0; background: none;
  color: var(--mute); font-size: var(--text-s); cursor: pointer; border-radius: var(--pill);
}
.lank-knapp:hover { color: var(--fg); }
.chip {
  display: inline-flex; align-items: center; min-height: 26px; padding: 2px 10px;
  border-radius: var(--pill); background: var(--bg-3); color: var(--fg-2);
  font-size: var(--text-xs); font-weight: 600;
}
.chip.viktig { background: var(--rec-svag); color: var(--rec); }
.tomt { color: var(--mute); font-size: var(--text-s); }
.meta { color: var(--mute); font-size: var(--text-s); overflow-wrap: anywhere; }
.antal { color: var(--mute); font-family: var(--mono); font-size: var(--text-xs); font-weight: 400; margin-left: 8px; }
.overrubrik { color: var(--mute); font-size: var(--text-s); margin-bottom: 4px; display: block; }
.overrubrik a { text-decoration: none; }
.overrubrik a:hover { color: var(--fg); }
.falt {
  width: 100%; min-height: 52px; padding: 0 16px;
  border: 0; border-radius: var(--r-s); background: var(--bg-2); box-shadow: var(--skugga-1);
  font-size: var(--text); outline: none;
}
textarea.falt { padding: 14px 16px; min-height: 96px; resize: vertical; line-height: 1.45; }
select.falt { padding-right: 38px; appearance: none; cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1.5l5 5 5-5' fill='none' stroke='%2393959E' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-position: right 16px center; background-repeat: no-repeat; }
.falt::placeholder { color: var(--mute); }
.falt:focus { box-shadow: var(--skugga-1), 0 0 0 2px var(--line-2); }
.faltrad { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.faltrad label { color: var(--mute); font-size: var(--text-s); }
.tva { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.knapprad { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.stapel { display: flex; flex-direction: column; gap: 14px; }
.kort { padding: clamp(18px, 2vw, 26px); border-radius: var(--r); background: var(--bg-2); box-shadow: var(--skugga-1); display: flex; flex-direction: column; gap: 12px; }
.kort h2, .spalt h2, .tavlakolumn h2 { display: flex; align-items: baseline; font-size: var(--rubrik-2); font-weight: 600; letter-spacing: -0.02em; }
.radhuvud { display: flex; justify-content: space-between; align-items: center; gap: 12px; min-width: 0; }
.radhuvud > :first-child { min-width: 0; display: flex; flex-direction: column; }
.kryss { display: inline-flex; align-items: center; gap: 10px; min-height: var(--rorlig); color: var(--mute); font-size: var(--text-s); cursor: pointer; }
.kryss input { width: 20px; height: 20px; accent-color: var(--fg); }
.laddar-text::after { content: "…"; display: inline-block; animation: blink 1.2s steps(3, end) infinite; }
@keyframes blink { 50% { opacity: .3; } }
.toast {
  position: fixed; left: 50%; bottom: calc(20px + env(safe-area-inset-bottom)); transform: translateX(-50%);
  max-width: calc(100% - 2 * var(--gutter)); padding: 14px 20px; border-radius: var(--r-s);
  background: var(--fg); color: var(--bg); font-weight: 500; box-shadow: var(--skugga-2); z-index: 40;
  animation: in .35s var(--ease-out) both;
}
.toast.fel { background: var(--rec); color: #fff; }

/* filterchips */
.filter { display: flex; flex-wrap: wrap; gap: 6px; }
.filterval {
  display: inline-flex; align-items: center; min-height: var(--rorlig); padding: 0 16px;
  border: 0; border-radius: var(--pill); background: transparent; color: var(--mute);
  font-size: var(--text-s); font-weight: 500; cursor: pointer; box-shadow: inset 0 0 0 1px var(--line);
  transition: background-color .2s ease, color .2s ease;
}
.filterval:hover { color: var(--fg); }
.filterval[aria-selected="true"] { background: var(--bg-3); color: var(--fg); box-shadow: none; }

/* ark: dialog som glider upp */
.ark {
  width: min(560px, 100%); max-height: min(88dvh, 900px); padding: 0; border: 0;
  border-radius: var(--r); background: var(--bg-2); color: var(--fg); box-shadow: var(--skugga-2);
  animation: upp .4s var(--ease-out) both;
}
.ark::backdrop { background: var(--slojan); backdrop-filter: blur(4px); }
.arkinner { padding: 22px clamp(18px, 3vw, 28px) calc(22px + env(safe-area-inset-bottom)); display: flex; flex-direction: column; gap: 18px; }
.arkhuvud { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.arkhuvud h2 { font-size: 24px; letter-spacing: -0.03em; }
@keyframes upp { from { opacity: 0; transform: translateY(24px); } }
.prompttext { font-family: var(--mono); font-size: var(--text-xs); line-height: 1.6; min-height: 320px; }

/* ── vyhuvud ─────────────────────────────────────────── */
.vy { display: flex; flex-direction: column; gap: var(--luft); padding-top: clamp(12px, 3vw, 32px); }
.vyhuvud { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; flex-wrap: wrap; }
.vyhuvud h1 { font-size: var(--rubrik-1); line-height: 1; letter-spacing: var(--spatiering-tat); font-weight: 700; overflow-wrap: anywhere; }
.vyknappar { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }

/* ── inloggning ──────────────────────────────────────── */
.login { max-width: 440px; margin: clamp(24px, 10vh, 120px) auto 0; gap: 18px; }
.login h1 { font-size: clamp(34px, 6vw, 48px); line-height: 1.05; letter-spacing: var(--spatiering-tat); }
.ingress { color: var(--fg-2); }
.stapel > label { color: var(--mute); font-size: var(--text-s); }
.login .knapp { min-height: 52px; font-size: 16px; }
.kodfalt { font-family: var(--mono); font-size: 28px; letter-spacing: .3em; text-align: center; }
.loginfel { color: var(--rec); }
.loginhjalp { color: var(--mute); font-size: var(--text-s); }
.loginhjalp .lank-knapp { padding: 0; min-height: var(--rorlig); text-decoration: underline; text-underline-offset: 3px; }

/* ── Idag ────────────────────────────────────────────── */
.brief { padding: clamp(18px, 2vw, 26px); border-radius: var(--r); background: var(--bg-2); box-shadow: var(--skugga-1); display: flex; flex-direction: column; gap: 10px; }
.brief h2 { display: flex; align-items: center; gap: 10px; font-size: var(--text-s); font-weight: 600; color: var(--mute); }
.brief.av .dot { background: var(--mute); }
.brieftext, .svartext { white-space: pre-line; font-size: clamp(17px, 1.4vw, 19px); line-height: 1.55; color: var(--fg); }
.brief.av .brieftext { color: var(--mute); font-size: var(--text-s); }

.snabbrad { display: flex; gap: 10px; align-items: stretch; }
.snabbfaltram {
  position: relative; flex: 1; min-width: 0;
  display: flex; align-items: center; gap: 8px;
  border-radius: var(--r-s); background: var(--bg-2); box-shadow: var(--skugga-1);
}
.snabbfaltram:focus-within { box-shadow: var(--skugga-1), 0 0 0 2px var(--line-2); }
.snabbfalt { flex: 1; min-width: 0; min-height: 56px; background: transparent; box-shadow: none; font-size: 18px; }
.snabbfalt:focus { box-shadow: none; }
.snabbrad .knapp { min-height: 56px; }
.kundval { padding-left: 8px; flex: none; max-width: 45%; }
.kundchip {
  display: inline-flex; align-items: center; max-width: 100%; min-height: var(--rorlig); padding: 0 14px;
  border: 0; border-radius: var(--pill); background: var(--bg-3); color: var(--fg);
  font-size: var(--text-s); font-weight: 600; cursor: pointer;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.forslag {
  position: absolute; left: 0; right: 0; top: calc(100% + 8px); z-index: 5;
  padding: 6px; border-radius: var(--r-s); background: var(--bg-3); box-shadow: var(--skugga-2);
}
.forslag li { display: flex; align-items: center; min-height: var(--rorlig); padding: 0 14px; border-radius: 8px; cursor: pointer; overflow-wrap: anywhere; }
.forslag li.markerad { background: var(--bg-2); }
.forslag .forslag-tom { color: var(--mute); cursor: default; }

.spalter { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(16px, 2vw, 28px); align-items: start; }
.spalt { padding: clamp(18px, 2vw, 26px); border-radius: var(--r); background: var(--bg-2); box-shadow: var(--skugga-1); }
.spalt h2 { margin-bottom: 10px; }
.spalt.forsenat h2 .antal:not(:empty) { color: var(--rec); }
.tomrad { padding: 8px 0 4px; }

.rad { display: flex; align-items: flex-start; gap: 8px; padding: 4px 0; transition: opacity .35s var(--ease-out), transform .35s var(--ease-out); }
.rad + .rad { box-shadow: 0 -1px 0 var(--line); }
.bock { flex: none; position: relative; width: var(--rorlig); height: var(--rorlig); margin-left: -10px; border: 0; border-radius: 50%; background: none; cursor: pointer; }
.bock::before {
  content: ""; position: absolute; inset: 11px; border-radius: 50%;
  box-shadow: inset 0 0 0 1.5px var(--line-2);
  transition: background-color .2s ease, box-shadow .2s ease, transform .4s var(--ease-spring);
}
.bock:hover::before { box-shadow: inset 0 0 0 1.5px var(--fg-2); }
.bock[aria-pressed="true"]::before { background: var(--fg); box-shadow: none; transform: scale(.9); }
.bock:disabled { cursor: default; }
.radtext {
  flex: 1; min-width: 0; display: flex; flex-direction: column; align-items: flex-start;
  min-height: var(--rorlig); padding: 9px 0 8px; border: 0; background: none; text-align: left; cursor: pointer;
}
.titel { overflow-wrap: anywhere; line-height: 1.35; }
.rec { display: inline-block; width: 8px; height: 8px; margin: 0 8px 2px 0; border-radius: 50%; background: var(--rec); vertical-align: middle; }
.rad .chip { margin-top: 10px; }
.rad.klar { opacity: 0; transform: translateX(12px); transition-delay: .12s; }
.rad.klar .titel, .rad.gjord .titel { text-decoration: line-through; text-decoration-color: var(--mute); }
.rad.gjord { opacity: .6; }
.rad.sparar { opacity: .6; }
.spalt.vantar { background: transparent; box-shadow: none; padding: 0; }
.spalt.vantar .lista { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 0 clamp(16px, 2vw, 28px); }
.spalt.vantar .rad { box-shadow: 0 -1px 0 var(--line); }
details.klara summary { min-height: var(--rorlig); display: flex; align-items: center; color: var(--mute); cursor: pointer; }

/* ── listor och kort ─────────────────────────────────── */
.kortlista { display: flex; flex-direction: column; gap: 10px; }
.listkort {
  display: flex; flex-direction: column; gap: 4px; width: 100%; min-height: var(--rorlig);
  padding: 14px 16px; border: 0; border-radius: var(--r-s); background: var(--bg-2); box-shadow: var(--skugga-1);
  text-align: left; text-decoration: none; cursor: default;
}
button.listkort, a.listkort { cursor: pointer; transition: transform .4s var(--ease-spring); }
button.listkort:active, a.listkort:active { transform: scale(.99); }
.listkort.radhuvud { flex-direction: row; }
.kort .listkort { background: var(--bg-3); box-shadow: none; }
.enkellista { display: flex; flex-direction: column; }
.enkellista li { padding: 10px 0; display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.enkellista li + li { box-shadow: 0 -1px 0 var(--line); }
.logg li { font-size: var(--text-s); }
.poang { flex: none; min-width: 44px; height: 32px; padding: 0 10px; display: inline-flex; align-items: center; justify-content: center; border-radius: var(--pill); background: var(--bg-3); font-family: var(--mono); font-size: var(--text-s); }
.lankchips { display: flex; flex-wrap: wrap; gap: 8px; }
.lankchip {
  display: inline-flex; align-items: center; min-height: var(--rorlig); padding: 0 16px; border-radius: var(--pill);
  background: var(--bg-3); color: var(--fg); font-size: var(--text-s); font-weight: 500; text-decoration: none;
  transition: background-color .2s ease;
}
.lankchip:hover { background: var(--line-2); }

/* ── Kunder ──────────────────────────────────────────── */
.matare {
  display: grid; grid-template-columns: minmax(0, 260px) minmax(0, 1fr); gap: clamp(16px, 3vw, 40px); align-items: center;
  padding: clamp(18px, 2.5vw, 32px); border-radius: var(--r); background: var(--bg-2); box-shadow: var(--skugga-1);
}
.matarbild svg { width: 100%; height: auto; display: block; overflow: visible; }
.matarspar, .matarbage { fill: none; stroke-width: 14; stroke-linecap: round; }
.matarspar { stroke: var(--bg-3); }
.matarbage { stroke: var(--fg); stroke-dasharray: 100 100; transition: stroke-dashoffset 1.2s var(--ease-out); }
.matarinfo { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.matartal { font-size: clamp(36px, 6vw, 60px); font-weight: 700; letter-spacing: var(--spatiering-tat); line-height: 1; font-variant-numeric: tabular-nums; }
.kortnat { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 12px; }
.kundkort {
  display: flex; align-items: center; gap: 14px; min-height: 84px; padding: 16px;
  border-radius: var(--r); background: var(--bg-2); box-shadow: var(--skugga-1); text-decoration: none;
  transition: transform .45s var(--ease-spring), background-color .2s ease;
}
.kundkort:hover { transform: translateY(-2px); }
.kundkort:active { transform: scale(.99); }
.initial {
  flex: none; width: 48px; height: 48px; border-radius: 14px; display: grid; place-items: center;
  background: var(--kundfarg, var(--bg-3)); font-weight: 700; font-size: 20px; letter-spacing: -0.03em;
}
.kundkort-text { display: flex; flex-direction: column; min-width: 0; }
.kundnamn { font-weight: 600; overflow-wrap: anywhere; line-height: 1.3; }
.statusprick { display: inline-block; width: 7px; height: 7px; margin-right: 6px; border-radius: 50%; background: var(--fg); vertical-align: middle; }
.statusprick.pausad, .statusprick.avslutad { background: var(--mute); }
.statusprick.prospekt { background: transparent; box-shadow: inset 0 0 0 1.5px var(--fg-2); }

/* ── Kundkortet ──────────────────────────────────────── */
.kund { gap: 22px; }
.kundhuvud { align-items: flex-end; }
.intaktknapp { display: flex; flex-direction: column; align-items: flex-end; min-height: var(--rorlig); padding: 4px 8px; border: 0; background: none; cursor: pointer; border-radius: var(--r-s); }
.intaktknapp b { font-size: 24px; letter-spacing: -0.03em; }
.flikar { display: flex; flex-wrap: wrap; gap: 4px; box-shadow: 0 1px 0 var(--line); padding-bottom: 8px; }
.flik {
  display: inline-flex; align-items: center; min-height: var(--rorlig); padding: 0 14px;
  border: 0; border-radius: var(--pill); background: none; color: var(--mute); font-weight: 500; cursor: pointer;
}
.flik:hover { color: var(--fg); }
.flik[aria-selected="true"] { color: var(--fg); background: var(--bg-3); }
.flikinnehall > * { animation: in .3s var(--ease-out) both; }
.faktalista { display: grid; grid-template-columns: max-content minmax(0, 1fr); gap: 10px 24px; }
.faktalista dt { color: var(--mute); }
.faktalista dd { overflow-wrap: anywhere; }
.anteckningar { display: flex; flex-direction: column; gap: 10px; }
.anteckningar li { padding: 14px 16px; border-radius: var(--r-s); background: var(--bg-2); box-shadow: var(--skugga-1); display: flex; flex-direction: column; gap: 6px; }
.anteckningar p { white-space: pre-line; }

/* ── tavlor: Säljkedja och Leveranser ────────────────── */
.tavla { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); gap: 14px; align-items: start; }
.tavlakolumn { display: flex; flex-direction: column; gap: 10px; min-width: 0; padding: 14px; border-radius: var(--r); background: var(--bg-2); }
.tavlakolumn h2 { font-size: var(--text); }
.tavlalista { display: flex; flex-direction: column; gap: 10px; }
.tavlakort {
  display: flex; flex-direction: column; gap: 6px; padding: 14px; border-radius: var(--r-s);
  background: var(--bg); box-shadow: var(--skugga-1); min-width: 0;
}
.tavlakort b { overflow-wrap: anywhere; line-height: 1.3; }
.tavlakort .knapprad { margin-top: 4px; }
.tavlakort .knapp { min-height: var(--rorlig); padding: 0 14px; }
.nasta { font-size: var(--text-s); color: var(--fg-2); }
.nasta .overrubrik { margin-bottom: 0; font-size: var(--text-xs); }
.stegval { flex: 1 1 140px; min-width: 0; }
.stegval .falt { min-height: var(--rorlig); font-size: var(--text-s); }
.forslagsruta { display: flex; flex-direction: column; gap: 8px; padding-top: 8px; box-shadow: 0 -1px 0 var(--line); white-space: pre-line; font-size: var(--text-s); }
.forslagslista .listkort { background: var(--bg-3); box-shadow: none; }

/* ── Scan ────────────────────────────────────────────── */
.scanflode { display: flex; flex-direction: column; gap: 10px; }
.scanstegen { display: flex; flex-wrap: wrap; gap: 6px; }
.scansteg { padding: 6px 12px; border-radius: var(--pill); background: var(--bg-3); color: var(--mute); font-size: var(--text-s); transition: color .2s ease, background-color .2s ease; }
.scansteg[data-status="done"] { color: var(--bg); background: var(--fg); }
.scansteg[data-status="missing"] { color: var(--fg-2); box-shadow: inset 0 0 0 1px var(--line-2); background: transparent; }
.kort .snabbrad .falt { min-height: 52px; }

/* ── Kvitton ─────────────────────────────────────────── */
.larm {
  display: flex; align-items: center; gap: clamp(16px, 3vw, 28px);
  padding: clamp(18px, 2.5vw, 28px); border-radius: var(--r); background: var(--rec-svag);
}
.larmtal { font-size: clamp(56px, 9vw, 88px); font-weight: 700; line-height: .9; letter-spacing: -0.05em; color: var(--rec); font-variant-numeric: tabular-nums; }
.larmrubrik { font-size: clamp(19px, 2vw, 24px); font-weight: 600; color: var(--rec); letter-spacing: -0.02em; }
.larm.noll { background: var(--bg-2); }
.larm.noll .larmtal, .larm.noll .larmrubrik { color: var(--fg); }
.verktygsrad { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.verktygsrad .falt { width: auto; min-width: 140px; min-height: var(--rorlig); }
.kvittolista { display: flex; flex-direction: column; gap: 8px; }
.kvittorad {
  display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px 16px; align-items: start;
  padding: 14px 16px; border-radius: var(--r-s); background: var(--bg-2); box-shadow: var(--skugga-1);
}
.kvittorad.ejklar { box-shadow: var(--skugga-1), inset 3px 0 0 var(--rec); }
.kvittotext { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.kvittotext b { overflow-wrap: anywhere; }
.notering { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.kvittohoger { display: flex; flex-direction: column; align-items: flex-end; gap: 6px; }
.belopp { font-variant-numeric: tabular-nums; white-space: nowrap; }
.statusval { width: auto; min-height: var(--rorlig); font-size: var(--text-s); }

/* ── Team och AI ─────────────────────────────────────── */
.person.inaktiv { opacity: .55; }
.snabbfragor { display: flex; flex-wrap: wrap; gap: 6px; }
.aisvar { display: flex; flex-direction: column; gap: 12px; }

/* ── mobil ───────────────────────────────────────────── */
@media (max-width: 1100px) {
  .tavla { grid-auto-flow: row; grid-auto-columns: auto; grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 960px) {
  .spalter { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 720px) {
  .skal { gap: 4px 8px; padding-bottom: 6px; }
  .meny { order: 3; width: 100%; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 2px; }
  .meny a { padding: 0 4px; font-size: var(--text-s); }
  .tavla { grid-template-columns: minmax(0, 1fr); }
  .matare { grid-template-columns: minmax(0, 1fr); }
  .matarbild { max-width: 240px; }
}
@media (max-width: 560px) {
  .snabbrad { flex-direction: column; }
  .snabbrad .knapp { width: 100%; }
  .spalt.vantar .lista { grid-template-columns: minmax(0, 1fr); }
  .tva { grid-template-columns: minmax(0, 1fr); }
  .kvittorad { grid-template-columns: minmax(0, 1fr); }
  .kvittohoger { flex-direction: row; flex-wrap: wrap; align-items: center; justify-content: space-between; }
  .listkort.radhuvud { flex-direction: column; align-items: stretch; }
  .ark { margin: auto 0 0; width: 100%; max-width: 100%; border-radius: var(--r) var(--r) 0 0; }
  .vyhuvud { align-items: flex-start; }
  .faktalista { grid-template-columns: minmax(0, 1fr); gap: 2px; }
  .faktalista dd { margin-bottom: 10px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition-duration: .01ms !important; animation-duration: .01ms !important; }
}
