/* Buchtenfinder admin – quiet work tool, follows the system light/dark theme. */
:root {
  --bg: #f3f5f7; --panel: #fff; --fg: #14202b; --muted: #5d6b78; --line: #dfe5ea; --hover: #eef2f6; --active: #e3effa;
  --accent: #eb6a0a; --accent-fg: #fff; --sea: #1f6fb2; --ok: #149e86; --bad: #d64533; --field: #fff;
  --protected: #3fd9bf; --exposed: #ff7361;
  --font: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Helvetica Neue", Arial, sans-serif;
  --font-logo: "Helvetica Neue", Helvetica, Arial, sans-serif;
  --font-round: ui-rounded, "SF Pro Rounded", -apple-system, BlinkMacSystemFont, sans-serif;
  --radius: 12px;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0d1318; --panel: #151d26; --fg: #e8eef4; --muted: #93a2b1; --line: #26333f; --hover: #1c2632; --active: #1d3347;
    --field: #0f161d; --ok: #3fd9bf; --bad: #ff7361;
    color-scheme: dark;
  }
}
/* Logo font: Graphik (if installed) → Futura (built into macOS/iOS) → Jost (free Futura-like font, served from
   our own server – deliberately not from Google Fonts, see fonts/Jost-OFL.txt). */
@font-face { font-family: "BF Jost"; src: url("../fonts/jost-latin-600-normal.woff2") format("woff2"); font-weight: 600; font-style: normal; font-display: swap; }
* { box-sizing: border-box; }
html, body { height: 100%; margin: 0; }
body { font: 14px/1.45 var(--font); background: var(--bg); color: var(--fg); -webkit-font-smoothing: antialiased; }
[hidden] { display: none !important; }
button, input, select, textarea { font: inherit; color: inherit; }
.muted { color: var(--muted); }
.small { font-size: 12.5px; }
.ok { color: var(--ok); }

.logo { white-space: nowrap; display: inline-grid; gap: 4px; justify-items: start; } /* millemari. above BUCHTENFINDER ONLINE, like on the map */
.mm { color: var(--accent); font: 600 24px/1 "Graphik", "Graphik Semibold", "Futura", "Futura PT", "BF Jost", "Century Gothic", sans-serif; letter-spacing: -0.02em; }
/* Same wordmark as the map: BUCHTENFINDER 2027 in capitals, Helvetica Neue bold */
.logo strong { font: 700 13px/1 var(--font); letter-spacing: .18em; text-transform: uppercase; color: var(--ink, #14202b); }
.logo .year { margin-left: .25em; }
.tag { margin-left: 10px; font-size: 13px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); border: 1.5px solid var(--line); border-radius: 999px; padding: 4px 12px; vertical-align: 5px; }
@media (max-width: 760px) { .logo strong { font-size: 11px; letter-spacing: .14em; } .mm { font-size: 19px; } .tag { font-size: 11px; padding: 3px 9px; vertical-align: 3px; } }

/* ---- buttons + fields ---- */
.btn { color: var(--fg); display: inline-flex; align-items: center; justify-content: center; gap: 6px; border: 1px solid var(--line); background: var(--panel); border-radius: 10px; padding: 8px 14px; cursor: pointer; text-decoration: none; white-space: nowrap; font-weight: 500; }
.btn:hover { background: var(--hover); }
.btn.primary { background: var(--accent); border-color: var(--accent); color: var(--accent-fg); font-weight: 600; }
.btn.primary:hover { filter: brightness(1.06); }
.btn.primary:disabled { opacity: .5; cursor: default; filter: none; }
.btn.ghost { background: none; border-color: transparent; }
.btn.ghost:hover { background: var(--hover); }
.btn.danger-ghost { background: none; border-color: transparent; color: var(--bad); }
.btn.danger-ghost:hover { background: color-mix(in srgb, var(--bad) 12%, transparent); }
.btn.danger { background: var(--bad); border-color: var(--bad); color: #fff; font-weight: 600; }
.btn:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible { outline: 2px solid var(--sea); outline-offset: 1px; }

label { display: grid; align-content: start; gap: 4px; font-size: 12.5px; font-weight: 600; color: var(--muted); }
input:not([type=checkbox]):not([type=file]), select, textarea {
  width: 100%; min-width: 0; border: 1px solid var(--line); background: var(--field); border-radius: 9px; padding: 8px 10px; font-size: 14px; font-weight: 400; color: var(--fg);
}
textarea { resize: vertical; line-height: 1.45; }
.invalid { border-color: var(--bad) !important; background: color-mix(in srgb, var(--bad) 7%, var(--field)) !important; }
.field-error { color: var(--bad); font-weight: 500; font-size: 12px; }
.form-error { color: var(--bad); margin: 0; min-height: 0; }
.form-error:empty { display: none; }
.form-error.banner { background: color-mix(in srgb, var(--bad) 10%, var(--panel)); border: 1px solid color-mix(in srgb, var(--bad) 35%, transparent); border-radius: 10px; padding: 10px 14px; margin: 0 0 14px; }
.dm { font-weight: 500; color: var(--muted); font-variant-numeric: tabular-nums; }

/* ---- login ---- */
.auth { min-height: 100%; display: grid; place-items: center; padding: 24px; }
.auth-card { width: min(420px, 100%); grid-template-columns: minmax(0, 1fr); background: var(--panel); border: 1px solid var(--line); border-radius: 18px; padding: 28px; display: grid; gap: 14px; box-shadow: 0 10px 40px rgba(0,0,0,.08); }
.auth-card h1 { margin: 6px 0 0; font: 700 22px/1.2 var(--font-round); }
.auth-card p { margin: 0; }

/* ---- shell ---- */
.shell { height: 100vh; height: 100dvh; display: grid; grid-template-columns: var(--side-w, 320px) minmax(0, 1fr); grid-template-rows: auto minmax(0, 1fr); }
.topbar { grid-column: 1 / -1; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 16px; background: var(--panel); border-bottom: 1px solid var(--line); }
.top-actions { display: flex; gap: 2px; flex-wrap: wrap; justify-content: flex-end; }
.sidebar { position: relative; display: flex; flex-direction: column; min-height: 0; min-width: 0; background: var(--panel); border-right: 1px solid var(--line); }
/* Drag handle on the right edge of the list: changes its width (remembered per browser). */
.side-resize { position: absolute; top: 0; bottom: 0; right: -4px; width: 8px; z-index: 6; cursor: col-resize; touch-action: none; }
.side-resize::after { content: ""; position: absolute; top: 0; bottom: 0; left: 3px; width: 2px; background: var(--accent); opacity: 0; transition: opacity .15s; }
.side-resize:hover::after, .side-resize:focus-visible::after, .side-resize.drag::after { opacity: 1; }
.side-resize:focus-visible { outline: none; }
body.resizing, body.resizing * { cursor: col-resize !important; user-select: none !important; }
.side-tools { display: grid; grid-template-columns: 1fr auto auto; gap: 8px; padding: 12px; border-bottom: 1px solid var(--line); }
/* List filters – same as the map's list (Schutz vor, Typ, SLI, NI). */
.tool { position: relative; display: grid; place-items: center; width: 36px; height: 36px; padding: 0; border: 1px solid var(--line); border-radius: 10px; background: none; color: var(--fg); cursor: pointer; }
.tool svg { width: 18px; height: 18px; }
.tool:hover, .tool[aria-expanded="true"] { background: var(--hover); }
.tool.on { color: var(--accent); border-color: var(--accent); }
.tool-badge { position: absolute; top: -6px; right: -6px; min-width: 17px; height: 17px; padding: 0 4px; border-radius: 999px; background: var(--accent); color: #fff; font: 700 10.5px/17px var(--font); text-align: center; }
.filters { grid-column: 1 / -1; display: grid; gap: 10px; padding-top: 4px; }
.filter { display: grid; gap: 6px; }
.filter-label { font-size: 11px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.chips { display: flex; flex-wrap: wrap; gap: 5px; }
.chip { border: 1px solid var(--line); background: none; border-radius: 999px; padding: 3px 9px; font: 12px var(--font); color: var(--fg); cursor: pointer; }
.chip:hover { background: var(--hover); }
.chip[aria-pressed="true"] { background: var(--protected); border-color: var(--protected); color: #08261f; font-weight: 600; }
.chip.sel[aria-pressed="true"] { background: var(--accent); border-color: var(--accent); color: #fff; }
.chip .ci { width: 13px; height: 13px; vertical-align: -2px; margin-right: 4px; }
.filter-reset { justify-self: start; border: 0; background: none; padding: 0; color: var(--accent); font: 600 12.5px var(--font); cursor: pointer; }
.filter-reset:hover { text-decoration: underline; }
.bitem.dimmed { opacity: .35; }
.blist { flex: 1; min-height: 0; overflow-y: auto; padding: 4px 8px 24px; }
.blist h3 { margin: 14px 8px 4px; font: 700 13px/1.2 var(--font-round); text-transform: uppercase; letter-spacing: .06em; color: var(--muted); display: flex; justify-content: space-between; }
/* Region header: name, count, fold triangle at the far right (down = open, right = folded) */
.bhead { width: 100%; display: flex; align-items: center; gap: 8px; margin: 10px 0 2px; padding: 6px 8px; border: 0; border-radius: 8px; background: none; cursor: pointer; text-align: left;
  font: 700 13px/1.2 var(--font-round); text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
.bhead:hover { background: var(--hover); }
.bhead .bh-name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bhead .bh-n { font-variant-numeric: tabular-nums; }
.bhead .bh-tri { display: grid; place-items: center; width: 18px; color: var(--fg); }
.bhead .bh-tri svg { width: 11px; height: 11px; transition: transform .2s ease; }
.bhead.collapsed .bh-tri svg { transform: rotate(-90deg); }
.bitem { width: 100%; display: grid; grid-template-columns: 1fr auto; gap: 2px 8px; align-items: center; text-align: left; background: none; border: 0; border-radius: 9px; padding: 7px 8px; cursor: pointer; }
.bitem:hover { background: var(--hover); }
.bitem.active { background: var(--active); }
.bitem .n { font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bitem .i { grid-column: 1; font-size: 12px; color: var(--muted); }
.bitem .badges { grid-row: 1 / span 2; grid-column: 2; display: flex; gap: 4px; }
.badge { font-size: 11px; font-weight: 600; padding: 1px 7px; border-radius: 999px; background: var(--hover); color: var(--muted); font-variant-numeric: tabular-nums; }
.badge .b-ico { font-size: 1.1em; line-height: 1; }
.badge.sli { background: color-mix(in srgb, var(--accent) 16%, transparent); color: var(--accent); }
.bempty { padding: 16px 8px; color: var(--muted); }

/* ---- editor ---- */
.editor { min-width: 0; min-height: 0; overflow-y: auto; padding: 18px 22px 60px; }
.empty-state { height: 100%; display: grid; place-content: center; text-align: center; }
.empty-state h2 { margin: 0 0 4px; font: 700 20px var(--font-round); }
.ed-head { position: sticky; top: -18px; z-index: 5; display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: -18px -22px 14px; padding: 14px 22px; background: color-mix(in srgb, var(--bg) 88%, transparent); -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px); border-bottom: 1px solid var(--line); }
.ed-head h2 { margin: 0; font: 700 22px/1.2 var(--font-round); }
.ed-head p { margin: 2px 0 0; }
.ed-actions { display: flex; gap: 6px; align-items: center; }
.dirty-dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--accent); margin-left: 8px; vertical-align: 3px; }

.cards { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; max-width: 1200px; }
.card { margin: 0; min-width: 0; background: var(--panel); border: 1px solid var(--line); border-radius: 16px; padding: 14px 16px 16px; display: grid; gap: 12px; align-content: start; }
.card-title { margin: 0 0 2px; font: 700 15px/1.2 var(--font-round); color: var(--fg); }
.span2 { grid-column: 1 / -1; }
.cards > .col { display: grid; gap: 14px; align-content: start; min-width: 0; } /* left + right column, each box only as tall as it needs */
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.row3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.sub { font-size: 12.5px; font-weight: 600; color: var(--muted); margin-bottom: -6px; }

.map-wrap { position: relative; }
.map { height: 360px; border-radius: 12px; overflow: hidden; background: #0b1520; }
/* Zoom buttons top left – the glass look of the map page */
.map-zoom { position: absolute; left: 12px; top: 12px; z-index: 5; display: grid; border-radius: 18px; overflow: hidden; color: #fff;
  background: rgba(16, 22, 30, 0.26); -webkit-backdrop-filter: blur(34px) saturate(180%); backdrop-filter: blur(34px) saturate(180%);
  border: 1px solid rgba(255, 255, 255, 0.22); box-shadow: 0 10px 40px rgba(0, 0, 0, .35), inset 0 1px 0 rgba(255, 255, 255, .12); }
.map-zoom[hidden] { display: none; }
.map-zoom .ctl { display: grid; place-items: center; width: 52px; height: 52px; padding: 0; border: 0; border-radius: 0; background: none; color: #fff; cursor: pointer; }
.map-zoom .ctl + .ctl { border-top: 1px solid rgba(255, 255, 255, 0.22); }
.map-zoom .ctl svg { width: 22px; height: 22px; filter: drop-shadow(0 1px 2px rgba(0,0,0,.45)); }
.map-zoom .ctl:hover { background: rgba(255,255,255,.14); }
.map-zoom .ctl:focus-visible { outline: 2px solid rgba(255,255,255,.7); outline-offset: -3px; }
.map-hint { position: absolute; left: 10px; bottom: 10px; margin: 0; padding: 5px 10px; border-radius: 8px; background: rgba(10,16,24,.66); color: #fff; font-size: 12px; pointer-events: none; }
.pin { width: 22px; height: 22px; border-radius: 50%; background: var(--accent); border: 3px solid #fff; box-shadow: 0 2px 8px rgba(0,0,0,.6); cursor: grab; }
.other { width: 8px; height: 8px; border-radius: 50%; background: rgba(255,255,255,.75); border: 1px solid rgba(0,0,0,.4); }

.thunder-row { display: grid; gap: 8px; }
.sub-row { display: flex; justify-content: space-between; align-items: baseline; }
.sub-row .sub { margin: 0; }
.linkbtn { background: none; border: 0; padding: 0; color: var(--sea); font-size: 12.5px; font-weight: 600; cursor: pointer; }
.linkbtn:hover { text-decoration: underline; }
.thunder-pick { display: flex; flex-wrap: wrap; gap: 6px; }
.th { display: inline-flex; align-items: center; gap: 7px; border: 1px solid var(--line); background: none; border-radius: 999px; padding: 4px 11px 4px 5px; cursor: pointer; font-size: 13px; }
.th i { width: 20px; height: 20px; border-radius: 50%; background: var(--c); border: 1px solid rgba(0,0,0,.15); display: grid; place-items: center; font: 700 10.5px/1 var(--font-round); font-style: normal; color: var(--t); }
.th:hover { background: var(--hover); }
.th[aria-checked="true"] { border-color: var(--fg); box-shadow: inset 0 0 0 1px var(--fg); font-weight: 600; }
.th.none i { background: none; border: 1px dashed var(--muted); }
.badge.th-badge { color: var(--t); background: var(--c); }
.lv-grid { display: grid; grid-template-columns: auto 52px 1fr; gap: 8px 10px; align-items: center; }
.lv-grid input[type=color] { width: 52px; height: 36px; padding: 2px; border: 1px solid var(--line); border-radius: 9px; background: var(--field); cursor: pointer; }
.lv-num { font-weight: 700; color: var(--muted); width: 1.5em; text-align: right; }
.lv-prev { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 4px; }
.lv-prev span { width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center; font: 700 13px var(--font-round); border: 2px solid #fff; box-shadow: 0 1px 4px rgba(0,0,0,.35); }

.switch { display: flex; align-items: flex-start; gap: 12px; font-size: 14px; font-weight: 500; color: var(--fg); cursor: pointer; }
.switch input { width: 20px; height: 20px; margin: 1px 0 0; accent-color: var(--accent); flex: none; cursor: pointer; }
.switch small { display: block; font-weight: 400; color: var(--muted); font-size: 12.5px; margin-top: 2px; }

.set-sec { font: 700 13px/1.2 var(--font-round); text-transform: uppercase; letter-spacing: .06em; color: var(--muted); margin-top: 6px; }
.set-links { display: flex; flex-wrap: wrap; gap: 8px; }
.gate-img-edit { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
#gateImgBox { display: flex; align-items: center; gap: 10px; }
#gateImgBox img { width: 72px; height: 96px; object-fit: cover; border-radius: 8px; border: 1px solid var(--line); }
.gate-img-edit label.btn { display: inline-flex; color: var(--fg); font-size: 14px; font-weight: 500; cursor: pointer; }
#consentBox { display: grid; gap: 10px; }
.consent-edit { display: grid; gap: 4px; margin-top: 8px; }
.consent-edit textarea { font-size: 13.5px; }
label.inline { display: flex; align-items: center; gap: 6px; font-weight: 500; }
label.inline input { width: 16px; height: 16px; accent-color: var(--accent); }
.muted-box { opacity: .45; }
dialog.wide { width: min(860px, calc(100% - 24px)); }
.mtable-wrap { max-height: 55vh; overflow: auto; border: 1px solid var(--line); border-radius: 12px; }
.mtable { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.mtable th { position: sticky; top: 0; background: var(--panel); text-align: left; font-size: 12px; color: var(--muted); padding: 8px 10px; border-bottom: 1px solid var(--line); }
.mtable td { padding: 8px 10px; border-bottom: 1px solid var(--line); vertical-align: top; }
.mtable tr:last-child td { border-bottom: 0; }
.mtable td.ck, .mtable th[title] { text-align: center; width: 34px; }
.mtable td.ck { font-weight: 700; color: var(--ok); }
.mtable a { color: var(--sea); text-decoration: none; }
.mtable .btn { padding: 4px 8px; font-size: 12.5px; }
.nowrap { white-space: nowrap; }

.toggles { display: flex; flex-wrap: wrap; gap: 6px; }
.tg { border: 1px solid var(--line); background: none; border-radius: 999px; padding: 5px 12px; cursor: pointer; font-size: 13px; }
.tg:hover { background: var(--hover); }
.tg[aria-pressed="true"] { background: var(--sea); border-color: var(--sea); color: #fff; font-weight: 600; }
.tg .ord { font-size: 10px; opacity: .8; margin-left: 4px; }

.rose-row { display: grid; grid-template-columns: 220px 1fr; gap: 14px; align-items: center; }
.rose-side { display: grid; gap: 10px; }
.rose-side p { margin: 0; }
.rose-edit { width: 220px; height: 220px; touch-action: none; user-select: none; -webkit-user-select: none; }
.rose-edit .seg { cursor: pointer; stroke: var(--panel); stroke-width: 1.5; transition: fill .12s; }
.rose-edit .seg.on { fill: var(--protected); }
.rose-edit .seg.off { fill: color-mix(in srgb, var(--exposed) 55%, var(--panel)); }
.rose-edit .seg:hover { filter: brightness(1.08); }
.rose-edit .hub { fill: var(--panel); stroke: var(--line); cursor: crosshair; }
.rose-edit text { font-size: 10.5px; fill: var(--muted); font-weight: 600; pointer-events: none; }
.rose-edit text.n { fill: var(--fg); font-size: 12px; }
.rose-edit .arrow { stroke: var(--accent); stroke-width: 3; fill: none; stroke-linecap: round; stroke-linejoin: round; pointer-events: none; }

/* photos */
.drop { position: relative; display: grid; place-items: center; text-align: center; min-height: 96px; border: 2px dashed var(--line); border-radius: 14px; padding: 16px; cursor: pointer; font-weight: 400; color: var(--fg); font-size: 14px; transition: border-color .15s, background .15s; }
.drop:hover, .drop.over { border-color: var(--sea); background: color-mix(in srgb, var(--sea) 7%, transparent); }
.drop input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.drop.disabled { opacity: .45; pointer-events: none; }
.progress { position: relative; height: 22px; border-radius: 999px; background: var(--hover); overflow: hidden; }
.progress i { position: absolute; inset: 0 auto 0 0; width: 0; background: var(--sea); transition: width .15s; }
.progress span { position: relative; display: block; text-align: center; font-size: 12px; line-height: 22px; font-weight: 600; color: var(--fg); mix-blend-mode: normal; }
.photos { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 12px; }
.photo { position: relative; background: var(--bg); border: 1px solid var(--line); border-radius: 12px; overflow: hidden; display: grid; cursor: grab; }
.photo.dragging { opacity: .4; }
.photo.drop-before { box-shadow: -4px 0 0 var(--accent); }
.photo img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; display: block; background: #0b1520; pointer-events: none; }
.photo input { border: 0 !important; border-top: 1px solid var(--line) !important; border-radius: 0 !important; font-size: 13px !important; }
.photo input.ph-src { font-size: 11.5px !important; color: var(--muted); padding-top: 6px; padding-bottom: 6px; }
.photo .num { position: absolute; left: 8px; top: 8px; font-size: 11px; font-weight: 700; color: #fff; background: rgba(0,0,0,.55); border-radius: 999px; padding: 1px 8px; }
.photo .del { position: absolute; right: 6px; top: 6px; width: 30px; height: 30px; border-radius: 50%; border: 0; background: rgba(0,0,0,.55); color: #fff; cursor: pointer; font-size: 16px; line-height: 1; }
.photo .del:hover { background: var(--bad); }
/* Title photo choice: ★ on each tile; the chosen (or automatic first) photo is marked. */
.photo .tstar { position: absolute; right: 42px; top: 6px; height: 30px; min-width: 30px; display: inline-flex; align-items: center; justify-content: center; gap: 4px;
  padding: 0 7px; border: 0; border-radius: 999px; background: rgba(0,0,0,.55); color: #fff; cursor: pointer; font: 600 11.5px var(--font); }
.photo .tstar svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linejoin: round; }
.photo .tstar:hover { background: rgba(0,0,0,.75); }
.photo .tstar.on { background: var(--accent); }
.photo .tstar.on svg { fill: currentColor; }
.photo.is-title img { outline: 3px solid var(--accent); outline-offset: -3px; }
.tp-view { cursor: default; border-style: solid; }
/* Drag the title image to choose the visible part. */
.tp-view.draggable img { cursor: grab; touch-action: none; user-select: none; -webkit-user-drag: none; }
.tp-view.dragging img { cursor: grabbing; }
.tp-view:hover { border-color: var(--line); background: none; }
.tp-auto { position: absolute; left: 8px; bottom: 8px; font-size: 11px; font-weight: 600; color: #fff; background: rgba(0,0,0,.55); border-radius: 999px; padding: 2px 9px; }
.photo .size { position: absolute; left: 8px; top: 31px; font-size: 10.5px; color: #fff; background: rgba(0,0,0,.5); border-radius: 6px; padding: 0 5px; }

/* dialog + toast */
dialog { border: 1px solid var(--line); border-radius: 18px; padding: 0; background: var(--panel); color: var(--fg); width: min(520px, calc(100% - 24px)); box-shadow: 0 20px 60px rgba(0,0,0,.3); }
dialog::backdrop { background: rgba(5,10,15,.45); }
.dlg-body { padding: 22px; display: grid; gap: 14px; }
.dlg-body h2 { margin: 0; font: 700 19px var(--font-round); }
.dlg-body p { margin: 0; }
.dlg-actions { display: flex; justify-content: flex-end; gap: 8px; }
.dlg-body .sub { margin: 4px 0 -4px; }
.ulist { list-style: none; margin: 0; padding: 0; border: 1px solid var(--line); border-radius: 12px; }
.ulist li { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 8px 8px 8px 12px; }
.ulist li + li { border-top: 1px solid var(--line); }
.ulist .who { display: grid; }
.ulist .who small { color: var(--muted); }
.ulist .acts { display: flex; gap: 2px; }
.ulist .btn { padding: 5px 10px; font-size: 13px; }
.newuser { display: grid; grid-template-columns: 1fr 1fr auto; gap: 8px; align-items: end; }
.newuser.newadmin { grid-template-columns: 1.4fr 1fr 1fr 1fr auto; }
.auth-names { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.maint-row { display: flex; gap: 8px; align-items: flex-end; margin-top: 10px; }
.maint-row textarea { flex: 1; resize: vertical; font: inherit; padding: 8px 10px; border-radius: 8px; border: 1px solid var(--line, #d0d4da); }
#maintSec .set-card:has(#setMaint:checked) { box-shadow: inset 4px 0 0 #d93b2b; }

.toast { position: fixed; left: 50%; bottom: 22px; transform: translate(-50%, 20px); opacity: 0; pointer-events: none; background: #14202b; color: #fff; padding: 10px 16px; border-radius: 12px; font-weight: 500; box-shadow: 0 10px 30px rgba(0,0,0,.25); transition: opacity .2s, transform .2s; max-width: calc(100% - 32px); }
.toast.show { opacity: 1; transform: translate(-50%, 0); }
.toast.err { background: var(--bad); }

/* ---- smaller screens ---- */
@media (max-width: 1100px) { .cards { grid-template-columns: 1fr; } }
@media (max-width: 760px) {
  .shell { grid-template-columns: 1fr; grid-template-rows: auto auto minmax(0, 1fr); height: auto; min-height: 100dvh; }
  .sidebar { border-right: 0; border-bottom: 1px solid var(--line); }
  .side-resize { display: none; }
  .blist { max-height: 40vh; }
  .editor { overflow: visible; padding: 14px 12px 60px; }
  .ed-head { top: 0; margin: -14px -12px 12px; padding: 12px; flex-wrap: wrap; }
  .topbar { flex-wrap: wrap; }
  .row3, .row2, .rose-row, .newuser, .newuser.newadmin { grid-template-columns: 1fr; }
  .rose-edit { justify-self: center; }
  .map { height: 300px; }
}

/* ---- Settings window (macOS System Settings style) ---- */
dialog.settings { width: min(1060px, calc(100% - 24px)); height: min(700px, calc(100dvh - 40px)); max-width: calc(100% - 16px); max-height: calc(100dvh - 16px);
  padding: 0; overflow: hidden; border-radius: 16px; container: setdlg / inline-size; }
/* resize grips: invisible strips on the edges, a small visible corner bottom right */
.set-grip { position: absolute; z-index: 5; touch-action: none; }
.set-grip[data-dir="n"], .set-grip[data-dir="s"] { left: 14px; right: 14px; height: 8px; cursor: ns-resize; }
.set-grip[data-dir="n"] { top: 0; } .set-grip[data-dir="s"] { bottom: 0; }
.set-grip[data-dir="e"], .set-grip[data-dir="w"] { top: 14px; bottom: 14px; width: 8px; cursor: ew-resize; }
.set-grip[data-dir="e"] { right: 0; } .set-grip[data-dir="w"] { left: 0; }
.set-grip[data-dir="ne"], .set-grip[data-dir="nw"], .set-grip[data-dir="se"], .set-grip[data-dir="sw"] { width: 18px; height: 18px; }
.set-grip[data-dir="ne"] { top: 0; right: 0; cursor: nesw-resize; } .set-grip[data-dir="sw"] { bottom: 0; left: 0; cursor: nesw-resize; }
.set-grip[data-dir="nw"] { top: 0; left: 0; cursor: nwse-resize; } .set-grip[data-dir="se"] { bottom: 0; right: 0; cursor: nwse-resize; }
.set-grip[data-dir="se"]::after { content: ""; position: absolute; right: 4px; bottom: 4px; width: 9px; height: 9px; opacity: .45;
  background: linear-gradient(135deg, transparent 0 45%, var(--muted) 45% 52%, transparent 52% 70%, var(--muted) 70% 77%, transparent 77%); }
.set-grip[data-dir="se"]:hover::after { opacity: .9; }
body.set-resizing, body.set-resizing * { user-select: none !important; }
.set-win { display: grid; grid-template-columns: 210px 1fr; height: 100%; }
.set-nav { background: color-mix(in srgb, var(--bg) 70%, var(--panel)); border-right: 1px solid var(--line); padding: 16px 10px; display: flex; flex-direction: column; gap: 2px; }
.set-nav-title { font: 700 12px/1 var(--font); letter-spacing: .06em; text-transform: uppercase; color: var(--muted); padding: 4px 10px 12px; }
.set-nav button { display: flex; align-items: center; gap: 10px; width: 100%; padding: 7px 10px; border: 0; border-radius: 8px; background: none; text-align: left; font-size: 14px; font-weight: 500; color: var(--fg); cursor: pointer; }
.set-nav button:hover { background: var(--hover); }
.set-nav button[aria-current="true"] { background: var(--sea); color: #fff; }
.si { flex: none; width: 24px; height: 24px; border-radius: 6px; display: grid; place-items: center; box-shadow: inset 0 0 0 .5px rgba(0,0,0,.15); }
.si svg { width: 16px; height: 16px; }
.set-pane { display: flex; flex-direction: column; min-width: 0; min-height: 0; }
.set-head { display: flex; align-items: center; justify-content: space-between; padding: 14px 16px 10px 24px; border-bottom: 1px solid var(--line); }
.set-head h2 { margin: 0; font: 700 19px/1.2 var(--font-round); }
.set-close { width: 30px; height: 30px; display: grid; place-items: center; border: 0; border-radius: 50%; background: var(--hover); color: var(--muted); cursor: pointer; }
.set-close:hover { color: var(--fg); }
.set-close svg { width: 14px; height: 14px; }
#setError { margin: 12px 24px 0; }
.set-body { flex: 1; min-height: 0; overflow-y: auto; padding: 18px 24px 28px; display: grid; gap: 14px; align-content: start; grid-auto-rows: max-content; }
.set-body > p { margin: 0; }
.set-group, .set-card { background: color-mix(in srgb, var(--bg) 55%, var(--panel)); border: 1px solid var(--line); border-radius: 12px; padding: 14px 16px; display: grid; gap: 12px; }
.set-form { display: grid; gap: 12px; }
/* Pane layout: section = heading (+ hint) over a card; two cards side by side where they fit */
.pane-sec { display: grid; gap: 8px; min-width: 0; align-content: start; }
.set-h { margin: 0; font: 600 13.5px/1.3 var(--font); color: var(--fg); }
.set-hint { margin: 0; font-size: 12.5px; line-height: 1.45; color: var(--muted); }
.set-card > p, .set-card p.muted { margin: 0; }
.set-card .set-actions { padding-top: 0; }
.set-stack { display: grid; gap: 14px; }
.set-cols { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; align-items: stretch; }
.set-cols > .pane-sec { display: flex; flex-direction: column; }
.set-cols > .pane-sec > .set-card { flex: 1; align-content: start; }
.speed-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.free-field { display: grid; gap: 6px; align-content: start; font-size: 12.5px; font-weight: 600; color: var(--muted); }
.free-field label.inline { display: flex; align-items: center; gap: 8px; font-size: 14px; font-weight: 500; color: var(--fg); }
.free-field input[type="checkbox"] { width: 18px; height: 18px; margin: 0; accent-color: var(--sea); }
.ro-field { display: grid; gap: 4px; align-content: start; font-size: 12.5px; font-weight: 600; color: var(--muted); }
.ro-value { padding: 9px 0; font-size: 14px; font-weight: 500; color: var(--fg); font-variant-numeric: tabular-nums; }
.set-lbl { font-size: 12.5px; font-weight: 600; color: var(--muted); }
.gate-layout { display: grid; grid-template-columns: 180px minmax(0, 1fr); gap: 18px; align-items: start; }
.gate-img-col { display: grid; gap: 6px; }
.audit-top { display: flex; align-items: center; gap: 10px 12px; flex-wrap: wrap; margin-bottom: 10px; }
.audit-top #auditCount { margin-left: auto; }
.pager { display: flex; align-items: center; justify-content: center; gap: 14px; margin-top: 12px; font-size: 13px; }
.pager .btn:disabled { opacity: .4; cursor: default; }
/* the content follows the WINDOW's width (it can be resized), not the browser's */
@container setdlg (max-width: 860px) { .set-cols, .gate-layout { grid-template-columns: 1fr; } .set-win { grid-template-columns: 184px 1fr; } }
@container setdlg (max-width: 700px) {
  .set-win { grid-template-columns: 1fr; grid-template-rows: auto minmax(0, 1fr); }
  .set-nav { flex-direction: row; overflow-x: auto; border-right: 0; border-bottom: 1px solid var(--line); padding: 10px; }
  .set-nav-title { display: none; }
  .set-nav button { width: auto; flex: none; }
  .set-body .row3, .set-body .row2, .set-body .newuser, .set-body .newuser.newadmin { grid-template-columns: 1fr; }
}
.set-actions { display: flex; justify-content: flex-end; align-items: center; gap: 12px; padding-top: 4px; }
li.setpw { display: grid; grid-template-columns: 1fr auto; gap: 8px; }
@media (max-width: 700px) { /* phone: full height, no resizing */
  dialog.settings { width: calc(100% - 24px) !important; height: calc(100dvh - 24px) !important; }
  .set-grip { display: none; }
}

/* Protokoll */
.seg { display: inline-flex; flex: none; border: 1px solid var(--line); border-radius: 9px; overflow: hidden; justify-self: start; }
.seg button { border: 0; background: none; padding: 6px 14px; font-size: 13px; font-weight: 500; cursor: pointer; color: var(--fg); }
.seg button + button { border-left: 1px solid var(--line); }
.seg button[aria-pressed="true"] { background: var(--sea); color: #fff; }
.mtable.audit td { font-size: 13px; }
/* Protokoll: Zeit, Wer and IP fixed and compact (long e-mails / IPv6 end in …, full value on hover), Ereignis takes the rest and wraps */
.mtable.audit { table-layout: fixed; }
.mtable.audit th:nth-child(1) { width: 128px; }
.mtable.audit th:nth-child(3) { width: 150px; }
.mtable.audit th:nth-child(4) { width: 132px; }
.mtable.audit td:nth-child(2) { overflow-wrap: anywhere; }
.mtable.audit td:nth-child(n+3) { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mtable.audit .au-meta { display: none; }
@media (max-width: 700px) { /* phone: Wer and IP move under the event */
  .mtable.audit th:nth-child(1) { width: 88px; } .mtable.audit td:nth-child(1) { white-space: normal; }
  .mtable.audit .au-meta { overflow-wrap: anywhere; }
  .mtable.audit th:nth-child(n+3), .mtable.audit td:nth-child(n+3) { display: none; }
  .mtable.audit .au-meta { display: block; margin-top: 2px; } }
.mtable.audit tr.warn td:first-child { box-shadow: inset 3px 0 0 var(--bad); }
.mtable.audit small { font-size: 12px; }
.set-body .mtable-wrap { max-height: none; }

/* Ausstattung: one row per facility, with its map position */
.fac-list { display: grid; border: 1px solid var(--line); border-radius: 11px; overflow: hidden; }
.fac-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.fac-chip { display: inline-flex; align-items: center; gap: 6px; }
.fac-chip .fi { width: 16px; height: 16px; flex: none; }
.fac-empty { margin: 4px 0 0; }
.fac-row { display: grid; grid-template-columns: minmax(150px, auto) 1fr auto auto; align-items: center; gap: 8px; padding: 6px 8px 6px 10px; }
.fac-name { display: inline-flex; align-items: center; gap: 7px; font-weight: 600; font-size: 13.5px; }
.fac-name .fi { width: 18px; height: 18px; flex: none; }
/* Konoba: name, rating and link under the row. */
.fac-extra { grid-column: 1 / -1; display: grid; grid-template-columns: 1.4fr .8fr; gap: 6px 10px; padding: 2px 0 6px 25px; }
.fac-extra label { font-size: 12px; color: var(--muted); display: grid; gap: 3px; }
.fac-extra .fx-wide { grid-column: 1 / -1; }
.fx-rate { display: flex; align-items: center; gap: 6px; }
.fx-rate input { min-width: 0; }
.fx-rate span { color: var(--fg); font-size: 13px; white-space: nowrap; }
.fac-row + .fac-row { border-top: 1px solid var(--line); }
.fac-row.placing { background: color-mix(in srgb, var(--accent) 10%, transparent); }
.fac-pos { font-size: 12px; color: var(--muted); font-variant-numeric: tabular-nums; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.fac-row.placing .fac-pos { color: var(--accent); font-weight: 600; }
.icon-btn { width: 30px; height: 30px; display: grid; place-items: center; border: 1px solid var(--line); border-radius: 8px; background: none; color: var(--fg); cursor: pointer; padding: 0; }
.icon-btn svg { width: 18px; height: 18px; }
.icon-btn:hover:not(:disabled) { background: var(--hover); }
.icon-btn:disabled { opacity: .3; cursor: default; }
.icon-btn[aria-pressed="true"], .icon-btn[aria-pressed="true"]:hover { background: var(--accent); border-color: var(--accent); color: #fff; }
.fac-del:hover:not(:disabled) { color: var(--bad); border-color: var(--bad); }
#map.placing, #map.placing * { cursor: crosshair !important; }
.map-hint.active { background: var(--accent); color: #fff; font-weight: 600; }
/* Icon circle sits on the point (anchorOffset 0/14); the name hangs to the right. */
.fmk { position: relative; width: 28px; height: 28px; border-radius: 50%; background: #fff; color: #0d4f73; display: grid; place-items: center;
  box-shadow: 0 1px 6px rgba(0,0,0,.5); cursor: grab; }
.fmk svg { width: 18px; height: 18px; }
.fmk span { position: absolute; left: 31px; top: 50%; transform: translateY(-50%); padding: 3px 7px; border-radius: 6px; background: rgba(255,255,255,.92); color: #0d4f73;
  font: 600 11.5px/1.1 -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; white-space: nowrap; box-shadow: 0 1px 4px rgba(0,0,0,.35); pointer-events: none; }

/* Typ (Marina / Ankerbucht / Bojenfeld – mehrere möglich; Sehenswürdigkeit allein) */
.type-row { display: grid; gap: 6px; }
.type-pick { display: flex; flex-wrap: wrap; gap: 6px; padding-top: 3px; }
.tp { display: inline-flex; align-items: center; gap: 7px; border: 1px solid var(--line); background: none; border-radius: 999px; padding: 5px 13px 5px 9px; cursor: pointer; font-size: 13px; color: var(--fg); }
.tp svg { width: 18px; height: 18px; }
.tp:hover { background: var(--hover); }
.tp[aria-pressed="true"] { background: var(--sea); border-color: var(--sea); color: #fff; font-weight: 600; }

/* E-Mail settings */
.mail-row { grid-template-columns: 2fr 1.4fr .7fr; }
.mail-test { display: flex; gap: 8px; flex-wrap: wrap; }
.mail-test input { flex: 1; min-width: 200px; }

/* Bewertung: choice rows (traffic light / SSVO) */
.pick-row { display: grid; gap: 6px; }
/* Titelfoto */
/* Titelfoto: drop area in the info-box format (420 × 200); shows the photo once set, hover/drag to replace */
.title-photo { display: grid; gap: 8px; max-width: 420px; padding-bottom: 8px; }
.title-photo.disabled { opacity: .45; pointer-events: none; }
.tp-drop { position: relative; display: grid; place-items: center; place-content: center; aspect-ratio: 21 / 10; border: 2px dashed var(--line); border-radius: 14px; overflow: hidden; cursor: pointer;
  text-align: center; font-size: 14px; font-weight: 400; color: var(--fg); background: var(--hover); transition: border-color .15s, background .15s; }
.tp-drop input { position: absolute; inset: 0; opacity: 0; cursor: pointer; z-index: 3; }
.tp-drop:hover, .tp-drop.over { border-color: var(--sea); background: color-mix(in srgb, var(--sea) 7%, var(--hover)); }
.tp-drop.has { border-style: solid; border-color: var(--line); }
.tp-drop img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.tp-empty { line-height: 1.45; padding: 12px; }
.tp-replace, .tp-busy { position: absolute; inset: 0; display: grid; place-items: center; padding: 12px; background: rgba(10, 20, 30, .55); color: #fff; font-weight: 600; opacity: 0; transition: opacity .15s; z-index: 2; }
.tp-drop.has:hover .tp-replace, .tp-drop.has.over .tp-replace { opacity: 1; }
.tp-replace[hidden], .tp-busy[hidden] { display: none; }
.tp-drop.busy { pointer-events: none; }
.tp-drop.busy .tp-busy { opacity: 1; }
.tp-bar { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.tp-bar small { line-height: 1.35; }
.tp-bar .btn { flex: none; }
.sub.tp-more { margin-top: 10px; }
/* Einstellungen → Karte: portrait + restaurant colours */
.portrait-edit { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.portrait-prev { width: 56px; height: 56px; border-radius: 50%; background: var(--hover); border: 1px solid var(--line); overflow: hidden; flex: none; }
.portrait-prev img { width: 100%; height: 100%; object-fit: cover; display: block; }
.rc-list { display: grid; gap: 6px; }
.rc-row { display: flex; align-items: center; gap: 8px; font-size: 13px; }
.rc-row input[type="color"] { width: 36px; height: 30px; padding: 0 2px; border-radius: 7px; }
.rc-row input[inputmode] { width: 64px; }
.rc-prev { margin-left: 8px; padding: 3px 10px; border-radius: 999px; font-weight: 700; font-size: 12.5px; }

/* Version number (Einstellungen → Karte) */
.ver-row { display: flex; gap: 8px; align-items: center; }
.ver-row input { width: 160px; }
.sc-prev { display: flex; gap: 14px; flex-wrap: wrap; margin-top: 6px; font-size: 13px; font-weight: 600; }
.sc-dot { display: inline-flex; align-items: center; gap: 6px; }
.sc-dot i { width: 10px; height: 10px; border-radius: 50%; }
.lv-grid.sc-ssvo { grid-template-columns: auto 1fr 1fr; }
.sc-dot b { font-family: Georgia, serif; }
.sc-dot em { font-style: normal; font-weight: 500; color: var(--muted); }
/* Einstellungen → Export */
.exp-actions { display: flex; gap: 10px; flex-wrap: wrap; margin: 4px 0; }
/* Bewertung: a little air between the categories (Wasserqualität, Ruhe, Gewitterschutz, SSVO) */
[aria-labelledby="cardT5"] .thunder-row { margin-top: 8px; }
/* Freitext: 30 % taller by default (was 8 rows ≈ 180 px) */
textarea[name="notes"] { min-height: 234px; }
/* Einstellungen → Registrierungen */
.mem-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
/* Sehenswürdigkeit: only Lage, Stammdaten, Beschreibung, Fotos */
#form.is-sight .not-sight { display: none; }
/* Sehenswürdigkeit: SLI, NI and "Ruhe" stay – shown as "Beliebtheit". */
#form:not(.is-sight) .only-sight { display: none; }
#form.is-sight .row3 { grid-template-columns: 1fr 1fr; }

/* ---------------------------------------------------------------- Roadmap */
.btn.danger { background: var(--bad); border-color: var(--bad); color: #fff; }
#roadmapBtn[aria-pressed="true"] { background: var(--active); }
.shell.rm-mode .sidebar, .shell.rm-mode .editor { display: none; }
.roadmap { grid-column: 1 / -1; min-width: 0; min-height: 0; overflow-x: hidden; overflow-y: auto; padding: 18px 22px 80px; }
.roadmap[hidden] { display: none; }
.rm-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; max-width: 1180px; margin: 0 auto 14px; }
.rm-head h2 { margin: 0 0 2px; font-size: 22px; }
.rm-head p { margin: 0; max-width: 640px; }
.rm-tools { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; flex: 1; justify-content: flex-end; }
.rm-list { display: grid; grid-template-columns: minmax(0, 1fr); gap: 12px; max-width: 1180px; margin: 0 auto; }
.rm-ver { background: var(--panel); border: 1px solid var(--line); border-radius: 14px; }
.rm-ver.dragging, .rm-item.dragging { opacity: .45; outline: 2px dashed var(--sea); outline-offset: -2px; }
.rm-vhead { display: flex; align-items: center; gap: 8px; padding: 10px 12px 10px 8px; }
.roadmap .rm-vhead input.rm-vnum { flex: 0 0 86px; font: 700 16px var(--font); color: var(--fg); background: none; border: 1px solid transparent; border-radius: 8px; padding: 5px 8px; font-variant-numeric: tabular-nums; }
.roadmap .rm-vhead input.rm-vnum:hover { border-color: var(--line); }
.roadmap .rm-vhead input.rm-vnum:focus { border-color: var(--sea); background: var(--field); outline: none; }
.roadmap .rm-vhead input.rm-vtitle { flex: 1 1 200px; min-width: 120px; font: 500 16px var(--font); color: var(--fg); background: none; border: 1px solid transparent; border-radius: 8px; padding: 5px 8px; }
.roadmap .rm-vhead input.rm-vtitle:hover { border-color: var(--line); }
.roadmap .rm-vhead input.rm-vtitle:focus { border-color: var(--sea); background: var(--field); outline: none; }
.rm-count { font-size: 12.5px; color: var(--muted); white-space: nowrap; }
.rm-bar { width: 70px; height: 6px; border-radius: 3px; background: var(--hover); overflow: hidden; flex: none; }
.rm-bar i { display: block; height: 100%; background: var(--ok); transition: width .3s; }
.rm-ver.empty .rm-bar { visibility: hidden; }
.rm-tog { width: 28px; height: 28px; display: grid; place-items: center; border: 0; background: none; border-radius: 7px; cursor: pointer; color: var(--muted); flex: none; }
.rm-tog:hover { background: var(--hover); color: var(--fg); }
.rm-tog svg { width: 13px; height: 13px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; transition: transform .2s; }
.rm-ver.collapsed .rm-tog svg { transform: rotate(-90deg); }
.rm-ver.collapsed .rm-items > :not(.rm-item) { display: none; }
.rm-ver.collapsed .rm-items { border-top: 0; padding: 0; }
.rm-ver.collapsed .rm-item { display: none; } /* items stay in the DOM (drag & drop into a folded version still works) */
.rm-vdel, .rm-del { border: 0; background: none; color: var(--muted); cursor: pointer; border-radius: 7px; padding: 5px 8px; font-size: 13px; flex: none; }
.rm-item .rm-del { height: 34px; }
.rm-vdel:hover, .rm-del:hover, .rm-del.ask { color: var(--bad); background: color-mix(in srgb, var(--bad) 10%, transparent); }
.rm-grip { cursor: grab; color: var(--muted); font-size: 16px; line-height: 1; padding: 6px 4px; user-select: none; touch-action: none; opacity: .55; }
.rm-grip:hover { opacity: 1; }
.rm-grip:active { cursor: grabbing; }
.rm-items { border-top: 1px solid var(--line); padding: 4px 8px 8px; }
.rm-cols, .rm-item, .rm-sum { display: grid; grid-template-columns: 22px 30px minmax(0, 1fr) 110px 170px 46px 84px 34px; gap: 6px; align-items: start; }
/* Comments: bubble + count (grey = discussion, orange dot = unread for me), thread folds out under the row */
.rm-cmt { position: relative; display: inline-flex; align-items: center; justify-content: center; gap: 3px; box-sizing: border-box; height: 34px; margin: 0; padding: 0 6px; border: 0; border-radius: 8px; background: none; color: var(--muted); cursor: pointer; opacity: .35; font: 600 13.2px/1 var(--font); font-variant-numeric: tabular-nums; }
.rm-item:hover .rm-cmt, .rm-cmt:focus-visible, .rm-cmt.has, .rm-cmt[aria-expanded="true"] { opacity: 1; }
.rm-cmt:hover, .rm-cmt[aria-expanded="true"] { background: var(--hover); color: var(--fg); }
.rm-cmt svg, .rm-cmt-h svg { width: 17.6px; height: 17.6px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linejoin: round; }
.rm-cmt.has { color: var(--fg); }
.rm-cmt.unread::after { content: ""; position: absolute; top: 5px; right: 4px; width: 8px; height: 8px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 2px var(--panel); }
.rm-cols .rm-cmt-h { display: grid; place-items: center; }
.rm-thread { grid-column: 1 / -1; margin: 2px 40px 8px 58px; padding: 10px 12px; border-left: 2px solid var(--line); background: color-mix(in srgb, var(--bg) 60%, var(--panel)); border-radius: 0 10px 10px 0; display: grid; gap: 10px; }
.rm-c-list { display: grid; gap: 10px; }
.rm-c-list p { margin: 0; }
.rm-c-meta { display: flex; align-items: center; gap: 8px; font-size: 12px; color: var(--muted); }
.rm-c-meta b { color: var(--fg); font-weight: 600; }
.rm-c-body { margin-top: 2px; font-size: 14px; line-height: 1.45; white-space: pre-wrap; overflow-wrap: anywhere; }
.rm-c-del { margin-left: auto; border: 0; background: none; color: var(--muted); cursor: pointer; border-radius: 6px; padding: 2px 6px; font-size: 12px; opacity: 0; }
.rm-c:hover .rm-c-del, .rm-c-del:focus-visible, .rm-c-del.ask { opacity: 1; }
.rm-c-del.ask { color: var(--bad); font-weight: 600; }
.rm-c-new { display: flex; gap: 8px; align-items: flex-end; }
.roadmap .rm-c-new textarea { flex: 1; min-height: 36px; resize: none; overflow: hidden; font: 14px/1.4 var(--font); padding: 7px 10px; }
.nav-badge { margin-left: 6px; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 999px; background: var(--accent); color: #fff; font: 700 11px/18px var(--font); text-align: center; }
.rm-cols { padding: 6px 0 2px; font-size: 11px; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; color: var(--muted); }
.rm-sort { all: unset; cursor: pointer; display: inline-flex; align-items: center; gap: 4px; border-radius: 6px; padding: 2px 4px; margin-left: -4px; }
.rm-sort:hover { color: var(--fg); background: var(--hover); }
.rm-sort:focus-visible { outline: 2px solid var(--sea); }
.rm-cols .rm-collabel { justify-self: center; padding: 2px 0; line-height: inherit; }
.rm-sort i { width: 0; height: 0; border-left: 4px solid transparent; border-right: 4px solid transparent; }
.rm-sort.asc i { border-bottom: 5px solid currentColor; }
.rm-sort.desc i { border-top: 5px solid currentColor; }
.roadmap select.rm-sortv { width: auto; padding: 7px 10px; font-size: 13.5px; }
.rm-item { padding: 3px 0; border-radius: 9px; }
/* Aufwand (working hours): small right-aligned field with "h"; sums per version and in total. */
.rm-eff { position: relative; display: block; }
.roadmap .rm-item .rm-effort { box-sizing: border-box; width: 100%; height: 34px; margin: 0; padding: 0 20px 0 6px; text-align: right; font: 14px/32px var(--font); font-variant-numeric: tabular-nums; color: var(--fg); background: transparent; border: 1px solid transparent; border-radius: 8px; }
.roadmap .rm-item .rm-effort:hover { border-color: var(--line); background: var(--field); }
.roadmap .rm-item .rm-effort:focus { border-color: var(--sea); background: var(--field); outline: none; }
.rm-eff i { position: absolute; right: 7px; top: 1px; line-height: 32px; font-style: normal; font-size: 14px; color: var(--muted); pointer-events: none; }
.rm-eff:has(.rm-effort:placeholder-shown) i { visibility: hidden; }
.roadmap .rm-item.done .rm-effort { color: var(--muted); }
.rm-cols .rm-eff-h { justify-self: end; margin: 0 16px 0 0; }
.rm-sum { margin-top: 4px; padding: 7px 0 2px; border-top: 1px dashed var(--line); font-size: 13px; color: var(--muted); align-items: baseline; }
.rm-sum:empty { display: none; }
.rm-sum-l { grid-column: 3; font-size: 11px; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; }
.rm-sum-v { grid-column: 4 / 8; justify-self: end; padding-right: 20px; text-align: right; font-variant-numeric: tabular-nums; }
.rm-sum-v b { color: var(--fg); font-size: 14px; }
.rm-miss { color: var(--muted); }
.rm-ver.collapsed .rm-sum { display: none; }
.rm-total { box-sizing: border-box; max-width: 1180px; display: flex; justify-content: space-between; align-items: center; gap: 16px; margin: 14px auto 0; padding: 14px 18px; border: 1px solid var(--line); border-radius: 14px; background: var(--panel); font-weight: 600; }
.rm-total-v { display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap; justify-content: flex-end; font-variant-numeric: tabular-nums; }
.rm-total-v b { font-size: 20px; }
.rm-total-v small { font-weight: 500; color: var(--muted); font-size: 13px; }
.rm-item:hover { background: var(--hover); }
.rm-item .rm-grip { padding-top: 10px; text-align: center; }
.rm-done { width: 18px; height: 18px; margin: 9px auto 0; accent-color: var(--ok); cursor: pointer; }
.roadmap .rm-item :is(.rm-text, .rm-prio, .rm-owner) { font: 14px/1.4 var(--font); color: var(--fg); background: transparent; border: 1px solid transparent; border-radius: 8px; padding: 6px 8px; min-width: 0; width: 100%; }
.roadmap .rm-item .rm-text { resize: none; overflow: hidden; min-height: 34px; }
.roadmap .rm-item :is(.rm-text, .rm-prio, .rm-owner):hover { border-color: var(--line); background: var(--field); }
.roadmap .rm-item :is(.rm-text, .rm-prio, .rm-owner):focus { border-color: var(--sea); background: var(--field); outline: none; }
.roadmap .rm-item.done .rm-text { text-decoration: line-through; color: var(--muted); }
.roadmap .rm-item .rm-prio { cursor: pointer; font-weight: 600; }
/* Same height and baseline for Priorität, Verantwortlich and the comment bubble in every browser (Safari draws native selects taller). */
.roadmap .rm-item :is(.rm-prio, .rm-owner) { box-sizing: border-box; height: 34px; line-height: 32px; padding-top: 0; padding-bottom: 0; margin: 0; }
.roadmap .rm-item .rm-prio { -webkit-appearance: none; appearance: none; padding-right: 26px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12'%3E%3Cpath d='M3 4.5l3 3 3-3' fill='none' stroke='%238a94a3' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 8px center; background-size: 12px 12px; }
.roadmap .rm-item .rm-prio[data-p="high"] { color: var(--bad); }
.roadmap .rm-item .rm-prio[data-p="medium"] { color: #c27c00; }
.roadmap .rm-item .rm-prio[data-p="low"] { color: var(--muted); font-weight: 500; }
/* Target date of a version (header) */
.rm-target { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; color: var(--muted); margin: 0; flex: none; }
.rm-target { position: relative; }
.rm-cal { width: 28px; height: 28px; display: grid; place-items: center; border: 0; background: none; border-radius: 7px; cursor: pointer; color: var(--muted); }
.rm-cal:hover { background: var(--hover); color: var(--fg); }
.rm-cal svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; }
.roadmap .rm-target input.rm-dpick { position: absolute; right: 0; bottom: 0; width: 28px; height: 28px; padding: 0; border: 0; opacity: 0; pointer-events: none; }
.roadmap .rm-vhead input.rm-vdate { width: 112px; font-variant-numeric: tabular-nums; padding: 5px 8px; font: 14px var(--font); text-transform: none; letter-spacing: 0; color: var(--fg); background: transparent; border: 1px solid transparent; }
.roadmap .rm-vhead input.rm-vdate:hover { border-color: var(--line); background: var(--field); }
.roadmap .rm-vhead input.rm-vdate:focus { border-color: var(--sea); background: var(--field); outline: none; }
.roadmap .rm-vhead input.rm-vdate.overdue { color: var(--bad); font-weight: 600; }
.rm-item.done .rm-prio, .rm-item.done .rm-owner { opacity: .55; }
.rm-empty { margin: 8px 6px 2px; }
.rm-items:has(.rm-item) .rm-empty { display: none; }
.rm-list.hide-done .rm-item.done { display: none; }
@media (max-width: 820px) {
  .roadmap { padding: 14px 10px 60px; }
  .rm-cols { display: none; }
  .rm-item { grid-template-columns: 22px 30px 1fr 46px 34px; grid-template-areas: "g c t t x" ". . p e e" ". . o m m"; border-bottom: 1px solid var(--line); border-radius: 0; padding: 6px 0; }
  .rm-item > .rm-cmt { grid-area: m; justify-self: end; } .rm-thread { margin: 4px 0 4px 22px; }
  .rm-item > .rm-grip { grid-area: g; } .rm-item > .rm-done { grid-area: c; } .rm-item > .rm-text { grid-area: t; } .rm-item > .rm-del { grid-area: x; }
  .rm-item > .rm-prio { grid-area: p; } .rm-item > .rm-owner { grid-area: o; } .rm-item > .rm-eff { grid-area: e; }
  .rm-sum { grid-template-columns: auto 1fr; } .rm-sum-l { grid-column: 1; } .rm-sum-v { grid-column: 2; padding-right: 8px; }
  .rm-bar { display: none; }
  .rm-vhead { flex-wrap: wrap; }
  .roadmap .rm-vhead input.rm-vnum { order: -1; flex-basis: 64px; }
  .roadmap .rm-vhead input.rm-vtitle { flex-basis: calc(100% - 150px); order: -1; }
  .rm-target { margin-left: 64px; }
  .rm-vhead > .rm-grip, .rm-vhead > .rm-tog { order: -2; }
  .rm-count { margin-left: 4px; }
  .rm-vhead .rm-add { margin-left: auto; }
}

/* Kundendaten: statistics tiles */
.stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.stat { display: grid; gap: 2px; padding: 12px 14px; border: 1px solid var(--line); border-radius: 12px; background: color-mix(in srgb, var(--bg) 55%, var(--panel)); }
.stat-l { font-size: 12px; font-weight: 600; letter-spacing: .03em; color: var(--muted); }
.stat-n { font: 700 28px/1.15 var(--font-round); font-variant-numeric: tabular-nums; }
.stat-s { font-size: 12px; color: var(--muted); }
@media (max-width: 700px) { .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.set-card .consent-edit { margin-top: 0; }
.pane-sec > .ulist { background: color-mix(in srgb, var(--bg) 55%, var(--panel)); }

/* Hint for the <tipp> tag below the Freitext field. */
.tag-hint { display: block; margin-top: 2px; }
.tag-hint code { font: 12px/1.3 ui-monospace, SFMono-Regular, Menlo, monospace; padding: 1px 4px; border-radius: 4px; background: rgba(235,106,10,.10); color: #a84a05; }
.fac-list[hidden] { display: none; }

/* Einstellungen → Karte: own type symbols */
.ti-list { display: grid; gap: 8px; }
.ti-row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.ti-prev { width: 44px; height: 44px; border-radius: 10px; display: grid; place-items: center; border: 1px solid var(--line); flex: none; }
.ti-prev svg { width: 26px; height: 26px; }
.ti-prev.dark { background: #1d2833; color: #fff; }
.ti-prev.light { background: #fff; color: #14202b; }
.ti-prev.fac { border-radius: 50%; color: #0d4f73; box-shadow: 0 1px 4px rgba(0,0,0,.18); } /* as on the map: white round badge */
.ti-name { min-width: 150px; flex: 1; font-weight: 600; }
.ti-name small { display: block; font-weight: 400; color: var(--muted); }
.ti-hint { margin-top: 12px; font-size: 12.5px; line-height: 1.45; }
.ti-hint p { margin: 0 0 6px; }
.ti-hint code { font-size: 12px; padding: 1px 4px; border-radius: 4px; background: var(--hover); }

/* Einstellungen → Karte: "Nachricht zur Bucht" */
.fb-form { display: flex; flex-wrap: wrap; gap: 10px; align-items: flex-end; margin-top: 10px; }
.fb-form label { display: grid; gap: 4px; font-size: 12.5px; color: var(--muted); }
.fb-form input { width: 240px; }

/* Einstellungen → Regionen */
.rg-tree { display: grid; gap: 10px; }
.rg { border: 1px solid var(--line); border-radius: 12px; background: var(--panel); overflow: hidden; }
.rg-head, .rg-sub { display: flex; align-items: center; gap: 8px; padding: 8px 10px; flex-wrap: wrap; }
.rg-head { background: var(--hover); }
.rg-sub { padding-left: 34px; border-top: 1px solid var(--line); }
.rg-name { flex: 1; min-width: 140px; display: grid; }
.rg-name small { color: var(--muted); font-size: 12px; }
.rg-count { color: var(--muted); font-size: 12.5px; min-width: 72px; text-align: right; }
.rg-ord { display: inline-flex; gap: 2px; }
.rg-ord .icon-btn { width: 24px; height: 24px; border: 1px solid var(--line); border-radius: 6px; background: transparent; cursor: pointer; font-size: 12px; line-height: 1; }
.rg-ord .icon-btn:disabled { opacity: .3; cursor: default; }
.rg-add { display: flex; gap: 8px; padding: 8px 10px 10px 34px; flex-wrap: wrap; }
.rg-add input { flex: 1; min-width: 180px; }
#rgNew { padding: 0; }
.tk-list { display: grid; gap: 6px; }
.tk-row { display: flex; gap: 10px; align-items: flex-start; padding: 8px; border-radius: 10px; border: 1px solid var(--line); }
.tk-row.warn { border-color: #f0b44c; background: color-mix(in srgb, #f0b44c 10%, transparent); }
.tk-main { display: grid; gap: 3px; flex: 1; min-width: 0; }
.tk-top { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.tk-region { font-size: 12px; font-weight: 600; color: var(--muted); min-width: 110px; }
.tk-row .tk-top input.tk-name { width: 240px; max-width: 100%; flex: none; }
.tk-hint { color: #b26a00; }
#dlgContent label.radio { display: flex; gap: 8px; align-items: center; margin: 8px 0; grid-template-columns: none; }
#dlgContent label.radio input[type=radio] { width: auto; margin: 0; }
#dlgContent label.radio select { width: auto; flex: 1; }

/* Konoba on the admin map: second line '"Name" 4,5/5' like on the public map */
.fmk span small { display: block; margin-top: 2px; font: inherit; color: inherit; }

/* Freitext: Link / Tipp / Mailto buttons under the text field */
.tag-btns { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 6px; }
.tag-btns .btn { padding: 4px 12px; font-size: 13px; }

/* Länder & Regionen: a country groups its regions */
.ct { border: 1px solid var(--line, #e1e5ea); border-radius: 12px; padding: 4px 10px 10px; margin-bottom: 14px; background: var(--card, #fff); }
.ct-head { display: flex; align-items: center; gap: 8px; padding: 8px 0; border-bottom: 1px solid var(--line, #e1e5ea); margin-bottom: 8px; }
.ct-head .rg-name b { font-size: 16px; }
.ct-regions .rg:last-child { margin-bottom: 0; }
.rg-add-region select { max-width: 160px; }
.place-path label { min-width: 0; }

/* Stammdaten → Sammlungen chips */
.coll-pick { display: flex; flex-wrap: wrap; gap: 6px; margin: 4px 0 2px; }
.coll-chip { border: 1px solid var(--line, #d0d4da); background: var(--card, #fff); border-radius: 999px; padding: 5px 12px; font: 500 13px/1.2 inherit; cursor: pointer; color: inherit; }
.coll-chip[aria-pressed="true"] { background: #0d7c8a; border-color: #0d7c8a; color: #fff; }
.coll-chip.gratis[aria-pressed="true"] { background: #eb6a0a; border-color: #eb6a0a; }

/* Sammlung → Orte dialog */
.coll-list { list-style: none; margin: 0 0 12px; padding: 0; max-height: 260px; overflow: auto; border: 1px solid var(--line, #e1e5ea); border-radius: 10px; }
.coll-list li { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 6px 10px; border-top: 1px solid var(--line, #e1e5ea); }
.coll-list li:first-child { border-top: 0; }
/* Kundendaten → Abos */
.abo-tags { display: flex; flex-wrap: wrap; gap: 4px; }
.abo-tag { background: #e8f4ec; color: #1b6b35; border-radius: 999px; padding: 2px 8px; font-size: 12px; white-space: nowrap; }
.abo-tag.admin { background: #e7f0fd; color: #1a56b0; }
.abo-row { display: grid; grid-template-columns: 1fr auto; gap: 8px; align-items: center; padding: 6px 0; border-top: 1px solid var(--line, #e1e5ea); }
.abo-row .st-active { color: #1b6b35; } .abo-row .st-ended { color: #8a8f98; } .abo-row .st-planned { color: #a15c00; }

/* Kundendaten → Registrierungsformular (collapsible) */
/* Frontend → Features */
.feat-layers { display: flex; flex-wrap: wrap; gap: 8px 18px; margin: 4px 0 2px 52px; }
.feat-layers label { display: inline-flex; align-items: center; gap: 6px; font-size: 14px; }
.feat-layers label.disabled { color: var(--muted); }
.feat-layers.off { opacity: .45; pointer-events: none; }

/* ---------------------------------------------------------------- Bereiche: Editor | Liste | Roadmap */
.main-nav { display: flex; gap: 2px; margin: 0 auto 0 22px; }
.nav-tab { display: inline-flex; align-items: center; padding: 8px 14px; border-radius: 10px; color: var(--muted); text-decoration: none; font-weight: 600; }
.nav-tab:hover { background: var(--hover); color: var(--fg); }
.nav-tab[aria-current="page"] { background: var(--active); color: var(--fg); }
.shell.lv-mode .sidebar, .shell.lv-mode .editor { display: none; }
@media (max-width: 760px) { .main-nav { margin: 0; order: 3; width: 100%; } }

/* ---------------------------------------------------------------- Liste */
.lview { grid-column: 1 / -1; min-width: 0; min-height: 0; display: flex; flex-direction: column; position: relative; }
.lv-bar { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; padding: 12px 16px; background: var(--panel); border-bottom: 1px solid var(--line); }
.lv-bar #lvSearch { width: 240px; }
.lv-spacer { flex: 1; }
.lv-view b { font-weight: 600; }
.lv-mod { color: var(--accent); font-weight: 600; margin-left: 4px; }
.lv-chips { display: contents; }
.lv-chip { display: inline-flex; align-items: stretch; border: 1px solid color-mix(in srgb, var(--sea) 45%, var(--line)); background: color-mix(in srgb, var(--sea) 9%, var(--panel)); border-radius: 999px; overflow: hidden; font-size: 12.5px; }
.lv-chip button { border: 0; background: none; cursor: pointer; padding: 5px 4px 5px 11px; color: var(--fg); }
.lv-chip .lv-chip-x { padding: 5px 9px 5px 5px; color: var(--muted); }
.lv-chip button:hover { background: color-mix(in srgb, var(--sea) 14%, transparent); }
.linkbtn { border: 0; background: none; padding: 0; color: var(--sea); cursor: pointer; font: inherit; text-decoration: underline; text-underline-offset: 2px; }
.lv-sel { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; padding: 8px 16px; background: color-mix(in srgb, var(--sea) 10%, var(--panel)); border-bottom: 1px solid color-mix(in srgb, var(--sea) 30%, var(--line)); font-size: 13px; }
.lv-sel .btn.small, .lf-actions .btn.small, .lv-undo .btn.small { padding: 5px 10px; font-size: 13px; border-radius: 8px; }
.lv-warn { color: var(--muted); }
.lv-scroll { flex: 1; min-height: 0; overflow: auto; background: var(--panel); outline: none; }
.lv-table { border-collapse: separate; border-spacing: 0; table-layout: fixed; font-size: 13px; }
.lv-table th, .lv-table td { padding: 0 8px; height: 34px; border-bottom: 1px solid var(--line); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; text-align: left; background: var(--panel); }
.lv-table th { position: sticky; top: 0; z-index: 2; height: 38px; font-size: 12px; font-weight: 600; color: var(--muted); cursor: pointer; user-select: none; background: var(--bg); border-bottom-color: color-mix(in srgb, var(--fg) 18%, var(--line)); padding-right: 22px; }
.lv-table th:hover { color: var(--fg); }
.lv-table th.num, .lv-table td.num { text-align: right; font-variant-numeric: tabular-nums; }
.lv-table .lv-ck { position: sticky; left: 0; z-index: 1; width: 36px; padding: 0 0 0 12px; text-overflow: clip; cursor: pointer; }
.lv-table .lv-stick { position: sticky; left: 36px; z-index: 1; box-shadow: inset -1px 0 0 var(--line); }
.lv-table th.lv-ck, .lv-table th.lv-stick { z-index: 3; }
.lv-table tbody tr { cursor: pointer; }
.lv-table tbody tr:hover td { background: var(--hover); }
.lv-table tbody tr.sel td { background: var(--active); }
.lv-th { overflow: hidden; text-overflow: ellipsis; }
.lv-sort { margin-left: 4px; color: var(--accent); font-size: 10px; }
.lv-sort sup { font-size: 9px; margin-left: 1px; }
.lv-hf { position: absolute; right: 6px; top: 50%; transform: translateY(-50%); width: 18px; height: 18px; padding: 2px; border: 0; border-radius: 5px; background: none; color: var(--muted); cursor: pointer; opacity: 0; }
.lv-hf svg { width: 100%; height: 100%; display: block; }
.lv-table th:hover .lv-hf, .lv-hf:focus-visible { opacity: .8; }
.lv-hf.on { opacity: 1; color: var(--sea); }
.lv-hf:hover { background: var(--hover); opacity: 1; }
.lv-rs { position: absolute; top: 0; right: -3px; width: 7px; height: 100%; cursor: col-resize; z-index: 4; }
.lv-rs:hover { background: color-mix(in srgb, var(--accent) 60%, transparent); }
.lv-name { font-weight: 600; }
.lv-tag { display: inline-block; margin-right: 4px; padding: 1px 7px; border-radius: 999px; background: var(--hover); border: 1px solid var(--line); font-size: 11.5px; }
.lv-yes { color: var(--ok); font-weight: 700; }
.lv-pct { display: inline-block; width: 34px; height: 6px; margin-right: 6px; border-radius: 3px; background: var(--line); vertical-align: middle; overflow: hidden; }
.lv-pct i { display: block; height: 100%; background: var(--ok); }
.lv-empty { padding: 40px 16px !important; text-align: center !important; color: var(--muted); cursor: default; height: auto !important; }
.lv-foot { display: flex; gap: 16px; align-items: center; justify-content: space-between; flex-wrap: wrap; padding: 8px 16px; border-top: 1px solid var(--line); background: var(--panel); font-size: 13px; font-weight: 600; }
.lv-foot .small { font-weight: 400; }
.lv-undo { position: absolute; left: 50%; bottom: 84px; transform: translateX(-50%); display: flex; align-items: center; gap: 12px; background: #14202b; color: #fff; padding: 8px 10px 8px 16px; border-radius: 12px; box-shadow: 0 10px 30px rgba(0,0,0,.25); z-index: 20; max-width: calc(100% - 32px); }
.lv-undo .btn { background: #fff; color: #14202b; border-color: #fff; }
.lv-undo-x { border: 0; background: none; color: #fff; opacity: .7; cursor: pointer; font-size: 14px; }
/* popover (filter editor, columns, views, menus) */
.lv-pop:focus { outline: none; }
.lv-pop { position: fixed; z-index: 50; min-width: 220px; max-width: min(380px, calc(100vw - 16px)); max-height: min(70vh, 560px); overflow: auto; background: var(--panel); border: 1px solid var(--line); border-radius: 14px; box-shadow: 0 16px 48px rgba(0,0,0,.22); padding: 12px; }
.lv-pop.wide { width: 340px; }
.lf, .lc { display: grid; gap: 10px; }
.lf-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.lf-opts { display: grid; gap: 1px; max-height: 260px; overflow: auto; margin-top: 6px; border: 1px solid var(--line); border-radius: 9px; padding: 4px; }
.lf-opt { display: flex !important; align-items: center; gap: 8px; padding: 4px 6px; border-radius: 6px; font-weight: 400 !important; color: var(--fg) !important; font-size: 13px !important; cursor: pointer; }
.lf-opt:hover { background: var(--hover); }
.lf-opt span { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lf-opt small { color: var(--muted); font-variant-numeric: tabular-nums; }
.lf-all { margin-top: 4px; font-size: 12px; color: var(--muted); }
.lf-radio { display: flex; gap: 16px; }
.lf-actions { display: flex; align-items: center; gap: 6px; }
.lf-actions span { flex: 1; }
label.inline { display: inline-flex; align-items: center; gap: 6px; font-weight: 500; color: var(--fg); font-size: 13px; }
.lc-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 1px; }
.lc-list li { display: flex; align-items: center; gap: 8px; padding: 4px 6px; border-radius: 7px; background: var(--panel); }
.lc-list li:hover { background: var(--hover); }
.lc-list li.dragging { opacity: .5; outline: 2px dashed var(--sea); }
.lc-grip { cursor: grab; color: var(--muted); letter-spacing: -2px; font-size: 12px; }
.lm { display: grid; gap: 1px; min-width: 240px; }
.lm-h { font-size: 12px; font-weight: 700; color: var(--muted); padding: 2px 8px 6px; }
.lm-i { text-align: left; border: 0; background: none; padding: 7px 10px; border-radius: 8px; cursor: pointer; color: var(--fg); }
.lm-i:hover:not(:disabled) { background: var(--hover); }
.lm-i:disabled { color: var(--muted); cursor: default; }
.lm-i.on { font-weight: 700; }
.lm-i.on::before { content: "✓ "; color: var(--accent); }
.lm-i.danger { color: var(--bad); }
.lm hr { border: 0; border-top: 1px solid var(--line); margin: 6px 0; width: 100%; }
dialog.wide { width: min(980px, calc(100% - 24px)); }
.lv-map { height: min(62vh, 560px); border-radius: 12px; overflow: hidden; background: #0b1520; display: grid; place-items: center; }
.lv-map > p { color: #9fb0c0; }
#lfBody { display: grid; gap: 10px; }

/* ---------------------------------------------------------------- Konto oben rechts: der gleiche Kreis wie auf der Karte */
.account { position: relative; margin-left: 4px; }
.acct-btn { display: grid; place-items: center; width: 58px; height: 58px; padding: 0; border-radius: 50%; cursor: pointer;
  background: rgba(16, 22, 30, .26); border: 1px solid rgba(255, 255, 255, .22); box-shadow: 0 4px 16px rgba(0, 0, 0, .14), inset 0 1px 0 rgba(255, 255, 255, .12); }
.acct-btn:hover, .acct-btn[aria-expanded="true"] { background: rgba(16, 22, 30, .36); }
.acct-btn:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.acct-ico { display: grid; place-items: center; width: 41px; height: 41px; border-radius: 50%; background: var(--accent); color: #fff;
  font: 700 15.5px/1 var(--font); letter-spacing: .02em; text-transform: uppercase; overflow: hidden; }
.acct-ico.has-img { background: none; }
.acct-ico img { width: 100%; height: 100%; object-fit: cover; border-radius: 50%; display: block; }
.acct-menu { position: absolute; right: 0; top: calc(100% + 8px); z-index: 60; min-width: 230px; padding: 8px; display: grid; gap: 2px;
  background: var(--panel); border: 1px solid var(--line); border-radius: 16px; box-shadow: 0 16px 48px rgba(0, 0, 0, .22); }
.am-who { display: grid; gap: 3px; padding: 8px 10px 10px; border-bottom: 1px solid var(--line); margin-bottom: 4px; }
.am-who b { font-size: 15px; }
.am-who small { font-size: 12.5px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.am-item { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 10px; border: 0; border-radius: 10px; background: none;
  color: var(--fg); font: 500 14.5px/1 var(--font); text-align: left; text-decoration: none; cursor: pointer; }
.am-item:hover, .am-item:focus-visible { background: var(--hover); outline: none; }
.topbar { padding-top: 9px; padding-bottom: 9px; }
.top-actions { display: flex; align-items: center; gap: 6px; }
.main-nav { margin: 0 10px 0 auto; }
@media (max-width: 760px) { .main-nav { margin: 0; } .acct-btn { width: 52px; height: 52px; } .acct-ico { width: 38px; height: 38px; } }

/* ---------------------------------------------------------------- Shop-Anbindung */
.shop-status { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--line); font-size: 13px; color: var(--muted); }
.shop-status > span:nth-child(2) { flex: 1; min-width: 200px; }
.shop-status .dot { width: 10px; height: 10px; border-radius: 50%; background: var(--bad); flex: none; }
.shop-status .dot.on { background: var(--ok); }
.shop-key { display: flex; gap: 6px; margin-top: 4px; }
.shop-key input { flex: 1; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 12.5px; }
.spill { display: inline-block; padding: 2px 9px; border-radius: 999px; font-size: 12px; font-weight: 600; white-space: nowrap; background: var(--hover); color: var(--muted); }
.spill.ok { background: color-mix(in srgb, var(--ok) 15%, transparent); color: color-mix(in srgb, var(--ok) 80%, #000); }
.spill.wait { background: color-mix(in srgb, var(--accent) 15%, transparent); color: color-mix(in srgb, var(--accent) 85%, #000); }
.spill.bad { background: color-mix(in srgb, var(--bad) 14%, transparent); color: var(--bad); }
.shop-log td { vertical-align: middle; font-size: 13px; }
.shop-log tr.sl-main td { border-bottom: 0; padding-bottom: 2px; }
.shop-log tr.sl-note td { padding-top: 0; font-size: 12.5px; color: var(--muted); }
.shop-log .sl-acts { text-align: right; }
.nowrap { white-space: nowrap; }
.btn.small { padding: 5px 10px; font-size: 13px; }

/* Kundendaten: edit icon for the Abos of a row; checkbox editor footer; deleted checkbox columns */
.icon-edit { display: inline-grid; place-items: center; width: 26px; height: 26px; padding: 0; border: 1px solid var(--line, #d8dde3); border-radius: 7px;
  background: transparent; color: var(--sea); cursor: pointer; flex: none; }
.icon-edit svg { width: 15px; height: 15px; }
.icon-edit:hover { background: color-mix(in srgb, var(--sea) 10%, transparent); }
.icon-edit:focus-visible { outline: 2px solid var(--sea); outline-offset: 1px; }
.abo-tags { align-items: center; }
.consent-foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.consent-edit + .consent-edit { margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--line, #e5e7eb); }
#consentList + #cAdd { margin-top: 12px; }
.mtable th.former { color: var(--muted); font-style: italic; }
.consent-foot .btn.small { padding: 4px 10px; font-size: 12.5px; border-radius: 8px; }
.mtable th.ck { text-align: center; }
.mtable td.nl { width: auto; font-size: 16px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
/* Liste: "Linien anzeigen" = grid lines between all rows and columns */
.lv-lines { font-size: 13px; color: var(--muted); white-space: nowrap; cursor: pointer; }
.lv-table.lines th, .lv-table.lines td { border-right: 1px solid color-mix(in srgb, var(--fg) 12%, var(--line)); border-bottom-color: color-mix(in srgb, var(--fg) 12%, var(--line)); }
.lv-table.lines th { border-bottom-color: color-mix(in srgb, var(--fg) 22%, var(--line)); }
/* Impressum & Disclaimer */
.legal-ta { font: 13.5px/1.5 var(--font); min-height: 180px; resize: vertical; }
.lg-foot { display: flex; justify-content: flex-end; }
.legal-prev { max-height: 60vh; overflow: auto; font-size: 14px; line-height: 1.55; }
.legal-prev p { margin: 0 0 10px; }
.legal-prev h3 { margin: 14px 0 6px; font-size: 15px; }
/* Subscriptions → Zugänge: editor of the popup table */
.pl-ed-scroll { overflow-x: auto; margin: 14px 0 10px; }
.pl-ed { border-collapse: separate; border-spacing: 6px; min-width: 100%; }
.pl-ed th, .pl-ed td { vertical-align: top; text-align: left; font-weight: 400; }
.pl-ed input, .pl-ed select { width: 100%; min-width: 0; padding: 6px 8px; font-size: 13px; }
.pl-col { display: grid; gap: 5px; min-width: 140px; padding: 8px; border: 1px solid var(--line, #e5e7eb); border-radius: 10px; background: color-mix(in srgb, var(--sea) 4%, transparent); }
.pl-col input:first-child { font-weight: 700; }
.pl-row { display: flex; gap: 5px; align-items: center; min-width: 200px; }
.pl-cell { display: grid; gap: 4px; min-width: 120px; }
.pl-acts { display: flex; gap: 4px; justify-content: flex-end; }
.pl-acts .btn.small, #plAddCol, #plAddRow { padding: 3px 9px; font-size: 12.5px; border-radius: 8px; }
.pl-add { vertical-align: middle !important; }
.pl-foot { margin-top: 14px; }
.pl-ed input[type="radio"] { width: auto; padding: 0; }
.pl-col label.inline { display: flex; align-items: center; gap: 6px; justify-content: flex-start; font-size: 12.5px; }
.pl-row { min-width: 230px; }
/* Sicherheit: three levels side by side (stacked when narrow) */
.sc-levels { display: grid; gap: 10px; } /* one level per row, full width */
.sc-level { display: grid; gap: 10px; align-content: start; padding: 14px; border: 1px solid var(--line, #e5e7eb); border-radius: 14px; background: var(--card, #fff); }
.sc-level.off > :not(.sc-head) { opacity: .45; pointer-events: none; }
.sc-head { display: flex; align-items: center; gap: 10px; }
.sc-head b { flex: 1; font-size: 15px; }
.sc-num { display: grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; font: 700 13px/1 var(--font); color: #fff; background: #3f4650; flex: none; } /* all levels: dark grey */
.sc-on { font-size: 13px; white-space: nowrap; }
.sc-level p { margin: 0; }
.sc-row { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 16px; }
.sc-row label { display: grid; gap: 4px; font-size: 13px; }
.sc-unit { display: inline-flex; align-items: center; gap: 6px; }
.sc-unit input { width: 72px; }
.sc-sens button { padding: 6px 12px; }
.sc-adv { margin-top: 2px; }
.sc-adv summary { cursor: pointer; font-weight: 600; font-size: 13.5px; color: var(--muted); padding: 4px 0; }
.sc-adv .row2 { margin-top: 10px; }
.sc-rule { display: inline-flex; align-items: center; flex-wrap: wrap; gap: 6px; font-size: 13.5px; }
.sc-num-in { width: 76px; padding: 6px 8px; text-align: right; }
.sc-pat select { width: auto; min-width: 170px; }
.sc-level .sc-row .set-lbl { min-width: 110px; }
/* Allgemein → Assets (graphics, formerly its own menu item) */
.set-group-h { margin: 26px 0 4px; padding-top: 18px; border-top: 1px solid var(--line, #e5e7eb); font: 700 17px/1.2 var(--font); }
.sc-level .sc-rule input.sc-num-in { display: inline-block; width: 78px; min-width: 0; flex: none; margin: 0; padding: 6px 8px; }
.sc-level .sc-row { flex-wrap: wrap; }
.sc-level .sc-rule { flex: 0 1 auto; white-space: nowrap; }
.sc-admins { list-style: none; margin: 4px 0 6px; padding: 0; display: grid; gap: 2px; }
.sc-admins li { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 7px 0; border-bottom: 1px solid var(--line, #e5e7eb); }
.sc-admins li:last-child { border-bottom: 0; }
.sc-admins .who { display: grid; gap: 1px; min-width: 0; }
.sc-admins .who small { color: var(--muted); overflow: hidden; text-overflow: ellipsis; }
