/* Flag-emoji (🇩🇰 osv.) vises ikke i Windows (Edge/Chrome). Denne lille skrifttype med Twemoji-flag
   bruges KUN til flagtegnene (unicode-range) – al anden tekst bruger templatens egne skrifttyper. */
@font-face {
  font-family: "Twemoji Country Flags";
  src: url("vendor/flags/TwemojiCountryFlags.woff2") format("woff2");
  unicode-range: U+1F1E6-1F1FF, U+1F3F4, U+E0062-E0063, U+E0065, U+E0067, U+E006C, U+E006E, U+E0073-E0074, U+E0077, U+E007F;
  font-display: swap;
}
/* Administration – bevidst neutral, så indholdet og templaten er det man ser */
:root {
  --bg: #f3f5f6; --panel: #fff; --ink: #1f2a30; --muted: #63727b; --line: #dbe1e4;
  --side: #22313a; --side-ink: #d5dee3; --accent: #0a7f78; --accent-ink: #fff;
  --ok: #2d7a3e; --warn: #9a6a00; --err: #b3261e; --radius: 6px;
  color-scheme: light;
}
* { box-sizing: border-box; }
html { font-size: 100%; }
body { margin: 0; font: 15px/1.5 "Twemoji Country Flags", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; color: var(--ink); background: var(--bg); }
a { color: var(--accent); }
:focus-visible { outline: 3px solid #f2b705; outline-offset: 2px; }
.skip { position: absolute; left: -999px; } .skip:focus { left: 1rem; top: 1rem; z-index: 99; background: #fff; padding: .5rem 1rem; }
.muted { color: var(--muted); } .small { font-size: .85em; } .r { text-align: right; }
code { background: #e7ecef; padding: .1em .35em; border-radius: 3px; font-size: .9em; }
h1 { font-size: 1.6rem; margin: 0 0 1.25rem; }
h2 { font-size: 1.15rem; margin: 1.75rem 0 .75rem; }

/* Layout */
body.admin { display: grid; grid-template-columns: 230px 1fr; min-height: 100vh; }
.adm-side { background: var(--side); color: var(--side-ink); padding: 1.25rem 1rem; display: flex; flex-direction: column; gap: 1.5rem; position: sticky; top: 0; height: 100vh; }
.adm-brand { color: #fff; font-weight: 700; font-size: 1.1rem; text-decoration: none; }
.adm-side ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }
.adm-side nav a { display: block; padding: .5rem .75rem; border-radius: var(--radius); color: var(--side-ink); text-decoration: none; }
.adm-side nav a:hover { background: rgba(255,255,255,.07); }
.adm-side nav a[aria-current] { background: var(--accent); color: #fff; }
.adm-user { margin-top: auto; display: grid; gap: .2rem; font-size: .9rem; }
.adm-user a { color: #9fd8d3; }
.adm-user .muted { color: #93a4ad; }
.adm-main { padding: 2rem clamp(1rem, 3vw, 2.5rem) 4rem; max-width: 1150px; width: 100%; }

@media (max-width: 800px) {
  body.admin { grid-template-columns: 1fr; }
  .adm-side { position: static; height: auto; flex-direction: row; flex-wrap: wrap; align-items: center; padding: .75rem 1rem; gap: .75rem; }
  .adm-side ul { display: flex; flex-wrap: wrap; }
  .adm-user { margin: 0; flex-direction: row; display: flex; gap: .75rem; }
}

/* Komponenter */
.btn { display: inline-flex; align-items: center; gap: .4rem; padding: .55rem 1rem; border: 1px solid var(--line); background: #fff; color: var(--ink); border-radius: var(--radius); font: inherit; font-weight: 600; cursor: pointer; text-decoration: none; }
.btn:hover { border-color: var(--accent); }
.btn-primary { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.btn-primary:hover { filter: brightness(1.08); }
.btn.small { padding: .3rem .6rem; font-size: .85rem; }
button.link { background: none; border: 0; padding: 0; color: var(--accent); font: inherit; cursor: pointer; text-decoration: underline; }
button.link:disabled { color: #b8c2c7; cursor: default; text-decoration: none; }
.danger, button.link.danger { color: var(--err); }
.pill { border: 1px solid var(--line); background: #fff; border-radius: 999px; padding: .15rem .65rem; font: inherit; font-size: .85rem; cursor: pointer; color: var(--muted); }
.pill.on { background: #e3f3f1; border-color: #a9d8d3; color: #075b56; }
.tag { display: inline-block; background: #e7ecef; color: var(--muted); border-radius: 3px; padding: 0 .4rem; font-size: .8rem; vertical-align: middle; }
form.inline { display: inline; margin: 0; }
.actions a, .actions form { margin-left: .75rem; }
.actions > :first-child { margin-left: 0; }

.flash { padding: .7rem 1rem; border-radius: var(--radius); margin: 0 0 1rem; border-left: 4px solid; background: #fff; }
.flash-ok { border-color: var(--ok); } .flash-warn { border-color: var(--warn); background: #fff8e6; } .flash-err { border-color: var(--err); background: #fdeeee; }

.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: .75rem; margin-bottom: 1.5rem; }
.card { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 1rem; }
.stat-card { display: grid; }
.stat-card .big { font-size: 1.8rem; font-weight: 700; line-height: 1.1; }
.panel { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 1rem 1.25rem 1.25rem; margin: 1.5rem 0; }
.panel h2 { margin-top: 0; }
.toolbar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 1rem; margin-bottom: 1rem; }
.toolbar h2 { margin: 0; }
.filters { display: flex; gap: .25rem; flex-wrap: wrap; }
.filters a { padding: .3rem .7rem; border-radius: 999px; text-decoration: none; color: var(--muted); }
.filters a[aria-current] { background: var(--ink); color: #fff; }
.crumbs { display: flex; gap: .6rem; align-items: center; flex-wrap: wrap; margin-top: -.5rem; }
.hint { color: var(--muted); font-size: .9rem; margin: .25rem 0 .75rem; }

/* Tabeller */
.table-scroll { overflow-x: auto; }
.tbl { width: 100%; border-collapse: collapse; background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); }
.tbl th, .tbl td { text-align: left; padding: .6rem .75rem; border-bottom: 1px solid var(--line); vertical-align: top; }
.tbl th { font-size: .85rem; color: var(--muted); font-weight: 600; background: #f8fafb; }
.tbl th.r, .tbl td.r { text-align: right; }
.tbl tr.editing td { background: #fff8e6; }
.dot.ok { color: var(--ok); } .dot.warn { color: var(--warn); }

/* Formularer */
label { display: grid; gap: .3rem; font-weight: 600; font-size: .92rem; }
input, select, textarea { font: inherit; font-weight: 400; padding: .55rem .65rem; border: 1px solid #c3ccd1; border-radius: var(--radius); background: #fff; color: var(--ink); width: 100%; }
textarea { resize: vertical; line-height: 1.5; }
textarea.code { font-family: ui-monospace, Consolas, monospace; font-size: .85rem; }
input:focus, select:focus, textarea:focus { border-color: var(--accent); outline: 2px solid rgba(10,127,120,.25); outline-offset: 0; }
label.check { display: flex; align-items: center; gap: .5rem; font-weight: 400; }
label.check input { width: auto; }
fieldset { border: 1px solid var(--line); border-radius: var(--radius); padding: .75rem 1rem 1rem; margin: 0; display: grid; gap: .75rem; }
legend { font-weight: 700; padding: 0 .3rem; }
.form-stack { display: grid; gap: 1rem; }
.form-stack > .panel { margin: 0; }
.form-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 1rem; align-items: start; }
.form-grid fieldset, .form-grid .form-actions { grid-column: 1 / -1; }
.row { display: flex; gap: 1rem; flex-wrap: wrap; }
.row > * { flex: 1 1 180px; }
.row .grow { flex: 3 1 260px; }
.row.top { align-items: start; }
.short { max-width: 140px; }
.form-actions { display: flex; align-items: center; gap: 1rem; flex-wrap: wrap; }
.form-actions.sticky { position: sticky; bottom: 0; background: linear-gradient(transparent, var(--bg) 30%); padding: 1rem 0 .5rem; }
.editor textarea { border-top-left-radius: 0; border-top-right-radius: 0; }
.ed-tools { display: flex; flex-wrap: wrap; gap: 2px; background: #e7ecef; border: 1px solid #c3ccd1; border-bottom: 0; border-radius: var(--radius) var(--radius) 0 0; padding: 3px; }
.ed-tools button { border: 0; background: transparent; padding: .3rem .55rem; border-radius: 4px; cursor: pointer; font: inherit; font-size: .85rem; }
.ed-tools button:hover { background: #fff; }
.opts { max-width: 560px; }

.type-picker { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: .75rem; border: 0; padding: 0; }
.type-picker legend { margin-bottom: .5rem; padding: 0; }
.type-card { position: relative; border: 2px solid var(--line); border-radius: var(--radius); padding: 1rem; background: #fff; cursor: pointer; display: grid; gap: .3rem; font-weight: 400; }
.type-card input { position: absolute; opacity: 0; }
.type-card:has(input:checked) { border-color: var(--accent); background: #f0f9f8; }
.type-card:has(input:focus-visible) { outline: 3px solid #f2b705; }
.type-icon { width: 36px; height: 36px; border-radius: 50%; background: #e7ecef center/22px no-repeat; }
.type-tomside { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2322313a' stroke-width='2'%3E%3Cpath d='M6 3h9l4 4v14H6z'/%3E%3Cpath d='M9 12h7M9 16h7'/%3E%3C/svg%3E"); }
.type-rejser { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2322313a' stroke-width='2'%3E%3Ccircle cx='12' cy='12' r='9'/%3E%3Cpath d='M3 12h18M12 3c3 3 3 15 0 18M12 3c-3 3-3 15 0 18'/%3E%3C/svg%3E"); }
.type-opskrift { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2322313a' stroke-width='2'%3E%3Cpath d='M5 11h14a7 7 0 0 1-14 0zM8 7c0-2 2-2 2-4M12 7c0-2 2-2 2-4'/%3E%3C/svg%3E"); }

/* Billeder */
.upload-form { display: flex; gap: 1rem; align-items: end; flex-wrap: wrap; margin-bottom: 1rem; }
.file-drop { border: 2px dashed #c3ccd1; border-radius: var(--radius); padding: .75rem 1rem; background: #fff; font-weight: 400; flex: 1 1 280px; }
.file-drop input { border: 0; padding: .25rem 0; }
.file-names { font-size: .85rem; color: var(--muted); }
.img-list { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 1rem; }
.img-list li { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; display: grid; gap: .5rem; padding-bottom: .6rem; }
.img-list li.is-cover { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent); }
.thumb { position: relative; aspect-ratio: 4/3; background: #e7ecef; }
.thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.thumb .num, .thumb .cover-tag { position: absolute; top: .4rem; background: rgba(0,0,0,.65); color: #fff; font-size: .75rem; padding: .1rem .45rem; border-radius: 3px; }
.thumb .num { left: .4rem; } .thumb .cover-tag { right: .4rem; background: var(--accent); }
.cap-form { display: flex; gap: .4rem; padding: 0 .6rem; }
.cap-form input { padding: .35rem .5rem; font-size: .9rem; }
.img-actions { display: flex; gap: .75rem; padding: 0 .6rem; font-size: .9rem; flex-wrap: wrap; }
.current-img { margin-top: .5rem; display: grid; gap: .4rem; }
.current-img img { max-width: 100%; max-height: 160px; object-fit: cover; border-radius: var(--radius); border: 1px solid var(--line); }
.current-img.logo img { max-height: 70px; object-fit: contain; background: #22313a; padding: .5rem; }

/* Rejser */
.trip-form { display: flex; flex-wrap: wrap; gap: .75rem 1rem; align-items: end; }
.trip-form > label { flex: 1 1 160px; }
.trip-form .short { flex: 0 1 120px; }
.trip-form .grow { flex: 2 1 240px; }
.trip-form .coords { flex-basis: 100%; }
.trip-form .coords summary { cursor: pointer; color: var(--muted); font-size: .9rem; }
.trip-form .coords[open] { display: flex; gap: 1rem; flex-wrap: wrap; }
.trip-form .coords[open] summary { flex-basis: 100%; }
.trip-form .form-actions { flex-basis: 100%; }

/* Menu */
.menu-admin { list-style: none; margin: 0 0 1rem; padding: 0; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); }
.menu-admin li { display: flex; flex-wrap: wrap; gap: .5rem 1rem; align-items: center; padding: .6rem .9rem; border-bottom: 1px solid var(--line); }
.menu-admin li:last-child { border-bottom: 0; }
.menu-admin li.d1 { padding-left: 2.25rem; } .menu-admin li.d2 { padding-left: 3.75rem; }
.menu-admin li.d1 .mi-label::before, .menu-admin li.d2 .mi-label::before { content: "↳ "; color: var(--muted); }
.menu-admin li.editing { background: #fff8e6; }
.mi-label { font-weight: 600; }
.mi-target { font-size: .85rem; flex: 1; }
.mi-actions { display: flex; gap: .75rem; align-items: center; }
.menu-form { display: flex; flex-wrap: wrap; gap: .75rem 1rem; align-items: end; width: 100%; }
.menu-form > label { flex: 1 1 180px; }
.menu-form [hidden] { display: none; }

/* Templates */
.theme-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 1rem; }
.theme-card { border: 2px solid var(--line); border-radius: var(--radius); padding: .9rem; display: grid; gap: .4rem; cursor: pointer; font-weight: 400; background: #fff; position: relative; }
.theme-card input { position: absolute; opacity: 0; }
.theme-card.active, .theme-card:has(input:checked) { border-color: var(--accent); background: #f0f9f8; }
.theme-card:has(input:focus-visible) { outline: 3px solid #f2b705; }
.theme-card img { width: 100%; aspect-ratio: 16/9; object-fit: cover; border-radius: 4px; }
.swatches { display: flex; height: 54px; border-radius: 4px; overflow: hidden; border: 1px solid var(--line); }
.swatches span { flex: 1; }

/* Login / installation */
body.auth { display: grid; place-items: center; min-height: 100vh; padding: 1rem; background: var(--side); }
.auth-box { background: #fff; border-radius: 10px; padding: 2rem; width: min(400px, 100%); display: grid; gap: 1rem; }
.auth-box.wide { width: min(720px, 100%); }
.auth-box h1 { margin: 0; }
.auth-box form { display: grid; gap: 1rem; }
.checks { list-style: none; padding: 0; margin: 0; display: grid; gap: .3rem; }
.checks li::before { display: inline-block; width: 1.4rem; font-weight: 700; }
.checks li.ok::before { content: "✓"; color: var(--ok); }
.checks li.warn::before { content: "!"; color: var(--warn); }
.checks li.bad::before { content: "✕"; color: var(--err); }

/* Profilbilleder og brugere */
.avatar { border-radius: 50%; object-fit: cover; flex-shrink: 0; display: inline-block; vertical-align: middle; }
.avatar-ini { display: inline-grid; place-items: center; background: hsl(var(--hue, 180) 35% 42%); color: #fff; font-weight: 700; letter-spacing: .02em; }
.user-cell { display: flex; align-items: center; gap: .75rem; }
.users-tbl td { vertical-align: middle; }
.user-form { display: grid; grid-template-columns: 180px 1fr; gap: 1.5rem 2rem; align-items: start; }
@media (max-width: 700px) { .user-form { grid-template-columns: 1fr; } }
.avatar-edit { display: grid; gap: .6rem; justify-items: start; }
.avatar-preview .avatar { width: 112px; height: 112px; }
.avatar-edit .file-drop { width: 100%; padding: .5rem .6rem; font-size: .85rem; }
.btn-danger { background: var(--err); border-color: var(--err); color: #fff; }
.danger-zone { margin-top: 1.5rem; padding-top: 1.25rem; border-top: 1px solid var(--line); display: flex; justify-content: space-between; align-items: center; gap: 1rem; flex-wrap: wrap; }
.danger-zone .hint { margin: .2rem 0 0; }
.adm-me { display: flex; align-items: center; gap: .6rem; color: #fff !important; text-decoration: none; margin-bottom: .4rem; }
.adm-me > span { display: grid; line-height: 1.3; }
.adm-me .muted { font-size: .8rem; }


/* Tom side: almindelig side eller link */
[data-show-if][hidden] { display: none !important; }
.mode-wrap { display: grid; gap: 1rem; }
.mode-picker { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: .75rem; border: 0; padding: 0; }
.mode-picker legend { padding: 0; margin-bottom: .5rem; }
.mode-card { position: relative; border: 2px solid var(--line); border-radius: var(--radius); padding: .8rem 1rem; background: #fff; cursor: pointer; display: grid; gap: .2rem; font-weight: 400; }
.mode-card input { position: absolute; opacity: 0; }
.mode-card:has(input:checked) { border-color: var(--accent); background: #f0f9f8; }
.mode-card:has(input:focus-visible) { outline: 3px solid #f2b705; }
.link-fields { display: grid; gap: .6rem; max-width: 620px; padding: 1rem; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); }
.menu-place { margin: -.25rem 0 .25rem 1.6rem; max-width: 380px; }
.menu-place[hidden] { display: none; }
.menu-place .hint { margin: 0; }

/* Løb */
:root { --k-loeb: #2f7fd1; --k-stafet: #8b5cc8; --k-halvmaraton: #d6453d; --k-mtb: #3f9142; --k-cykling: #e09a1f; }
.k-loeb { --k: var(--k-loeb); } .k-stafet { --k: var(--k-stafet); } .k-halvmaraton { --k: var(--k-halvmaraton); }
.k-mtb { --k: var(--k-mtb); } .k-cykling { --k: var(--k-cykling); }
.kdot { display: inline-block; width: .7em; height: .7em; border-radius: 50%; background: var(--k, var(--accent)); margin-right: .4em; }
.race-form { display: grid; gap: 1.25rem; }
.kind-picker { display: flex; flex-wrap: wrap; gap: .5rem; border: 0; padding: 0; }
.kind-picker legend { padding: 0; margin-bottom: .5rem; }
.kind-card { position: relative; display: flex; align-items: center; padding: .6rem 1.1rem; border: 2px solid var(--line); border-radius: 999px; background: #fff; cursor: pointer; font-weight: 600; }
.kind-card input { position: absolute; opacity: 0; }
.kind-card:has(input:checked) { border-color: var(--k); background: color-mix(in srgb, var(--k) 10%, #fff); }
.kind-card:has(input:focus-visible) { outline: 3px solid #f2b705; }
.kind-card .kdot { width: .8em; height: .8em; }
.kind-card:has(.k-loeb) { --k: var(--k-loeb); } .kind-card:has(.k-stafet) { --k: var(--k-stafet); } .kind-card:has(.k-halvmaraton) { --k: var(--k-halvmaraton); }
.kind-card:has(.k-mtb) { --k: var(--k-mtb); } .kind-card:has(.k-cykling) { --k: var(--k-cykling); }
.race-fields { display: flex; flex-wrap: wrap; gap: .75rem 1rem; align-items: end; }
.race-fields[hidden] { display: none; }
.race-fields > label { flex: 1 1 170px; }
.race-fields .short { flex: 0 1 130px; }
.race-fields .short-date { flex: 0 1 170px; }
.race-fields .grow { flex: 2 1 260px; }
.race-fields .coords { flex-basis: 100%; }
.race-fields .coords summary { cursor: pointer; color: var(--muted); font-size: .9rem; }
.race-fields .coords[open] { display: flex; gap: 1rem; flex-wrap: wrap; }
.race-fields .coords[open] summary { flex-basis: 100%; }
.type-loeb { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2322313a' stroke-width='2' stroke-linecap='round'%3E%3Ccircle cx='14' cy='4.5' r='2'/%3E%3Cpath d='M7 21l3-6 3 2v5M6 12l3-4h4l3 3 3 1M10 15l1-4'/%3E%3C/svg%3E"); }
.week-hint { margin: 0; font-weight: 400; white-space: nowrap; }

/* Tekstbredde */
.width-wrap[hidden] { display: none; }
.width-picker { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .75rem; border: 0; padding: 0; max-width: 680px; }
.width-picker legend { padding: 0; margin-bottom: .5rem; }
.width-picker .hint { grid-column: 1 / -1; margin: 0; }
.width-card { position: relative; border: 2px solid var(--line); border-radius: var(--radius); padding: .75rem; background: #fff; cursor: pointer; display: grid; gap: .2rem; font-weight: 400; }
.width-card input { position: absolute; opacity: 0; }
.width-card:has(input:checked) { border-color: var(--accent); background: #f0f9f8; }
.width-card:has(input:focus-visible) { outline: 3px solid #f2b705; }
.width-card .muted { font-size: .82rem; }
.width-demo { display: grid; gap: 4px; height: 46px; padding: 6px; margin-bottom: .3rem; background: #e7ecef; border-radius: 4px; align-content: center; justify-items: center; }
.width-demo i { display: block; height: 5px; border-radius: 3px; background: #9aa9b1; width: var(--dw); }
.width-demo i:last-child { width: calc(var(--dw) * .6); justify-self: center; }
.width-demo.w-smal { --dw: 42%; } .width-demo.w-normal { --dw: 66%; } .width-demo.w-bred { --dw: 94%; }
.width-card:has(input:checked) .width-demo i { background: var(--accent); }
@media (max-width: 520px) { .width-picker { grid-template-columns: 1fr; } }

/* Mørk overgang – valg */
.fade-picker { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: .75rem; max-width: 680px; }
@media (max-width: 560px) { .fade-picker { grid-template-columns: repeat(2, 1fr); } }
.fade-card { position: relative; border: 2px solid var(--line); border-radius: var(--radius); padding: .6rem; background: #fff; cursor: pointer; display: grid; gap: .35rem; font-weight: 400; text-align: center; }
.fade-card input { position: absolute; opacity: 0; }
.fade-card:has(input:checked) { border-color: var(--accent); background: #f0f9f8; }
.fade-card:has(input:focus-visible) { outline: 3px solid #f2b705; }
.fade-demo { position: relative; display: block; height: 64px; border-radius: 4px; overflow: hidden;
  background: linear-gradient(135deg, #9cc7d9, #e9d9b0 60%, #d9a77c); }
.fade-demo::before { content: ""; position: absolute; inset: 0 0 auto; height: 70%; background: linear-gradient(to bottom, rgba(var(--frgb, 0, 0, 0),var(--f)) 0%, rgba(var(--frgb, 0, 0, 0),calc(var(--f)*.7)) 40%, rgba(var(--frgb, 0, 0, 0),calc(var(--f)*.25)) 75%, rgba(var(--frgb, 0, 0, 0),0) 100%); }
.fd-fra { --f: 0; } .fd-let { --f: .5; } .fd-normal { --f: .8; } .fd-kraftig { --f: 1; }
.fd-kraftig::before { height: 85%; }
.fd-menu { position: absolute; top: 9px; right: 8px; display: flex; gap: 4px; }
.fd-menu i { display: block; width: 14px; height: 4px; border-radius: 2px; background: #fff; }
.fade-height { display: grid; grid-template-columns: auto 1fr auto; gap: .5rem 1rem; align-items: center; max-width: 680px; margin-top: 1rem; }
.fade-height input[type=range] { padding: 0; accent-color: var(--accent); }
.fh-num { display: flex; align-items: center; gap: .4rem; font-weight: 400; }
.fh-num input { width: 6rem; }
.fade-height .hint { grid-column: 1 / -1; margin: 0; }
.fade-demo::before { height: var(--fh, 70%) !important; }
@media (max-width: 560px) { .fade-height { grid-template-columns: 1fr; } }
.fade-color { display: grid; gap: .4rem; max-width: 680px; margin-top: 1rem; }
.fade-color > label { font-weight: 600; }
.fc-row { display: flex; flex-wrap: wrap; align-items: center; gap: .6rem; }
.fc-row input[type=color] { width: 52px; height: 40px; padding: 2px; cursor: pointer; }
.fc-hex { width: 7.5rem; font-family: ui-monospace, Consolas, monospace; }
.fc-presets { display: flex; gap: .35rem; flex-wrap: wrap; }
.fc-swatch { width: 30px; height: 30px; border-radius: 50%; border: 2px solid #fff; box-shadow: 0 0 0 1px var(--line); cursor: pointer; padding: 0; }
.fc-swatch[aria-pressed="true"] { box-shadow: 0 0 0 2px var(--accent); }
.fade-color .hint { margin: 0; }
[data-show-select][hidden] { display: none; }
.menu-target { margin-top: .5rem; }
.menu-target .hint { font-weight: 400; margin: 0; }

/* Login: BWA-logo */
.bwa-brand { display: grid; justify-items: center; gap: .55rem; padding: .25rem 0 1.1rem; margin-bottom: .25rem; border-bottom: 1px solid var(--line); }
.bwa-mark { width: 88px; height: 88px; display: block; filter: drop-shadow(0 6px 14px rgba(34,49,58,.25)); }
.bwa-name { font-size: 1.05rem; font-weight: 600; letter-spacing: .02em; color: var(--ink); }
.auth-title { font-size: 1.35rem; margin: .25rem 0 0; }
.auth-sub { margin: -.6rem 0 0; }
.auth-box .btn { justify-content: center; }

/* ---------- Oversigt (dashboard) ---------- */
.quick { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 330px), 1fr)); gap: .9rem; margin-bottom: 1.5rem; }
.quick-card { display: grid; grid-template-columns: auto 1fr; gap: .75rem 1rem; align-items: center; background: var(--panel); border: 1px solid var(--line); border-left: 4px solid var(--accent); border-radius: var(--radius); padding: 1rem 1.1rem; }
.quick-card .type-icon { width: 44px; height: 44px; background-size: 24px; }
.qc-body { display: grid; line-height: 1.35; }
.qc-body strong { font-size: 1.05rem; }
.qc-actions { grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: .4rem; }
.notes { background: #fff8e6; border: 1px solid #f0dca8; border-radius: var(--radius); padding: .8rem 1.2rem; margin-bottom: 1.5rem; }
.notes h2 { font-size: 1rem; margin: 0 0 .4rem; }
.notes ul { margin: 0; padding: 0; list-style: none; display: grid; gap: .3rem; }
.notes li { padding-left: 1.5rem; position: relative; }
.notes li::before { position: absolute; left: 0; font-weight: 700; }
.note-err::before { content: "✕"; color: var(--err); }
.note-warn::before { content: "!"; color: var(--warn); }
.note-info::before { content: "i"; color: var(--accent); font-style: italic; }
.dash-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr)); gap: 1rem; margin-bottom: 1rem; }
.dash-panel { margin: 0; }
.kv { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .9rem 1rem; margin: 0; }
.kv div { display: grid; }
.kv dt { color: var(--muted); font-size: .85rem; }
.kv dd { margin: 0; font-size: 1.45rem; font-weight: 700; font-variant-numeric: tabular-nums; line-height: 1.2; }
.kv dd .small { font-size: .8rem; font-weight: 400; }
.dash-last { margin: 1rem 0 0; padding-top: .75rem; border-top: 1px solid var(--line); font-size: .92rem; }
.dash-last + .dash-last { margin-top: .4rem; padding-top: 0; border-top: 0; }
.logins { list-style: none; margin: 0 0 .6rem; padding: 0; display: grid; gap: .5rem; }
.logins li { display: grid; grid-template-columns: auto 1fr auto; gap: .6rem; align-items: center; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

/* ================= Indstillinger ================= */
.set-summary { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem 2rem; background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: .8rem 1.1rem; margin-bottom: 1.25rem; }
.set-summary > div { display: grid; line-height: 1.3; }
.set-summary .muted { font-size: .8rem; }
.set-summary .btn { margin-left: auto; }
.settings { display: grid; gap: 0; }
.set-tabs { display: flex; flex-wrap: wrap; gap: .25rem; border-bottom: 2px solid var(--line); margin-bottom: 1.25rem; }
.set-tabs a { display: inline-flex; align-items: center; gap: .5rem; padding: .7rem 1.1rem; color: var(--muted); text-decoration: none; font-weight: 600; border-bottom: 3px solid transparent; margin-bottom: -2px; border-radius: var(--radius) var(--radius) 0 0; }
.set-tabs a:hover { color: var(--ink); background: #e9eef1; }
.set-tabs a.on { color: var(--accent); border-bottom-color: var(--accent); background: var(--panel); }
.settings:not(.js-tabs) .set-tabs { display: none; }       /* uden JavaScript vises alle sektioner under hinanden */
.ti { width: 18px; height: 18px; background: currentColor; -webkit-mask: var(--m) center/contain no-repeat; mask: var(--m) center/contain no-repeat; }
.ti-site { --m: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2'%3E%3Crect x='3' y='4' width='18' height='16' rx='2'/%3E%3Cpath d='M3 9h18'/%3E%3C/svg%3E"); }
.ti-front { --m: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2'%3E%3Crect x='3' y='4' width='18' height='16' rx='2'/%3E%3Cpath d='M3 16l5-5 4 4 3-3 6 6'/%3E%3C/svg%3E"); }
.ti-look { --m: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2'%3E%3Cpath d='M12 3a9 9 0 1 0 0 18c1.5 0 2-1 2-2s-1-1.5-1-2.5 1-1.5 2-1.5h2a4 4 0 0 0 4-4c0-4.5-4-8-9-8z'/%3E%3Ccircle cx='7.5' cy='11' r='1.2'/%3E%3Ccircle cx='10' cy='7' r='1.2'/%3E%3Ccircle cx='15' cy='7.5' r='1.2'/%3E%3C/svg%3E"); }
.ti-map { --m: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2'%3E%3Cpath d='M12 21s-7-6.2-7-11.5a7 7 0 0 1 14 0C19 14.8 12 21 12 21z'/%3E%3Ccircle cx='12' cy='9.5' r='2.5'/%3E%3C/svg%3E"); }

.set-panel { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.5rem 1.5rem .5rem; margin-bottom: 1.25rem; }
.set-panel[hidden] { display: none; }
.sp-head { margin-bottom: 1rem; }
.sp-head h2 { margin: 0 0 .25rem; font-size: 1.3rem; }
.sp-head p { margin: 0; color: var(--muted); }
.set-row { display: grid; grid-template-columns: minmax(200px, 300px) 1fr; gap: 1rem 2rem; padding: 1.2rem 0; border-top: 1px solid var(--line); }
.sr-label label { font-size: 1rem; }
.sr-label p { margin: .25rem 0 0; color: var(--muted); font-size: .88rem; }
.sr-field { display: grid; gap: .6rem; align-content: start; max-width: 620px; }
.sr-field.two { grid-template-columns: 1fr 1fr; }
@media (max-width: 760px) { .set-row { grid-template-columns: 1fr; gap: .5rem; } .sr-field.two { grid-template-columns: 1fr; } }

.logo-prev { display: flex; align-items: center; min-height: 64px; padding: .75rem 1rem; background: #22313a; border-radius: var(--radius); color: #fff; font-weight: 700; font-size: 1.2rem; }
.logo-prev img { max-height: 48px; max-width: 100%; }
.hero-prev { position: relative; display: grid; align-content: end; aspect-ratio: 16 / 6; border-radius: var(--radius); overflow: hidden; color: #fff; padding: 1rem 1.2rem;
  background: linear-gradient(135deg, #3d5361, #22313a) center/cover no-repeat; }
.hero-prev::before { content: ""; position: absolute; inset: 0; background: linear-gradient(rgba(0,0,0,.15), rgba(0,0,0,.5)); }
.hero-prev > span { position: relative; }
.hp-title { font-size: 1.5rem; font-weight: 800; line-height: 1.1; }
.hp-sub { opacity: .9; }
.hp-empty { position: absolute !important; top: .8rem; right: 1rem; font-size: .8rem; opacity: .8; }

.tg-title { font-size: 1rem; margin: 1.25rem 0 .6rem; }
.tg-title:first-of-type { margin-top: .25rem; }
.theme-grid { grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); }
.theme-card { padding: .6rem; gap: .35rem; transition: border-color .15s, box-shadow .15s; }
.theme-card:hover { border-color: #a9d8d3; }
.theme-card.active, .theme-card:has(input:checked) { box-shadow: 0 0 0 3px rgba(10,127,120,.18); }
.tc-name { display: flex; align-items: center; justify-content: space-between; gap: .5rem; }
.tc-desc { font-size: .8rem; line-height: 1.35; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.tc-prev { font-size: .82rem; }
.tag-on { background: var(--accent); color: #fff; }
/* mini-side tegnet ud fra farveprøverne */
.tmock { display: grid; grid-template-rows: 12px 44px 1fr; height: 104px; border-radius: 5px; overflow: hidden; background: var(--bg); border: 1px solid rgba(0,0,0,.08); }
.tm-bar { background: var(--top); display: flex; gap: 4px; justify-content: flex-end; align-items: center; padding: 0 6px; }
.tm-bar i { width: 12px; height: 3px; border-radius: 2px; background: rgba(255,255,255,.8); }
.tm-hero { background: linear-gradient(135deg, var(--top), var(--acc)); display: grid; align-content: end; gap: 3px; padding: 6px 8px; }
.tm-hero b { width: 55%; height: 7px; border-radius: 3px; background: rgba(255,255,255,.95); }
.tm-hero em { width: 35%; height: 4px; border-radius: 2px; background: rgba(255,255,255,.7); }
.tm-body { display: grid; grid-template-columns: repeat(3, 1fr); gap: 5px; padding: 7px 8px; }
.tm-body i { border-radius: 3px; background: var(--x1); opacity: .85; }
.tm-body i:nth-child(2) { background: var(--acc); } .tm-body i:nth-child(3) { background: var(--x2); opacity: .6; }

.fade-box { margin-top: 1.75rem; padding-top: 1.25rem; border-top: 1px solid var(--line); padding-bottom: 1rem; }
.fade-box h3 { margin: 0 0 .2rem; }
.fade-layout { display: grid; grid-template-columns: minmax(280px, 1fr) minmax(280px, 1.1fr); gap: 1.5rem 2rem; align-items: start; margin-top: .75rem; }
@media (max-width: 900px) { .fade-layout { grid-template-columns: 1fr; } }
.fade-controls { display: grid; gap: 1.1rem; }
.seg { display: inline-flex; flex-wrap: wrap; border: 0; padding: 0; margin: 0; gap: 0; }
.seg legend { font-weight: 600; margin-bottom: .4rem; padding: 0; }
.seg label { position: relative; font-weight: 600; }
.seg input { position: absolute; opacity: 0; }
.seg span { display: block; padding: .45rem 1rem; border: 1px solid #c3ccd1; margin-left: -1px; background: #fff; cursor: pointer; }
.seg label:first-of-type span { border-radius: var(--radius) 0 0 var(--radius); margin-left: 0; }
.seg label:last-of-type span { border-radius: 0 var(--radius) var(--radius) 0; }
.seg input:checked + span { background: var(--accent); border-color: var(--accent); color: #fff; position: relative; z-index: 1; }
.seg input:focus-visible + span { outline: 3px solid #f2b705; outline-offset: 1px; }
.ctl { display: grid; gap: .35rem; }
.ctl > label { font-weight: 600; }
.ctl-row { display: flex; align-items: center; gap: .8rem; }
.ctl-row input[type=range] { flex: 1; padding: 0; accent-color: var(--accent); }
.ctl .hint { margin: 0; }
.fade-live { position: relative; display: block; aspect-ratio: 16 / 9; border-radius: 8px; overflow: hidden;
  background: var(--limg, linear-gradient(170deg, #a9d3e6 0%, #e9dcb4 55%, #c99c73 100%)) center/cover no-repeat; box-shadow: 0 6px 20px rgba(0,0,0,.12); }
.fl-fade { position: absolute; inset: 0 0 auto; height: var(--lh, 28px);
  background: linear-gradient(to bottom, rgba(var(--lrgb, 0,0,0), var(--lf)) 0%, rgba(var(--lrgb, 0,0,0), calc(var(--lf) * .7)) 38%, rgba(var(--lrgb, 0,0,0), calc(var(--lf) * .22)) 76%, rgba(var(--lrgb, 0,0,0), 0) 100%); }
.fl-bar { position: absolute; inset: 0 0 auto; height: 14%; display: flex; align-items: center; gap: 6px; padding: 0 4%; color: #fff; font-size: .8rem; }
.fl-bar b { margin-right: auto; }
.fl-bar i { width: 26px; height: 4px; border-radius: 2px; background: rgba(255,255,255,.9); }
.fl-cap { position: absolute; right: .6rem; bottom: .5rem; font-size: .72rem; color: #fff; background: rgba(0,0,0,.45); padding: .1rem .5rem; border-radius: 999px; }

.save-bar { position: sticky; bottom: 0; z-index: 5; display: flex; justify-content: flex-end; align-items: center; gap: 1rem; padding: .8rem 1rem; margin-top: .25rem;
  background: rgba(255,255,255,.96); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: 0 -4px 16px rgba(0,0,0,.06); }
.save-state { color: var(--warn); font-weight: 600; font-size: .92rem; }
.save-state::before { content: "● "; }

/* Sider: søgning og filtre */
.filters .cnt { display: inline-block; min-width: 1.4em; padding: 0 .35em; margin-left: .2em; border-radius: 999px; background: #e3e8eb; color: var(--muted); font-size: .78rem; text-align: center; }
.filters a[aria-current] .cnt { background: rgba(255,255,255,.25); color: #fff; }
.search-bar { display: flex; flex-wrap: wrap; gap: .6rem .8rem; align-items: end; background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: .8rem 1rem; margin-bottom: .6rem; }
.sb-q { flex: 1 1 280px; }
.sb-q input { padding-left: 2.2rem; background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2363727b' stroke-width='2.2'%3E%3Ccircle cx='11' cy='11' r='7'/%3E%3Cpath d='M20 20l-4-4'/%3E%3C/svg%3E") .7rem center/16px no-repeat; }
.sb-sel { display: grid; gap: .2rem; font-size: .8rem; color: var(--muted); }
.sb-sel select { padding: .5rem .6rem; font-size: .92rem; color: var(--ink); }
.sb-reset { align-self: center; font-size: .9rem; }
.result-count { margin: 0 0 .6rem; font-size: .9rem; }
.empty-result { background: var(--panel); border: 1px dashed var(--line); border-radius: var(--radius); padding: 1.25rem; text-align: center; color: var(--muted); }
mark.hit { background: #fff1a8; color: inherit; padding: 0 .1em; border-radius: 2px; }
.nowrap { white-space: nowrap; }

/* Oversigt: de sidste 3 login */
.logins { list-style: none; margin: 0 0 .6rem; padding: 0; display: grid; gap: .1rem; }
.logins li { display: grid; grid-template-columns: auto 1fr auto; gap: .75rem; align-items: center; padding: .55rem 0; border-bottom: 1px solid var(--line); }
.logins li:last-child { border-bottom: 0; }
.lg-who { display: grid; line-height: 1.35; }
.lg-when { font-size: .85rem; color: var(--muted); white-space: nowrap; }
.lg-failed { margin: .4rem 0 0; }
.lg-name { display: flex; flex-wrap: wrap; align-items: center; gap: .4rem; }

/* Oversigt: de sidste 3 login ved siden af hinanden */
.login-row { margin: .5rem 0 1.75rem; }
.lr-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: .5rem 1rem; margin-bottom: .75rem; }
.lr-head h2 { margin: 0; }
.login-cards { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1rem; }
@media (max-width: 900px) { .login-cards { grid-template-columns: 1fr; } }
.login-card { position: relative; display: grid; grid-template-columns: auto 1fr; gap: .8rem 1rem; align-items: center; background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.1rem 1.1rem 1rem; }
.login-card.is-current { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent); }
.lc-num { position: absolute; top: .5rem; right: .75rem; font-size: .75rem; font-weight: 700; color: var(--muted); }
.lc-body { display: grid; line-height: 1.35; }
.lc-body time { color: var(--muted); font-size: .9rem; }
.lc-meta { grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: .3rem 1.5rem; margin: 0; padding-top: .7rem; border-top: 1px solid var(--line); font-size: .88rem; }
.lc-meta div { display: grid; }
.lc-meta dt { color: var(--muted); font-size: .75rem; }
.lc-meta dd { margin: 0; font-weight: 600; }
.lc-tag { position: absolute; top: .45rem; right: 2rem; }

/* ================= Statistik ================= */
.stat-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .75rem; margin-bottom: 1rem; }
.live-pill { display: inline-flex; align-items: center; gap: .45rem; background: var(--panel); border: 1px solid var(--line); border-radius: 999px; padding: .3rem .8rem; font-size: .88rem; font-weight: 600; }
.live-dot { width: 9px; height: 9px; border-radius: 50%; background: #2fbf71; box-shadow: 0 0 0 0 rgba(47,191,113,.6); animation: live 2s infinite; }
@keyframes live { 70% { box-shadow: 0 0 0 8px rgba(47,191,113,0); } 100% { box-shadow: 0 0 0 0 rgba(47,191,113,0); } }
@media (prefers-reduced-motion: reduce) { .live-dot { animation: none; } }
.kpis { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1rem; margin-bottom: 1rem; }
@media (max-width: 800px) { .kpis { grid-template-columns: repeat(2, 1fr); } }
.kpi { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 1rem 1.1rem; display: grid; gap: .1rem; align-content: start; }
.kpi-label { color: var(--muted); font-size: .85rem; }
.kpi-num { font-size: 2rem; font-weight: 800; line-height: 1.1; font-variant-numeric: tabular-nums; }
.chg { justify-self: start; font-size: .78rem; font-weight: 700; padding: .05rem .45rem; border-radius: 999px; }
.chg.up { background: #e2f5e9; color: #1f7a44; } .chg.down { background: #fdeceb; color: #a8322b; } .chg.flat { background: #eef1f3; color: var(--muted); }
.chart-panel { margin-top: 0; }
.cp-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: .5rem; }
.cp-head h2 { margin: 0 0 .5rem; }
.legend { display: inline-flex; align-items: center; gap: .4rem; font-size: .85rem; color: var(--muted); }
.lg-bar { width: 12px; height: 12px; border-radius: 2px; background: #a9d8d3; margin-left: .6rem; }
.lg-line { width: 18px; height: 3px; border-radius: 2px; background: var(--accent); margin-left: .9rem; }
.chart-scroll { overflow-x: auto; }
.chart-svg { width: 100%; min-width: 560px; height: auto; display: block; }
.chart-svg .grid { stroke: #e6ebee; stroke-width: 1; }
.chart-svg .ax { font-size: 11px; fill: #7b8a92; font-family: inherit; }
.chart-svg .bar { fill: #a9d8d3; }
.chart-svg .bar:hover { fill: #7cc4bd; }
.chart-svg .line { fill: none; stroke: var(--accent); stroke-width: 2.5; stroke-linejoin: round; stroke-linecap: round; }
.chart-svg .dot { fill: #fff; stroke: var(--accent); stroke-width: 2; }
.stats-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 360px), 1fr)); gap: 1rem; }
.stats-grid .panel { margin: 0; }
.sub-h { font-size: .95rem; margin: 1.1rem 0 .5rem; }
.bar-list { list-style: none; margin: 0; padding: 0; display: grid; gap: .3rem; }
.bar-list li { position: relative; display: flex; justify-content: space-between; gap: 1rem; padding: .35rem .6rem; border-radius: 4px; overflow: hidden; font-size: .92rem; }
.bl-fill { position: absolute; inset: 0 auto 0 0; width: var(--w); background: #e3f3f1; z-index: 0; }
.bl-name, .bl-num { position: relative; z-index: 1; }
.bl-num { white-space: nowrap; font-variant-numeric: tabular-nums; font-weight: 600; }
.top-pages td:first-child { position: relative; }
.tp-bar { position: absolute; left: 0; top: 15%; bottom: 15%; width: var(--w); background: #e3f3f1; border-radius: 0 3px 3px 0; z-index: 0; }
.top-pages td a, .top-pages td span:not(.tp-bar) { position: relative; z-index: 1; }
.mini-bars { display: grid; grid-template-columns: repeat(var(--n), 1fr); gap: 3px; align-items: end; height: 150px; padding-bottom: 1.3rem; }
.mb { position: relative; height: 100%; display: flex; align-items: flex-end; }
.mb-fill { width: 100%; height: var(--h); min-height: 2px; background: var(--accent); border-radius: 2px 2px 0 0; opacity: .85; }
.mb:hover .mb-fill { opacity: 1; }
.mb-lbl { position: absolute; bottom: -1.25rem; left: 50%; transform: translateX(-50%); font-size: .68rem; color: var(--muted); }
.mini-bars[style*="--n:24"] .mb:nth-child(odd) .mb-lbl { visibility: hidden; }
.donut-wrap { display: flex; flex-wrap: wrap; align-items: center; gap: 1.25rem; }
.donut { width: 150px; height: 150px; transform: rotate(-90deg); }
.donut .ds { fill: none; stroke-width: 18; }
.donut text { transform: rotate(90deg); transform-origin: 60px 60px; }
.donut-num { font-size: 20px; font-weight: 800; fill: var(--ink); }
.donut-sub { font-size: 9px; fill: #7b8a92; }
.ds0 { stroke: #0a7f78; background: #0a7f78; } .ds1 { stroke: #e8a33d; background: #e8a33d; } .ds2 { stroke: #5b7bd5; background: #5b7bd5; } .ds3 { stroke: #c5cfd4; background: #c5cfd4; }
.donut-legend { list-style: none; margin: 0; padding: 0; display: grid; gap: .45rem; }
.donut-legend li { display: flex; align-items: center; gap: .5rem; }
.donut-legend .sw { width: 12px; height: 12px; border-radius: 3px; }
.dev { display: inline-block; width: 14px; height: 14px; margin-right: .4rem; vertical-align: -2px; background: var(--muted); -webkit-mask: var(--m) center/contain no-repeat; mask: var(--m) center/contain no-repeat; }
.dev-computer { --m: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2'%3E%3Crect x='3' y='4' width='18' height='12' rx='1.5'/%3E%3Cpath d='M8 20h8M12 16v4'/%3E%3C/svg%3E"); }
.dev-mobil { --m: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2'%3E%3Crect x='7' y='2' width='10' height='20' rx='2'/%3E%3Cpath d='M11 18h2'/%3E%3C/svg%3E"); }
.dev-tablet { --m: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2'%3E%3Crect x='4' y='2' width='16' height='20' rx='2'/%3E%3Cpath d='M11 18h2'/%3E%3C/svg%3E"); }
.latest td { vertical-align: middle; }
.empty-stats { text-align: center; padding: 2.5rem 1.5rem; }
.stat-settings .ss-form { display: grid; gap: .5rem; }
.ss-reset { margin-top: .75rem; }
.dash-visits .kv dd a { color: inherit; }
.kv dd.small-dd { font-size: 1rem; line-height: 1.3; padding-top: .2rem; }

/* Vandring */
.type-vandring { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2322313a' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M3 20l6-11 4 6 3-4 5 9z'/%3E%3Cpath d='M8 7l1.5-2.5L11 7'/%3E%3C/svg%3E"); }
.hike-fields { display: grid; gap: .75rem; max-width: 760px; }
.hike-auto { background: #e3f3f1; border: 1px solid #a9d8d3; border-radius: var(--radius); padding: .7rem 1rem; font-variant-numeric: tabular-nums; }
.hike-manual { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: .75rem; }
.hike-manual[hidden] { display: none; }
@media (max-width: 700px) { .hike-manual { grid-template-columns: 1fr 1fr; } }
.gpx-admin { margin-top: 2rem; }
.gpx-tbl td { vertical-align: middle; }
.gpx-tbl .tl-sw { display: inline-block; width: 22px; height: 5px; border-radius: 3px; }
.gpx-name { padding: 0; }
.gpx-name input { min-width: 180px; }

/* Hike portal: lidt varmere farver i administrationen */
:root { --side: #2b3f31; --accent: #3d6b4c; }
.bwa-name { font-family: "Segoe Script", "Caveat Brush", cursive; font-size: 1.35rem; letter-spacing: 0; }

/* Upload af mange billeder */
.file-drop.drag { border-color: var(--accent); background: #eef7f2; }
.up-progress { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: .8rem 1rem; margin: -.25rem 0 1rem; }
.up-bar { height: 10px; background: #e7ecef; border-radius: 5px; overflow: hidden; }
.up-bar span { display: block; height: 100%; width: 0; background: var(--accent); transition: width .2s; }
.up-status { margin: .5rem 0 0; font-weight: 600; }
.up-errors { margin: .4rem 0 0; padding-left: 1.2rem; color: var(--err); font-size: .9rem; }
.up-errors:empty { display: none; }
