/* BoostCash: BoostCap's look (purple on warm sand, DM Serif Display + DM Sans), light and dark. Fonts are served
   from /static/fonts (SIL Open Font License, fonts/OFL.txt); nothing is fetched from a third party. */
@font-face { font-family: 'DM Sans'; font-style: normal; font-weight: 400 700; font-display: swap;
  src: url(fonts/dm-sans-latin.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: 'DM Sans'; font-style: normal; font-weight: 400 700; font-display: swap;
  src: url(fonts/dm-sans-latin-ext.woff2) format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: 'DM Serif Display'; font-style: normal; font-weight: 400; font-display: swap;
  src: url(fonts/dm-serif-display-latin.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: 'DM Serif Display'; font-style: normal; font-weight: 400; font-display: swap;
  src: url(fonts/dm-serif-display-latin-ext.woff2) format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF; }
/* Layout: toppmeny som på boostcap.se, en kolumn med kort; säljflödet är en stegvis guide. Färger och typsnitt från BoostCaps befintliga stilmall. */
:root {
  --bg: #F6F2EA; --card: #FFFFFF; --sunken: #FBF8F2; --ink: #1C1A1F; --muted: #6B6670; --line: #E6DFD3;
  --brand: #5B3FA8; --brand-ink: #FFFFFF; --brand-soft: #EFE9FB; --accent: #C9A24D;
  --good: #1E7A46; --good-soft: #E3F3EA; --warn: #8A5A00; --warn-soft: #FBF0D8; --bad: #B3261E; --bad-soft: #FBE6E3;
  --serif: 'DM Serif Display', Georgia, serif; --sans: 'DM Sans', Arial, sans-serif;
}
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) {
  --bg: #17151A; --card: #211E25; --sunken: #1B181F; --ink: #ECE8F0; --muted: #A59FAE; --line: #37323D;
  --brand: #A892F2; --brand-ink: #1A1330; --brand-soft: #2C2540; --accent: #D9B566;
  --good: #63C68D; --good-soft: #17301F; --warn: #EDB95E; --warn-soft: #382B12; --bad: #F08F86; --bad-soft: #3D1C19;
  color-scheme: dark } }
:root[data-theme="dark"] {
  --bg: #17151A; --card: #211E25; --sunken: #1B181F; --ink: #ECE8F0; --muted: #A59FAE; --line: #37323D;
  --brand: #A892F2; --brand-ink: #1A1330; --brand-soft: #2C2540; --accent: #D9B566;
  --good: #63C68D; --good-soft: #17301F; --warn: #EDB95E; --warn-soft: #382B12; --bad: #F08F86; --bad-soft: #3D1C19;
  color-scheme: dark }

* { box-sizing: border-box }
body { background: var(--bg); color: var(--ink); font: 15px/1.5 var(--sans) }
h1, h2, h3 { font-family: var(--serif); font-weight: 400; margin: 0; text-wrap: balance }
h1 { font-size: 32px; line-height: 1.15 } h2 { font-size: 21px } h3 { font-size: 17px }
p { margin: 0 } a { color: inherit }
.muted { color: var(--muted) } .small { font-size: 13px } .num { font-variant-numeric: tabular-nums }
.inner { max-width: 1040px; margin: 0 auto; padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px)) }

.top { background: var(--card); border-bottom: 1px solid var(--line) }
.top .inner { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 28px; padding-block: 14px }
.logo { font: 400 22px var(--serif); text-decoration: none } .logo span { color: var(--brand) }
nav { display: flex; flex-wrap: wrap; gap: 2px 20px; flex: 1; min-width: 0 }
nav a { color: var(--muted); text-decoration: none; font-weight: 600; font-size: 14px; padding: 6px 0; border-bottom: 2px solid transparent; white-space: nowrap }
nav a:hover { color: var(--ink) } nav a[aria-current=page] { color: var(--ink); border-bottom-color: var(--brand) }
.who { font-size: 13px; color: var(--muted); text-align: right }
.demo { background: var(--warn-soft); color: var(--warn); font-size: 13px; text-align: center; padding: 6px 16px }

main { padding-block: 28px 64px; display: flex; flex-direction: column; gap: 20px }
.card { background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 22px; min-width: 0 }
.row { display: flex; flex-wrap: wrap; gap: 16px; align-items: center; justify-content: space-between }
.grid { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)) }
.stat .lbl { font-size: 13px; color: var(--muted) } .stat .val { font: 400 28px/1.2 var(--serif) }
.meter { height: 8px; border-radius: 99px; background: var(--line); overflow: hidden; margin-top: 10px }
.meter i { display: block; height: 100%; background: var(--brand); border-radius: 99px }

button, .btn { font: 600 14px var(--sans); border-radius: 8px; padding: 10px 18px; cursor: pointer; border: 1px solid var(--line); background: var(--card); color: var(--ink); text-decoration: none; display: inline-block; white-space: nowrap }
button:hover, .btn:hover { border-color: var(--brand) }
.primary { background: var(--brand); border-color: var(--brand); color: var(--brand-ink) }
.primary:disabled { opacity: .45; cursor: not-allowed }
.big { font-size: 16px; padding: 13px 24px }
:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px }

.pill { display: inline-block; font-size: 12px; font-weight: 600; padding: 2px 10px; border-radius: 99px; white-space: nowrap; background: var(--sunken); color: var(--muted); border: 1px solid var(--line) }
.pill.good { background: var(--good-soft); color: var(--good); border-color: transparent }
.pill.warn { background: var(--warn-soft); color: var(--warn); border-color: transparent }
.pill.bad { background: var(--bad-soft); color: var(--bad); border-color: transparent }
.pill.brand { background: var(--brand-soft); color: var(--brand); border-color: transparent }

.scroll { overflow-x: auto }
table { border-collapse: collapse; width: 100% }
th { font-size: 11px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); text-align: left; padding: 0 14px 8px 0; white-space: nowrap }
td { padding: 12px 14px 12px 0; border-top: 1px solid var(--line); vertical-align: middle }
td.r, th.r { text-align: right }
td:last-child, th:last-child { padding-right: 0 }
td.num { white-space: nowrap }
tr.click { cursor: pointer } tr.click:hover td { background: var(--sunken) }
.chips { display: flex; flex-wrap: wrap; gap: 8px }
.chips button { padding: 6px 14px; border-radius: 99px; font-weight: 500 }
.chips button[aria-pressed=true] { background: var(--ink); color: var(--card); border-color: var(--ink) }

.todo { display: flex; gap: 12px; align-items: flex-start; padding: 12px 0; border-top: 1px solid var(--line) }
.todo:first-of-type { border-top: 0 }
.dot { width: 10px; height: 10px; border-radius: 50%; margin-top: 6px; flex: none; background: var(--warn) } .dot.bad { background: var(--bad) }

.steps { display: flex; flex-wrap: wrap; gap: 6px 22px; font-size: 13px; font-weight: 600; color: var(--muted) }
.steps span b { font: 400 18px var(--serif); margin-right: 6px }
.steps .on { color: var(--brand) } .steps .done { color: var(--ink) }
.choices { display: grid; gap: 14px; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)) }
.choice { text-align: left; padding: 18px; border-radius: 12px; font-weight: 400; background: var(--card) }
.choice b { display: block; font: 400 18px var(--serif); margin-bottom: 4px } .choice:disabled { opacity: .55; cursor: default }
.drop { border: 2px dashed var(--line); border-radius: 12px; padding: 34px 18px; text-align: center; background: var(--sunken) }
.drop.over { border-color: var(--brand); background: var(--brand-soft) }
.fields { display: grid; gap: 14px 20px; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); align-items: end }
label.f { display: block; font-size: 13px; font-weight: 600 }
label.f input, label.f select { display: block; width: 100%; margin-top: 4px; font: 500 15px var(--sans); color: var(--ink); background: var(--sunken); border: 1px solid var(--line); border-radius: 8px; padding: 9px 10px }
.check { display: flex; gap: 10px; align-items: flex-start; font-size: 14px; padding: 6px 0 }
.check input { width: 18px; height: 18px; margin-top: 2px; accent-color: var(--brand); flex: none }
.offer { display: grid; gap: 20px; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) }
@media (max-width: 760px) { .offer { grid-template-columns: minmax(0, 1fr) } }
.payout { background: var(--brand-soft); border-radius: 12px; padding: 20px }
.payout .amt { font: 400 44px/1.1 var(--serif); color: var(--brand); font-variant-numeric: tabular-nums }
.lines div { display: flex; justify-content: space-between; gap: 12px; padding: 7px 0; border-top: 1px solid var(--line) }
.lines div:first-child { border-top: 0 } .lines .tot { font-weight: 700 }
.ok { color: var(--good); font-weight: 700 } .no { color: var(--bad); font-weight: 700 }
.note { padding: 10px 14px; border-radius: 8px; font-size: 14px; background: var(--warn-soft); color: var(--warn) }
.note.bad { background: var(--bad-soft); color: var(--bad) }

.tl { list-style: none; margin: 0; padding: 0 }
.tl li { position: relative; padding: 0 0 18px 28px }
.tl li::before { content: ""; position: absolute; left: 5px; top: 6px; width: 10px; height: 10px; border-radius: 50%; background: var(--line) }
.tl li::after { content: ""; position: absolute; left: 9px; top: 18px; bottom: 0; width: 2px; background: var(--line) }
.tl li:last-child::after { display: none } .tl li:last-child { padding-bottom: 0 }
.tl li.done::before { background: var(--good) } .tl li.now::before { background: var(--brand); box-shadow: 0 0 0 4px var(--brand-soft) }
.tl li.bad::before { background: var(--bad) }
.spin { width: 28px; height: 28px; border: 3px solid var(--line); border-top-color: var(--brand); border-radius: 50%; margin: 0 auto 12px; animation: sp 0.8s linear infinite }
@keyframes sp { to { transform: rotate(360deg) } }
@media (prefers-reduced-motion: reduce) { .spin { animation: none } }
.top.staff { background: var(--ink); border-bottom: 0 }
.top.staff .logo, .top.staff .who { color: var(--bg) } .top.staff .logo span { color: var(--accent) }
.top.staff nav a { color: var(--line) } .top.staff nav a:hover, .top.staff nav a[aria-current=page] { color: var(--bg); border-bottom-color: var(--accent) }
.count { display: inline-block; min-width: 18px; padding: 0 5px; margin-left: 4px; border-radius: 99px; background: var(--accent); color: #1C1A1F; font-size: 11px; font-weight: 700; text-align: center }
.case { display: grid; gap: 20px; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr) }
@media (max-width: 760px) { .case { grid-template-columns: minmax(0, 1fr) } }
.sig { display: flex; gap: 10px; padding: 5px 0; font-size: 14px }
.acts { display: flex; flex-wrap: wrap; gap: 8px; justify-content: flex-end }
.danger { color: var(--bad) } button.sm, .btn.sm { padding: 6px 12px; font-size: 13px }
.kpi { display: flex; justify-content: space-between; gap: 12px; padding: 8px 0; border-top: 1px solid var(--line) } .kpi:first-child { border-top: 0 }
a.stat { text-decoration: none; display: block } a.stat:hover { border-color: var(--brand) }
select.m { font: 500 13px var(--sans); color: var(--ink); background: var(--sunken); border: 1px solid var(--line); border-radius: 8px; padding: 6px 8px; max-width: 100% }

.inner { padding-bottom: 8px }
form.inline { display: inline }
.fel { color: var(--bad); font-weight: 600 }
.flash { padding: 10px 14px; border-radius: 8px; background: var(--good-soft); color: var(--good); font-weight: 600 }
label.f textarea { display: block; width: 100%; margin-top: 4px; font: 500 15px var(--sans); color: var(--ink); background: var(--sunken); border: 1px solid var(--line); border-radius: 8px; padding: 9px 10px }
td input.n { width: 90px; font: 500 14px var(--sans); color: var(--ink); background: var(--sunken); border: 1px solid var(--line); border-radius: 8px; padding: 6px 8px }

label.f textarea { display: block; width: 100%; margin-top: 4px; font: 400 14px/1.5 var(--sans); color: var(--ink); background: var(--sunken); border: 1px solid var(--line); border-radius: 8px; padding: 9px 10px; resize: vertical }
code { font: 13px ui-monospace, monospace; background: var(--sunken); padding: 1px 5px; border-radius: 4px }

/* Staff pages hold wide tables: a wider column, and the menu on a row of its own when it does not fit beside the logo */
body.staff .inner { max-width: 1320px }
body.staff .top .inner { gap: 6px 24px }
body.staff nav { gap: 2px 18px }
@media (max-width: 1240px) { .top.staff nav { order: 3; flex-basis: 100% } body.staff .who { margin-left: auto } }
th, td { padding-right: 18px }
td .pill + form, td form + form { margin-left: 6px }
.todo .acts { justify-content: flex-start }
.stat { display: flex; flex-direction: column } .stat .meter { margin-top: auto }
.grid { align-items: stretch }
.lines div > span:last-child { text-align: right }
h1 { overflow-wrap: anywhere }
@media (max-width: 600px) { h1 { font-size: 26px } .card { padding: 16px } main { padding-block: 20px 48px } }
/* A table that does not fit scrolls sideways inside its card instead of breaking names over several lines */
.scroll td, .scroll th { white-space: nowrap }
.scroll td.small { white-space: normal; min-width: 260px }
.todo .acts label.f { flex: 1; min-width: 200px; max-width: 420px }
.todo b a, td a { white-space: nowrap }
/* input boxes inside a table cell (the application's rows of board members, owners and guarantors) */
span.f input, span.f select { display: block; width: 100%; min-width: 130px; font: 500 15px var(--sans); color: var(--ink); background: var(--sunken); border: 1px solid var(--line); border-radius: 8px; padding: 9px 10px }
.bankid { text-align: center; margin-inline: auto }
.bankid-msg { font-weight: 600; min-height: 1.5em; margin: 14px 0 }
.bankid-qr { display: block; margin: 12px auto; width: 240px; height: 240px; border: 8px solid #fff; border-radius: 10px; box-shadow: 0 0 0 1px var(--line); background: #fff }
/* Column headings are buttons that sort the table (tabell.js); the arrow shows the column and direction in use */
th button.sort { all: unset; cursor: pointer; border-radius: 4px }
th button.sort:hover { color: var(--ink) } th button.sort:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px }
th button.sort::after { content: " ↕"; opacity: .35 }
th[aria-sort=ascending] button.sort, th[aria-sort=descending] button.sort { color: var(--ink) }
th[aria-sort=ascending] button.sort::after { content: " ↑"; opacity: 1 } th[aria-sort=descending] button.sort::after { content: " ↓"; opacity: 1 }
/* The filter row above a list */
.filter { display: flex; flex-wrap: wrap; gap: 10px 12px; align-items: flex-end }
.filter label.f { flex: 1 1 150px; max-width: 240px } .filter label.f.wide { flex: 2 1 260px; max-width: 420px }

.avtalstext{margin-top:12px;white-space:pre-line;max-height:60vh;overflow:auto;font-size:.92rem;line-height:1.5}

/* an invoice's timeline for the seller */
.tl { list-style: none; margin: 12px 0 0; padding: 0 }
.tl li { display: grid; grid-template-columns: 96px 1fr; gap: 0 14px; position: relative; padding: 0 0 14px 22px }
.tl li::before { content: ""; position: absolute; left: 4px; top: 6px; width: 10px; height: 10px; border-radius: 50%; background: var(--good) }
.tl li::after { content: ""; position: absolute; left: 8.5px; top: 20px; bottom: -4px; width: 1px; background: var(--line) }
.tl li:last-child { padding-bottom: 0 } .tl li:last-child::after { display: none }
.tl li.varning::before { background: var(--bad) }
.tl li.kommande::before { background: transparent; border: 2px solid var(--muted); width: 6px; height: 6px }
.tl li.kommande b { font-weight: 500 }
.tl-dag { color: var(--muted); font-size: .92rem; padding-top: 1px }
@media (max-width: 560px) { .tl li { grid-template-columns: 1fr } }

nav .antal { display: inline-block; min-width: 18px; padding: 0 5px; border-radius: 99px; background: var(--bad); color: #fff; font-size: 11px; font-weight: 700; line-height: 18px; text-align: center; vertical-align: 1px }
