:root {
  --bg: #f4f5f2; --card: #fff; --ink: #1b1f1d; --muted: #5d6662; --line: #d9ddd8;
  --brand: #2f5d50; --brand-ink: #fff; --brand-soft: #e3ece7;
  --warn: #b42318; --warn-bg: #fdecea; --amber: #8a5a00; --amber-bg: #fff4dc; --ok: #1f7a4a; --ok-bg: #e5f4ea;
}
@media (prefers-color-scheme: dark) {
  :root { --bg: #121614; --card: #1b201e; --ink: #e9ece9; --muted: #9aa49f; --line: #2e3532;
    --brand: #6fae98; --brand-ink: #0d1411; --brand-soft: #22312b;
    --warn: #ff8a7a; --warn-bg: #3a1d1a; --amber: #f2c46b; --amber-bg: #33280f; --ok: #7fd3a3; --ok-bg: #16301f; }
}
* { box-sizing: border-box; }
html, body { margin: 0; background: var(--bg); color: var(--ink); font: 16px/1.45 -apple-system, "Segoe UI", Roboto, Arial, sans-serif; }
a { color: var(--brand); }
.top { position: sticky; top: 0; z-index: 5; display: flex; align-items: center; gap: 12px; padding: 10px 16px; background: var(--card); border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.logo { font-weight: 700; text-decoration: none; color: var(--ink); font-size: 18px; }
.logo span { color: var(--brand); font-weight: 600; }
#nav { display: flex; gap: 4px; flex-wrap: wrap; align-items: center; margin-left: auto; }
/* Länkar, Logga ut och rollväljaren får samma höjd (knappar och listrutor har annars min-height från formulärstilarna). */
#nav a, #nav button { display: inline-flex; align-items: center; min-height: 36px; padding: 0 10px; border-radius: 8px; text-decoration: none; color: var(--ink); font-size: 15px; line-height: 1; background: none; border: 0; cursor: pointer; font-family: inherit; }
#nav select.visasom { min-height: 36px; height: 36px; padding: 0 8px; margin: 0 4px; }
#nav a.on { background: var(--brand-soft); color: var(--brand); font-weight: 600; }
.net { font-size: 13px; padding: 3px 8px; border-radius: 99px; background: var(--amber-bg); color: var(--amber); }
main { max-width: 980px; margin: 0 auto; padding: 16px; }
.pad { padding: 16px; }
h1 { font-size: 24px; margin: 4px 0 12px; }
h2 { font-size: 18px; margin: 20px 0 8px; }
h3 { font-size: 16px; margin: 14px 0 6px; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 14px 16px; margin-bottom: 12px; }
.row { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.spread { justify-content: space-between; }
.crumbs { font-size: 14px; color: var(--muted); margin-bottom: 4px; }
.crumbs a { color: var(--muted); }
button, .btn { font: inherit; font-size: 15px; padding: 10px 14px; min-height: 44px; border-radius: 10px; border: 1px solid var(--line); background: var(--card); color: var(--ink); cursor: pointer; text-decoration: none; display: inline-flex; align-items: center; gap: 6px; }
button.primary, .btn.primary { background: var(--brand); color: var(--brand-ink); border-color: var(--brand); font-weight: 600; }
button.danger { color: var(--warn); border-color: var(--warn); }
button:disabled { opacity: .5; cursor: default; }
button.small, .btn.small { min-height: 34px; padding: 5px 10px; font-size: 14px; }
label.f { display: block; margin: 12px 0; }
label.f > .l { display: block; font-size: 14px; color: var(--muted); margin-bottom: 4px; }
label.f > .l b { color: var(--warn); }
.hint { font-size: 13px; color: var(--muted); }
input, select, textarea { font: inherit; font-size: 17px; width: 100%; padding: 10px 12px; min-height: 46px; border: 1px solid var(--line); border-radius: 10px; background: var(--card); color: var(--ink); }
textarea { min-height: 90px; resize: vertical; }
input:focus, select:focus, textarea:focus { outline: 2px solid var(--brand); outline-offset: 1px; }
.withunit { display: flex; align-items: center; gap: 8px; }
.withunit span { color: var(--muted); white-space: nowrap; font-size: 15px; }
.chips { display: flex; gap: 8px; flex-wrap: wrap; }
.chips button { min-height: 46px; }
.chips button.on { background: var(--brand); color: var(--brand-ink); border-color: var(--brand); font-weight: 600; }
.check { display: flex; gap: 10px; align-items: center; padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--card); min-height: 48px; cursor: pointer; }
label.f.check { display: flex; }
.check input { width: 22px; height: 22px; min-height: 0; flex: none; }
.steps { display: flex; gap: 4px; overflow-x: auto; margin: 8px 0 4px; padding-bottom: 4px; }
.steps button { flex: 1 0 auto; min-height: 40px; font-size: 14px; border-radius: 99px; }
.steps button.on { background: var(--brand); color: var(--brand-ink); border-color: var(--brand); }
.steps button.err { border-color: var(--warn); color: var(--warn); }
.formnav { position: sticky; bottom: 0; background: var(--bg); padding: 12px 0; display: flex; gap: 8px; flex-wrap: wrap; border-top: 1px solid var(--line); margin-top: 16px; }
.formnav .grow { flex: 1; }
table.list { width: 100%; border-collapse: collapse; background: var(--card); border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
table.list th, table.list td { text-align: left; padding: 10px 10px; border-bottom: 1px solid var(--line); font-size: 15px; vertical-align: top; }
table.list th { font-size: 12px; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); font-weight: 600; }
table.list tr.click { cursor: pointer; }
table.list tr.click:hover td { background: var(--brand-soft); }
.st { display: inline-block; font-size: 12px; padding: 2px 8px; border-radius: 99px; font-weight: 600; white-space: nowrap; }
.st-utkast { background: var(--amber-bg); color: var(--amber); }
.st-signerad { background: var(--brand-soft); color: var(--brand); }
.st-attesterad, .st-godkand { background: var(--ok-bg); color: var(--ok); }
.st-makulerad { background: var(--line); color: var(--muted); text-decoration: line-through; }
.warnbox { background: var(--warn-bg); color: var(--warn); border-radius: 10px; padding: 10px 12px; margin: 8px 0; }
.warnbox ul { margin: 4px 0 0 18px; padding: 0; }
.infobox { background: var(--amber-bg); color: var(--amber); border-radius: 10px; padding: 10px 12px; margin: 8px 0; }
.okbox { background: var(--ok-bg); color: var(--ok); border-radius: 10px; padding: 10px 12px; margin: 8px 0; }
.tabs { display: flex; gap: 6px; overflow-x: auto; border-bottom: 1px solid var(--line); margin: 12px 0; }
.tabs button { border: 0; border-bottom: 3px solid transparent; border-radius: 0; background: none; white-space: nowrap; }
.tabs button.on { border-bottom-color: var(--brand); color: var(--brand); font-weight: 600; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0 16px; }
@media (max-width: 640px) { .grid2 { grid-template-columns: 1fr; } table.list .hide-sm { display: none; } }
dl.kv { display: grid; grid-template-columns: minmax(120px, 40%) 1fr; gap: 0; margin: 0; }
dl.kv dt, dl.kv dd { margin: 0; padding: 7px 0; border-bottom: 1px solid var(--line); }
dl.kv dt { color: var(--muted); font-size: 14px; }
dl.kv dd { font-weight: 600; white-space: pre-wrap; }
.boltmap { overflow-x: auto; }
.boltmap table { border-collapse: collapse; }
.boltmap th { font-size: 11px; color: var(--muted); font-weight: 600; padding: 2px; writing-mode: vertical-rl; transform: rotate(180deg); height: 70px; }
.boltmap td { padding: 2px; }
.boltmap td input { width: 74px; font-size: 14px; min-height: 40px; padding: 4px; }
.boltmap td button { width: 40px; height: 40px; min-height: 40px; padding: 0; justify-content: center; font-size: 18px; font-weight: 700; border-radius: 6px; }
.boltmap td button.X { background: var(--brand); color: var(--brand-ink); }
.boltmap td button.V { background: var(--warn-bg); color: var(--warn); }
.boltmap td button.f { background: var(--brand-soft); }
.rowsed { width: 100%; border-collapse: collapse; }
.rowsed td { padding: 3px; }
.rowsed input, .rowsed select { min-height: 42px; font-size: 16px; }
.sigpad { border: 1px dashed var(--muted); border-radius: 10px; background: #fff; touch-action: none; width: 100%; height: 180px; display: block; }
.sigimg { max-height: 70px; background: #fff; border-radius: 6px; padding: 4px; }
.pics { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 8px; }
.pics figure { margin: 0; position: relative; }
.pics img { width: 100%; height: 120px; object-fit: cover; border-radius: 8px; border: 1px solid var(--line); }
.pics button { position: absolute; top: 4px; right: 4px; min-height: 30px; padding: 2px 8px; }
.toast { position: fixed; left: 50%; bottom: 20px; transform: translateX(-50%); background: var(--ink); color: var(--bg); padding: 12px 18px; border-radius: 10px; max-width: 90vw; z-index: 20; box-shadow: 0 6px 20px rgba(0,0,0,.25); }
dialog { border: 0; border-radius: 14px; padding: 0; max-width: min(520px, 92vw); width: 100%; background: var(--card); color: var(--ink); }
dialog::backdrop { background: rgba(0,0,0,.45); }
dialog form { padding: 18px; }
.bdcard { display: block; text-decoration: none; color: inherit; }
.bdcard:hover { border-color: var(--brand); }
.counts { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 6px; }
.counts span { font-size: 13px; background: var(--bg); border: 1px solid var(--line); border-radius: 99px; padding: 2px 8px; }
.counts span.att { border-color: var(--brand); color: var(--brand); }
.pct.bad { color: var(--warn); font-weight: 700; }
.grow { flex: 1 1 0; min-width: 0; }
.meas { padding: 10px; }
.meas .row + .row { margin-top: 8px; }
.meas .pct { min-width: 56px; text-align: right; }
.temp { font-family: ui-monospace, Menlo, monospace; font-size: 20px; background: var(--brand-soft); padding: 8px 12px; border-radius: 8px; display: inline-block; user-select: all; }

/* Översikt och projekt */
.mono { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; }
.toolbar { margin: 12px 0; gap: 10px; }
.search { flex: 1 1 260px; min-height: 42px; font-size: 16px; }
.chipf { min-height: 36px; padding: 4px 12px; border-radius: 99px; font-size: 14px; }
.chipf.on { background: var(--brand-soft); color: var(--brand); border-color: var(--brand); font-weight: 600; }
.dot { display: inline-flex; align-items: center; gap: 6px; font-size: 14px; white-space: nowrap; }
.dot::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--muted); }
.dot-on::before { background: var(--ok); }
.badge { display: inline-block; min-width: 24px; text-align: center; padding: 1px 8px; border-radius: 99px; background: var(--amber-bg); color: var(--amber); font-weight: 700; font-size: 13px; }
.avs { display: inline-flex; align-items: center; }
.av { width: 26px; height: 26px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; font-size: 10.5px; font-weight: 700; color: #fff; margin-left: -6px; border: 2px solid var(--card); }
.av:first-child { margin-left: 0; }
.av0 { background: #4f7a6a; } .av1 { background: #7a6a4f; } .av2 { background: #5a6f8f; }
.av3 { background: #8a5a6a; } .av4 { background: #6a7f3f; } .av5 { background: #46707a; }
.avmore { font-size: 12px; color: var(--muted); margin-left: 6px; }
table.list td.chev, table.list th.chev { width: 36px; padding-right: 0; }
.chevbtn { min-height: 30px; width: 30px; padding: 0; justify-content: center; border: 0; background: none; font-size: 20px; color: var(--muted); transition: transform .15s; }
.chevbtn.open { transform: rotate(90deg); color: var(--brand); }
table.list tr.expanded > td { background: var(--bg); padding: 6px 10px 12px 36px; }
.bdblock { background: var(--card); border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; margin-top: 8px; }
.bdname { font-weight: 700; text-decoration: none; color: var(--ink); }
.bdname:hover { color: var(--brand); text-decoration: underline; }
table.list.sub { margin-top: 8px; border-radius: 8px; }
table.list.sub td, table.list.sub th { padding: 7px 8px; font-size: 14px; }
p.sub { margin: 6px 0 0; }
@media (max-width: 640px) { table.list tr.expanded > td { padding-left: 10px; } }
details.pill { background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 6px 12px; font-size: 14px; flex: 1 1 280px; }
details.pill > summary { cursor: pointer; font-weight: 600; min-height: 32px; display: flex; align-items: center; }
details.pill[open] { padding-bottom: 10px; }
details.pill ul { margin: 6px 0 0 18px; padding: 0; }
details.warn-pill { background: var(--amber-bg); border-color: transparent; color: var(--amber); }
details.warn-pill a { color: var(--amber); }

/* Personalliggare */
button.huge { width: 100%; min-height: 64px; font-size: 20px; justify-content: center; margin-top: 8px; }
.okbox.big { font-size: 17px; }
.grid4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 0 12px; }
@media (max-width: 760px) { .grid4 { grid-template-columns: 1fr 1fr; } }
/* Roller & behörigheter */
fieldset.permgrp { border: 1px solid var(--line); border-radius: 10px; padding: 6px 12px 2px; margin: 10px 0; }
fieldset.permgrp legend { font-weight: 600; color: var(--brand); padding: 0 4px; }
fieldset.permgrp label.f.check { margin: 6px 0; }
/* ERP: tid, lön, kompetens */
.tidday h2 { font-size: 16px; margin: 0; text-transform: capitalize; }
.tidday.locked { opacity: .75; }
td.num, th.num { text-align: right; white-space: nowrap; }
.mono { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; }
textarea.mono { width: 100%; font-size: 13px; }
/* Etapp 4: planering och HR */
.prewrap { white-space: pre-wrap; }
.planwrap { overflow-x: auto; border: 1px solid var(--line); border-radius: 10px; background: var(--card); }
table.plan { border-collapse: collapse; font-size: 13px; }
table.plan th, table.plan td { border: 1px solid var(--line); padding: 4px 6px; white-space: nowrap; }
table.plan th:first-child { position: sticky; left: 0; background: var(--card); text-align: left; min-width: 140px; z-index: 1; }
td.plancell { min-width: 56px; height: 34px; cursor: pointer; vertical-align: top; }
td.plancell:hover { background: var(--brand-soft); }
td.plancell.helg { background: var(--bg); }
td.plancell.krock { background: var(--warn-bg); }
td.plancell .bok { display: block; background: var(--brand); color: var(--brand-ink); border-radius: 4px; padding: 1px 4px; margin: 1px 0; font-weight: 600; }
td.plancell .ledig { display: block; color: var(--muted); font-style: italic; }
th.plangrp { background: var(--brand-soft); color: var(--brand); text-align: left; }

/* ---------- fält: mobilförst (Idag, flikrad, stora knappar, visningslägen) ---------- */
.hidden { display: none; }
.center { text-align: center; }
.huge { width: 100%; min-height: 64px; font-size: 20px; justify-content: center; margin-top: 8px; }
.netbanner { padding: 10px 16px; font-weight: 600; font-size: 16px; background: var(--amber-bg); color: var(--amber); border-bottom: 1px solid var(--line); text-align: center; }
.netbanner.off { background: var(--warn); color: #fff; }
.idag h1 { margin-bottom: 0; }
.idag > p.muted { margin-top: 2px; }
.idag > p.muted::first-letter { text-transform: uppercase; }
.card > h2:first-child, .card > .row > h2:first-child { margin-top: 0; }
.bigcard { display: block; padding: 16px; margin-bottom: 10px; border-radius: 12px; background: var(--card); border: 1px solid var(--line); color: var(--ink); text-decoration: none; font-size: 17px; font-weight: 600; }
.bigcard.warn { background: var(--amber-bg); color: var(--amber); border-color: transparent; }
.bigrow { display: flex; justify-content: space-between; align-items: center; gap: 8px; padding: 12px 0; border-bottom: 1px solid var(--line); color: var(--ink); text-decoration: none; font-size: 17px; min-height: 52px; }
.bigrow:last-child { border-bottom: 0; }
.bigrow small { color: var(--muted); }
.checkin { font-size: 17px; }
.checkin.on { background: var(--ok-bg); color: var(--ok); border-color: transparent; }
.typgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 10px; margin: 8px 0 12px; }
.typbtn { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; min-height: 104px; padding: 12px; border-radius: 14px; border: 2px solid var(--brand); background: var(--card); color: var(--brand); text-decoration: none; font-size: 18px; font-weight: 700; text-align: center; overflow-wrap: anywhere; }
.typbtn .ico { font-size: 32px; line-height: 1; }
.typbtn:active { background: var(--brand-soft); }

/* flikrad längst ned i mobilen */
main.withtabs { padding-bottom: calc(96px + env(safe-area-inset-bottom)); }
.tabbar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 8; display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; background: var(--card); border-top: 1px solid var(--line); padding-bottom: env(safe-area-inset-bottom); }
.tabbar a, .tabbar button { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; min-height: 64px; padding: 6px 2px; border: 0; border-radius: 0; background: none; color: var(--muted); text-decoration: none; font-size: 13px; font-weight: 600; }
.tabbar .ico { font-size: 24px; line-height: 1; }
.tabbar .on { color: var(--brand); background: var(--brand-soft); }
.sheet { position: fixed; inset: 0; z-index: 7; background: rgba(0,0,0,.45); display: flex; align-items: flex-end; }
.sheetbody { width: 100%; max-height: 80vh; overflow-y: auto; background: var(--card); border-radius: 16px 16px 0 0; padding: 8px 16px calc(80px + env(safe-area-inset-bottom)); }
.sheetbody a, .sheetbody button { display: flex; align-items: center; width: 100%; min-height: 56px; padding: 0 4px; border: 0; border-bottom: 1px solid var(--line); border-radius: 0; background: none; color: var(--ink); text-decoration: none; font-size: 18px; }
.sheetbody button { color: var(--warn); }

/* formulär */
.mic { min-height: 40px; padding: 4px 12px; font-size: 15px; border-radius: 99px; }
.mic.on { background: var(--warn); color: #fff; border-color: var(--warn); }
.f > .row.spread { margin-bottom: 4px; }
.f > .row.spread .l { margin: 0; }
div.f { margin: 12px 0; }
div.f > .l { display: block; font-size: 14px; color: var(--muted); margin-bottom: 4px; }
div.f > .l b, div.f .l b { color: var(--warn); }
.stepper { display: flex; align-items: stretch; gap: 6px; flex: 1; }
.stepper button { width: 56px; min-height: 52px; flex: none; justify-content: center; font-size: 26px; font-weight: 700; padding: 0; }
.stepper input { text-align: center; font-size: 20px; font-weight: 600; min-height: 52px; }
details.fler { margin: 16px 0; border: 1px dashed var(--line); border-radius: 12px; padding: 4px 12px; }
details.fler > summary { cursor: pointer; padding: 10px 0; min-height: 44px; font-weight: 600; color: var(--brand); }
.fotobtn { margin: 12px 0 0; cursor: pointer; }
.granska ul { margin: 4px 0 0 18px; padding: 0; }
.granska li { margin: 4px 0; }
.boltcards .card { padding: 10px; }
.boltgrid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; margin-top: 8px; }
.boltgrid button { flex-direction: column; gap: 0; min-height: 60px; padding: 4px 2px; justify-content: center; border-radius: 8px; }
.boltgrid button small { font-size: 11px; color: var(--muted); font-weight: 600; }
.boltgrid button b { font-size: 22px; line-height: 1.1; }
.boltgrid button.X { background: var(--brand); color: var(--brand-ink); }
.boltgrid button.X small { color: var(--brand-ink); }
.boltgrid button.V { background: var(--warn-bg); color: var(--warn); }
.boltgrid button.f { background: var(--brand-soft); }

/* postlista som kort i mobilen */
.postcards { display: grid; gap: 8px; }
.postcard { display: block; padding: 14px 16px; background: var(--card); border: 1px solid var(--line); border-radius: 12px; color: var(--ink); text-decoration: none; font-size: 17px; }
.postcard:active { background: var(--brand-soft); }

/* dialoger: farliga knappar till vänster, helskärm i mobilen */
.dlgbuttons .danger { margin-right: auto; }
@media (max-width: 760px) {
  dialog { max-width: 100vw; width: 100vw; max-height: 100dvh; height: 100dvh; margin: 0; border-radius: 0; }
  .dlgbuttons { position: sticky; bottom: 0; background: var(--card); padding: 10px 0; }
  .dlgbuttons button { flex: 1; }
  html, body { font-size: 17px; }
  label.f > .l, div.f > .l { font-size: 15px; }
  .formnav { bottom: calc(64px + env(safe-area-inset-bottom)); }
  .formnav button { flex: 1; min-height: 52px; }
  .formnav .grow { display: none; }
}

/* visningslägen (Mitt konto) */
html.falt-stor, html.falt-stor body { font-size: 19px; }
html.falt-stor h1 { font-size: 28px; }
html.falt-stor input, html.falt-stor select, html.falt-stor textarea { font-size: 20px; min-height: 54px; }
html.falt-stor button, html.falt-stor .btn { font-size: 18px; min-height: 52px; }
html.falt-stor label.f > .l, html.falt-stor div.f > .l, html.falt-stor .small, html.falt-stor .hint { font-size: 16px; }
html.falt-stor .tabbar a, html.falt-stor .tabbar button { font-size: 14px; }
html.falt-tunnel { --bg: #000; --card: #111; --ink: #fff; --muted: #c8cfcb; --line: #555;
  --brand: #ffd23f; --brand-ink: #000; --brand-soft: #2b2508;
  --warn: #ff6b5b; --warn-bg: #3d0f0a; --amber: #ffd23f; --amber-bg: #2b2508; --ok: #6dffa8; --ok-bg: #0b2a17; color-scheme: dark; }
html.falt-tunnel input, html.falt-tunnel select, html.falt-tunnel textarea, html.falt-tunnel button, html.falt-tunnel .btn { border-width: 2px; }

/* visa som roll (administratör) */
select.visasom { width: auto; min-height: 36px; padding: 4px 8px; font-size: 14px; }
.sheetbody select.visasom { width: 100%; min-height: 52px; margin: 8px 0; font-size: 17px; }
.visasombanner { display: flex; align-items: center; justify-content: center; gap: 12px; flex-wrap: wrap; padding: 8px 16px; background: #4b2a7a; color: #fff; font-size: 16px; }
.visasombanner button { background: #fff; color: #4b2a7a; border-color: #fff; }

/* MIMERZ: varumärke i sidhuvud och vid inloggning */
.logo { display: inline-flex; align-items: center; gap: 8px; font-weight: 800; letter-spacing: .12em; font-size: 18px; }
.logo img { border-radius: 7px; flex: none; }
.logo b { font-weight: 800; }
.logo span { color: #b8891f; font-weight: 800; }
.brandhero { text-align: center; margin: 24px auto 20px; }
.brandhero img { display: block; margin: 0 auto 12px; border-radius: 22px; box-shadow: 0 6px 24px rgba(0,0,0,.18); }
.brandword { font-size: 40px; font-weight: 800; letter-spacing: .16em; line-height: 1.1; padding-left: .16em; }
.brandword span, html.falt-tunnel .logo span { color: #d6a936; }
.brandtag { text-wrap: balance; font-size: 13px; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); margin-top: 6px; }
@media (prefers-color-scheme: dark) { :root:not(.falt-tunnel) .logo span { color: #d6a936; } }

/* Dibblas supportwidget (/_platform/support.js). Widgetens inbyggda <style> stoppas av CSP:n, så den får MIMERZ utseende här. */
#dibbla-support-btn { position: fixed; right: 16px; bottom: 16px; z-index: 9; display: inline-flex; align-items: center; min-height: 44px; padding: 10px 18px; border-radius: 99px; border: 1px solid #d6a936; background: #13212b; color: #fff; font: 600 15px -apple-system, "Segoe UI", Roboto, Arial, sans-serif; cursor: pointer; box-shadow: 0 4px 14px rgba(0,0,0,.25); }
#dibbla-support-panel { position: fixed; right: 16px; bottom: 72px; z-index: 10; width: min(360px, calc(100vw - 32px)); max-height: calc(100dvh - 120px); overflow-y: auto; padding: 16px; border-radius: 14px; border: 1px solid var(--line); background: var(--card); color: var(--ink); box-shadow: 0 10px 34px rgba(0,0,0,.28); font-size: 15px; }
#dibbla-support-panel h3 { margin: 0 0 8px; font-size: 17px; }
#dibbla-support-panel p { margin: 6px 0; }
#dibbla-support-panel input, #dibbla-support-panel textarea { margin: 6px 0; }
#dibbla-support-panel input[type=file] { min-height: 0; padding: 8px; font-size: 14px; }
#dibbla-support-panel button { margin-top: 8px; background: var(--brand); color: var(--brand-ink); border-color: var(--brand); font-weight: 600; }
#dibbla-support-panel a { display: inline-block; padding: 6px 0; }
#dibbla-support-status { margin-top: 8px; font-size: 14px; color: var(--muted); }
.sheetbody button.neutral { color: var(--ink); }
@media (max-width: 760px) {
  #dibbla-support-panel { left: 8px; right: 8px; width: auto; bottom: calc(72px + env(safe-area-inset-bottom)); }
}
/* Med flikraden (inloggad i mobilen) nås supporten under Mer, så knappen inte ligger över flikerna. */
body:has(.tabbar) #dibbla-support-btn { display: none; }
/* Lyft knappen över formulärets knapprad. */
body:has(.formnav) #dibbla-support-btn { bottom: 84px; }
@media print { #dibbla-support-btn, #dibbla-support-panel { display: none; } }
