:root {
  --bg: #ffffff; --fg: #0b1f3a; --muted: #5b6b82; --line: #d9e1ec; --card: #f4f7fb;
  --accent: #1f4e8c; --accent-fg: #ffffff; --danger: #b3261e;
  --c-police: #1f4e8c; --c-traffic: #c77700; --c-accident: #b3261e; --c-other: #5b6b82; --c-roadwork: #d9480f;
  --shadow: 0 6px 24px rgba(11,31,58,.18);
  --bar-h: 52px;
}
:root[data-theme="dark"] {
  --bg: #0b1f3a; --fg: #eaf1fb; --muted: #9db0c9; --line: #213a5e; --card: #12294a;
  --accent: #5aa2ff; --accent-fg: #06142a; --danger: #ff8a80;
  --c-police: #5aa2ff; --c-traffic: #f0a63a; --c-accident: #ff6b61; --c-other: #9db0c9; --c-roadwork: #ff8c42;
  --shadow: 0 6px 24px rgba(0,0,0,.5);
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0b1f3a; --fg: #eaf1fb; --muted: #9db0c9; --line: #213a5e; --card: #12294a;
    --accent: #5aa2ff; --accent-fg: #06142a; --danger: #ff8a80;
    --c-police: #5aa2ff; --c-traffic: #f0a63a; --c-accident: #ff6b61; --c-other: #9db0c9; --c-roadwork: #ff8c42;
    --shadow: 0 6px 24px rgba(0,0,0,.5);
  }
}
* { box-sizing: border-box; }
html, body { height: 100%; margin: 0; }
body { font: 16px/1.4 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; color: var(--fg); background: var(--bg); overflow: hidden; }
button { font: inherit; color: inherit; cursor: pointer; }

.bar { position: fixed; z-index: 1000; top: 0; left: 0; right: 0; height: calc(var(--bar-h) + env(safe-area-inset-top)); padding: env(safe-area-inset-top) 12px 0;
  display: flex; align-items: center; justify-content: space-between; background: var(--bg); border-bottom: 1px solid var(--line); }
.brand { display: flex; align-items: center; gap: 8px; font-weight: 700; letter-spacing: .2px; }
nav { display: flex; gap: 6px; }
.chip { border: 1px solid var(--line); background: var(--card); border-radius: 999px; padding: 6px 12px; font-size: 14px; text-decoration: none; color: var(--fg); }

#map { position: fixed; inset: calc(var(--bar-h) + env(safe-area-inset-top)) 0 0 0; background: var(--card); }
:root[data-theme="dark"] .leaflet-tile-pane { filter: invert(1) hue-rotate(200deg) brightness(.85) contrast(.9) saturate(.7); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .leaflet-tile-pane { filter: invert(1) hue-rotate(200deg) brightness(.85) contrast(.9) saturate(.7); } }
.leaflet-container { font: inherit; background: var(--card); }
.leaflet-control-attribution { font-size: 10px; }

.fabs { position: fixed; z-index: 900; right: 14px; bottom: calc(96px + env(safe-area-inset-bottom)); display: flex; flex-direction: column; gap: 10px; }
.fab { width: 46px; height: 46px; border-radius: 50%;
  border: 1px solid var(--line); background: var(--bg); color: var(--accent); box-shadow: var(--shadow); display: grid; place-items: center; }
.fab[aria-pressed="true"] { background: var(--accent); color: var(--accent-fg); border-color: var(--accent); }
.pin-wrap.camera { --c: #c9a227; }
.pin-wrap.camera .pin { width: 14px; height: 14px; border-radius: 3px; transform: none; border-width: 2px; }
.camera-note { font-size: 11px; color: var(--muted); margin: 0; }
.pin-wrap.camera { overflow: visible; }
.cam-dir { position: absolute; left: -5px; top: -5px; width: 24px; height: 24px; display: flex; justify-content: center; align-items: flex-start;
  color: #6b5200; pointer-events: none; filter: drop-shadow(0 0 1px #fff) drop-shadow(0 0 1px #fff); }
.cam-dir svg { width: 9px; height: 9px; margin-top: -4px; }
.cam-pop table { border-collapse: collapse; margin: 6px 0 4px; font-size: 13px; }
.cam-pop th { text-align: left; font-weight: 600; color: #5b6b82; padding: 1px 10px 1px 0; vertical-align: top; white-space: nowrap; }
.cam-pop td { padding: 1px 0; }
.cam-arrow { display: inline-block; vertical-align: -1px; line-height: 0; color: #1f4e8c; }
.cam-links { margin: 4px 0; font-size: 13px; }
.report { position: fixed; z-index: 900; left: 50%; transform: translateX(-50%); bottom: calc(22px + env(safe-area-inset-bottom));
  min-width: min(86vw, 360px); padding: 18px 28px; border: 0; border-radius: 999px; font-size: 20px; font-weight: 700;
  background: var(--accent); color: var(--accent-fg); box-shadow: var(--shadow); }
.report:active { transform: translateX(-50%) scale(.98); }

.sheet { position: fixed; z-index: 1100; left: 0; right: 0; bottom: 0; max-height: 80vh; overflow: auto; background: var(--bg); color: var(--fg);
  border-top-left-radius: 20px; border-top-right-radius: 20px; padding: 8px 16px calc(18px + env(safe-area-inset-bottom)); box-shadow: var(--shadow);
  border-top: 1px solid var(--line); max-width: 640px; margin: 0 auto; }
.sheet[hidden], #toast[hidden] { display: none; }
.grab { width: 40px; height: 4px; border-radius: 4px; background: var(--line); margin: 4px auto 10px; }
.sheet h2 { margin: 4px 0; font-size: 20px; }
.sheet h3 { margin: 16px 0 6px; font-size: 15px; color: var(--muted); }
.row { display: flex; align-items: center; } .between { justify-content: space-between; } .gap { gap: 8px; flex-wrap: wrap; }
.muted { color: var(--muted); } .small { font-size: 13px; }
.types { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 12px 0; }
.type { padding: 20px 8px; border-radius: 16px; border: 2px solid var(--line); background: var(--card); font-size: 18px; font-weight: 600; }
.type { display: flex; align-items: center; justify-content: center; gap: 8px; }
.type .ticon { width: 26px; height: 26px; padding: 5px; border-radius: 50%; background: var(--c); color: #fff; flex: none; }
.types .type:last-child:nth-child(odd) { grid-column: 1 / -1; }
.police { --c: var(--c-police); } .traffic { --c: var(--c-traffic); } .accident { --c: var(--c-accident); } .other { --c: var(--c-other); } .roadwork { --c: var(--c-roadwork); }
.type:hover, .type:focus-visible { border-color: var(--c); }
.primary, .secondary, .ghost { border-radius: 12px; padding: 10px 14px; border: 1px solid var(--accent); font-weight: 600; }
.primary { background: var(--accent); color: var(--accent-fg); }
.secondary { background: transparent; color: var(--accent); }
.ghost { background: transparent; border-color: var(--line); color: var(--muted); }
.ghost.danger { color: var(--danger); }
.x { border: 0; background: transparent; font-size: 20px; padding: 4px 8px; color: var(--muted); }
button:disabled { opacity: .5; cursor: default; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }

.comments { list-style: none; margin: 0 0 10px; padding: 0; display: grid; gap: 6px; }
.comments li { background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 8px 10px; display: flex; gap: 8px; justify-content: space-between; align-items: flex-start; }
.comments .txt { overflow-wrap: anywhere; } .comments .when { color: var(--muted); font-size: 12px; display: block; }
.comments button { border: 0; background: transparent; color: var(--muted); font-size: 12px; text-decoration: underline; padding: 2px; }
textarea { width: 100%; resize: none; border-radius: 12px; border: 1px solid var(--line); background: var(--card); color: var(--fg); padding: 10px; font: inherit; margin-bottom: 6px; }

#toast { position: fixed; z-index: 1200; left: 50%; transform: translateX(-50%); top: calc(var(--bar-h) + 14px + env(safe-area-inset-top)); max-width: 90vw;
  background: var(--fg); color: var(--bg); padding: 10px 16px; border-radius: 12px; box-shadow: var(--shadow); font-size: 14px; }

.pin { width: 28px; height: 28px; border-radius: 50% 50% 50% 0; transform: rotate(-45deg); background: var(--c); border: 3px solid #fff; box-shadow: 0 2px 6px rgba(0,0,0,.4); }
.pin-wrap { background: none; border: 0; }
.pin-wrap.police { --c: var(--c-police); } .pin-wrap.traffic { --c: var(--c-traffic); } .pin-wrap.accident { --c: var(--c-accident); } .pin-wrap.other { --c: var(--c-other); } .pin-wrap.roadwork { --c: var(--c-roadwork); }
.me { width: 16px; height: 16px; border-radius: 50%; background: #2f80ff; border: 3px solid #fff; box-shadow: 0 0 0 6px rgba(47,128,255,.25); }

/* privacy page */
.page { max-width: 680px; margin: 0 auto; padding: 24px 16px 60px; overflow: auto; height: 100%; }
body.doc { overflow: auto; }
.page h1 { font-size: 26px; } .page h2 { font-size: 18px; margin-top: 26px; } .page a { color: var(--accent); }

.en { display: none; } html[lang=en] .en { display: block; } html[lang=en] .sv { display: none; }
html[lang=en] .en.inl { display: inline; } .en.inl { display: none; }

/* tap-to-report: temporary pin + compact panel */
.pick { position: fixed; z-index: 1100; left: 8px; right: 8px; bottom: calc(10px + env(safe-area-inset-bottom)); max-width: 440px; margin: 0 auto;
  background: var(--bg); color: var(--fg); border: 1px solid var(--line); border-radius: 18px; padding: 10px 12px 8px; box-shadow: var(--shadow); }
.pick[hidden] { display: none; }
.pick h2 { margin: 0; font-size: 18px; }
.ptypes { display: grid; grid-template-columns: repeat(5, 1fr); gap: 6px; margin: 8px 0 4px; }
.ptype { padding: 12px 2px; min-height: 48px; border-radius: 12px; border: 2px solid var(--line); background: var(--card); font-size: 15px; font-weight: 600; }
.ptype { display: flex; flex-direction: column; align-items: center; gap: 3px; font-size: 12px; padding: 8px 2px; }
.ptype .ticon { width: 24px; height: 24px; padding: 4px; border-radius: 50%; background: var(--c); color: #fff; }
.ptype:hover, .ptype:focus-visible { border-color: var(--c); }
.pick .ghost { padding: 6px 12px; }
.pick p { margin: 4px 0 0; }
body.picking .report { display: none; }
body.picking .fabs { bottom: calc(150px + env(safe-area-inset-bottom)); }
.pin-wrap.pending { --c: var(--accent); cursor: grab; }
.pin-wrap.pending .pin { animation: drop .18s ease-out; outline: 2px dashed var(--c); outline-offset: 4px; border-radius: 50% 50% 50% 0; }
@keyframes drop { from { transform: translateY(-14px) rotate(-45deg); } to { transform: rotate(-45deg); } }
@media (prefers-reduced-motion: reduce) { .pin-wrap.pending .pin { animation: none; } }

/* terms link + first-visit disclaimer */
.legal { margin: 4px 0 0; } .legal a, .disclaimer a { color: var(--accent); }
.disclaimer { position: fixed; z-index: 1150; left: 8px; right: 8px; bottom: calc(10px + env(safe-area-inset-bottom)); max-width: 480px; margin: 0 auto;
  background: var(--bg); color: var(--fg); border: 1px solid var(--line); border-left: 4px solid var(--accent); border-radius: 18px; padding: 12px 14px; box-shadow: var(--shadow); }
.disclaimer[hidden] { display: none; }
.disclaimer h2 { margin: 0 0 4px; font-size: 17px; } .disclaimer p { margin: 0 0 10px; font-size: 14px; }
body.disclaiming .report, body.disclaiming .fabs { display: none; }
.notice { background: var(--card); border: 1px solid var(--line); border-left: 4px solid var(--accent); border-radius: 12px; padding: 10px 14px; margin: 14px 0; }
.notice ul { margin: 6px 0 0; padding-left: 20px; }
@media (max-width: 420px) { nav { gap: 4px; } .chip { padding: 6px 9px; font-size: 13px; } }
@media (max-width: 370px) { .brand span { display: none; } }

/* moderation page */
.mod input[type=password] { width: 100%; margin: 6px 0; padding: 10px; border-radius: 12px; border: 1px solid var(--line); background: var(--bg); color: var(--fg); font: inherit; }
.mod form label { display: block; }
.mod-list { list-style: none; padding: 0; margin: 12px 0; display: grid; gap: 12px; }
.mod-item { background: var(--card); border: 1px solid var(--line); border-left: 5px solid var(--c, var(--line)); border-radius: 14px; padding: 10px 12px; }
.mod-item p { margin: 6px 0; }
.mod-item.is-hidden { border-style: dashed; }
.mod-item .comments li { background: var(--bg); }
.mod-item .comments li.is-hidden { border-style: dashed; }
.mod-actions { margin-top: 8px; }
.mod-cbtns { display: flex; flex-direction: column; gap: 4px; align-items: flex-end; }
.mod-badge { font-size: 12px; font-weight: 600; padding: 2px 8px; border-radius: 999px; border: 1px solid var(--line); color: var(--muted); white-space: nowrap; }
.mod-badge.warn { color: var(--c-traffic); border-color: var(--c-traffic); }
.mod-badge.hid { color: var(--danger); border-color: var(--danger); }

/* settings / nära mig */
.toggle-row { display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; padding: 12px 0; border-top: 1px solid var(--line); }
.toggle-row .block { display: block; margin-top: 4px; max-width: 42ch; }
.toggle-row input[type=checkbox] { width: 44px; height: 28px; flex-shrink: 0; accent-color: var(--accent); margin-top: 2px; }

/* ---- licence plate search ---- */
.plate-form { margin: 10px 0 8px; }
.plate-row { display: flex; gap: 8px; align-items: stretch; }
.plate-row input { flex: 1; min-width: 0; font-size: 20px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase;
  padding: 12px 14px; border-radius: 12px; border: 1px solid var(--line); background: var(--card); color: var(--fg); }
.plate-result { margin-top: 12px; padding: 12px; border-radius: 12px; background: var(--card); border: 1px solid var(--line); }
.plate-status { margin: 0 0 10px; font-weight: 700; font-size: 16px; }
.plate-status.found { color: var(--c-police); }
.plate-status.miss { color: var(--muted); }
.plate-bil { display: inline-block; margin-bottom: 6px; }
.mod-plates { margin: 28px 0 16px; padding-top: 16px; border-top: 1px solid var(--line); }
.mod-plates h2 { font-size: 18px; margin: 0 0 8px; }
.mod-plates .plate-add { display: flex; gap: 8px; flex-wrap: wrap; margin: 10px 0; }
.mod-plates .plate-add input { flex: 1; min-width: 120px; padding: 10px 12px; border-radius: 10px; border: 1px solid var(--line);
  background: var(--card); color: var(--fg); font-size: 16px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; }
.mod-plate-list { list-style: none; padding: 0; margin: 0; }
.mod-plate-list li { display: flex; align-items: center; justify-content: space-between; gap: 8px; flex-wrap: wrap;
  padding: 10px 0; border-bottom: 1px solid var(--line); }
.mod-plate-list .plate-code { font-weight: 700; letter-spacing: .1em; font-variant-numeric: tabular-nums; }

/* ---- header menu (hamburger dropdown) ---- */
.menu-btn { display: inline-flex; align-items: center; gap: 6px; min-height: 40px; padding: 6px 14px; font-weight: 600; }
.menu-btn[aria-expanded="true"] { background: var(--accent); color: var(--accent-fg); border-color: var(--accent); }
.menu-btn:focus-visible, .menu-item:focus-visible, .menu-row:has(input:focus-visible) { outline: 2px solid var(--accent); outline-offset: 2px; }
.menu { position: fixed; z-index: 1050; top: calc(var(--bar-h) + env(safe-area-inset-top) + 6px); right: 10px; width: min(300px, calc(100vw - 20px));
  max-height: calc(100vh - var(--bar-h) - env(safe-area-inset-top) - 24px); overflow: auto;
  background: var(--bg); color: var(--fg); border: 1px solid var(--line); border-radius: 14px; box-shadow: var(--shadow); padding: 6px; }
.menu[hidden] { display: none; }
.menu hr { border: 0; border-top: 1px solid var(--line); margin: 6px 4px; }
.menu-h { margin: 6px 10px 2px; font-size: 12px; font-weight: 700; letter-spacing: .4px; text-transform: uppercase; color: var(--muted); }
.menu-item, .menu-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; width: 100%; min-height: 44px; padding: 8px 10px;
  border: 0; border-radius: 10px; background: transparent; color: var(--fg); font-size: 15px; text-align: left; text-decoration: none; cursor: pointer; }
.menu-item:hover, .menu-row:hover { background: var(--card); }
.menu-row > span { display: inline-flex; align-items: center; gap: 10px; }
.menu-row input[type=checkbox] { width: 40px; height: 24px; margin: 0; accent-color: var(--accent); flex-shrink: 0; }
.dot { width: 12px; height: 12px; border-radius: 3px; display: inline-block; border: 1.5px solid #0b1f3a; }
.dot.wx { background: #f2c200; }
.dot.cam { background: #c9a227; border-radius: 50%; }

/* ---- SMHI weather warnings sheet ---- */
.wx-list { list-style: none; margin: 8px 0 0; padding: 0; display: grid; gap: 8px; }
.wx-item { border: 1px solid var(--line); border-left: 6px solid #f2c200; border-radius: 10px; padding: 10px 12px; background: var(--card); }
.wx-item.lvl-orange { border-left-color: #f08a00; } .wx-item.lvl-red { border-left-color: #d62828; } .wx-item.lvl-message { border-left-color: var(--muted); }
.wx-item p { margin: 4px 0 0; }
.wx-head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.wx-badge { font-size: 12px; font-weight: 700; padding: 2px 8px; border-radius: 999px; background: #f2c200; color: #0b1f3a; }
.lvl-orange .wx-badge { background: #f08a00; } .lvl-red .wx-badge { background: #d62828; color: #fff; } .lvl-message .wx-badge { background: var(--line); color: var(--fg); }
.wx-text { white-space: pre-line; max-height: 7.5em; overflow: auto; }
.wx-go { margin-top: 8px; padding: 6px 12px; border-radius: 999px; border: 1px solid var(--line); font-size: 13px; }
.wx-msgs { margin-top: 12px; } .wx-msgs summary { cursor: pointer; font-weight: 600; padding: 6px 0; }

/* ---- old markers (past the active 2–3 h, kept greyed until 24 h) ---- */
.pin-wrap.old .pin { width: 20px; height: 20px; background: #4b5563; border: 2.5px solid #fff; box-shadow: 0 1px 4px rgba(0,0,0,.45); }
.dot.old { background: #9aa5b4; border-radius: 50%; opacity: .7; }
.old-note { margin: 2px 0 0; display: inline-block; padding: 2px 10px; border-radius: 999px; background: var(--line); color: var(--fg); font-weight: 600; }
.old-note[hidden] { display: none; }

/* ---- admin page (/moderation): navy / white / yellow, mobile first ---- */
body.adm { background: var(--bg); }
.adm .page, body.adm .page { padding-top: 12px; height: auto; min-height: 100%; }
.adm-bar { position: sticky; top: 0; z-index: 1000; display: flex; align-items: center; gap: 10px; padding: calc(10px + env(safe-area-inset-top)) 14px 10px;
  background: #0b1f3a; color: #fff; border-bottom: 3px solid #f2c200; }
.adm-back { color: #fff; text-decoration: none; font-size: 20px; line-height: 1; padding: 4px 6px; }
.adm-title { font-size: 18px; }
.adm-host { flex: 1; font-size: 12px; opacity: .75; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.adm-out { background: transparent; color: #fff; border: 1px solid rgba(255,255,255,.5); border-radius: 999px; padding: 6px 12px; font-size: 14px; }
.adm-card { background: var(--card); border: 1px solid var(--line); border-top: 4px solid #f2c200; border-radius: 16px; padding: 16px; margin: 12px 0; }
.adm-card h1 { margin: 0 0 6px; font-size: 22px; }
.adm-big { display: block; width: 100%; margin: 14px 0 4px; padding: 15px 16px; border-radius: 14px; border: 0; background: #0b1f3a; color: #fff;
  font-size: 17px; font-weight: 700; box-shadow: inset 0 -3px 0 #f2c200; }
:root[data-theme="dark"] .adm-big { background: #f2c200; color: #0b1f3a; box-shadow: none; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .adm-big { background: #f2c200; color: #0b1f3a; box-shadow: none; } }
.adm-big:disabled { opacity: .6; }
.adm-input, .mod input[type=password] { width: 100%; margin: 6px 0; padding: 11px 12px; border-radius: 12px; border: 1px solid var(--line); background: var(--bg); color: var(--fg); font: inherit; font-size: 16px; }
.adm-tok { margin-top: 14px; border-top: 1px solid var(--line); padding-top: 10px; }
.adm-tok summary { color: var(--muted); cursor: pointer; }
.adm-tok[hidden] { display: none; }
.adm-ok { border-left-color: #2e7d32; } .adm-err { border-left-color: var(--danger); }
.adm-tabs { display: flex; gap: 6px; overflow-x: auto; -webkit-overflow-scrolling: touch; scrollbar-width: none; margin: 4px -16px 12px; padding: 4px 16px 8px;
  background: var(--bg); }
.adm-tabs::-webkit-scrollbar { display: none; }
.adm-tabs button { flex: 0 0 auto; border: 1px solid var(--line); background: var(--card); color: var(--fg); border-radius: 999px; padding: 8px 14px; font-size: 14px; font-weight: 600; }
.adm-tabs button[aria-selected="true"] { background: #0b1f3a; color: #fff; border-color: #0b1f3a; box-shadow: inset 0 -3px 0 #f2c200; }
.adm-tab h2 { margin: 6px 0 10px; }
.adm-select { padding: 8px 10px; border-radius: 10px; border: 1px solid var(--line); background: var(--card); color: var(--fg); font: inherit; font-size: 15px; }
.adm-kpis { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin: 8px 0 12px; }
.adm-kpi { background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 8px 10px; border-left: 4px solid #f2c200; }
.adm-kpi.police { border-left-color: var(--c-police); } .adm-kpi.traffic { border-left-color: var(--c-traffic); }
.adm-kpi.accident { border-left-color: var(--c-accident); } .adm-kpi.other { border-left-color: var(--c-other); }
.adm-kpi strong { display: block; font-size: 20px; font-variant-numeric: tabular-nums; }
.adm-kpi span { font-size: 12px; color: var(--muted); }
.adm-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.adm-table { width: 100%; border-collapse: collapse; font-size: 14px; font-variant-numeric: tabular-nums; }
.adm-table th { text-align: left; font-size: 12px; color: var(--muted); font-weight: 600; padding: 6px 6px; border-bottom: 2px solid var(--line); white-space: nowrap; }
.adm-table td { padding: 7px 6px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.adm-table a { color: var(--accent); }
.adm-bar-w { display: inline-block; width: 60px; height: 8px; background: var(--card); border-radius: 4px; overflow: hidden; vertical-align: middle; }
.adm-bar-v { display: block; height: 100%; background: #f2c200; }
.adm-dot { display: inline-flex; align-items: center; gap: 6px; }
.adm-dot::before { content: ''; width: 10px; height: 10px; border-radius: 50%; background: var(--c-other); }
.adm-dot.police::before { background: var(--c-police); } .adm-dot.traffic::before { background: var(--c-traffic); } .adm-dot.accident::before { background: var(--c-accident); }
.adm-st { font-size: 12px; font-weight: 600; padding: 2px 8px; border-radius: 999px; border: 1px solid var(--line); color: var(--muted); }
.adm-st.aktiv { color: #2e7d32; border-color: #2e7d32; } .adm-st.dold { color: var(--danger); border-color: var(--danger); }
.adm-map { height: 300px; border-radius: 14px; border: 1px solid var(--line); margin: 0 0 12px; overflow: hidden; background: var(--card); }
.adm-linkbox input { font-size: 13px; }
.adm-btnlink { text-decoration: none; display: inline-block; }
.adm-btnlink[hidden] { display: none; }
#pk-make { margin: 6px 0 10px; }
@media (min-width: 640px) { .adm-kpis { grid-template-columns: repeat(6, 1fr); } .adm-map { height: 380px; } }

/* heading-up ("Körriktning upp"): #map clips, #lmap (the Leaflet container) is oversized + rotated around the centre */
#map { overflow: hidden; --map-rot: 0deg; }
#lmap { position: absolute; left: 0; top: 0; width: 100%; height: 100%; transform-origin: 50% 50%; will-change: auto; }
#map.rotating #lmap { will-change: transform; }
.up { width: 100%; height: 100%; transform: rotate(calc(-1 * var(--map-rot))); transform-origin: 50% 100%; }
.up-pop { position: relative; transform: rotate(calc(-1 * var(--map-rot))); transform-origin: 50% 100%; }
.me-wrap { position: relative; width: 16px; height: 16px; }
.me-wrap .me { position: absolute; left: 0; top: 0; }
.me-arrow { position: absolute; left: -14px; top: -14px; width: 44px; height: 44px; display: none; pointer-events: none; }
.me-arrow::before { content: ""; position: absolute; left: 50%; top: 0; margin-left: -7px; border: 7px solid transparent; border-top: 0; border-bottom: 11px solid #2f80ff;
  filter: drop-shadow(0 0 1.5px #fff) drop-shadow(0 0 1px #fff); }
.me-wrap.has-heading .me-arrow { display: block; }
.fab.compass svg { transition: none; overflow: visible; }
.fab.compass .n { fill: #d62828; }
.fab.compass .s { fill: currentColor; opacity: .45; }
.fab.compass .hub { fill: var(--bg); stroke: currentColor; stroke-width: 1; }
.fab.compass[aria-pressed="true"] .n { fill: #ffc83d; } /* heading-up: filled navy button, yellow north tip */
.fab.compass[aria-pressed="true"] .s { opacity: .7; }
.fab.compass[aria-pressed="true"] .hub { fill: var(--accent); stroke: var(--accent-fg); }

/* report preview (snapped, draggable pin + confirm) */
.confirm .cf-road { margin: 6px 0 0; font-weight: 600; font-size: 15px; }
.confirm .cf-road:empty { display: none; }
.confirm .cf-actions { margin: 10px 0 2px; }
.confirm .cf-actions .primary { flex: 1; min-height: 46px; font-size: 16px; }
.confirm .cf-actions .ghost { min-height: 46px; padding: 10px 16px; }

/* type glyph inside map pins (the pin itself is rotated, the glyph is not) */
.pin-wrap .up { position: relative; }
.pin-wrap .pin-ico { position: absolute; left: 7px; top: 5px; width: 14px; height: 14px; color: #fff; pointer-events: none; }
.pin-wrap.old .pin-ico { left: 5px; top: 4px; width: 10px; height: 10px; }
