/* =========================================================================
   Leverandørens bakpanel (superadmin)
   ========================================================================= */
#admin.bp { position: fixed; inset: 0; display: grid; grid-template-columns: 248px 1fr; background: var(--bg); color: var(--ink);
  --s1: #2a78d6; --s2: #eb6834;
  --ok: #15803d; --ok-bg: #e9f7ee; --warn: #b45309; --warn-bg: #fef4e2; --bad: #c62828; --bad-bg: #fdecec; --info: #1d4ed8; --info-bg: #eaf1ff; }
#admin.bp.hidden { display: none; }

/* Sidemeny */
.bp-side { display: flex; flex-direction: column; gap: 4px; padding: 18px 14px; background: linear-gradient(180deg, #0b1324, #0f1b33); color: #cbd5e1; min-height: 0; }
.bp-brand { display: flex; align-items: center; gap: 11px; padding: 4px 8px 20px; }
.bp-brand .logo { width: 36px; height: 36px; border-radius: 11px; display: grid; place-items: center; color: #fff; font-size: 14px;
  background: linear-gradient(140deg, var(--accent-hi), var(--accent-3)); box-shadow: 0 6px 16px -6px rgba(var(--accent-rgb), .9), inset 0 1px 0 rgba(255, 255, 255, .3); }
.bp-brand b { display: block; color: #fff; font-size: 16px; letter-spacing: -.01em; }
.bp-brand small { color: #7f8ea6; font-size: 11.5px; text-transform: uppercase; letter-spacing: .08em; font-weight: 600; }
.bp-nav { display: flex; flex-direction: column; gap: 2px; }
.bp-nav button { display: flex; align-items: center; gap: 11px; width: 100%; padding: 10px 12px; border: 0; border-radius: 10px; background: transparent;
  color: #aab6c8; font: inherit; font-size: 14px; font-weight: 550; cursor: pointer; text-align: left; transition: background .15s, color .15s; }
.bp-nav button svg.ik { width: 19px; height: 19px; opacity: .8; }
.bp-nav button:hover { background: rgba(255, 255, 255, .06); color: #fff; }
.bp-nav button.on { background: rgba(var(--accent-rgb), .2); color: #fff; box-shadow: inset 0 0 0 1px rgba(var(--accent-rgb), .4); }
.bp-nav button.on svg.ik { opacity: 1; color: var(--accent-hi); }
.bp-nav em { margin-left: auto; font-style: normal; font-size: 11.5px; font-weight: 700; min-width: 20px; padding: 1px 6px; border-radius: 99px; text-align: center; }
.bp-nav em:empty { display: none; }
.bp-nav em.bad { background: #ef4444; color: #fff; }
.bp-side .grow { flex: 1; }
.bp-me { display: flex; align-items: center; gap: 10px; padding: 12px 8px 8px; border-top: 1px solid rgba(255, 255, 255, .08); }
.bp-me b { display: block; color: #fff; font-size: 13.5px; }
.bp-me small { color: #7f8ea6; font-size: 12px; }
.bp-me-act { display: flex; gap: 6px; padding: 0 4px; }
.bp-me-act .btn { color: #aab6c8; flex: 1; justify-content: center; }
.bp-me-act .btn:hover { color: #fff; background: rgba(255, 255, 255, .08); }

/* Innhold */
.bp-main { overflow-y: auto; padding: 26px 32px 60px; min-width: 0; }
.bp-main > * { max-width: 1320px; margin-left: auto; margin-right: auto; }
.bp-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 20px; }
.bp-head h1 { margin: 0; font-size: 26px; letter-spacing: -.02em; font-weight: 750; }
.bp-head p { margin: 4px 0 0; color: var(--muted); font-size: 14px; }
.bp-head p::first-letter { text-transform: uppercase; }
.bp-head-act { display: flex; gap: 8px; flex-wrap: wrap; }
.bp-laster { display: grid; place-items: center; height: 50vh; }
.bp-laster span { width: 28px; height: 28px; border-radius: 50%; border: 3px solid var(--line); border-top-color: var(--accent); animation: bp-spin .8s linear infinite; }
@keyframes bp-spin { to { transform: rotate(360deg); } }

/* Kort og KPI */
.bp-card { background: var(--panel); border: 1px solid var(--line); border-radius: 16px; padding: 18px 20px; box-shadow: 0 1px 2px rgba(15, 23, 42, .04); min-width: 0; }
.bp-card.flush { padding: 0; overflow: hidden; }
.bp-card h3 { margin: 0 0 12px; font-size: 15px; font-weight: 650; display: flex; align-items: center; gap: 8px; text-transform: none; letter-spacing: -.005em; color: var(--ink); }
.bp-card h3 svg.ik { color: var(--muted); }
.bp-card-h { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 12px; flex-wrap: wrap; }
.bp-card-h h3 { margin: 0; }
.bp-kpis { display: grid; grid-template-columns: minmax(0, 1.7fr) repeat(5, minmax(0, 1fr)); gap: 14px; margin-bottom: 16px; }
.bp-kpis.small { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.bp-kpi { background: var(--panel); border: 1px solid var(--line); border-radius: 16px; padding: 16px 18px; display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.bp-kpi span { font-size: 12.5px; color: var(--muted); font-weight: 550; }
.bp-kpi b { font-size: clamp(18px, 1.55vw, 24px); font-weight: 750; letter-spacing: -.02em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-variant-numeric: tabular-nums; }
.bp-kpi b small { font-size: 15px; color: var(--muted); font-weight: 600; }
.bp-kpi > small { font-size: 12px; color: var(--muted); }
.bp-kpi.hero { background: linear-gradient(135deg, #0f1b33, #1e3a8a); border: 0; color: #fff; }
.bp-kpi.hero span, .bp-kpi.hero > small { color: #b6c4e0; }
.bp-kpi.hero b { font-size: 34px; }
.bp-kpi.bad b { color: var(--bad); }
.bp-kpi.ok b { color: var(--ok); }
.bp-grid2 { display: grid; grid-template-columns: 1.6fr 1fr; gap: 16px; margin-bottom: 16px; }
.bp-grid2.wide { grid-template-columns: 1.25fr 1fr; align-items: start; }
.bp-grid2.wide > div { display: flex; flex-direction: column; gap: 16px; }
.bp-grid3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; margin-bottom: 16px; }

/* Graf */
.bp-chart { position: relative; }
.bp-chart svg { width: 100%; height: auto; display: block; overflow: visible; }
.bp-chart .g { stroke: var(--line); stroke-width: 1; }
.bp-chart .base { stroke: #cbd5e1; stroke-width: 1; }
.bp-chart .ax { fill: var(--muted); font-size: 11px; font-variant-numeric: tabular-nums; }
.bp-chart .hit { fill: transparent; }
.bp-chart .mn.on .hit { fill: rgba(15, 23, 42, .04); }
.bp-tip { position: absolute; top: 0; width: 170px; padding: 10px 12px; border-radius: 10px; background: #0f172a; color: #e2e8f0; font-size: 12.5px;
  display: flex; flex-direction: column; gap: 4px; pointer-events: none; box-shadow: 0 10px 30px -10px rgba(15, 23, 42, .6); z-index: 2; }
.bp-tip.hidden { display: none; }
.bp-tip b:first-child { color: #fff; text-transform: capitalize; margin-bottom: 2px; }
.bp-tip span { display: flex; align-items: center; gap: 6px; }
.bp-tip span b { margin-left: auto; color: #fff; font-variant-numeric: tabular-nums; }
.bp-legend { display: flex; align-items: center; gap: 6px; font-size: 12.5px; color: var(--ink-2); }
.bp-legend i, .bp-tip i { width: 10px; height: 10px; border-radius: 3px; background: var(--c); display: inline-block; }
.bp-legend i:not(:first-child) { margin-left: 8px; }

/* Status-stolpe og bransjer */
.bp-stack { display: flex; gap: 2px; height: 14px; border-radius: 7px; overflow: hidden; }
.bp-stack span { min-width: 4px; }
.bp-stack .ok, .bp-stack-l i.ok { background: #16a34a; }
.bp-stack .info, .bp-stack-l i.info { background: #3b82f6; }
.bp-stack .warn, .bp-stack-l i.warn { background: #f59e0b; }
.bp-stack .bad, .bp-stack-l i.bad { background: #dc2626; }
.bp-stack .light, .bp-stack-l i.light { background: #cbd5e1; }
.bp-stack-l { display: flex; flex-wrap: wrap; gap: 6px 14px; margin-top: 10px; font-size: 12.5px; color: var(--ink-2); }
.bp-stack-l span { display: inline-flex; align-items: center; gap: 6px; }
.bp-stack-l i { width: 9px; height: 9px; border-radius: 3px; display: inline-block; }
.bp-hbars { display: flex; flex-direction: column; gap: 8px; }
.bp-hbar { display: grid; grid-template-columns: minmax(0, 1.3fr) 1fr auto; align-items: center; gap: 10px; font-size: 13px; }
.bp-hbar .n { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: var(--ink-2); }
.bp-hbar .b { height: 10px; background: var(--soft); border-radius: 5px; overflow: hidden; }
.bp-hbar .b i { display: block; height: 100%; background: var(--s1); border-radius: 0 4px 4px 0; }
.bp-hbar .v { font-weight: 650; font-variant-numeric: tabular-nums; min-width: 64px; text-align: right; }
.bp-hbar .v small { color: var(--muted); font-weight: 500; }

/* Lister */
.bp-list { display: flex; flex-direction: column; }
.bp-list.cols { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 0 20px; }
.bp-li { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 8px; margin: 0 -8px; border: 0; border-radius: 10px;
  background: transparent; font: inherit; text-align: left; cursor: pointer; color: inherit; border-bottom: 1px solid var(--line-2); }
.bp-li:hover { background: var(--soft); }
.bp-li b { font-size: 14px; font-weight: 600; }
.bp-li small { display: block; color: var(--muted); font-size: 12.5px; margin-top: 2px; }
.bp-li .r { text-align: right; flex-shrink: 0; }
.bp-tom { color: var(--muted); font-size: 13.5px; padding: 18px 4px; text-align: center; }
.bad { color: var(--bad); }
.bp-feed { display: flex; flex-direction: column; max-height: 330px; overflow-y: auto; margin: 0 -8px; }
.bp-ev { display: flex; gap: 10px; padding: 8px; border: 0; background: transparent; border-radius: 10px; text-align: left; font: inherit; font-size: 13px; color: var(--ink-2); cursor: pointer; }
.bp-ev:hover { background: var(--soft); }
.bp-ev b { color: var(--ink); }
.bp-ev small { display: block; color: var(--muted); font-size: 12px; margin-top: 2px; }
.bp-ev > i { flex-shrink: 0; width: 8px; height: 8px; margin-top: 6px; border-radius: 50%; background: #94a3b8; }
.t-status > i, .bp-ev i.t-status { background: #f59e0b; }
.bp-ev i.t-betaling { background: #16a34a; }
.bp-ev i.t-faktura { background: #3b82f6; }
.bp-ev i.t-opprettet { background: #8b5cf6; }

/* Chips */
.bp-chip { display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px 3px 8px; border-radius: 99px; font-size: 12.5px; font-weight: 600; white-space: nowrap;
  background: var(--soft); color: var(--ink-2); vertical-align: middle; }
.bp-chip i { width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.bp-chip small { font-weight: 500; opacity: .8; }
.bp-chip.ok { background: var(--ok-bg); color: var(--ok); }
.bp-chip.warn { background: var(--warn-bg); color: var(--warn); }
.bp-chip.bad { background: var(--bad-bg); color: var(--bad); }
.bp-chip.info { background: var(--info-bg); color: var(--info); }
.bp-chip.light { background: #eef1f5; color: #64748b; }

/* Filter */
.bp-filter { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 14px; }
.bp-filter .grow { flex: 1; }
.bp-filter select.input { width: auto; min-width: 180px; }
.bp-sok { display: flex; align-items: center; gap: 8px; flex: 1 1 260px; max-width: 380px; padding: 0 12px; height: 40px; border-radius: 11px; background: var(--panel); border: 1px solid var(--line); }
.bp-sok:focus-within { border-color: var(--accent-line-2); box-shadow: 0 0 0 3px var(--glow); }
.bp-sok svg.ik { color: var(--muted); }
.bp-sok input { border: 0; outline: 0; background: transparent; font: inherit; font-size: 14px; flex: 1; min-width: 0; color: var(--ink); }
.bp-seg { display: flex; gap: 2px; padding: 3px; border-radius: 11px; background: #e5e9f0; overflow-x: auto; }
.bp-seg button { border: 0; background: transparent; padding: 7px 12px; border-radius: 8px; font: inherit; font-size: 13px; font-weight: 550; color: var(--ink-2); cursor: pointer; white-space: nowrap; }
.bp-seg button b { color: var(--muted); font-weight: 600; margin-left: 2px; }
.bp-seg button.on { background: var(--panel); color: var(--ink); box-shadow: 0 1px 3px rgba(15, 23, 42, .12); }

/* Tabell */
.bp-t { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.bp-t th { text-align: left; font-size: 12px; font-weight: 600; color: var(--muted); padding: 11px 14px; background: var(--soft); border-bottom: 1px solid var(--line); white-space: nowrap; user-select: none; }
.bp-t th[data-sort] { cursor: pointer; }
.bp-t th[data-sort]:hover, .bp-t th.sorted { color: var(--ink); }
.bp-t th.sorted::after { content: " ↕"; opacity: .5; }
.bp-t td { padding: 11px 14px; border-bottom: 1px solid var(--line-2); vertical-align: middle; font-variant-numeric: tabular-nums; }
.bp-t tbody tr:last-child td { border-bottom: 0; }
.bp-t tbody tr[data-k] { cursor: pointer; }
.bp-t tbody tr:hover td { background: #fafbfd; }
.bp-t .r { text-align: right; white-space: nowrap; }
.bp-t td.r svg.ik { color: #cbd5e1; }
.bp-t tr:hover td.r svg.ik { color: var(--accent); }
.bp-t .nowrap { white-space: nowrap; }
.bp-t .nowrap .btn { margin-left: 4px; }
.bp-fhand { display: inline-grid; grid-template-columns: 72px 86px 72px 30px; gap: 6px; align-items: center; justify-items: stretch; vertical-align: middle; }
.bp-fhand .bp-ib { display: inline-flex; align-items: center; justify-content: center; gap: 5px; height: 30px; padding: 0 10px; font-size: 12.5px; font-weight: 600; }
.bp-fhand .bp-ib svg.ik { width: 14px; height: 14px; flex: none; color: currentColor; }
.bp-fhand .btn:not(.primary) svg.ik { color: var(--muted); }
.bp-fhand .bp-x { display: inline-flex; align-items: center; justify-content: center; width: 30px; height: 30px; padding: 0; border-color: transparent; background: transparent; }
.bp-fhand .bp-x svg.ik { width: 14px; height: 14px; color: #94a3b8; }
.bp-fhand .bp-x:hover { background: #fef2f2; border-color: #fecaca; } .bp-fhand .bp-x:hover svg.ik { color: #dc2626; }
.bp-t tr:hover td.r .bp-fhand svg.ik { color: inherit; }
.bp-t tr:hover td.r .bp-fhand .btn:not(.primary) svg.ik { color: var(--ink-2); }
/* Kundelisten: faste kolonnebredder så tall og merker står på linje fra rad til rad */
.bp-kt { table-layout: fixed; }
.bp-kt col.c-br { width: 150px; } .bp-kt col.c-st { width: 130px; } .bp-kt col.c-n { width: 90px; }
.bp-kt col.c-kr { width: 120px; } .bp-kt col.c-sa { width: 120px; } .bp-kt col.c-pil { width: 44px; }
.bp-kt td { height: 58px; }
.bp-kt .bp-kunde { min-width: 0; } .bp-kt .bp-kunde > div { min-width: 0; }
.bp-kt .bp-kunde b, .bp-kt .bp-kunde small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bp-ell { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--ink-2); }
.bp-cel { display: flex; flex-direction: column; gap: 2px; line-height: 1.25; }
.bp-t .r .bp-cel { align-items: flex-end; } .bp-t td:not(.r) .bp-cel { align-items: flex-start; }
.bp-cel b { font-weight: 650; } .bp-cel small { font-size: 11.5px; color: var(--muted); white-space: nowrap; }
.bp-cel b.bad { color: var(--bad); }
@media (max-width: 1100px) { .bp-kt col.c-br, .bp-kt col.c-sa { width: 0; } .bp-kt td:nth-child(2), .bp-kt th:nth-child(2), .bp-kt td:nth-child(7), .bp-kt th:nth-child(7) { display: none; } }
.bp-kunde { display: flex; align-items: center; gap: 11px; }
.bp-kunde b { display: block; font-weight: 600; }
.bp-kunde small { color: var(--muted); font-size: 12px; }
.bp-av { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; flex-shrink: 0; font-weight: 700; font-size: 14px;
  color: hsl(var(--h) 55% 32%); background: hsl(var(--h) 70% 93%); }
.bp-av.lg { width: 52px; height: 52px; border-radius: 15px; font-size: 22px; }
.bp-lenke { border: 0; background: none; padding: 0; font: inherit; color: var(--accent); cursor: pointer; }
.bp-lenke:hover { text-decoration: underline; }

/* Kundeside */
.bp-tilbake { display: inline-flex; align-items: center; gap: 6px; border: 0; background: none; color: var(--muted); font: inherit; font-size: 13.5px; font-weight: 550; cursor: pointer; padding: 4px 0; margin-bottom: 10px; }
.bp-tilbake:hover { color: var(--accent); }
.bp-khead { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; margin-bottom: 16px; }
.bp-khead .grow { flex: 1; min-width: 240px; }
.bp-khead h1 { margin: 0; font-size: 25px; letter-spacing: -.02em; display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.bp-khead p { margin: 4px 0 0; color: var(--muted); font-size: 13.5px; }
.bp-varsel { display: flex; gap: 12px; align-items: flex-start; padding: 13px 16px; border-radius: 13px; margin-bottom: 14px; font-size: 13.5px; border: 1px solid; }
.bp-varsel svg.ik { width: 20px; height: 20px; margin-top: 1px; }
.bp-varsel b { display: block; }
.bp-varsel span { color: var(--ink-2); }
.bp-varsel.warn { background: var(--warn-bg); border-color: #fcd9a4; color: var(--warn); }
.bp-varsel.bad { background: var(--bad-bg); border-color: #f6c4c4; color: var(--bad); }
.bp-varsel.info { background: var(--info-bg); border-color: var(--accent-line); color: var(--info); }
.bp-varsel.light { background: #f1f4f8; border-color: var(--line); color: var(--ink-2); }
.bp-tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); margin-bottom: 16px; overflow-x: auto; }
.bp-tabs button { border: 0; background: none; padding: 11px 14px; font: inherit; font-size: 14px; font-weight: 550; color: var(--muted); cursor: pointer; border-bottom: 2px solid transparent; margin-bottom: -1px; white-space: nowrap; }
.bp-tabs button b { font-size: 11.5px; background: var(--soft); border-radius: 99px; padding: 1px 7px; margin-left: 3px; color: var(--ink-2); }
.bp-tabs button:hover { color: var(--ink); }
.bp-tabs button.on { color: var(--accent); border-bottom-color: var(--accent); }

/* Skjema */
.bp-form { display: flex; flex-direction: column; gap: 12px; }
.bp-form label { display: flex; flex-direction: column; gap: 5px; font-size: 12.5px; font-weight: 600; color: var(--ink-2); }
.bp-form h3 { margin: 6px 0 0; }
.bp-form h3:first-child { margin-top: 0; }
.bp-f2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.bp-f3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.bp-form .kr { display: flex; align-items: center; gap: 8px; font-weight: 500; color: var(--muted); }
.bp-form .kr .input { flex: 1; text-align: right; }
.bp-steg { display: flex; align-items: center; gap: 10px; font-weight: 700; font-size: 14.5px; margin-top: 10px; }
.bp-steg span { width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; background: var(--accent); color: #fff; font-size: 12.5px; }
.bp-bransjer { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 8px; }
.bp-bransjer button { text-align: left; padding: 10px 12px; border-radius: 11px; border: 1px solid var(--line); background: var(--panel); font: inherit; font-size: 13.5px; font-weight: 600; cursor: pointer; color: var(--ink); }
.bp-bransjer button small { display: block; color: var(--muted); font-weight: 500; font-size: 12px; margin-top: 2px; }
.bp-bransjer button:hover { border-color: var(--accent-line-2); }
.bp-bransjer button.on { border-color: var(--accent); background: var(--accent-soft); box-shadow: 0 0 0 1px var(--accent); }
.bp-det summary { cursor: pointer; font-size: 13.5px; font-weight: 600; color: var(--accent); padding: 4px 0; }
.bp-det[open] summary { margin-bottom: 10px; }
.bp-hurtig { display: flex; gap: 6px; flex-wrap: wrap; }

/* Moduler */
.bp-mods { display: flex; flex-direction: column; gap: 16px; }
.bp-modgrp h4, .bp-h4 { margin: 0 0 8px; font-size: 12px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); font-weight: 650; }
.bp-modgrp { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 8px; }
.bp-modgrp h4 { grid-column: 1 / -1; }
.bp-mod { display: flex !important; flex-direction: row !important; align-items: flex-start; gap: 10px; padding: 11px 12px; border: 1px solid var(--line); border-radius: 12px; cursor: pointer; background: var(--panel); transition: border-color .15s, background .15s; }
.bp-mod:hover { border-color: var(--accent-line-2); }
.bp-mod input { display: none; }
.bp-mod .chk { width: 18px; height: 18px; border-radius: 6px; border: 1.5px solid #cbd5e1; flex-shrink: 0; margin-top: 1px; display: grid; place-items: center; }
.bp-mod.on { border-color: var(--accent-line-2); background: var(--accent-soft); }
.bp-mod.on .chk { background: var(--accent); border-color: var(--accent); }
.bp-mod.on .chk::after { content: ""; width: 9px; height: 5px; border: 2px solid #fff; border-top: 0; border-right: 0; transform: rotate(-45deg) translate(1px, -1px); }
.bp-mod .t { flex: 1; min-width: 0; }
.bp-mod .t b { display: block; font-size: 13.5px; color: var(--ink); }
.bp-mod .t small { display: block; font-size: 12px; color: var(--muted); font-weight: 450; line-height: 1.35; margin-top: 2px; }
.bp-mod .p { font-size: 12.5px; font-weight: 650; color: var(--ink-2); white-space: nowrap; font-variant-numeric: tabular-nums; }
.bp-sticky { position: sticky; bottom: -60px; display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 16px -20px -18px; padding: 14px 20px;
  background: rgba(255, 255, 255, .94); backdrop-filter: blur(8px); border-top: 1px solid var(--line); border-radius: 0 0 16px 16px; font-size: 14px; }

/* Pris */
.bp-pris { display: flex; flex-direction: column; gap: 6px; padding: 14px 16px; border-radius: 12px; background: var(--soft); border: 1px solid var(--line-2); font-size: 13.5px; }
.bp-pris > div { display: flex; justify-content: space-between; gap: 12px; color: var(--ink-2); }
.bp-pris > div b { font-variant-numeric: tabular-nums; color: var(--ink); }
.bp-pris .sum { border-top: 1px solid var(--line); padding-top: 8px; margin-top: 2px; font-size: 15px; }
.bp-pris .sum b { font-size: 19px; }
.bp-pris .sub { color: var(--muted); }
.bp-pris small { color: var(--muted); font-size: 11.5px; }
.bp-prisrader { display: flex; flex-direction: column; margin-bottom: 8px; }
.bp-prisrad { flex-direction: row !important; align-items: center; justify-content: space-between; gap: 14px; padding: 8px 0; border-bottom: 1px solid var(--line-2); }
.bp-prisrad span b { display: block; font-size: 13.5px; color: var(--ink); }
.bp-prisrad span small { font-size: 12px; color: var(--muted); font-weight: 450; }
.bp-prisrad .kr { width: 140px; flex-shrink: 0; }
.bp-fare { border-color: #f6c4c4; }
.bp-fare h3 { color: var(--bad); }

/* Bryter */
.bp-bryter { flex-direction: row !important; align-items: flex-start; gap: 12px !important; cursor: pointer; padding: 6px 0; }
.bp-bryter input { display: none; }
.bp-bryter > span { width: 40px; height: 23px; border-radius: 99px; background: #cbd5e1; position: relative; flex-shrink: 0; transition: background .15s; }
.bp-bryter > span::after { content: ""; position: absolute; top: 3px; left: 3px; width: 17px; height: 17px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0, 0, 0, .2); transition: transform .15s; }
.bp-bryter input:checked + span { background: var(--accent); }
.bp-bryter input:checked + span::after { transform: translateX(17px); }
.bp-bryter b { display: block; font-size: 14px; color: var(--ink); }
.bp-bryter small { font-weight: 450; color: var(--muted); font-size: 12.5px; }

/* Logg */
.bp-notat { display: flex; gap: 10px; align-items: flex-start; margin-bottom: 18px; }
.bp-notat textarea { flex: 1; resize: vertical; }
.bp-tidslinje { display: flex; flex-direction: column; }
.bp-tl { display: flex; gap: 12px; position: relative; padding-bottom: 16px; }
.bp-tl::before { content: ""; position: absolute; left: 15px; top: 32px; bottom: 0; width: 2px; background: var(--line-2); }
.bp-tl:last-child::before { display: none; }
.bp-tl .ic { width: 32px; height: 32px; border-radius: 10px; display: grid; place-items: center; background: var(--soft); color: var(--muted); flex-shrink: 0; }
.bp-tl .ic svg.ik { width: 16px; height: 16px; }
.bp-tl.t-notat .ic { background: #fef9c3; color: #a16207; }
.bp-tl.t-status .ic { background: var(--warn-bg); color: var(--warn); }
.bp-tl.t-betaling .ic { background: var(--ok-bg); color: var(--ok); }
.bp-tl.t-faktura .ic { background: var(--info-bg); color: var(--info); }
.bp-tl p { margin: 5px 0 2px; font-size: 13.5px; white-space: pre-wrap; }
.bp-tl small { color: var(--muted); font-size: 12px; }

/* Kundens app: banner ved lesemodus / prøveperiode */
.lisens-banner { position: fixed; left: 50%; bottom: 18px; transform: translateX(-50%); z-index: 60; display: flex; align-items: center; gap: 10px; max-width: min(720px, calc(100vw - 32px));
  padding: 11px 16px; border-radius: 13px; font-size: 13.5px; box-shadow: 0 16px 40px -14px rgba(15, 23, 42, .5); background: #0f172a; color: #f1f5f9; }
.lisens-banner b { color: #fff; }
.lisens-banner.warn { background: #78350f; }
.lisens-banner button { border: 0; background: rgba(255, 255, 255, .14); color: #fff; border-radius: 8px; padding: 4px 9px; cursor: pointer; font: inherit; font-size: 12.5px; }

@media (max-width: 1200px) {
  .bp-kpis { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .bp-grid3 { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 900px) {
  #admin.bp { grid-template-columns: 1fr; grid-template-rows: auto 1fr; }
  .bp-side { flex-direction: row; align-items: center; padding: 8px 12px; overflow-x: auto; }
  .bp-brand { padding: 0 8px 0 0; }
  .bp-brand div, .bp-side .grow, .bp-me { display: none; }
  .bp-nav { flex-direction: row; }
  .bp-nav button span { display: none; }
  .bp-main { padding: 18px 16px 50px; }
  .bp-kpis, .bp-kpis.small, .bp-grid2, .bp-grid2.wide, .bp-grid3, .bp-f2, .bp-f3 { grid-template-columns: 1fr 1fr; }
  .bp-grid2, .bp-grid2.wide, .bp-grid3 { grid-template-columns: 1fr; }
  .bp-card.flush { overflow-x: auto; }
}
