/* Kvalitet og HMS, Kompetanse, Håndbok og infotavle, Forbruk og innkjøp, Skjema, Maskindrift, Fravær, Underprosjekter */
.nowrap { white-space: nowrap; }
table.t tr.click { cursor: pointer; }
table.t tr.click:hover td, table.t tr.click:hover th { background: var(--soft, #f8fafc); }
.box h3:first-child { margin-top: 0; }

/* ---------- Kvalitet og HMS ---------- */
.kv-type { display: inline-flex; align-items: center; gap: 5px; font-size: 11px; font-weight: 700; color: var(--c); background: color-mix(in srgb, var(--c) 12%, #fff); border-radius: 6px; padding: 2px 7px; white-space: nowrap; }
.kv-type::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--c); }
.kv-card { cursor: pointer; }
.kv-typevalg { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: 8px; margin: 10px 0 4px; }
.kv-typevalg button { text-align: left; border: 1.5px solid var(--line); background: #fff; border-radius: 12px; padding: 9px 11px; display: flex; flex-direction: column; gap: 2px; cursor: pointer; }
.kv-typevalg button b { color: var(--c); font-size: 13px; }
.kv-typevalg button span { font-size: 11px; color: var(--muted); line-height: 1.25; }
.kv-typevalg button.on { border-color: var(--c); box-shadow: 0 0 0 3px color-mix(in srgb, var(--c) 18%, transparent); background: color-mix(in srgb, var(--c) 5%, #fff); }
.kv-pos { display: flex; justify-content: space-between; align-items: center; gap: 8px; flex-wrap: wrap; background: var(--soft, #f8fafc); border-radius: 10px; padding: 8px 10px; font-size: 12.5px; }
.kv-pos > span:first-child { display: inline-flex; align-items: center; gap: 6px; }
.kv-pos .ik { width: 16px; height: 16px; }
.kv-dhead { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.kv-detalj { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: 20px; margin-top: 10px; }
.kv-detalj h4 { margin: 12px 0 4px; font-size: 12px; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); }
.kv-detalj p { margin: 0; white-space: pre-wrap; }
.kv-trad { display: flex; flex-direction: column; background: var(--soft, #f8fafc); border-radius: 14px; padding: 4px 12px 12px; min-height: 280px; }
.kv-msgs { flex: 1; overflow-y: auto; max-height: 380px; display: flex; flex-direction: column; gap: 6px; padding: 4px 0 8px; }
.kv-sys { font-size: 11px; color: var(--muted); text-align: center; }
.kv-msg { background: #fff; border: 1px solid var(--line); border-radius: 12px 12px 12px 4px; padding: 7px 10px; max-width: 88%; }
.kv-msg.meg { align-self: flex-end; background: #eff6ff; border-color: #bfdbfe; border-radius: 12px 12px 4px 12px; }
.kv-msg b { font-size: 11.5px; } .kv-msg p { margin: 2px 0; font-size: 13px; white-space: pre-wrap; } .kv-msg span { font-size: 10.5px; color: var(--muted); }
.kv-mform { display: flex; gap: 6px; }
.kv-mform .input { flex: 1; }
.kv-tabell { overflow-x: auto; }
.kv-tabell table.t { font-size: 13px; }
.kv-tabell table.t td { vertical-align: top; padding: 8px 6px; }
.kv-tabell table.t th { padding: 8px 6px; }

/* risikomatrise */
.kv-matrise { display: grid; grid-template-columns: 18px repeat(5, 1fr); gap: 3px; max-width: 280px; }
.kv-matrise.mini { grid-template-columns: repeat(5, 1fr); max-width: 110px; gap: 2px; }
.kv-ax { font-size: 10.5px; color: var(--muted); display: grid; place-items: center; }
.kv-c { aspect-ratio: 1; border-radius: 5px; display: grid; place-items: center; font-weight: 700; font-size: 13px; opacity: .38; }
.kv-matrise.mini .kv-c { border-radius: 3px; font-size: 9px; }
.kv-c.has { opacity: 1; }
.kv-c.lav { background: #bbf7d0; color: #14532d; } .kv-c.middels { background: #fde68a; color: #713f12; } .kv-c.hoy { background: #fca5a5; color: #7f1d1d; }
.kv-axl { display: flex; justify-content: space-between; font-size: 10.5px; color: var(--muted); max-width: 280px; margin-top: 4px; }
.kv-mini { display: flex; gap: 14px; align-items: center; }
.kv-niva { display: inline-flex; min-width: 26px; justify-content: center; border-radius: 6px; padding: 1px 6px; font-weight: 700; }
.kv-niva.lav { background: #dcfce7; color: #166534; } .kv-niva.middels { background: #fef3c7; color: #92400e; } .kv-niva.hoy { background: #fee2e2; color: #991b1b; }
.kv-rhead { display: flex; gap: 12px; align-items: flex-end; flex-wrap: wrap; margin-bottom: 14px; }
.kv-rhead label { display: flex; flex-direction: column; gap: 4px; font-size: 12px; font-weight: 600; }
.kv-rgrid { display: grid; grid-template-columns: 1fr 1fr 1.2fr; gap: 14px; margin-bottom: 14px; }
.kv-rk { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.kv-rk .kv-niva { flex-direction: column; padding: 10px; border-radius: 12px; }
.kv-rk .kv-niva b { font-size: 24px; } .kv-rk .kv-niva span { font-weight: 500; font-size: 12px; }
.kv-kilder { display: flex; flex-direction: column; gap: 8px; }
.kv-kilder button { text-align: left; border: 1px solid var(--line); background: #fff; border-radius: 12px; padding: 12px 14px; display: flex; flex-direction: column; gap: 3px; cursor: pointer; }
.kv-kilder button:hover:not(:disabled) { border-color: var(--accent); }
.kv-kilder button:disabled { opacity: .5; cursor: not-allowed; }
.kv-kilder span { font-size: 12.5px; color: var(--muted); }
.kv-forh { display: flex; align-items: center; gap: 6px; font-size: 13px; }

/* statistikk */
.kv-stat { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.kv-stat > .box:first-child { grid-column: 1 / -1; }
.kv-bar { display: grid; grid-template-columns: minmax(90px, 160px) 1fr 34px; align-items: center; gap: 8px; margin: 6px 0; font-size: 12.5px; }
.kv-bl { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.kv-bt { height: 10px; background: #f1f5f9; border-radius: 0 4px 4px 0; overflow: hidden; }
.kv-bt i { display: block; height: 100%; border-radius: 0 4px 4px 0; }
.kv-bar b { text-align: right; font-variant-numeric: tabular-nums; }
.kv-cols { display: grid; grid-template-columns: repeat(12, 1fr); gap: 6px; height: 150px; align-items: stretch; }
.kv-cols > div { display: grid; grid-template-rows: 1fr auto; justify-items: center; align-items: end; gap: 4px; min-height: 0; }
.kv-cols span { width: 100%; max-width: 30px; background: var(--accent); border-radius: 4px 4px 0 0; min-height: 2px; align-self: end; }
.kv-cols small { font-size: 10.5px; color: var(--muted); }

/* ---------- Kompetanse ---------- */
.kp-mwrap { padding: 0; overflow: hidden; }
.kp-mscroll { overflow: auto; max-height: calc(100dvh - 330px); min-height: 260px; }
.kp-m { border-collapse: separate; border-spacing: 0; font-size: 12px; }
.kp-m th, .kp-m td { border-bottom: 1px solid var(--line); border-right: 1px solid #f1f5f9; }
.kp-m thead th { position: sticky; top: 0; background: #fff; z-index: 2; }
.kp-m thead tr:nth-child(2) th { top: 29px; }
.kp-sticky { position: sticky; left: 0; background: #fff; z-index: 1; text-align: left; padding: 6px 12px; min-width: 170px; cursor: pointer; }
.kp-m thead .kp-sticky { z-index: 3; }
.kp-sticky b { display: block; font-size: 12.5px; } .kp-sticky small { color: var(--muted); font-weight: 400; }
.kp-kat { font-size: 10.5px; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); padding: 7px 4px; height: 29px; border-left: 2px solid var(--line); }
.kp-col { height: 150px; vertical-align: bottom; padding: 4px 0 8px; width: 38px; min-width: 38px; }
.kp-col span { writing-mode: vertical-rl; transform: rotate(180deg); white-space: nowrap; font-weight: 600; font-size: 11.5px; max-height: 140px; overflow: hidden; text-overflow: ellipsis; display: inline-block; }
td.kp-c { text-align: center; cursor: pointer; font-size: 10.5px; font-weight: 700; height: 34px; padding: 0 2px; }
td.kp-c:hover { outline: 2px solid var(--accent); outline-offset: -2px; }
.kp-c.gyldig { background: #dcfce7; color: #166534; } .kp-c.utloper { background: #fef3c7; color: #92400e; } .kp-c.utlopt { background: #fee2e2; color: #991b1b; }
.kp-c.mangler { background: repeating-linear-gradient(45deg, #fff, #fff 4px, #fef2f2 4px, #fef2f2 8px); color: #b91c1c; }
.kp-legend { display: flex; flex-wrap: wrap; gap: 6px 14px; align-items: center; padding: 10px 14px; font-size: 12px; border-top: 1px solid var(--line); }
.kp-legend .kp-c { display: inline-grid; place-items: center; min-width: 28px; height: 20px; border-radius: 4px; font-size: 10px; font-weight: 700; padding: 0 4px; }
.kp-kort { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 12px; }
.kp-pk { text-align: left; background: rgba(255,255,255,.95); border: 1px solid var(--line); border-radius: 14px; padding: 14px; cursor: pointer; display: flex; flex-direction: column; gap: 4px; box-shadow: var(--shadow-sm, none); }
.kp-pk:hover { border-color: var(--accent); }
.kp-tags { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 6px; }
.kp-tag { font-size: 10.5px; background: #f1f5f9; border-radius: 5px; padding: 2px 6px; }
.kp-tag.utloper { background: #fef3c7; } .kp-tag.utlopt { background: #fee2e2; text-decoration: line-through; }
.kp-liste { display: flex; flex-direction: column; }
.kp-rad { display: flex; align-items: center; gap: 10px; padding: 10px 0; border-bottom: 1px solid var(--line); cursor: pointer; }
.kp-varsel { border-left: 3px solid #f59e0b; background: #fffbeb; border-radius: 0 8px 8px 0; padding: 7px 10px; margin: 5px 0; font-size: 13px; cursor: pointer; }
.kp-varsel.bad { border-color: #dc2626; background: #fef2f2; }
.kp-frister { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.kp-dot { width: 14px !important; height: 14px !important; margin: 4px 8px; }
.kp-dot.gyldig { background: #22c55e; border-color: #22c55e; } .kp-dot.utloper { background: #f59e0b; border-color: #f59e0b; } .kp-dot.utlopt { background: #dc2626; border-color: #dc2626; }

/* ---------- Håndbok og infotavle ---------- */
.hb-banner { display: flex; align-items: center; gap: 10px; background: linear-gradient(90deg, #fffbeb, #fff); border: 1px solid #fde68a; border-radius: 14px; padding: 10px 14px; margin-bottom: 14px; }
.hb-banner b { flex: 1; }
.hb-grid { display: grid; grid-template-columns: 250px minmax(0, 1fr); gap: 14px; align-items: start; }
.hb-mapper { display: flex; flex-direction: column; gap: 2px; padding: 8px; }
.hb-mapper button { display: flex; justify-content: space-between; align-items: center; text-align: left; background: none; border: 0; border-radius: 9px; padding: 8px 10px; cursor: pointer; font-size: 13px; }
.hb-mapper button:hover { background: var(--soft, #f8fafc); }
.hb-mapper button.on { background: #fff7ed; color: var(--accent-2, #c2410c); font-weight: 600; }
.hb-mapper button span { font-size: 11px; color: var(--muted); }
.hb-mapper .hb-nymappe { color: var(--muted); justify-content: flex-start; gap: 6px; margin-top: 6px; border-top: 1px solid var(--line); border-radius: 0 0 9px 9px; }
.hb-mapper .ik { width: 15px; height: 15px; }
.hb-ico { display: inline-block; width: 24px; }
.hb-dhead { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; flex-wrap: wrap; padding-bottom: 12px; border-bottom: 1px solid var(--line); }
.hb-tekst { font-size: 14.5px; line-height: 1.6; max-width: 760px; padding: 6px 0; }
.hb-tekst p { margin: 0 0 12px; }
.hb-pdf { width: 100%; height: 60vh; border: 1px solid var(--line); border-radius: 10px; margin-top: 10px; }
.hb-img { max-width: 100%; border-radius: 10px; margin-top: 10px; }
.hb-bekreft { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; border-top: 1px solid var(--line); padding-top: 14px; margin-top: 14px; }
.hb-velg { border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; max-height: 320px; overflow: auto; }
.hb-velg label { display: flex !important; flex-direction: row !important; align-items: center; gap: 8px !important; font-weight: 400 !important; padding: 3px 0; }
.hb-alle { border-bottom: 1px solid var(--line); padding-bottom: 8px !important; margin-bottom: 6px; }
.hb-rolle { margin-bottom: 8px; }
.hb-les { display: flex; align-items: center; gap: 10px; padding: 11px 6px; border-bottom: 1px solid var(--line); cursor: pointer; }
.hb-les:hover { background: var(--soft, #f8fafc); }
.hb-les.done { opacity: .75; }
.hb-ov { padding: 12px 4px; border-bottom: 1px solid var(--line); cursor: pointer; }
.hb-ov .bar { margin: 6px 0; }
.hb-ov .bar span { display: block; height: 100%; background: var(--st); border-radius: 99px; }
.hb-poster { display: flex; flex-direction: column; gap: 12px; max-width: 820px; }
.hb-poster.portal { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); max-width: none; margin-bottom: 8px; }
.hb-post { background: rgba(255,255,255,.95); border: 1px solid var(--line); border-radius: 16px; padding: 14px 16px; box-shadow: var(--shadow-sm, none); }
.hb-post.festet { border-color: #bfdbfe; background: linear-gradient(180deg, #f8fbff, #fff); }
.hb-post.viktig { border-color: #fcd34d; box-shadow: 0 0 0 3px #fef3c7; }
.hb-post header { display: flex; justify-content: space-between; gap: 8px; align-items: flex-start; }
.hb-post h3 { margin: 4px 0 2px; font-size: 15.5px; text-transform: none; letter-spacing: -.01em; color: var(--ink, #0f172a); font-weight: 700; }
.hb-ptekst { font-size: 13.5px; line-height: 1.55; color: var(--ink-2, #334155); margin: 8px 0; }
.hb-ptekst p { margin: 0 0 8px; }
.hb-poster.portal .hb-post h3 { font-size: 14px; }

/* ---------- Forbruk ---------- */
.fb-ret { font-size: 10.5px; font-weight: 700; text-transform: uppercase; border-radius: 4px; padding: 1px 5px; letter-spacing: .03em; }
.fb-ret.ut { background: #fee2e2; color: #991b1b; } .fb-ret.inn { background: #dcfce7; color: #166534; } .fb-ret.intern { background: #e0e7ff; color: #3730a3; }
.fb-seg { display: flex !important; flex-direction: row !important; width: 100%; }
.fb-seg button { flex: 1; }
.fb-masser { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 12px; }
.fb-masser span { background: var(--soft, #f8fafc); border: 1px solid var(--line); border-radius: 10px; padding: 6px 10px; font-size: 12.5px; }
.fb-prosjekter { display: flex; flex-wrap: wrap; gap: 8px; }

@media (max-width: 900px) {
  .kv-detalj, .kv-rgrid, .kv-stat, .kp-frister, .hb-grid { grid-template-columns: 1fr; }
  .kv-stat > .box:first-child { grid-column: auto; }
  .kp-mscroll { max-height: 70dvh; }
}

/* ---------- Skjema ---------- */
.sk-kat { display: inline-flex; font-size: 11px; font-weight: 700; color: var(--c); background: color-mix(in srgb, var(--c) 12%, #fff); border-radius: 6px; padding: 2px 7px; white-space: nowrap; }
.sk-gh { margin: 16px 0 8px; font-size: 12px; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); }
.sk-gh:first-child { margin-top: 4px; }
.sk-maler { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 10px; }
.sk-mal { text-align: left; background: rgba(255,255,255,.96); border: 1px solid var(--line); border-left: 4px solid var(--c); border-radius: 12px; padding: 12px 14px; cursor: pointer; display: flex; flex-direction: column; gap: 3px; box-shadow: var(--shadow-sm, none); }
.sk-mal:hover { border-color: var(--c); box-shadow: 0 0 0 3px color-mix(in srgb, var(--c) 14%, transparent); }
.sk-mal b { font-size: 14px; } .sk-mal span { font-size: 12.5px; color: var(--ink-2, #334155); line-height: 1.35; } .sk-mal small { font-size: 11px; color: var(--muted); margin-top: 3px; }
.sk-fhead { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; flex-wrap: wrap; padding-bottom: 10px; border-bottom: 1px solid var(--line); margin-bottom: 10px; }
.sk-form, .sk-les { display: flex; flex-direction: column; gap: 4px; max-width: 760px; }
.sk-felt { padding: 9px 0; border-bottom: 1px solid #f1f5f9; display: flex; flex-direction: column; gap: 6px; }
.sk-felt.mangler { background: #fef2f2; border-radius: 10px; padding: 9px 10px; box-shadow: inset 3px 0 0 #dc2626; }
.sk-felt.les { display: grid; grid-template-columns: minmax(140px, 38%) 1fr; gap: 10px; align-items: start; }
.sk-lab { font-weight: 600; font-size: 13.5px; }
.sk-req { color: #dc2626; font-style: normal; margin-left: 2px; }
.sk-h { margin: 16px 0 2px; font-size: 13px; text-transform: uppercase; letter-spacing: .05em; color: var(--accent-2, #c2410c); }
.sk-seg { display: flex; flex-wrap: wrap; width: fit-content; max-width: 100%; }
.sk-seg button { min-width: 64px; padding: 8px 14px; }
.sk-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.sk-chips label { display: inline-flex; align-items: center; gap: 6px; border: 1px solid var(--line); border-radius: 99px; padding: 6px 12px; font-size: 13px; cursor: pointer; background: #fff; }
.sk-chips label.on { border-color: var(--accent); background: #eff6ff; color: #1d4ed8; }
.sk-chips input { display: none; }
.sk-sj { display: flex; gap: 6px; flex-wrap: wrap; }
.sk-sj button { border: 1.5px solid var(--line); background: #fff; border-radius: 10px; padding: 8px 14px; font-weight: 600; cursor: pointer; font-size: 13px; }
.sk-sj button.ok.on { background: #dcfce7; border-color: #16a34a; color: #166534; }
.sk-sj button.bad.on { background: #fee2e2; border-color: #dc2626; color: #991b1b; }
.sk-sj button.light.on { background: #f1f5f9; border-color: #64748b; color: #334155; }
.sk-avvik { margin-top: 6px; display: flex; flex-direction: column; gap: 6px; }
.sk-sak { display: flex !important; flex-direction: row !important; align-items: center; gap: 8px; font-size: 13px; font-weight: 500 !important; }
.sk-bilder { display: flex; flex-wrap: wrap; gap: 8px; }
.sk-thumb { position: relative; width: 84px; height: 84px; border-radius: 10px; overflow: hidden; background: #f1f5f9; display: grid; place-items: center; font-size: 12px; font-weight: 700; color: var(--muted); border: 1px solid var(--line); }
.sk-thumb img { width: 100%; height: 100%; object-fit: cover; }
.sk-thumb .x { position: absolute; top: 2px; right: 2px; background: rgba(15,23,42,.7); color: #fff; border-radius: 50%; width: 22px; height: 22px; line-height: 20px; }
.sk-add { width: 84px; height: 84px; border: 1.5px dashed var(--line); border-radius: 10px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; cursor: pointer; font-size: 11px; color: var(--muted); text-align: center; }
.sk-add:hover { border-color: var(--accent); color: var(--accent); }
.sk-add .ik { width: 22px; height: 22px; }
.sk-sign canvas { width: 100%; max-width: 520px; height: 150px; border: 1.5px dashed var(--line); border-radius: 10px; background: #fff; touch-action: none; display: block; }
.sk-sign canvas.hidden { display: none; }
.sk-sigimg { max-width: 260px; max-height: 90px; background: #fff; border: 1px solid var(--line); border-radius: 8px; display: block; }
.sk-pos { min-height: 16px; margin-top: 6px; }
.sk-knapper { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; border-top: 1px solid var(--line); padding: 12px 24px 22px; margin: 12px -24px -22px; position: sticky; bottom: -22px; background: #fff; z-index: 2; }
.sk-inaktiv td { opacity: .6; }
.sk-bygger { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); gap: 18px; margin-top: 12px; }
.sk-opts { display: flex; flex-wrap: wrap; gap: 6px 18px; }
.sk-opts label { display: flex !important; flex-direction: row !important; align-items: center; gap: 6px; font-weight: 500 !important; font-size: 13px; }
.sk-frad { display: grid; grid-template-columns: 26px 1fr auto; gap: 8px; align-items: start; border: 1px solid var(--line); border-radius: 12px; padding: 8px; margin-bottom: 6px; background: #fff; }
.sk-frad:focus-within { border-color: var(--accent); box-shadow: 0 0 0 3px #dbeafe; }
.sk-fnr { width: 24px; height: 24px; border-radius: 50%; background: #f1f5f9; display: grid; place-items: center; font-size: 11px; font-weight: 700; color: var(--muted); margin-top: 4px; }
.sk-fbody { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.sk-fbody .small { display: inline-flex; align-items: center; gap: 5px; }
.sk-fact { display: flex; flex-direction: column; gap: 2px; }
.sk-fact .x:disabled { opacity: .25; }
.sk-palett { display: flex; flex-wrap: wrap; gap: 5px; align-items: center; margin-top: 8px; padding: 10px; background: var(--soft, #f8fafc); border-radius: 12px; }
.sk-prev { background: var(--soft, #f8fafc); border-radius: 14px; padding: 12px 16px; position: sticky; top: 0; align-self: start; max-height: 70vh; overflow: auto; }
.sk-prevh { font-size: 11px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); margin-bottom: 8px; }
.sk-prev .sk-felt { pointer-events: none; }

/* ---------- Maskindrift ---------- */
.md-kol { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; align-items: start; }
.md-k { background: rgba(241,245,249,.85); border-radius: 14px; padding: 8px; display: flex; flex-direction: column; gap: 8px; min-height: 120px; }
.md-kh { display: flex; justify-content: space-between; align-items: center; padding: 4px 6px; font-size: 13px; }
.md-kh span { background: #fff; border-radius: 99px; padding: 1px 8px; font-size: 12px; font-weight: 700; }
.md-kort { position: relative; text-align: left; background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; cursor: pointer; display: flex; flex-direction: column; gap: 3px; box-shadow: var(--shadow-sm, none); }
.md-kort:hover { border-color: var(--accent); }
.md-kort.forfalt { box-shadow: inset 3px 0 0 #dc2626; }
.md-kort b { font-size: 13.5px; }
.md-foto { position: absolute; bottom: 8px; right: 10px; font-size: 12px; }
.md-mgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(270px, 1fr)); gap: 12px; }
.md-m { border: 1px solid var(--line); border-radius: 14px; padding: 12px 14px; background: #fff; }
.md-m.service { border-color: #fca5a5; background: linear-gradient(180deg, #fff5f5, #fff); }
.md-mtall { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; margin: 10px 0 6px; }
.md-mtall div { background: var(--soft, #f8fafc); border-radius: 10px; padding: 6px 8px; display: flex; flex-direction: column; }
.md-mtall b { font-size: 17px; font-variant-numeric: tabular-nums; } .md-mtall span { font-size: 10.5px; color: var(--muted); }
.md-mf { font-size: 12.5px; padding: 5px 8px; border-radius: 8px; background: #fffbeb; margin-top: 4px; cursor: pointer; }
.md-mf:hover { background: #fef3c7; }
.ms-stat.alert b { color: #b91c1c; }

/* ---------- Fravær ---------- */
.fv-dager { display: flex; flex-direction: column; justify-content: center; background: var(--soft, #f8fafc); border-radius: 10px; padding: 8px 12px; font-size: 13px; }
.fv-dager b { font-size: 20px; }
.fv-liste { display: flex; flex-direction: column; }
.fv-rad { display: flex; align-items: center; gap: 12px; padding: 10px 4px; border-bottom: 1px solid var(--line); }
.fv-rad:last-child { border-bottom: 0; }
.fv-dato { width: 46px; flex: none; text-align: center; background: var(--soft, #f8fafc); border-radius: 10px; padding: 4px 0; display: flex; flex-direction: column; line-height: 1.1; }
.fv-dato b { font-size: 18px; } .fv-dato span { font-size: 11px; color: var(--muted); text-transform: uppercase; }
.fv-act { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }
.fv-saldokort { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; background: linear-gradient(135deg, #fdf2f8, #fff); border: 1px solid #fbcfe8; border-radius: 16px; padding: 14px 16px; margin-bottom: 12px; }
.fv-saldokort > div:not(.fv-bar) { display: flex; flex-direction: column; }
.fv-saldokort span { font-size: 12px; color: var(--muted); } .fv-saldokort b { font-size: 26px; line-height: 1.1; } .fv-saldokort small { font-size: 11.5px; color: var(--muted); }
.fv-saldokort .fv-bar { grid-column: 1 / -1; }
.fv-bar { height: 8px; background: #f1f5f9; border-radius: 99px; overflow: hidden; display: flex; }
.fv-bar i { display: block; height: 100%; background: #db2777; }
.fv-bar i.p { background: repeating-linear-gradient(45deg, #f9a8d4, #f9a8d4 4px, #fbcfe8 4px, #fbcfe8 8px); }
.fv-saldo { background: var(--soft, #f8fafc); border-radius: 10px; padding: 8px 12px; margin: 8px 0; }
.fv-rett { width: 64px; text-align: right; }
.fv-borte { display: flex; flex-wrap: wrap; gap: 6px 12px; align-items: center; background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 8px 12px; margin-bottom: 12px; font-size: 13px; }
.fv-borte span { display: inline-flex; align-items: center; gap: 5px; }
.fv-legend { display: flex; flex-wrap: wrap; gap: 4px 12px; font-size: 11.5px; color: var(--muted); }
.fv-legend span { display: inline-flex; align-items: center; gap: 4px; }
.fv-legend i { width: 10px; height: 10px; border-radius: 3px; display: inline-block; }
.fv-legend i.sokt { background: repeating-linear-gradient(45deg, #94a3b8, #94a3b8 2px, #fff 2px, #fff 4px); border: 1px solid #94a3b8; }
.fv-kal .kp-m th.fv-d { font-size: 10.5px; font-weight: 600; min-width: 26px; padding: 4px 0; text-align: center; line-height: 1.15; }
.fv-kal .kp-m th.fv-d span { display: block; font-weight: 400; color: var(--muted); }
.fv-kal th.helg, .fv-kal td.helg { background: #f8fafc; } .fv-kal th.hd { color: #db2777; } .fv-kal th.idag { background: #fef3c7; }
.fv-c { height: 30px; padding: 2px 1px !important; }
.fv-c i { display: block; height: 100%; border-radius: 3px; background: var(--c); }
.fv-c.sokt i { background: repeating-linear-gradient(45deg, var(--c), var(--c) 3px, #fff 3px, #fff 6px); opacity: .8; }
.fv-c[data-a] { cursor: pointer; }
td.warn { color: #b45309; font-weight: 700; }

/* ---------- Underprosjekter ---------- */
.up-bar { height: 8px; background: #f1f5f9; border-radius: 99px; overflow: hidden; }
.up-bar i { display: block; height: 100%; background: #16a34a; border-radius: 99px; }
.up-bar.snart i { background: #f59e0b; } .up-bar.over i { background: #dc2626; }
.up-av td { opacity: .6; }

@media (max-width: 900px) {
  .sk-bygger, .md-kol { grid-template-columns: 1fr; }
  .sk-prev { position: static; max-height: none; }
  .sk-felt.les { grid-template-columns: 1fr; gap: 4px; }
  .sk-knapper #sk-avbryt { display: none; }
  .sk-knapper .btn { flex: 1; justify-content: center; }
  .sk-knapper .grow { display: none; }
  .fv-saldokort { grid-template-columns: repeat(2, 1fr); }
  .fv-rad { flex-wrap: wrap; } .fv-act { width: 100%; justify-content: flex-start; padding-left: 58px; }
}
/* ---------- Firmaoppsett og import ---------- */
.os-grid { display: grid; grid-template-columns: 260px minmax(0, 1fr); gap: 14px; align-items: start; }
.os-typer { display: flex; flex-direction: column; gap: 8px; }
.os-typer button { text-align: left; background: rgba(255,255,255,.95); border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; cursor: pointer; display: flex; flex-direction: column; gap: 2px; }
.os-typer button.on { border-color: var(--accent); box-shadow: 0 0 0 3px #dbeafe; }
.os-typer span { font-size: 12px; color: var(--accent); font-weight: 600; } .os-typer small { font-size: 11.5px; color: var(--muted); line-height: 1.3; }
.os-imp { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 12px; }
.os-it { border: 1px solid var(--line); border-radius: 14px; padding: 12px 14px; background: #fff; }
.os-it.laast { opacity: .6; }
.os-kob { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 8px 14px; }
.os-kob label { display: flex; flex-direction: column; gap: 4px; font-size: 12.5px; font-weight: 600; }
.os-res { display: flex; gap: 6px; flex-wrap: wrap; margin: 6px 0; }
.os-feil { max-height: 200px; overflow: auto; background: #fef2f2; border-radius: 10px; padding: 8px 12px; font-size: 12.5px; display: flex; flex-direction: column; gap: 3px; }

/* ---------- Tillegg i timeføring ---------- */
.tm-till { border: 1px solid var(--line); border-radius: 10px; padding: 6px 10px; }
.tm-till summary { cursor: pointer; font-weight: 600; font-size: 13px; }
.tm-tgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 8px; margin-top: 8px; }
.tm-tgrid label { font-size: 12px; display: flex; flex-direction: column; gap: 3px; }
.tm-tgrid .input { width: 80px; }

/* ---------- Produksjon ---------- */
.pd-poster { display: flex; flex-direction: column; gap: 8px; }
.pd-post { border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; background: #fff; }
.pd-post.av { opacity: .6; }
.pd-ph { display: flex; align-items: flex-start; gap: 6px; }
.pd-tall { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-top: 8px; font-size: 12.5px; }
.pd-bar { flex: 1 1 140px; height: 8px; background: #f1f5f9; border-radius: 99px; overflow: hidden; }
.pd-bar i { display: block; height: 100%; background: #0d9488; border-radius: 99px; }
.pd-bar.over i { background: #7c3aed; }
.pd-prod { background: #ecfdf5; color: #047857; border-radius: 6px; padding: 1px 7px; font-weight: 700; }

@media (max-width: 900px) { .os-grid { grid-template-columns: 1fr; } }
/* ---------- Nøkkeltall (prosjektdashboard) ---------- */
.db-kpis { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; margin-bottom: 14px; }
.db-kpi { background: var(--panel, #fff); border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.db-kpi span { font-size: 12px; color: var(--muted); }
.db-kpi b { font-size: 21px; letter-spacing: -.01em; font-variant-numeric: tabular-nums; }
.db-kpi small { font-size: 11.5px; color: var(--muted); line-height: 1.3; }
.db-kpi.alert { border-color: #fca5a5; background: #fef2f2; } .db-kpi.alert b { color: var(--bad); }
.db-kpi.warn { border-color: #fcd34d; background: #fffbeb; }
.db-kpi.ok b { color: var(--ok); }
.db-kort { background: var(--panel, #fff); border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; margin-bottom: 12px; min-width: 0; }
.db-kh { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; flex-wrap: wrap; margin-bottom: 8px; }
.db-kh h3 { margin: 0; font-size: 14px; }
.db-to { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 12px; align-items: start; }
.db-to .db-kort { margin-bottom: 0; }
.db-graf { position: relative; }
.db-graf svg { max-width: 100%; height: auto; display: block; }
.db-budl { display: inline-block; width: 16px; border-top: 2px dashed #94a3b8; vertical-align: middle; }
.db-grid { stroke: #e2e8f0; stroke-width: 1; }
.db-ax { font-size: 10px; fill: #64748b; font-variant-numeric: tabular-nums; }
.db-bar path { fill: #0d9488; transition: fill .12s; }
.db-bar.on path, .db-bar:hover path { fill: #0f766e; }
.db-bar { cursor: default; }
.db-bud { stroke: #94a3b8; stroke-width: 1.5; stroke-dasharray: 4 3; }
.db-tip { position: absolute; top: 0; background: #0f172a; color: #fff; border-radius: 8px; padding: 6px 9px; font-size: 12px; display: flex; flex-direction: column; pointer-events: none; white-space: nowrap; box-shadow: 0 4px 12px rgba(15,23,42,.18); }
.db-tip .muted { color: #cbd5e1; }
.db-rad { display: grid; grid-template-columns: minmax(90px, 46%) 1fr auto; align-items: center; gap: 8px; font-size: 13px; padding: 3px 0; }
.db-rad span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.db-rad b { font-variant-numeric: tabular-nums; font-weight: 600; }
.db-rbar { height: 8px; background: #f1f5f9; border-radius: 99px; overflow: hidden; }
.db-rbar i { display: block; height: 100%; background: #0d9488; border-radius: 99px; }
.db-sum { margin-top: 8px; }
.db-feed { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.db-feed li { display: flex; gap: 9px; align-items: flex-start; font-size: 13px; }
.db-fi { flex: none; width: 26px; height: 26px; border-radius: 8px; background: #f1f5f9; display: grid; place-items: center; }
.db-fi .ik { width: 15px; height: 15px; }
.txt-bad { color: var(--bad); } .txt-ok { color: var(--ok); }

/* ---------- Fakturering ---------- */
.fk-per { margin-bottom: 8px; }
.fk-info { display: flex; gap: 8px; align-items: flex-start; background: #eff6ff; color: #1e3a8a; border-radius: 10px; padding: 8px 10px; font-size: 13px; margin-bottom: 10px; }
.fk-info .ik { flex: none; width: 17px; height: 17px; margin-top: 1px; }
.fk-gr { border: 1px solid var(--line); border-radius: 12px; margin-bottom: 10px; overflow: hidden; }
.fk-grh { display: flex; align-items: center; gap: 8px; padding: 8px 12px; background: #f8fafc; border-bottom: 1px solid var(--line); cursor: pointer; }
.fk-grh span { margin-left: auto; font-variant-numeric: tabular-nums; }
.fk-l { display: grid; grid-template-columns: auto minmax(0, 1fr) auto auto; gap: 10px; align-items: center; padding: 7px 12px; border-bottom: 1px solid #f1f5f9; cursor: pointer; font-size: 13.5px; }
.fk-l:last-child { border-bottom: 0; }
.fk-l:hover { background: #fafafa; }
.fk-t small { display: block; color: var(--muted); font-size: 11.5px; }
.fk-t small.txt-warn { color: var(--warn); }
.fk-l.mangler { background: #fffbeb; }
.fk-a { color: var(--muted); font-size: 12.5px; white-space: nowrap; font-variant-numeric: tabular-nums; }
.fk-s { white-space: nowrap; font-variant-numeric: tabular-nums; min-width: 100px; text-align: right; }
.fk-head { margin: 10px 0; } .fk-head summary { cursor: pointer; font-weight: 600; padding: 6px 0; }
.fk-bunn { position: sticky; bottom: -22px; background: var(--panel, #fff); border-top: 1px solid var(--line); margin: 14px -22px -22px; padding: 12px 22px; display: flex; gap: 8px; align-items: center; z-index: 2; }
.fk-bunn > div { display: flex; flex-direction: column; margin-right: auto; } .fk-bunn b { font-size: 18px; font-variant-numeric: tabular-nums; }
.fk-bunn .grow { flex: 1; }
.fk-fh { display: flex; justify-content: space-between; gap: 12px; align-items: flex-start; flex-wrap: wrap; margin-bottom: 10px; }
.fk-fh h2 { margin: 6px 0 2px; }
.fk-lt input.sm { padding: 4px 7px; font-size: 13px; } .fk-lt input.num { width: 100px; text-align: right; }
.fk-lt td:first-child input { width: 100%; min-width: 180px; text-align: left; } .fk-lt small { display: block; }
.fk-lt tfoot td, .fk-lt tfoot th { font-variant-numeric: tabular-nums; }
.fk-dl { grid-template-columns: max-content 1fr max-content 1fr; }
.fk-lonn td, .fk-klar td { vertical-align: middle; }
.tabwrap { overflow-x: auto; }

/* ---------- Utstyr ---------- */
.ut-gh { margin: 18px 0 8px; font-size: 14px; } .ut-gh .muted { font-weight: 400; }
.ut-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 10px; }
.ut-kort { background: #fff; border: 1px solid var(--line); border-left: 4px solid #16a34a; border-radius: 12px; padding: 10px 12px; cursor: pointer; display: flex; flex-direction: column; gap: 4px; }
.ut-kort.info { border-left-color: #2563eb; } .ut-kort.bad { border-left-color: #dc2626; background: #fffafa; } .ut-kort.warn { border-left-color: #d97706; }
.ut-kort:hover { box-shadow: 0 2px 10px rgba(15,23,42,.08); }
.ut-kt { display: flex; justify-content: space-between; gap: 8px; align-items: flex-start; } .ut-kt b { line-height: 1.25; }
.ut-hvor { display: flex; gap: 6px; align-items: center; font-size: 13px; } .ut-hvor .ik { width: 15px; height: 15px; color: var(--muted); flex: none; }
.ut-kb { display: flex; gap: 6px; margin-top: 4px; } .ut-kb:empty { display: none; }
.ut-dh { display: flex; justify-content: space-between; gap: 12px; align-items: flex-start; } .ut-dh h2 { margin: 6px 0 2px; }
.ut-qr { border: 1px solid var(--line); border-radius: 8px; padding: 4px; background: #fff; flex: none; }
.ut-naa { display: flex; flex-direction: column; gap: 2px; background: #f8fafc; border-radius: 10px; padding: 10px 12px; margin-top: 12px; } .ut-naa b { font-size: 16px; }
.ut-tilst { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-bottom: 12px; }
.ut-t { border: 1.5px solid var(--line); border-radius: 10px; padding: 12px 8px; text-align: center; cursor: pointer; font-weight: 600; font-size: 14px; }
.ut-t input { display: none; } .ut-t:has(input:checked).ok { border-color: #16a34a; background: #f0fdf4; color: #15803d; } .ut-t:has(input:checked).bad { border-color: #dc2626; background: #fef2f2; color: #b91c1c; }
.ut-velg { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 8px; } .ut-velg .btn { display: flex; flex-direction: column; align-items: flex-start; text-align: left; height: auto; padding: 10px 12px; }
.ut-hist td { vertical-align: top; }
.lbl { display: flex; flex-direction: column; gap: 4px; font-size: 13px; }
@media (max-width: 640px) {
  .ut-grid { grid-template-columns: 1fr; }
  .fk-l { grid-template-columns: auto minmax(0, 1fr) auto; } .fk-a { display: none; }
  .fk-dl { grid-template-columns: max-content 1fr; }
  .db-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .db-kpi b { font-size: 18px; }
  .fk-bunn { margin: 14px -16px -16px; padding: 10px 16px; bottom: -16px; flex-wrap: wrap; }
  #ut-sok { width: 100% !important; }
}

/* ---------- Arbeidsordre ---------- */
.or-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 10px; }
.or-kort { background: #fff; border: 1px solid var(--line); border-left: 4px solid #2563eb; border-radius: 12px; padding: 10px 12px; cursor: pointer; display: flex; flex-direction: column; gap: 4px; }
.or-kort:hover { box-shadow: 0 2px 10px rgba(15,23,42,.08); }
.or-kort.st-Pagar { border-left-color: #d97706; } .or-kort.st-Utført, .or-kort.st-Fakturert { border-left-color: #16a34a; } .or-kort.st-Ny { border-left-color: #94a3b8; }
.or-kort.haster { background: #fffafa; }
.or-kt { display: flex; justify-content: space-between; gap: 8px; align-items: flex-start; } .or-kt b { line-height: 1.25; }
.or-ka { display: flex; gap: 6px; align-items: center; font-size: 13px; } .or-ka .ik { width: 15px; height: 15px; color: var(--muted); flex: none; }
.or-plan { display: grid; grid-template-columns: 230px minmax(0, 1fr); gap: 12px; align-items: start; }
.or-up { background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 10px; display: flex; flex-direction: column; gap: 6px; position: sticky; top: 70px; }
.or-up h3 { margin: 0 0 4px; font-size: 14px; } .or-up.over { background: #eff6ff; }
.or-uke { background: #fff; border: 1px solid var(--line); border-radius: 12px; }
.or-tab { width: 100%; border-collapse: collapse; table-layout: fixed; min-width: 640px; }
.or-tab th, .or-tab td { border-bottom: 1px solid #f1f5f9; border-right: 1px solid #f1f5f9; padding: 6px; vertical-align: top; text-align: left; }
.or-tab thead th { font-size: 12px; color: var(--muted); font-weight: 600; background: #f8fafc; } .or-tab thead th.idag { color: #1d4ed8; }
.or-tab tbody th { width: 130px; font-weight: 400; } .or-tab tbody th b { display: block; font-size: 13px; } .or-tab tbody th small { color: var(--muted); font-size: 11px; }
.or-tab td { height: 64px; position: relative; } .or-tab td.idag { background: #f8fbff; } .or-tab td.over { background: #dbeafe; } .or-tab td.full .or-sum { color: var(--bad); }
.or-chip { background: #eff6ff; border: 1px solid #bfdbfe; border-radius: 8px; padding: 4px 6px; margin-bottom: 4px; cursor: grab; font-size: 12px; display: flex; flex-direction: column; }
.or-chip b { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } .or-chip small { color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.or-chip.st-Pagar { background: #fffbeb; border-color: #fcd34d; } .or-chip.st-Utført, .or-chip.st-Fakturert { background: #f0fdf4; border-color: #bbf7d0; cursor: pointer; }
.or-chip.haster { border-left: 3px solid #dc2626; } .or-chip.drar { opacity: .4; }
.or-sum { position: absolute; right: 6px; bottom: 3px; font-size: 10.5px; color: var(--muted); }
.or-dh { display: flex; justify-content: space-between; gap: 12px; align-items: flex-start; flex-wrap: wrap; } .or-dh h2 { margin: 6px 0 2px; }
.or-kunde { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 10px; background: #f8fafc; border-radius: 10px; padding: 10px 12px; margin: 12px 0; }
.or-kunde > div { display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.or-besk { white-space: pre-wrap; margin: 0 0 10px; }
.or-akt { gap: 8px; margin-bottom: 6px; }
.or-fore { display: flex; flex-direction: column; gap: 8px; margin-top: 10px; }
.or-ff { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; background: #f8fafc; border-radius: 10px; padding: 8px 10px; }
.or-ff b { display: flex; gap: 5px; align-items: center; min-width: 110px; font-size: 13px; } .or-ff b .ik { width: 16px; height: 16px; }
.or-ff .input { flex: 1; min-width: 90px; }
.or-sig { display: flex; gap: 12px; align-items: center; } .or-sig img { max-height: 70px; border: 1px solid var(--line); border-radius: 8px; background: #fff; }
.or-signer summary { cursor: pointer; font-weight: 600; margin: 6px 0; }
.or-adr { position: relative; } .or-adr .search-results { top: 100%; left: 0; right: 0; }

/* ---------- SMS ---------- */
.sms-liste { max-height: 260px; overflow: auto; border: 1px solid var(--line); border-radius: 10px; }
.sms-m { display: flex; flex-direction: row; gap: 10px; align-items: center; margin: 0; padding: 7px 10px; border-bottom: 1px solid #f1f5f9; cursor: pointer; }
.sms-m:last-child { border-bottom: 0; } .sms-m input { width: auto; flex: none; margin: 0; } .sms-m span { display: flex; flex-direction: column; } .sms-m small { color: var(--muted); font-size: 12px; } .sms-m.av { opacity: .55; cursor: default; }
.sms-status { display: flex; gap: 10px; align-items: center; background: #f8fafc; border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; margin-bottom: 12px; }
.sms-status > div { display: flex; flex-direction: column; flex: 1; } .sms-status .ik { width: 22px; height: 22px; color: var(--muted); } .sms-status.ok { background: #f0fdf4; border-color: #bbf7d0; }
@media (max-width: 760px) {
  .or-plan { grid-template-columns: 1fr; } .or-up { position: static; }
  .or-grid { grid-template-columns: 1fr; }
  .or-ff b { min-width: 100%; }
}

/* ---------- Lager ---------- */
.lg-typer { flex-wrap: wrap; }
.lg-kort { background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; display: flex; flex-direction: column; gap: 4px; cursor: pointer; }
.lg-kort:hover { box-shadow: 0 2px 10px rgba(15,23,42,.08); } .lg-kort.lav { border-color: #fca5a5; background: #fffafa; }
.lg-q b { font-size: 22px; font-variant-numeric: tabular-nums; } .lg-q span { color: var(--muted); }
.lg-salg { margin-bottom: 12px; }

/* ---------- Ansattkort, nødliste og prosjekthandlinger ---------- */
.ov-akt { gap: 6px; margin-top: 12px; }
.ak-h { display: flex; gap: 12px; align-items: center; margin-bottom: 12px; } .ak-h h2 { margin: 0; }
.ak-av { width: 46px; height: 46px; border-radius: 50%; background: #e0e7ff; color: #3730a3; display: grid; place-items: center; font-weight: 700; font-size: 16px; flex: none; }
.ak-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 12px; }
.ak-grid section { background: #f8fafc; border-radius: 10px; padding: 10px 12px; } .ak-grid h3 { margin: 0 0 6px; font-size: 13px; }
.ak-ice { background: #fef2f2 !important; } .ak-tlf { font-size: 18px; font-weight: 700; margin-top: 2px; }
.ak-nod { display: flex; flex-direction: column; gap: 2px; background: #fef2f2; border: 1.5px solid #fca5a5; border-radius: 10px; padding: 10px 12px; margin-bottom: 12px; }

/* ---------- Min dag ---------- */
.md2 { margin-bottom: 18px; }
.md2-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 10px; }
.md2-k { display: flex; gap: 10px; align-items: center; background: var(--panel, #fff); border: 1px solid var(--line); border-radius: 14px; padding: 12px 14px; color: inherit; text-decoration: none; min-width: 0; }
.md2-k:hover { box-shadow: 0 3px 12px rgba(15,23,42,.08); border-color: var(--c); }
.md2-i { width: 38px; height: 38px; border-radius: 11px; background: color-mix(in srgb, var(--c) 12%, white); color: var(--c); display: grid; place-items: center; flex: none; }
.md2-i .ik { width: 20px; height: 20px; }
.md2-t { display: flex; flex-direction: column; min-width: 0; flex: 1; } .md2-t span { font-size: 12px; color: var(--muted); }
.md2-t b { font-size: 20px; line-height: 1.2; } .md2-t small { font-size: 12px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.md2-b { flex: none; align-self: center; white-space: nowrap; font-size: 11.5px; font-weight: 600; color: var(--c); }

/* Varekatalog og strekkodeskanner (core/skann.js) */
.sk-vert { position: relative; display: flex; gap: 6px; align-items: center; flex: 1; min-width: 160px; }
.sk-vert > .input { flex: 1; min-width: 0; }
.sk-knapp { flex: none; padding: 6px 8px; } .sk-knapp .ik { width: 18px; height: 18px; margin: 0; }
.sk-treff { top: 100%; left: 0; right: 0; z-index: 30; max-height: 280px; overflow-y: auto; }
.sk-over { position: fixed; inset: 0; z-index: 2000; background: rgba(15, 23, 42, .72); display: flex; align-items: center; justify-content: center; padding: 16px; }
.sk-boks { background: var(--card, #fff); color: var(--ink); border-radius: 14px; width: min(440px, 100%); padding: 14px; display: grid; gap: 10px; }
.sk-topp { display: flex; justify-content: space-between; align-items: center; }
.sk-video { position: relative; border-radius: 10px; overflow: hidden; background: #000; aspect-ratio: 4 / 3; }
.sk-video video { width: 100%; height: 100%; object-fit: cover; display: block; }
.sk-sikte { position: absolute; left: 12%; right: 12%; top: 34%; bottom: 34%; border: 2px solid rgba(255, 255, 255, .85); border-radius: 8px; }
.sk-manuell { gap: 6px; } .sk-manuell .input { flex: 1; }
.sk-info { margin: 0; }

/* SHA-plan */
.sha-t th { white-space: nowrap; font-weight: 500; width: 1%; } .sha-t td .input { min-width: 110px; }
.sha-ris { display: grid; gap: 6px; }
.sha-r { border: 1px solid var(--line); border-radius: 10px; padding: 8px 10px; display: grid; gap: 6px; }