/* Lind & Lod OS: ett exempel på ett eget system för en byggfirma.
   Kundens system, inte Leadrions sajt: grafit, hårfina linjer, Geist och firmans ekfärg
   bara för det aktiva eller viktigaste. En nivå yta, inga gradienter, ingen oskärpa i appen. */
@font-face { font-family: "Geist"; src: url("../fonts/geist.woff2") format("woff2"); font-weight: 100 900; font-display: swap; }
@font-face { font-family: "Instrument Serif"; src: url("../fonts/instrument-serif.woff2") format("woff2"); font-weight: 400; font-display: swap; }

:root {
  --bg: #0E0F11; --side: #0A0B0C; --s1: #141518; --s2: #1A1C1F; --s3: #222428;
  --line: rgba(255,255,255,.07); --line-2: rgba(255,255,255,.12); --line-3: rgba(255,255,255,.2);
  --tx: #EDEEF0; --tx-2: #A9ACB3; --tx-3: #8B8F97;
  --ek: #E39257; --ek-bg: rgba(227,146,87,.12); --ek-ink: #1C0F06;
  --bla: #8AA8FF; --bla-bg: rgba(138,168,255,.12);
  --ok: #5FC38F; --ok-bg: rgba(95,195,143,.12); --warn: #E6B652; --warn-bg: rgba(230,182,82,.12); --bad: #F2857A; --bad-bg: rgba(242,133,122,.12);
  --e: cubic-bezier(.16,1,.3,1);
  --sans: "Geist", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif; --serif: "Instrument Serif", Georgia, serif;
  --bar-h: 52px; --r: 12px;
  /* Leadrions exempellist (Natt-ljus, samma som Norrviks lista) */
  --lx-salt: #E5E5DE; --lx-olive: #303B2E; --lx-dampad: #596256; --lx-pink: #FF4FAB;
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body { background: var(--bg); color: var(--tx); font: 400 14px/1.45 var(--sans); -webkit-font-smoothing: antialiased; overflow: hidden; font-kerning: normal; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
a { color: inherit; }
:focus-visible { outline: 2px solid var(--ek); outline-offset: 2px; }
[hidden] { display: none !important; }
h1, h2, h3 { text-wrap: balance; }
p, li { text-wrap: pretty; }
.skip { position: absolute; left: 8px; top: -60px; z-index: 300; padding: 10px 14px; border-radius: 8px; background: var(--tx); color: var(--bg); font-weight: 600; text-decoration: none; }
.skip:focus { top: 8px; }
.i { width: 18px; height: 18px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.num, .tbl td.r, .kpi b { font-variant-numeric: tabular-nums; }
.muted { color: var(--tx-3); }
.m-act, .show-m, .tbl td small.show-m { display: none; }

/* ---------- Leadrions exempellist ---------- */
.demo-bar { position: relative; z-index: 40; height: var(--bar-h); display: flex; align-items: center; gap: 16px; padding: 0 16px; padding-left: max(16px, env(safe-area-inset-left)); padding-right: max(16px, env(safe-area-inset-right)); background: var(--lx-salt); color: var(--lx-olive); border-bottom: 1px solid rgba(48,59,46,.14); font-size: 13px; }
.demo-word { flex: none; display: inline-flex; align-items: baseline; font: 400 22px/1 var(--serif); letter-spacing: -.01em; color: var(--lx-olive); text-decoration: none; padding: 8px 0; }
.demo-word span { width: 6px; height: 6px; margin-left: 2px; border-radius: 50%; background: var(--lx-pink); }
.demo-note { flex: 1; min-width: 0; margin: 0; display: flex; align-items: center; gap: 10px; color: var(--lx-dampad); }
.demo-note b { flex: none; font-weight: 600; font-size: 11px; letter-spacing: .08em; text-transform: uppercase; padding: 3px 7px; border-radius: 5px; background: rgba(48,59,46,.08); color: var(--lx-olive); }
.demo-note span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.demo-app { display: flex; gap: 6px; flex: none; }
.demo-chip { appearance: none; display: inline-flex; align-items: center; height: 36px; padding: 0 12px; border: 1px solid rgba(48,59,46,.22); border-radius: 8px; background: transparent; color: var(--lx-olive); font: 500 13px/1 var(--sans); white-space: nowrap; transition: background .3s var(--e); }
.demo-chip:hover { background: rgba(48,59,46,.07); }
.demo-cta { flex: none; display: inline-flex; align-items: center; height: 36px; padding: 0 14px; border-radius: 8px; background: var(--lx-olive); color: #F2F2ED; font-weight: 500; text-decoration: none; transition: background .3s var(--e); }
.demo-cta:hover { background: #1F271E; }
.demo-bar :focus-visible { outline-color: var(--lx-olive); }
.demo-chip .k, .demo-cta .k { display: none; }

.app-tips { position: fixed; inset: 0; z-index: 200; display: grid; place-items: center; padding: 16px; background: rgba(6,7,8,.6); }
.app-tips-box { width: min(420px, 100%); background: var(--s2); color: var(--tx); border-radius: 16px; padding: 24px; box-shadow: 0 0 0 1px var(--line-2), 0 30px 80px -20px rgba(0,0,0,.8); animation: pop .35s var(--e); }
.app-tips-box h2 { margin: 0 0 12px; font-size: 18px; font-weight: 600; letter-spacing: -.01em; }
.app-tips-box ol { margin: 0 0 12px; padding-left: 20px; display: grid; gap: 6px; }
.app-tips-box b { font-weight: 600; }
.app-tips-n { margin: 0 0 16px; font-size: 13px; color: var(--tx-2); }
@media (display-mode: standalone) { .demo-app [data-app-install] { display: none; } }

/* ---------- Appens skal ---------- */
.app { height: calc(100dvh - var(--bar-h)); display: grid; grid-template-columns: 240px 1fr; }
.side { display: flex; flex-direction: column; gap: 14px; padding: 14px 10px 12px; background: var(--side); border-right: 1px solid var(--line); min-height: 0; overflow-y: auto; }
.mark { width: 28px; height: 28px; flex: none; }
.mark .bg { fill: var(--s3); }
.brand { display: flex; align-items: center; gap: 10px; padding: 4px 8px; }
.brand b { display: block; font-weight: 600; font-size: 14px; letter-spacing: -.01em; } .brand small { display: block; color: var(--tx-3); font-size: 12px; }
.search { display: flex; align-items: center; gap: 8px; height: 36px; padding: 0 8px 0 10px; border: 0; border-radius: 8px; background: var(--s1); color: var(--tx-3); box-shadow: inset 0 0 0 1px var(--line); font-size: 13px; text-align: left; transition: color .2s, box-shadow .2s; }
.search span { flex: 1; }
.search:hover { color: var(--tx-2); box-shadow: inset 0 0 0 1px var(--line-2); }
.search .i { width: 16px; height: 16px; }
kbd { font: 500 11px/1 var(--sans); padding: 3px 5px; border-radius: 4px; background: var(--s3); box-shadow: inset 0 -1px 0 rgba(255,255,255,.06); color: var(--tx-2); }
.nav { display: grid; gap: 1px; }
.nav a { display: flex; align-items: center; gap: 10px; height: 34px; padding: 0 10px; border-radius: 7px; text-decoration: none; color: var(--tx-2); font-weight: 500; transition: background .2s, color .2s; }
.nav a:hover { background: var(--s1); color: var(--tx); }
.nav a.on { background: var(--s2); color: var(--tx); }
.nav a.on .i { color: var(--ek); }
.nav .kort { display: none; }
.nav em { margin-left: auto; min-width: 20px; height: 18px; padding: 0 6px; display: grid; place-items: center; border-radius: 9px; font: 500 11px/1 var(--sans); font-style: normal; color: var(--tx-2); background: var(--s2); font-variant-numeric: tabular-nums; }
.nav em:empty { display: none; }
.nav em.hot { background: var(--ek); color: var(--ek-ink); }
.side-foot { margin-top: auto; display: grid; gap: 8px; }
.side-k { margin: 0; padding: 0 10px; font-size: 11px; font-weight: 500; letter-spacing: .06em; text-transform: uppercase; color: var(--tx-3); }
.side-sys { list-style: none; margin: 0 0 4px; padding: 0 10px; display: grid; gap: 6px; font-size: 13px; color: var(--tx-2); }
.side-sys li { display: flex; align-items: center; gap: 8px; }
.side-sys i { width: 6px; height: 6px; border-radius: 50%; background: var(--ok); }
.me { display: flex; align-items: center; gap: 10px; padding: 10px 8px 2px; border-top: 1px solid var(--line); }
.me b { display: block; font-weight: 500; font-size: 13px; } .me small { display: block; color: var(--tx-3); font-size: 12px; }
.av { width: 28px; height: 28px; flex: none; border-radius: 50%; display: inline-grid; place-items: center; font: 600 11px/1 var(--sans); color: #fff; background: var(--c, #50545C); letter-spacing: .02em; }
.av.sm { width: 22px; height: 22px; font-size: 9.5px; }
.avs { display: inline-flex; } .avs .av { box-shadow: 0 0 0 2px var(--s1); } .avs .av + .av { margin-left: -6px; }

.main { min-width: 0; min-height: 0; display: flex; flex-direction: column; }
.top { flex: none; display: flex; align-items: center; gap: 16px; min-height: 56px; padding: 10px 28px; border-bottom: 1px solid var(--line); background: var(--bg); }
.top-mark, .top-search { display: none; }
.top-l { flex: 1; min-width: 0; display: flex; align-items: baseline; gap: 10px; }
.top h1 { margin: 0; font-size: 15px; font-weight: 600; letter-spacing: -.01em; white-space: nowrap; }
.top h1 a { color: var(--tx-2); text-decoration: none; font-weight: 500; } .top h1 a:hover { color: var(--tx); }
.top h1 .sep { color: var(--tx-3); margin: 0 6px; font-weight: 400; }
.top-sub { color: var(--tx-3); font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.top-r { display: flex; gap: 8px; flex: none; }
.content { flex: 1; min-height: 0; overflow-y: auto; padding: 24px 28px 64px; outline: none; scroll-behavior: smooth; }
.view { max-width: 1180px; margin: 0 auto; animation: v-in .45s var(--e) both; }
@keyframes v-in { from { opacity: 0; transform: translateY(6px); } }

/* ---------- Knappar och småkomponenter ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 7px; height: 32px; padding: 0 12px; border: 0; border-radius: 7px; font-weight: 500; font-size: 13px; background: var(--s2); box-shadow: inset 0 0 0 1px var(--line-2); color: var(--tx); text-decoration: none; white-space: nowrap; transition: background .2s, box-shadow .2s; }
.btn:hover { background: var(--s3); }
.btn .i { width: 15px; height: 15px; }
.btn.pri { background: var(--tx); color: var(--bg); box-shadow: none; }
.btn.pri:hover { background: #fff; }
.btn.ek { background: var(--ek); color: var(--ek-ink); box-shadow: none; }
.btn.ek:hover { background: #EDA270; }
.btn.ghost { background: none; box-shadow: none; color: var(--tx-2); } .btn.ghost:hover { color: var(--tx); background: var(--s2); }
.btn.sm { height: 28px; padding: 0 10px; font-size: 12.5px; }
.btn[disabled] { opacity: .5; cursor: default; }
.row { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.pill { display: inline-flex; align-items: center; gap: 6px; height: 22px; padding: 0 8px; border-radius: 6px; font-size: 12px; font-weight: 500; background: var(--s2); color: var(--tx-2); white-space: nowrap; }
.pill::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.pill.ok { color: var(--ok); background: var(--ok-bg); } .pill.warn { color: var(--warn); background: var(--warn-bg); }
.pill.ek { color: var(--ek); background: var(--ek-bg); } .pill.bla { color: var(--bla); background: var(--bla-bg); } .pill.bad { color: var(--bad); background: var(--bad-bg); }
.pill.plain::before { display: none; }
.tag { display: inline-flex; align-items: center; height: 20px; padding: 0 6px; border-radius: 5px; font-size: 11.5px; font-weight: 500; color: var(--tx-2); box-shadow: inset 0 0 0 1px var(--line-2); white-space: nowrap; }

/* Ytor: en nivå, hårfin kant, ingen gradient */
.grid { display: grid; gap: 16px; min-width: 0; }
.g2 { grid-template-columns: minmax(0, 1.55fr) minmax(0, 1fr); } .g2e { grid-template-columns: 1fr 1fr; } .g3 { grid-template-columns: repeat(3, minmax(0, 1fr)); } .g4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.card { background: var(--s1); border-radius: var(--r); box-shadow: inset 0 0 0 1px var(--line); min-width: 0; }
.card > h2, .card-h { margin: 0; padding: 14px 16px 0; font-size: 13px; font-weight: 600; color: var(--tx); display: flex; align-items: center; gap: 8px; min-height: 44px; }
.card > h2 small, .card-h small { color: var(--tx-3); font-weight: 400; font-size: 12.5px; }
.card > h2 .btn, .card-h .btn { margin-left: auto; }
.card > h2 small:last-child, .card-h small:last-child { margin-left: auto; }
.pad { padding: 16px; }
.cb { padding: 4px 16px 16px; }
.kpis { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); background: var(--s1); border-radius: var(--r); box-shadow: inset 0 0 0 1px var(--line); margin-bottom: 16px; }
.kpi { padding: 16px; min-width: 0; text-decoration: none; display: block; }
.kpi + .kpi { box-shadow: inset 1px 0 0 var(--line); }
a.kpi { transition: background .2s; } a.kpi:hover { background: var(--s2); }
.kpis > :first-child { border-radius: var(--r) 0 0 var(--r); } .kpis > :last-child { border-radius: 0 var(--r) var(--r) 0; }
.kpi small { display: block; color: var(--tx-2); font-size: 12.5px; }
.kpi b { display: block; margin-top: 6px; font-size: 26px; line-height: 1.05; font-weight: 600; letter-spacing: -.025em; }
.kpi span { display: block; margin-top: 6px; font-size: 12.5px; color: var(--tx-3); }
.kpi span.ok { color: var(--ok); } .kpi span.warn { color: var(--warn); }
.list { list-style: none; margin: 0; padding: 0; }
.list > li { display: flex; align-items: center; gap: 12px; padding: 11px 16px; min-height: 56px; box-shadow: inset 0 1px 0 var(--line); }
.list > li:first-child { box-shadow: none; }
.list .grow { flex: 1; min-width: 0; }
.list b { font-weight: 500; display: block; overflow: hidden; text-overflow: ellipsis; }
.list small { display: block; color: var(--tx-3); font-size: 12.5px; margin-top: 1px; }
.list .empty { color: var(--tx-3); min-height: 0; padding: 14px 16px 18px; }
.clickrow { cursor: pointer; transition: background .2s; } .clickrow:hover { background: rgba(255,255,255,.025); }
.list > li.clickrow:last-child { border-radius: 0 0 var(--r) var(--r); }
.bar { height: 6px; border-radius: 3px; background: var(--s3); overflow: hidden; }
.bar i { display: block; height: 100%; border-radius: 3px; background: var(--tx-2); transform-origin: left; animation: bar-in .8s var(--e) both; }
.bar i.ok { background: var(--ok); } .bar i.over, .bar i.warn { background: var(--warn); } .bar i.ek { background: var(--ek); }
@keyframes bar-in { from { transform: scaleX(0); } }
.tbl { width: 100%; border-collapse: collapse; }
.tbl th { text-align: left; font-weight: 500; font-size: 12px; color: var(--tx-3); padding: 10px 12px 8px 0; white-space: nowrap; }
.tbl th:first-child, .tbl td:first-child { padding-left: 16px; } .tbl th:last-child, .tbl td:last-child { padding-right: 16px; }
.tbl td { padding: 10px 12px 10px 0; box-shadow: inset 0 1px 0 var(--line); vertical-align: middle; }
.tbl td.r, .tbl th.r { text-align: right; }
.tbl td small { display: block; color: var(--tx-3); font-size: 12px; }
.tbl tr.new td { animation: hl 1.8s var(--e); }
.tbl .empty td { color: var(--tx-3); padding-top: 14px; padding-bottom: 18px; }
@keyframes hl { from { background: var(--ek-bg); } }
.sec-h { display: flex; align-items: baseline; gap: 10px; margin: 0 0 12px; }
.sec-h h2 { margin: 0; font-size: 22px; font-weight: 600; letter-spacing: -.02em; }
.sec-h p { margin: 0; color: var(--tx-3); }
.back { display: inline-flex; align-items: center; gap: 6px; border: 0; background: none; color: var(--tx-2); padding: 0; font-size: 13px; min-height: 32px; }
.back:hover { color: var(--tx); }

/* ---------- Idag ---------- */
.hello { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin: 4px 0 20px; }
.hello h2 { margin: 0; font-size: 26px; font-weight: 600; letter-spacing: -.025em; line-height: 1.1; }
.hello p { margin: 6px 0 0; color: var(--tx-2); }
.flow { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); margin-bottom: 16px; background: var(--s1); border-radius: var(--r); box-shadow: inset 0 0 0 1px var(--line); counter-reset: f; }
.flow a { position: relative; display: grid; gap: 4px; padding: 14px 16px 16px; text-decoration: none; transition: background .2s; min-width: 0; }
.flow a:hover { background: var(--s2); }
.flow a:first-child { border-radius: var(--r) 0 0 var(--r); } .flow a:last-child { border-radius: 0 var(--r) var(--r) 0; }
.flow a + a { box-shadow: inset 1px 0 0 var(--line); }
.flow a + a::before { content: ""; position: absolute; left: -6px; top: 50%; width: 10px; height: 10px; margin-top: -5px; background: var(--s1); box-shadow: inset -1px 1px 0 var(--line-2); transform: rotate(45deg); z-index: 1; }
.flow a:hover + a::before { background: var(--s2); }
.flow small { display: flex; align-items: center; gap: 8px; color: var(--tx-2); font-size: 12.5px; }
.flow small::before { counter-increment: f; content: counter(f); width: 18px; height: 18px; display: grid; place-items: center; border-radius: 50%; font-size: 10.5px; font-weight: 600; color: var(--tx-2); box-shadow: inset 0 0 0 1px var(--line-3); }
.flow b { font-size: 22px; font-weight: 600; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.flow b em { font-style: normal; font-size: 13px; font-weight: 500; color: var(--tx-3); letter-spacing: 0; margin-left: 6px; }
.flow span { font-size: 12.5px; color: var(--tx-3); }
.flow span.hot { color: var(--ek); }
.kind { width: 28px; height: 28px; border-radius: 7px; display: grid; place-items: center; flex: none; background: var(--s2); color: var(--tx-2); }
.kind .i { width: 16px; height: 16px; }
.kind.ek { background: var(--ek-bg); color: var(--ek); } .kind.warn { background: var(--warn-bg); color: var(--warn); } .kind.bla { background: var(--bla-bg); color: var(--bla); }
.done-all { display: flex; align-items: center; gap: 10px; padding: 18px 16px; color: var(--tx-2); }
.done-all .i { color: var(--ok); }
.weather { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); }
.wx { padding: 12px 16px 16px; min-width: 0; }
.wx + .wx { box-shadow: inset 1px 0 0 var(--line); }
.wx small { display: block; color: var(--tx-3); font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.wx b { display: block; margin: 4px 0 2px; font-size: 22px; font-weight: 600; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.wx span { display: block; font-size: 12.5px; color: var(--tx-2); }
.wx.alert span { color: var(--warn); }
.feed > li { align-items: flex-start; }
.feed .dot { width: 8px; height: 8px; margin-top: 6px; border-radius: 50%; flex: none; background: var(--line-3); }
.feed .dot.ek { background: var(--ek); } .feed .dot.ok { background: var(--ok); } .feed .dot.bla { background: var(--bla); }
.feed time { flex: none; font-size: 12px; color: var(--tx-3); font-variant-numeric: tabular-nums; margin-top: 2px; }

/* ---------- Projekt ---------- */
.tabs { display: inline-flex; gap: 2px; padding: 2px; border-radius: 8px; background: var(--s1); box-shadow: inset 0 0 0 1px var(--line); }
.tabs button { height: 28px; padding: 0 12px; border: 0; border-radius: 6px; background: none; color: var(--tx-2); font-size: 13px; font-weight: 500; }
.tabs button:hover { color: var(--tx); }
.tabs button.on { background: var(--s3); color: var(--tx); }
.plist { display: grid; }
.prow { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(0, 1.5fr) 110px 110px 90px; gap: 20px; align-items: center; padding: 14px 16px; text-decoration: none; box-shadow: inset 0 1px 0 var(--line); transition: background .2s; min-height: 64px; }
.prow:first-of-type { box-shadow: none; }
.prow:hover { background: rgba(255,255,255,.025); }
.prow:last-child { border-radius: 0 0 var(--r) var(--r); }
.prow.h { min-height: 0; padding-top: 12px; padding-bottom: 8px; font-size: 12px; color: var(--tx-3); box-shadow: none; }
.prow.h:hover { background: none; }
.prow b { display: block; font-weight: 500; }
.prow small { display: block; color: var(--tx-3); font-size: 12.5px; }
.prow .r { text-align: right; font-variant-numeric: tabular-nums; }
.phases { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 3px; }
.phases i { height: 6px; border-radius: 2px; background: var(--s3); }
.phases i.done { background: var(--tx-2); } .phases i.now { background: var(--ek); }
.ph-lbl { display: flex; justify-content: space-between; gap: 8px; margin-top: 6px; font-size: 12px; color: var(--tx-3); }
.ph-lbl b { color: var(--tx-2); font-weight: 500; }
.stepper { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 4px; padding: 16px; }
.stepper div { display: grid; gap: 8px; min-width: 0; }
.stepper i { height: 6px; border-radius: 2px; background: var(--s3); }
.stepper .done i { background: var(--tx-2); } .stepper .now i { background: var(--ek); }
.stepper span { font-size: 12.5px; color: var(--tx-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.stepper .done span { color: var(--tx-2); } .stepper .now span { color: var(--tx); font-weight: 500; }
.ata-st { display: flex; align-items: center; gap: 4px; font-size: 12px; color: var(--tx-3); }
.ata-st i { width: 18px; height: 2px; border-radius: 1px; background: var(--s3); }
.ata-st i.on { background: var(--ek); }
.note { margin: 0; padding: 12px 16px 16px; font-size: 12.5px; color: var(--tx-3); }

/* ---------- Offerter och formulär ---------- */
label.f { display: grid; gap: 6px; font-size: 12.5px; color: var(--tx-2); font-weight: 500; }
.in { height: 36px; padding: 0 10px; border: 0; border-radius: 7px; background: var(--s2); box-shadow: inset 0 0 0 1px var(--line-2); color: var(--tx); width: 100%; font-weight: 400; transition: box-shadow .2s; }
.in:hover { box-shadow: inset 0 0 0 1px var(--line-3); }
.in:focus { outline: none; box-shadow: inset 0 0 0 1.5px var(--ek); }
.in::placeholder { color: var(--tx-3); }
select.in { appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23A9ACB3' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m7 10 5 5 5-5'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 8px center; background-size: 16px; padding-right: 30px; }
select.in option { background: var(--s2); color: var(--tx); }
input[type=number].in { text-align: right; font-variant-numeric: tabular-nums; }
.lines .ln { display: grid; grid-template-columns: minmax(0, 1fr) 120px 130px 32px; gap: 8px; align-items: center; padding: 4px 0; }
.lines .ln.h { font-size: 12px; color: var(--tx-3); padding-bottom: 2px; }
.lines .ln.h span:nth-child(3) { text-align: right; padding-right: 10px; }
.x { width: 32px; height: 32px; border: 0; border-radius: 7px; background: none; color: var(--tx-3); display: grid; place-items: center; }
.x:hover { background: var(--s2); color: var(--tx); }
.x .i { width: 16px; height: 16px; }
.sum { display: grid; gap: 10px; padding: 4px 16px 16px; }
.sum div { display: flex; justify-content: space-between; gap: 12px; }
.sum .tot { padding-top: 12px; box-shadow: inset 0 1px 0 var(--line-2); font-weight: 600; font-size: 17px; }
.sum .rot { color: var(--ok); }
.sum .hint { margin: 0; font-size: 12.5px; color: var(--tx-3); }
.check { display: inline-flex; align-items: center; gap: 10px; font-size: 13px; cursor: pointer; min-height: 32px; }
.check input { width: 16px; height: 16px; accent-color: var(--ek); }
.check.off { color: var(--tx-3); cursor: default; }
.rotbox { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; margin-top: 16px; padding-top: 14px; box-shadow: inset 0 1px 0 var(--line); }
.rotbox .muted { font-size: 12.5px; }
.inq { display: flex; gap: 10px; align-items: flex-start; padding: 12px 14px; margin-bottom: 16px; border-radius: 10px; background: var(--bla-bg); color: var(--tx); font-size: 13px; }
.inq .i { color: var(--bla); margin-top: 1px; }

/* ---------- Kunder ---------- */
.cust { display: grid; grid-template-columns: 300px minmax(0, 1fr); gap: 16px; align-items: start; }
.clist > li { cursor: pointer; }
.clist > li.on { background: var(--s2); }
.clist > li:first-child { border-radius: var(--r) var(--r) 0 0; } .clist > li:last-child { border-radius: 0 0 var(--r) var(--r); }
.chead { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; align-items: flex-start; padding: 16px; }
.chead h2 { margin: 0; font-size: 22px; font-weight: 600; letter-spacing: -.02em; }
.chead p { margin: 4px 0 0; color: var(--tx-2); }
.quote { margin: 0; padding: 14px 16px 16px; box-shadow: inset 0 1px 0 var(--line); color: var(--tx-2); }
.stars { color: var(--ek); letter-spacing: 1px; margin-right: 8px; }
.timeline { list-style: none; margin: 0; padding: 4px 16px 16px 34px; display: grid; gap: 14px; position: relative; }
.timeline::before { content: ""; position: absolute; left: 20px; top: 10px; bottom: 22px; width: 1px; background: var(--line-2); }
.timeline li { position: relative; }
.timeline li::before { content: ""; position: absolute; left: -18px; top: 6px; width: 7px; height: 7px; border-radius: 50%; background: var(--s1); box-shadow: inset 0 0 0 1.5px var(--tx-3); }
.timeline li:first-child::before { background: var(--ek); box-shadow: none; }
.timeline small { color: var(--tx-3); font-size: 12px; display: block; }

/* ---------- Siffror ---------- */
.chart { width: 100%; height: 180px; display: block; }
.kpis.kpis3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.xlbl { display: flex; justify-content: space-between; padding: 4px 4px 0; font-size: 11px; color: var(--tx-3); font-variant-numeric: tabular-nums; }
.chart .ax { stroke: var(--line-2); } .chart .gl { stroke: var(--line); } .chart text { fill: var(--tx-3); font: 11px var(--sans); }
.chart .ln { fill: none; stroke: var(--tx); stroke-width: 1.75; vector-effect: non-scaling-stroke; }
.chart .area { fill: rgba(237,238,240,.05); }
.hbars { display: grid; gap: 14px; padding: 6px 16px 16px; }
.hbars a { display: grid; grid-template-columns: minmax(0, 150px) 1fr 44px; gap: 12px; align-items: center; font-size: 13px; text-decoration: none; }
.hbars a span:first-child { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hbars a:hover span:first-child { text-decoration: underline; text-underline-offset: 3px; }
.hbars .bar { position: relative; overflow: visible; }
.hbars .goal { position: absolute; top: -4px; bottom: -4px; width: 1px; background: var(--tx-3); }
.legend { display: flex; gap: 14px; padding: 0 16px 14px; font-size: 12px; color: var(--tx-3); }
.legend i { display: inline-block; width: 10px; height: 2px; margin-right: 6px; vertical-align: middle; background: var(--tx); }
.legend i.g { width: 1px; height: 10px; background: var(--tx-3); }

/* ---------- Kommandopaletten och arken ---------- */
.palette, .sheet { position: fixed; inset: 0; z-index: 100; display: grid; justify-items: center; align-items: start; padding: 12vh 12px 12px; }
.scrim { position: absolute; inset: 0; background: rgba(5,6,7,.6); animation: fade .2s var(--e); }
@keyframes fade { from { opacity: 0; } }
.pal-box, .sheet-box { position: relative; width: min(620px, 100%); border-radius: 14px; background: var(--s2); box-shadow: 0 0 0 1px var(--line-2), 0 40px 100px -20px rgba(0,0,0,.85); overflow: hidden; animation: pop .3s var(--e); }
@keyframes pop { from { opacity: 0; transform: translateY(-6px) scale(.985); } }
.pal-top { display: flex; align-items: center; gap: 10px; padding: 0 16px; box-shadow: inset 0 -1px 0 var(--line); color: var(--tx-3); }
.pal-in { flex: 1; height: 54px; border: 0; background: none; font-size: 15px; color: var(--tx); outline: none; }
.pal-in::placeholder { color: var(--tx-3); }
.pal-list { list-style: none; margin: 0; padding: 6px; max-height: min(380px, 52vh); overflow-y: auto; }
.pal-list li[role=option] { display: flex; align-items: center; gap: 10px; min-height: 40px; padding: 0 10px; border-radius: 8px; cursor: pointer; color: var(--tx-2); }
.pal-list li[role=option] .i { width: 16px; height: 16px; color: var(--tx-3); }
.pal-list li small { margin-left: auto; color: var(--tx-3); font-size: 12px; }
.pal-list li.on { background: var(--s3); color: var(--tx); }
.pal-list li.on .i { color: var(--ek); }
.pal-list .grp { padding: 10px 10px 4px; font-size: 11.5px; font-weight: 500; color: var(--tx-3); }
.pal-list .none { padding: 18px 10px; color: var(--tx-3); }
.pal-foot { margin: 0; padding: 10px 16px; box-shadow: inset 0 1px 0 var(--line); font-size: 12px; color: var(--tx-3); display: flex; gap: 16px; align-items: center; }
.pal-foot span { display: inline-flex; gap: 4px; align-items: center; }
.sheet-box { width: min(480px, 100%); padding: 22px; max-height: 88dvh; overflow-y: auto; }
.sheet-box h3 { margin: 0 0 4px; font-size: 18px; font-weight: 600; letter-spacing: -.015em; }
.sheet-box > p { margin: 0 0 18px; color: var(--tx-2); }
.sheet-box form { display: grid; gap: 14px; }
.sheet-box .row { margin-top: 4px; }
.seg { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 2px; padding: 2px; border-radius: 8px; background: var(--s1); box-shadow: inset 0 0 0 1px var(--line); }
.seg label { position: relative; }
.seg input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.seg span { display: grid; place-items: center; height: 32px; border-radius: 6px; font-size: 13px; color: var(--tx-2); font-weight: 500; }
.seg input:checked + span { background: var(--s3); color: var(--tx); }
.seg input:focus-visible + span { outline: 2px solid var(--ek); outline-offset: -2px; }

.toast { position: fixed; z-index: 150; left: 50%; bottom: 24px; max-width: min(520px, calc(100vw - 24px)); transform: translate(-50%, 16px); opacity: 0; pointer-events: none; display: flex; align-items: center; gap: 10px; padding: 12px 16px; border-radius: 10px; background: var(--tx); color: var(--bg); font-weight: 500; box-shadow: 0 20px 50px -10px rgba(0,0,0,.7); transition: opacity .35s var(--e), transform .45s var(--e); }
.toast.on { opacity: 1; transform: translate(-50%, 0); }
.toast::before { content: ""; width: 8px; height: 8px; flex: none; border-radius: 50%; background: var(--ek); }

/* ---------- Mellanstora skärmar ---------- */
@media (max-width: 1180px) {
  .g2 { grid-template-columns: 1fr; }
  .prow { grid-template-columns: minmax(0, 1.4fr) minmax(0, 1.4fr) 100px 80px; } .prow .c-cost { display: none; }
}
@media (max-width: 1000px) {
  .app { grid-template-columns: 216px 1fr; }
  .demo-note span { display: none; }
  .g3, .g4 { grid-template-columns: 1fr 1fr; } .g2e, .cust { grid-template-columns: 1fr; }
  .kpis, .flow { grid-template-columns: 1fr 1fr; }
  .kpis > *, .flow a { border-radius: 0 !important; }
  .kpis > :nth-child(3), .kpis > :nth-child(4), .flow a:nth-child(3), .flow a:nth-child(4) { box-shadow: inset 0 1px 0 var(--line); }
  .kpis > :nth-child(4), .flow a:nth-child(4) { box-shadow: inset 0 1px 0 var(--line), inset 1px 0 0 var(--line); }
  .flow a:nth-child(3)::before { display: none; }
}

/* ---------- Mobil: menyn blir en flikrad längst ner ---------- */
@media (max-width: 760px) {
  :root { --bar-h: 48px; }
  .demo-bar { gap: 8px; padding-left: max(12px, env(safe-area-inset-left)); padding-right: max(12px, env(safe-area-inset-right)); }
  .demo-word { font-size: 20px; }
  .demo-note b { font-size: 10px; padding: 3px 6px; }
  .demo-app { gap: 4px; margin-left: auto; }
  .demo-chip, .demo-cta { height: 34px; padding: 0 10px; font-size: 12.5px; }
  .demo-chip .l, .demo-cta .l { display: none; } .demo-chip .k, .demo-cta .k { display: inline; }
  .app { grid-template-columns: 1fr; grid-template-rows: minmax(0, 1fr) auto; }
  .side { order: 2; flex-direction: row; padding: 4px 4px calc(4px + env(safe-area-inset-bottom)); border-right: 0; border-top: 1px solid var(--line); overflow: visible; }
  .brand, .side-foot, .search { display: none; }
  .nav { display: flex; width: 100%; }
  .nav a { flex: 1; flex-direction: column; height: auto; min-height: 52px; gap: 3px; padding: 6px 0; font-size: 11px; justify-content: center; text-align: center; position: relative; }
  .nav a.on { background: none; }
  .nav a.on::after { content: ""; position: absolute; top: -5px; left: 30%; right: 30%; height: 2px; border-radius: 1px; background: var(--ek); }
  .nav a[data-view="tid"] > span:not(.kort) { display: none; } .nav .kort { display: inline; }
  .nav em { position: absolute; top: 3px; left: calc(50% + 6px); min-width: 16px; height: 16px; padding: 0 4px; font-size: 10px; }
  .main { order: 1; }
  .top { padding: 8px 12px 8px 14px; min-height: 52px; gap: 10px; }
  .top-mark { display: block; width: 26px; height: 26px; }
  .top-sub { display: none; }
  .top-r { display: none; }
  .m-act { display: flex; gap: 8px; margin: 0 0 14px; } .m-act > .btn { flex: 1; }
  .m-tabs .tabs { display: flex; width: 100%; } .m-tabs .tabs button { flex: 1; height: 36px; }
  .show-m, .tbl td small.show-m { display: block; }
  .top-search { display: grid; place-items: center; width: 44px; height: 44px; margin-left: auto; border: 0; border-radius: 8px; background: none; color: var(--tx-2); }
  .top-l { flex: 0 1 auto; }
  .content { padding: 16px 14px 32px; }
  .hello h2 { font-size: 22px; }
  .hello .row { width: 100%; } .hello .row .btn { flex: 1; height: 40px; }
  .kpi b, .flow b { font-size: 20px; }
  .weather { grid-template-columns: 1fr; } .wx + .wx { box-shadow: inset 0 1px 0 var(--line); }
  .wx { display: grid; grid-template-columns: 1fr auto; column-gap: 12px; } .wx b { grid-row: span 2; align-self: center; margin: 0; }
  .prow { grid-template-columns: minmax(0, 1fr) auto; gap: 10px 16px; }
  .prow.h { display: none; }
  .prow .c-ph { grid-column: 1 / -1; grid-row: 2; }
  .prow .c-val { grid-row: 1; grid-column: 2; }
  .prow .c-mar { display: none; }
  .btn { height: 40px; } .btn.sm { height: 36px; }
  .list > li { flex-wrap: wrap; }
  .list > li > .kind + .grow { flex: 1 1 calc(100% - 44px); }
  .list > li > .kind ~ .row { margin-left: 40px; }
  .kpis.kpis3 { grid-template-columns: 1fr; } .kpis.kpis3 > * + * { box-shadow: inset 0 1px 0 var(--line) !important; }
  .stepper span { visibility: hidden; } .stepper .now span { visibility: visible; overflow: visible; }
  .stepper .now { position: relative; z-index: 1; }
  .lines .ln { grid-template-columns: minmax(0, 1fr) 110px 32px; } .lines .hide-m { display: none; }
  .hbars a { grid-template-columns: minmax(0, 110px) 1fr 40px; }
  .tbl .hide-m { display: none; }
  .cust { gap: 12px; }
  .clist { display: flex; overflow-x: auto; gap: 8px; padding: 8px; scrollbar-width: none; }
  .clist::-webkit-scrollbar { display: none; }
  .clist > li { flex: none; min-height: 44px; padding: 6px 12px 6px 6px; border-radius: 999px !important; box-shadow: inset 0 0 0 1px var(--line-2) !important; }
  .clist > li small { display: none; }
  .clist-wrap { background: none !important; box-shadow: none !important; }
  .clist-wrap .clist { padding: 0; }
  .in { height: 44px; font-size: 16px; }
  .palette, .sheet { padding: 0; align-items: end; }
  .pal-box, .sheet-box { width: 100%; border-radius: 16px 16px 0 0; padding-bottom: env(safe-area-inset-bottom); animation-name: up; }
  .palette { align-items: start; padding: 8px; } .pal-box { border-radius: 14px; animation-name: pop; }
  .pal-foot { display: none; }
  .toast { bottom: calc(76px + env(safe-area-inset-bottom)); }
  .app-tips { place-items: end center; }
}
@keyframes up { from { transform: translateY(24px); opacity: 0; } }
@media (max-width: 380px) { .demo-note { display: none; } }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; } }
