/* cyan Innovation Lab – Design angelehnt an das cyan Guard 360 Portal.
   Drei Themes über data-theme auf <html>: dark (Standard), light und glass. */

:root, [data-theme="dark"] {
  --bg: #071D2A;
  --sidebar: #071D2A;
  --surface: #0B2433;
  --surface-2: #22343F;
  --head: #22343F;
  --line: #2A404C;
  --text: #FFFFFF;
  --muted: #A7B6BE;
  --accent: #4FC3F7; --accent-text: #04212c;
  --accent-strong: #00FFFF;
  --nav-active: #22343F;
  --btn-bg: #22343F;
  --btn-text: #FFFFFF;
  --btn-border: #3A505C;
  --btn-hover: #2C434F;
  --input-bg: #0B2433;
  --ok: #5BD08E;  --ok-bg: rgba(91, 208, 142, .14);
  --warn: #F2B35B; --warn-bg: rgba(242, 179, 91, .14);
  --new: #A7B6BE;  --new-bg: rgba(167, 182, 190, .14);
  --danger: #FF7B72; --danger-bg: rgba(255, 123, 114, .12);
  --shadow: none;
  color-scheme: dark;
}

[data-theme="light"] {
  --bg: #F3F6F7;
  --sidebar: #FFFFFF;
  --surface: #FFFFFF;
  --surface-2: #EEF3F5;
  --head: #EEF3F5;
  --line: #DCE4E7;
  --text: #192A34;
  --muted: #5B6B73;
  --accent: #0C435A; --accent-text: #ffffff;
  --accent-strong: #00B8D4;
  --nav-active: #E3EDF1;
  --btn-bg: #0C435A;
  --btn-text: #FFFFFF;
  --btn-border: #0C435A;
  --btn-hover: #082F40;
  --input-bg: #FFFFFF;
  --ok: #1E7A47;  --ok-bg: #E3F4EA;
  --warn: #8A5300; --warn-bg: #FFF2DC;
  --new: #4B5B63;  --new-bg: #ECEFF1;
  --danger: #B3261E; --danger-bg: #FDECEA;
  --shadow: 0 1px 2px rgba(25, 42, 52, .06);
  color-scheme: light;
}

* { box-sizing: border-box; }
html, body { margin: 0; background: var(--bg); color: var(--text); }
body { font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif; line-height: 1.5; font-size: 15px; }
a { color: var(--accent); }
h1 { font-size: 1.45rem; margin: 0; font-weight: 700; letter-spacing: -.01em; }
h2 { font-size: 1.02rem; margin: 0; font-weight: 600; }
h3 { font-size: 1rem; margin: 0 0 .35rem; }
.muted { color: var(--muted); }
.small { font-size: .84rem; }
.center { text-align: center; }
.right { text-align: right; }
.mono, code { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: .86rem; word-break: break-all; }
.ico { width: 22px; height: 22px; flex: none; }

/* ---------- App-Layout mit Seitenleiste ---------- */
.app { display: grid; grid-template-columns: 264px 1fr; min-height: 100vh; }
.sidebar { background: var(--sidebar); border-right: 1px solid var(--line); display: flex; flex-direction: column; padding: 1.25rem .9rem; position: sticky; top: 0; height: 100vh; overflow-y: auto; }
.brand { display: flex; align-items: center; gap: .7rem; text-decoration: none; color: var(--text); padding: 0 .4rem 1.1rem; }
.brand .logo { display: block; width: 118px; color: var(--text); }
.brand .logo svg { display: block; width: 100%; height: auto; }
.brand .lab { font-size: .74rem; font-weight: 600; color: var(--accent); border-left: 1px solid var(--line); padding-left: .7rem; line-height: 1.1; }
.nav { display: flex; flex-direction: column; gap: .15rem; }
.nav-section { color: var(--muted); font-size: .8rem; padding: .9rem .75rem .3rem; }
.nav-item { display: flex; align-items: center; gap: .85rem; padding: .62rem .75rem; border-radius: 10px; color: var(--text); text-decoration: none; font-size: .97rem; opacity: .9; }
.nav-item .ico { color: var(--muted); }
.nav-item:hover { background: var(--nav-active); opacity: 1; }
.nav-item.active { background: var(--nav-active); opacity: 1; font-weight: 500; }
.nav-item.active .ico { color: var(--accent); }
.nav-item.as-button { width: 100%; background: none; border: 0; font: inherit; cursor: pointer; text-align: left; }
.nav-bottom { margin-top: auto; padding-top: 1rem; display: flex; flex-direction: column; gap: .15rem; }
.whoami { display: flex; flex-direction: column; gap: .2rem; padding: .75rem; margin-bottom: .4rem; border: 1px solid var(--line); border-radius: 10px; font-size: .8rem; }
.whoami .who { word-break: break-all; }
.whoami .org { color: var(--muted); }
.content { padding: 1.6rem 2.4rem 3rem; min-width: 0; }
.lab-note { font-size: .76rem; color: var(--muted); margin-bottom: 1.2rem; }

/* ---------- Seitenkopf, Panels, Tabellen ---------- */
.page-head { display: flex; justify-content: space-between; align-items: center; gap: 1rem; flex-wrap: wrap; margin-bottom: 1.4rem; }
.page-head .sub { margin: .2rem 0 0; color: var(--muted); }
.back { display: inline-flex; align-items: center; gap: .35rem; color: var(--muted); text-decoration: none; font-size: .88rem; margin-bottom: .8rem; }
.back .ico { width: 18px; height: 18px; }
.back:hover { color: var(--text); }
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 1.25rem 1.35rem; margin-bottom: 1.2rem; box-shadow: var(--shadow); }
.panel.flush { padding: 0; overflow: hidden; }
.panel.narrow { max-width: 560px; }
.panel-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 1rem; }
.panel-head.pad { padding: 1.1rem 1.35rem .2rem; margin: 0; }
.panel-head .link, a.link { font-size: .86rem; text-decoration: none; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 1.2rem; align-items: start; }
.grid-2 > .panel { margin-bottom: 0; }
.grid-2 + .panel, .grid-2 + section { margin-top: 1.2rem; }
@media (max-width: 1100px) { .grid-2 { grid-template-columns: 1fr; } }

.table { width: 100%; border-collapse: collapse; font-size: .93rem; }
.table th { background: var(--head); color: var(--muted); font-weight: 500; text-align: left; padding: .9rem 1.35rem; font-size: .88rem; }
.table td { padding: .85rem 1.35rem; border-top: 1px solid var(--line); vertical-align: middle; }
.panel:not(.flush) .table td { padding: .7rem .3rem; }
.panel:not(.flush) .table tr:first-child td { border-top: 0; }
.table tr.click { cursor: pointer; }
.table tr.click:hover td { background: var(--surface-2); }
.table .ico { width: 20px; height: 20px; color: var(--muted); }
.cell-dev { display: flex; align-items: center; gap: .9rem; }
.cell-dev .ico { width: 26px; height: 26px; color: var(--text); }
.cell-dev div { display: flex; flex-direction: column; line-height: 1.3; }
.empty-note { color: var(--muted); padding: 1.2rem 1.35rem; }

/* ---------- KPIs, Balken, Badges ---------- */
.kpi-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1rem; margin-bottom: 1.2rem; }
.kpi-grid.three { grid-template-columns: repeat(3, 1fr); }
@media (max-width: 900px) { .kpi-grid, .kpi-grid.three { grid-template-columns: repeat(2, 1fr); } }
.kpi { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 1rem 1.2rem; display: flex; flex-direction: column; gap: .25rem; box-shadow: var(--shadow); }
.kpi-label { color: var(--muted); font-size: .84rem; }
.kpi strong { font-size: 1.7rem; font-weight: 700; line-height: 1.2; }
.kpi strong.smaller { font-size: 1.05rem; }
.kpi.accent { border-color: var(--accent); }
.bars { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: .7rem; }
.bars li { display: grid; grid-template-columns: 150px 1fr 36px; align-items: center; gap: .75rem; font-size: .9rem; }
.bar { height: 8px; background: var(--surface-2); border-radius: 99px; overflow: hidden; }
.bar span { display: block; height: 100%; background: var(--accent); border-radius: 99px; }
.bar-n { text-align: right; color: var(--muted); }

.pill { display: inline-block; border-radius: 999px; padding: .18rem .7rem; font-size: .8rem; font-weight: 600; white-space: nowrap; }
.pill.big { font-size: .92rem; padding: .35rem 1rem; }
.pill.ok { background: var(--ok-bg); color: var(--ok); }
.pill.stale { background: var(--warn-bg); color: var(--warn); }
.pill.new { background: var(--new-bg); color: var(--new); }
.pill.mod-on { background: var(--ok-bg); color: var(--ok); }
.pill.mod-beta { background: var(--warn-bg); color: var(--warn); }
.pill.mod-off { background: var(--new-bg); color: var(--new); }
.tag { display: inline-block; border: 1px solid var(--line); border-radius: 6px; padding: .05rem .5rem; font-size: .8rem; color: var(--muted); }
.role-badge { display: inline-block; border-radius: 6px; padding: .12rem .55rem; font-size: .76rem; font-weight: 600; width: fit-content; border: 1px solid currentColor; }
.role-badge.big { font-size: .9rem; padding: .3rem .8rem; }
.role-superadmin { color: #FF8A80; }
.role-cyan_admin { color: var(--accent); }
.role-support { color: #B39DDB; }
.role-isp_admin { color: #F2B35B; }
.role-msp_admin { color: #81C784; }
.role-user { color: var(--muted); }
[data-theme="light"] .role-superadmin { color: #B3261E; }
[data-theme="light"] .role-support { color: #5E35B1; }
[data-theme="light"] .role-isp_admin { color: #8A5300; }
[data-theme="light"] .role-msp_admin { color: #2E7D32; }

/* ---------- Buttons & Formulare ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: .4rem; background: var(--btn-bg); color: var(--btn-text); border: 1px solid var(--btn-border); border-radius: 8px; padding: .65rem 1.2rem; font-size: .95rem; font-weight: 700; text-decoration: none; cursor: pointer; }
.btn:hover { background: var(--btn-hover); }
.btn.ghost { background: transparent; color: var(--text); border-color: var(--line); font-weight: 600; }
.btn.small { padding: .38rem .8rem; font-size: .85rem; }
.btn.full { width: 100%; margin-top: .4rem; }
.btn.danger { background: var(--danger); border-color: var(--danger); color: #fff; }
.icon-btn { display: inline-flex; padding: .35rem; border-radius: 8px; color: var(--text); }
.icon-btn:hover { background: var(--surface-2); }

label { display: block; margin-bottom: .95rem; font-weight: 500; font-size: .92rem; }
input[type=text], input[type=email], input[type=password], input[type=number], input[type=search], input[type=url], select {
  display: block; width: 100%; margin-top: .35rem; padding: .62rem .8rem; background: var(--input-bg); color: var(--text);
  border: 1px solid var(--line); border-radius: 8px; font-size: .95rem; font-family: inherit; }
input:focus, select:focus { outline: 2px solid var(--accent); outline-offset: 1px; border-color: var(--accent); }
input[type=checkbox], input[type=radio] { accent-color: var(--accent); }
.check, .option { display: flex; gap: .6rem; align-items: flex-start; font-weight: 400; }
.check input, .option input { margin-top: .3rem; }
.consent { background: var(--surface-2); border-radius: 8px; padding: .75rem; font-size: .86rem; margin-bottom: .5rem; }
fieldset.choice { border: 0; padding: 0; margin: 0 0 1rem; }
fieldset.choice legend { font-weight: 500; margin-bottom: .45rem; font-size: .92rem; }
.option { border: 1px solid var(--line); border-radius: 10px; padding: .65rem .8rem; margin-bottom: .5rem; cursor: pointer; }
.option:has(input:checked) { border-color: var(--accent); }
.row-form { display: flex; gap: .8rem; align-items: flex-end; flex-wrap: wrap; }
.row-form label { margin: 0; flex: 1 1 170px; }
.row-form label.w-s { flex: 0 1 120px; }
.inline-form { display: flex; gap: .8rem; flex-wrap: wrap; }
.inline-form input { width: 240px; margin: 0; }
.search { display: flex; align-items: center; gap: .5rem; border: 1px solid var(--line); border-radius: 8px; padding: 0 .8rem; background: var(--input-bg); }
.search .ico { color: var(--muted); }
.search input { border: 0; margin: 0; padding: .6rem 0; width: 240px; background: transparent; }
.search input:focus { outline: none; }
.field-group { display: flex; flex-direction: column; gap: .4rem; margin: 1rem 0; }
.field-label { font-size: .85rem; color: var(--muted); font-weight: 500; }
.radio-inline { display: flex; align-items: center; gap: .5rem; margin: 0; font-weight: 400; }

/* Schalter */
.switch-row { display: flex; justify-content: space-between; align-items: center; padding: .55rem 0; border-bottom: 1px solid var(--line); margin: 0; font-weight: 400; cursor: pointer; }
.switch-row:last-of-type { margin-bottom: 1rem; }
.switch-row.disabled { cursor: default; opacity: .75; }
.switch { position: relative; width: 40px; height: 22px; flex: none; }
.switch input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: inherit; }
.switch i { position: absolute; inset: 0; background: var(--surface-2); border: 1px solid var(--line); border-radius: 99px; transition: background .15s; }
.switch i::after { content: ""; position: absolute; top: 2px; left: 2px; width: 16px; height: 16px; background: var(--muted); border-radius: 50%; transition: transform .15s, background .15s; }
.switch input:checked + i { background: var(--accent); border-color: var(--accent); }
.switch input:checked + i::after { transform: translateX(18px); background: #fff; }

/* Segment-Auswahl (Modulstatus) */
.seg { display: inline-flex; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; margin-top: .6rem; }
.seg-opt { margin: 0; }
.seg-opt input { display: none; }
.seg-opt span { display: block; padding: .4rem .9rem; font-size: .85rem; cursor: pointer; color: var(--muted); }
.seg-opt input:checked + span { background: var(--accent); color: var(--bg); font-weight: 600; }
[data-theme="light"] .seg-opt input:checked + span { color: #fff; }

/* ---------- Hinweise ---------- */
.alert { border-radius: 10px; padding: .65rem 1rem; margin-bottom: 1rem; }
.alert p { margin: .15rem 0; }
.alert.error { background: var(--danger-bg); color: var(--danger); }
.alert.ok { background: var(--ok-bg); color: var(--ok); }
.alert.info { background: var(--surface-2); color: var(--text); }

/* ---------- Geräte-Einrichtung ---------- */
.setup { display: grid; grid-template-columns: 180px 1fr; gap: 1.2rem; align-items: start; }
@media (max-width: 700px) { .setup { grid-template-columns: 1fr; } }
.qr { background: #fff; border-radius: 10px; padding: 8px; width: 180px; }
.qr svg { width: 100%; height: auto; display: block; }
.steps-list { padding-left: 1.15rem; margin: 0 0 1rem; }
.steps-list li { margin-bottom: .45rem; }
.row-actions { display: flex; gap: .8rem; align-items: center; flex-wrap: wrap; margin: .6rem 0; }
.copy { display: flex; gap: .5rem; align-items: center; background: var(--surface-2); border-radius: 8px; padding: .6rem .8rem; margin: .5rem 0 1rem; }
.copy code { flex: 1; }
.tech summary { cursor: pointer; font-weight: 600; }
.tech dl, dl.kv { display: grid; grid-template-columns: max-content 1fr; gap: .45rem 1.2rem; margin: 1rem 0; }
.tech dt, dl.kv dt { color: var(--muted); }
.tech dd, dl.kv dd { margin: 0; }
.danger-zone { border-color: var(--danger-bg); }

/* ---------- Module ---------- */
.module-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 1rem; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 1.2rem; box-shadow: var(--shadow); }
.module { display: flex; flex-direction: column; gap: .4rem; }
.module .btn { align-self: flex-start; margin-top: .4rem; }
.module.locked { opacity: .6; }
.module-head { display: flex; justify-content: space-between; align-items: center; color: var(--accent); margin-bottom: .3rem; }
.module-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1.5rem; }
@media (max-width: 900px) { .module-row { grid-template-columns: 1fr; } }
.module-orgs { display: flex; flex-direction: column; gap: .3rem; }
.module-orgs .check { margin: 0; }
.legend { margin-bottom: 1rem; display: flex; gap: .4rem; align-items: center; flex-wrap: wrap; }
.sticky-save { position: sticky; bottom: 1rem; display: flex; justify-content: flex-end; }

/* ---------- Einstellungen: Theme ---------- */
.theme-picker, .lang-picker { display: flex; gap: 1rem; flex-wrap: wrap; }
.theme-opt { display: flex; flex-direction: column; gap: .5rem; align-items: center; border: 2px solid var(--line); border-radius: 12px; padding: .8rem; cursor: pointer; margin: 0; width: 126px; }
.theme-opt.selected { border-color: var(--accent); }
.theme-opt input { display: none; }
.theme-opt span:last-child { display: flex; align-items: center; gap: .4rem; }
.theme-opt .ico { width: 18px; height: 18px; }
.swatch { width: 100%; height: 64px; border-radius: 8px; border: 1px solid var(--line); }
.swatch.light { background: linear-gradient(90deg, #fff 28%, #F3F6F7 28%); }
.swatch.dark { background: linear-gradient(90deg, #071D2A 28%, #0B2433 28%); }

/* ---------- Öffentliche Seiten ---------- */
.auth { min-height: 100vh; display: flex; flex-direction: column; }
.auth-top { display: flex; justify-content: space-between; align-items: center; padding: 1.1rem 2rem; border-bottom: 1px solid var(--line); background: var(--sidebar); }
.auth-top .brand { padding: 0; }
.auth-actions { display: flex; gap: .6rem; align-items: center; }
.auth-main { flex: 1; width: 100%; max-width: 1040px; margin: 0 auto; padding: 2.5rem 1.5rem; }
.auth-card { max-width: 460px; margin: 0 auto; padding: 2rem; }
.auth-card.wide { max-width: 720px; }
.auth-card h1 { margin-bottom: .3rem; }
.auth-card form { margin-top: 1.4rem; }
.narrow-alert { max-width: 460px; margin: 0 auto 1rem; }
.auth-foot { text-align: center; color: var(--muted); font-size: .82rem; padding: 1.5rem; }
.auth-foot a { color: var(--muted); }
.hero { text-align: center; padding: 3rem 1rem 2.2rem; }
.eyebrow { color: var(--accent); font-weight: 600; font-size: .85rem; letter-spacing: .04em; text-transform: uppercase; }
.hero h1 { font-size: 2.3rem; max-width: 760px; margin: .6rem auto .9rem; line-height: 1.2; }
.lead { font-size: 1.08rem; color: var(--muted); max-width: 640px; margin: 0 auto 1.8rem; }
.actions { display: flex; gap: .8rem; justify-content: center; }
.steps { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 1rem; }
.step-no { display: inline-flex; width: 28px; height: 28px; border-radius: 50%; align-items: center; justify-content: center; background: var(--surface-2); color: var(--accent); font-weight: 700; margin-bottom: .6rem; }
.prose h3 { margin-top: 1.3rem; }

@media (max-width: 860px) {
  .app { grid-template-columns: 1fr; }
  .sidebar { position: static; height: auto; }
  .content { padding: 1.2rem; }
}

/* Reiter in den Einstellungen (Allgemein + Administration) */
.tabs { display: flex; flex-wrap: wrap; gap: .25rem; border-bottom: 1px solid var(--line); margin: -.4rem 0 1.3rem; }
.tab { padding: .6rem .95rem; color: var(--muted); text-decoration: none; font-size: .92rem; font-weight: 500; border-bottom: 2px solid transparent; margin-bottom: -1px; }
.tab:hover { color: var(--text); }
.tab.active { color: var(--accent); border-bottom-color: var(--accent); }

/* Sprache */
.panel-head.spaced { margin-top: 1.3rem; }
.lang-code { display: inline-grid; place-items: center; min-width: 2.2rem; height: 1.6rem; border-radius: 6px; background: var(--surface-2); font-weight: 600; font-size: .8rem; }
.lang-switch { display: inline-flex; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; margin-right: .3rem; }
.lang-switch a { padding: .3rem .55rem; font-size: .78rem; font-weight: 600; color: var(--muted); text-decoration: none; }
.lang-switch a.active { background: var(--surface-2); color: var(--accent); }

/* Ampel: grün / gelb / rot */
.pill.ampel { display: inline-flex; align-items: center; gap: .4rem; }
.pill.green { background: var(--ok-bg); color: var(--ok); }
.pill.yellow { background: var(--warn-bg); color: var(--warn); }
.pill.red { background: var(--danger-bg); color: var(--danger); }
.dot { display: inline-block; width: .6rem; height: .6rem; border-radius: 50%; background: currentColor; flex: none; }
.pill.green .dot { box-shadow: 0 0 0 3px var(--ok-bg), 0 0 8px var(--ok); }
.dot.green { background: var(--ok); } .dot.yellow { background: var(--warn); } .dot.red { background: var(--danger); }
.ampel-legend { display: inline-flex; align-items: center; gap: .4rem; margin-right: 1.2rem; }
.legend { margin-bottom: .9rem; line-height: 1.9; }
.net { font-weight: 500; white-space: nowrap; }
.table .mini { border-collapse: collapse; }
.table .mini td { border: 0; padding: .2rem 1rem .2rem 0; background: none; }
.mini .dev-name { max-width: 11rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mini .net { white-space: normal; }
.mini .pill { white-space: nowrap; }

/* =====================================================================
   Theme „Glas“ – angelehnt an Apples Liquid Glass, in den cyan-Farben.
   Glas für Rahmen, Navigation, Kacheln und Knöpfe; Tabellen und Text
   liegen auf fast deckendem Glas, damit alles gut lesbar bleibt.
   ===================================================================== */
[data-theme="glass"] {
  --bg: #071D2A;
  --sidebar: rgba(11, 36, 51, .42);
  --surface: rgba(16, 48, 66, .46);
  --surface-2: rgba(255, 255, 255, .08);
  --head: rgba(255, 255, 255, .06);
  --line: rgba(255, 255, 255, .12);
  --text: #FFFFFF;
  --muted: #B4C4CC;
  --accent: #4FC3F7; --accent-text: #04212c;
  --accent-strong: #00FFFF;
  --nav-active: rgba(255, 255, 255, .12);
  --btn-bg: rgba(79, 195, 247, .22);
  --btn-text: #FFFFFF;
  --btn-border: rgba(79, 195, 247, .55);
  --btn-hover: rgba(79, 195, 247, .34);
  --input-bg: rgba(7, 29, 42, .55);
  --ok: #6EE7A2;  --ok-bg: rgba(110, 231, 162, .16);
  --warn: #FFC46B; --warn-bg: rgba(255, 196, 107, .16);
  --new: #B4C4CC;  --new-bg: rgba(180, 196, 204, .14);
  --danger: #FF8A80; --danger-bg: rgba(255, 138, 128, .15);
  --glass-blur: blur(26px) saturate(170%);
  --glass-edge: inset 0 1px 0 rgba(255, 255, 255, .22), inset 0 0 0 1px rgba(255, 255, 255, .05);
  --shadow: 0 10px 40px rgba(0, 10, 18, .35), var(--glass-edge);
  color-scheme: dark;
}

/* Hintergrund: ruhige Lichtflächen in Petrol und Cyan, damit das Glas etwas zum Brechen hat */
[data-theme="glass"] body {
  background:
    radial-gradient(900px 600px at 8% -10%, rgba(79, 195, 247, .30), transparent 60%),
    radial-gradient(700px 520px at 95% 8%, rgba(0, 255, 255, .14), transparent 60%),
    radial-gradient(900px 700px at 70% 110%, rgba(12, 67, 90, .85), transparent 65%),
    linear-gradient(160deg, #0A2738 0%, #071D2A 55%, #051520 100%);
  background-attachment: fixed;
}

[data-theme="glass"] .panel,
[data-theme="glass"] .kpi,
[data-theme="glass"] .card,
[data-theme="glass"] .whoami,
[data-theme="glass"] .auth-top {
  background: var(--surface);
  -webkit-backdrop-filter: var(--glass-blur);
  backdrop-filter: var(--glass-blur);
  border: 1px solid rgba(255, 255, 255, .14);
  box-shadow: var(--shadow);
}
[data-theme="glass"] .panel, [data-theme="glass"] .card { border-radius: 22px; }
[data-theme="glass"] .kpi { border-radius: 20px; }
[data-theme="glass"] .kpi.accent { border-color: rgba(79, 195, 247, .6); box-shadow: var(--shadow), 0 0 0 1px rgba(79, 195, 247, .25), 0 0 28px rgba(79, 195, 247, .18); }

/* Seitenleiste als schwebende Glasfläche */
[data-theme="glass"] .sidebar {
  margin: .8rem 0 .8rem .8rem; height: calc(100vh - 1.6rem); top: .8rem;
  border: 1px solid rgba(255, 255, 255, .14); border-radius: 26px;
  -webkit-backdrop-filter: var(--glass-blur); backdrop-filter: var(--glass-blur);
  box-shadow: var(--shadow);
}
[data-theme="glass"] .nav-item { border-radius: 14px; }
[data-theme="glass"] .nav-item.active { box-shadow: var(--glass-edge); }
[data-theme="glass"] .whoami { border-radius: 18px; }

/* Lesbarkeit: Tabellen fast deckend */
[data-theme="glass"] .panel.flush { background: rgba(9, 32, 46, .72); }
[data-theme="glass"] .table th { background: rgba(255, 255, 255, .05); }
[data-theme="glass"] .table tr.click:hover td { background: rgba(255, 255, 255, .06); }

/* Knöpfe, Felder, Pillen */
[data-theme="glass"] .btn {
  border-radius: 999px; box-shadow: var(--glass-edge);
  -webkit-backdrop-filter: var(--glass-blur); backdrop-filter: var(--glass-blur);
  transition: background .15s, transform .15s;
}
[data-theme="glass"] .btn:active { transform: scale(.97); }
[data-theme="glass"] .btn.ghost { background: rgba(255, 255, 255, .06); border-color: rgba(255, 255, 255, .2); }
[data-theme="glass"] .btn.danger { background: rgba(255, 138, 128, .25); border-color: rgba(255, 138, 128, .6); }
[data-theme="glass"] input[type=text], [data-theme="glass"] input[type=email], [data-theme="glass"] input[type=password],
[data-theme="glass"] input[type=number], [data-theme="glass"] input[type=search], [data-theme="glass"] input[type=url], [data-theme="glass"] select {
  border-radius: 14px; border-color: rgba(255, 255, 255, .16); box-shadow: inset 0 1px 2px rgba(0, 0, 0, .25);
}
[data-theme="glass"] .search input { border-radius: 999px; }
[data-theme="glass"] .seg { border-radius: 999px; padding: 3px; background: rgba(255, 255, 255, .06); border-color: rgba(255, 255, 255, .14); }
[data-theme="glass"] .seg-opt span { border-radius: 999px; }
[data-theme="glass"] .seg-opt input:checked + span { background: rgba(79, 195, 247, .9); color: #06202D; box-shadow: var(--glass-edge); }
[data-theme="glass"] .tabs { border-bottom-color: rgba(255, 255, 255, .1); }
[data-theme="glass"] .tab.active { text-shadow: 0 0 18px rgba(79, 195, 247, .6); }
[data-theme="glass"] .alert { border-radius: 16px; -webkit-backdrop-filter: var(--glass-blur); backdrop-filter: var(--glass-blur); }
[data-theme="glass"] .theme-opt { border-radius: 18px; background: rgba(255, 255, 255, .04); }
[data-theme="glass"] .lang-switch { border-radius: 999px; background: rgba(255, 255, 255, .06); }

/* Vorschau-Kachel in den Einstellungen */
.swatch.glass {
  background:
    radial-gradient(60px 50px at 20% 20%, rgba(79, 195, 247, .7), transparent 70%),
    radial-gradient(70px 50px at 90% 90%, rgba(0, 255, 255, .35), transparent 70%),
    linear-gradient(160deg, #0C435A, #071D2A);
  position: relative; overflow: hidden;
}
.swatch.glass::after {
  content: ""; position: absolute; inset: 14px 22px; border-radius: 10px;
  background: rgba(255, 255, 255, .14); border: 1px solid rgba(255, 255, 255, .3);
  -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px);
}

/* Ohne Weichzeichner-Unterstützung: deckende Flächen statt Glas */
@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  [data-theme="glass"] { --surface: rgba(16, 48, 66, .94); --sidebar: rgba(11, 36, 51, .96); }
}
/* Weniger Transparenz gewünscht (Bedienungshilfen) */
@media (prefers-reduced-transparency: reduce) {
  [data-theme="glass"] { --surface: rgba(16, 48, 66, .96); --sidebar: rgba(11, 36, 51, .98); }
}

/* =====================================================================
   iPhone-Einrichtung nach QR-Scan (/p/<token>) – mobil, ein Schritt pro Ansicht
   ===================================================================== */
.setup-body { min-height: 100vh; }
.setup { max-width: 480px; margin: 0 auto; padding: max(1rem, env(safe-area-inset-top)) 1rem 2.5rem; }
.setup-head { display: flex; justify-content: space-between; align-items: center; padding: .4rem .2rem 1.2rem; }
.setup-head .logo { width: 104px; color: var(--text); }
.setup-head .logo svg { width: 100%; height: auto; display: block; }
.setup-dev { display: inline-flex; align-items: center; gap: .35rem; color: var(--muted); font-size: .88rem; }
.setup-dev .ico { width: 18px; height: 18px; }
.setup-card { background: var(--surface); border: 1px solid var(--line); border-radius: 26px; padding: 1.6rem 1.4rem; box-shadow: var(--shadow); text-align: center; margin-bottom: 1rem; }
[data-theme="glass"] .setup-card { -webkit-backdrop-filter: var(--glass-blur); backdrop-filter: var(--glass-blur); border-color: rgba(255,255,255,.14); }
.setup-card h1 { font-size: 1.45rem; margin: .3rem 0 .5rem; }
.setup-card .muted { margin: 0 0 1.2rem; }
.shield { width: 76px; height: 76px; margin: .2rem auto .8rem; border-radius: 24px; display: grid; place-items: center;
  background: radial-gradient(circle at 30% 25%, rgba(79,195,247,.55), rgba(12,67,90,.9)); box-shadow: 0 10px 30px rgba(79,195,247,.25), inset 0 1px 0 rgba(255,255,255,.35); color: #fff; }
.shield .ico { width: 40px; height: 40px; }
.btn.big { font-size: 1.1rem; padding: 1rem 1.4rem; border-radius: 999px; }
.setup .btn.big { background: var(--accent); border-color: var(--accent); color: #06202D; }
[data-theme="light"] .setup .btn.big { color: #fff; }
.hint { font-size: .84rem; color: var(--muted); margin: .9rem 0 0; }
.big-steps { list-style: none; padding: 0; margin: 0 0 1.2rem; text-align: left; display: grid; gap: .9rem; }
.big-steps li { display: grid; grid-template-columns: 2.2rem 1fr; gap: .8rem; align-items: start; }
.big-steps .n { width: 2.2rem; height: 2.2rem; border-radius: 50%; display: grid; place-items: center; font-weight: 700; background: var(--surface-2); color: var(--accent); }
.big-steps strong { display: block; font-size: 1rem; }
.big-steps span:not(.n) { display: block; color: var(--muted); font-size: .9rem; }
.big-steps .note { margin-top: .35rem; color: var(--warn) !important; font-size: .82rem !important; }
.mock-settings { margin-top: .55rem; border-radius: 14px; overflow: hidden; background: rgba(0,0,0,.25); border: 1px solid var(--line); font-size: .88rem; }
[data-theme="light"] .mock-settings { background: #F2F2F7; }
.mock-row { display: flex; align-items: center; gap: .6rem; padding: .55rem .8rem; border-top: 1px solid var(--line); }
.mock-row:first-child { border-top: 0; }
.mock-row small { display: block; color: var(--muted); font-size: .72rem; }
.mock-avatar { width: 30px; height: 30px; border-radius: 50%; background: linear-gradient(135deg, #8aa, #577); flex: none; }
.mock-row.hl { justify-content: space-between; font-weight: 600; color: var(--accent); background: rgba(79,195,247,.12); animation: pulse 1.6s ease-in-out infinite; }
@keyframes pulse { 0%,100% { box-shadow: inset 0 0 0 0 rgba(79,195,247,0); } 50% { box-shadow: inset 0 0 0 2px rgba(79,195,247,.7); } }
.waiting { display: flex; align-items: center; gap: .7rem; justify-content: center; text-align: left; font-size: .9rem; padding: .8rem 1rem; border-radius: 16px; background: var(--surface-2); }
.spinner { width: 18px; height: 18px; border-radius: 50%; border: 2px solid var(--line); border-top-color: var(--accent); animation: spin .9s linear infinite; flex: none; }
@keyframes spin { to { transform: rotate(360deg); } }
.done-check { width: 84px; height: 84px; margin: .4rem auto .8rem; border-radius: 50%; display: grid; place-items: center; font-size: 2.6rem; font-weight: 700;
  color: #06202D; background: var(--ok); box-shadow: 0 0 0 10px var(--ok-bg), 0 12px 40px rgba(110,231,162,.35); animation: pop .45s ease-out; }
@keyframes pop { from { transform: scale(.5); opacity: 0; } to { transform: scale(1); opacity: 1; } }
.setup .step-install, .setup .step-done { display: none; }
.setup[data-state="install"] .step-start, .setup[data-state="done"] .step-start, .setup[data-state="done"] .step-install { display: none; }
.setup[data-state="install"] .step-install, .setup[data-state="done"] .step-done { display: block; }
@media (prefers-reduced-motion: reduce) { .mock-row.hl, .spinner, .done-check { animation: none; } }

/* Gerät registrieren: Schritt für Schritt (ohne JavaScript bleibt alles auf einer Seite sichtbar) */
.wizard-steps { list-style: none; display: flex; gap: .4rem; padding: 0; margin: 0 0 1.4rem; }
.wizard-steps li { flex: 1; display: flex; align-items: center; gap: .5rem; font-size: .86rem; color: var(--muted); padding-bottom: .6rem; border-bottom: 3px solid var(--line); }
.wizard-steps li span { width: 1.6rem; height: 1.6rem; border-radius: 50%; display: grid; place-items: center; font-weight: 700; font-size: .8rem; background: var(--surface-2); }
.wizard[data-step="1"] .wizard-steps li[data-n="1"], .wizard[data-step="2"] .wizard-steps li[data-n="2"], .wizard[data-step="3"] .wizard-steps li[data-n="3"] { color: var(--text); font-weight: 600; border-bottom-color: var(--accent); }
.wizard[data-step="1"] .wizard-steps li[data-n="1"] span, .wizard[data-step="2"] .wizard-steps li[data-n="2"] span, .wizard[data-step="3"] .wizard-steps li[data-n="3"] span { background: var(--accent); color: var(--bg); }
.wizard[data-step="2"] .wizard-steps li[data-n="1"], .wizard[data-step="3"] .wizard-steps li[data-n="1"], .wizard[data-step="3"] .wizard-steps li[data-n="2"] { border-bottom-color: var(--accent); }
.wizard-actions { display: flex; justify-content: space-between; gap: .8rem; margin-top: 1.4rem; }
.wizard-actions .btn { min-width: 9rem; }
.field-error { color: var(--danger); font-size: .88rem; margin: .4rem 0 0; }
.wizard.js .wizard-page { display: none; }
.wizard.js[data-step="1"] .wizard-page[data-page="1"], .wizard.js[data-step="2"] .wizard-page[data-page="2"], .wizard.js[data-step="3"] .wizard-page[data-page="3"] { display: block; animation: wiz-in .2s ease-out; }
@keyframes wiz-in { from { opacity: 0; transform: translateX(12px); } to { opacity: 1; transform: none; } }
.wizard:not(.js) [data-next], .wizard:not(.js) [data-prev], .wizard:not(.js) .only-android { display: none; }
.wizard[data-platform="android"] .only-ios, .wizard[data-platform="ios"] .only-android { display: none; }
@media (prefers-reduced-motion: reduce) { .wizard-page { animation: none !important; } }

/* Löschen */
form.inline { display: inline; margin: 0; }
.icon-btn.danger { color: var(--muted); background: none; border: 0; cursor: pointer; }
.icon-btn.danger:hover { color: var(--danger); background: var(--danger-bg); }
.icon-btn .ico { width: 20px; height: 20px; }
.nowrap { white-space: nowrap; }
.btn .ico { width: 18px; height: 18px; }

/* Letzter Schritt nach dem Anlegen: QR groß, Erfolg live */
.wizard-steps.done-all li { color: var(--text); border-bottom-color: var(--accent); }
.wizard-steps.done-all li span { background: var(--ok-bg); color: var(--ok); }
.wizard-steps.done-all li.current { font-weight: 600; }
.wizard-steps.done-all li.current span { background: var(--accent); color: var(--bg); }
.setup-step h2.center { font-size: 1.2rem; margin-bottom: .3rem; }
.qr-big { width: 260px; max-width: 100%; margin: 1rem auto .6rem; padding: 14px; background: #fff; border-radius: 22px; box-shadow: 0 12px 40px rgba(0,0,0,.25); }
.qr-big.small-qr { width: 170px; padding: 10px; border-radius: 16px; }
.qr-big svg { display: block; width: 100%; height: auto; }
.setup-step .waiting { margin-top: 1rem; }
.setup-step .setup-success { display: none; padding: .5rem 0 .4rem; }
.setup-step[data-state="done"] .setup-waiting { display: none; }
.setup-step[data-state="done"] .setup-success { display: block; }
.setup-step .copy { justify-content: center; }
.setup-step[data-state="done"] .later { visibility: hidden; }

/* =====================================================================
   Eigene Rückfrage-/Hinweisfenster (statt Browser-confirm/alert) – überall gleich
   ===================================================================== */
.cy-dialog { border: 0; padding: 0; background: transparent; color: var(--text); max-width: min(440px, calc(100vw - 2rem)); width: 100%; }
.cy-dialog::backdrop { background: rgba(3, 14, 21, .55); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); }
.cy-dialog[open] { animation: cy-pop .18s ease-out; }
@keyframes cy-pop { from { opacity: 0; transform: translateY(8px) scale(.97); } to { opacity: 1; transform: none; } }
.cy-dialog-box { margin: 0; padding: 1.6rem 1.5rem 1.3rem; text-align: center; border-radius: 26px;
  background: var(--surface); border: 1px solid var(--line); box-shadow: 0 24px 70px rgba(0, 0, 0, .45); }
[data-theme="dark"] .cy-dialog-box { background: #0E2A3A; }
[data-theme="light"] .cy-dialog-box { background: #fff; }
[data-theme="glass"] .cy-dialog-box { background: rgba(16, 48, 66, .72); -webkit-backdrop-filter: var(--glass-blur); backdrop-filter: var(--glass-blur);
  border-color: rgba(255, 255, 255, .16); box-shadow: 0 24px 70px rgba(0, 0, 0, .5), var(--glass-edge); }
.cy-dialog h2 { font-size: 1.15rem; margin: .2rem 0 .45rem; }
.cy-dialog p { color: var(--muted); margin: 0 0 1.3rem; overflow-wrap: anywhere; }
.cy-dialog-icon { width: 56px; height: 56px; margin: 0 auto .6rem; border-radius: 18px; display: none; place-items: center; }
.cy-dialog-icon .ico { width: 28px; height: 28px; }
.cy-dialog.tone-danger .cy-dialog-icon.danger { display: grid; background: var(--danger-bg); color: var(--danger); }
.cy-dialog.tone-info .cy-dialog-icon.info { display: grid; background: var(--surface-2); color: var(--accent); }
.cy-dialog-actions { display: grid; grid-template-columns: 1fr 1fr; gap: .7rem; }
.cy-dialog.is-alert .cy-dialog-actions { grid-template-columns: 1fr; }
.cy-dialog.is-alert #cy-dialog-cancel { display: none; }
.cy-dialog-actions .btn { width: 100%; border-radius: 999px; padding: .75rem 1rem; }
@media (prefers-reduced-motion: reduce) { .cy-dialog[open] { animation: none; } }
/* Knöpfe im Fenster: Abbrechen neutral, Löschen klar rot – in allen Darstellungen */
.cy-dialog #cy-dialog-cancel { background: transparent; color: var(--text); border: 1px solid var(--line); box-shadow: none; }
[data-theme="glass"] .cy-dialog #cy-dialog-cancel { background: rgba(255, 255, 255, .07); border-color: rgba(255, 255, 255, .2); }
.cy-dialog #cy-dialog-cancel:hover { background: var(--surface-2); }
.cy-dialog #cy-dialog-ok.danger { background: #E5484D; border-color: #E5484D; color: #fff; box-shadow: 0 6px 20px rgba(229, 72, 77, .35); }
.cy-dialog #cy-dialog-ok.danger:hover { background: #D13438; }
.cy-dialog #cy-dialog-ok:not(.danger) { background: var(--accent); border-color: var(--accent); color: #06202D; }
[data-theme="light"] .cy-dialog #cy-dialog-ok:not(.danger) { color: #fff; }
.cy-dialog.tone-danger .cy-dialog-icon.danger { background: rgba(229, 72, 77, .16); color: #FF6B6F; }

/* Kopfzeile im Inhalt: Navigationspfad links, Hinweis „Testumgebung“ rechts */
.topbar { display: flex; align-items: center; justify-content: space-between; gap: 1rem; min-height: 2.6rem; margin-bottom: 1rem; }
.topbar .lab-note { margin: 0; flex: none; font-size: .74rem; padding: .2rem .65rem; border-radius: 999px; border: 1px solid var(--line); color: var(--muted); }
.crumbs { display: flex; align-items: center; gap: .7rem; min-width: 0; }
.crumb-back { flex: none; width: 2.4rem; height: 2.4rem; border-radius: 50%; display: grid; place-items: center; color: var(--text);
  background: var(--surface-2); border: 1px solid var(--line); transition: background .15s, transform .15s; }
.crumb-back:hover { background: var(--nav-active); transform: translateX(-2px); }
.crumb-back .ico { width: 20px; height: 20px; }
[data-theme="glass"] .crumb-back { background: rgba(255, 255, 255, .08); border-color: rgba(255, 255, 255, .18); box-shadow: var(--glass-edge);
  -webkit-backdrop-filter: var(--glass-blur); backdrop-filter: var(--glass-blur); }
.crumbs ol { list-style: none; display: flex; align-items: center; flex-wrap: wrap; gap: .1rem; padding: 0; margin: 0; font-size: .9rem; min-width: 0; }
.crumbs li { display: flex; align-items: center; min-width: 0; }
.crumbs li + li::before { content: "›"; color: var(--muted); margin: 0 .45rem; opacity: .7; }
.crumbs ol a { color: var(--muted); text-decoration: none; padding: .2rem .45rem; border-radius: 8px; }
.crumbs ol a:hover { color: var(--text); background: var(--surface-2); }
.crumbs [aria-current] { color: var(--text); font-weight: 600; padding: .2rem .45rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 22rem; }
.net .cc { font-weight: 400; color: var(--muted); }

/* Benutzer anlegen, Einladung, Threat Intel */
.head-actions { display: flex; gap: .7rem; align-items: center; flex-wrap: wrap; }
.row-form .w-m { flex: 1 1 260px; }
.row-form .w-l { flex: 2 1 280px; }
.row-form label .muted { display: block; margin-top: .3rem; font-weight: 400; }
.invite-box { border-color: rgba(79, 195, 247, .45); }
.invite-box .copy code { font-size: .8rem; }
.ti-filter-form { display: flex; flex-wrap: wrap; gap: .7rem; align-items: center; }
.ti-filter-form .seg { margin-top: 0; }
.ti-filter-form select { width: auto; min-width: 11rem; }
.ti-filter-form .search { flex: 1 1 200px; }
.ti-export { display: flex; gap: .5rem; margin-left: auto; }
.ti-hint { margin: .7rem 0 0; }
.pad { padding: .8rem 1.35rem; }
.ti-table .mono { word-break: normal; overflow-wrap: anywhere; min-width: 12rem; }

/* SOC & API, TI-Feeds */
.grid-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1.2rem; margin-bottom: 1.2rem; }
.grid-3 > .panel { margin-bottom: 0; }
@media (max-width: 1100px) { .grid-3 { grid-template-columns: 1fr; } }
.way { position: relative; }
.way h2 { margin-bottom: .3rem; }
.way-no { position: absolute; top: 1.1rem; right: 1.2rem; width: 1.8rem; height: 1.8rem; border-radius: 50%; display: grid; place-items: center;
  font-weight: 700; font-size: .85rem; background: var(--surface-2); color: var(--accent); }
.endpoint { display: block; padding: .55rem .75rem; border-radius: 10px; background: var(--surface-2); margin: .6rem 0; font-size: .8rem; }
.stack-form label { margin-bottom: .6rem; }
.stack-form .btn { width: 100%; margin-top: .3rem; }
.secret-box { border-color: rgba(110, 231, 162, .55); }
.preview { margin-top: 1rem; padding: .9rem 1rem; border-radius: 14px; background: var(--surface-2); }
.preview p { margin: .25rem 0; }
tr.dim td { opacity: .55; }
.org-pick select { min-width: 14rem; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.prose pre { background: var(--surface-2); border-radius: 12px; padding: .8rem 1rem; overflow-x: auto; font-size: .82rem; }
.prose pre code { word-break: normal; white-space: pre; }
.prose h2 { margin-bottom: .6rem; }

.feed-src { word-break: normal; overflow-wrap: anywhere; min-width: 14rem; max-width: 22rem; }
.kpi-grid.auto { grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); }
.feed-src .mono { word-break: normal; overflow-wrap: anywhere; }

/* TI-Anbieter */
.provider-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); gap: 1rem; margin: 1rem 0; }
.provider-card { border: 1px solid var(--line); border-radius: 18px; padding: 1rem 1.1rem; background: var(--surface-2); }
.provider-top { display: flex; justify-content: space-between; gap: .6rem; align-items: center; margin-bottom: .5rem; }
.provider-card .kv { display: grid; grid-template-columns: 7.5rem 1fr; gap: .25rem .6rem; margin: .4rem 0 .7rem; }
.provider-card .kv dt { color: var(--muted); }
.provider-card .kv dd { margin: 0; overflow-wrap: anywhere; }
.provider-actions { display: flex; flex-wrap: wrap; gap: .4rem; align-items: center; }
.provider-edit { margin-top: .7rem; }
.provider-edit summary { cursor: pointer; color: var(--muted); font-size: .88rem; }
.provider-edit .row-form { margin-top: .7rem; }
.provider-new { border-top: 1px solid var(--line); padding-top: 1rem; }
.pv-custom { display: contents; }
.pv-custom[hidden] { display: none; }
.pv-hint { flex-basis: 100%; margin: 0; }
.tag.lic-lab { color: var(--warn); border-color: var(--warn); }
.tag.lic-com { color: var(--ok); border-color: var(--ok); }
.verdict { display: inline-block; font-size: .78rem; font-weight: 600; padding: .1rem .5rem; border-radius: 999px; }
.verdict.bad { background: var(--danger-bg); color: var(--danger); }
.verdict.warn { background: var(--warn-bg); color: var(--warn); }
.verdict.ok { background: var(--ok-bg); color: var(--ok); }

/* White-Label, Warnungen, Meldungen, Markenschutz */
.brand-img { display: block; max-width: 100%; max-height: 44px; object-fit: contain; }
.setup-head .brand-img { max-height: 40px; }
.alert-banner { display: flex; gap: .8rem; align-items: flex-start; padding: .8rem 1rem; border-radius: 16px; margin-bottom: 1rem;
  background: var(--danger-bg); color: var(--danger); border: 1px solid rgba(255,123,114,.35); }
.alert-banner p { margin: .1rem 0; color: var(--text); }
.alert-banner .ico { color: var(--danger); flex: none; }
.alert-banner a { font-weight: 600; margin-left: .3rem; }
.alerts-panel h2 .ico { width: 20px; height: 20px; vertical-align: -4px; color: var(--danger); }
.alert-item { display: flex; justify-content: space-between; gap: 1rem; padding: .8rem 0; border-top: 1px solid var(--line); }
.alert-item:first-of-type { border-top: 0; }
.alert-item.high strong { color: var(--danger); }
.alert-item.medium strong { color: var(--warn); }
.alert-item p { margin: .25rem 0; }
.link-btn { display: inline-flex; align-items: center; gap: .3rem; border: 0; background: none; color: var(--muted); font: inherit;
  font-size: .82rem; cursor: pointer; padding: .2rem .4rem; border-radius: 8px; white-space: nowrap; }
.link-btn:hover { color: var(--accent); background: var(--surface-2); }
.link-btn .ico { width: 16px; height: 16px; }
.allowed-chip { display: inline-flex; align-items: center; gap: .2rem; margin: .2rem .3rem .2rem 0; padding: .1rem .2rem .1rem .5rem;
  border-radius: 999px; background: var(--ok-bg); }
.x-btn { border: 0; background: none; color: var(--muted); cursor: pointer; font-size: 1rem; line-height: 1; padding: 0 .3rem; }
.x-btn:hover { color: var(--danger); }
.my-data .row-actions { display: flex; gap: .6rem; flex-wrap: wrap; }
.color-row { display: flex; gap: .6rem; align-items: center; margin-top: .35rem; }
.color-row input[type=color] { width: 3rem; height: 2.6rem; border: 1px solid var(--line); border-radius: 10px; background: none; padding: 2px; }
.color-row input[type=text] { margin-top: 0; }
.brand-preview { display: grid; grid-template-columns: 130px 1fr; border: 1px solid var(--line); border-radius: 16px; overflow: hidden; min-height: 170px; }
.pv-side { background: var(--surface-2); padding: .8rem; }
.pv-side .logo { display: block; width: 100px; color: var(--text); margin-bottom: .8rem; }
.pv-side .logo svg { width: 100%; height: auto; }
.pv-nav span { display: block; font-size: .78rem; padding: .3rem .5rem; border-radius: 8px; color: var(--muted); }
.pv-nav span.on { background: color-mix(in srgb, var(--pv) 22%, transparent); color: var(--text); }
.pv-main { padding: .9rem; }
.pv-title { font-weight: 700; margin-bottom: .6rem; }
.pv-kpis { display: grid; grid-template-columns: repeat(3, 1fr); gap: .5rem; margin-bottom: .8rem; }
.pv-kpis span { height: 38px; border-radius: 10px; border: 1px solid var(--line); }
.pv-kpis span.acc { border-color: var(--pv); }
.pv-btn { display: inline-block; font-size: .78rem; font-weight: 700; padding: .4rem .8rem; border-radius: 999px; background: var(--pv); color: #fff; }
.blocked .shield.block { background: radial-gradient(circle at 30% 25%, rgba(255,138,128,.7), rgba(150,30,30,.85)); }
.blocked-domain { font-size: 1.05rem; font-weight: 600; padding: .4rem .8rem; border-radius: 10px; background: var(--surface-2); display: inline-block; }
.blocked .setup-card h2 { font-size: 1.1rem; margin: 0 0 .3rem; }
/* Hochgeladene Logos auf dunklem Grund: heller Untergrund, damit dunkle Schriftzüge lesbar bleiben */
[data-theme="dark"] .brand-img, [data-theme="glass"] .brand-img { background: #fff; padding: 5px 9px; border-radius: 10px; }

/* ---------- Vorführmodus ---------- */
.topbar .demo-note { flex: none; display: inline-flex; align-items: center; gap: .35rem; font-size: .76rem; font-weight: 600;
  padding: .25rem .75rem; border-radius: 999px; background: var(--accent); color: var(--accent-text, #04212c); text-decoration: none; }
.topbar .demo-note .ico { width: 14px; height: 14px; }
.demo-done { display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap; }
.demo-facts { margin: 0; padding-left: 1.1rem; display: grid; gap: .35rem; color: var(--muted); font-size: .9rem; }
.demo-steps { margin: 0; padding-left: 1.3rem; display: grid; gap: .55rem; font-size: .92rem; }
.demo-steps strong { color: var(--text); }
.demo-scenarios select { max-width: 420px; }
.demo-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: .8rem; margin-top: .6rem; }
.demo-card { display: flex; flex-direction: column; gap: .4rem; text-align: left; cursor: pointer; padding: 1rem;
  border-radius: 16px; border: 1px solid var(--line); background: var(--surface-2); color: var(--text); font: inherit;
  transition: transform .12s ease, border-color .12s ease; }
.demo-card:hover { transform: translateY(-2px); border-color: var(--accent); }
.demo-card-title { display: flex; align-items: center; gap: .45rem; font-weight: 600; }
.demo-card-title .ico { color: var(--accent); width: 18px; height: 18px; }
.demo-outbox { display: grid; }
.demo-mail { border-top: 1px solid var(--line); }
.demo-mail summary { display: flex; flex-wrap: wrap; align-items: center; gap: .6rem; padding: .7rem 1.2rem; cursor: pointer; list-style: none; }
.demo-mail summary::-webkit-details-marker { display: none; }
.demo-mail-subj { font-weight: 600; flex: 1 1 200px; }
.demo-mail pre { margin: 0 1.2rem 1rem; padding: .8rem 1rem; border-radius: 12px; background: var(--surface-2);
  white-space: pre-wrap; word-break: break-word; font-size: .8rem; max-height: 320px; overflow: auto; }

/* Blocking History: Filter */
.history-filter { display: flex; flex-wrap: wrap; gap: .6rem; align-items: center; margin-bottom: .6rem; }
.history-filter .search { flex: 1 1 260px; }
.history-filter .search input { width: 100%; }
.history-filter select { flex: 0 1 auto; }
.hist-table td.mono { white-space: nowrap; }
.hist-table .tag { white-space: nowrap; }
.hist-count { margin: 0 0 .6rem; }
.table-scroll { overflow-x: auto; }

/* ---------- Postfach ---------- */
.badge-count { display: inline-flex; align-items: center; justify-content: center; min-width: 1.25rem; height: 1.25rem; padding: 0 .35rem;
  margin-left: .4rem; border-radius: 999px; background: var(--accent); color: var(--accent-text, #04212c); font-size: .72rem; font-weight: 700; line-height: 1; }
.nav-item .badge-count { margin-left: auto; }
.inbox-pointer { display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap; }
.inbox-pointer .ico { color: var(--accent); vertical-align: -3px; }
.inbox-bar { display: flex; flex-wrap: wrap; gap: .8rem; align-items: center; margin-bottom: .8rem; }
.inbox-folders { margin-top: 0; }
.inbox-folders .seg-opt { text-decoration: none; }
.inbox-folders .seg-opt.on span { background: var(--accent); color: var(--accent-text, #04212c); font-weight: 600; }
.inbox-folders b { font-weight: 700; margin-left: .2rem; }
.inbox-search { flex: 1 1 260px; }
.inbox-search input { width: 100%; }
.inbox { display: grid; grid-template-columns: minmax(260px, 360px) 1fr; gap: 1rem; align-items: start; }
@media (max-width: 900px) { .inbox { grid-template-columns: 1fr; } }
.inbox-list { max-height: 72vh; overflow-y: auto; }
.inbox-item { display: grid; gap: .3rem; padding: .85rem 1.1rem; border-bottom: 1px solid var(--line); color: var(--text); text-decoration: none;
  border-left: 3px solid transparent; }
.inbox-item:hover { background: var(--surface-2); }
.inbox-item.on { background: var(--surface-2); border-left-color: var(--accent); }
.inbox-item.unread .inbox-domain { font-weight: 700; }
.inbox-item-top { display: flex; justify-content: space-between; gap: .6rem; align-items: baseline; }
.inbox-domain { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.inbox-item-meta { display: flex; flex-wrap: wrap; gap: .4rem; align-items: center; }
.inbox-snippet { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pill { display: inline-block; font-size: .72rem; font-weight: 600; padding: .08rem .5rem; border-radius: 999px; }
.pill.open { background: rgba(255, 183, 77, .16); color: #FFB74D; }
.pill.ok { background: var(--ok-bg); color: var(--ok); }
.pill.no { background: rgba(239, 83, 80, .14); color: #EF8A88; }
[data-theme="light"] .pill.open { color: #9a5b00; }
[data-theme="light"] .pill.no { color: #b3261e; }
.inbox-detail h2 { margin: 0; font-size: 1.15rem; word-break: break-all; }
.inbox-detail-head { display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap; margin-bottom: 1rem; }
.inbox-verdicts { display: flex; gap: .4rem; align-items: center; flex-wrap: wrap; }
.inbox-decide { padding: 1rem; border-radius: 14px; background: var(--surface-2); margin-bottom: 1.2rem; }
.inbox-decide textarea { width: 100%; font: inherit; }
.inbox-decide.done p { margin: 0 0 .6rem; }
.inbox-note { margin: 0 0 .8rem; padding: .5rem .8rem; border-left: 3px solid var(--accent); color: var(--muted); white-space: pre-wrap; }
.inbox-thread { list-style: none; margin: 0; padding: 0; display: grid; gap: .8rem; }
.inbox-msg { padding: .8rem 1rem; border: 1px solid var(--line); border-radius: 14px; }
.inbox-msg-head { display: flex; justify-content: space-between; gap: .6rem; flex-wrap: wrap; }
.inbox-msg-meta { display: flex; flex-wrap: wrap; gap: .3rem; margin: .2rem 0 .4rem; }
.inbox-msg-body { margin: 0; white-space: pre-wrap; }

/* ---------- Einstellungen: Bereiche mit Unterseiten ---------- */
.snav { margin: -.2rem 0 1.4rem; display: grid; gap: .7rem; }
.snav-groups { display: flex; gap: .4rem; flex-wrap: wrap; padding: .35rem; border-radius: 18px; border: 1px solid var(--line);
  background: var(--surface); width: fit-content; max-width: 100%; }
.snav-group { display: inline-flex; align-items: center; gap: .45rem; padding: .55rem .95rem; border-radius: 13px; color: var(--muted);
  text-decoration: none; font-size: .9rem; font-weight: 500; transition: background .15s ease, color .15s ease; white-space: nowrap; }
.snav-group .ico { width: 18px; height: 18px; }
.snav-group:hover { color: var(--text); background: var(--surface-2); }
.snav-group.on { color: var(--accent-text, #04212c); background: var(--accent); font-weight: 600; box-shadow: 0 6px 18px -8px var(--accent); }
.snav-group.on .badge-count { background: var(--accent-text, #04212c); color: var(--accent); }
.snav-items { display: flex; gap: .2rem; flex-wrap: wrap; border-bottom: 1px solid var(--line); padding-left: .3rem; }
.snav-item { padding: .55rem .9rem; color: var(--muted); text-decoration: none; font-size: .9rem; font-weight: 500;
  border-bottom: 2px solid transparent; margin-bottom: -1px; display: inline-flex; align-items: center; }
.snav-item:hover { color: var(--text); }
.snav-item.on { color: var(--accent); border-bottom-color: var(--accent); }
[data-theme="glass"] .snav-groups { background: rgba(255, 255, 255, .05); border-color: rgba(255, 255, 255, .12);
  backdrop-filter: blur(18px) saturate(140%); -webkit-backdrop-filter: blur(18px) saturate(140%); box-shadow: var(--glass-edge); }
[data-theme="glass"] .snav-items { border-bottom-color: rgba(255, 255, 255, .1); }
@media (max-width: 720px) {
  .snav-groups { flex-wrap: nowrap; overflow-x: auto; width: 100%; }
  .snav-items { flex-wrap: nowrap; overflow-x: auto; }
}

/* ---------- Terminal-Fenster (Live-Daten) ---------- */
.term { --t-bg: #07131b; --t-fg: #cfe8f3; --t-dim: #6f8b99; --t-ok: #6ee7a8; --t-bad: #ff7b72; --t-warn: #ffcc66; --t-acc: #4FC3F7;
  border-radius: 16px; overflow: hidden; border: 1px solid rgba(255, 255, 255, .1); background: var(--t-bg);
  box-shadow: 0 24px 60px -30px rgba(0, 0, 0, .7); margin-bottom: 1.4rem; }
.term-bar { display: flex; align-items: center; gap: .8rem; padding: .55rem .8rem; background: linear-gradient(180deg, #10222d, #0b1a23);
  border-bottom: 1px solid rgba(255, 255, 255, .07); color: var(--t-fg); flex-wrap: wrap; }
.term-dots { display: inline-flex; gap: 6px; }
.term-dots i { width: 11px; height: 11px; border-radius: 50%; background: #ff5f57; display: block; }
.term-dots i:nth-child(2) { background: #febc2e; } .term-dots i:nth-child(3) { background: #28c840; }
.term-title { display: inline-flex; align-items: center; gap: .4rem; font-size: .85rem; font-weight: 600; }
.term-title .ico { width: 16px; height: 16px; color: var(--t-acc); }
.term-live { display: inline-flex; align-items: center; gap: .4rem; font-size: .74rem; color: var(--t-ok); text-transform: uppercase; letter-spacing: .06em; }
.term.paused .term-live { color: var(--t-warn); }
.term.paused .pulse-dot { background: var(--t-warn); animation: none; }
.term.offline .term-live { color: var(--t-bad); }
.term.offline .pulse-dot { background: var(--t-bad); animation: none; }
.term-actions { margin-left: auto; display: inline-flex; align-items: center; gap: .4rem; }
.term-btn { display: inline-flex; align-items: center; justify-content: center; width: 30px; height: 28px; border-radius: 8px; cursor: pointer;
  border: 1px solid rgba(255, 255, 255, .12); background: rgba(255, 255, 255, .04); color: var(--t-fg); padding: 0; }
.term-btn:hover { background: rgba(255, 255, 255, .1); }
.term-btn .ico { width: 16px; height: 16px; }
.term .i-play { display: none; } .term.paused .i-play { display: block; } .term.paused .i-pause { display: none; }
.term-check { display: inline-flex; align-items: center; gap: .35rem; font-size: .78rem; color: var(--t-dim); margin: 0; cursor: pointer; }
.term-check input { width: auto; margin: 0; accent-color: var(--t-acc); }
.term-body { height: 300px; overflow-y: auto; padding: .7rem .9rem; font: .8rem/1.6 ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  color: var(--t-fg); scrollbar-width: thin; scrollbar-color: #24414f transparent; }
.term-body:focus { outline: none; }
.term-line { white-space: pre; overflow: hidden; text-overflow: ellipsis; display: flex; gap: .9rem; }
.term-line.fresh { animation: termIn .35s ease-out; }
@keyframes termIn { from { opacity: 0; transform: translateY(4px); background: rgba(79, 195, 247, .08); } to { opacity: 1; transform: none; } }
.term-line .t-time { color: var(--t-dim); flex: none; }
.term-line .t-lvl { flex: none; font-weight: 700; color: var(--t-acc); }
.term-line .t-src { flex: none; color: var(--t-dim); }
.term-line.lvl-warning .t-lvl, .term-line.lvl-warning { color: var(--t-warn); }
.term-line.lvl-error .t-lvl, .term-line.lvl-error { color: var(--t-bad); }
.term-line .t-act { flex: none; font-weight: 700; }
.term-line.blocked .t-act { color: var(--t-bad); }
.term-line.allowed .t-act { color: var(--t-ok); }
.term-line .t-dom { overflow: hidden; text-overflow: ellipsis; }
.term-line.blocked .t-dom { color: #ffd2cd; }
.term-line .t-cat { color: var(--t-warn); flex: none; }
.term-line .t-net { margin-left: auto; color: var(--t-dim); flex: none; }
.term-foot { display: flex; justify-content: space-between; gap: 1rem; padding: .4rem .9rem; font-size: .72rem; color: var(--t-dim);
  border-top: 1px solid rgba(255, 255, 255, .06); flex-wrap: wrap; }
.pulse-dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: #28c840; box-shadow: 0 0 0 0 rgba(40, 200, 64, .6);
  animation: pulse 1.8s infinite; vertical-align: middle; }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 rgba(40, 200, 64, .55); } 70% { box-shadow: 0 0 0 8px rgba(40, 200, 64, 0); } 100% { box-shadow: 0 0 0 0 rgba(40, 200, 64, 0); } }
@media (prefers-reduced-motion: reduce) { .pulse-dot, .term-line.fresh, .health-orb { animation: none !important; } }

/* ---------- Server-Status ---------- */
.health-hero { display: flex; align-items: center; gap: 1.2rem; padding: 1.3rem 1.5rem; border-radius: 20px; margin-bottom: 1.2rem;
  border: 1px solid var(--line); background: var(--surface); flex-wrap: wrap; --st: #28c840; }
.health-hero.st-warn { --st: #febc2e; } .health-hero.st-down { --st: #ff5f57; }
.health-hero h2 { margin: 0 0 .2rem; font-size: 1.35rem; }
.health-hero p { margin: 0; }
.health-orb { width: 46px; height: 46px; border-radius: 50%; flex: none; background: radial-gradient(circle at 35% 35%, #fff8, var(--st) 45%);
  box-shadow: 0 0 0 6px color-mix(in srgb, var(--st) 18%, transparent), 0 0 30px var(--st); animation: orb 2.6s ease-in-out infinite; }
@keyframes orb { 50% { box-shadow: 0 0 0 10px color-mix(in srgb, var(--st) 8%, transparent), 0 0 44px var(--st); } }
.health-counts { margin-left: auto; display: flex; gap: .5rem; flex-wrap: wrap; }
.hc { font-size: .8rem; font-weight: 600; padding: .3rem .7rem; border-radius: 999px; }
.hc.ok { background: rgba(40, 200, 64, .14); color: #6ee7a8; } .hc.warn { background: rgba(254, 188, 46, .15); color: #ffcc66; }
.hc.down { background: rgba(255, 95, 87, .15); color: #ff8a80; }
[data-theme="light"] .hc.ok { color: #1a7f37; } [data-theme="light"] .hc.warn { color: #8a5a00; } [data-theme="light"] .hc.down { color: #b3261e; }
.metric-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: .9rem; margin-bottom: 1.2rem; }
.metric { padding: 1rem 1.1rem .7rem; border-radius: 18px; border: 1px solid var(--line); background: var(--surface); display: grid; gap: .2rem; }
.metric-label { font-size: .8rem; color: var(--muted); }
.metric strong { font-size: 1.6rem; font-variant-numeric: tabular-nums; }
.metric small { font-size: .8rem; color: var(--muted); font-weight: 500; }
.spark { width: 100%; height: 36px; }
.spark-line { fill: none; stroke: var(--accent); stroke-width: 1.8; stroke-linejoin: round; stroke-linecap: round; }
.spark-area { fill: var(--accent); opacity: .12; }
.spark-dot { fill: var(--accent); }
.comp-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: .9rem; margin-bottom: 1.4rem; }
.comp { padding: 1rem 1.1rem; border-radius: 16px; border: 1px solid var(--line); background: var(--surface); --st: #28c840; transition: border-color .3s; }
.comp.st-warn { --st: #febc2e; border-color: rgba(254, 188, 46, .45); } .comp.st-down { --st: #ff5f57; border-color: rgba(255, 95, 87, .55); }
.comp.st-neutral { --st: #7d8f99; opacity: .8; }
.comp-head { display: flex; align-items: center; gap: .55rem; }
.comp-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--st); box-shadow: 0 0 10px var(--st); flex: none; }
.comp-state { margin-left: auto; font-size: .72rem; color: var(--st); font-weight: 600; white-space: nowrap; }
.comp-value { margin: .45rem 0 .15rem; font-weight: 600; font-variant-numeric: tabular-nums; }
.comp-detail { word-break: break-word; }
.health-foot { margin-top: -.6rem; }
[data-theme="glass"] .health-hero, [data-theme="glass"] .metric, [data-theme="glass"] .comp { background: rgba(255, 255, 255, .05);
  border-color: rgba(255, 255, 255, .12); backdrop-filter: blur(18px) saturate(140%); -webkit-backdrop-filter: blur(18px) saturate(140%); box-shadow: var(--glass-edge); }
[data-theme="glass"] .comp.st-warn { border-color: rgba(254, 188, 46, .45); } [data-theme="glass"] .comp.st-down { border-color: rgba(255, 95, 87, .55); }

/* Kopfbereich: Überschrift in einer Flucht mit dem Logo, Umgebungs-Hinweis in der Seitenleiste */
.content { padding-top: 1.55rem; }
.topbar { min-height: 0; margin-bottom: .9rem; }
.env-note { align-self: flex-start; margin: -.5rem .4rem 1rem; display: inline-flex; align-items: center; gap: .3rem; font-size: .7rem;
  padding: .15rem .6rem; border-radius: 999px; border: 1px solid var(--line); color: var(--muted); text-decoration: none; }
.env-note.demo { background: var(--accent); color: var(--accent-text, #04212c); border-color: transparent; font-weight: 600; }
.env-note .ico { width: 13px; height: 13px; }
/* Reihenfolge im Inhalt: Brotkrumen → Überschrift → Meldungen → Rest (Überschrift bleibt auf Höhe des Logos) */
.content { display: flex; flex-direction: column; }
.content > * { flex: none; }
.content > .topbar { order: -3; }
.content > .page-head { order: -2; }
.content > .alert.error, .content > .alert-banner { order: -1; }
