:root {
  --bg: #f4f6f7;
  --card: #ffffff;
  --ink: #1b2d39;
  --muted: #4d5d67; /* secondary text: darker than before, about 6.6:1 on white (was 5.2:1) */
  --line: #dfe5e8;
  --accent: #397a43;
  --accent-ink: #ffffff;
  --accent-soft: #e6f1e8;
  --warn: #9a5b00;
  --warn-soft: #fff3dc;
  --err: #b42318;
  --err-soft: #fde8e6;
  --blue: #1d4ed8;
  --blue-soft: #e5ecfd;
  --radius: 12px;
  --shadow: 0 1px 2px rgba(27,45,57,.05), 0 2px 8px rgba(27,45,57,.05);
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 15px/1.5 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; -webkit-font-smoothing: antialiased; }
a { color: var(--accent); }
.wrap { max-width: 1480px; margin: 0 auto; padding: 0 20px; }
main.wrap { padding-top: 32px; padding-bottom: 56px; }
h1 { font-size: 28px; font-weight: 700; letter-spacing: -.02em; margin: 0; display: flex; align-items: center; gap: 12px; }
h2 { font-size: 16px; margin: 0 0 14px; }
h3 { font-size: 14px; margin: 20px 0 8px; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; }
code { background: var(--line); padding: 1px 5px; border-radius: 4px; }

/* The logo is black on transparent, so the header stays white. */
.top { background: var(--card); color: var(--ink); border-top: 4px solid var(--accent); box-shadow: 0 1px 0 var(--line), var(--shadow); }
.top .wrap { display: flex; align-items: stretch; gap: 32px; height: 76px; }
.brand { display: flex; align-items: center; align-self: center; color: var(--ink); text-decoration: none; }
.brand img { height: 48px; width: auto; display: block; }
/* «Eloway portal» in letters where the logo was (web/src/lib/Wordmark.tsx, LoginViews): «El» in the green, the rest
   in the text colour (black in the light theme, white in the dark). */
.wordmark { display: inline-flex; align-items: baseline; font-size: 28px; font-weight: 800; letter-spacing: -.035em; line-height: 1; color: var(--ink); white-space: nowrap; }
.wordmark .el { color: var(--accent); }
.wordmark small { margin-left: 7px; font-size: .5em; font-weight: 600; letter-spacing: .02em; color: var(--muted); text-transform: uppercase; }
.logo-top .wordmark { font-size: 36px; }
.site-footer .f-brand .wordmark { font-size: 22px; }
@media (max-width: 860px) { .brand .wordmark { font-size: 24px; } }
@media (max-width: 600px) { .portal-top .brand .wordmark { font-size: 22px; } }
.top nav { display: flex; gap: 8px; flex: 1; }
.top nav a { display: flex; align-items: center; gap: 8px; color: var(--muted); text-decoration: none; padding: 0 10px; font-weight: 600; border-bottom: 3px solid transparent; border-top: 3px solid transparent; transition: color .15s, border-color .15s; }
.top nav a:hover { color: var(--ink); }
.top nav a.on { color: var(--ink); border-bottom-color: var(--accent); }
.top form { margin: 0; display: flex; align-items: center; }
.logo-top { text-align: center; padding: 28px 20px 0; }
.logo-top img { height: 44px; width: auto; max-width: 100%; }
.top nav .todo { min-width: 20px; text-align: center; background: var(--warn); color: #fff; font-size: 12px; font-weight: 700; line-height: 1; padding: 4px 6px; border-radius: 999px; }
.top .search { width: 280px; }
.top .who { align-self: center; color: var(--muted); font-size: 13px; white-space: nowrap; }
@media (max-width: 1100px) { .top .who { display: none; } }
.top .search input { padding-left: 34px; border-radius: 999px; background: var(--bg) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 14 14'%3E%3Ccircle cx='6' cy='6' r='4.5' fill='none' stroke='%235f6f79' stroke-width='1.6'/%3E%3Cpath d='M9.5 9.5L13 13' stroke='%235f6f79' stroke-width='1.6' stroke-linecap='round'/%3E%3C/svg%3E") no-repeat 12px center; border-color: transparent; }
.top .search input:hover { border-color: #cfd8dd; }
.top .search input:focus { background-color: #fff; border-color: var(--accent); }
@media (max-width: 860px) { .top .wrap { gap: 16px; height: auto; flex-wrap: wrap; padding-top: 8px; } .brand img { height: 36px; } .top nav { gap: 0; min-height: 44px; } .top .search { order: 5; width: 100%; padding-bottom: 10px; } }

.crumbs { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 0 0 10px; font-size: 14px; color: var(--muted); }
.crumbs a { color: var(--muted); text-decoration: none; }
.crumbs a:hover { color: var(--accent); text-decoration: underline; }
.crumbs span[aria-hidden] { color: #b9c5cc; }
.crumbs b { color: var(--ink); font-weight: 600; }
button.link { background: none; border: 0; color: var(--muted); padding: 0; font: inherit; cursor: pointer; }

.head { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 18px; flex-wrap: wrap; }
.back { margin: 0 0 12px; }
.back a { color: var(--muted); text-decoration: none; }
/* The electrician's way to all their jobs: a quiet pill, green on hover. */
a.back-link { display: inline-flex; align-items: center; gap: 8px; padding: 6px 14px 6px 12px; min-height: 40px; border: 1px solid var(--line); border-radius: 999px; background: #fff; color: var(--ink); font-weight: 600; font-size: 14px; text-decoration: none; box-shadow: var(--shadow); transition: border-color .15s, color .15s, background .15s; }
a.back-link .icon { flex: none; transition: transform .15s; }
a.back-link:hover { border-color: var(--accent); color: var(--accent); background: var(--accent-soft); }
a.back-link:hover > .icon { transform: translateX(-2px); }
a.back-link:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.muted { color: var(--muted); font-size: 14px; }
.late { color: var(--warn); font-weight: 600; }
.warn { color: var(--warn); }
.empty { text-align: center; color: var(--muted); padding: 32px !important; }

.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px 22px; margin-bottom: 16px; box-shadow: var(--shadow); }
.card.table { padding: 0; overflow-x: auto; }
.card.inactive { opacity: .6; }
.grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; align-items: start; }
@media (max-width: 860px) { .grid { grid-template-columns: 1fr; } }

table { width: 100%; border-collapse: collapse; }
th { text-align: left; font-size: 12px; text-transform: uppercase; letter-spacing: .07em; color: var(--muted); font-weight: 700; padding: 12px 18px; border-bottom: 1px solid var(--line); background: #f8fafb; white-space: nowrap; }
td { padding: 16px 18px; border-bottom: 1px solid var(--line); vertical-align: top; font-variant-numeric: tabular-nums; }
tr:last-child td { border-bottom: 0; }
tbody tr { transition: background .12s; }
tbody tr:hover { background: #f8fbf9; }
td a { text-decoration: none; }
td a:hover { text-decoration: underline; }
td .muted { margin-top: 2px; }

/* Tabs (every page): plain text, a line under the one that is shown; on a narrow screen they scroll sideways. */
.tabs, .subtabs { display: flex; gap: 24px; margin: 0 0 16px; border-bottom: 1px solid var(--line); overflow-x: auto; scrollbar-width: thin; }
.tabs a, .subtabs a { display: flex; align-items: center; gap: 8px; flex: none; padding: 8px 2px 10px; color: var(--muted); font-weight: 600; font-size: 15px; text-decoration: none; white-space: nowrap; border-bottom: 2px solid transparent; transition: color .12s, border-color .12s; }
.tabs a:hover, .subtabs a:hover { color: var(--ink); border-bottom-color: #c5ced3; }
.tabs a.on, .subtabs a.on { color: var(--ink); border-bottom-color: var(--accent); }
.tabs a b { min-width: 22px; text-align: center; background: var(--bg); color: var(--muted); font-size: 12px; font-weight: 700; padding: 1px 6px; border-radius: 999px; }
.tabs a.on b { background: var(--accent-soft); color: var(--accent); }
.tabs .warn-count, .subtabs .warn-count { min-width: 20px; text-align: center; background: var(--err-soft); color: var(--err); font-size: 12px; font-weight: 700; padding: 1px 6px; border-radius: 999px; }

.badge { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 600; padding: 3px 10px; border-radius: 999px; white-space: nowrap; }
.badge::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.s-ny { background: #eceeed; color: #47514c; }
.s-sendt { background: var(--blue-soft); color: var(--blue); }
.s-akseptert { background: var(--accent-soft); color: var(--accent); }
.s-avslatt { background: var(--err-soft); color: var(--err); }
.s-avlyst { background: var(--bg); color: var(--muted); }
h1 .badge { font-size: 13px; }

button, .btn { background: var(--accent-fill, var(--accent)); color: var(--accent-ink); border: 1px solid var(--accent-fill, var(--accent)); border-radius: 8px; padding: 8px 16px; font: inherit; font-weight: 600; cursor: pointer; text-decoration: none; display: inline-block; white-space: nowrap; transition: background .12s, border-color .12s, box-shadow .12s; }
button:hover, .btn:hover { background: var(--accent-fill-hover, #2f6638); border-color: var(--accent-fill-hover, #2f6638); }
button.ghost, .btn.ghost { background: var(--card); color: var(--ink); border-color: #cfd8dd; box-shadow: 0 1px 1px rgba(27,45,57,.04); }
button.ghost:hover, .btn.ghost:hover { background: var(--bg); border-color: #b9c5cc; }
button.danger { color: var(--err); }
button:focus-visible, .btn:focus-visible, a:focus-visible { outline: 3px solid rgba(57,122,67,.35); outline-offset: 2px; }
input, select, textarea { font: inherit; padding: 8px 10px; border: 1px solid #cfd8dd; border-radius: 8px; background: #fff; color: var(--ink); width: 100%; transition: border-color .12s, box-shadow .12s; }
input:hover, select:hover, textarea:hover { border-color: #b9c5cc; }
input:focus, select:focus, textarea:focus { outline: 0; border-color: var(--accent); box-shadow: 0 0 0 3px rgba(57,122,67,.2); }
select { appearance: none; -webkit-appearance: none; padding-right: 34px; text-overflow: ellipsis; cursor: pointer; background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1.5l5 5 5-5' fill='none' stroke='%235f6f79' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") no-repeat right 12px center; }
label { display: block; font-size: 13px; color: var(--muted); font-weight: 600; }
label input, label select, label textarea { margin-top: 4px; font-weight: 400; }
form.inline { display: flex; gap: 8px; align-items: center; margin: 0; }
form.inline select { min-width: 190px; }
td form.inline { min-width: 360px; }
td form.inline select { flex: 1; width: 0; }
/* The electrician list on the dashboard: looks like the select, with a box to tick on each line (up to 5). */
.picker { position: relative; min-width: 190px; }
td form.inline .picker { flex: 1; width: 0; }
.picker-btn, .picker-btn:hover { display: block; width: 100%; text-align: left; background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1.5l5 5 5-5' fill='none' stroke='%235f6f79' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") no-repeat right 12px center; color: var(--ink); border: 1px solid #cfd8dd; border-radius: 8px; padding: 8px 34px 8px 10px; font-weight: 400; overflow: hidden; text-overflow: ellipsis; }
.picker-btn:hover { border-color: #b9c5cc; }
.picker-btn:focus-visible, .picker.open .picker-btn { outline: 0; border-color: var(--accent); box-shadow: 0 0 0 3px rgba(57,122,67,.2); }
.picker-btn span { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.picker-list { position: fixed; z-index: 50; width: 380px; max-width: calc(100vw - 32px); max-height: 380px; overflow-y: auto; background: #fff; border: 1px solid #cfd8dd; border-radius: 8px; box-shadow: 0 8px 24px rgba(27,45,57,.16); padding: 4px 0; font-size: 14px; }
.picker-list { padding-top: 0; }
.picker-search { position: sticky; top: 0; z-index: 1; background: inherit; padding: 8px 10px; border-bottom: 1px solid var(--line); }
.picker-search input { width: 100%; padding: 7px 10px; font-size: 14px; }
.picker-empty { padding: 10px 12px; }
.picker-title { font-weight: 700; color: var(--ink); padding: 8px 12px 2px; }
.picker-item { display: flex; align-items: center; gap: 8px; padding: 5px 12px 5px 22px; color: var(--ink); font-size: 14px; font-weight: 400; cursor: pointer; }
.picker-item:hover { background: #f4f6f7; }
.picker-item.on { background: var(--accent-soft); }
.picker-item.off { color: #9aa6ad; cursor: not-allowed; }
.picker-item input { width: auto; margin: 0; accent-color: var(--accent); }
form.stack { display: grid; gap: 14px; }
form.stack button { justify-self: start; }

.flash { background: var(--accent-soft); color: var(--accent); border-left: 4px solid currentColor; border-radius: 8px; padding: 10px 14px; margin-bottom: 16px; font-weight: 500; }
.flash.err { background: var(--err-soft); color: var(--err); }
.flash.wait { background: var(--warn-soft); color: var(--warn); font-size: 14px; }
.flash a { color: inherit; }
.flash.report-told-warn { display: flex; gap: 8px; align-items: flex-start; margin: 0; font-weight: 500; }
.flash.report-told-warn .icon { flex: none; margin-top: 2px; }

dl { display: grid; grid-template-columns: max-content 1fr; gap: 9px 18px; margin: 0; }
dt { color: var(--muted); font-size: 13px; padding-top: 1px; }
dd { margin: 0; }
.quote { background: #f4f6f5; border-left: 3px solid var(--line); padding: 6px 10px; margin: 6px 0; font-size: 14px; white-space: pre-wrap; }
ul.history { list-style: none; padding: 0; margin: 0; font-size: 14px; }
ul.history li { padding: 6px 0; border-bottom: 1px dashed var(--line); }
/* The job's e-mail log: no lines between, a little air instead. */
ul.history.mails { display: grid; gap: 10px; }
ul.history.mails li { padding: 0; border: 0; }
details.manual { margin-top: 18px; border-top: 1px solid var(--line); padding-top: 12px; }
details.manual summary { cursor: pointer; color: var(--muted); font-size: 14px; margin-bottom: 10px; }

form.inst { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px 14px; align-items: end; }
form.inst label:nth-child(5) { grid-column: span 2; }
form.inst label:nth-child(6) { grid-column: span 1; }
form.inst .buttons { display: flex; gap: 8px; grid-column: 1 / -1; }
label.check { display: flex; align-items: center; gap: 8px; color: var(--ink); padding-bottom: 8px; }
label.check input { width: auto; margin: 0; }
@media (max-width: 860px) { form.inst { grid-template-columns: 1fr 1fr; } form.inst label:nth-child(5) { grid-column: span 2; } }
.lookup input { width: 150px; }
.lookup-result { background: var(--blue-soft); color: var(--blue); padding: 10px 14px; border-radius: 8px; margin-bottom: 14px; }
.card.new { border-style: dashed; }

.login { max-width: 360px; margin: 32px auto 0; }
.login h1 { margin-bottom: 16px; }
.login .login-brand { margin: 0 0 2px; font-size: 18px; font-weight: 700; color: var(--accent); letter-spacing: -.01em; }
/* «Opprett passord» and its «i»: the note shows on hover, and on focus (a tap on a phone, the keyboard). */
.login-links .create { position: relative; display: inline-flex; align-items: center; gap: 6px; }
.tip { display: inline-flex; color: var(--muted); cursor: help; border-radius: 50%; outline: none; }
.tip svg { display: block; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; }
.tip svg .dot { fill: currentColor; stroke: none; }
.tip:hover, .tip:focus-visible, .tip:focus { color: var(--accent); }
.tip:focus-visible { box-shadow: 0 0 0 3px rgba(57,122,67,.3); }
.tip-text { position: absolute; left: 0; top: calc(100% + 8px); z-index: 5; width: min(260px, 80vw); padding: 9px 12px; border-radius: 8px; background: var(--ink); color: #fff; font-size: 13px; line-height: 1.45; box-shadow: var(--shadow); opacity: 0; visibility: hidden; transform: translateY(-2px); transition: opacity .12s, transform .12s, visibility .12s; pointer-events: none; }
.tip:hover .tip-text, .tip:focus .tip-text { opacity: 1; visibility: visible; transform: none; }
.login h1 + .muted { margin: -8px 0 16px; }
.login button { width: 100%; padding: 11px; }
/* The eye in a password field (LoginViews): inside the field, on the right. */
.pw { position: relative; display: block; margin-top: 4px; }
.pw input { margin-top: 0; padding-right: 44px; }
.login .pw-toggle, .pw-toggle { position: absolute; top: 50%; right: 4px; transform: translateY(-50%); width: auto; padding: 6px; display: inline-flex; background: none; border: 0; border-radius: 6px; color: var(--muted); }
.login .pw-toggle:hover, .pw-toggle:hover { background: var(--bg); color: var(--ink); }
.login-links { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin: 18px 0 0; font-size: 14px; }
.login-links a { text-decoration: none; }
.login-links a:hover { text-decoration: underline; }
.answer .head { margin-bottom: 4px; }
.answer .head button { width: auto; padding: 4px 10px; font-size: 13px; }

.answer { max-width: 560px; margin: 0 auto; }
.answer h1 { margin: 12px 0 4px; }
.answer > .muted { margin: 0 0 16px; }
label.choice { display: flex; align-items: center; gap: 12px; border: 1px solid var(--line); border-radius: 8px; padding: 14px; color: var(--ink); font-size: 15px; cursor: pointer; }
label.choice input { width: 20px; height: 20px; margin: 0; }
label.choice.yes:has(input:checked) { border-color: var(--accent); background: var(--accent-soft); }
label.choice.no:has(input:checked) { border-color: var(--err); background: var(--err-soft); }
.answer button { width: 100%; padding: 12px; font-size: 16px; }

/* --- v2: orders, electricians, more statuses --- */
.s-planlagt { background: #dcf3f6; color: #0b7a8f; }
.s-utfort { background: var(--accent); color: #fff; }
.e-ja { background: var(--accent-soft); color: var(--accent); }
.e-usikker { background: var(--warn-soft); color: var(--warn); }
.e-ukjent { background: #eceeed; color: #47514c; }
.e-nei { background: var(--err-soft); color: var(--err); }
/* «Åpnet» in E-postlogg: blue, with an eye instead of the dot. */
.badge.e-apnet { --c: #1f5fbf; --c-soft: #e4eefc; gap: 4px; }
.badge.e-apnet::before { display: none; }
.badge.e-apnet .icon { width: 13px; height: 13px; margin: 0; }
.count { font-size: 18px; font-weight: 500; }
.star { color: #d49b00; }
.cap { display: block; color: var(--warn); font-size: 13px; font-weight: 600; margin-top: 2px; }
.cap::before { content: "⚠ "; }
.clamp { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
td.num, th.num { text-align: right; white-space: nowrap; }
tr.dim td { opacity: .55; }
.row { display: flex; gap: 14px; align-items: center; flex-wrap: wrap; }
.row label { flex: 1; min-width: 160px; }
.row-act { display: flex; gap: 10px; align-items: center; justify-content: space-between; }
button.small { padding: 4px 10px; font-size: 13px; }
button.link.danger, .danger { color: var(--err); }
button.link { color: var(--accent); text-decoration: underline; }
button.link:hover, .answer button.link:hover { background: none; border-color: transparent; }
.top button.link { color: var(--muted); text-decoration: none; font-weight: 600; white-space: nowrap; }
.top button.link:hover { color: var(--ink); }
.label { font-size: 13px; color: var(--muted); font-weight: 600; }
.help { display: block; font-weight: 400; font-size: 13px; color: var(--muted); margin-top: 3px; }

.cands { display: grid; gap: 8px; }
label.cand { display: flex; gap: 10px; align-items: flex-start; border: 1px solid var(--line); border-radius: 10px; padding: 12px 14px; color: var(--ink); font-weight: 400; cursor: pointer; transition: border-color .12s, background .12s; }
label.cand:hover { border-color: #b9c5cc; }
label.cand:has(input:checked) { border-color: var(--accent); background: #f3f9f4; box-shadow: 0 0 0 1px var(--accent); }
input[type=radio], input[type=checkbox] { accent-color: var(--accent); }
label.cand.prev { opacity: .6; }
label.cand input[type=radio] { width: auto; margin: 3px 0 0; }
.cand-body { display: grid; gap: 2px; flex: 1; font-size: 14px; }
.cand-top { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
label.cand.other select { margin-top: 6px; }
.dist { font-size: 13px; font-weight: 600; color: var(--accent); background: var(--accent-soft); padding: 1px 8px; border-radius: 999px; white-space: nowrap; }
.dist.out { color: var(--warn); background: var(--warn-soft); }

.filters { display: flex; gap: 12px; justify-content: space-between; flex-wrap: wrap; padding: 12px 14px; }
.filters input[name=q] { width: 260px; }
.filters select { width: auto; }
.filters .zip { width: 140px; }
form.wrap-row { flex-wrap: wrap; }
.empty-state { text-align: center; padding: 40px 20px; }
.empty-state p { color: var(--muted); max-width: 520px; margin: 8px auto 20px; }

form.grid { align-items: start; }
.fields { display: grid; grid-template-columns: 1fr 1fr; gap: 12px 14px; }
.fields .span2 { grid-column: span 2; }
.fields label.check { padding: 22px 0 0; }
@media (max-width: 600px) { .fields { grid-template-columns: 1fr; } .fields .span2 { grid-column: auto; } }
.actions { display: flex; gap: 10px; }
.span-all { grid-column: 1 / -1; }

.answer .state { margin: 0 0 14px; }
.answer .two { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.answer .two button { width: 100%; }
.answer button.link { width: auto; padding: 0; font-size: inherit; background: none; border: 0; }
.center { text-align: center; }

/* --- v3: pictures, the customer's page, progress --- */
.steps { list-style: none; display: flex; margin: 0 0 20px; padding: 0; max-width: 560px; }
.steps li { flex: 1; position: relative; text-align: center; font-size: 13px; font-weight: 600; color: var(--muted); padding-top: 22px; }
.steps li span { position: absolute; top: 0; left: 50%; width: 14px; height: 14px; margin-left: -7px; border-radius: 50%; background: var(--card); border: 2px solid #cfd8dd; z-index: 1; }
.steps li::before { content: ""; position: absolute; top: 6px; right: 50%; width: 100%; height: 2px; background: #cfd8dd; }
.steps li:first-child::before { display: none; }
.steps li.done { color: var(--ink); }
.steps li.done span { background: var(--accent); border-color: var(--accent); }
.steps li.done::before, .steps li.next::before { background: var(--accent); }
.steps li.next span { border-color: var(--accent); box-shadow: 0 0 0 4px var(--accent-soft); }
.steps.off li.done span { background: var(--err); border-color: var(--err); }
.steps.off li.next span { border-color: #cfd8dd; box-shadow: none; }
.steps.off li.done::before, .steps.off li.next::before { background: #cfd8dd; }
.answer .steps { margin: 4px auto 20px; }

.shots { display: grid; grid-template-columns: repeat(auto-fill, minmax(104px, 1fr)); gap: 10px; }
.shots:not(:empty) { margin-bottom: 14px; }
.shot { position: relative; margin: 0; }
.shot img { display: block; width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 8px; border: 1px solid var(--line); background: var(--bg); }
.shot a:hover img { border-color: var(--accent); }
.shot .doc { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; aspect-ratio: 1; padding: 8px; border-radius: 8px; border: 1px solid var(--line); background: var(--bg); text-decoration: none; color: var(--ink); font-size: 13px; text-align: center; overflow: hidden; }
.shot .doc b { background: var(--err); color: #fff; font-size: 12px; padding: 2px 6px; border-radius: 4px; letter-spacing: .04em; }
.shot .doc span { overflow-wrap: anywhere; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.shot figcaption { font-size: 12px; color: var(--muted); margin-top: 4px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.shot form { position: absolute; top: 4px; right: 4px; margin: 0; }
/* What the customer's picture is of: its own line under the picture, whole (may wrap). */
.shot .shot-label { display: block; color: var(--ink); font-size: 12px; font-weight: 600; line-height: 1.3; white-space: normal; margin-bottom: 1px; }
.shot .del, .answer .shot .del { display: grid; place-items: center; width: 24px; height: 24px; padding: 0; border-radius: 50%; line-height: 0; background: rgba(27,45,57,.75); border: 0; color: #fff; }
.shot .del .icon { width: 14px; height: 14px; margin: 0; vertical-align: 0; } /* an SVG cross, in the middle (a «×» sits low in most fonts) */
.shot .del:hover { background: var(--err); }
.no-shots { margin: 0 0 12px; }
.uploader { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.uploader.busy label { opacity: .6; pointer-events: none; }
.uploader label { color: var(--ink); font-size: 15px; }
.answer .uploader label { width: 100%; text-align: center; padding: 12px; border-style: dashed; border-color: var(--accent); color: var(--accent); }
/* Files can also be dragged onto it (on a computer): it lights up while they are over it. */
.answer .uploader label.over { border-style: solid; background: var(--accent-soft); box-shadow: 0 0 0 3px rgba(57,122,67,.2); }
.uploader .drop-hint { font-weight: 400; color: var(--muted); }
@media (hover: none) { .uploader .drop-hint { display: none; } }
.linkbox { font-size: 13px; color: var(--muted); background: var(--bg); }
.card > .help { margin: 4px 0 10px; }
ul.want { margin: 0 0 14px; padding-left: 20px; }
ul.want li { margin: 2px 0; }
.pics { font-weight: 600; }

a.job-row { display: flex; align-items: center; gap: 14px; text-decoration: none; color: var(--ink); padding: 16px 18px; margin-bottom: 10px; transition: border-color .12s, box-shadow .12s; }
a.job-row:hover { border-color: var(--accent); }
.job-main { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; flex: 1; min-width: 0; }
.job-main b { font-size: 17px; }
.job-main .muted { flex-basis: 100%; }
.answer h3 { margin-top: 24px; }

/* --- v4: the order list, compact like Shopify's: filter bar on top, dense rows, date column --- */
.orders .toolbar { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; padding: 10px 12px; border-bottom: 1px solid var(--line); margin: 0; }
.orders .toolbar input[type=search] { flex: 1; min-width: 220px; padding: 6px 10px 6px 32px; font-size: 14px; background: var(--bg) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 14 14'%3E%3Ccircle cx='6' cy='6' r='4.5' fill='none' stroke='%235f6f79' stroke-width='1.6'/%3E%3Cpath d='M9.5 9.5L13 13' stroke='%235f6f79' stroke-width='1.6' stroke-linecap='round'/%3E%3C/svg%3E") no-repeat 10px center; border-color: transparent; }
.orders .toolbar form { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin: 0; }
.orders .toolbar form.grow { flex: 1; min-width: 300px; }
/* The job list has fixed column widths: the table is drawn while it loads, and with widths taken
   from the content it jumped every time more rows came in. */
/* The dashboard's list. Fixed: order + date 132, status 140, electrician 330, customer 18 %, place 13 %; «Produkter»
   gets the rest: ~130px at the table's min-width, ~150px on a 1150px screen. Narrower, the card scrolls sideways (below). */
.orders table.jobs { table-layout: fixed; min-width: 1060px; }
.orders table.jobs col.c-order { width: 132px; }
.orders table.jobs col.c-customer { width: 18%; }
.orders table.jobs col.c-place { width: 13%; }
.orders table.jobs col.c-status { width: 140px; } /* the widest badge, «Venter på svar», whole */
.orders table.jobs col.c-electrician { width: 330px; }
.orders table.jobs th a { white-space: nowrap; }
.orders table.jobs td .when { font-size: 13px; margin-top: 2px; white-space: nowrap; }
.orders table.jobs td, .orders table.jobs td > div { overflow: hidden; text-overflow: ellipsis; }
.orders table.jobs td form.inline { min-width: 0; }
.orders td .also { margin-top: 2px; font-size: 13px; }
.orders td .also a { color: var(--muted); }
.orders td.phone { white-space: nowrap; }
.orders td.phone a { color: var(--ink); }
.orders .toolbar .zip { width: 140px; padding: 6px 10px; font-size: 14px; }
.orders .toolbar input[type=search]:focus { background-color: #fff; border-color: var(--accent); }
.orders .toolbar select { width: auto; padding: 6px 30px 6px 10px; font-size: 14px; }
.orders .toolbar button { padding: 6px 12px; font-size: 14px; }
/* A filter that is in use stands out, so it's clear why the list is shorter. */
.orders .toolbar select.active { border-color: var(--accent); background-color: var(--accent-soft); color: var(--accent); font-weight: 600; }
.orders .toolbar select { max-width: 230px; }
.orders .toolbar .reset { font-size: 14px; color: var(--muted); }
.orders th { font-size: 13px; text-transform: none; letter-spacing: 0; font-weight: 600; padding: 8px 12px; background: #f7f8f8; }
.orders td { padding: 14px 12px; font-size: 14px; vertical-align: middle; }
.orders td b { font-weight: 600; }
.orders td.when { white-space: nowrap; }
.orders td .muted { font-size: 13px; margin-top: 3px; }
.orders tbody tr:hover { background: #f6f6f7; }
.orders .badge { padding: 2px 8px; }
.orders td form.inline { min-width: 320px; }
.orders td form.inline select { padding: 5px 30px 5px 8px; font-size: 13px; }
.orders td form.inline button { padding: 5px 12px; font-size: 13px; }
.orders td.products { max-width: 260px; }
.orders .one-line { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.orders .install { color: var(--accent); margin-top: 2px; }
.orders tr.new td:first-child { box-shadow: inset 3px 0 0 var(--accent); }
.new-tag { display: inline-block; margin-left: 6px; padding: 0 6px; border-radius: 999px; background: var(--accent); color: #fff; font-size: 12px; font-weight: 700; line-height: 18px; vertical-align: 1px; }
.top nav .todo { background: var(--accent); }

/* --- Status colours: one muted colour per status, the same on the tabs and the badges. ---
   --c = text and dot, --c-soft = background. */
.s-ny, .t-ny { --c: #8a5a00; --c-soft: #fdf0d5; }                       /* Ikke sendt: needs action */
.s-sendt, .t-sendt { --c: #1f5fbf; --c-soft: #e4eefc; }                 /* Venter på svar */
.s-akseptert, .t-bekreftet { --c: #2f7a3e; --c-soft: #e2f2e5; }         /* Bekreftet */
.s-planlagt { --c: #0b7a8f; --c-soft: #dcf3f6; }                         /* Planlagt: turquoise */
.s-avslatt, .t-avslatt { --c: #b42318; --c-soft: #fdeceb; }             /* Avslått */
.s-utfort, .t-utfort { --c: #22c55e; --c-soft: #dcfce7; }               /* Utført: light green */
.s-avlyst, .t-avlyst { --c: #5f6f79; --c-soft: #eceff1; }               /* Avlyst */
.e-ja, .t-e-ja { --c: #2f7a3e; --c-soft: #e2f2e5; }                     /* Aktiv */
.e-usikker, .t-e-usikker { --c: #8a5a00; --c-soft: #fdf0d5; }           /* Usikker */
.e-ukjent, .t-e-ukjent { --c: #5f6f79; --c-soft: #eceff1; }             /* Ikke vurdert */
.e-nei, .t-e-nei { --c: #b42318; --c-soft: #fdeceb; }                   /* Ikke bruk */
.tone-orange { --c: #c2410c; --c-soft: #ffedd5; }                        /* Mangler dato (the electricians' tile) */
.badge[class*="s-"], .badge[class*="e-"] { background: var(--c-soft); color: var(--c); }

/* Tabs with a status: a dot and the count in the status colour; the line under the open tab too. */
.tabs a[class*="t-"]:not(.t-alle):not(.t-e-alle)::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--c); flex: none; }
.tabs a[class*="t-"]:not(.t-alle):not(.t-e-alle) b { background: var(--c-soft); color: var(--c); }
.tabs a[class*="t-"]:not(.t-alle):not(.t-e-alle).on { border-bottom-color: var(--c); }
.tabs a[class*="t-"]:not(.t-alle):not(.t-e-alle).on b { background: var(--c); color: #fff; }

/* --- The electricians' dashboard ("Mine oppdrag") --- */
.top .link-quiet { align-self: center; color: var(--muted); font-size: 13px; text-decoration: none; white-space: nowrap; }
.top .link-quiet:hover { color: var(--ink); }
/* «Profil» on the electrician's side: shown on every screen (their details and the password are there). */
.top .profile-link { align-self: center; display: inline-flex; align-items: center; gap: 6px; color: var(--muted); font-size: 14px; font-weight: 600; text-decoration: none; white-space: nowrap; }
.top .profile-link:hover, .top .profile-link.on { color: var(--accent); }
.top span.brand { cursor: default; }
/* The portals (electrician, Oppdragsgiver) on a phone: the logo with «Profil» and «Logg ut» as icons on the first
   row, the menu across the whole width under it, so nothing falls onto a row of its own. */
@media (max-width: 600px) {
  .portal-top .wrap { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; grid-template-areas: "brand profile out" "nav nav nav"; align-items: center; gap: 0 4px; height: auto; padding-top: 8px; }
  .portal-top .brand { grid-area: brand; }
  .portal-top .brand img { height: 32px; }
  .portal-top nav { grid-area: nav; gap: 0; min-height: 44px; overflow-x: auto; scrollbar-width: none; margin: 0 -10px; }
  .portal-top nav a { padding: 0 10px; white-space: nowrap; }
  .portal-top .who { display: none; }
  .portal-top .profile-link { grid-area: profile; }
  .portal-top form { grid-area: out; }
  .portal-top .profile-link, .portal-top button.link { justify-content: center; width: 40px; height: 40px; padding: 0; border-radius: 50%; }
  .portal-top .profile-link:hover, .portal-top button.link:hover { background: var(--bg); }
  .portal-top .profile-link .icon, .portal-top button.link .icon { width: 20px; height: 20px; margin: 0; }
  .portal-top .top-label { display: none; }
}
main.portal { padding-top: 28px; padding-bottom: 56px; }
main.portal .head p { margin: 4px 0 0; }
/* «Mine oppdrag» in one column: «Neste monteringer» on top, the list under it with the whole width. */
.portal-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 20px; align-items: start; }
.portal-grid aside { display: grid; gap: 16px; }
.portal-grid aside .card { margin: 0; }
/* «Neste monteringer» as wide as what is in it: narrow for one, wider for more (side by side, then on more rows
   when the page is full), and the whole width on a phone. */
.portal-grid aside { justify-items: start; }
.card.next { width: fit-content; max-width: 100%; min-width: min(320px, 100%); }
.card.next h2 { display: flex; align-items: center; gap: 8px; }
.card.next > p { max-width: 440px; margin-bottom: 0; }
.card.next ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 0 32px; }
.card.next li { flex: 0 0 320px; width: 320px; min-width: 0; } /* (a width too, so the box's own width counts 320 each) */
@media (max-width: 760px) { .card.next { width: 100%; } .card.next li { flex-basis: 100%; width: 100%; } }
.card.next li a, .card.next li .next-item { display: flex; gap: 14px; align-items: flex-start; padding: 10px 0; text-decoration: none; color: var(--ink); }
/* Each installation: the name, the address on one line, and the order with the charger (cut with «…»). */
.next-text { display: grid; gap: 2px; min-width: 0; flex: 1; padding-top: 2px; }
.next-name { font-size: 15px; font-weight: 700; line-height: 1.3; }
.next-addr, .next-meta { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.next-addr { font-size: 14px; line-height: 1.4; }
.next-meta { font-size: 13px; color: var(--muted); line-height: 1.4; margin-top: 2px; }
.next-order { display: inline-block; margin-right: 6px; padding: 0 7px; border-radius: 999px; background: var(--bg); color: var(--ink); font-size: 12px; font-weight: 600; }
.card.next li a:hover .next-name { text-decoration: underline; }
.daybox { display: grid; place-items: center; flex: none; width: 52px; padding: 4px 0; border-radius: 8px; background: #dcf3f6; color: #0b7a8f; font-size: 13px; font-weight: 600; line-height: 1.2; text-transform: lowercase; }
.daybox b { font-size: 20px; }
.daybox small { font-size: 11px; color: var(--muted); }
table.portal-jobs td { vertical-align: top; }
table.portal-jobs tr.clickable { cursor: pointer; }
table.portal-jobs tr.clickable:hover { background: #f1f6f2; }
table.portal-jobs tr.clickable:hover td:first-child b { text-decoration: underline; }
table.portal-jobs td.act { text-align: right; white-space: nowrap; vertical-align: middle; }
table.portal-jobs .ok { color: var(--accent); font-weight: 600; display: inline-flex; align-items: center; gap: 4px; }
table.portal-jobs td a.muted { display: inline-flex; align-items: center; gap: 3px; margin-top: 2px; font-size: 13px; }
table.portal-jobs .products { max-width: 240px; }
.btn.small { padding: 5px 12px; font-size: 13px; }
@media (max-width: 1100px) {
  .portal-grid { grid-template-columns: 1fr; }
}
/* On a phone: each job is a card with the column names as labels. */
@media (max-width: 760px) {
  .top .link-quiet { display: none; }
  table.portal-jobs thead { display: none; }
  table.portal-jobs, table.portal-jobs tbody, table.portal-jobs tr, table.portal-jobs td { display: block; width: 100%; }
  table.portal-jobs tr { padding: 12px 14px; border-bottom: 1px solid var(--line); }
  table.portal-jobs td { padding: 4px 0; border: 0; display: grid; grid-template-columns: 92px minmax(0, 1fr); gap: 10px; }
  table.portal-jobs td::before { content: attr(data-label); color: var(--muted); font-size: 13px; padding-top: 2px; }
  table.portal-jobs td .v { min-width: 0; }
  table.portal-jobs td.act { display: block; text-align: left; padding-top: 8px; }
  table.portal-jobs td.act .btn { width: 100%; text-align: center; }
  table.portal-jobs .products { max-width: none; }
}

/* --- The electrician's job page (/svar/…): one column, the next step first --- */
.answer.job-view { max-width: 760px; }
.job-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 16px; }
.job-top > .muted { margin-left: auto; } /* on the right also without «Gå til Montørportalen» (logged in) */
.answer.job-view h1 { margin: 0; line-height: 1.2; }
.answer.job-view .job-sub { margin: 4px 0 18px; }
.answer.job-view .steps { margin: 0 auto 22px; max-width: none; }
.answer.job-view .card { margin-bottom: 14px; min-width: 0; }
.answer.job-view .card h2 { display: flex; align-items: center; gap: 8px; font-size: 17px; }
/* «Neste steg»: the one thing to do now, with a green frame. */
.card.next-step { border: 2px solid var(--accent); }
.next-step .eyebrow { font-size: 12px; font-weight: 700; color: var(--accent); text-transform: uppercase; letter-spacing: .06em; }
.next-step h2 { margin: 0 0 4px; }
.next-step h2 + .muted { margin: 0; }
.next-row { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
/* Under the list of those asked: some air above the button, so it doesn't sit on the last line. */
.next-step ul.history + .next-row { margin-top: 8px; }
.next-row input[type=date] { flex: 1 1 180px; width: auto; min-height: 44px; }
.answer .next-row button, .answer .next-row .btn { width: auto; flex: 0 0 auto; min-height: 44px; display: inline-flex; align-items: center; gap: 6px; }
.next-row .btn.ghost { color: var(--ink); }
.next-later { margin: 0; }
.next-later + .next-later { margin-top: 4px; }
.from-mail { display: flex; align-items: center; gap: 8px; background: var(--accent-soft); color: var(--accent); border-radius: 8px; padding: 8px 12px; font-size: 14px; font-weight: 600; }
/* The calendar on the electrician's page (lib/Calendar.tsx): a month, open, Monday first. */
.cal { border: 1px solid var(--line); border-radius: 12px; padding: 14px; max-width: 380px; background: #fff; }
.cal-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 10px; font-weight: 700; }
.answer .cal-head button { width: 34px; height: 34px; padding: 0; border-radius: 50%; background: #fff; color: var(--ink); border: 1px solid var(--line); font-size: 18px; line-height: 1; }
.answer .cal-head button:hover:not(:disabled) { border-color: var(--accent); color: var(--accent); }
.answer .cal-head button:disabled { opacity: .35; cursor: default; }
.cal-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 4px; text-align: center; }
.cal-grid .dow { font-size: 12px; color: var(--muted); font-weight: 700; padding: 4px 0; }
.answer .cal-grid button { width: 100%; height: 40px; padding: 0; border-radius: 8px; background: #fff; color: var(--ink); border: 1px solid transparent; font-size: 15px; font-weight: 500; }
.answer .cal-grid button:hover:not(:disabled) { border-color: var(--accent); background: var(--accent-soft); color: var(--ink); }
.answer .cal-grid button.wk { color: var(--muted); }
.answer .cal-grid button.today { border-color: #c5ced3; }
.answer .cal-grid button.on, .answer .cal-grid button.on:hover:not(:disabled) { background: var(--accent); border-color: var(--accent); color: #fff; font-weight: 700; }
.answer .cal-grid button:disabled { color: #b7c1c7; background: #fff; cursor: default; }
.picked { margin: 0; font-size: 15px; }
.picked b { color: var(--accent); }
.answer .next-later button.link { font-weight: 600; }
/* Kunden, Jobben and Kundens anlegg in one card, a line between them. */
.job-info section + section { border-top: 1px solid var(--line); margin-top: 18px; padding-top: 18px; }
.job-info h2 { margin-bottom: 10px; }
.job-info section > .muted { margin: 0; }
/* Wide enough for the longest question on one line; the same width in every section so they line up. */
dl.facts { grid-template-columns: 270px minmax(0, 1fr); gap: 10px 14px; }
dl.facts dd { overflow-wrap: anywhere; }
dl.facts a[href^="tel:"], dl.facts a[href^="mailto:"] { font-weight: 600; text-decoration: none; }
/* The address and «Vis på kart» on one line; on a phone the link goes under it. */
.addr { display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 16px; }
.addr .map-btn { margin-top: 0; }
@media (max-width: 560px) { .addr { flex-direction: column; gap: 4px; } }
/* Merknader from the order: in yellow, a bullet per line. */
.card.remarks { background: var(--warn-soft); border-color: #f0d9a8; }
.card.remarks h2 { color: var(--warn); margin-bottom: 6px; }
.card.remarks ul { margin: 0; padding-left: 20px; line-height: 1.7; }
/* Cards that open and close: Bilder og dokumentasjon, Meld avvik eller tillegg. */
details.card.fold { padding: 0; }
details.fold > summary { list-style: none; cursor: pointer; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 18px 22px; }
details.fold > summary::-webkit-details-marker { display: none; }
details.fold > summary > span { display: grid; gap: 2px; min-width: 0; }
details.fold .fold-title { display: flex; align-items: center; gap: 8px; font-size: 17px; font-weight: 700; color: var(--ink); }
details.fold > summary > .icon { flex: none; color: var(--muted); transition: transform .15s; }
details.fold[open] > summary > .icon { transform: rotate(180deg); }
details.fold > summary:hover .fold-title { color: var(--accent); }
details.fold > summary:focus-visible { outline: 3px solid rgba(57,122,67,.35); outline-offset: -3px; border-radius: var(--radius); }
.fold-body { padding: 0 22px 20px; }
/* The job's logs: Hendelseslogg and E-postlogg as tabs in one card. */
.logs .subtabs { margin-top: -6px; }
.logs .subtabs button { display: flex; align-items: center; gap: 8px; flex: none; background: none; border: 0; border-bottom: 2px solid transparent; border-radius: 0;
  padding: 8px 2px 10px; color: var(--muted); font: inherit; font-weight: 600; font-size: 15px; cursor: pointer; min-height: 0; }
.logs .subtabs button:hover { color: var(--ink); border-bottom-color: #c5ced3; }
.logs .subtabs button.on { color: var(--ink); border-bottom-color: var(--accent); }
.logs .new-count { background: var(--accent); color: #fff; font-size: 12px; font-weight: 700; padding: 1px 8px; border-radius: 999px; }
.logs .badge.new { background: var(--accent); color: #fff; }
.logs .logs-hint { margin: 0 0 12px; font-size: 13px; }
.portal-card .muted { margin: 0 0 14px; }
@media (max-width: 560px) {
  .answer.job-view h1 { font-size: 23px; }
  /* Each question above its answer: the screen is narrow. */
  dl.facts { grid-template-columns: minmax(0, 1fr); gap: 0; }
  dl.facts dd { margin-bottom: 10px; }
  .answer.job-view .shots { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
  .answer .next-row button, .answer .next-row .btn { flex: 1 1 auto; justify-content: center; }
}

/* --- The team's job page (/jobb/…): one column, the next step first --- */
.job-one { max-width: 860px; margin: 0 auto; }
.job-one .head { margin-bottom: 2px; }
.job-one .job-sub { margin: 0 0 18px; }
.job-one .steps { max-width: none; margin: 0 0 22px; }
.job-one .card { margin-bottom: 14px; min-width: 0; }
.job-one .card h2 { display: flex; align-items: center; gap: 8px; font-size: 17px; }
.job-one .next-row a { display: inline-flex; align-items: center; gap: 6px; font-size: 14px; text-decoration: none; }
.job-one .next-row button { display: inline-flex; align-items: center; gap: 6px; min-height: 42px; }
/* The picker as on the list, wide; the chosen ones as cards under it. */
.send-bar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.send-bar .lbl { font-size: 14px; font-weight: 600; }
.send-bar .picker { flex: 1 1 300px; }
.chosen { display: grid; gap: 8px; }
.chosen-card { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 3px 12px; border: 1px solid var(--accent); background: #f3f9f4; border-radius: 10px; padding: 12px 14px; font-size: 14px; }
.chosen-card > :not(.x) { grid-column: 1; }
.chosen-card .x { grid-column: 2; grid-row: 1; width: 28px; height: 28px; padding: 0; border-radius: 50%; background: #fff; color: var(--muted); border: 1px solid var(--line); font-size: 16px; line-height: 1; }
.chosen-card .x:hover { color: var(--err); border-color: var(--err); background: #fff; }
.waitbox { display: flex; gap: 10px; align-items: center; background: var(--warn-soft); color: var(--warn); border-radius: 8px; padding: 10px 14px; font-size: 14px; font-weight: 600; }
.waitbox .icon { flex: none; }
.waitbox.ok { background: var(--accent-soft); color: var(--accent); }
.job-one .job-info h3 { margin-top: 16px; }

/* --- Extra work / missing material from the electrician --- */
.report-form h2 { display: flex; align-items: center; gap: 8px; }
.report-form > .muted { margin: -6px 0 0; }
.report-form button { justify-self: start; }
/* One row of «Meld avvik eller tillegg» (AnswerPage ReportLineFields): with several, each in its own box with a
   «Tillegg 2 · Fjern» head; the sum of them all under the last one. */
.report-line { display: grid; gap: 12px; }
.report-line[role="group"] { padding: 12px; border: 1px solid var(--line); border-radius: 8px; background: var(--card); }
.report-line-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.report-line-head button.link { display: inline-flex; align-items: center; gap: 4px; font-size: 13px; color: var(--err); }
.report-form button.add-line { display: inline-flex; align-items: center; gap: 6px; }
.report-total { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; padding: 10px 12px; border-radius: 8px;
  background: var(--accent-soft); font-size: 15px; }
.report-total > span:last-child { display: grid; justify-items: end; }
.report-total b { color: var(--accent); white-space: nowrap; }
.report-total small { color: var(--muted); font-size: 12px; white-space: nowrap; }
/* The amount and the price side by side (one under the other on a phone), the unit inside the field on the right. */
/* The fixed prices for additions, under the amount (AnswerPage RateList): a plain table in a white box, the head
   in small capitals like «Sendt for dette oppdraget», the chosen row in green. */
.rate-list { border: 1px solid var(--line); border-radius: 8px; overflow: hidden; font-size: 14px; background: var(--card); }
.rate-head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; padding: 8px 12px; background: var(--bg); border-bottom: 1px solid var(--line);
  color: var(--muted); font-size: 12px; text-transform: uppercase; letter-spacing: .04em; }
.rate-head b { color: var(--ink); font-weight: 700; }
.rate-list ul { list-style: none; margin: 0; padding: 0; }
.rate-list li { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; padding: 9px 12px; }
.rate-list li b { white-space: nowrap; font-weight: 600; }
.rate-list li small { color: var(--muted); font-size: 12px; font-weight: 400; }
.rate-list li.on { background: var(--accent-soft); font-weight: 600; }
.rate-list li.on b { color: var(--accent); }
/* «Fastpris: 25 m × 160 kr»: a green tag under the price (AmountFields). */
.amount-row .help .fixed-tag { display: inline-block; padding: 2px 8px; border-radius: 999px; background: var(--accent-soft); color: var(--accent); font-weight: 600; }
.amount-row .help .fixed-tag b { color: inherit; }
.amount-row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
@media (max-width: 520px) { .amount-row { grid-template-columns: 1fr; } }
.with-unit { position: relative; display: block; margin-top: 4px; }
.with-unit input { margin-top: 0; padding-right: 46px; }
.with-unit > span { position: absolute; right: 12px; top: 50%; transform: translateY(-50%); color: var(--muted); font-weight: 400; pointer-events: none; }
.amount-row .help { display: block; margin-top: 4px; font-weight: 400; }
.amount-row .help b { color: var(--ink); }
.amount-row input[aria-invalid="true"] { border-color: var(--err); }
.report-figures b, td.report-figures { white-space: nowrap; }
ul.reports li > button.link { justify-self: start; display: inline-flex; align-items: center; gap: 4px; font-size: 13px; margin-top: 2px; }
.report-edit { margin-top: 6px; }
/* On the electrician's job page: what is already reported, over the form for a new one. */
.sent-reports { margin-bottom: 18px; padding-bottom: 18px; border-bottom: 1px solid var(--line); }
.sent-reports h3 { margin: 0 0 8px; font-size: 15px; }
/* «Avvik og tillegg dere har meldt 1» over the table, «Meld et nytt avvik eller tillegg» over the form. */
.fold-body h3.report-title { display: flex; align-items: center; gap: 8px; margin: 0 0 10px; font-size: 16px; font-weight: 700; color: var(--ink); text-transform: none; letter-spacing: 0; }
.report-title .count { display: inline-grid; place-items: center; min-width: 22px; height: 22px; padding: 0 7px; border-radius: 999px; background: var(--blue-soft); color: var(--blue); font-size: 12px; }
.report-form h3.report-title { margin-bottom: 0; }
.sent-reports ul.reports { display: grid; gap: 8px; margin: 0; padding: 0; list-style: none; }
/* What the electrician has reported on this job (AnswerPage): a table like the price table under it, the head in
   grey small capitals, wide rows without lines, a send icon first on each. On a phone each row is a block. */
.sent-table { width: 100%; border-collapse: separate; border-spacing: 0; font-size: 14px; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; background: var(--card); }
.sent-table th { background: var(--bg); color: var(--muted); font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; text-align: left; padding: 8px 12px; white-space: nowrap; }
.sent-table th:first-child { color: var(--ink); }
.sent-table td { padding: 12px; vertical-align: top; white-space: nowrap; }
.sent-table td.sent-what { white-space: normal; width: 100%; }
.sent-what > div { display: flex; gap: 10px; }
.sent-what > div > span:last-child { display: grid; gap: 2px; }
.sent-icon { flex: none; display: grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; background: var(--blue-soft); color: var(--blue); }
.sent-icon .icon { width: 14px; height: 14px; margin: 0; }
.sent-text { color: var(--ink); }
.sent-meta { color: var(--muted); font-size: 13px; }
@media (max-width: 620px) {
  .sent-table thead { display: none; }
  .sent-table, .sent-table tbody, .sent-table tr, .sent-table td { display: block; }
  .sent-table tr { padding: 4px 0 10px; }
  .sent-table td { padding: 4px 12px; }
  .sent-table td[data-label] { display: flex; justify-content: space-between; gap: 12px; padding-left: 52px; }
  .sent-table td[data-label]::before { content: attr(data-label); color: var(--muted); font-size: 13px; }
}
.report-sum { margin: 10px 0 0; font-size: 14px; }
/* The electrician's «Avvik og tillegg»: fixed columns on a computer (the description takes what is left); on a
   phone each report is a card, as the other lists. */
@media (min-width: 761px) {
  table.report-list { table-layout: fixed; }
  table.report-list col.c-date { width: 110px; }
  table.report-list col.c-job { width: 200px; }
  table.report-list col.c-what { width: 190px; }
  table.report-list col.c-qty { width: 100px; }
  table.report-list col.c-price { width: 170px; }
  table.report-list col.c-told { width: 140px; }
  table.report-list td.report-desc { width: auto; }
}
table.report-list td.report-qty, table.report-list td.report-price b { white-space: nowrap; }
/* One card per job: the job, the customer and the total on top, its reports under it. */
.report-job { margin-bottom: 16px; }
.report-job-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; flex-wrap: wrap; padding: 14px 16px; border-bottom: 1px solid var(--line); }
.report-job-head a b { font-size: 16px; }
.report-job-who { font-weight: 600; margin-left: 6px; }
.report-job-head .muted { margin-top: 2px; font-size: 13px; }
.report-job-contact { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 16px; margin-top: 6px; font-size: 14px; }
.report-job-contact > span, .report-job-contact > a { display: inline-flex; align-items: center; gap: 5px; }
.report-job-contact .icon { width: 14px; height: 14px; }
.report-job-sum { text-align: right; }
.report-job-sum b { font-size: 16px; }
@media (max-width: 760px) { .report-job-sum { text-align: left; } }
table.report-list td .muted { margin-top: 2px; }
ul.reports { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
ul.reports > li { border: 1px solid #fed7aa; background: #fff7ed; border-left: 4px solid #c2410c; border-radius: 8px; padding: 10px 12px; font-size: 14px; display: grid; gap: 3px; }
.report-head { display: flex; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.report-head b { color: #9a3412; }
.report-box { margin: 12px 0 16px; }
.report-type { color: #9a3412; }
.orders tr.clickable { cursor: pointer; }
/* Invoices: the electricians' form, and the box on the team's job page. */
.invoice-form h2 { display: flex; align-items: center; gap: 8px; }
.invoice-form > .muted { margin: -6px 0 0; }
.invoice-form input[type=file] { padding: 7px; background: var(--bg); }
.invoice-form .up-status.warn { color: var(--err); font-weight: 600; }
main.portal h3 { margin-top: 24px; }
.invoice-box { margin: 12px 0 16px; }
.invoice-box h3 { display: flex; align-items: center; gap: 6px; color: var(--ink); text-transform: none; letter-spacing: 0; font-size: 15px; margin: 0 0 8px; }
ul.invoices { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
ul.invoices li { border: 1px solid #bbf7d0; border-left: 4px solid #16a34a; background: #f0fdf4; border-radius: 8px; padding: 10px 12px; font-size: 14px; }
table.portal-jobs td.report-desc { width: 45%; overflow-wrap: anywhere; }
@media (max-width: 760px) { table.portal-jobs td.report-desc { width: 100%; } } /* a card on a phone: the whole width */
table.portal-jobs td:last-child .ok, table.portal-jobs td:last-child .muted { white-space: nowrap; }
/* The Oppdragsgiver's status, like tracking a parcel: a bar of five parts filled up to the step in its colour (--c
   above), the step's name with «2 av 5», and under it what happens next. */
.track { max-width: 270px; font-size: 13.5px; line-height: 1.35; }
.track .track-bar[class*="s-"] { display: flex; gap: 3px; margin: 3px 0 7px; background: none; }
.track .track-bar span { flex: 1; height: 5px; border-radius: 3px; background: var(--line); }
.track .track-bar span.on { background: var(--c); }
.track .track-label { font-weight: 700; color: var(--ink); }
.track .track-step { color: var(--muted); white-space: nowrap; }
.track .status-hint { margin-top: 3px; color: var(--muted); font-size: 12.5px; line-height: 1.35; }
.track-who { margin-top: 5px; font-size: 12.5px; line-height: 1.35; color: var(--muted); max-width: 270px; }
.track-who b { color: var(--ink); font-weight: 600; }
.track-who .said-no { text-decoration: line-through; }
/* Several asked: each name whole, with a dot in the colour of where they are (as the badges on the order's page). */
.track-who ul.who-list { list-style: none; margin: 3px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 2px 12px; }
.track-who ul.who-list li { display: inline-flex; align-items: center; gap: 5px; white-space: nowrap; color: var(--ink); background: none; }
.track-who ul.who-list li::before { content: ""; flex: none; width: 6px; height: 6px; border-radius: 50%; background: var(--c); }
.track-who ul.who-list li.s-avslatt, .track-who ul.who-list li.s-avlyst { color: var(--muted); }
@media (max-width: 760px) { table.portal-jobs .track, .track-who { max-width: none; } }
/* On the order's page, under the steps: who it went to, each with where they are. */
.order-installers { margin-top: 20px; }
.order-installers h3 { margin: 0 0 8px; font-size: 13px; font-weight: 600; color: var(--muted); text-transform: uppercase; letter-spacing: .03em; }
.order-installers ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px 22px; }
.order-installers li { display: flex; align-items: center; gap: 8px; font-size: 14px; }
/* The reminders we sent the installer, oldest first, with the date and time. */
.order-reminders { margin-top: 20px; }
.order-reminders h3 { margin: 0 0 8px; font-size: 13px; font-weight: 600; color: var(--muted); text-transform: uppercase; letter-spacing: .03em; }
.order-reminders ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.order-reminders li { display: flex; align-items: baseline; gap: 8px; font-size: 14px; background: none; }
.order-reminders li .icon { flex: none; position: relative; top: 2px; color: var(--muted); }
/* In the list: «2 purringer sendt» under who has it; done: a green tick before «Installasjon utført». */
.track-reminders { display: flex; align-items: center; gap: 5px; margin-top: 4px; font-size: 12.5px; color: var(--muted); }
.track-reminders .icon { width: 13px; height: 13px; }
.client-track.is-done .track-label { color: var(--accent); }
.client-track.is-done .track-label::before { content: "✓"; display: inline-grid; place-items: center; width: 17px; height: 17px; margin-right: 6px; border-radius: 50%; background: var(--accent); color: #fff; font-size: 11px; font-weight: 700; vertical-align: 1px; }
/* The Oppdragsgiver's rows open the order. */
table.portal-jobs td a.row-link { color: var(--ink); text-decoration: none; }
table.portal-jobs tr.clickable:hover td a.row-link b { text-decoration: underline; }
/* One order (/oppdragsgiver/bestilling/<id>) on one sheet: the parts under each other with a thin line between. */
.card.order-sheet { max-width: 980px; padding: 22px 26px; }
.order-sheet .sheet-part + .sheet-part { margin-top: 22px; padding-top: 22px; border-top: 1px solid var(--line); }
@media (max-width: 760px) { .card.order-sheet { padding: 18px 16px; } }
dl.facts.order-facts { grid-template-columns: 110px minmax(0, 1fr); margin: 0; }
@media (max-width: 760px) { dl.facts.order-facts { grid-template-columns: 80px minmax(0, 1fr); } }
/* The steps, top to bottom on a line: a tick for what is behind it, a ring in the step's colour for where it is now. */
ol.order-steps { list-style: none; margin: 0; padding: 0; }
ol.order-steps > li { position: relative; display: flex; gap: 14px; padding: 0 0 18px; }
ol.order-steps > li:last-child { padding-bottom: 0; }
ol.order-steps > li:not(:last-child)::before { content: ""; position: absolute; left: 11px; top: 26px; bottom: 2px; width: 2px; background: var(--line); }
ol.order-steps > li.done:not(:last-child)::before { background: var(--accent); }
ol.order-steps > li[class*="s-"] { background: none; color: var(--ink); }
.order-steps .step-dot { flex: none; display: grid; place-items: center; width: 24px; height: 24px; border-radius: 50%; border: 2px solid var(--line); background: var(--card); color: #fff; box-sizing: border-box; }
.order-steps .step-dot .icon { width: 14px; height: 14px; margin: 0; }
.order-steps li.done .step-dot { background: var(--accent); border-color: var(--accent); }
.order-steps li.now .step-dot { border-color: var(--c); box-shadow: inset 0 0 0 4px var(--c-soft), inset 0 0 0 7px var(--c); }
.order-steps .step-text { display: grid; gap: 2px; padding-top: 2px; font-size: 14.5px; }
.order-steps li.todo .step-text b { color: var(--muted); font-weight: 600; }
.order-steps .step-text .muted { font-size: 13px; }
/* Across (a laptop and wider; on a tablet the names would break): the five steps side by side, each with its name
   and date under the dot, joined by a line that is green up to where the order is. */
@media (min-width: 900px) {
  ol.order-steps.across { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); }
  ol.order-steps.across > li { flex-direction: column; align-items: center; gap: 8px; padding: 0 6px; text-align: center; }
  ol.order-steps.across > li:not(:last-child)::before { left: calc(50% + 16px); right: calc(-50% + 16px); top: 11px; bottom: auto; width: auto; height: 2px; }
  ol.order-steps.across .step-text { justify-items: center; padding-top: 0; font-size: 14px; }
}
/* The order's lines as in Shopify's admin: the picture, the title, the variant as a tag and the SKU. */
ul.product-lines { list-style: none; margin: 0; padding: 0; display: grid; gap: 20px; }
ul.product-lines li { display: flex; gap: 14px; align-items: center; }
.product-pic { flex: none; display: grid; place-items: center; width: 48px; height: 48px; border: 1px solid var(--line); border-radius: 8px; background: #fff; overflow: hidden; color: var(--muted); }
.product-pic img { width: 100%; height: 100%; object-fit: contain; }
.product-pic .icon { width: 22px; height: 22px; margin: 0; }
.product-text { display: grid; gap: 4px; min-width: 0; }
.product-text b { font-size: 14.5px; line-height: 1.35; overflow-wrap: anywhere; }
.product-qty { color: var(--muted); font-weight: 600; }
.product-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; font-size: 13px; color: var(--muted); }
.product-variant { padding: 1px 8px; border-radius: 6px; background: var(--bg); color: var(--ink); font-weight: 600; }
/* What the partner wrote on the order: the label over the value (the labels are long), two side by side when there is room. */
dl.note-fields { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 14px 24px; margin: 0; }
dl.note-fields dt { color: var(--muted); font-size: 13px; line-height: 1.35; }
dl.note-fields dd { margin: 2px 0 0; font-weight: 600; overflow-wrap: anywhere; }
/* «Fra bestillingen» on every page of an order: the fields, then the remarks under a thin line. */
.order-note dl.note-fields + .note-remarks { margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--line); }
.note-remarks h2 { margin-bottom: 8px; }
.note-remarks p { margin: 0; white-space: pre-line; overflow-wrap: anywhere; line-height: 1.55; }
/* A job page inside the electricians' menu: the page's own column, centred. */
main.portal .answer.job-view { margin: 0 auto; }
.report-box h3 { display: flex; align-items: center; gap: 6px; color: #9a3412; text-transform: none; letter-spacing: 0; font-size: 15px; margin: 0 0 8px; }

/* --- "Vis på kart" and the map window --- */
a.map-btn, table.portal-jobs td a.map-btn { display: inline-flex; align-items: center; gap: 5px; margin-top: 5px; color: var(--accent); font-size: 14px; font-weight: 700; text-decoration: none; white-space: nowrap; }
a.map-btn .icon { width: 1.15em; height: 1.15em; }
/* As specific as the rule above, or the table's colour wins and nothing changes on hover. */
a.map-btn:hover, table.portal-jobs td a.map-btn:hover { color: var(--ink); text-decoration: underline; text-underline-offset: 3px; }
dialog.map-dialog { width: min(760px, calc(100vw - 24px)); padding: 0; border: 0; border-radius: var(--radius); box-shadow: 0 20px 60px rgba(27,45,57,.35); color: var(--ink); overflow: hidden; }
dialog.map-dialog::backdrop { background: rgba(27,45,57,.55); }
.map-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; padding: 18px 20px 14px; border-bottom: 1px solid var(--line); }
.map-head h2 { font-size: 22px; margin: 2px 0 0; }
.map-head .map-place { font-size: 17px; font-weight: 600; color: var(--muted); }
.map-head .v-close { position: static; background: var(--bg); color: var(--ink); border: 0; border-radius: 50%; width: 40px; height: 40px; padding: 0; font-size: 26px; line-height: 1; flex: none; }
.map-head .v-close:hover { background: var(--line); }
dialog.map-dialog iframe { display: block; width: 100%; height: min(58vh, 460px); border: 0; background: var(--bg); }
.map-actions { display: flex; flex-wrap: wrap; gap: 10px; padding: 14px 20px; }
.map-actions .btn { display: inline-flex; align-items: center; gap: 6px; }
@media (max-width: 600px) {
  .map-head h2 { font-size: 19px; }
  .map-actions .btn { flex: 1; justify-content: center; }
}

/* --- Picture viewer: a picture large over the page, with ‹ › between the pictures --- */
.viewer { position: fixed; inset: 0; z-index: 100; display: flex; align-items: center; justify-content: center; gap: 12px; padding: 24px 12px; background: rgba(15,24,30,.92); }
.viewer[hidden] { display: none; }
.viewer figure { margin: 0; display: grid; gap: 10px; justify-items: center; max-width: min(1100px, 100%); }
.viewer img { max-width: 100%; max-height: calc(100vh - 110px); object-fit: contain; border-radius: 6px; background: #000; }
.viewer figcaption { color: #dfe5e8; font-size: 14px; display: flex; gap: 16px; align-items: center; }
.viewer figcaption a { color: #cfe6d3; }
.viewer button { background: rgba(255,255,255,.12); border: 0; color: #fff; border-radius: 50%; width: 48px; height: 48px; padding: 0; font-size: 30px; line-height: 1; flex: none; }
.viewer button:hover { background: rgba(255,255,255,.24); }
.viewer .v-close { position: absolute; top: 14px; right: 14px; font-size: 28px; }
.viewer.single .v-prev, .viewer.single .v-next { visibility: hidden; }
.shots a:not(.doc) { cursor: zoom-in; }
h3 .h3-note { text-transform: none; letter-spacing: 0; font-weight: 400; }
@media (max-width: 600px) {
  .viewer { padding: 60px 6px 24px; }
  .viewer .v-prev, .viewer .v-next { position: absolute; bottom: 18px; }
  .viewer .v-prev { left: 18px; } .viewer .v-next { right: 18px; }
  .viewer img { max-height: calc(100vh - 170px); }
}

/* The "Send oppdraget?" box. */
dialog.confirm { width: min(500px, calc(100vw - 32px)); padding: 0; border: 0; border-radius: var(--radius); box-shadow: 0 20px 60px rgba(27,45,57,.3); color: var(--ink); }
dialog.confirm::backdrop { background: rgba(27,45,57,.45); }
dialog.confirm form { padding: 22px 24px 20px; }
dialog.confirm h2 { font-size: 18px; margin: 0 0 14px; padding-right: 28px; }
/* The × in the top right corner of every box (web/src/lib/dialog.tsx DialogX). */
dialog.confirm .dialog-x { position: absolute; top: 12px; right: 12px; width: 32px; height: 32px; min-width: 0; padding: 0; border: 0; border-radius: 50%; background: transparent; box-shadow: none; color: var(--muted); font-size: 24px; line-height: 1; font-weight: 400; cursor: pointer; }
dialog.confirm .dialog-x:hover { background: var(--bg); color: var(--ink); }
dialog.confirm dl { margin-bottom: 12px; }
dialog.confirm dd { font-weight: 600; }
dialog.confirm .actions { justify-content: flex-end; margin-top: 18px; }
dialog.confirm p[data-c] { margin: 0; color: var(--ink); }
/* The electrician's «Endre opplysninger» (Profil): a little wider, for the fields. */
dialog.profile-edit { width: min(560px, calc(100vw - 32px)); }
/* The job's history: a small round icon in the event's colour first on each line. */
ul.history-log li { display: flex; gap: 10px; align-items: flex-start; }
ul.history-log li > div { flex: 1; min-width: 0; }
.hist-icon { flex: none; width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; background: var(--c-soft); color: var(--c); margin-top: -2px; }
.hist-icon .icon { width: 14px; height: 14px; }
dialog.reminder-box .reminder-preview { margin: -4px 0 0; }
dialog.reminder-box { max-height: calc(100vh - 32px); overflow-y: auto; }
.mail-preview { border: 1px solid var(--line); border-radius: 10px; overflow: hidden; background: #f4f6f7; }
.mail-preview-head { padding: 8px 12px; background: var(--card); border-bottom: 1px solid var(--line); font-size: 14px; }
.mail-preview iframe { display: block; width: 100%; height: 380px; border: 0; }
/* «Send påminnelse»: what happens, to whom, and the words at the top of the e-mail. */
dialog.reminder-box { width: min(560px, calc(100vw - 32px)); text-align: left; }
dialog.reminder-box form { display: grid; gap: 14px; }
dialog.reminder-box h2, dialog.reminder-box p, dialog.reminder-box dl { margin: 0; }
dialog.reminder-box textarea { width: 100%; }
.remind-block { display: grid; gap: 8px; justify-items: start; margin-top: 12px; }
.remind-block p { margin: 0; font-size: 14px; }
dialog.profile-edit h2 { margin-bottom: 2px; }
dialog.profile-edit form > .muted { margin: 0 0 14px; }
.profile-actions { margin: 14px 0 0; }
/* The team's page for one electrician: one column, the cards under each other, «Slett» away from «Lagre». */
.electrician-form { display: grid; gap: 16px; max-width: 860px; }
.electrician-form > .card { margin: 0; }
.electrician-form .card h2 { display: flex; align-items: center; gap: 8px; font-size: 17px; }
.electrician-form .card h2 .icon { color: var(--accent); }
.form-actions { align-items: center; padding-top: 4px; }
.form-actions .push-right { margin-left: auto; }
/* The customer's page in steps (/kunde/…): progress, one box per picture, radio rows, the buttons fixed at the bottom. */
.wizard { padding-bottom: 96px; }
.wizard-order { text-align: center; margin: 0 0 12px; }
.wizard-progress { display: grid; gap: 6px; margin-bottom: 14px; }
.wizard-progress .bars { display: flex; gap: 6px; }
.wizard-progress .bars i { flex: 1; height: 6px; border-radius: 99px; background: var(--line); }
.wizard-progress .bars i.on { background: var(--accent); }
.wizard-progress span { font-size: 12px; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; }
.wizard h1 { margin-bottom: 4px; }
.wizard h1 + .muted { margin-top: 0; }
.photo-slot h2 { font-size: 16px; margin: 0; }
.photo-slot .muted { margin: 2px 0 10px; font-size: 14px; }
.photo-head { display: flex; gap: 10px; align-items: flex-start; }
.photo-ok { flex: none; width: 24px; height: 24px; border-radius: 50%; border: 2px solid var(--line); display: grid; place-items: center; font-size: 13px; color: #fff; margin-top: 1px; }
.photo-slot.has .photo-ok { background: var(--accent); border-color: var(--accent); }
.photo-slot .shots { margin-bottom: 10px; }
.questions { gap: 0; }
/* One question with what belongs to it; a thin line between them. */
.q-group { display: grid; gap: 12px; padding: 18px 0; }
.q-group:first-child { padding-top: 0; }
.q-group:last-child { padding-bottom: 0; }
.q-group + .q-group { border-top: 1px solid var(--line); }
.q { display: grid; gap: 8px; border: 0; padding: 0; margin: 0; font-weight: 600; min-width: 0; }
.q legend { padding: 0; margin-bottom: 8px; font-weight: 600; }
.q .opt { color: var(--muted); font-weight: 400; }
/* A number with its unit, in a light box: the question on the left, a short field and «m» on the right
   («Antall meter», and the follow-ups after «Ja»). */
.q.num { display: flex; align-items: center; justify-content: space-between; gap: 12px; font-weight: 500;
  padding: 10px 12px; background: #f6f8f7; border: 1px solid var(--line); border-radius: 10px; }
.num-in { display: flex; align-items: center; gap: 8px; flex: none; }
.num-in input { width: 84px; text-align: right; }
.num-in .unit { color: var(--muted); min-width: 22px; }
.radios { display: grid; gap: 6px; }
.radios.choice3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.radios.choice3 .radio { justify-content: center; gap: 6px; padding: 10px 4px; white-space: nowrap; }
.radios.choice2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
fieldset.q { min-inline-size: 0; }
.num-in input[aria-invalid="true"] { border-color: var(--err); background: var(--err-soft); }
/* The tip on the photo step: clear pictures, full size. */
.photo-tip { margin: 0 0 14px; padding: 10px 12px; border-radius: 10px; background: var(--accent-soft); color: var(--ink); font-size: 14px; }
.radio { display: flex; align-items: center; gap: 10px; min-height: 46px; padding: 10px 12px; border: 1px solid #cfd8dd; border-radius: 10px; background: #fff; cursor: pointer; font-weight: 400; }
.radio input { width: 20px; height: 20px; margin: 0; accent-color: var(--accent); flex: none; }
.radio.on { border-color: var(--accent); background: var(--accent-soft); font-weight: 600; }
.radio:focus-within { outline: 3px solid rgba(57,122,67,.35); outline-offset: 1px; }
.summary h2 { display: flex; justify-content: space-between; align-items: center; font-size: 16px; }
.summary h2 button.link { font-size: 14px; font-weight: 600; }
.photo-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.photo-list .ok { color: var(--accent); font-weight: 600; }
.photo-list .missing { color: var(--muted); }
.wizard-done { text-align: center; padding: 28px 20px; }
.wizard-done .done-icon { width: 60px; height: 60px; border-radius: 50%; background: var(--accent-soft); color: var(--accent); display: grid; place-items: center; font-size: 28px; margin: 0 auto 12px; }
.wizard-bar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 5; background: var(--card); border-top: 1px solid var(--line); padding: 12px 16px calc(12px + env(safe-area-inset-bottom)); }
/* «Tilbake» on the left half, «Neste» / «Send inn» on the right half (also on step 1, where there is no «Tilbake»). */
.wizard-bar .in { max-width: 560px; margin: 0 auto; display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.wizard-bar button { padding: 12px 16px; }
.wizard-bar button:not(.ghost) { grid-column: 2; }
/* The electrician form's «Oppdrag utført hos oss»: counted, so shown, not a field. */
.jobs-done { display: grid; gap: 4px; align-content: start; }
.jobs-done-label { font-weight: 600; font-size: 14px; }
.jobs-done b { font-size: 20px; line-height: 1.2; }
/* E-postlogg, «Krever oppfølging»: what is listed and what to do, above the table. */
.email-help { display: flex; gap: 8px; align-items: flex-start; margin: 0 0 14px; padding: 10px 14px; border-radius: 8px; background: var(--card); border: 1px solid var(--line); font-size: 14px; color: var(--ink); }
.email-help .icon { flex: none; margin-top: 3px; color: var(--accent); }
.email-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }
.email-list .tag, .email-edit .tag { display: inline-block; margin-left: 6px; padding: 0 7px; border-radius: 999px; background: var(--accent-soft); color: var(--accent); font-size: 11px; font-weight: 600; vertical-align: 1px; }
.email-edit { border: 0; padding: 0; margin: 16px 0 0; display: grid; gap: 8px; justify-items: start; }
.email-edit legend { padding: 0; margin-bottom: 6px; font-weight: 600; font-size: 14px; }
.email-edit .email-main { margin: 0; font-weight: 600; }
.email-edit .email-main .help { font-weight: 400; }
.email-row { display: flex; gap: 8px; width: 100%; }
.email-row input { flex: 1; min-width: 0; }
.email-row .icon-only { padding: 4px 12px; font-size: 18px; line-height: 1; }
/* The electrician's status in its badge colour; the list itself stays plain (the browser draws it). */
select.status-select { background-color: var(--c-soft); color: var(--c); border-color: var(--c); font-weight: 600; }
select.status-select option { background: #fff; color: var(--ink); font-weight: 400; }
/* The postcode with its place right beside it. */
.zip-row { display: flex; align-items: center; gap: 8px; }
.zip-row input { width: 7.5em; flex: none; }
.zip-row input.zip-place { flex: 1; width: auto; min-width: 0; background: var(--bg); color: var(--ink); cursor: default; }
/* The address field's suggestions (Kartverket), under the field. */
.suggest { position: relative; display: block; }
.suggest input { width: 100%; }
.suggest-list { position: absolute; z-index: 20; left: 0; right: 0; top: calc(100% + 4px); margin: 0; padding: 4px; list-style: none; background: var(--card); border: 1px solid var(--line); border-radius: 10px; box-shadow: 0 8px 24px rgba(20, 30, 40, .14); max-height: 300px; overflow-y: auto; font-weight: 400; }
.suggest-list li { padding: 8px 10px; border-radius: 6px; cursor: pointer; font-size: 14px; }
.suggest-list li:hover, .suggest-list li.active { background: var(--accent-soft); }
/* "Sjekk e-posten din" after asking for a password link. */
dialog.notice { width: min(400px, calc(100vw - 32px)); text-align: center; }
dialog.notice form { padding: 28px 28px 22px; }
dialog.notice h2 { font-size: 20px; margin: 0 0 10px; padding: 0 28px; }
dialog.notice p { margin: 0 0 8px; }
dialog.notice .notice-icon { width: 52px; height: 52px; margin: 0 auto 14px; border-radius: 50%; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent); }
dialog.notice .notice-icon .icon { width: 26px; height: 26px; }
dialog.notice .actions { justify-content: center; }
dialog.notice .actions button { min-width: 140px; }
/* The pages' boxes (web/src/lib/dialog.tsx): what is sent where, and errors. */
dialog.confirm dl { display: grid; grid-template-columns: minmax(0, 1fr); gap: 8px; margin: 0 0 12px; padding: 12px 14px; background: var(--bg); border-radius: 8px; }
dialog.confirm dl > div { display: grid; grid-template-columns: 96px minmax(0, 1fr); gap: 10px; align-items: baseline; }
dialog.confirm dt { color: var(--muted); font-size: 13px; }
dialog.confirm dd { margin: 0; overflow-wrap: anywhere; }
dialog.confirm dd .muted, dialog.confirm dd .install { font-weight: 400; font-size: 13px; margin-top: 2px; }
dialog.confirm dd .install { color: var(--accent); }
dialog.confirm dd > div + div:not(.muted) { margin-top: 2px; }
dialog.confirm p[data-c] { white-space: pre-line; }
dialog.confirm .actions button { min-width: 96px; }
dialog.confirm button.danger-fill { background: var(--err); border-color: var(--err); color: #fff; }
dialog.confirm button.danger-fill:hover { background: #912018; border-color: #912018; }
/* Who said no to a job, and their comment (the dashboard's «Avslått» rows). */
.orders td .declined { font-size: 13px; margin-bottom: 8px; white-space: normal; }
.orders td .declined b { font-weight: 600; }
.orders td .declined-comment { margin-top: 3px; color: var(--muted); font-style: italic; overflow-wrap: anywhere; }
.orders td .declined-comment button.link { font-style: normal; font-size: 13px; }
dialog.notice .notice-icon.err { background: var(--err-soft); color: var(--err); }
dialog.confirm[open] { animation: dialog-in .14s ease-out; }
@keyframes dialog-in { from { opacity: 0; transform: translateY(6px) scale(.98); } }
@media (prefers-reduced-motion: reduce) { dialog.confirm[open] { animation: none; } }
/* While the pages fetch (web/src/lib/loading.tsx): shimmering rows, a spinner, the bar at the top. */
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.skeleton-row td { padding-top: 14px; padding-bottom: 14px; }
.skeleton { display: block; height: 12px; border-radius: 6px; background: linear-gradient(90deg, #e9eef0 0%, #f6f8f9 40%, #e9eef0 80%) 0 0 / 300% 100%; animation: shimmer 1.3s ease-in-out infinite; }
.skeleton.thin { height: 9px; width: 40% !important; margin-top: 7px; opacity: .7; }
@keyframes shimmer { from { background-position: 100% 0; } to { background-position: -50% 0; } }
.loading { display: flex; align-items: center; justify-content: center; gap: 12px; padding: 56px 16px; color: var(--muted); font-weight: 500; }
.spinner { width: 22px; height: 22px; border-radius: 50%; border: 3px solid var(--accent-soft); border-top-color: var(--accent); animation: spin .7s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.fetch-bar { position: fixed; top: 0; left: 0; right: 0; height: 3px; z-index: 1000; pointer-events: none; opacity: 0; transition: opacity .2s; overflow: hidden; }
.fetch-bar.on { opacity: 1; }
.fetch-bar::before { content: ""; position: absolute; top: 0; bottom: 0; width: 40%; background: linear-gradient(90deg, transparent, var(--accent), transparent); animation: fetch-slide 1.1s ease-in-out infinite; }
@keyframes fetch-slide { from { left: -40%; } to { left: 100%; } }
@media (prefers-reduced-motion: reduce) { .skeleton, .spinner, .fetch-bar::before { animation-duration: 3s; } }

label .req { color: var(--err); font-weight: 700; }

/* --- Footer on every page: address, contact, opening hours --- */
body { display: flex; flex-direction: column; min-height: 100vh; }
body > main { flex: 1 0 auto; width: 100%; }
/* The same in the React app, where the page sits in #root: the footer at the bottom of a short page. */
#root:has(> .site-footer) { flex: 1 0 auto; display: flex; flex-direction: column; }
#root > main { flex: 1 0 auto; width: 100%; }
.site-footer { margin-top: 40px; background: var(--card); border-top: 1px solid var(--line); color: var(--ink); font-size: 14px; }
.site-footer .wrap { display: flex; flex-wrap: wrap; gap: 20px 56px; padding-top: 26px; padding-bottom: 28px; }
.site-footer .f-brand { display: grid; gap: 6px; align-content: start; margin-right: auto; }
.site-footer .f-brand img { height: 34px; width: auto; }
.site-footer .f-brand > span:not(.wordmark) { color: var(--muted); font-size: 13px; }
.site-footer .f-name { color: var(--accent); font-size: 15px; font-weight: 700; }
.site-footer h4 { margin: 0 0 6px; font-size: 12px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
.site-footer .wrap > div:not(.f-brand) { display: grid; gap: 4px; align-content: start; }
.site-footer a { display: inline-flex; align-items: center; gap: 7px; color: var(--ink); text-decoration: none; font-weight: 600; }
.site-footer a:hover { color: var(--accent); text-decoration: underline; }
.site-footer a .icon { color: var(--accent); }
@media (max-width: 600px) { .site-footer .wrap { flex-direction: column; gap: 18px; } }



/* --- Notifications page --- */
/* «Varsler»: a menu on the left as an inbox (the two groups, «Alt» and what it was), the notifications beside it. */
.notices-layout { display: grid; grid-template-columns: 230px minmax(0, 1fr); gap: 24px; align-items: start; }
.notice-menu { position: sticky; top: 16px; display: grid; gap: 18px; }
.menu-group { display: grid; gap: 2px; }
.menu-title { font-size: 12px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; padding: 0 10px 6px; }
.notice-menu a { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 8px; color: var(--ink); font-size: 14px; font-weight: 500; text-decoration: none; border-left: 3px solid transparent; transition: background .12s; }
.notice-menu a:hover { background: #eaeef0; }
.notice-menu a.on { background: #fff; border-left-color: var(--accent); font-weight: 700; box-shadow: var(--shadow); border-radius: 0 8px 8px 0; }
.notice-menu a.none { color: #9aa6ad; }
.notice-menu .menu-label { flex: 1; min-width: 0; }
.notice-menu a b { font-size: 12px; font-weight: 700; color: var(--muted); }
.notice-menu a.on b { color: var(--accent); }
.menu-icon { display: inline-flex; color: var(--muted); }
.menu-icon .icon { width: 16px; height: 16px; margin: 0; }
.menu-icon.c-green { color: #3b7d23; }
.menu-icon.c-blue { color: #1d6fa5; }
.menu-icon.c-red { color: var(--err); }
.menu-icon.c-orange { color: #b45309; }
.notice-menu a.none .menu-icon { opacity: .45; }
/* Narrow (a phone, a small window): no side menu, but a switch for the two groups and the kind in a list. */
.notice-mobile { display: none; }
@media (max-width: 860px) {
  .notices-layout { grid-template-columns: minmax(0, 1fr); gap: 12px; }
  .notice-menu { display: none; }
  .notice-mobile { display: grid; gap: 10px; }
  .seg { display: grid; grid-template-columns: 1fr 1fr; background: #e7ecee; border-radius: 10px; padding: 3px; }
  .seg a { display: flex; align-items: center; justify-content: center; gap: 6px; padding: 9px 6px; border-radius: 8px; color: var(--muted); font-size: 14px; font-weight: 600; text-decoration: none; }
  .seg a.on { background: #fff; color: var(--ink); box-shadow: var(--shadow); }
  .seg a b { font-size: 12px; color: var(--muted); }
  .seg a.on b { color: var(--accent); }
}
/* A phone: the time under the text, so the text gets the width. */
@media (max-width: 560px) {
  .notices-layout ul.notices li.notice { display: grid; grid-template-columns: 28px minmax(0, 1fr); gap: 2px 10px; padding: 12px; }
  .notices-layout ul.notices li.notice .notice-icon.badge { width: 28px; height: 28px; }
  .notices-layout ul.notices li.notice .notice-time { grid-column: 2; font-size: 12px; text-align: left; }
  .notices-layout ul.notices li.day { padding: 8px 12px 6px; }
}
ul.notices { list-style: none; margin: 0; padding: 0; }
ul.notices li.day { padding: 10px 16px 6px; font-size: 13px; font-weight: 700; color: var(--muted); background: #f7f8f8; border-bottom: 1px solid var(--line); }
ul.notices li.notice { display: flex; align-items: flex-start; gap: 14px; padding: 14px 16px; border-bottom: 1px solid var(--line); transition: background .12s; }
ul.notices li.notice:last-child { border-bottom: 0; }
ul.notices li.notice:hover { background: #f6f6f7; }
ul.notices li.notice.new { box-shadow: inset 3px 0 0 var(--accent); }
.notice-icon.badge { width: 32px; height: 32px; padding: 0; justify-content: center; flex: none; border-radius: 50%; }
.notice-icon.badge::before { display: none; }
.notice-body { flex: 1; min-width: 0; display: grid; gap: 3px; color: var(--ink); text-decoration: none; font-size: 14px; }
.notice-body:hover .notice-text { text-decoration: underline; }
.notice-body .quote { margin: 4px 0 0; }
.notice-time { white-space: nowrap; padding-top: 2px; }
.top nav a .icon { margin-right: -2px; }

/* "i" with an explanation: a box under it on hover or keyboard focus. */
.info { position: relative; display: inline-flex; vertical-align: -0.15em; color: var(--muted); cursor: help; border-radius: 50%; outline: none; }
.info:hover, .info:focus-visible { color: var(--accent); }
.info:focus-visible { box-shadow: 0 0 0 3px rgba(57,122,67,.3); }
.info::after { content: attr(data-tip); position: absolute; top: calc(100% + 6px); left: -8px; z-index: 20; width: 300px; padding: 10px 12px; border-radius: 8px; background: var(--ink); color: #fff; font-size: 13.5px; font-weight: 400; line-height: 1.45; text-transform: none; letter-spacing: 0; white-space: normal; text-align: left; box-shadow: 0 6px 20px rgba(27,45,57,.25); opacity: 0; visibility: hidden; transition: opacity .12s; pointer-events: none; }
.info.left::after { left: auto; right: -8px; }
.info:hover::after, .info:focus-visible::after { opacity: 1; visibility: visible; }
/* The tables scroll sideways, which would cut the box off: let it out of the header and cells. */
.card.table { overflow: visible; }
/* Up to where the dashboard's list (min 1120px) fits in the page: below it the card scrolls instead of the list spilling out. */
@media (max-width: 1200px) { .card.table { overflow-x: auto; } }

/* Icons in buttons and links: on the text's line, in its colour. */
.icon { display: inline-block; flex: none; width: 1.1em; height: 1.1em; vertical-align: -0.18em; }
button .icon, .btn .icon { margin-right: 2px; }
.top button.link { display: inline-flex; align-items: center; gap: 6px; }
a.reset { display: inline-flex; align-items: center; gap: 4px; text-decoration: none; }
a.reset:hover { color: var(--ink); }
.orders td:nth-child(3), .orders td:nth-child(4) { white-space: nowrap; }
/* Not in «Mine oppdrag»: there the 3rd and 4th columns are the address and the products, which must wrap inside
   them. The products get room to be read (a min-width on the cell itself is ignored); when the columns don't fit
   (a narrow window), the list scrolls inside its card instead of running out of it. */
.orders table.portal-jobs td:nth-child(3), .orders table.portal-jobs td.products { white-space: normal; overflow-wrap: break-word; }
.orders table.portal-jobs td.products .v { min-width: 180px; }
.portal-grid .card.table { overflow-x: auto; }
@media (max-width: 860px) { .orders table.portal-jobs td.products .v { min-width: 0; } }
@media (max-width: 860px) { .orders .toolbar input[type=search] { min-width: 100%; } }

/* Placeholder text readable too (browsers make it very light by default). */
input::placeholder, textarea::placeholder { color: #7a8891; opacity: 1; }

/* The light green of Utført is too pale for small text: the words use a darker shade of it.
   At the end and as specific as the general status rules, so these win. */
.badge.s-utfort[class*="s-"] { color: #15803d; }
.tabs a[class*="t-"].t-utfort:not(.t-alle):not(.t-e-alle),
.tabs a[class*="t-"].t-utfort:not(.t-alle):not(.t-e-alle) b,
.tabs a[class*="t-"].t-utfort:not(.t-alle):not(.t-e-alle).on { color: #15803d; }
.tabs a[class*="t-"].t-utfort:not(.t-alle):not(.t-e-alle).on b { color: #fff; background: #16a34a; }
/* The electricians' invoice page: the form and the list one under the other. */
.invoice-layout { display: grid; gap: 4px; max-width: 980px; }
/* «E-poststatus»: «Send nå» under the status, so the table fits. */
.email-send { margin-top: 6px; }

/* The Oppdragsgiver's list: «Tillegg» after the order number when it has one they can see (it stays). */
.addition-tag { display: inline-block; margin-left: 6px; padding: 0 7px; border-radius: 999px; background: var(--warn-soft); color: var(--warn);
  font-size: 11px; font-weight: 700; line-height: 18px; vertical-align: 1px; }
/* The Oppdragsgiver's menu: how many of their «Varsler» are unread (as the team's counts). */
.portal-top nav .nav-count { display: inline-block; min-width: 18px; margin-left: 6px; padding: 1px 5px; border-radius: 999px; background: var(--accent);
  color: var(--accent-ink); font-size: 11px; font-weight: 700; line-height: 16px; text-align: center; vertical-align: 1px; }

/* A report on the team's job page: one card, the four steps down a line (montør → oppdragsgiver → svar → montør
   informert); done ones ticked green, the one to act on now ringed. */
ul.reports li.report-card { display: grid; gap: 10px; background: none; border: 0; border-radius: 0; padding: 0; }
ul.reports li.report-card + li.report-card { border-top: 1px solid var(--line); padding-top: 16px; margin-top: 8px; }
li.report-card .report-head { align-items: center; }
ol.report-flow { list-style: none; margin: 0; padding: 0; display: grid; gap: 0; }
.flow-step { position: relative; display: flex; gap: 12px; padding-bottom: 14px; }
.flow-step:last-child { padding-bottom: 0; }
.flow-step:not(:last-child)::before { content: ""; position: absolute; left: 11px; top: 26px; bottom: 2px; width: 2px; background: var(--line); }
.flow-step.done:not(:last-child)::before { background: var(--accent); }
.flow-dot { flex: none; display: grid; place-items: center; width: 24px; height: 24px; border-radius: 50%; border: 2px solid var(--line); background: var(--card);
  color: var(--muted); font-size: 12px; font-weight: 700; box-sizing: border-box; }
.flow-dot .icon { width: 13px; height: 13px; margin: 0; }
.flow-step.done .flow-dot { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.flow-step.now .flow-dot { border-color: var(--accent); color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.flow-body { display: grid; gap: 4px; min-width: 0; flex: 1; padding-top: 2px; }
.flow-title { font-weight: 700; font-size: 13px; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); }
.flow-step.now .flow-title { color: var(--ink); }
.flow-step.todo .flow-body > :not(.flow-title) { color: var(--muted); }
.flow-body button.link, .flow-body button.small { justify-self: start; display: inline-flex; align-items: center; gap: 6px; }
.flow-note { padding: 4px 0 0 36px; font-size: 13px; }
[data-theme="dark"] ul.reports li.report-card { background: none; }
/* «Til oppdragsgiver» under each report on the team's job page: our price and words, shown or not. */
.client-part { margin-top: 8px; padding-top: 8px; border-top: 1px dashed var(--line); display: grid; gap: 3px; }
.client-part-head { display: flex; align-items: center; gap: 8px; }
.client-part button.link { justify-self: start; display: inline-flex; align-items: center; gap: 4px; font-size: 13px; margin-top: 2px; }
/* The Oppdragsgiver's «Tillegg»: what on the left, our price on the right, a sum under them. */
ul.additions { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
ul.additions li { display: grid; gap: 10px; padding: 0; font-size: 14px; }
ul.additions li + li { border-top: 1px solid var(--line); padding-top: 12px; }
.addition-row { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; }
/* The Oppdragsgiver's answer: «Godkjenn» / «Avslå», or who answered and when. */
.decision .next-row button { min-height: 40px; }
.decision-done { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; }
.decision-done .quote { flex-basis: 100%; margin: 2px 0 0; }
button.danger-fill { background: var(--err); border-color: var(--err); color: #fff; }
[data-theme="dark"] button.danger-fill { color: #1b0d0c; }
.client-decision { margin-top: 2px; }
/* The page from the link in the e-mail: one card, the addition in a box. */
.addition-link { max-width: 560px; }
.addition-link .card { display: grid; gap: 18px; }
.addition-link .card > div > p.muted { margin: 0; font-size: 13px; }
.addition-link h1 { margin: 4px 0 0; }
.addition-link .card > p.muted { margin: 0; font-size: 13px; }
.decision .stack { display: grid; gap: 12px; }
.decision label { display: grid; gap: 6px; }
.addition-box { padding: 14px 16px; border-radius: 8px; background: var(--accent-soft); border-left: 3px solid var(--accent); font-size: 15px; }
.addition-price-line { margin-top: 8px; }
.addition-main { min-width: 0; }
.addition-text { margin-top: 3px; white-space: pre-line; overflow-wrap: anywhere; }
.addition-price { text-align: right; white-space: nowrap; }
.addition-sum { margin: 12px 0 0; font-size: 14px; text-align: right; }

/* --- Dark mode («Mørk modus» in the menu; web/index.html sets data-theme before the page is drawn) ---
   The colours above are the light theme. Here: the same names with dark values, and the places that have a
   colour of their own. Calm colours: half as saturated as in the light theme (bright, saturated colours shimmer on a
   dark background), all at least 6:1 against the cards. Buttons have dark text on a muted green. */
:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #12181c;
  --card: #1b2329;
  --ink: #e4eaed;
  --muted: #a2b0b8;
  --line: #2f3b43;
  --accent: #8cc497;
  --accent-ink: #0d1a10;
  --accent-soft: #1f2e24;
  --warn: #d8b98a;
  --warn-soft: #2e2819;
  --err: #e3a29b;
  --err-soft: #33211f;
  --blue: #a3bde6;
  --blue-soft: #1e2738;
  --shadow: 0 1px 2px rgba(0,0,0,.3), 0 2px 8px rgba(0,0,0,.25);
  --field: #141b20;      /* inputs */
  --field-line: #3d4a53; /* their border */
  --hover: #222c33;      /* a row under the mouse */
  --tip: #2c373e;        /* the «i» boxes */
  --accent-fill: #5ea56b;       /* filled buttons: a calmer green for the big areas (dark text, 6:1) */
  --accent-fill-hover: #6db27a;
}
/* The logo is black: white in the dark, the green stays green. */
[data-theme="dark"] .brand img, [data-theme="dark"] .logo-top img, [data-theme="dark"] .site-footer .f-brand img { filter: invert(1) hue-rotate(180deg); }
[data-theme="dark"] dialog { background: var(--card); color: var(--ink); }
[data-theme="dark"] dialog::backdrop { background: rgba(0,0,0,.6); }

/* Fields, buttons, the picker */
[data-theme="dark"] input, [data-theme="dark"] select, [data-theme="dark"] textarea { background-color: var(--field); border-color: var(--field-line); }
[data-theme="dark"] input:hover, [data-theme="dark"] select:hover, [data-theme="dark"] textarea:hover,
[data-theme="dark"] .picker-btn:hover, [data-theme="dark"] label.cand:hover { border-color: #56646d; }
[data-theme="dark"] input:focus, [data-theme="dark"] select:focus, [data-theme="dark"] textarea:focus { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(140,196,151,.25); }
[data-theme="dark"] .top .search input, [data-theme="dark"] .orders .toolbar input[type=search] { background-color: var(--bg); border-color: transparent; }
[data-theme="dark"] .top .search input:focus, [data-theme="dark"] .orders .toolbar input[type=search]:focus { background-color: var(--field); border-color: var(--accent); }
[data-theme="dark"] select option { background: var(--card); color: var(--ink); }
[data-theme="dark"] input::placeholder, [data-theme="dark"] textarea::placeholder { color: #7f8d95; }
[data-theme="dark"] button.ghost, [data-theme="dark"] .btn.ghost { background: var(--card); color: var(--ink); border-color: var(--field-line); box-shadow: none; }
[data-theme="dark"] button.ghost:hover, [data-theme="dark"] .btn.ghost:hover { background: var(--hover); border-color: #56646d; }
[data-theme="dark"] button.ghost.danger, [data-theme="dark"] button.danger { color: var(--err); }
[data-theme="dark"] button.link:hover, [data-theme="dark"] button.row-toggle:hover, [data-theme="dark"] .logs .subtabs button:hover { background: none; }
[data-theme="dark"] .picker-btn, [data-theme="dark"] .picker-btn:hover { background-color: var(--field); border-color: var(--field-line); }
[data-theme="dark"] .picker-list { background: var(--card); border-color: var(--field-line); box-shadow: 0 8px 24px rgba(0,0,0,.5); }
[data-theme="dark"] .picker-item:hover { background: var(--hover); }
[data-theme="dark"] .picker-item.off { color: #6b7880; }
[data-theme="dark"] a.back-link { background: var(--card); }
[data-theme="dark"] dialog.confirm button.danger-fill { color: #1b0d0c; }
[data-theme="dark"] dialog.confirm button.danger-fill:hover { background: #ebb3ad; border-color: #ebb3ad; }
[data-theme="dark"] .map-head .v-close { background: var(--bg); }
[data-theme="dark"] .chosen-card { background: var(--accent-soft); }
[data-theme="dark"] .chosen-card .x, [data-theme="dark"] .chosen-card .x:hover { background: var(--card); }
[data-theme="dark"] label.cand:has(input:checked) { background: var(--accent-soft); }
[data-theme="dark"] .radio { background: var(--field); border-color: var(--field-line); }
[data-theme="dark"] .radio.on { background: var(--accent-soft); border-color: var(--accent); }
[data-theme="dark"] .q.num { background: var(--bg); }
[data-theme="dark"] button.chip:hover { border-color: #56646d; }

/* Tables, lists and boxes */
[data-theme="dark"] th, [data-theme="dark"] .orders th, [data-theme="dark"] ul.notices li.day { background: #161d22; }
[data-theme="dark"] tbody tr:hover, [data-theme="dark"] .orders tbody tr:hover, [data-theme="dark"] ul.notices li.notice:hover,
[data-theme="dark"] table.portal-jobs tr.clickable:hover, [data-theme="dark"] table.jobs tr.clickable:hover,
[data-theme="dark"] .card.orders table tr.clickable:hover, [data-theme="dark"] table.clients-list tr.clickable:hover,
[data-theme="dark"] table.clients-list tr.open, [data-theme="dark"] table.clients-list tr.client-login { background: var(--hover); }
[data-theme="dark"] table.clients-list tr.client-login td, [data-theme="dark"] table.clients-list tr.client-login { border-top-color: var(--line); }
[data-theme="dark"] .crumbs span[aria-hidden] { color: #56646d; }
[data-theme="dark"] .tabs a:hover, [data-theme="dark"] .subtabs a:hover, [data-theme="dark"] .logs .subtabs button:hover { border-bottom-color: #56646d; }
[data-theme="dark"] .quote { background: var(--bg); }
[data-theme="dark"] .card.remarks { border-color: #5a4520; }
[data-theme="dark"] ul.reports > li { background: #2b1e14; border-color: #5c3b20; border-left-color: #d9a07a; }
[data-theme="dark"] .report-head b, [data-theme="dark"] .report-type, [data-theme="dark"] .report-box h3 { color: #d9a07a; }
[data-theme="dark"] ul.invoices li { background: #16291c; border-color: #255235; border-left-color: #7fcc98; }
[data-theme="dark"] .mail-preview { background: var(--bg); }
[data-theme="dark"] .product-pic { background: var(--bg); }
[data-theme="dark"] .product-pic:has(img) { background: #fff; } /* product pictures are drawn on white */
[data-theme="dark"] .cal { background: var(--card); }
[data-theme="dark"] .answer .cal-head button, [data-theme="dark"] .answer .cal-grid button { background: var(--card); }
[data-theme="dark"] .answer .cal-grid button:disabled { background: var(--card); color: #56646d; }
[data-theme="dark"] .answer .cal-grid button.today { border-color: #56646d; }
[data-theme="dark"] .answer .cal-grid button.on, [data-theme="dark"] .answer .cal-grid button.on:hover:not(:disabled) { color: var(--accent-ink); }
[data-theme="dark"] .daybox { background: #182d31; color: #80c4cd; }
[data-theme="dark"] .notice-menu a:hover { background: var(--hover); }
[data-theme="dark"] .notice-menu a.on { background: var(--card); }
[data-theme="dark"] .notice-menu a.none { color: #6b7880; }
[data-theme="dark"] .seg { background: #10161a; }
[data-theme="dark"] .seg a.on { background: var(--card); }
[data-theme="dark"] .menu-icon.c-green { color: #8cc497; }
[data-theme="dark"] .menu-icon.c-blue { color: #a3bde6; }
[data-theme="dark"] .menu-icon.c-orange { color: #d9a07a; }
[data-theme="dark"] .skeleton { background: linear-gradient(90deg, #232d33 0%, #2e3a41 40%, #232d33 80%) 0 0 / 300% 100%; }
[data-theme="dark"] .info::after, [data-theme="dark"] .tip-text { background: var(--tip); color: var(--ink); border: 1px solid var(--line); box-shadow: 0 6px 20px rgba(0,0,0,.5); }
[data-theme="dark"] .shot .doc b { color: #1b0d0c; }

/* Steps, the order's progress */
[data-theme="dark"] .steps li span { border-color: #56646d; }
[data-theme="dark"] .steps li::before, [data-theme="dark"] .steps.off li.done::before, [data-theme="dark"] .steps.off li.next::before { background: #3d4a53; }
[data-theme="dark"] .steps.off li.next span, [data-theme="dark"] ol.steps.off li.next span { border-color: #56646d; }
[data-theme="dark"] ol.steps.off li.done::before, [data-theme="dark"] ol.steps.off li.next::before { background: #3d4a53; }
[data-theme="dark"] .order-steps .step-dot, [data-theme="dark"] .client-track.is-done .track-label::before, [data-theme="dark"] .photo-ok { color: var(--accent-ink); }

/* Green with white text elsewhere: dark text on the lighter green */
[data-theme="dark"] .new-tag, [data-theme="dark"] .logs .new-count, [data-theme="dark"] .logs .badge.new,
[data-theme="dark"] .top nav .todo { color: var(--accent-ink); }
[data-theme="dark"] .team-top nav .nav-count { color: #1b0d0c; }

/* The status colours: the same hues, light text on a dark tint */
[data-theme="dark"] .s-ny, [data-theme="dark"] .t-ny, [data-theme="dark"] .e-usikker, [data-theme="dark"] .t-e-usikker,
[data-theme="dark"] .badge.warn-tag { --c: #d8b98a; --c-soft: #2e2819; }
[data-theme="dark"] .s-sendt, [data-theme="dark"] .t-sendt, [data-theme="dark"] .badge.e-apnet { --c: #a3bde6; --c-soft: #1e2738; }
[data-theme="dark"] .s-akseptert, [data-theme="dark"] .t-bekreftet, [data-theme="dark"] .e-ja, [data-theme="dark"] .t-e-ja { --c: #8cc497; --c-soft: #1f2e24; }
[data-theme="dark"] .s-planlagt { --c: #80c4cd; --c-soft: #182d31; }
[data-theme="dark"] .s-avslatt, [data-theme="dark"] .t-avslatt, [data-theme="dark"] .e-nei, [data-theme="dark"] .t-e-nei { --c: #e3a29b; --c-soft: #33211f; }
[data-theme="dark"] .s-utfort, [data-theme="dark"] .t-utfort { --c: #7fcc98; --c-soft: #1a2e22; }
[data-theme="dark"] .s-avlyst, [data-theme="dark"] .t-avlyst, [data-theme="dark"] .e-ukjent, [data-theme="dark"] .t-e-ukjent { --c: #a2b0b8; --c-soft: #263038; }
[data-theme="dark"] .tone-orange { --c: #d9a07a; --c-soft: #30231a; }
[data-theme="dark"] ol.steps li[data-step="sendt"] { --c: #a3bde6; --c-soft: #1e2738; }
[data-theme="dark"] ol.steps li[data-step="akseptert"] { --c: #8cc497; --c-soft: #1f2e24; }
[data-theme="dark"] ol.steps li[data-step="planlagt"] { --c: #80c4cd; --c-soft: #182d31; }
[data-theme="dark"] ol.steps li[data-step="utfort"] { --c: #7fcc98; --c-soft: #1a2e22; }
[data-theme="dark"] .badge.s-utfort[class*="s-"],
[data-theme="dark"] .tabs a[class*="t-"].t-utfort:not(.t-alle):not(.t-e-alle),
[data-theme="dark"] .tabs a[class*="t-"].t-utfort:not(.t-alle):not(.t-e-alle) b,
[data-theme="dark"] .tabs a[class*="t-"].t-utfort:not(.t-alle):not(.t-e-alle).on { color: #7fcc98; }
[data-theme="dark"] .tabs a[class*="t-"]:not(.t-alle):not(.t-e-alle).on b,
[data-theme="dark"] .tabs a[class*="t-"].t-utfort:not(.t-alle):not(.t-e-alle).on b { background: var(--c); color: #10161a; }

/* The switch in the menu, beside «Logg ut»: a round icon button with a thin ring, as GitHub and Shopify have it. */
.top button.theme-toggle, .top button.theme-toggle:hover { align-self: center; flex: none; display: grid; place-items: center; width: 36px; height: 36px; padding: 0;
  border-radius: 50%; background: transparent; border: 1px solid var(--line); color: var(--muted); box-shadow: none; transition: background .12s, color .12s, border-color .12s; }
.top button.theme-toggle:hover { background: var(--bg); color: var(--ink); border-color: var(--field-line, #cfd8dd); }
.top button.theme-toggle .icon { width: 18px; height: 18px; margin: 0; vertical-align: 0; }
@media (max-width: 1000px) { .team-top .wrap > .theme-toggle { margin-left: auto; } .team-top .wrap > .theme-toggle + form { margin-left: 0; } }
@media (max-width: 600px) {
  .portal-top .wrap { grid-template-columns: minmax(0, 1fr) auto auto auto; grid-template-areas: "brand theme profile out" "nav nav nav nav"; }
  .portal-top .theme-toggle { grid-area: theme; }
}

/* The Oppdragsgiver's page: four counts above the list. */
.stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin-bottom: 16px; }
.stats .stat { display: flex; flex-direction: column; gap: 4px; margin: 0; padding: 14px 18px; }
.stats .stat b { font-size: 26px; line-height: 1.1; font-variant-numeric: tabular-nums; }
@media (max-width: 640px) { .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
