/* Verwaltung Sprengmeister – Grundlage: Entwurf docs/superpowers/specs/2026-10-31-dashboard-entwurf-v2.html (Dashboard-Ansicht),
   ohne Inline-Stile (CSP). Dazu: Anmeldung/Einrichtung, Dialoge, Toasts, ausgegraute Navigation, Formularzeilen, Ladezustand. */

:root { --bg:#f4f5f8; --card:#fff; --ink:#1c2030; --mut:#6b7280; --line:#e4e6ec; --pri:#ff8a1f; --pri2:#ffb347; --side:#171a2b; --ok:#16a34a; --warn:#d97706; --bad:#dc2626; --vio:#6d4aff; }
* { box-sizing:border-box; }
body { margin:0; font:14px/1.45 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; background:var(--bg); color:var(--ink); }
[hidden] { display:none !important; }
a { color:inherit; }
h2, h3 { line-height:1.25; }
.hint, .mut { color:var(--mut); }
.hint { font-size:12px; }

/* ---------- Hülle ---------- */
.dash { display:grid; grid-template-columns:236px 1fr; min-height:100vh; }
/* bleibt beim Scrollen stehen; Abmelden immer unten sichtbar, die Navigation scrollt bei wenig Höhe selbst */
.side { background:var(--side); color:#c9cbe0; padding:14px 10px; display:flex; flex-direction:column; position:sticky; top:0; height:100vh; overflow-y:auto; }
.side .logo { color:#fff; font-weight:800; font-size:16px; padding:6px 10px 16px; }
.side .logo small { display:block; color:#8b8fb0; font-weight:500; font-size:11px; }
.nav { display:flex; align-items:center; gap:10px; padding:8px 10px; border-radius:8px; cursor:pointer; margin:1px 0; color:inherit; text-decoration:none; }
.nav:hover { background:#232742; } .nav.on { background:#2d3256; color:#fff; }
.nav .b { margin-left:auto; background:var(--pri); color:#2a1400; font-size:11px; font-weight:800; border-radius:10px; padding:0 7px; }
.nav.off { color:#7c809f; font-size:13px; white-space:nowrap; }
.nav.off small { flex:none; font-size:9px; text-transform:uppercase; letter-spacing:.06em; border:1px solid #3a3e5c; border-radius:6px; padding:0 4px; margin-left:auto; }
.side .grp { font-size:10px; text-transform:uppercase; letter-spacing:.08em; color:#6f7396; margin:14px 10px 4px; }
.side-foot { margin-top:auto; padding:12px 10px 4px; display:flex; flex-direction:column; gap:8px; align-items:flex-start; }
.side-foot small { color:#8b8fb0; font-size:11px; }
.main { padding:20px 24px; overflow:auto; min-width:0; }
.ph1 { display:flex; align-items:center; justify-content:space-between; gap:10px; flex-wrap:wrap; margin-bottom:14px; }
.ph1 h2 { margin:0; font-size:20px; }

/* ---------- Bausteine der Seiten (Entwurf) ---------- */
.kpis { display:grid; grid-template-columns:repeat(auto-fit,minmax(150px,1fr)); gap:12px; margin-bottom:16px; }
.k { background:var(--card); border:1px solid var(--line); border-radius:12px; padding:12px 14px; }
.k .l { color:var(--mut); font-size:12px; } .k .v { font-size:24px; font-weight:800; margin-top:2px; } .k .d { font-size:12px; color:var(--ok); }
.k .v.pri { color:var(--pri); } .k .v.sm { font-size:18px; } .k .d.mut { color:var(--mut); } .k .d.warn { color:var(--warn); }
.grid2 { display:grid; grid-template-columns:2fr 1fr; gap:14px; }
.card { background:var(--card); border:1px solid var(--line); border-radius:12px; padding:14px; margin-bottom:14px; }
.card h3 { margin:0 0 10px; font-size:14px; display:flex; justify-content:space-between; align-items:center; gap:8px; flex-wrap:wrap; }
.scroll { overflow-x:auto; }
.chart { display:block; width:100%; height:auto; max-height:220px; }
.chart .bar { fill:var(--pri); }
.chart .lbl { fill:var(--mut); font-size:10px; }
.chart .val { fill:var(--ink); font-size:11px; font-weight:700; }
table { width:100%; border-collapse:collapse; font-size:13px; }
th { text-align:left; color:var(--mut); font-weight:600; font-size:12px; border-bottom:1px solid var(--line); padding:7px 6px; }
td { border-bottom:1px solid var(--line); padding:8px 6px; vertical-align:middle; }
.st { font-size:11px; font-weight:700; padding:2px 8px; border-radius:10px; white-space:nowrap; }
.st.ok { background:#dcfce7; color:#166534; } .st.wa { background:#fef3c7; color:#92400e; } .st.no { background:#fee2e2; color:#991b1b; } .st.pa { background:#e0e7ff; color:#3730a3; }
.b1 { border:1px solid var(--line); background:#fff; color:var(--ink); border-radius:8px; padding:6px 11px; font:inherit; font-weight:600; cursor:pointer; font-size:13px; text-decoration:none; display:inline-block; }
.b1.p { background:var(--ink); color:#fff; border-color:var(--ink); } .b1.o { background:var(--ok); color:#fff; border-color:var(--ok); } .b1.r { color:var(--bad); }
.b1.d { background:var(--bad); color:#fff; border-color:var(--bad); }
.b1.w { display:block; width:100%; padding:10px 12px; font-size:14px; text-align:center; }
.b1.link { border-color:transparent; background:none; color:var(--mut); padding:6px 4px; text-decoration:underline; }
.b1:disabled { opacity:.5; cursor:not-allowed; }
select, input[type=text], input[type=date], input[type=number], input[type=password], input[type=search], input[type=datetime-local], textarea {
  border:1px solid var(--line); border-radius:8px; padding:6px 8px; font:inherit; background:#fff; color:var(--ink); max-width:100%; }
textarea { resize:vertical; }
.feed div { padding:7px 0; border-bottom:1px dashed var(--line); font-size:13px; } .feed small { color:var(--mut); }
.req { display:flex; gap:10px; align-items:flex-start; padding:10px 0; border-bottom:1px solid var(--line); flex-wrap:wrap; }
.av { width:36px; height:36px; border-radius:50%; background:#ffe1c2; display:flex; align-items:center; justify-content:center; font-weight:800; color:#a34c00; flex:none; }
.req .msg { flex:1; min-width:200px; } .req .msg q { color:var(--mut); }
.tpl { overflow:auto; }
.tpl table th { position:sticky; top:0; background:#fff; }
.tpl td.c { text-align:center; } .tpl .grp td { background:#f7f7fb; font-weight:800; font-size:12px; color:#3b3f5c; }
.y { color:var(--ok); font-weight:800; } .n { color:#c4c7d2; } .r { color:var(--warn); font-weight:700; font-size:12px; }
.tplhead { display:flex; gap:10px; flex-wrap:wrap; margin-bottom:12px; }
.tc { border:2px solid var(--line); background:#fff; border-radius:12px; padding:10px 12px; min-width:150px; cursor:pointer; }
.tc.on { border-color:var(--pri); box-shadow:0 0 0 3px #ffe4c7; } .tc b { display:block; } .tc small { color:var(--mut); }
.tc.new { border-style:dashed; color:var(--mut); display:flex; align-items:center; justify-content:center; }
.det { display:grid; grid-template-columns:1fr 1fr; gap:14px; }
.kv { display:grid; grid-template-columns:150px 1fr; gap:6px 10px; font-size:13px; align-items:center; }
.kv span { color:var(--mut); }
.ov td:first-child { width:45%; }
.tog { display:inline-block; width:34px; height:19px; border-radius:12px; background:#d1d5db; position:relative; vertical-align:middle; }
.tog::after { content:""; position:absolute; width:15px; height:15px; border-radius:50%; background:#fff; top:2px; left:2px; }
.tog.on { background:var(--ok); } .tog.on::after { left:17px; }
.set { display:grid; grid-template-columns:1fr auto; gap:10px 16px; align-items:center; padding:10px 0; border-bottom:1px solid var(--line); }
.set p { margin:2px 0 0; color:var(--mut); font-size:12px; }
.note { border-left:4px solid var(--warn); background:#fffbeb; padding:8px 12px; font-size:12px; color:#78350f; border-radius:0 8px 8px 0; margin:0 0 14px; }
.filt { display:flex; gap:6px; flex-wrap:wrap; }
.subt { display:flex; gap:4px; flex-wrap:wrap; margin:0 0 14px; border-bottom:1px solid var(--line); }
.subt a, .subt span { padding:7px 12px; border-radius:8px 8px 0 0; cursor:pointer; color:var(--mut); font-weight:600; font-size:13px; text-decoration:none; }
.subt a.on, .subt span.on { color:var(--ink); border-bottom:3px solid var(--pri); }
.mx td.c { text-align:center; } .mx input { width:16px; height:16px; }
.cd { font-variant-numeric:tabular-nums; font-weight:800; color:var(--warn); }

/* ---------- Formulare, Texte ---------- */
.fr { display:grid; gap:4px; margin:0 0 12px; }
.fr > span { color:var(--mut); font-size:12px; font-weight:600; }
.fr input, .fr select, .fr textarea { width:100%; }
.chk { display:flex; gap:8px; align-items:flex-start; margin:0 0 12px; cursor:pointer; }
.chk input { margin-top:3px; }
.btns { display:flex; gap:8px; flex-wrap:wrap; margin:10px 0; }
.err { color:var(--bad); font-weight:600; margin:8px 0; }
.err:empty { display:none; }
.ok-text { color:var(--ok); font-weight:600; }
.offscreen { position:fixed; left:-9999px; top:0; opacity:0; }

/* ---------- Laden, Fehler ---------- */
.boot { min-height:100vh; display:flex; align-items:center; justify-content:center; color:var(--mut); padding:16px; text-align:center; }
.loading { display:flex; align-items:center; gap:10px; color:var(--mut); padding:24px 4px; }
.spin { width:16px; height:16px; border:2px solid var(--line); border-top-color:var(--pri); border-radius:50%; display:inline-block; animation:spin .8s linear infinite; flex:none; }
@keyframes spin { to { transform:rotate(360deg); } }
.err-card { border-color:#fecaca; }
.err-card h3 { color:var(--bad); }

/* ---------- Anmeldung und Einrichtung ---------- */
.auth-wrap { min-height:100vh; display:flex; align-items:center; justify-content:center; padding:16px; background:var(--side); }
.card.auth { width:100%; max-width:420px; margin:0; padding:22px; }
.card.auth.wide { max-width:560px; }
.card.auth h3 { font-size:15px; margin:18px 0 8px; display:block; }
.auth-logo { font-weight:800; font-size:18px; margin-bottom:16px; }
.auth-logo small { display:block; color:var(--mut); font-weight:500; font-size:12px; }
.or { display:flex; align-items:center; gap:10px; color:var(--mut); font-size:12px; margin:14px 0; }
.or::before, .or::after { content:""; flex:1; border-top:1px solid var(--line); }
.auth-foot { display:flex; justify-content:space-between; align-items:center; gap:8px; margin-top:10px; flex-wrap:wrap; }
.qr { background:#fff; border:1px solid var(--line); border-radius:10px; padding:10px; margin:8px 0; }
.qr svg { display:block; width:100%; max-width:220px; height:auto; margin:0 auto; }
.secret-row { display:flex; gap:8px; align-items:center; flex-wrap:wrap; margin-bottom:6px; }
.secret { font:600 15px/1.4 ui-monospace, Consolas, monospace; letter-spacing:.04em; background:#f7f7fb; border:1px solid var(--line); border-radius:8px; padding:6px 10px; word-break:break-all; }
.codes { display:grid; grid-template-columns:repeat(2, 1fr); gap:6px; margin:10px 0; }
.codes code { font:600 15px/1.4 ui-monospace, Consolas, monospace; text-align:center; background:#f7f7fb; border:1px solid var(--line); border-radius:6px; padding:6px; }

/* ---------- Dialoge ---------- */
dialog.dlg { border:none; border-radius:14px; padding:0; width:100%; max-width:min(520px, calc(100vw - 24px)); max-height:calc(100vh - 24px); color:var(--ink); box-shadow:0 20px 50px rgba(15,17,30,.35); }
dialog.dlg.wide { max-width:min(760px, calc(100vw - 24px)); }
dialog.dlg::backdrop { background:rgba(15,17,30,.55); }
.dlg-body { padding:18px; }
.dlg-body h3 { margin:0 0 10px; font-size:16px; }
.dlg-btns { display:flex; gap:8px; justify-content:flex-end; flex-wrap:wrap; margin-top:14px; }
dialog.dlg .card.auth { border:none; max-width:none; }

/* ---------- Toasts ---------- */
.toasts { position:fixed; right:16px; bottom:16px; display:flex; flex-direction:column; gap:8px; z-index:50; max-width:360px; }
.toast { background:var(--ink); color:#fff; padding:10px 14px; border-radius:10px; font-weight:600; box-shadow:0 8px 24px rgba(15,17,30,.25); cursor:pointer; }
.toast.err { background:var(--bad); }

/* ---------- Handy (bis 820 px): Seitenleiste als wischbare Leiste oben ---------- */
@media (max-width:820px) {
  .dash { grid-template-columns:1fr; grid-template-rows:auto 1fr; }
  .side { flex-direction:row; align-items:center; overflow-x:auto; overflow-y:hidden; height:auto; gap:4px; padding:8px; z-index:4; }
  .side .logo, .side .grp, .side-foot small { display:none; }
  .side nav { display:flex; gap:4px; flex:none; }
  .nav { white-space:nowrap; }
  .nav .b { margin-left:4px; }
  .side-foot { margin:0 0 0 8px; padding:0; flex:none; }
  .grid2, .det { grid-template-columns:1fr; }
  .main { padding:14px; }
  .kv { grid-template-columns:120px 1fr; }
  .toasts { left:8px; right:8px; bottom:8px; max-width:none; }
  .card.auth { padding:16px; }
}

/* ---------- Übersicht und Anfragen ---------- */
.ph1 .filt { align-items:center; }
.card h3 .b1 { font-weight:600; }
.req:last-child { border-bottom:none; }
.ctl { display:flex; flex-wrap:wrap; align-items:flex-end; gap:8px 10px; }
.ctl .fl { display:grid; gap:2px; }
.fl .t { color:var(--mut); font-size:12px; }
.ctl .acts { display:flex; gap:6px; flex-wrap:wrap; }
.upg { display:flex; gap:6px; align-items:center; flex-wrap:wrap; }
.items { display:flex; flex-wrap:wrap; gap:2px 14px; margin:6px 0 2px; }
.items .chk { margin:0; align-items:center; }
.items .chk input { margin-top:0; }
.ask { margin-top:6px; padding:6px 10px; border-radius:8px; background:#f7f7fb; font-size:13px; }
.ask small { color:var(--mut); }

/* ---------- Spielerliste und Spieler-Detail ---------- */
.ph1 .filt input[type=search] { width:190px; }
.plist th a { color:inherit; text-decoration:none; white-space:nowrap; }
.plist th a:hover, .plist th[aria-sort] a { color:var(--ink); }
.plist .num { text-align:right; font-variant-numeric:tabular-nums; }
.plist td { white-space:nowrap; }
.plist td a { text-decoration:none; }
.plist tbody tr[data-act] { cursor:pointer; }
.plist tbody tr[data-act]:hover { background:#fafafd; }
.more { display:flex; align-items:center; justify-content:space-between; gap:10px; flex-wrap:wrap; margin:0 0 14px; }
.ph1 h2 .st { font-size:12px; vertical-align:middle; font-weight:700; }
.det > div { min-width:0; }
.kv > span { overflow-wrap:anywhere; }
.kv b { font-weight:600; min-width:0; overflow-wrap:anywhere; }
.kv .dv { display:flex; gap:4px 12px; align-items:center; flex-wrap:wrap; }
.kv .dv span, .kv .chk span { color:var(--ink); }
.kv .dv input[type=number] { width:100px; }
.kv .chk { margin:0; align-items:center; }
.kv .chk input { margin-top:0; }
.kv > input[type=text] { width:100%; }
.kv q { color:var(--mut); }
.chips { display:flex; flex-wrap:wrap; gap:6px; margin-top:12px; }
.chip { background:#f7f7fb; border:1px solid var(--line); border-radius:10px; padding:2px 8px; font-size:12px; }
.feed.long { max-height:360px; overflow:auto; }

/* ---------- Zeit-Freischaltungen ---------- */
.temps td { white-space:nowrap; }
.temps td.what { white-space:normal; min-width:170px; }
.temps td.what small { display:block; max-width:340px; overflow-wrap:anywhere; }
.temps td.tact .b1 { margin-right:4px; }
.zf { align-items:start; }
.zf > span { padding-top:7px; }
.zf > .dv { min-width:0; }
.zf .pick { flex:1 1 100%; display:grid; gap:6px; }
.zf .pick input[type=search] { width:100%; max-width:320px; }
.zf .pick-list { max-height:200px; overflow:auto; border:1px solid var(--line); border-radius:8px; padding:8px 10px; }
.zf .pick-list .chk { margin:0 0 6px; align-items:center; }
.zf .pick-list .chk input { margin-top:0; }
.zf .chosen { flex:1 1 100%; }
.zf .chosen div { display:flex; justify-content:space-between; align-items:center; gap:8px; flex-wrap:wrap; }
.zf .rt { color:var(--ink); }
.zf .dv input[type=number] { width:90px; }
.zf .dv textarea { flex:1 1 100%; max-width:480px; }
.zf .dv > .chk { min-height:30px; }
.ext-date { display:flex; gap:8px; align-items:center; flex-wrap:wrap; margin:0 0 12px; }
.ext-date .chk { margin:0; align-items:center; }
.ext-date .chk input { margin-top:0; }
details.card > summary { cursor:pointer; font-weight:700; font-size:14px; }
details.card[open] > summary { margin-bottom:10px; }
@media (max-width:560px) {
  .zf { grid-template-columns:minmax(0, 1fr); gap:2px; }
  .zf > span { margin-top:8px; }
}

/* ---------- Spieler-Detail: Ausnahmen, Konto, Spielstand ---------- */
.rows div { display:flex; justify-content:space-between; align-items:center; gap:8px; flex-wrap:wrap; }
.rows .rt { color:var(--ink); min-width:0; overflow-wrap:anywhere; }
.ovr-add { display:flex; flex-wrap:wrap; gap:8px; align-items:center; margin-top:12px; }
.ovr-add input[type=number] { width:90px; }
.file-row { display:flex; flex-wrap:wrap; gap:8px; align-items:center; }
input[type=file] { max-width:100%; font:inherit; font-size:13px; }
.sh { margin:14px 0 6px; font-size:13px; }
.codes.one { grid-template-columns:1fr; }
.codes.one code { font-size:22px; letter-spacing:2px; padding:12px; }

/* ---------- Vorlagen (Matrix) ---------- */
.tplhead button.tc { font:inherit; color:var(--mut); text-align:left; }
.tplhead .tc:not(.new) { cursor:default; }
.tplhead .tc small { display:block; }
.mxwrap { overflow:auto; max-height:75vh; }
/* Spaltenbreite der Vorlagen: Kopf, Knöpfe und Speichern haben genau diese Breite (sonst machte die Knopfzeile jede Spalte breit) */
.vmx { --vcol:170px; width:max-content; min-width:100%; border-collapse:separate; border-spacing:0; }
.vmx th, .vmx td { background:#fff; border-bottom:1px solid var(--line); padding:6px 8px; vertical-align:middle; }
.vmx td.c { text-align:center; }
.vmx .stick { position:sticky; left:0; z-index:1; min-width:150px; max-width:210px; border-right:1px solid var(--line); text-align:left; }
.vmx thead tr.names th { position:sticky; top:0; z-index:2; vertical-align:top; }
.vmx thead tr.names th.stick { z-index:3; }
.vmx thead th { font-size:12px; }
.vmx thead th small { display:block; font-weight:500; }
.vmx tbody th { font-weight:400; font-size:13px; color:var(--ink); }
.vmx .grp th, .vmx .grp td { background:#f7f7fb; }
.vmx .grp th { font-weight:800; }
.vmx .sub th, .vmx .sub td { background:#fbfbfd; color:var(--mut); font-size:11px; font-weight:700; text-transform:uppercase; letter-spacing:.04em; padding-top:4px; padding-bottom:4px; }
.vmx .vt { width:var(--vcol); font-size:13px; color:var(--ink); margin-bottom:6px; overflow-wrap:anywhere; }
.vmx .vb { width:var(--vcol); display:flex; flex-wrap:wrap; gap:4px; }
.vmx .vb .b1, .vmx .names .b1 { padding:3px 8px; font-size:12px; }
.vmx .names .b1 { width:var(--vcol); white-space:normal; }
.vmx input[type=checkbox] { width:18px; height:18px; }
.vmx input[type=number] { width:72px; }
.vmx thead input[type=number] { width:120px; }
.b1.mini { padding:2px 7px; font-size:12px; }
.vmx .gt { text-align:left; font-weight:800; color:#3b3f5c; text-decoration:none; padding:0; }
@media (max-width:560px) {
  .tplhead .tc { flex:1 1 140px; min-width:0; padding:8px 10px; }
  .mxwrap { max-height:70vh; }
  .vmx { --vcol:132px; }
  .vmx .stick { min-width:98px; max-width:110px; font-size:12px; }
  .vmx tbody th { font-size:12px; }
  .vmx th, .vmx td { padding:6px; }
}

/* ---------- Inhalte & Events, Rangliste, Karten ---------- */
.set .chk { margin:0; align-items:center; white-space:nowrap; }
.set .chk input { margin-top:0; width:18px; height:18px; }
.set .part { color:var(--warn); font-weight:600; }
[data-sec] .card h3 small { font-weight:500; }
.evt td { white-space:nowrap; }
.evt select, .evt input[type=datetime-local] { min-width:150px; }
.card > input[type=search] { width:100%; max-width:320px; }
.promo-box { max-height:320px; overflow:auto; border:1px solid var(--line); border-radius:8px; padding:2px 10px 8px; margin:8px 0 6px; }
.promo-box .chk { margin:0 0 6px; align-items:center; }
.promo-box .chk input { margin-top:0; }
.lbbox { max-height:480px; overflow:auto; }
.lbt th { position:sticky; top:0; background:#fff; white-space:nowrap; }
.lbt td { white-space:nowrap; }
.lbt td.nm { white-space:normal; overflow-wrap:anywhere; min-width:130px; }
.lbt td.num { text-align:right; font-variant-numeric:tabular-nums; }

/* ---------- Nachrichten ---------- */
.msgs { display:grid; grid-template-columns:minmax(240px, 1fr) 2fr; gap:14px; align-items:start; }
.msgs > .card { margin-bottom:0; min-width:0; }
.thr-list { max-height:70vh; overflow:auto; }
.thr { display:flex; gap:10px; align-items:flex-start; padding:10px 8px; border-bottom:1px solid var(--line); border-radius:8px; color:inherit; text-decoration:none; }
.thr:last-child { border-bottom:none; }
.thr:hover { background:#f7f7fb; }
.thr.on { background:#f0edff; }
.thr .msg { flex:1; min-width:0; }
.thr .last { color:var(--mut); font-size:13px; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.thr.unread .last { color:var(--ink); font-weight:600; }
.thr .bd { background:var(--pri); color:#2a1400; font-size:11px; font-weight:800; border-radius:10px; padding:0 7px; }
.conv-head { display:flex; align-items:center; gap:8px; flex-wrap:wrap; margin-bottom:10px; }
.conv-back { display:none; }
.bubs { display:flex; flex-direction:column; gap:8px; max-height:55vh; overflow:auto; padding:2px; margin-bottom:12px; }
.bub { max-width:80%; padding:8px 12px; border-radius:14px; background:#f1f2f6; overflow-wrap:anywhere; }
.bub.pl { align-self:flex-start; border-bottom-left-radius:4px; }
.bub.op { align-self:flex-end; background:#efeaff; border-bottom-right-radius:4px; }
.bub small { display:block; color:var(--mut); font-size:11px; margin-top:2px; }
.bub .b1.link { padding:0 4px; font-size:11px; }
.reply { display:grid; gap:8px; }
.reply .fr { margin:0; }
.rbar { display:flex; flex-wrap:wrap; align-items:center; gap:8px 12px; }
.rbar .rinfo { flex:1; min-width:140px; display:flex; flex-wrap:wrap; gap:2px 12px; }
.count.bad { color:var(--bad); font-weight:700; }
.rep-acts { display:flex; flex-wrap:wrap; gap:6px; }
/* Handy: entweder nur die Liste (#/nachrichten) oder nur das Gespräch (#/nachrichten/<id>) */
@media (max-width:820px) {
  .msgs { grid-template-columns:minmax(0, 1fr); }
  .nachr.show-list .conv { display:none; }
  .nachr.show-conv .ph1, .nachr.show-conv .thr-card { display:none; }
  .conv-back { display:inline-block; }
  .bub { max-width:92%; }
}

/* ---------- Einstellungen ---------- */
/* Schalter: verstecktes Kästchen (per Tastatur bedienbar) mit dem Aussehen von .tog aus dem Entwurf */
.sw { position:relative; display:inline-flex; align-items:center; flex:none; padding:6px 4px; cursor:pointer; }
.sw input { position:absolute; inset:0; width:100%; height:100%; margin:0; opacity:0; cursor:pointer; }
.sw input:checked + .tog { background:var(--ok); }
.sw input:checked + .tog::after { left:17px; }
.sw input:focus-visible + .tog { outline:2px solid var(--vio); outline-offset:2px; }
.sw input:disabled + .tog { opacity:.5; }
.set > div:first-child { min-width:0; }
.set small { color:var(--mut); }
.set select { min-width:150px; }
.set input[type=number] { width:100px; }
.set .btns { margin:0; justify-content:flex-end; }
.inv td { white-space:nowrap; }
.inv td.num { font-variant-numeric:tabular-nums; }
.inv td.tact .b1 { margin-right:4px; }
.inv code, .dlg-body code { font:600 14px/1.4 ui-monospace, Consolas, monospace; letter-spacing:.04em; background:#f7f7fb; border:1px solid var(--line); border-radius:6px; padding:2px 8px; }
.ctl .fl input[type=number] { width:130px; }
.rrow { display:grid; grid-template-columns:28px minmax(0, 1fr) auto; gap:8px 10px; align-items:start; padding:10px 0; border-bottom:1px solid var(--line); }
.rno { color:var(--mut); padding-top:7px; text-align:center; }
.rfields { display:grid; gap:6px; min-width:0; }
.rfields input, .rfields textarea { width:100%; }
.rcount { align-self:center; }
@media (max-width:560px) {
  /* Feld- und Sicherungszeilen: Steuerelemente unter dem Text, Schalter bleiben daneben */
  .set.f { grid-template-columns:minmax(0, 1fr); }
  .set.f select, .set.f input[type=number] { width:100%; }
  .set.f .btns { justify-content:flex-start; }
  .rrow { grid-template-columns:24px minmax(0, 1fr); }
  .rrow .b1 { grid-column:2; justify-self:start; }
}

/* ---------- Sicherheit & Protokoll ---------- */
.set .btns .st { align-self:center; }
.sess td, .logt td { white-space:nowrap; }
.sess tr.cur td { background:#f7f7fb; }
.sess td.tact .b1 { margin-right:4px; }
.logt td.wrap { white-space:normal; min-width:160px; overflow-wrap:anywhere; }
.logf { align-items:center; margin:0 0 12px; }
.logf input[type=search] { width:200px; }
@media (max-width:560px) {
  /* Protokoll-Filter untereinander in voller Breite */
  .logf input[type=search], .logf select { width:100%; }
}
