/* Vestdrift – stor tekst og store knapper, så det virker godt på telefonen. */
:root {
  /* Vestdrift: grøn, orange og lys */
  --bund: #F4F2EC;
  --flade: #ffffff;
  --tekst: #1c241f;
  --svag: #5d665f;
  --streg: #dcd8cc;
  --primaer: #1F3B2D;
  --primaer-lys: #e5ebe4;
  --accent: #D9732B;
  --accent-lys: #f8e6d8;
  --fare: #b42318;
  --ok: #2a7d4f;
  /* Status */
  --s-kladde: #8c8f88;
  --s-ny: #D9732B;
  --s-i_gang: #e0b100;
  --s-afvist: #b42318;
  --s-meldt_klar: #2a6fdb;
  --s-godkendt: #2a7d4f;
  --s-annulleret: #5f635e;
  --radius: 12px;
  --top: 60px;
  color-scheme: light;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-size: 18px;
  line-height: 1.45;
  color: var(--tekst);
  background: var(--bund);
}
h1, h2, h3 { line-height: 1.2; margin: 0 0 .5em; }
h1 { font-size: 1.6rem; }
h2 { font-size: 1.3rem; }
h3 { font-size: 1.1rem; }
a { color: var(--primaer); }
[hidden] { display: none !important; }

/* Top */
.top {
  position: sticky; top: 0; z-index: 1000;
  display: flex; align-items: center; gap: 8px;
  min-height: var(--top);
  padding: 6px 12px; padding-top: max(6px, env(safe-area-inset-top));
  background: var(--primaer); color: #fff;
}
.logo { font-weight: 800; letter-spacing: .5px; font-size: 1.35rem; color: inherit; text-decoration: none; margin: 0; }
.logo-stor { font-size: 2.4rem; color: var(--primaer); }
.top nav { margin-left: auto; display: flex; gap: 4px; flex-wrap: wrap; }
.top nav a, .top nav button {
  color: #fff; text-decoration: none; background: none; border: 0; font: inherit; font-size: 1rem;
  padding: 10px 12px; border-radius: 10px; min-height: 44px; cursor: pointer;
}
.top nav a.aktiv, .top nav a:hover, .top nav button:hover { background: rgba(255,255,255,.15); }
.top nav a.aktiv { box-shadow: inset 0 -3px 0 var(--accent); }
.menu-knap { display: none; }
@media (max-width: 1100px) {
  .menu-knap { display: inline-flex; margin-left: auto; }
  .top nav { display: none; position: absolute; top: 100%; left: 0; right: 0; background: var(--primaer); flex-direction: column; padding: 8px; }
  .top nav.aaben { display: flex; }
  /* Lang menu på en lille telefon: menuen kan rulles, så "Log ud" altid kan nås */
  .top nav { max-height: calc(100vh - 64px); max-height: calc(100dvh - 64px); overflow-y: auto; overscroll-behavior: contain; -webkit-overflow-scrolling: touch; }
  .top nav > * { flex-shrink: 0; }
  .top nav a, .top nav button { font-size: 1.15rem; text-align: left; padding: 14px; }
}

main#indhold { padding: 16px; max-width: 1100px; margin: 0 auto; padding-bottom: calc(40px + env(safe-area-inset-bottom)); }
main#indhold.fuld { padding: 0; max-width: none; }

/* Knapper */
.knap {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 52px; padding: 12px 20px;
  font: inherit; font-size: 1.05rem; font-weight: 600;
  border-radius: var(--radius); border: 2px solid var(--primaer);
  background: var(--flade); color: var(--primaer);
  cursor: pointer; text-decoration: none; touch-action: manipulation;
}
.knap:disabled { opacity: .5; cursor: default; }
.knap-primaer { background: var(--primaer); color: #fff; }
.knap-fare { border-color: var(--fare); color: var(--fare); }
.knap-lille { min-height: 44px; padding: 8px 14px; font-size: .95rem; }
.knap-fuld { width: 100%; }
.knap-ikon { background: none; border: 0; font-size: 1.5rem; min-width: 48px; min-height: 48px; cursor: pointer; color: inherit; }
.knapper { display: flex; flex-wrap: wrap; gap: 10px; margin: 12px 0; }

/* Formularer */
.formular { display: flex; flex-direction: column; gap: 14px; }
.felt { display: flex; flex-direction: column; gap: 6px; }
.felt label, .felt .label { font-weight: 600; font-size: 1rem; }
input, select, textarea {
  font: inherit; font-size: 1.05rem; /* mindst 16px, så iPhone ikke zoomer */
  padding: 12px; min-height: 52px; border-radius: 10px;
  border: 2px solid var(--streg); background: #fff; color: var(--tekst); width: 100%;
}
textarea { min-height: 110px; resize: vertical; }
input:focus, select:focus, textarea:focus { outline: 3px solid var(--accent-lys); border-color: var(--accent); }
input[type=checkbox] { width: 30px; height: 30px; min-height: 0; accent-color: var(--primaer); flex: none; }
input[type=color] { padding: 4px; width: 80px; }
.fejltekst { color: var(--fare); font-weight: 600; min-height: 1.2em; margin: 0; }
.hjaelp { color: var(--svag); font-size: .95rem; margin: 0; }

/* Kort (cards) */
.kort-liste { display: grid; gap: 12px; }
@media (min-width: 700px) { .kort-liste.to { grid-template-columns: 1fr 1fr; } }
.boks { background: var(--flade); border: 1px solid var(--streg); border-radius: var(--radius); padding: 16px; }
.boks + .boks { margin-top: 12px; }
.klikbar { display: block; color: inherit; text-decoration: none; cursor: pointer; }
.klikbar:hover { border-color: var(--primaer); }
.raekke { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.raekke .skub { margin-left: auto; }
.svag { color: var(--svag); }
.lille { font-size: .9rem; }
.overskrift { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 12px; }
.overskrift h1 { margin: 0; }
.sti { font-size: .95rem; color: var(--svag); margin-bottom: 6px; }
.sti a { color: var(--svag); }
.liste-raekke {
  display: flex; align-items: center; gap: 12px; padding: 14px 4px; min-height: 56px;
  border-top: 1px solid var(--streg); color: inherit; text-decoration: none;
}
.liste-raekke:first-child { border-top: 0; }
.liste-raekke:hover { background: var(--primaer-lys); }
.arkiveret { opacity: .55; }
.maerke { display: inline-block; padding: 2px 10px; border-radius: 999px; font-size: .85rem; font-weight: 600; background: var(--primaer-lys); color: var(--primaer); }
.farveprik { display: inline-block; width: 18px; height: 18px; border-radius: 50%; flex: none; border: 1px solid rgba(0,0,0,.2); }

/* Status */
.status { display: inline-block; padding: 3px 12px; border-radius: 999px; font-weight: 700; font-size: .9rem; color: #fff; }
.status-valg { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; }
@media (min-width: 500px) { .status-valg { grid-template-columns: repeat(4, 1fr); } }
.status-valg button { min-height: 52px; border-radius: 10px; border: 3px solid transparent; font: inherit; font-weight: 700; cursor: pointer; color: #fff; opacity: .45; }
.status-valg button.valgt { opacity: 1; border-color: #1c2321; }

/* Pin-mærke (på tegning og i lister) */
.pin {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 34px; height: 30px; padding: 0 8px; border-radius: 15px;
  border: 4px solid #333; font-weight: 800; font-size: 13px; color: #fff; white-space: nowrap;
  box-shadow: 0 1px 4px rgba(0,0,0,.45);
}
.pin-ikon { background: none; border: 0; }
.pin-ikon .pin { position: absolute; left: 0; top: 0; transform: translate(-50%, -50%); cursor: pointer; }
.pin-ikon.gammel .pin { opacity: .55; border-style: dashed; }
.pin-ikon.valgt .pin { outline: 4px solid #fff; box-shadow: 0 0 0 7px #1c2321; z-index: 10; }
.ny-pin-prik { width: 26px; height: 26px; border-radius: 50%; background: #1c2321; border: 4px solid #fff; transform: translate(-50%, -50%); position: absolute; left: 0; top: 0; box-shadow: 0 0 0 3px #1c2321; }

/* Etage med tegning */
.etage-side { display: flex; flex-direction: column; height: calc(100vh - var(--top) - var(--projektbar, 0px)); height: calc(100dvh - var(--top) - var(--projektbar, 0px)); }
.etage-bar { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; padding: 8px 10px; background: var(--flade); border-bottom: 1px solid var(--streg); }
.etage-bar select { width: auto; min-height: 46px; padding: 8px; font-size: 1rem; max-width: 46vw; }
.etage-bar .sti { margin: 0; flex-basis: 100%; }
.etage-krop { position: relative; flex: 1; display: flex; min-height: 0; }
@media (max-width: 600px) {
  .etage-bar { gap: 6px; padding: 6px 8px; }
  .etage-bar select { min-height: 42px; font-size: 16px; padding: 6px; max-width: 31vw; }
  .etage-bar .knap-lille { min-height: 42px; padding: 6px 10px; }
  .etage-bar .flueben { min-height: 42px; }
  .etage-bar input[type=checkbox] { width: 24px; height: 24px; }
}
#kort { flex: 1; background: #e9ece9; min-height: 0; }
.leaflet-container { font: inherit; background: #e9ece9; }
.kort-tip { position: absolute; left: 50%; bottom: calc(14px + env(safe-area-inset-bottom)); transform: translateX(-50%); z-index: 500; background: rgba(28,35,33,.85); color: #fff; padding: 8px 14px; border-radius: 999px; font-size: .95rem; pointer-events: none; white-space: nowrap; }
.tom-tegning { margin: auto; text-align: center; padding: 24px; }

/* Pin-panel: højre side på computer, ark fra bunden på mobil */
.pin-panel {
  width: 440px; max-width: 100%; overflow-y: auto; background: var(--flade);
  border-left: 1px solid var(--streg); padding: 16px; padding-bottom: calc(40px + env(safe-area-inset-bottom));
  -webkit-overflow-scrolling: touch;
}
@media (max-width: 800px) {
  .pin-panel {
    position: absolute; left: 0; right: 0; bottom: 0; width: auto; height: 78%; z-index: 900;
    border-left: 0; border-top: 1px solid var(--streg); border-radius: 18px 18px 0 0;
    box-shadow: 0 -6px 24px rgba(0,0,0,.25);
  }
  .pin-panel.stor { height: 100%; border-radius: 0; }
}
.panel-top { display: flex; align-items: center; gap: 10px; position: sticky; top: -16px; background: var(--flade); padding: 6px 0 10px; z-index: 2; }
.panel-top .knap-ikon { margin-left: auto; }
.sektion { margin-top: 22px; }
.sektion > h3 { border-bottom: 2px solid var(--streg); padding-bottom: 6px; }

/* Kontrolpunkter */
.kontrol { display: flex; align-items: center; gap: 12px; padding: 10px 0; border-top: 1px solid var(--streg); }
.kontrol label { flex: 1; display: flex; gap: 12px; align-items: center; cursor: pointer; min-height: 44px; }
.kontrol .tid { font-size: .85rem; color: var(--svag); display: block; }
.kontrol .knap { min-height: 44px; padding: 6px 12px; }
.kontrol img { width: 48px; height: 48px; object-fit: cover; border-radius: 6px; }

/* Fotos */
.fotos { display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 10px; }
.foto { margin: 0; }
.foto img { width: 100%; aspect-ratio: 4/3; object-fit: cover; border-radius: 8px; display: block; background: #eee; cursor: zoom-in; }
.foto figcaption { font-size: .85rem; color: var(--svag); }
.kamera-knap { position: relative; overflow: hidden; }
.kamera-knap input { position: absolute; inset: 0; opacity: 0; cursor: pointer; min-height: 0; }
.fremskridt { height: 10px; background: var(--streg); border-radius: 5px; overflow: hidden; }
.fremskridt > div { height: 100%; width: 0; background: var(--primaer); transition: width .2s; }

/* Historik */
.historik { list-style: none; padding: 0; margin: 0; font-size: .95rem; }
.historik li { padding: 8px 0; border-top: 1px solid var(--streg); }
.historik .hvem { color: var(--svag); font-size: .85rem; }

/* Ark (dialog) */
.ark-baggrund { position: fixed; inset: 0; background: rgba(0,0,0,.45); z-index: 2000; display: flex; align-items: flex-end; justify-content: center; }
.ark {
  background: var(--flade); width: 100%; max-width: 560px; max-height: 92vh; overflow-y: auto;
  border-radius: 18px 18px 0 0; padding: 12px 18px calc(24px + env(safe-area-inset-bottom));
}
.ark-bred { max-width: 820px; }
@media (min-width: 700px) {
  .ark-baggrund { align-items: center; }
  .ark { border-radius: 18px; }
}
.ark-top { display: flex; align-items: center; gap: 8px; position: sticky; top: -12px; background: var(--flade); padding: 4px 0; }
.ark-top h2 { margin: 0; flex: 1; }
.emne-valg { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.emne-valg button { min-height: 64px; border-radius: 12px; border: 3px solid var(--streg); background: #fff; font: inherit; font-weight: 700; cursor: pointer; display: flex; align-items: center; gap: 10px; padding: 8px 12px; text-align: left; }
.emne-valg button.valgt { border-color: var(--primaer); background: var(--primaer-lys); }
.storbillede { max-width: 100%; max-height: 80vh; display: block; margin: 0 auto; }

/* Toast */
.toast { position: fixed; left: 50%; bottom: calc(20px + env(safe-area-inset-bottom)); transform: translate(-50%, 30px); opacity: 0; transition: all .25s; z-index: 3000; background: #1c2321; color: #fff; padding: 14px 20px; border-radius: 12px; font-weight: 600; max-width: 90vw; }
.toast.vis { opacity: 1; transform: translate(-50%, 0); }
.toast-fejl { background: var(--fare); }

/* Tabeller */
.tabel { width: 100%; border-collapse: collapse; font-size: 1rem; }
.tabel th, .tabel td { text-align: left; padding: 10px 8px; border-bottom: 1px solid var(--streg); vertical-align: top; }
.tabel th { font-size: .9rem; color: var(--svag); }

/* Drift */
.maaler { height: 26px; background: var(--streg); border-radius: 13px; overflow: hidden; margin: 8px 0; }
.maaler > div { height: 100%; background: var(--ok); }
.maaler.roed > div { background: var(--fare); }
.tal-stor { font-size: 2rem; font-weight: 800; }
.roed-tekst { color: var(--fare); font-weight: 700; }

/* Emne-redigering */
.felt-raekke { display: grid; gap: 8px; padding: 12px; border: 1px solid var(--streg); border-radius: 10px; margin-bottom: 10px; background: #fafbfa; }
@media (min-width: 700px) { .felt-raekke { grid-template-columns: 2fr 1fr auto; align-items: end; } .felt-raekke .valg-felt { grid-column: 1 / -1; } }
.flueben { display: flex; align-items: center; gap: 10px; font-weight: 600; min-height: 48px; }

/* Login */
.login-side { display: flex; min-height: 100vh; min-height: 100dvh; align-items: center; justify-content: center; padding: 16px; }
.login-boks { width: 100%; max-width: 420px; background: var(--flade); padding: 28px 22px; border-radius: 18px; border: 1px solid var(--streg); }
.undertekst { color: var(--svag); margin-top: 0; }

.qr { display: block; margin: 10px 0; image-rendering: pixelated; width: 220px; height: 220px; }
.kode-tekst { font-family: ui-monospace, Menlo, Consolas, monospace; word-break: break-all; background: var(--primaer-lys); padding: 8px; border-radius: 8px; }

/* Brandtætning */
.gennemfoering-id { font-weight: 800; font-size: 1.15rem; letter-spacing: .5px; }
.foto-gruppe { margin-bottom: 14px; }
.foto-gruppe h4 { margin: 8px 0 4px; font-size: 1rem; }
.maaling-ny { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 8px; }
.maaling-ny .knap { grid-column: 1 / -1; }
.tabel-rul { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.etage-valg { display: flex; flex-wrap: wrap; gap: 6px 16px; margin: 8px 0; }
.logo-forhaand { max-width: 240px; max-height: 90px; display: block; margin: 8px 0; }

/* Login og kundeportal */
.login-titel { font-size: 1.5rem; margin: 6px 0 2px; }
.login-logo { max-width: 220px; max-height: 80px; display: block; margin-bottom: 8px; }
.kun-laes { background: var(--primaer-lys); color: var(--primaer); padding: 8px 12px; border-radius: 10px; font-size: .95rem; }
.felt-visning { padding: 10px 0; border-top: 1px solid var(--streg); }
.felt-visning .label { color: var(--svag); font-size: .9rem; display: block; }
.link-boks { word-break: break-all; }
.maaler.gul > div { background: var(--s-i_gang); }
.gul-tekst { color: #8a5a00; font-weight: 700; }
.reservekoder { font-size: 1.2rem; line-height: 1.6; }
@media print { .top, .knapper, .undertekst { display: none !important; } }
.vokser { flex: 1; min-width: 0; }

/* Upload-kø */
.koe-banner { position: fixed; left: 8px; right: 8px; bottom: calc(8px + env(safe-area-inset-bottom)); z-index: 1900;
  background: #8a5a00; color: #fff; border-radius: 12px; padding: 8px 12px; display: flex; gap: 10px; align-items: center; flex-wrap: wrap;
  font-weight: 700; box-shadow: 0 4px 16px rgba(0,0,0,.3); }
.koe-banner .knap { min-height: 40px; }
.fortsaet { display: block; font-size: 1.15rem; margin-bottom: 14px; }
.foto-forhaand { width: 96px; height: 96px; object-fit: cover; border-radius: 10px; }
.knap-stor { min-height: 64px; font-size: 1.15rem; }
.type-valg { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.type-valg button { min-height: 56px; border-radius: 10px; border: 3px solid var(--streg); background: #fff; font: inherit; font-weight: 700; cursor: pointer; }
.type-valg button.valgt { border-color: var(--primaer); background: var(--primaer-lys); }
.udkald-aktiv { border: 3px solid var(--s-i_gang); }
.ark-knapper { position: sticky; bottom: calc(-24px - env(safe-area-inset-bottom)); background: var(--flade); padding: 10px 0 calc(10px + env(safe-area-inset-bottom)); margin: 0; box-shadow: 0 -6px 12px rgba(255,255,255,.9); }

/* Status: farver pr. status (badge, knap og pin) */
.status-kladde, .pin.s-kladde, .status-valg button[data-s=kladde] { background: var(--s-kladde); color: #fff; }
.status-ny, .pin.s-ny, .status-valg button[data-s=ny] { background: var(--s-ny); color: #fff; }
.status-i_gang, .pin.s-i_gang, .status-valg button[data-s=i_gang] { background: var(--s-i_gang); color: #1c241f; }
.status-afvist, .pin.s-afvist, .status-valg button[data-s=afvist] { background: var(--s-afvist); color: #fff; }
.status-meldt_klar, .pin.s-meldt_klar, .status-valg button[data-s=meldt_klar] { background: var(--s-meldt_klar); color: #fff; }
.status-godkendt, .pin.s-godkendt, .status-valg button[data-s=godkendt] { background: var(--s-godkendt); color: #fff; }
.status-annulleret, .pin.s-annulleret, .status-valg button[data-s=annulleret] { background: var(--s-annulleret); color: #fff; }
.prio { display: inline-block; padding: 1px 8px; border-radius: 6px; font-size: .8rem; font-weight: 800; }
.prio-hoej { background: var(--accent-lys); color: #8a3d0c; }
.prio-akut { background: var(--fare); color: #fff; }
.for-sen { color: var(--fare); font-weight: 800; }

/* Klokke med beskeder */
.top nav { order: 1; }
.top .klokke { order: 2; position: relative; color: #fff; }
.top .menu-knap { order: 3; }
@media (max-width: 1100px) {
  .top .klokke { margin-left: auto; }
  .top .klokke ~ .menu-knap { margin-left: 0; }
}
.klokke-tal { position: absolute; top: 2px; right: 0; min-width: 22px; height: 22px; padding: 0 5px; border-radius: 11px;
  background: var(--accent); color: #fff; font-size: .8rem; font-weight: 800; line-height: 22px; text-align: center; }
.beskeder { display: flex; flex-direction: column; gap: 4px; margin-top: 8px; }
.besked-raekke { display: flex; gap: 12px; align-items: flex-start; padding: 12px; border-radius: 10px; text-decoration: none; color: var(--tekst); border: 1px solid var(--streg); }
.besked-raekke.ulaest { background: var(--accent-lys); border-color: var(--accent); font-weight: 700; }
.besked-ikon { font-size: 1.3rem; width: 28px; text-align: center; }
.blok { display: block; font-weight: 400; }

/* Opgaver */
.opgave-kort { border-bottom: 1px solid var(--streg); }
.opgave-kort:last-child { border-bottom: 0; }
.opgave-kort .knapper { margin: 0 0 12px; }
.maerker { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin-top: 4px; }
.maerker .status { font-size: .8rem; padding: 1px 10px; }
.filtre { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-bottom: 8px; }
.filtre select, .filtre input[type=search], .knapper select { min-height: 44px; font: inherit; font-size: 1rem; border-radius: 10px; border: 2px solid var(--streg); padding: 6px 10px; background: #fff; max-width: 100%; }
.filtre input[type=search] { flex: 1 1 200px; }
.opgave-tabel tr.lukket td { color: var(--svag); }
.opgave-tabel td .status { font-size: .8rem; padding: 1px 10px; }
.soejler { display: flex; flex-direction: column; gap: 6px; }
.soejle { display: grid; grid-template-columns: minmax(90px, 30%) 1fr 44px; gap: 8px; align-items: center; }
.soejle-navn { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.soejle-bar { background: var(--primaer-lys); border-radius: 6px; height: 22px; overflow: hidden; }
.soejle-bar > span { display: block; height: 100%; background: var(--primaer); border-radius: 6px; print-color-adjust: exact; -webkit-print-color-adjust: exact; }
.soejle-tal { font-weight: 800; text-align: right; }
.kun-print { display: none; }
@media print {
  .ikke-print { display: none !important; }
  .kun-print { display: block; }
  body { background: #fff; }
  .boks { box-shadow: none; border: 1px solid #ccc; break-inside: avoid; }
}

/* Statusforløb i pin-panelet */
.status-nu { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.status-nu .status { font-size: 1rem; padding: 4px 14px; }
.afvisning { border-left: 5px solid var(--fare); background: #fdecea; padding: 10px 12px; border-radius: 8px; margin: 8px 0; }
.godkend-knapper .knap { flex: 1 1 140px; }

/* Tjekliste: OK / Ikke OK / Ikke relevant */
.tjek-valg { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; margin: 6px 0; }
.tjek-valg button { min-height: 48px; border-radius: 10px; border: 2px solid var(--streg); background: #fff; font: inherit; font-weight: 700; cursor: pointer; color: var(--tekst); }
.tjek-valg button.valgt[data-r=ok] { background: var(--ok); border-color: var(--ok); color: #fff; }
.tjek-valg button.valgt[data-r=ikke_ok] { background: var(--fare); border-color: var(--fare); color: #fff; }
.tjek-valg button.valgt[data-r=ikke_relevant] { background: var(--svag); border-color: var(--svag); color: #fff; }
.tjek-punkt { padding: 10px 0; border-bottom: 1px solid var(--streg); }
.tjek-punkt:last-child { border-bottom: 0; }

/* Kommentarer */
.kommentarer { display: flex; flex-direction: column; gap: 8px; margin-bottom: 10px; }
.kommentar { background: var(--bund); border-radius: 10px; padding: 10px 12px; }
.kommentar.intern { background: var(--accent-lys); }
.kommentar .hvem { font-size: .85rem; color: var(--svag); margin-top: 4px; }
.to-felter { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.status-boks { display: flex; flex-direction: column; gap: 10px; }
.status-boks .status-valg button { opacity: 1; }
.filtre select, .knapper select { width: auto; flex: 1 1 170px; }
@media (max-width: 500px) { .filtre select, .knapper select { flex-basis: 100%; } }

/* Fejlmelding for beboere */
.offentlig { max-width: 640px; }
.akut { background: #fdecea; border-left: 5px solid var(--fare); padding: 12px 14px; border-radius: 10px; font-weight: 700; font-size: 1.1rem; }
.akut a { color: var(--fare); white-space: nowrap; }
.faelde { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.foto-valgt { display: inline-flex; flex-direction: column; gap: 6px; align-items: center; }
.sagsnr { font-size: 1.3rem; }
.link-tekst { word-break: break-all; font-size: .9rem; color: var(--svag); }
.trin { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; counter-reset: trin; }
.trin li { text-align: center; padding: 14px 6px; border-radius: 10px; background: var(--bund); font-weight: 700; color: var(--svag); }
.trin li.naaet { background: var(--primaer); color: #fff; }
.status-stor { font-size: 1.3rem; font-weight: 800; }
.svar { background: var(--primaer-lys); border-radius: 10px; padding: 12px; }
.fm-boks { border-left: 5px solid var(--accent); background: var(--accent-lys); border-radius: 10px; padding: 10px 12px; }
.punkt-vaelger { position: relative; display: inline-block; max-width: 100%; cursor: crosshair; }
.punkt-vaelger img { display: block; max-width: 100%; height: auto; }
.punkt-vaelger .prik { position: absolute; width: 22px; height: 22px; margin: -11px 0 0 -11px; border-radius: 50%; background: var(--accent); border: 3px solid #fff; box-shadow: 0 0 0 2px #1c241f; pointer-events: none; }
.pin-alene { position: static; }

/* Kalender */
.kal-punkt { display: inline-block; border: 0; border-radius: 8px; padding: 4px 8px; margin: 2px 0; font: inherit; font-size: .85rem; text-align: left; cursor: pointer; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: #1c241f; }
.kal-groen { background: #d6eadb; border-left: 5px solid var(--ok); }
.kal-gul { background: #fbf0c6; border-left: 5px solid var(--s-i_gang); }
.kal-roed { background: #fbdcd7; border-left: 5px solid var(--fare); }
.kal-forklaring { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.kal-forklaring .kal-punkt { cursor: default; }
.kal-farve { font-weight: 700; padding: 2px 8px; border-radius: 6px; }
.kal-nav { align-items: center; gap: 12px; }
.kal-nav h2 { margin: 0; min-width: 180px; text-align: center; }
.kal-maaned { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 4px; }
.kal-ugedag { text-align: center; font-weight: 700; color: var(--svag); font-size: .85rem; }
.kal-dag { background: var(--flade); border: 1px solid var(--streg); border-radius: 8px; min-height: 96px; padding: 4px; display: flex; flex-direction: column; min-width: 0; }
.kal-dag .kal-punkt { width: 100%; }
.kal-udenfor { opacity: .5; }
.kal-idag { outline: 3px solid var(--accent); }
.kal-nr { font-weight: 800; font-size: .9rem; }
.kal-over { background: var(--accent-lys); }
.kal-uge-dag { display: grid; grid-template-columns: 130px 1fr; gap: 8px; padding: 8px 4px; border-bottom: 1px solid var(--streg); border-radius: 6px; }
.kal-uge-dag:last-child { border-bottom: 0; }
.kal-uge-dato { font-weight: 700; }
.kal-uge-punkter { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; min-width: 0; }
@media (max-width: 700px) {
  .kal-maaned { gap: 2px; }
  .kal-dag { min-height: 64px; padding: 2px; }
  .kal-dag .kal-punkt { font-size: 0; padding: 0; height: 10px; border-left-width: 0; }
  .kal-uge-dag { grid-template-columns: 1fr; }
}

/* "Mere" i menuen (driftslederens sider, indstillinger og log ud) */
.top nav .mere { position: relative; }
.top nav .mere summary { list-style: none; color: #fff; font-size: 1rem; padding: 10px 12px; border-radius: 10px; min-height: 44px; cursor: pointer; display: flex; align-items: center; }
.top nav .mere summary::-webkit-details-marker { display: none; }
.top nav .mere summary::after { content: ' ▾'; white-space: pre; }
.top nav .mere summary:hover { background: rgba(255,255,255,.15); }
.top nav .mere-liste { display: flex; flex-direction: column; gap: 2px; }
@media (min-width: 1101px) {
  .top nav .mere-liste { position: absolute; right: 0; top: 100%; background: var(--primaer); padding: 8px; border-radius: 0 0 12px 12px; min-width: 200px; box-shadow: 0 8px 20px rgba(0,0,0,.25); }
}
@media (max-width: 1100px) {
  .top nav .mere summary { font-size: 1.15rem; padding: 14px; }
  .top nav .mere-liste { padding-left: 12px; }
}

/* Privatlivspolitik og anden markdown */
.privatliv { max-width: 860px; }
.md-tabel th { background: var(--primaer-lys); }
.md-tabel td, .md-tabel th { vertical-align: top; }
@media (max-width: 640px) {
  .md-tabel thead { display: none; }
  .md-tabel tr { display: block; border-bottom: 2px solid var(--streg); padding: 6px 0; }
  .md-tabel td { display: block; border: 0; padding: 3px 0; }
  .md-tabel td::before { content: attr(data-label) ": "; font-weight: 700; }
}
.md-forhaand { max-height: 50vh; overflow: auto; } .kode-felt { font-family: ui-monospace, Menlo, monospace; font-size: 16px; }

/* Demo-data */
.demo-banner { background: repeating-linear-gradient(45deg, #D9732B 0 14px, #c4621f 14px 28px); color: #fff; font-weight: 800; letter-spacing: .5px;
  text-align: center; padding: 8px 12px; border-radius: 10px; margin: 0 0 12px; print-color-adjust: exact; -webkit-print-color-adjust: exact; }

/* Hjælp */
.hjaelp-bred { max-width: 900px; }
.hjaelp-side h1 { margin-top: 0; }
.hjaelp-intro { font-size: 1.1rem; }
.hjaelp-punkter { padding-left: 1.4em; display: flex; flex-direction: column; gap: 10px; }
.hjaelp-punkter li { line-height: 1.45; }
.hjaelp-punkter.tjekliste { list-style: none; padding-left: 0; }
.hjaelp-punkter .afkryds { font-size: 1.3rem; margin-right: 8px; }
.hjaelp-billeder { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 12px; }
.hjaelp-billeder figure { margin: 0; flex: 0 1 auto; max-width: 100%; }
.hjaelp-billeder img { display: block; width: auto; max-width: 100%; max-height: 420px; object-fit: contain; object-position: left top; border: 1px solid var(--streg); border-radius: 10px; background: #fff; }
.hjaelp-billeder figcaption { font-size: .85rem; color: var(--svag); }
@media print {
  @page { size: A4; margin: 14mm; }
  .hjaelp-print .top { display: flex !important; background: none; color: var(--primaer); min-height: 0; padding: 0 0 4mm; position: static; border-bottom: 2px solid var(--primaer); }
  .hjaelp-print main#indhold { padding: 0; max-width: none; }
  .hjaelp-side { font-size: 10.5pt; }
  .hjaelp-side h1 { font-size: 18pt; margin: 4mm 0 2mm; }
  .hjaelp-intro { font-size: 11pt; }
  .hjaelp-punkter { gap: 2.5mm; }
  .hjaelp-billeder { break-inside: avoid; }
  .hjaelp-billeder img { max-height: 70mm; }
}

/* --- Projekter (fase 7) --- */
.projekt-bar { display: flex; align-items: center; gap: 10px; padding: 8px 16px; background: var(--primaer-lys); border-bottom: 1px solid var(--streg); }
.projekt-bar[hidden] { display: none; }
.projekt-label { font-weight: 600; color: var(--primaer); }
.projekt-bar select { flex: 1; max-width: 560px; min-height: 44px; font-size: 1rem; }
.projekt-top { display: flex; gap: 16px; flex-wrap: wrap; align-items: flex-start; margin-bottom: 12px; }
.projekt-billede { width: 100%; max-width: 320px; aspect-ratio: 4 / 3; object-fit: cover; border-radius: var(--radius); border: 1px solid var(--streg); }
.projekt-mini { width: 64px; height: 48px; object-fit: cover; border-radius: 8px; margin-right: 10px; }
.maerke.projekt-afsluttet { background: #e8e8e8; color: #444; }
.maerke.projekt-arkiveret { background: #f3e1e1; color: #7a2222; }
.tegningstrae details { border-top: 1px solid var(--streg); padding: 8px 0; }
.tegningstrae summary, .boks > details > summary { cursor: pointer; min-height: 44px; display: flex; align-items: center; gap: 6px; }
.lille-boks { padding: 10px 12px; margin-bottom: 8px; }
.to-felter { display: grid; gap: 12px; }
@media (min-width: 560px) { .to-felter { grid-template-columns: 1fr 1fr; } }
a.status { text-decoration: none; }
.firma { border-top: 1px solid var(--streg); padding: 10px 0; }
.medlem-raekke { flex-wrap: wrap; }
.medlem-raekke .vokser { min-width: 200px; }
.matrix th[scope=row] { text-align: left; font-weight: 500; }
.matrix td, .matrix thead th { text-align: center; font-size: 1.05rem; }
.matrix td.ja { color: var(--ok); font-weight: 700; }
.matrix td.nej { color: var(--svag); }
.matrix .min-rolle { background: var(--accent-lys); }
.kundegodkendt { color: var(--ok); font-weight: 600; }
fieldset.formular { border: 0; padding: 0; margin: 0; min-width: 0; }
.pin-info { font-size: .95rem; background: var(--bund); border-radius: 8px; padding: 8px 10px; margin: 6px 0 10px; }
.produkt-valg { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; border-bottom: 1px solid var(--streg); padding: 6px 0; }
.produkt-valg .flueben { flex: 1 1 220px; }
.produkt-valg .maengde { width: 110px; }
.praefiks { width: 90px; text-transform: uppercase; }
.diagram-boks { margin: 0; }
.diagram { width: 100%; height: auto; display: block; }
.forklaring { display: flex; flex-wrap: wrap; gap: 6px 14px; font-size: .9rem; color: var(--svag); margin-top: 6px; }
.forklaring .prik { display: inline-block; width: 12px; height: 12px; border-radius: 3px; margin-right: 5px; vertical-align: -1px; }
.dashboard h3 { font-size: 1rem; margin: 12px 0 4px; }
.mapper { display: flex; flex-wrap: wrap; gap: 6px; margin: 4px 0 12px; }
.mapper a { padding: 8px 14px; border-radius: 999px; border: 1px solid var(--streg); background: var(--flade); text-decoration: none; color: var(--tekst); min-height: 44px; display: inline-flex; align-items: center; gap: 6px; }
.mapper a.aktiv { background: var(--primaer); color: #fff; border-color: var(--primaer); }
.mapper .antal { font-weight: 700; }
.qr-lille { width: 180px; max-width: 100%; height: auto; image-rendering: pixelated; display: block; }
.koe-banner.koe-konflikt { box-shadow: 0 0 0 3px var(--accent); }
.konflikt p { margin: 6px 0; }
/* "⋯ Mere"-menu */
.mere-menu { position: relative; display: inline-block; }
.mere-menu > summary { list-style: none; cursor: pointer; min-width: 44px; justify-content: center; }
.mere-menu > summary::-webkit-details-marker { display: none; }
.mere-punkter { position: absolute; right: 0; top: calc(100% + 4px); z-index: 1500; background: var(--flade); border: 1px solid var(--streg);
  border-radius: 12px; box-shadow: 0 8px 24px rgba(0,0,0,.15); padding: 6px; min-width: 220px; display: flex; flex-direction: column; }
.mere-punkt { display: block; text-align: left; background: none; border: 0; padding: 12px 14px; border-radius: 8px; font-size: 1rem; color: var(--tekst); text-decoration: none; cursor: pointer; min-height: 44px; }
.mere-punkt:hover, .mere-punkt:focus-visible { background: var(--primaer-lys); }
.mere-punkt.fare { color: var(--fare); }
/* Projektets faner */
.projekt-faner { display: flex; gap: 4px; border-bottom: 2px solid var(--streg); margin: 8px 0 16px; overflow-x: auto; }
.projekt-faner a { padding: 10px 14px; text-decoration: none; color: var(--svag); font-weight: 600; white-space: nowrap; border-bottom: 3px solid transparent; margin-bottom: -2px; }
.projekt-faner a.aktiv { color: var(--primaer); border-bottom-color: var(--accent); }
/* Lokationer */
.lok-ejendom { margin-bottom: 20px; }
.lok-bygning { border: 1px solid var(--streg); border-radius: 12px; margin: 8px 0; background: var(--flade); }
.lok-top { display: flex; align-items: center; gap: 8px; padding: 4px 8px 4px 0; }
.lok-fold { flex: 1; min-width: 0; display: flex; align-items: center; gap: 8px; background: none; border: 0; padding: 12px; font-size: 1.05rem; text-align: left; cursor: pointer; min-height: 52px; color: inherit; }
.lok-pil { color: var(--svag); width: 1em; }
.lok-etage { display: flex; align-items: center; gap: 8px; padding: 8px 12px; border-top: 1px solid var(--streg); min-height: 52px; }
.lok-etage > a { flex: 1; min-width: 0; text-decoration: none; color: inherit; }
.lok-tal { color: var(--svag); font-size: .9rem; }
.lok-tal .aabne { color: var(--accent); font-weight: 700; }
.forkort { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.arkiveret-raekke { opacity: .55; }
/* Indsæt plan */
.slip-zone { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 24px 16px; border: 2px dashed var(--streg);
  border-radius: 14px; text-align: center; cursor: pointer; background: var(--bund); }
.slip-zone.over { border-color: var(--accent); background: var(--accent-lys); }
.slip-zone input[type=file] { max-width: 100%; }
.plan-sider { display: flex; flex-direction: column; gap: 10px; margin: 12px 0; }
.plan-side { border: 1px solid var(--streg); border-radius: 12px; padding: 10px; display: flex; gap: 12px; flex-wrap: wrap; align-items: flex-start; }
.plan-side.valgt { border-color: var(--primaer); background: var(--primaer-lys); }
.plan-mini { display: flex; flex-direction: column; align-items: center; gap: 4px; cursor: pointer; }
.plan-mini input { width: 24px; height: 24px; }
.plan-mini-billede { width: 120px; height: auto; max-height: 160px; object-fit: contain; border: 1px solid var(--streg); background: #fff; }
.plan-felter { flex: 1; min-width: 220px; display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.plan-felter .plan-felt:first-child { grid-column: 1 / -1; }
.plan-felt { display: flex; flex-direction: column; gap: 2px; }
.plan-felt input { width: 100%; }
/* Nåle på planen: skilt med nummer og en spids, der peger præcis på punktet (ikonets anker er spidsen) */
.naal-ikon { background: none; border: 0; }
.naal { position: relative; width: 64px; height: 62px; }
.naal-ikon .naal .pin { position: absolute; left: 50%; top: 4px; transform: translateX(-50%); white-space: nowrap; min-width: 44px; min-height: 40px;
  display: flex; align-items: center; justify-content: center; }
.naal-spids { position: absolute; left: 50%; bottom: 0; transform: translateX(-50%); width: 0; height: 0;
  border-left: 7px solid transparent; border-right: 7px solid transparent; border-top: 18px solid #1c2321; }
.naal-ikon.gammel .pin { opacity: .55; border-style: dashed; }
.naal-ikon.valgt .pin { outline: 4px solid #fff; box-shadow: 0 0 0 7px #1c2321; }
.naal-ikon.flytter .pin { outline: 3px dashed var(--accent); }
.naal-ikon.foreloebig .ny-naal { background: var(--accent); color: #fff; border-color: #fff; font-size: 1.4rem; font-weight: 800; }
.naal-ikon.foreloebig .naal-spids { border-top-color: var(--accent); }
#kort { touch-action: none; }
.naal-bjaelke { position: fixed; left: 8px; right: 8px; bottom: calc(8px + env(safe-area-inset-bottom)); z-index: 1000;
  display: flex; gap: 8px; align-items: center; flex-wrap: wrap; background: var(--flade); border-radius: 14px; padding: 10px 12px;
  box-shadow: 0 6px 20px rgba(0,0,0,.25); }
.naal-bjaelke .knap { min-height: 48px; }
.naal-bjaelke-tekst { flex: 1 1 100%; font-weight: 600; }
@media (min-width: 600px) { .naal-bjaelke-tekst { flex: 1 1 auto; } .naal-bjaelke { left: 50%; right: auto; transform: translateX(-50%); max-width: 640px; } }
.plan-version { white-space: nowrap; }
.plan-navn { max-width: 40vw; }
.skarp-lag { image-rendering: auto; }
/* Fast topbjælke på undersider (Tilbage – titel – én primær knap – ⋯ Mere) */
.side-top { position: sticky; top: var(--top, 0); z-index: 800; display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 12px; align-items: center;
  background: var(--bund); padding: 10px 0 12px; margin: -4px 0 12px; border-bottom: 1px solid var(--streg); }
.side-top.uden-tilbage { grid-template-columns: minmax(0, 1fr) auto; }
.side-top.med-primaer { grid-template-columns: auto minmax(0, 1fr) auto auto; }
.side-top.med-primaer.uden-tilbage { grid-template-columns: minmax(0, 1fr) auto auto; }
.side-primaer { display: flex; }
.side-primaer .knap { white-space: nowrap; min-height: 48px; }
.side-top h1 { margin: 0; font-size: 1.6rem; line-height: 1.2; }
.side-top .tilbage { display: inline-flex; align-items: center; min-height: 48px; padding: 0 14px 0 10px; border-radius: 12px; border: 2px solid var(--primaer);
  color: var(--primaer); font-weight: 700; text-decoration: none; white-space: nowrap; background: var(--flade); }
.side-top .tilbage:hover { background: var(--primaer-lys); }
.side-titel { min-width: 0; }
.krummer { display: flex; flex-wrap: nowrap; gap: 0; min-width: 0; color: var(--svag); font-size: .95rem; margin-top: 2px; overflow: hidden; }
.krummer a { color: var(--svag); }
.krummer > * { flex-shrink: 1; min-width: 0; }
.krumme-skille { flex-shrink: 0; white-space: pre; }
.side-handlinger { display: flex; gap: 8px; align-items: center; justify-content: flex-end; }
.side-handlinger .knap { white-space: nowrap; }
.side-handlinger .mere-knap { min-height: 48px; }
@media (max-width: 700px) {
  .side-top { gap: 8px; padding: 8px 0 10px; }
  .side-top h1 { font-size: 1.3rem; }
  .side-top .krummer { display: none; } /* telefon: kun Tilbage og titel */
  .side-top .tilbage { padding: 0 12px 0 8px; }
  .side-top .mere-tekst { display: none; }
  /* Telefon: den primære knap får sin egen linje under titlen */
  .side-top.med-primaer { grid-template-columns: auto minmax(0, 1fr) auto; }
  .side-top.med-primaer.uden-tilbage { grid-template-columns: minmax(0, 1fr) auto; }
  .side-top.med-primaer .side-primaer { grid-column: 1 / -1; grid-row: 2; }
  .side-top.med-primaer .side-primaer .knap { width: 100%; justify-content: center; }
}
.lok-ejendom h2 { margin-top: 12px; }
.side-top + .projekt-faner { margin-top: 0; }
/* Etage: topbjælke og filtre */
.etage-bar .side-top { flex-basis: 100%; position: static; margin: 0; padding: 0 0 6px; border: 0; background: none; }
.etage-filtre { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; width: 100%; }
.etage-filtre .plan-navn { font-size: 1rem; }

/* Projektets menu (fase 9): faner på mellemstore skærme, fast i venstre side på en stor skærm, bundmenu på telefonen */
.projekt-faner a { display: inline-flex; align-items: center; gap: 8px; min-height: 48px; }
.projekt-faner .fane-ikon { font-size: 1.2rem; line-height: 1; }
.roedt-tal { display: inline-flex; align-items: center; justify-content: center; min-width: 24px; height: 24px; padding: 0 7px; border-radius: 999px;
  background: var(--fare); color: #fff; font-size: .85rem; font-weight: 800; line-height: 1; }
.roedt-tal[hidden] { display: none; }
@media (min-width: 1200px) {
  .projekt-faner { position: fixed; left: 0; top: calc(var(--top) + var(--projektbar, 0px)); bottom: 0; width: 180px; z-index: 700;
    flex-direction: column; gap: 2px; margin: 0; padding: 14px 8px; border-bottom: 0; border-right: 1px solid var(--streg); background: var(--flade); overflow: visible; }
  .projekt-faner a { border-bottom: 0; margin: 0; border-radius: 10px; padding: 10px 12px; border-left: 4px solid transparent; }
  .projekt-faner a.aktiv { background: var(--primaer-lys); border-left-color: var(--accent); }
  .projekt-faner .roedt-tal { margin-left: auto; }
  main#indhold:has(> .projekt-faner) { margin-left: 190px; margin-right: auto; }
}
@media (max-width: 699px) {
  .projekt-faner { position: fixed; left: 0; right: 0; bottom: 0; z-index: 900; margin: 0; padding: 0 0 env(safe-area-inset-bottom);
    display: grid; grid-template-columns: repeat(3, 1fr); gap: 0; background: var(--flade); border-bottom: 0; border-top: 1px solid var(--streg);
    box-shadow: 0 -4px 14px rgba(0,0,0,.06); overflow: visible; }
  .projekt-faner a { flex-direction: column; justify-content: center; gap: 2px; min-height: 62px; padding: 6px 4px; font-size: .9rem;
    border-bottom: 0; border-top: 3px solid transparent; margin: 0; position: relative; }
  .projekt-faner a.aktiv { border-top-color: var(--accent); }
  .projekt-faner .roedt-tal { position: absolute; top: 4px; left: calc(50% + 8px); }
  main#indhold:has(> .projekt-faner) { padding-bottom: calc(96px + env(safe-area-inset-bottom)); }
}

/* Opgaver med Indbakke */
.status-prik { display: inline-block; width: 12px; height: 12px; border-radius: 50%; flex: none; margin-right: 8px; vertical-align: middle;
  print-color-adjust: exact; -webkit-print-color-adjust: exact; }
.status-prik.roed { background: var(--fare); }
.status-prik.orange { background: var(--accent); }
.status-prik.groen { background: var(--ok); }
.status-prik.graa { background: #9a9d96; }
.opgaveliste { display: grid; grid-template-columns: 230px minmax(0, 1fr); gap: 20px; align-items: start; }
.ol-venstre { position: sticky; top: calc(var(--top) + var(--projektbar, 0px) + 80px); }
.ol-visninger { display: flex; flex-direction: column; gap: 2px; }
.ol-visninger a { display: flex; align-items: center; gap: 8px; min-height: 44px; padding: 8px 12px; border-radius: 10px; text-decoration: none; color: var(--tekst); font-weight: 600; }
.ol-visninger a:hover { background: var(--primaer-lys); }
.ol-visninger a.aktiv { background: var(--primaer); color: #fff; }
.ol-visninger .antal { margin-left: auto; font-size: .9rem; color: var(--svag); font-weight: 700; }
.ol-visninger a.aktiv .antal { color: #fff; }
.ol-visninger .antal.roed { background: var(--fare); color: #fff; border-radius: 999px; padding: 1px 8px; }
.ol-visninger h3 { margin: 16px 12px 4px; font-size: .95rem; color: var(--svag); }
.gemt-filter { display: flex; align-items: center; gap: 4px; }
.gemt-filter a { flex: 1; font-weight: 500; }
.ol-visning-valg { display: none; width: 100%; margin-bottom: 10px; font-weight: 700; }
.ol-soegelinje { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.ol-soeg { flex: 1 1 220px; min-width: 0; }
.knap-gruppe { display: inline-flex; }
.knap-gruppe .knap { border-radius: 0; }
.knap-gruppe .knap:first-child { border-radius: 10px 0 0 10px; }
.knap-gruppe .knap:last-child { border-radius: 0 10px 10px 0; border-left: 0; }
.knap.valgt { background: var(--primaer); color: #fff; }
.ol-chips { display: flex; flex-wrap: wrap; gap: 6px; margin: 8px 0; }
.ol-chips:empty { display: none; }
.chip { display: inline-flex; align-items: center; gap: 4px; padding: 4px 4px 4px 12px; border-radius: 999px; background: var(--primaer-lys); font-weight: 600; font-size: .95rem; }
.chip-x { border: 0; background: none; min-width: 36px; min-height: 36px; cursor: pointer; font-size: 1rem; color: var(--tekst); border-radius: 50%; }
.ol-vaerktoej { display: flex; flex-wrap: wrap; gap: 6px; margin: 10px 0 4px; padding: 8px; background: var(--flade); border: 1px solid var(--streg); border-radius: var(--radius); align-items: center; }
.ol-vaerktoej .knap[disabled] { opacity: .45; cursor: not-allowed; }
.ol-vaerktoej .knap[hidden] { display: none; }
.ol-info { margin: 6px 2px; }
.ol-tabel { width: 100%; }
.ol-tabel th { white-space: nowrap; }
.ol-tabel .sorter { border: 0; background: none; font: inherit; font-weight: 700; color: inherit; cursor: pointer; padding: 6px 0; min-height: 40px; }
.ol-tabel tbody tr { cursor: pointer; }
.ol-tabel tbody tr:hover { background: var(--primaer-lys); }
.ol-tabel tr.valgt { background: var(--accent-lys); }
.ol-tabel td.k-nummer { white-space: nowrap; }
.ol-tabel .ol-cb { width: 40px; }
.ol-cb input, .ol-kort > input { width: 22px; height: 22px; }
.ulaest td, .ulaest .ol-kort-titel, .ulaest .nr { font-weight: 800; }
.ol-tabel tr:not(.ulaest) td { font-weight: 400; }
.kolonner-plus { font-size: 1.3rem; font-weight: 800; }
.ol-kort-liste { display: flex; flex-direction: column; gap: 8px; }
.ol-kort { display: flex; gap: 10px; align-items: flex-start; background: var(--flade); border: 1px solid var(--streg); border-radius: var(--radius); padding: 12px; }
.ol-kort.valgt { border-color: var(--accent); background: var(--accent-lys); }
.ol-kort > input { margin-top: 4px; flex: none; }
.ol-kort-link { flex: 1; min-width: 0; text-decoration: none; color: var(--tekst); display: flex; flex-direction: column; gap: 4px; }
.ol-kort-top { display: flex; align-items: center; gap: 6px; min-width: 0; }
.ol-kort-titel { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.ol-kort:not(.ulaest) .ol-kort-titel, .ol-kort:not(.ulaest) .nr { font-weight: 500; }
.ol-vagt { height: 1px; }
@media (max-width: 899px) {
  .opgaveliste { grid-template-columns: minmax(0, 1fr); }
  .ol-venstre { display: none; }
  .ol-visning-valg { display: block; }
}
@media print {
  .opgaveliste { display: block; }
  .ol-venstre, .ol-visning-valg, .projekt-faner, .side-top { display: none !important; }
  body.print-valgte .ol-tabel tbody tr:not(.valgt), body.print-valgte .ol-kort:not(.valgt) { display: none; }
  main#indhold { margin: 0 !important; padding: 0 !important; }
}
.ol-kort .nr, .ol-tabel .nr { white-space: nowrap; }
.ol-tabel { font-size: .95rem; }
.ol-tabel td { padding-top: 8px; padding-bottom: 8px; }
.ol-tabel .farveprik { width: 12px; height: 12px; margin-right: 6px; vertical-align: middle; display: inline-block; }
.ol-tabel td.k-aendret, .ol-tabel td.k-oprettet, .ol-tabel td.k-frist { white-space: nowrap; }
main#indhold:has(.opgaveliste) { max-width: 1500px; }
@media (max-width: 699px) {
  .kun-stor { display: none !important; }
  .ol-soegelinje { flex-wrap: nowrap; }
  .ol-vaerktoej { flex-wrap: nowrap; overflow-x: auto; -webkit-overflow-scrolling: touch; padding: 6px; margin-top: 8px; }
  .ol-vaerktoej .knap { flex: none; }
  .ol-vaerktoej .mere-punkter { position: fixed; left: 12px; right: 12px; top: auto; bottom: calc(76px + env(safe-area-inset-bottom)); }
}
.ol-soegelinje .knap { white-space: nowrap; flex: none; }
.ol-tabel td.k-type { white-space: nowrap; }
@media (min-width: 900px) { .opgaveliste { grid-template-columns: 200px minmax(0, 1fr); } }

/* Planen: foreløbig nål (grøn prik) med en lille boble "+ Ny" / "×" (fase 9) */
.kort-ramme { position: relative; flex: 1; display: flex; min-width: 0; min-height: 0; }
.foreloebig-prik { background: none; border: 0; }
.foreloebig-prik .prik-indre { display: block; width: 22px; height: 22px; border-radius: 50%; background: #1f9d55;
  border: 3px solid #fff; box-shadow: 0 0 0 2px #1f9d55, 0 2px 6px rgba(0,0,0,.35); }
.naal-boble { position: absolute; z-index: 1100; display: flex; align-items: stretch; background: var(--flade); border-radius: 12px;
  box-shadow: 0 4px 16px rgba(0,0,0,.25); border: 1px solid var(--streg); }
.naal-boble[hidden] { display: none; }
.naal-boble::after { content: ''; position: absolute; left: var(--pil, 50%); bottom: -8px; transform: translateX(-50%);
  border: 8px solid transparent; border-bottom: 0; border-top-color: var(--flade); }
.naal-boble.under::after { bottom: auto; top: -8px; border-top: 0; border-bottom: 8px solid var(--flade); }
.naal-boble button { border: 0; background: none; font: inherit; cursor: pointer; min-height: 44px; color: var(--tekst); }
.boble-ny { padding: 0 14px; font-weight: 800; color: #1a7d45 !important; border-radius: 12px 0 0 12px; }
.boble-x { min-width: 44px; font-size: 1.4rem; line-height: 1; border-left: 1px solid var(--streg) !important; border-radius: 0 12px 12px 0; color: var(--svag) !important; }
.naal-boble button:hover, .naal-boble button:focus-visible { background: var(--primaer-lys); }
.esc-tekst { position: absolute; left: 50%; bottom: 10px; transform: translateX(-50%); z-index: 500; font-size: .85rem; color: var(--svag);
  background: rgba(255,255,255,.85); padding: 3px 10px; border-radius: 999px; pointer-events: none; }
.esc-tekst[hidden] { display: none; }
.zoom-knapper { position: absolute; right: 12px; bottom: calc(14px + env(safe-area-inset-bottom)); z-index: 600; display: flex; flex-direction: column;
  background: var(--flade); border: 1px solid var(--streg); border-radius: 12px; box-shadow: 0 2px 8px rgba(0,0,0,.15); overflow: hidden; }
.zoom-knap { width: 48px; height: 48px; border: 0; background: none; font-size: 1.4rem; font-weight: 700; color: var(--primaer); cursor: pointer; }
.zoom-knap + .zoom-knap { border-top: 1px solid var(--streg); }
.zoom-knap:hover, .zoom-knap:focus-visible { background: var(--primaer-lys); }
.plan-linje { display: flex; align-items: center; gap: 10px; padding: 6px 10px; background: var(--flade); border-bottom: 1px solid var(--streg); }
.plan-type { flex: 1 1 auto; min-width: 0; font-size: .95rem; color: var(--svag); font-weight: 600; }
.plan-soeg { flex: 0 1 280px; min-width: 0; min-height: 40px; padding: 6px 10px; font-size: 1rem; }
@media (max-width: 599px) { .plan-soeg { flex-basis: 55%; } }
@media (max-width: 599px) { .etage-filtre .plan-navn { display: none; } }
.opfoelgning-boks { border-left: 5px solid var(--accent); background: var(--accent-lys); padding: 10px 12px; border-radius: 8px; margin: 8px 0; }
.opfoelgning-boks.klaret { border-left-color: var(--ok); background: var(--primaer-lys); }
.opfoelgning-boks .knap { margin-top: 8px; }
.opf-linje { color: #8a4a12; font-weight: 600; }
.valg-liste { display: flex; flex-direction: column; gap: 4px; margin: 6px 0 10px; }

/* ===================================================================================
   Fase 9 del 5: ramme og placering. Vestdrift-farver, roligt udseende:
   hvid flade på lys baggrund, tynde grå streger, små ikoner. 14 px på computer, 16 px på telefon.
   =================================================================================== */
:root { --top: 48px; --rail: 76px; --under: 248px; --streg-lys: #e7e4dc; }
body { font-size: 14px; background: var(--bund); }
h1 { font-size: 1.45rem; }
h2 { font-size: 1.15rem; }
h3 { font-size: 1rem; }
.knap { min-height: 38px; padding: 6px 14px; font-size: 14px; border-radius: 9px; }
.knap-lille { min-height: 34px; padding: 4px 12px; font-size: 13px; }
.knap-stor { min-height: 46px; font-size: 15px; }
input, select, textarea { font-size: 14px; }
.boks { border-radius: 10px; padding: 14px 16px; border-color: var(--streg-lys); box-shadow: none; }
.tabel td, .tabel th { border-bottom: 1px solid var(--streg-lys); padding: 10px 8px; }
.skjult-tekst { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
@media (max-width: 699px) {
  body { font-size: 16px; }
  .knap { min-height: 44px; font-size: 16px; }
  .knap-lille { min-height: 40px; font-size: 15px; }
  input, select, textarea { font-size: 16px; }
}

/* Top: tynd grøn bjælke – logo, projektvælger i midten, klokke og initialer til højre */
.top { min-height: var(--top); height: calc(var(--top) + env(safe-area-inset-top)); padding: 0 12px; padding-top: env(safe-area-inset-top);
  display: flex; gap: 10px; align-items: center; }
.top .logo { font-size: 1.05rem; }
.top .projekt-bar { background: none; border: 0; padding: 0; flex: 1 1 auto; display: flex; justify-content: center; align-items: center; gap: 2px; min-width: 0; position: relative; }
.top .projekt-bar select { max-width: min(520px, 100%); }
.top .projekt-bar select { appearance: none; -webkit-appearance: none; background: transparent; color: #fff; border: 0; font-weight: 700; font-size: 14px;
  min-height: 36px; padding: 4px 24px 4px 8px; max-width: 100%; text-overflow: ellipsis; cursor: pointer; border-radius: 8px; }
.top .projekt-bar select:hover, .top .projekt-bar select:focus-visible { background: rgba(255,255,255,.12); }
.top .projekt-bar select option, .top .projekt-bar select optgroup { color: var(--tekst); }
.top .projekt-bar .ikon { color: #fff; margin-left: -22px; pointer-events: none; }
.top .klokke { color: #fff; }
.menu-knap.initialer { display: inline-flex; align-items: center; justify-content: center; width: 34px; height: 34px; min-height: 0; margin: 0; padding: 0;
  border-radius: 50%; background: var(--accent); color: #fff; border: 0; font-weight: 800; font-size: 13px; letter-spacing: .5px; cursor: pointer; }
.top nav#menu { display: none; position: absolute; top: 100%; right: 8px; left: auto; width: 290px; max-height: calc(100dvh - var(--top) - 16px); overflow-y: auto;
  flex-direction: column; gap: 0; padding: 6px; margin: 0; background: var(--flade); color: var(--tekst); border: 1px solid var(--streg); border-radius: 12px;
  box-shadow: 0 10px 30px rgba(0,0,0,.18); z-index: 1300; }
.top nav#menu.aaben { display: flex; }
.top nav#menu a, .top nav#menu button { color: var(--tekst); font-size: 14px; padding: 10px 12px; min-height: 40px; text-align: left; border-radius: 8px; box-shadow: none; }
.top nav#menu a:hover, .top nav#menu button:hover, .top nav#menu a.aktiv { background: var(--primaer-lys); }
.menu-hvem { display: flex; flex-direction: column; padding: 10px 12px; border-bottom: 1px solid var(--streg-lys); margin-bottom: 4px; }
.menu-projekt:empty { display: none; }
.menu-projekt { display: flex; flex-direction: column; border-bottom: 1px solid var(--streg-lys); margin-bottom: 4px; padding-bottom: 4px; }
.menu-projekt a { font-weight: 700; }
@media (max-width: 1100px) { .top nav#menu { position: absolute; } }
@media (max-width: 699px) {
  .top { gap: 6px; }
  .top .logo { display: none; }
  .top .projekt-bar { justify-content: flex-start; }
  .top nav#menu { position: fixed; left: 0; right: 0; top: auto; bottom: 0; width: auto; max-height: 80dvh; border-radius: 16px 16px 0 0;
    padding: 8px 8px calc(12px + env(safe-area-inset-bottom)); }
  .top nav#menu a, .top nav#menu button { font-size: 16px; min-height: 48px; }
}

/* Ikonbjælken yderst til venstre (Drift) – bundmenu på telefon */
.rail { position: fixed; z-index: 900; left: 0; top: calc(var(--top) + env(safe-area-inset-top)); bottom: 0; width: var(--rail);
  display: flex; flex-direction: column; justify-content: space-between; background: var(--flade); border-right: 1px solid var(--streg-lys); padding: 8px 0; }
.rail-top, .rail-bund { display: flex; flex-direction: column; gap: 2px; }
.rail-punkt { position: relative; display: flex; flex-direction: column; align-items: center; gap: 3px; padding: 9px 4px; margin: 0 6px; border-radius: 10px;
  color: var(--svag); text-decoration: none; font-size: 11px; font-weight: 600; background: none; border: 0; cursor: pointer; font-family: inherit; }
.rail-punkt:hover { background: var(--bund); color: var(--primaer); }
.rail-punkt.aktiv { color: var(--primaer); background: var(--primaer-lys); }
.rail-punkt.aktiv::before { content: ''; position: absolute; left: -6px; top: 8px; bottom: 8px; width: 3px; border-radius: 2px; background: var(--accent); }
.rail .roedt-tal { position: absolute; top: 3px; right: 8px; min-width: 18px; height: 18px; padding: 0 5px; font-size: 11px; }
.rail-mere { display: none; }
body.med-rail main#indhold { margin-left: var(--rail); max-width: none; }

/* Menuen på andet niveau (mellem ikonbjælken og indholdet) */
.undermenu { position: fixed; z-index: 850; left: var(--rail); top: calc(var(--top) + env(safe-area-inset-top)); bottom: 0; width: var(--under);
  overflow-y: auto; background: var(--flade); border-right: 1px solid var(--streg-lys); padding: 12px 8px; }
body.indstilling .undermenu { left: 0; }
body.med-rail.med-undermenu main#indhold { margin-left: calc(var(--rail) + var(--under)); }
body.indstilling main#indhold { max-width: none; }
body.indstilling.med-undermenu main#indhold { margin-left: var(--under); }
main#indhold { padding: 16px 24px 40px; }
.undermenu h2 { font-size: 12px; text-transform: uppercase; letter-spacing: .6px; color: var(--svag); margin: 8px 8px 8px; }
.undermenu .ol-venstre { position: static; }
.ol-hjem { display: flex; align-items: center; gap: 8px; min-height: 40px; padding: 8px 12px; border-radius: 8px; text-decoration: none; color: var(--tekst); font-weight: 700; margin-bottom: 4px; }
.ol-hjem:hover { background: var(--bund); }
.undermenu .ol-visninger a { min-height: 38px; padding: 7px 12px; font-weight: 500; }
.undermenu .ol-visninger a.aktiv { background: var(--primaer-lys); color: var(--primaer); font-weight: 700; }
.undermenu .ol-visninger a.aktiv .antal { color: var(--primaer); }
.tegning-soeg { width: 100%; margin: 0 0 8px; min-height: 36px; }
.tegningsliste { display: flex; flex-direction: column; gap: 1px; }
.tegningsliste a { display: flex; align-items: center; gap: 8px; padding: 7px 10px; border-radius: 8px; text-decoration: none; color: var(--tekst); line-height: 1.25; }
.tegningsliste a:hover { background: var(--bund); }
.tegningsliste a.aktiv { background: var(--primaer-lys); font-weight: 700; }
.tegningsliste .antal { font-size: 11px; font-weight: 700; color: var(--accent); }
.indstilling-menu { display: flex; flex-direction: column; gap: 1px; }
.indstilling-menu a { padding: 8px 12px; border-radius: 8px; text-decoration: none; color: var(--tekst); }
.indstilling-menu a:hover { background: var(--bund); }
.indstilling-menu a.aktiv { background: var(--primaer-lys); color: var(--primaer); font-weight: 700; }
.indstilling-menu .indstilling-tilbage { display: flex; align-items: center; gap: 6px; font-weight: 700; color: var(--primaer); margin-bottom: 8px; border-bottom: 1px solid var(--streg-lys); border-radius: 0; padding-bottom: 12px; }
.indstilling-top-mobil { display: none; margin-bottom: 12px; }
.indstilling-valg { width: 100%; font-weight: 700; }
.indstilling-indhold > div + div { margin-top: 20px; }
.afsnit-titel { margin-top: 8px; }
.felt-tabel .felt-raekke { display: grid; grid-template-columns: 160px minmax(0, 1fr); gap: 12px; padding: 8px 0; border-bottom: 1px solid var(--streg-lys); }
.admin-link { color: var(--svag); font-size: 13px; }

@media (max-width: 899px) {
  .undermenu { display: none !important; }
  body.med-rail.med-undermenu main#indhold { margin-left: var(--rail); }
  body.indstilling.med-undermenu main#indhold { margin-left: 0; }
  .indstilling-top-mobil { display: block; }
}
@media (max-width: 699px) {
  .rail { top: auto; bottom: 0; right: 0; width: auto; height: calc(62px + env(safe-area-inset-bottom)); padding: 0 0 env(safe-area-inset-bottom);
    flex-direction: row; border-right: 0; border-top: 1px solid var(--streg-lys); box-shadow: 0 -4px 14px rgba(0,0,0,.05); }
  .rail-top { display: contents; }
  .rail-bund { display: none; }
  .rail-punkt { flex: 1; margin: 0; border-radius: 0; justify-content: center; font-size: 12px; padding: 6px 2px; }
  .rail-punkt.aktiv { background: none; }
  .rail-punkt.aktiv::before { left: 20%; right: 20%; top: 0; bottom: auto; width: auto; height: 3px; }
  .rail .roedt-tal { right: calc(50% - 26px); }
  .rail-mere { display: flex; }
  body.med-rail main#indhold, body.med-rail.med-undermenu main#indhold { margin-left: 0; padding: 12px 12px calc(90px + env(safe-area-inset-bottom)); }
  body.indstilling main#indhold { padding: 12px; }
}

/* Værktøjslinje øverst: primær knap til venstre, små ikoner med tekst, ⋯ Mere sidst. Grå = kan ikke bruges. */
.ol-vaerktoej { gap: 2px; padding: 6px 8px; margin: 0 0 10px; background: var(--flade); border: 1px solid var(--streg-lys); border-radius: 10px; }
.knap-opret { gap: 6px; min-height: 36px; padding: 4px 12px; margin-right: 8px; }
.vk-knap { display: inline-flex; align-items: center; gap: 6px; min-height: 34px; padding: 4px 10px; border: 0; background: none; border-radius: 8px;
  color: var(--primaer); font: inherit; font-size: 13px; font-weight: 600; cursor: pointer; white-space: nowrap; }
.vk-knap:hover:not([disabled]) { background: var(--primaer-lys); }
.vk-knap[disabled] { color: #a9ada6; cursor: not-allowed; }
.vk-knap.valgt { background: var(--primaer-lys); }
.ol-vaerktoej .mere-knap, .vindue-handlinger .mere-knap { border: 0; background: none; min-height: 34px; font-size: 13px; color: var(--primaer); display: inline-flex; align-items: center; gap: 4px; }
.knap-gruppe .vk-knap { border: 1px solid var(--streg-lys); border-radius: 0; }
.knap-gruppe .vk-knap:first-child { border-radius: 8px 0 0 8px; }
.knap-gruppe .vk-knap:last-child { border-radius: 0 8px 8px 0; border-left: 0; }
.ol-vaerktoej + .side-top { border-bottom: 0; padding-top: 4px; }
.side-top { border-bottom-color: var(--streg-lys); }
.side-top .tilbage { min-height: 36px; border-width: 1px; font-size: 13px; }
.ol-soegelinje .ol-soeg { min-height: 36px; }
.ol-tabel tbody tr td { padding-top: 11px; padding-bottom: 11px; }
.status-prik { width: 11px; height: 11px; }
@media (max-width: 699px) {
  .vk-knap span { font-size: 14px; }
  .side-top .tilbage { min-height: 44px; }
}

/* Opgaven som et stort vindue over listen (fuld skærm på telefon) */
body.vindue-aaben { overflow: hidden; }
.vindue-baggrund { position: fixed; inset: 0; z-index: 1250; background: rgba(28,35,33,.42); overflow-y: auto; padding: 24px 76px; }
.vindue { position: relative; max-width: 1080px; margin: 0 auto; background: var(--flade); border-radius: 12px; box-shadow: 0 18px 50px rgba(0,0,0,.25); }
main#indhold.vindue-side { padding: 16px 76px 40px; }
main#indhold.vindue-side .vindue { box-shadow: 0 2px 10px rgba(0,0,0,.06); border: 1px solid var(--streg-lys); }
.vindue-top.side-top { position: sticky; top: 0; z-index: 3; display: flex; align-items: center; gap: 12px; padding: 10px 14px 10px 18px; margin: 0;
  background: var(--flade); border-bottom: 1px solid var(--streg-lys); border-radius: 12px 12px 0 0; }
.vindue-top .side-titel { flex: 1 1 auto; min-width: 0; }
.vindue-top h1 { font-size: 1.15rem; margin: 0; }
.vindue-handlinger { display: flex; align-items: center; gap: 2px; flex-wrap: wrap; }
.vindue-tal { white-space: nowrap; }
.vindue-luk.tilbage { border: 0; padding: 0; min-height: 40px; width: 40px; justify-content: center; border-radius: 50%; }
.vindue-luk.tilbage:hover { background: var(--bund); }
.vindue-luk .pil, .vindue-luk .tilbage-tekst { display: none; }
.vindue-luk .luk-ikon { display: inline-flex; }
.vindue-pil { position: absolute; top: 180px; width: 48px; height: 48px; border-radius: 50%; border: 1px solid var(--streg); background: var(--flade);
  color: var(--primaer); display: inline-flex; align-items: center; justify-content: center; cursor: pointer; box-shadow: 0 4px 14px rgba(0,0,0,.12); }
.vindue-pil.forrige { left: -64px; }
.vindue-pil.naeste { right: -64px; }
.vindue-pil[disabled] { opacity: .35; cursor: default; }
.vindue-krop { padding: 16px 20px 24px; }
.vindue .pin-alene { border: 0; padding: 0; background: none; }
.vindue .panel-top { position: static; padding: 0 0 8px; }
.vindue .panel-top .knap-ikon { display: none; }
.vindue .panel-top strong { font-size: 1.15rem; }
.vindue .formular > .felt, .vindue .opgave-felter .felt { display: grid; grid-template-columns: 170px minmax(0, 1fr); gap: 12px; align-items: start; padding: 8px 0; border-bottom: 1px solid var(--streg-lys); margin: 0; }
.vindue .to-felter { display: contents; }
.vindue .sektion { border-top: 1px solid var(--streg-lys); padding-top: 12px; margin-top: 12px; }
.planudsnit { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-bottom: 14px; }
.planudsnit figure { margin: 0; }
.planudsnit figcaption { font-size: 12px; color: var(--svag); margin-top: 4px; }
.udsnit-hel, .udsnit-zoom { position: relative; overflow: hidden; border: 1px solid var(--streg-lys); border-radius: 8px; background: #fff; }
.udsnit-hel img { display: block; width: 100%; height: 100%; }
.udsnit-ramme { position: absolute; border: 2px solid var(--accent); border-radius: 2px; box-shadow: 0 0 0 9999px rgba(255,255,255,.35); }
.udsnit-prik { position: absolute; width: 8px; height: 8px; margin: -4px 0 0 -4px; border-radius: 50%; background: var(--fare); }
.udsnit-zoom { aspect-ratio: 4 / 3; }
.udsnit-zoom img { position: absolute; max-width: none; height: auto; }
.udsnit-naal { position: absolute; transform: translate(-50%, -100%); display: flex; flex-direction: column; align-items: center; pointer-events: none; }
.udsnit-naal-skilt { background: var(--primaer); color: #fff; font-weight: 800; font-size: 12px; padding: 3px 8px; border-radius: 8px; border: 2px solid #fff; white-space: nowrap; }
.udsnit-naal-spids { width: 0; height: 0; border: 7px solid transparent; border-top: 10px solid var(--primaer); border-bottom: 0; }
@media (max-width: 699px) {
  .vindue-baggrund { padding: 0; }
  .vindue, main#indhold.vindue-side .vindue { border-radius: 0; min-height: 100%; border: 0; }
  main#indhold.vindue-side { padding: 0 0 calc(90px + env(safe-area-inset-bottom)); }
  .vindue-top.side-top { border-radius: 0; flex-wrap: wrap; padding: 8px 10px; top: 0; }
  .vindue-luk.tilbage { order: -1; width: auto; padding: 0 12px 0 8px; border: 1px solid var(--primaer); border-radius: 10px; min-height: 44px; }
  .vindue-luk .pil, .vindue-luk .tilbage-tekst { display: inline; }
  .vindue-luk .luk-ikon { display: none; }
  .vindue-handlinger { order: 5; flex-basis: 100%; overflow-x: auto; flex-wrap: nowrap; }
  .vindue-top .krummer { display: none; }
  .vindue-pil { position: static; width: 40px; height: 40px; box-shadow: none; }
  .vindue .formular > .felt, .vindue .opgave-felter .felt { grid-template-columns: 1fr; gap: 4px; }
  .vindue-krop { padding: 12px; }
}

/* Planvisningen: tegningen fylder hele fladen, et lille hvidt panel øverst til venstre */
main#indhold.fuld { padding: 0; }
.etage-side { height: calc(100vh - var(--top)); height: calc(100dvh - var(--top) - env(safe-area-inset-top)); }
.plan-panel { position: absolute; z-index: 700; top: 10px; left: 10px; width: min(380px, calc(100% - 20px)); display: flex; flex-direction: column; gap: 6px;
  background: var(--flade); border: 1px solid var(--streg-lys); border-radius: 10px; box-shadow: 0 4px 16px rgba(0,0,0,.12); padding: 8px 10px; }
.plan-panel .side-top { position: static; border: 0; padding: 0; margin: 0; background: none; gap: 8px; }
.plan-panel .side-top h1 { font-size: 1rem; }
.plan-panel .side-top .krummer { font-size: 11px; }
.plan-panel .plan-linje { padding: 0; border: 0; background: none; }
.plan-panel-valg { display: flex; gap: 6px; flex-wrap: wrap; }
.plan-panel-valg:empty { display: none; }
.plan-panel-valg select, .plan-panel-filtre select { min-height: 34px; font-size: 13px; padding: 4px 6px; flex: 1 1 140px; min-width: 0; max-width: 100%; }
.plan-panel-filtre { display: flex; gap: 6px; flex-wrap: wrap; }
.plan-panel .plan-soeg { flex: none; width: 100%; min-height: 34px; font-size: 13px; }
.plan-panel-fod { display: flex; justify-content: space-between; gap: 8px; align-items: center; font-size: 12px; }
.plan-panel-fod .plan-version { font-size: 12px; }
@media (max-width: 699px) {
  .etage-side { height: calc(100dvh - var(--top) - env(safe-area-inset-top) - 62px - env(safe-area-inset-bottom)); }
  .plan-panel { top: 8px; left: 8px; width: calc(100% - 16px); padding: 6px 8px; gap: 4px; }
  .plan-panel .plan-soeg, .plan-panel-valg select { font-size: 16px; }
  .plan-panel .side-top .tilbage { min-height: 40px; }
}

.opgaveliste { display: block; }
.planudsnit { align-items: start; }
.plan-panel .krummer { white-space: normal; }
.plan-panel .krummer .forkort { max-width: none; }
/* Planvisningen fylder hele fladen – også med ikonbjælke og undermenu */
body.med-rail main#indhold.fuld, body.med-rail.med-undermenu main#indhold.fuld { padding: 0; }
@media (max-width: 699px) { body.med-rail main#indhold.fuld { padding: 0; } }
.lok-planer { padding: 0 12px 10px 28px; display: flex; flex-direction: column; gap: 4px; }
.lok-planer > .knap { align-self: flex-start; }
.lok-plan { display: flex; align-items: center; gap: 8px; padding: 4px 0; border-top: 1px solid var(--streg-lys); }
.lok-plan > a { display: inline-flex; align-items: center; gap: 6px; flex-wrap: wrap; min-width: 0; }
.lok-etage-blok.fremhaevet { background: var(--accent-lys); }

/* Tidslinje i opgaven (fase 10 del 1) */
.tidslinje { list-style: none; margin: 0; padding: 0 0 0 4px; position: relative; }
.tidslinje::before { content: ''; position: absolute; left: 17px; top: 6px; bottom: 6px; width: 2px; background: var(--streg-lys); }
.tidslinje .th { display: grid; grid-template-columns: 28px minmax(0, 1fr); gap: 10px; padding: 6px 0; position: relative; }
.th-nr { width: 28px; height: 28px; border-radius: 50%; background: var(--flade); border: 2px solid var(--primaer); color: var(--primaer);
  font-size: 12px; font-weight: 800; display: inline-flex; align-items: center; justify-content: center; z-index: 1; }
.th-kommentar .th-nr { border-color: var(--accent); color: var(--accent); }
.th.intern .th-krop { background: #fff8ec; border-radius: 8px; padding: 4px 8px; }
.th-tekst { font-weight: 600; overflow-wrap: anywhere; }
.th-type { color: var(--svag); font-weight: 600; }
.th-hvem { color: var(--svag); font-size: 12px; margin-top: 2px; }
.th-fotos { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 6px; }
.th-foto { margin: 0; width: 132px; }
.th-foto img { width: 132px; height: 99px; object-fit: cover; border-radius: 6px; border: 1px solid var(--streg-lys); cursor: zoom-in; display: block; }
.th-foto figcaption { font-size: 11px; color: var(--svag); line-height: 1.3; margin-top: 2px; }
@media print { .th-foto img { cursor: default; } }
