/* ================================================================ min forside
   Medarbejderens forside (js/04b-min-forside.js). Ét stort kort med vagten, der
   betyder noget lige nu, og rolige lister under. Bygger på appens farvetokens,
   så den følger lyst og mørkt tema. Vagttypens farve (--type) er accenten. */

.mf { display: flex; flex-direction: column; gap: 18px; max-width: 640px; margin: 0 auto; }
.mf-hej { display: flex; align-items: baseline; justify-content: space-between; gap: 6px 12px; flex-wrap: wrap; }
.mf-hej h2 { margin: 0; }

.mf-besked {
  display: block; padding: 12px 16px; border-radius: 14px; text-decoration: none; font-weight: 600;
  background: var(--warn-bg); color: var(--warn-text);
}

/* --- det store kort */
.mf-kort {
  position: relative; overflow: hidden;
  background:
    linear-gradient(160deg, color-mix(in srgb, var(--type) 14%, transparent) 0%, transparent 55%),
    var(--surface);
  border: 1px solid var(--line); border-radius: 22px;
  padding: 18px 20px 20px; display: flex; flex-direction: column; gap: 14px;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.06), 0 10px 28px rgba(0, 0, 0, 0.08);
}
.mf-kort.tom { background: var(--surface); }
.mf-kort.live { border-color: color-mix(in srgb, var(--ok) 55%, var(--line)); }
.mf-kort.advar { border-color: var(--warn); }

.mf-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.mf-naar {
  display: inline-flex; align-items: center; gap: 8px; font-size: 13.5px; font-weight: 600;
  color: var(--muted); letter-spacing: 0.01em;
}
.mf-kort.live .mf-naar { color: var(--ok-text); }
.mf-kort.snart .mf-naar { color: var(--accent-text); }
.mf-kort.advar .mf-naar { color: var(--warn-text); }
.mf-puls { width: 9px; height: 9px; border-radius: 50%; background: var(--ok); position: relative; }
.mf-puls::after {
  content: ''; position: absolute; inset: -4px; border-radius: 50%; border: 2px solid var(--ok);
  animation: mf-puls 1.8s ease-out infinite;
}
@keyframes mf-puls { from { transform: scale(0.6); opacity: 0.9; } to { transform: scale(1.6); opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .mf-puls::after { animation: none; } }
.mf-aabn {
  border: 0; background: none; color: var(--accent-text); font: inherit; font-size: 13.5px; font-weight: 600;
  padding: 6px 0 6px 10px; cursor: pointer;
}

.mf-dato { font-size: 28px; font-weight: 750; line-height: 1.1; letter-spacing: -0.01em; }

.mf-tider { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: end; gap: 12px; }
.mf-tider > div { display: flex; flex-direction: column; gap: 2px; }
.mf-hoejre { text-align: right; align-items: flex-end; }
.mf-lbl { font-size: 12.5px; color: var(--muted); }
.mf-tid {
  font-size: clamp(42px, 13vw, 58px); font-weight: 750; line-height: 1; letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums; color: var(--type);
}
:root[data-theme='dark'] .mf-tid { color: color-mix(in srgb, var(--type) 70%, white); }
.mf-pil { align-self: center; align-items: center; padding-bottom: 6px; }
.mf-bar {
  display: block; width: 100%; height: 6px; border-radius: 3px; overflow: hidden;
  background: color-mix(in srgb, var(--type) 18%, var(--surface-2));
}
.mf-bar i { display: block; height: 100%; background: var(--type); border-radius: 3px; transition: width 0.6s ease; }
.mf-varighed { font-size: 12.5px; color: var(--muted); text-align: center; margin-top: 6px; white-space: nowrap; }

.mf-hvad { display: flex; flex-direction: column; gap: 2px; }
.mf-kunde { display: flex; align-items: center; gap: 9px; font-size: 19px; font-weight: 700; }
.mf-prik { width: 11px; height: 11px; border-radius: 50%; background: var(--type); flex: none; }
.mf-type { color: var(--muted); padding-left: 20px; }

.mf-linje { display: grid; grid-template-columns: 22px minmax(0, 1fr) auto; gap: 10px; align-items: start; color: var(--text); }
.mf-ikon { color: var(--muted); display: inline-flex; padding-top: 1px; }
.mf-tekst { white-space: pre-line; overflow-wrap: anywhere; line-height: 1.45; }
.mf-rute {
  align-self: center; text-decoration: none; font-weight: 600; font-size: 13.5px;
  padding: 7px 12px; border-radius: 999px; background: var(--accent-soft); color: var(--accent-text);
}

.mf-med { border-top: 1px solid var(--line); padding-top: 12px; display: flex; flex-direction: column; gap: 10px; }
.mf-med-hoved { display: flex; align-items: center; gap: 8px; font-weight: 650; }
.mf-antal {
  min-width: 22px; height: 22px; padding: 0 7px; border-radius: 11px; display: inline-flex; align-items: center;
  justify-content: center; font-size: 12px; background: var(--surface-2); color: var(--muted);
}
.mf-folk { display: flex; flex-direction: column; gap: 8px; }
.mf-person { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 10px; }
.mf-navn { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mf-ring {
  width: 40px; height: 40px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center;
  background: color-mix(in srgb, var(--ok) 16%, var(--surface-2)); color: var(--ok-text);
}

.mf-handling { display: flex; flex-direction: column; gap: 6px; }
.mf-knap {
  width: 100%; min-height: 54px; border: 0; border-radius: 16px; font: inherit; font-size: 17px; font-weight: 700;
  background: var(--accent); color: var(--on-accent); cursor: pointer;
}
.mf-knap.ud { background: var(--text); color: var(--surface); }
.mf-knap:disabled { opacity: 0.6; }
.mf-under { text-align: center; font-size: 12.5px; color: var(--muted); }
.mf-stemplet {
  text-align: center; padding: 12px; border-radius: 14px; font-weight: 600;
  background: color-mix(in srgb, var(--ok) 12%, var(--surface-2)); color: var(--ok-text);
}
.mf-handling .error:empty { display: none; }

/* --- lister */
.mf-sektion { display: flex; flex-direction: column; gap: 8px; }
.mf-sek-hoved { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; }
.mf-sek-hoved h3 { margin: 0; }
.mf-sek-hoved a { color: var(--accent-text); text-decoration: none; font-weight: 600; font-size: 13.5px; }
.mf-liste { display: flex; flex-direction: column; background: var(--surface); border: 1px solid var(--line); border-radius: 16px; overflow: hidden; }
.mf-raekke {
  display: grid; grid-template-columns: 46px minmax(0, 1fr) auto; gap: 12px; align-items: center;
  padding: 12px 14px; border: 0; background: none; color: inherit; font: inherit; text-align: left; cursor: pointer;
  border-left: 4px solid var(--type);
}
.mf-raekke + .mf-raekke { border-top: 1px solid var(--line); }
.mf-raekke:hover { background: var(--surface-2); }
.mf-r-dato { display: flex; flex-direction: column; align-items: center; line-height: 1.1; font-size: 20px; font-weight: 750; }
.mf-r-dato b { font-size: 11.5px; font-weight: 600; color: var(--muted); text-transform: uppercase; letter-spacing: 0.05em; }
.mf-r-midt { display: flex; flex-direction: column; min-width: 0; }
.mf-r-kunde { font-weight: 650; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mf-r-sub { color: var(--muted); font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mf-r-tid { font-variant-numeric: tabular-nums; color: var(--muted); font-size: 14px; display: flex; flex-direction: column; align-items: flex-end; gap: 3px; white-space: nowrap; }
.mf-budt { font-size: 11.5px; font-weight: 600; color: var(--warn-text); }
.mf-tidligere .mf-liste { margin-top: 8px; opacity: 0.85; }

@media (max-width: 420px) {
  .mf-kort { padding: 16px 16px 18px; border-radius: 20px; }
  .mf-dato { font-size: 24px; }
  .mf-tider { gap: 8px; }
}

/* ================================================================ admins forside (js/04c-admin-forside.js) */
.adm { max-width: 760px; }
.adm-nu { gap: 12px; }
.adm-forsinket { font-size: 12.5px; font-weight: 700; padding: 4px 10px; border-radius: 999px; background: var(--warn-bg); color: var(--warn-text); }
.adm-live { display: flex; flex-direction: column; gap: 8px; padding-top: 12px; border-top: 1px solid var(--line); }
.adm-live:first-of-type { border-top: 0; padding-top: 0; }
.adm-live-hoved { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 9px; align-items: center; border: 0; background: none; padding: 0; color: inherit; font: inherit; text-align: left; cursor: pointer; }
.adm-live-navn { font-weight: 700; font-size: 16px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.adm-live-tid { font-variant-numeric: tabular-nums; color: var(--muted); font-size: 14px; }
.adm-mangler { align-self: flex-start; font-size: 12.5px; font-weight: 700; color: var(--warn-text); }
.adm-folk { display: flex; flex-direction: column; gap: 8px; }
.adm-person { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 10px; align-items: center; }
.adm-p-tekst { display: flex; flex-direction: column; min-width: 0; }
.adm-status { font-size: 12.5px; color: var(--muted); }
.adm-person.ok .adm-status { color: var(--ok-text); }
.adm-person.advar .adm-status { color: var(--warn-text); font-weight: 700; }
.adm-indlejret { border-radius: 14px; }
.adm-opgave { display: grid; grid-template-columns: 44px minmax(0, 1fr) auto; gap: 12px; align-items: center; padding: 12px 14px; border: 0; background: none; color: inherit; font: inherit; text-align: left; cursor: pointer; }
.adm-opgave + .adm-opgave { border-top: 1px solid var(--line); }
.adm-opgave:hover { background: var(--surface-2); }
.adm-tal { min-width: 36px; height: 36px; padding: 0 8px; border-radius: 12px; display: inline-flex; align-items: center; justify-content: center; font-weight: 750; font-size: 17px; background: var(--accent-soft); color: var(--accent-text); font-variant-numeric: tabular-nums; }
.adm-opgave.advar .adm-tal { background: var(--warn-bg); color: var(--warn-text); }
.adm-o-tekst { font-weight: 600; }
.adm-pil { color: var(--muted); font-size: 20px; }
.adm-ok { padding: 14px 16px; border-radius: 16px; font-weight: 600; background: color-mix(in srgb, var(--ok) 12%, var(--surface)); color: var(--ok-text); border: 1px solid color-mix(in srgb, var(--ok) 30%, var(--line)); }
.adm-bemanding { font-size: 12px; font-weight: 700; padding: 1px 8px; border-radius: 999px; }
.adm-bemanding.fuld { background: color-mix(in srgb, var(--ok) 14%, var(--surface-2)); color: var(--ok-text); }
.adm-bemanding.mangler { background: var(--warn-bg); color: var(--warn-text); }
.adm .kom-i-gang { margin: 0; }
.adm-tom { align-self: stretch; font-size: 13.5px; font-weight: 700; padding: 8px 12px; border-radius: 12px; background: var(--block-bg); color: var(--danger-text); }

/* ================================================================ vagtplanens top (js/06-plan-uge.js) */
.plan-bar { display: flex; align-items: center; justify-content: space-between; gap: 10px 16px; flex-wrap: wrap; margin-bottom: 12px; }
.pb-titel { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.pb-titel #ugeLabel { font-size: 26px; font-weight: 750; letter-spacing: -0.01em; background: none; border: 0; padding: 0; color: inherit; font-family: inherit; text-decoration: none; cursor: pointer; }
/* Vises også på telefonen; en ældre regel skjulte perioden under 640 px. */
.plan-bar .pb-titel .range { display: inline; font-size: 15px; }
.pb-nav { display: flex; align-items: center; gap: 6px; }
.pb-nav .ghost { border-radius: 999px; min-width: 40px; white-space: nowrap; }
.pb-nav .primary { border-radius: 12px; margin-left: 4px; }
.plan-stat { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 12px; }
.plan-stat .ps { padding: 7px 12px; border-radius: 999px; background: var(--surface); border: 1px solid var(--line); font-size: 13.5px; color: var(--muted); text-decoration: none; }
.plan-stat .ps b { color: var(--text); font-variant-numeric: tabular-nums; }
.plan-stat .ps.advar { background: var(--warn-bg); border-color: transparent; color: var(--warn-text); }
.plan-stat .ps.advar b { color: var(--warn-text); }
.plan-stat .ps.ok b { color: var(--ok-text); }
.plan-stat .ps.link { color: var(--accent-text); }
@media (max-width: 700px) { .pb-titel #ugeLabel { font-size: 22px; } .pb-nav { width: 100%; } .pb-nav .primary { margin-left: auto; } }

/* ================================================================ timegodkendelse (js/12-timer.js) */
.pb-titel .pb-overskrift { width: 100%; font-size: 12.5px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.06em; color: var(--muted); }
.pb-titel .pb-stor { font-size: 26px; font-weight: 750; letter-spacing: -0.01em; }
@media (max-width: 700px) { .pb-titel .pb-stor { font-size: 22px; } }
.tg-boks { background: var(--surface); border: 1px solid var(--line); border-radius: 18px; padding: 16px 18px; margin-bottom: 18px; }
.tg-boks table { margin-top: 4px; }
.tg-sek { margin: 6px 0 10px; }
.tg-alle { margin-bottom: 14px; gap: 8px; }
.tg-alle-tal { font-size: 17px; font-weight: 600; }
.tg-alle-tal b { font-size: 28px; font-weight: 750; margin-right: 4px; color: var(--ok-text); }
.tg-kort { background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 14px 16px; margin-bottom: 10px; display: flex; flex-direction: column; gap: 6px; }
.tg-kort.godkendt { opacity: 0.85; }
.tg-top { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 12px; align-items: center; }
.tg-hvem { min-width: 0; }
.tg-navn { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.tg-timer b { font-size: 24px; font-weight: 750; font-variant-numeric: tabular-nums; letter-spacing: -0.01em; }
.tg-kort.godkendt .tg-timer b { color: var(--ok-text); }
.tg-tid { color: var(--muted); }
.tg-tid strong { color: var(--text); }
.tg-knapper { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 6px; }
.tg-knapper button { margin: 0; border-radius: 12px; min-height: 44px; white-space: nowrap; }
.tg-knapper .primary { flex: 1 1 160px; }
@media (max-width: 460px) { .tg-knapper .ghost { flex: 1 1 0; } }
