/* Orb: app-spezifische Stile. Das Designsystem (Tokens, Kopfzeile, Navigation, Kernkomponenten) steht in glaze.css (1:1 aus glaze/, nie ändern).
   Reihenfolge: glaze.css, dann app.css. */

/* Dichte */
:root[data-density="compact"] main { padding-top: 14px; }

:root[data-density="compact"] .tiles { column-gap: 12px; }

:root[data-density="compact"] .hero h1 { font-size: var(--fs-xl); }

:root[data-density="compact"] .grid-table td { padding-top: 5px; padding-bottom: 5px; }

:root[data-density="compact"] .toolbar { margin-bottom: 12px; }

.chip { /* glaze-ok: orb-Variante (Dashboard, Tippflächen) */
  display: flex; align-items: center; gap: 8px; padding: 7px 13px; border-radius: var(--r-pill);
  background: var(--card); border: 1px solid var(--line); font-weight: 600; font-variant-numeric: tabular-nums;
}

/* ---------- Layout ---------- */

.tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); column-gap: 18px; row-gap: 0; grid-auto-rows: 8px; grid-auto-flow: row dense; }

.tiles > .tile { align-self: start; }

/* ---------- Tiles ---------- */
.tile { --c: var(--unknown); transition: transform .2s, border-color .2s; }

.tile:hover { transform: translateY(-2px); background: var(--card-hi); }

.tile.ok { --c: var(--ok); }

 .tile.warn { --c: var(--warn); }

 .tile.crit { --c: var(--crit); }

.tile.warn, .tile.crit { border-color: color-mix(in srgb, var(--c) 55%, var(--line)); }

.ico { /* glaze-ok: orb-Dashboard */
  width: 44px; height: 44px; border-radius: var(--r-md); display: grid; place-items: center; flex: none;
  color: var(--c); background: color-mix(in srgb, var(--c) 15%, transparent);
  border: 1px solid color-mix(in srgb, var(--c) 28%, transparent);
}

.bar-row { --c: var(--ok); display: grid; grid-template-columns: 62px 1fr 48px; align-items: center; gap: 10px; margin-top: 11px; font-size: var(--fs-sm); } /* glaze-ok: orb-Dashboard */

.bl { color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.bar { height: 7px; border-radius: var(--r-pill); background: color-mix(in srgb, var(--text) 9%, transparent); overflow: hidden; } /* glaze-ok: orb-Dashboard */

.bar i { display: block; height: 100%; border-radius: var(--r-pill); background: linear-gradient(90deg, color-mix(in srgb, var(--c) 60%, transparent), var(--c)); transition: width .6s; } /* glaze-ok: orb-Dashboard */

.problem { /* glaze-ok: orb-Dashboard */
  --c: var(--warn); margin-top: 12px; padding: 10px 12px; border-radius: var(--r-md); font-size: var(--fs-sm);
  background: color-mix(in srgb, var(--c) 12%, transparent); border-left: 3px solid var(--c);
}

.problem strong { margin-right: 8px; } /* glaze-ok: orb-Dashboard */

.problem span { color: var(--text); opacity: .9; } /* glaze-ok: orb-Dashboard */

details { margin-top: 14px; }

summary { cursor: pointer; color: var(--muted); font-size: var(--fs-xs); user-select: none; list-style: none; display: flex; align-items: center; gap: 6px; }

summary::-webkit-details-marker { display: none; }

summary::before { content: "›"; display: inline-block; transition: transform .2s; font-size: var(--fs-lg); line-height: 1; }

details[open] summary::before { transform: rotate(90deg); }

summary:hover { color: var(--text); }

.rows { list-style: none; margin: 8px 0 0; padding: 0; font-size: var(--fs-sm); }

.rows li { display: grid; grid-template-columns: 14px 1fr auto; gap: 10px; padding: 7px 0; border-top: 1px solid var(--line); align-items: start; }

.rows .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--unknown); margin-top: 7px; }

.rows .ok .dot { background: var(--ok); }

 .rows .warn .dot { background: var(--warn); }

 .rows .crit .dot { background: var(--crit); }

.rv { text-align: right; font-variant-numeric: tabular-nums; max-width: 62%; }

.rl { color: var(--muted); }

.empty-card { grid-column: 1 / -1; text-align: center; padding: 48px 20px; display: grid; justify-items: center; gap: 10px; } /* glaze-ok: orb-Dashboard */

.empty-card .ico { --c: var(--accent); width: 60px; height: 60px; } /* glaze-ok: orb-Dashboard */

/* ---------- Kalender ---------- */
.calendar { position: sticky; top: 20px; }

.cal-head { display: flex; align-items: center; gap: 10px; color: var(--accent-t); }

.cal-head h2 { color: var(--text); font-size: var(--fs-lg); font-weight: 620; }

.day { margin-top: 18px; }

.day h3 { font-size: var(--fs-xs); text-transform: uppercase; letter-spacing: .1em; color: var(--muted); margin-bottom: 8px; font-weight: 650; }

.event { display: flex; gap: 12px; padding: 8px 12px; margin-bottom: 6px; border-radius: var(--r-md); background: color-mix(in srgb, var(--accent) 9%, transparent); border-left: 3px solid var(--accent); }

.event .time { width: 58px; flex: none; color: var(--accent-t); font-weight: 600; font-size: var(--fs-sm); font-variant-numeric: tabular-nums; padding-top: 1px; }

.et { font-size: var(--fs-md); min-width: 0; overflow-wrap: anywhere; }

.empty { color: var(--muted); font-size: var(--fs-sm); }

.cal-error { margin-top: 16px; color: var(--crit-t); font-size: var(--fs-sm); }

@media (max-width: 900px) {
    .layout { grid-template-columns: 1fr; } /* glaze-ok: orb-Dashboard */
    .calendar { position: static; }

}

/* ---------- Buttons / Formulare (Einstellungen) ---------- */

.settings { max-width: 1100px; }

.panel > .lead { color: var(--muted); margin-top: -10px; } /* glaze-ok: orb-Einstellungen */

.pair { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }

.row-head { display: flex; align-items: center; gap: 10px; }

.row-head h3 { font-size: var(--fs-base); font-weight: 620; flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.item-body { margin-top: 16px; display: grid; gap: 16px; }

.check { padding: 12px; border-radius: var(--r-md); background: color-mix(in srgb, var(--text) 4%, transparent); border: 1px solid var(--line); display: grid; gap: 10px; }

.check .fields { grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); }

.test-out { display: grid; gap: 4px; font-size: var(--fs-sm); padding: 12px; border-radius: var(--r-md); background: color-mix(in srgb, var(--text) 5%, transparent); }

.test-out .r { display: flex; gap: 10px; align-items: baseline; }

.test-out .d { width: 8px; height: 8px; border-radius: 50%; background: var(--unknown); flex: none; align-self: center; }

.test-out .ok .d { background: var(--ok); }

 .test-out .warn .d { background: var(--warn); }

 .test-out .crit .d { background: var(--crit); }

.test-out .r span:last-child { margin-left: auto; text-align: right; color: var(--muted); }

.actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }

.add-types { display: flex; gap: 10px; flex-wrap: wrap; }

pre.cmd { margin: 0; padding: 14px; border-radius: var(--r-md); overflow: auto; font: var(--fs-xs)/1.5 var(--font-mono); background: #141a2c; color: #dfe6ff; border: 1px solid var(--line); }

.table { width: 100%; border-collapse: collapse; font-size: var(--fs-sm); }

.table td { padding: 8px 4px; border-top: 1px solid var(--line); }

.table td:last-child { text-align: right; color: var(--muted); }

dialog h3 { margin-bottom: 14px; }

dialog .fields { grid-template-columns: 1fr; }

.back { display: inline-flex; align-items: center; gap: 6px; color: var(--muted); font-size: var(--fs-sm); } /* glaze-ok: orb-Variante (Dashboard, Tippflächen) */

@media (max-width: 800px) {
   .s-layout { grid-template-columns: minmax(0, 1fr); } /* glaze-ok: orb-Einstellungen */
}

/* ---------- Anordnen-Modus ---------- */
.tile.span2 { grid-column: span 2; }

@media (max-width: 700px) {
   .tile.span2 { grid-column: auto; }
}

.edit-ctl { display: none; }

body.editing .tile { cursor: grab; user-select: none; position: relative; outline: 2px dashed color-mix(in srgb, var(--accent) 55%, transparent); outline-offset: 3px; animation: wiggle .35s ease-in-out infinite alternate; }

body.editing .tile > *:not(.edit-ctl) { pointer-events: none; }

body.editing .tile.dragging { opacity: .35; animation: none; }

body.editing .edit-ctl { display: flex; gap: 6px; position: absolute; top: 10px; right: 10px; z-index: var(--z-sticky); }

.edit-ctl button { width: 30px; height: 30px; border-radius: var(--r-xs); border: 1px solid var(--line); background: var(--bg2); color: var(--text); font-size: var(--fs-base); cursor: pointer; pointer-events: auto; }

.edit-ctl button:hover { border-color: var(--accent); color: var(--accent-t); }

body.editing .badge { visibility: hidden; }

body.editing #edit-btn { color: var(--accent-t); border-color: var(--accent); }

@keyframes wiggle { from { transform: rotate(-.25deg); } to { transform: rotate(.25deg); } }

.editbar { position: fixed; left: 50%; bottom: 22px; transform: translateX(-50%); z-index: var(--z-sticky); display: flex; align-items: center; gap: 14px; padding: 10px 12px 10px 20px; border-radius: var(--r-lg); background: color-mix(in srgb, var(--bg2) 94%, transparent); border: 1px solid var(--accent); box-shadow: var(--shadow); backdrop-filter: blur(var(--blur)); }

/* ---------- Wizards ---------- */
dialog.wizard { width: min(680px, 94vw); max-height: 90vh; overflow: auto; }

.wz-head { display: flex; align-items: center; gap: 10px; color: var(--accent-t); }

.wz-head h3 { color: var(--text); margin: 0; flex: 1; }

.wz-steps { display: flex; gap: 6px; margin: 14px 0 18px; }

.wz-steps i { flex: 1; height: 4px; border-radius: var(--r-pill); background: var(--line); }

.wz-steps i.done { background: var(--accent); opacity: .55; }

 .wz-steps i.cur { background: var(--accent); }

dialog.wizard h4 { margin: 0 0 12px; font-size: var(--fs-lg); }

dialog.wizard .fields { grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); }

.wz-nav { margin-top: 22px; }

.blocks { display: grid; gap: 12px; }

.blocks p { margin: 0; }

 .blocks ul { margin: 0; padding-left: 20px; display: grid; gap: 4px; }

.codewrap { position: relative; }

 .codewrap .copy-btn { position: absolute; top: 8px; right: 8px; }

.codewrap pre.cmd { padding-right: 90px; white-space: pre-wrap; word-break: break-all; }

.wizard-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 10px; }

.wz-card {
  display: grid; gap: 4px; justify-items: start; text-align: left; padding: 14px; border-radius: var(--r-md); font: inherit; color: var(--text);
  background: color-mix(in srgb, var(--text) 4%, transparent); border: 1px solid var(--line); cursor: pointer; transition: .15s;
}

.wz-card:hover { border-color: var(--accent); transform: translateY(-2px); }

.wz-card .ic { color: var(--accent-t); width: 22px; height: 22px; margin-bottom: 4px; }

details.guide { margin-top: 0; padding: 12px 14px; border-radius: var(--r-md); border: 1px solid var(--line); background: color-mix(in srgb, var(--text) 3%, transparent); }

details.guide .blocks { margin-top: 12px; }

/* ---------- Login / Einrichtung ---------- */

.auth-logo { width: 62px; height: 62px; margin: 0 auto; border-radius: var(--r-xl); display: grid; place-items: center; color: var(--on-accent); /* glaze-ok: orb-Einstellungen */
  background: linear-gradient(135deg, var(--accent), var(--accent2)); box-shadow: 0 8px 30px color-mix(in srgb, var(--accent) 45%, transparent); }

.auth-error, .auth-ok { min-height: 1.2em; margin: 0; font-size: var(--fs-sm); color: var(--crit-t); }

.auth-ok { color: var(--ok-t); }

.btn.wide { width: 100%; justify-content: center; padding: 11px; } /* glaze-ok: orb-Variante (Dashboard, Tippflächen) */

.role-chip { font-size: var(--fs-xs); font-weight: 700; padding: 2px 9px; border-radius: var(--r-pill); background: color-mix(in srgb, var(--accent) 16%, transparent); color: var(--accent-t); }

.role-chip.admin { background: color-mix(in srgb, var(--accent2) 18%, transparent); color: var(--accent2-t); }

.role-chip.off { background: color-mix(in srgb, var(--crit) 15%, transparent); color: var(--crit-t); }

.user-row { display: grid; grid-template-columns: 1fr auto; gap: 10px; align-items: center; padding: 12px 0; border-top: 1px solid var(--line); }

.user-row:first-child { border-top: 0; }

.user-row .meta { color: var(--muted); font-size: var(--fs-xs); }

.perm-table { width: 100%; border-collapse: collapse; font-size: var(--fs-sm); }

.perm-table th, .perm-table td { padding: 7px 6px; border-top: 1px solid var(--line); text-align: center; }

.perm-table th:first-child, .perm-table td:first-child { text-align: left; }

.perm-table th { color: var(--muted); font-weight: 600; border-top: 0; }

.group-title { margin: 18px 0 8px; font-size: var(--fs-xs); font-weight: 650; color: var(--muted); }

.group-title:first-of-type { margin-top: 0; }

/* =====================================================================
   v2: Werkzeugleiste, Ansichten (Karten/Liste/Kompakt), Status-Symbole, Verlauf, Ereignisse
   ===================================================================== */
.ic.sm { width: 14px; height: 14px; } /* glaze-ok: orb-Variante (Dashboard, Tippflächen) */

.hero p b { color: var(--ct, var(--c)); font-weight: 650; } /* glaze-ok: orb-Dashboard */

.hero .live { display: flex; align-items: center; gap: 7px; font-size: var(--fs-xs); margin-top: 6px; } /* glaze-ok: orb-Dashboard */

/* Chips als Filter-Buttons mit Symbol (nicht nur Farbe) */

.chip.maint { cursor: default; } /* glaze-ok: orb-Variante (Dashboard, Tippflächen) */

.chip i { display: none; } /* glaze-ok: orb-Variante (Dashboard, Tippflächen) */

/* Werkzeugleiste */
.toolbar { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin: -4px 0 18px; } /* glaze-ok: orb-Dashboard */

@media (max-width: 700px) {
   .seg button:has(> .ic) > span, .tgl:has(> .ic) > span { display: none; } /* glaze-ok: orb-Variante (Dashboard, Tippflächen) */
   .search { flex: 1 1 100%; } /* glaze-ok: orb-Dashboard */
}

/* Badges mit Symbol */

.since-line { margin: 8px 0 0 57px; }

.since { font-size: var(--fs-xs); color: var(--c, var(--muted)); font-weight: 600; }

.tile.warn .since { color: var(--warn-t); }

 .tile.crit .since { color: var(--crit-t); }

.tile.in-maint, .group.in-maint, .pill.in-maint { opacity: .65; border-style: dashed; }

.tile.in-maint .ico, .group.in-maint .ico { --c: var(--muted); }

/* Problem-Zeilen mit Symbol */

.problem .pi .ic { width: 16px; height: 16px; stroke-width: 2.4; color: var(--c); margin-top: 1px; } /* glaze-ok: orb-Dashboard */

.problem strong { margin-right: 6px; } /* glaze-ok: orb-Dashboard */

/* Verlaufs-Sparkline */
.spark { vertical-align: middle; margin-right: 10px; color: var(--accent-t); overflow: visible; } /* glaze-ok: orb-Dashboard */

.spark .sd { fill: currentColor; } /* glaze-ok: orb-Dashboard */

.rows .rv { display: inline-flex; align-items: center; justify-content: flex-end; flex-wrap: wrap; }

.rows .rv small { flex-basis: 100%; }

/* Menü (Wartungsmodus) */
.menu-wrap { position: relative; margin-left: 2px; }

.tile-menu { width: 28px; height: 28px; border-radius: var(--r-xs); border: 0; background: none; color: var(--muted); font-size: var(--fs-lg); line-height: 1; cursor: pointer; }

.tile-menu:hover { background: var(--card-hi); color: var(--text); }

.menu button.end { color: var(--ok-t); } /* glaze-ok: orb-Variante (Dashboard, Tippflächen) */

.menu-title { font-size: var(--fs-xs); text-transform: uppercase; letter-spacing: .08em; color: var(--muted); padding: 4px 10px; font-weight: 700; }

.menu-note { font-size: var(--fs-xs); color: var(--muted); padding: 6px 10px 2px; line-height: 1.35; }

body.editing .menu-wrap { display: none; }

/* Layout */

.side-col { display: grid; gap: 18px; align-content: start; position: sticky; top: 20px; } /* glaze-ok: orb-Dashboard */

.calendar { position: static; }

@media (max-width: 900px) {

}

.calm { text-align: center; padding: 44px 20px; display: grid; justify-items: center; gap: 8px; }

.calm .ico { --c: var(--ok); width: 56px; height: 56px; }

.calm p { color: var(--muted); }

/* Kompaktansicht */
.pills { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 10px; }

.pill { --c: var(--unknown); display: grid; gap: 3px; padding: 12px 14px; border-radius: var(--r-md); background: var(--card); border: 1px solid var(--line); border-left: 4px solid var(--c); }

.pill.ok { --c: var(--ok); }

 .pill.warn { --c: var(--warn); }

 .pill.crit { --c: var(--crit); }

.pill-top { display: flex; align-items: center; gap: 8px; }

.pill-top strong { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 620; }

.pill-ico .ic { width: 16px; height: 16px; stroke-width: 2.6; color: var(--c); }

.pill-problem { font-size: var(--fs-xs); color: var(--warn-t); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.pill-problem.crit { color: var(--crit-t); }

/* Listenansicht */
.groups { display: grid; gap: 12px; }

.group { --c: var(--unknown); padding: 0; overflow: visible; }

.group.ok { --c: var(--ok); }

 .group.warn { --c: var(--warn); }

 .group.crit { --c: var(--crit); }

.group.warn, .group.crit { border-color: color-mix(in srgb, var(--c) 50%, var(--line)); }

.group-head { display: flex; align-items: center; gap: 12px; padding: 14px 18px; cursor: pointer; list-style: none; user-select: none; }

.group-head::-webkit-details-marker { display: none; }

.group-head::before { content: none !important; }

.group-head h2 { font-size: var(--fs-base); font-weight: 620; margin: 0; }

.group-head .sub { color: var(--muted); font-size: var(--fs-sm); }

.chev { display: inline-block; width: 12px; color: var(--muted); transition: transform .2s; }

.group[open] .chev { transform: rotate(90deg); }

.grid-table { width: 100%; border-collapse: collapse; font-size: var(--fs-sm); border-top: 1px solid var(--line); }

.grid-table td { padding: 8px 10px; border-top: 1px solid var(--line); vertical-align: middle; }

.grid-table tr:first-child td { border-top: 0; }

.grid-table tr:hover td { background: color-mix(in srgb, var(--text) 3%, transparent); }

.grid-table tr.warn td, .grid-table tr.crit td { background: color-mix(in srgb, var(--c2, var(--warn)) 7%, transparent); }

.grid-table tr.crit { --c2: var(--crit); }

.c-st { width: 44px; padding-left: 18px !important; }

.c-name { font-weight: 560; white-space: nowrap; }

.c-spark { width: 96px; text-align: right; }

.c-spark .spark { margin: 0; }

.c-val { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }

.c-hint { color: var(--muted); font-size: var(--fs-xs); max-width: 360px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; padding-right: 18px !important; }

.si { display: inline-grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; color: var(--c3, var(--unknown)); background: color-mix(in srgb, var(--c3, var(--unknown)) 16%, transparent); }

.si .ic { width: 12px; height: 12px; stroke-width: 2.8; }

.si.ok { --c3: var(--ok); }

 .si.warn { --c3: var(--warn); }

 .si.crit { --c3: var(--crit); }

@media (max-width: 700px) {
   .c-hint, .c-spark { display: none; }
}

/* Ereignisse */
.timeline .ev { display: grid; grid-template-columns: 24px minmax(0, 1fr) auto; gap: 10px; padding: 10px 0; border-top: 1px solid var(--line); align-items: start; font-size: var(--fs-sm); } /* glaze-ok: orb-Dashboard */

.timeline .ev:first-of-type { border-top: 0; margin-top: 8px; } /* glaze-ok: orb-Dashboard */

.ev-arrow { color: var(--muted); font-size: var(--fs-xs); }

.timeline .empty { margin-top: 10px; } /* glaze-ok: orb-Dashboard */

/* Vollbild / Wanddisplay */
:fullscreen main { max-width: none; padding: 28px 36px; }

:fullscreen .hero h1 { font-size: var(--fs-3xl); }

.grid-table { table-layout: fixed; }

.c-name { width: 26%; overflow: hidden; text-overflow: ellipsis; }

.c-spark { width: 112px; }

.c-val { width: 22%; white-space: normal; overflow-wrap: anywhere; }

.c-hint { width: auto; white-space: normal; max-width: none; }

/* =====================================================================
   v3: Einstellungen (Unter-Tabs, Schwellwerte, Akkordeons, Rollen, Tabellen)
   ===================================================================== */

.panel > h2 + .subtabs, .panel > h1 + .subtabs { margin-top: -8px; } /* glaze-ok: orb-Einstellungen */

p.hint { color: var(--muted); font-size: var(--fs-xs); margin: 6px 0 0; line-height: 1.4; }

p.empty { color: var(--muted); margin: 6px 0; }

.meta { color: var(--muted); font-size: var(--fs-xs); }

.features { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 10px; }

.feature { display: grid; gap: 4px; padding: 12px 14px; border-radius: var(--r-md); background: color-mix(in srgb, var(--accent) 8%, transparent); border: 1px solid color-mix(in srgb, var(--accent) 22%, var(--line)); }

.sys.off { opacity: .6; }

.sdot { width: 11px; height: 11px; border-radius: 50%; background: var(--unknown); flex: none; }

.sdot.ok { background: var(--ok); }

 .sdot.warn { background: var(--warn); }

 .sdot.crit { background: var(--crit); }

 .sdot.maint { background: var(--muted); }

 .sdot.off { background: transparent; border: 2px solid var(--muted); }

.tag.os.windows { background: color-mix(in srgb, var(--s5) 18%, transparent); color: var(--accent-t); } /* glaze-ok: orb-Statusvariante */

.tag.os.linux { background: color-mix(in srgb, var(--warn) 16%, transparent); color: var(--warn-t); } /* glaze-ok: orb-Statusvariante */

.tag.lvl { background: transparent; border: 1px solid var(--line); color: var(--muted); } /* glaze-ok: orb-Statusvariante */

.row-head .tag + .tag { margin-left: -4px; }

/* Akkordeon in der Systembearbeitung */
.acc { border: 1px solid var(--line); border-radius: var(--r-md); background: color-mix(in srgb, var(--text) 3%, transparent); margin: 0; }

.acc > summary { display: flex; align-items: baseline; gap: 12px; padding: 12px 16px; cursor: pointer; list-style: none; color: var(--text); font-size: var(--fs-base); }

.acc > summary::-webkit-details-marker { display: none; }

.acc > summary::before { content: "›"; color: var(--muted); transition: transform .2s; display: inline-block; }

.acc[open] > summary::before { transform: rotate(90deg); }

.acc > summary small { color: var(--muted); font-size: var(--fs-xs); }

.acc-body { padding: 4px 16px 16px; display: grid; gap: 14px; }

/* Schwellwerte */
.th-list { display: grid; gap: 4px; }

.th-row { display: grid; grid-template-columns: minmax(180px, 1.4fr) 130px 130px 44px 36px; gap: 12px; align-items: center; padding: 10px 0; border-top: 1px solid var(--line); }

.th-row:first-child { border-top: 0; }

.th-name { display: grid; gap: 1px; }

.th-in { display: grid; gap: 3px; font-size: var(--fs-xs); font-weight: 650; }

.th-in span { color: var(--muted); }

.th-in.warn span::before, .th-in.crit span::before { content: ""; display: inline-block; width: 8px; height: 8px; border-radius: 50%; margin-right: 6px; }

.th-in.warn span::before { background: var(--warn); }

 .th-in.crit span::before { background: var(--crit); }

.th-row .unit { color: var(--muted); font-size: var(--fs-xs); }

@media (max-width: 760px) {
   .th-row { grid-template-columns: 1fr 1fr; }
   .th-name { grid-column: 1 / -1; }
}

/* Regeln */
.rules { display: grid; gap: 8px; }

.rule { display: grid; grid-template-columns: 1fr 200px 40px; gap: 8px; align-items: center; }

@media (max-width: 700px) {
   .rule { grid-template-columns: 1fr 1fr 40px; }
}

/* Listen mit Auswahl */
.checklist { display: flex; flex-wrap: wrap; gap: 6px 18px; padding-top: 4px; }

/* Rollen & Rechte */
.perm-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 16px; }

.perm-group { display: grid; gap: 8px; align-content: start; }

.perm-group .switch { padding-top: 0; }

/* Tabellen */
.table.wide th { text-align: left; font-size: var(--fs-xs); text-transform: uppercase; letter-spacing: .06em; color: var(--muted); padding: 6px 8px; font-weight: 650; }

.table.wide td { padding: 10px 8px; text-align: left; color: var(--text); vertical-align: middle; }

.table.wide td.meta { color: var(--muted); }

.table td.acts { text-align: right; white-space: nowrap; }

.table td.acts .btn { margin-left: 4px; }

/* Balken: Beschriftung bekommt Platz (ganze Namen wie „Storage usb-backup“) */
.bar-row { grid-template-columns: minmax(90px, 44%) 1fr 46px; } /* glaze-ok: orb-Dashboard */

.bar-row .bl { color: var(--text); opacity: .75; } /* glaze-ok: orb-Dashboard */

/* Problem-Werte: jede Angabe in eigener Zeile statt langer „·“-Kette */
.problem .pv { display: block; margin-top: 2px; } /* glaze-ok: orb-Dashboard */

.problem .pv:first-of-type { margin-top: 0; } /* glaze-ok: orb-Dashboard */

/* Schmale Fenster: einspaltig (muss nach allen .layout-Regeln stehen) */
@media (max-width: 900px) {

}

.bar-row { grid-template-columns: minmax(110px, 44%) 1fr 46px; } /* glaze-ok: orb-Dashboard */

/* Etiketten: nie ineinander laufen */

.tags { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }


/* Abhängigkeiten, Quittieren, Detail-Links */
.badge.ack { --c: var(--accent-t); } /* glaze-ok: orb-Statusvariante */

 .badge.dep { --c: var(--muted); } /* glaze-ok: orb-Statusvariante */

.tt h2 a, .group-head h2 a, .pill-top strong a { color: inherit; text-decoration: none; } /* glaze-ok: orb-Dashboard */

.tt h2 a:hover, .group-head h2 a:hover, .pill-top strong a:hover { text-decoration: underline; text-underline-offset: 3px; } /* glaze-ok: orb-Dashboard */

.mute-line { margin: 8px 0 0 57px; font-size: var(--fs-xs); color: var(--muted); }

.mute-line.ack { color: var(--accent-t); }

 .mute-line.dep b { color: var(--text); }

.mute-line.parent { margin-top: 2px; }

.group-head .mute-line { display: none; }

dialog.ackdlg { width: min(420px, 92vw); }

dialog.ackdlg textarea { min-height: 70px; resize: vertical; }

/* ---------- Detailseite & Statusseite ---------- */
.detail-range { margin: 0 0 14px; display: inline-flex; }

.seg-a { padding: 7px 14px; border-radius: var(--r-sm); color: var(--muted); font-size: var(--fs-sm); }

.seg-a.on { background: var(--card-hi); color: var(--text); box-shadow: 0 1px 4px rgba(0, 0, 0, .2); }

.stat-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 14px; margin-bottom: 14px; }

.stat strong { display: block; font-size: var(--fs-xl); font-weight: 650; letter-spacing: -.01em; margin-top: 2px; font-variant-numeric: tabular-nums; }

.stat strong.ok { color: var(--ok-t); }

 .stat strong.warn { color: var(--warn-t); }

 .stat strong.crit { color: var(--crit-t); }

.charts { display: grid; grid-template-columns: repeat(auto-fit, minmax(420px, 1fr)); gap: 14px; margin-bottom: 14px; }

.chart-head { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 8px; }

.chart-head h3 { font-size: var(--fs-base); font-weight: 600; }

.chart .ca { fill: color-mix(in srgb, var(--accent) 16%, transparent); } /* glaze-ok: orb-Dashboard */

.chart .cl { fill: none; stroke: var(--accent); stroke-width: 1.8; stroke-linejoin: round; } /* glaze-ok: orb-Dashboard */

.chart .cd { fill: var(--accent); } /* glaze-ok: orb-Dashboard */

.two-col { display: grid; grid-template-columns: 1.3fr 1fr; gap: 14px; }

.child-row { display: flex; align-items: center; gap: 10px; padding: 8px 4px; border-top: 1px solid var(--line); }

.child-row small { margin-left: auto; }

.status-row { display: flex; align-items: center; gap: 14px; padding: 14px 6px; border-top: 1px solid var(--line); }

.status-row:first-child { border-top: 0; }

.sr-name { flex: 1; min-width: 0; }

.sr-state { font-size: var(--fs-sm); font-weight: 600; }

.sr-state.ok { color: var(--ok-t); }

 .sr-state.warn { color: var(--warn-t); }

 .sr-state.crit { color: var(--crit-t); }

 .sr-state.maint { color: var(--accent-t); }

.sr-pct { color: var(--muted); font-size: var(--fs-sm); min-width: 64px; text-align: right; font-variant-numeric: tabular-nums; }

@media (max-width: 800px) {
   .two-col { grid-template-columns: 1fr; }
   .charts { grid-template-columns: 1fr; }
}

.two-col .ev, .two-col .ev + .ev { display: flex; align-items: flex-start; gap: 10px; padding: 8px 0; border-top: 1px solid var(--line); }

.two-col .ev:first-of-type { border-top: 0; }

.two-col .grid-table .c-val { word-break: break-word; }

/* ---------- Gäste beim Host ---------- */
.guests { margin-top: 12px; padding-top: 8px; border-top: 1px solid var(--line); }

.guests-head { display: flex; align-items: center; gap: 8px; font-size: var(--fs-xs); font-weight: 650; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); margin-bottom: 4px; }

.guests-head .ic { width: 14px; height: 14px; }

.guests-head b { color: var(--text); font-weight: 650; }

.gcount { margin-left: auto; text-transform: none; letter-spacing: 0; font-weight: 600; }

.gcount.ok { color: var(--ok-t); }

 .gcount.warn { color: var(--warn-t); }

 .gcount.crit { color: var(--crit-t); }

.guest { --c: var(--unknown); display: grid; grid-template-columns: 8px minmax(0, 1fr) 104px 24px; align-items: center; gap: 0 8px; padding: 5px 4px; border-radius: var(--r-xs); font-size: var(--fs-sm); }

.guest:hover { background: var(--card-hi); }

.guest.ok { --c: var(--ok); }

 .guest.warn { --c: var(--warn); }

 .guest.crit { --c: var(--crit); }

.gdot { width: 8px; height: 8px; border-radius: 50%; background: var(--c); flex: none; box-shadow: 0 0 0 3px color-mix(in srgb, var(--c) 22%, transparent); }

.gn { display: flex; align-items: center; gap: 6px; min-width: 0; }

.gname { font-weight: 550; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.gname:hover { text-decoration: underline; }

.gkind { flex: none; white-space: nowrap; font-size: var(--fs-xs); color: var(--muted); border: 1px solid var(--line); border-radius: var(--r-xs); padding: 0 5px; }

.gmeta { display: flex; justify-content: flex-end; white-space: nowrap; align-items: center; gap: 8px; color: var(--muted); font-size: var(--fs-xs); }

.gtext, .gnote { font-style: normal; }

.gm { display: inline-flex; align-items: center; gap: 4px; --c: var(--ok); }

.gm.warn { --c: var(--warn); }

 .gm.crit { --c: var(--crit); }

.gm em { font-style: normal; font-size: var(--fs-xs); }

.gm i { width: 26px; height: 5px; border-radius: calc(var(--r-xs) / 2); background: var(--line); overflow: hidden; display: block; }

.gm b { display: block; height: 100%; background: var(--c); border-radius: calc(var(--r-xs) / 2); }

.gprob { grid-column: 1 / -1; padding-left: 16px; font-size: var(--fs-xs); color: var(--warn-t); }

.gprob.crit { color: var(--crit-t); }

.guest .menu-wrap { margin-left: -2px; }

.guest .tile-menu { width: 24px; height: 24px; }

.crit-t { color: var(--crit-t); }

 .warn-t { color: var(--warn-t); }

/* Marken-Icon: Statuspunkt in der Stimmgabel */
.st-ok { --dot: var(--ok); }

 .st-warn { --dot: var(--warn); }

 .st-crit { --dot: var(--crit); }

 .st-unknown { --dot: var(--unknown); }

/* ===================== Smartphone ===================== */
@media (max-width: 640px) {
    .card { padding: 14px; border-radius: var(--r-lg); } /* glaze-ok: orb-Dashboard (dichte Kacheln, Erste Schritte passt auf 375 px) */
    .savebar .sb-text { flex: 1 0 100%; } /* glaze-ok: orb-Einstellungen (Hinweis oben, Knöpfe darunter) */
    main, main[style] { padding: 12px 12px calc(28px + env(safe-area-inset-bottom)); }
    .back { font-size: var(--fs-md); } /* glaze-ok: orb-Variante (Dashboard, Tippflächen) */
    .hero .orb { width: 34px; height: 34px; } /* glaze-ok: orb-Dashboard */
    .hero .orb i { inset: 8px; box-shadow: 0 0 14px var(--c); } /* glaze-ok: orb-Dashboard */
    .hero h1 { font-size: var(--fs-title); } /* glaze-ok: orb-Dashboard */
    .hero p { font-size: var(--fs-xs); margin-top: 1px; } /* glaze-ok: orb-Dashboard */
    .hero .live { margin-top: 3px; } /* glaze-ok: orb-Dashboard */
    .chips { flex: 1 1 100%; gap: 6px; } /* glaze-ok: orb-Variante (Dashboard, Tippflächen) */
    /* Werkzeugleiste */
    .toolbar { gap: 8px; margin: 0 0 12px; } /* glaze-ok: orb-Dashboard */
    .search { flex: 1 1 100%; height: 42px; min-width: 0; } /* glaze-ok: orb-Dashboard */
    .seg { flex: 1 1 auto; justify-content: space-between; } /* glaze-ok: orb-Variante (Dashboard, Tippflächen) */
    .seg button { flex: 1; justify-content: center; height: 36px; } /* glaze-ok: orb-Variante (Dashboard, Tippflächen) */
    .tgl { height: 42px; padding: 0 14px; } /* glaze-ok: orb-Variante (Dashboard, Tippflächen) */
    #edit-btn { display: none; }
     /* Anordnen per Ziehen geht am Smartphone nicht sinnvoll: am Rechner nutzen */
    .toolbar .spacer { display: none; } /* glaze-ok: orb-Dashboard */
    /* Kacheln */
    .layout { gap: 14px; } /* glaze-ok: orb-Dashboard */
    .tiles { grid-template-columns: minmax(0, 1fr); }
    .tile.span2 { grid-column: auto; }
    .tile-top { gap: 10px; } /* glaze-ok: orb-Dashboard */
    .ico { width: 38px; height: 38px; border-radius: var(--r-md); } /* glaze-ok: orb-Dashboard */
    .tt h2 { font-size: var(--fs-base); } /* glaze-ok: orb-Dashboard */
    .tt .sub { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: var(--fs-xs); } /* glaze-ok: orb-Dashboard */
    .tile-menu { width: 38px; height: 38px; font-size: var(--fs-title); }
    .menu { right: 0; max-width: 86vw; } /* glaze-ok: orb-Variante (Dashboard, Tippflächen) */
    .bar-row { grid-template-columns: minmax(70px, 38%) 1fr 44px; margin-top: 10px; } /* glaze-ok: orb-Dashboard */
    summary { padding: 8px 0; }
    .guests { margin-top: 10px; }
    .guest { padding: 7px 2px; grid-template-columns: 8px minmax(0, 1fr) auto 36px; }
    .guest .tile-menu { width: 34px; height: 34px; }
    .gmeta { gap: 6px; }
    .pills { grid-template-columns: minmax(0, 1fr); }
    .side-col { margin-top: 2px; } /* glaze-ok: orb-Dashboard */
    /* Listenansicht */
    .group-head { flex-wrap: wrap; gap: 6px 10px; }
    .group-head .sub { flex: 1 1 100%; order: 5; }
    .grid-table td { padding: 8px 4px; }
    .c-hint, .c-spark { display: none; }
    /* Bedienelemente: Daumen-tauglich */
    input, select, textarea { font-size: var(--fs-base); }
     /* verhindert das automatische Hineinzoomen in iOS */
    dialog, dialog.wizard, dialog.ackdlg { width: calc(100vw - 16px); max-width: none; max-height: 92vh; padding: 16px; border-radius: var(--r-lg); overflow: auto; }
    dialog.wizard .fields { grid-template-columns: minmax(0, 1fr); }
    .wizard-grid { grid-template-columns: minmax(0, 1fr); }

    /* Einstellungen */
    .s-layout { gap: 14px; } /* glaze-ok: orb-Einstellungen */
    .table.wide { display: block; overflow-x: auto; }
    .user-row, .row-head { flex-wrap: wrap; gap: 8px; }
    .row-head h3 { min-width: 0; flex: 1 1 55%; overflow-wrap: anywhere; }
    .row-head > .tag { order: 10; flex: 0 0 auto; max-width: 100%; white-space: normal; }
    /* Kopf mit Schildern: Zeile 1 Symbol, Name, Schalter; Zeile 2 Schilder und Knopf (rechts). ::after erzwingt den Umbruch */
    .row-head:has(> .tag) { row-gap: 4px; }
    .row-head:has(> .tag)::after { content: ""; order: 5; flex-basis: 100%; height: 0; }
    .row-head:has(> .tag) > .btn { order: 11; margin-left: auto; }
    .th-row { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
    .perm-grid { grid-template-columns: minmax(0, 1fr); }
    /* Detailseite, Statusseite, Konto */
    .detail-range { display: flex; overflow-x: auto; max-width: 100%; }
    .stat-row { grid-template-columns: 1fr 1fr; gap: 10px; }
    .stat strong { font-size: var(--fs-title); }
    .charts, .two-col { grid-template-columns: minmax(0, 1fr); gap: 10px; }
    .chart-card { padding: 12px; }
    .status-row { gap: 10px; padding: 12px 2px; }
    .sr-pct { display: none; }
    :is(.two-col, .group) .grid-table, :is(.two-col, .group) .grid-table tbody { display: block; width: 100%; }
    :is(.two-col, .group) .grid-table .c-name { white-space: normal; overflow: visible; font-weight: 600; }
    :is(.two-col, .group) .grid-table tr { display: grid; grid-template-columns: 28px minmax(0, 1fr); gap: 0 8px; padding: 8px 6px; }
    :is(.two-col, .group) .grid-table td { display: block; width: auto; padding: 0; text-align: left; border-top: 0; background: none !important; }
    :is(.two-col, .group) .grid-table .c-st { width: auto; padding-left: 0 !important; }
    :is(.two-col, .group) .grid-table tr { border-top: 1px solid var(--line); }
    :is(.two-col, .group) .grid-table tr:first-child { border-top: 0; }
    :is(.two-col, .group) .grid-table tr.warn, :is(.two-col, .group) .grid-table tr.crit { background: color-mix(in srgb, var(--c2, var(--warn)) 8%, transparent); border-radius: var(--r-sm); }
    :is(.two-col, .group) .grid-table .c-st { grid-row: 1 / span 3; }
    :is(.two-col, .group) .grid-table .c-name { grid-column: 2; grid-row: 1; }
    :is(.two-col, .group) .grid-table .c-val { grid-column: 2; grid-row: 2; }
    :is(.two-col, .group) .grid-table .c-hint { grid-column: 2; grid-row: 3; }
    :is(.two-col, .group) .grid-table .c-hint:empty { display: none; }
    :is(.two-col, .group) .grid-table .c-st { grid-column: 1; }
    :is(.two-col, .group) .grid-table .c-val { font-weight: 600; overflow-wrap: anywhere; }
    :is(.two-col, .group) .grid-table .c-hint { display: block; color: var(--muted); font-size: var(--fs-xs); }
}


/* ---------- Ereignisse: Gruppen, Details ---------- */
.timeline .cal-head { display: flex; align-items: center; gap: 8px; } /* glaze-ok: orb-Dashboard */

.link-btn { margin-left: auto; background: none; border: 0; color: var(--accent-t); font: inherit; font-size: var(--fs-xs); font-weight: 600; cursor: pointer; padding: 4px 2px; }

.link-btn:hover { text-decoration: underline; }

.ev-day { margin: 14px 0 2px; font-size: var(--fs-xs); font-weight: 650; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); }

.timeline .ev[data-event], .ev-list .ev { cursor: pointer; border-radius: var(--r-sm); transition: background .15s; } /* glaze-ok: orb-Dashboard */

.timeline .ev[data-event]:hover, .ev-list .ev:hover, .ev:focus-visible { background: var(--card-hi); outline: none; } /* glaze-ok: orb-Dashboard */

.ev-list { display: grid; margin-top: 10px; max-height: 58vh; overflow: auto; padding-right: 4px; }

.ev-list .ev { display: grid; grid-template-columns: 24px 1fr auto; gap: 10px; padding: 10px 6px; border-top: 1px solid var(--line); align-items: start; }

.ev-list .ev-day { border-top: 0; }

.ev-filter { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin-top: 4px; }

.ev-filter select { height: 38px; border-radius: var(--r-md); border: 1px solid var(--line); background: var(--card); color: var(--text); padding: 0 10px; font: inherit; font-size: var(--fs-sm); }

dialog.evdlg { width: min(520px, 94vw); max-height: 90vh; overflow: auto; }

dialog.evdlg.wide { width: min(640px, 94vw); }

.ev-head { display: flex; align-items: center; gap: 12px; margin-bottom: 14px; --c: var(--unknown); }

.ev-head.ok { --c: var(--ok); }

 .ev-head.warn { --c: var(--warn); }

 .ev-head.crit { --c: var(--crit); }

.ev-head h3 { margin: 0; }

.ev-head .si { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; font-weight: 700; color: var(--c); background: color-mix(in srgb, var(--c) 16%, transparent); }

.ev-rows { display: grid; gap: 2px; }

.ev-row { display: grid; grid-template-columns: 130px 1fr; gap: 10px; padding: 8px 0; border-top: 1px solid var(--line); font-size: var(--fs-md); }

.ev-row:first-child { border-top: 0; }

.ev-k { color: var(--muted); }

 .ev-v { overflow-wrap: anywhere; }

.ev-sec { margin-top: 14px; }

.ev-sec h4 { margin: 0 0 6px; font-size: var(--fs-xs); font-weight: 650; text-transform: uppercase; letter-spacing: .07em; color: var(--muted); }

.ev-prob { padding: 8px 10px; border-radius: var(--r-sm); background: color-mix(in srgb, var(--warn) 10%, transparent); font-size: var(--fs-sm); margin-bottom: 6px; }

.ev-prob.crit { background: color-mix(in srgb, var(--crit) 11%, transparent); }

.ev-prob small { display: block; color: var(--muted); }

.ev-note { font-size: var(--fs-sm); color: var(--muted); padding: 3px 0; }

.ev-hist { display: grid; grid-template-columns: 22px 1fr auto; gap: 8px; align-items: center; width: 100%; padding: 7px 8px; border: 0; border-radius: var(--r-xs); background: none; color: var(--text); font: inherit; font-size: var(--fs-sm); text-align: left; cursor: pointer; }

.ev-hist:hover { background: var(--card-hi); }

.ev-hist time { color: var(--muted); font-size: var(--fs-xs); }

.ev-hist .si { width: 20px; height: 20px; border-radius: 50%; display: grid; place-items: center; font-size: var(--fs-xs); font-weight: 700; }

.ev-hist.ok .si { color: var(--ok-t); }

 .ev-hist.warn .si { color: var(--warn-t); }

 .ev-hist.crit .si { color: var(--crit-t); }

.ev-actions { margin-top: 16px; }

.ev-actions .grow { flex: 1; }

@media (max-width: 640px) {
   .ev-row { grid-template-columns: 1fr; gap: 0; }
   .ev-k { font-size: var(--fs-xs); }
   dialog.evdlg { width: calc(100vw - 16px); }
}

/* Tabellen als Karten (Smartphone) */
@media (max-width: 640px) {
    .table.wide.cards-m, .table.wide.cards-m tbody { display: block; overflow: visible; width: 100%; }
    .table.wide.cards-m tr:has(> th) { display: none; }
    .table.wide.cards-m tr { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 8px 14px; padding: 14px 0; border-top: 1px solid var(--line); }
    .table.wide.cards-m tr:first-child, .table.wide.cards-m tr:has(> th) + tr { border-top: 0; }
    .table.wide.cards-m td { display: block; padding: 0; border: 0; min-width: 0; overflow-wrap: anywhere; }
    .table.wide.cards-m td:first-child { grid-column: 1 / -1; font-size: var(--fs-base); }
    .table.wide.cards-m td[data-l]::before { content: attr(data-l); display: block; margin-bottom: 2px; font-size: var(--fs-xs); font-weight: 650; text-transform: uppercase; letter-spacing: .07em; color: var(--muted); }
    .table.wide.cards-m td.meta { grid-column: 1 / -1; }
    .table.wide.cards-m td.acts { grid-column: 1 / -1; display: flex; gap: 8px; text-align: left; }
    .table.wide.cards-m td.acts .btn { margin-left: 0; }
}

@media (max-width: 640px) {
    .codewrap { display: flex; flex-direction: column; gap: 8px; }
    .codewrap .copy-btn { position: static; order: -1; align-self: flex-start; }
    .codewrap pre.cmd { padding: 12px; white-space: pre; word-break: normal; overflow-x: auto; font-size: var(--fs-xs); max-height: 55vh; }
}

/* Termine neben dem Gesamtstatus */
.top-row { display: grid; gap: 22px; margin-bottom: 22px; align-items: stretch; }

.top-row.has-cal { grid-template-columns: minmax(0, 1fr) 330px; }

.top-row .hero { margin-bottom: 0; }

.cal-slot { position: relative; min-height: 210px; }

.cal-slot .calendar { position: absolute; inset: 0; overflow: auto; padding: 16px 18px; border-radius: var(--r-2xl); scrollbar-width: thin; }

.cal-slot .day { margin-top: 12px; }

.cal-slot .day h3 { margin-bottom: 6px; }

.cal-slot .event { margin-bottom: 5px; padding: 6px 10px; }

:root[data-density="compact"] .top-row { margin-bottom: 14px; gap: 14px; }

@media (max-width: 900px) {
    .top-row.has-cal { grid-template-columns: minmax(0, 1fr); gap: 14px; }
    .cal-slot { min-height: 0; }
    .cal-slot .calendar { position: static; max-height: 300px; border-radius: var(--r-xl); }
}

@media (max-width: 640px) {
   .top-row { margin-bottom: 12px; }
}

/* ---------- Ordner im Dashboard ---------- */
details.folder { margin: 6px 0 20px; }

details.folder.d1 { margin-left: 16px; }

 details.folder.d2 { margin-left: 32px; }

 details.folder.d3 { margin-left: 48px; }

.folder-head { list-style: none; display: flex; align-items: center; gap: 9px; padding: 4px 2px 10px; cursor: pointer; color: var(--muted); user-select: none; }

.folder-head::-webkit-details-marker { display: none; }

.folder-head .chev { display: inline-block; transition: transform .15s; }

details.folder[open] > .folder-head .chev { transform: rotate(90deg); }

.folder-head strong { color: var(--text); font-size: var(--fs-base); font-weight: 620; letter-spacing: -.01em; }

.folder-head .ic { width: 17px; height: 17px; color: var(--accent-t); }

.folder-n { font-size: var(--fs-xs); padding: 1px 8px; border-radius: var(--r-pill); background: var(--card); border: 1px solid var(--line); }

/* ---------- Systeme: Baum und Ordner (Einstellungen) ---------- */
.tree-toolbar { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin: 4px 0 14px; }

.tree-toolbar .search { flex: 1 1 220px; }

.tree { display: grid; gap: 10px; }

.folder-bar { display: flex; align-items: center; gap: 9px; flex-wrap: wrap; padding: 10px 12px; border-radius: var(--r-md); background: color-mix(in srgb, var(--accent) 8%, var(--card)); border: 1px solid var(--line); }

.folder-bar.root { background: none; border-style: dashed; color: var(--muted); }

.folder-bar .ic { width: 18px; height: 18px; color: var(--accent-t); }

.folder-bar .fold { width: 26px; height: 26px; border: 0; border-radius: var(--r-xs); background: none; color: var(--muted); cursor: pointer; font-size: var(--fs-base); }

.folder-bar .fold:hover { background: var(--card-hi); color: var(--text); }

.folder-block { display: grid; gap: 10px; }

.folder-inner { display: grid; gap: 10px; margin-left: 18px; padding-left: 14px; border-left: 2px solid var(--line); }

select.mini { height: 32px; max-width: 150px; border-radius: var(--r-xs); border: 1px solid var(--line); background: var(--card); color: var(--text); font: inherit; font-size: var(--fs-xs); padding: 0 8px; }

.guest-list { margin: 8px 0 0 14px; padding: 8px 0 2px 14px; border-left: 2px solid var(--line); display: grid; gap: 4px; }

.guest-bulk { margin-bottom: 4px; }

.guest-row { display: flex; align-items: center; gap: 10px; padding: 5px 8px; border-radius: var(--r-sm); }

.guest-row:hover { background: var(--card-hi); }

.guest-row.off .gname { color: var(--muted); }

.guest-row .gname { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.tree-row .row-head { flex-wrap: wrap; }

@media (max-width: 640px) {
   .folder-inner { margin-left: 8px; padding-left: 8px; }
   .guest-list { margin-left: 4px; padding-left: 8px; }
   select.mini { max-width: 100%; }
}

.tree-row .row-head h3 { flex: 1 1 110px; min-width: 90px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

select.mini { max-width: 125px; }

.folder-bar .sym { display: none; }

@media (max-width: 640px) {
   .folder-bar .lbl { display: none; }
   .folder-bar .sym { display: inline; }
   .folder-bar { gap: 6px; }
   .folder-bar strong { flex: 1 1 auto; min-width: 0; }
   .folder-bar .tag { display: none; }
   .folder-bar .spacer { display: none; }
}

.guests > summary.guests-head { margin-bottom: 4px; padding: 2px 0; }

.guests:not([open]) > summary.guests-head { margin-bottom: 0; }

.guests > summary.guests-head:hover { color: var(--text); }

/* ---------- Systeme als Explorer (Einstellungen) ---------- */
.explorer { display: grid; grid-template-columns: 250px minmax(0, 1fr); gap: 16px; align-items: start; }

.ex-tree { position: sticky; top: 16px; padding: 12px 10px; }

.ex-tree > summary { padding: 0 6px 8px; font-size: var(--fs-xs); font-weight: 650; text-transform: uppercase; letter-spacing: .08em; }

.tnodes { display: grid; gap: 2px; }

.tnode { display: flex; align-items: center; gap: 6px; padding: 7px 8px; border-radius: var(--r-sm); cursor: pointer; color: var(--text); font-size: var(--fs-md); user-select: none; }

.tnode:hover { background: var(--card-hi); }

.tnode.cur { background: color-mix(in srgb, var(--accent) 18%, transparent); }

.tnode .ic { width: 17px; height: 17px; color: var(--accent-t); flex: none; }

.tnode .tn { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.tnode .tc { font-size: var(--fs-xs); color: var(--muted); }

.tfold { width: 18px; height: 18px; border: 0; background: none; color: var(--muted); cursor: pointer; font-size: var(--fs-xs); padding: 0; flex: none; }

.ex-newf { margin: 10px 4px 0; }

.drop { outline: 2px dashed var(--accent); outline-offset: -2px; background: color-mix(in srgb, var(--accent) 12%, transparent); }

.dragging { opacity: .45; }

.ex-main { display: grid; gap: 10px; min-width: 0; }

.ex-bar { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; padding: 4px 2px; }

.ex-list { display: grid; gap: 8px; }

.ex-row { display: flex; align-items: center; gap: 10px; padding: 12px 14px; cursor: pointer; border-radius: var(--r-md); }

.ex-row:hover { background: var(--card-hi); }

.ex-row .ic { width: 19px; height: 19px; color: var(--accent-t); flex: none; }

.up-row { color: var(--muted); padding: 8px 14px; }

.pickbar { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; padding: 8px 12px; border-radius: var(--r-md); background: color-mix(in srgb, var(--accent) 14%, var(--card)); border: 1px solid color-mix(in srgb, var(--accent) 40%, var(--line)); }

.pickbar[hidden] { display: none; }

.tree-row.picked { border-color: color-mix(in srgb, var(--accent) 60%, var(--line)); }

.pick { width: 18px; height: 18px; accent-color: var(--accent); flex: none; }

.tree-row[draggable="true"] { cursor: grab; }

@media (max-width: 860px) {
   .explorer { grid-template-columns: minmax(0, 1fr); }
   .ex-tree { position: static; }
}

/* ---------- Datei-Explorer (Einstellungen → Systeme) ---------- */
.fico { fill: none; stroke: none; flex: none; }

.fico.small { width: 22px; height: 18px; }

 .fico.tico { width: 19px; height: 16px; }

 .fico.big { width: 76px; height: 62px; }

.ex-head { display: grid; gap: 8px; }

.ribbon { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; padding: 8px 10px; border-radius: var(--r-md); background: var(--card); border: 1px solid var(--line); }

.ribbon .rsep { width: 1px; height: 22px; background: var(--line); margin: 0 4px; }

.ribbon .btn[disabled], .ribbon select[disabled] { opacity: .4; pointer-events: none; }

.ribbon .search { flex: 0 1 200px; height: 34px; min-width: 130px; }

.exseg button span { font-size: var(--fs-xs); }

.ex-body { min-height: 260px; border-radius: var(--r-md); background: var(--card); border: 1px solid var(--line); overflow: hidden; }

.ex-line { display: grid; grid-template-columns: minmax(200px, 2.2fr) 112px minmax(110px, 1fr) 112px minmax(120px, 1.6fr); align-items: center; gap: 10px; padding: 8px 14px; border-top: 1px solid var(--line); font-size: var(--fs-md); cursor: default; user-select: none; }

.ex-line.hdr { border-top: 0; padding-top: 6px; padding-bottom: 6px; background: color-mix(in srgb, var(--text) 4%, transparent); }

.ex-line.hdr .hd { all: unset; cursor: pointer; font-size: var(--fs-xs); font-weight: 650; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); padding: 4px 0; display: inline-flex; gap: 5px; }

.ex-line.hdr .hd.static { cursor: default; }

.ex-line.hdr .hd:hover:not(.static), .ex-line.hdr .hd.on { color: var(--text); }

.ex-lines .ex-line:first-child { border-top: 0; }

.ex-line:not(.hdr):hover { background: var(--card-hi); }

.ex-line.picked, .ex-ico.picked { background: color-mix(in srgb, var(--accent) 22%, transparent) !important; box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--accent) 55%, transparent); }

.ex-line:focus-visible, .ex-ico:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }

.ex-line.off, .ex-ico.off { opacity: .55; }

.ex-line.up { color: var(--muted); }

.ncell { display: flex; align-items: center; gap: 9px; min-width: 0; }

.ncell .nm { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 560; }

.ncell .ic { width: 18px; height: 18px; color: var(--muted); }

.tico2 { display: inline-grid; place-items: center; }

.scell { display: inline-flex; align-items: center; gap: 7px; }

.ex-line .c { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--muted); }

.ex-line .c.info { font-size: var(--fs-xs); }

.ex-icons { display: grid; grid-template-columns: repeat(auto-fill, minmax(132px, 1fr)); gap: 6px; padding: 12px; }

.ex-ico { display: grid; justify-items: center; align-content: start; gap: 2px; padding: 10px 6px 8px; border-radius: var(--r-md); cursor: default; user-select: none; text-align: center; min-height: 150px; }

.ex-ico:hover { background: var(--card-hi); }

.ex-ico .pic { position: relative; width: 84px; height: 68px; display: grid; place-items: center; }

.ex-ico .tbig { width: 62px; height: 62px; border-radius: var(--r-lg); display: grid; place-items: center; background: color-mix(in srgb, var(--accent) 14%, transparent); border: 1px solid color-mix(in srgb, var(--accent) 30%, transparent); }

.ex-ico .tbig .ic { width: 30px; height: 30px; color: var(--accent-t); }

.ex-ico .pic .sdot { position: absolute; right: 6px; top: 2px; width: 13px; height: 13px; border: 2px solid var(--bg2); }

.ex-ico .badge { position: absolute; left: 0; right: 0; top: 24px; margin: auto; width: max-content; min-width: 24px; text-align: center; font-size: var(--fs-xs); font-weight: 700; }

.ex-ico .gbadge { position: absolute; bottom: -2px; font-size: var(--fs-xs); padding: 1px 7px; border-radius: var(--r-pill); background: var(--card-hi); border: 1px solid var(--line); color: var(--muted); white-space: nowrap; }

.ex-ico .cap { font-size: var(--fs-sm); font-weight: 560; overflow-wrap: anywhere; line-height: 1.25; max-width: 100%; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; margin-top: 4px; }

.ex-ico .sub { font-size: var(--fs-xs); color: var(--muted); }

.ex-ico.up { min-height: 0; padding: 8px; grid-auto-flow: column; grid-auto-columns: max-content; justify-content: start; gap: 8px; grid-column: 1 / -1; justify-items: start; color: var(--muted); }

.ex-ico.up .ic { width: 18px; height: 18px; }

.ex-ico.up .cap { margin: 0; }

.tnode .fico { width: 19px; height: 16px; }

@media (max-width: 860px) {
   .ex-line { grid-template-columns: minmax(0, 1fr) 96px; }
   .ex-line > :nth-child(3), .ex-line > :nth-child(4), .ex-line > :nth-child(5) { display: none; }
   .exseg button span { display: none; }
   .ribbon .rsep { display: none; }
}

/* Explorer als ein Fenster: Menüleiste oben, darunter Navigation und Inhalt */
.ex-window { padding: 0; overflow: hidden; }

.ex-window > .ex-head { padding: 12px 14px; border-bottom: 1px solid var(--line); }

.ex-window .ribbon { background: color-mix(in srgb, var(--text) 4%, transparent); border-color: var(--line); }

.ex-split { display: grid; grid-template-columns: 250px minmax(0, 1fr); min-height: 380px; }

.ex-split.nonav { grid-template-columns: 46px minmax(0, 1fr); }

.ex-window .ex-tree { position: static; border: 0; border-right: 1px solid var(--line); border-radius: 0; background: none; box-shadow: none; backdrop-filter: none; padding: 10px 8px; }

.ex-tree-h { display: flex; align-items: center; justify-content: space-between; padding: 2px 6px 8px; font-size: var(--fs-xs); font-weight: 650; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); }

.navtoggle { width: 26px; height: 26px; border: 0; border-radius: var(--r-xs); background: none; color: var(--muted); cursor: pointer; font-size: var(--fs-base); line-height: 1; }

.navtoggle:hover { background: var(--card-hi); color: var(--text); }

.navtoggle.open { border: 1px solid var(--line); background: var(--card); }

.ex-window .ex-body { border: 0; border-radius: 0; background: none; min-height: 320px; }

.ex-bar { display: flex; align-items: center; gap: 8px; }

@media (max-width: 860px) {
   .ex-split { grid-template-columns: minmax(0, 1fr); }
   .ex-window .ex-tree { border-right: 0; border-bottom: 1px solid var(--line); }
}

.ex-tree.rail { padding: 10px 0; }

.ex-tree.rail .ex-tree-h { justify-content: center; padding: 2px 0 8px; }

@media (max-width: 860px) {
   .ex-split.nonav { grid-template-columns: minmax(0, 1fr); }
   .ex-tree.rail { padding: 6px 10px; }
   .ex-tree.rail .ex-tree-h { justify-content: flex-start; padding: 0; }
}

/* Ordnerfarbe folgt der Akzentfarbe */
:root { --fold-f: color-mix(in srgb, var(--accent) 62%, #fff); --fold-b: color-mix(in srgb, var(--accent) 88%, #000); }

.ex-ico .badge { color: color-mix(in srgb, var(--accent) 28%, #000); }

.tnode.host .sdot { margin-left: 2px; }

/* Menüleiste in Gruppen (wie das Menüband im Datei-Explorer) */
.ex-window .ribbon { display: flex; flex-wrap: wrap; align-items: stretch; gap: 0; padding: 0; overflow: hidden; }

.rgroup { display: flex; flex-direction: column; justify-content: space-between; align-items: center; gap: 5px; padding: 8px 10px 5px; border-right: 1px solid var(--line); }

.rgroup:last-child { border-right: 0; }

.rbtns { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; justify-content: center; }

.rbtns .btn, .rbtns select.mini { height: 34px; min-height: 34px; }

.rlabel { font-size: var(--fs-xs); font-weight: 650; text-transform: uppercase; letter-spacing: .09em; color: var(--muted); }

.ribbon > .rgroup:has(.btn.danger) { margin-left: auto; border-right: 0; }

.ex-bar .search { flex: 0 1 230px; height: 36px; min-width: 150px; }

.ex-bar { flex-wrap: wrap; row-gap: 8px; }

@media (max-width: 860px) {
   .rgroup { border-right: 0; padding: 8px 10px 4px; }
   .rlabel { display: none; }
   .ex-bar .search { flex: 1 1 100%; order: 5; }
}

.rbtns select.mini { max-width: 118px; }

.rbtns .btn { padding-left: 11px; padding-right: 11px; }

/* Listenansicht: Gäste-Block mit Innenabstand wie die Tabelle darüber */
.group > .guests { margin: 0; padding: 12px 18px 14px; border-top: 1px solid var(--line); }

.group > .guests > summary.guests-head { padding: 2px 0 4px; }

.group > .guests[open] > summary.guests-head { margin-bottom: 6px; }

.group > .guests .guest { padding: 6px 4px; }

@media (max-width: 640px) {
   .group > .guests { padding: 10px 14px 12px; }
}

/* Menüleiste mit Symbolen: eine Reihe */
.ex-window .ribbon { display: flex; flex-wrap: nowrap; align-items: center; gap: 6px; padding: 8px 10px; overflow-x: auto; scrollbar-width: thin; }

.ibtn { flex: none; width: 38px; height: 36px; display: inline-grid; place-items: center; border-radius: var(--r-sm); border: 1px solid var(--line); background: var(--card); color: var(--text); cursor: pointer; transition: background .15s, border-color .15s; }

.ibtn .ic { width: 19px; height: 19px; }

.ibtn:hover:not([disabled]) { background: var(--card-hi); border-color: color-mix(in srgb, var(--accent) 45%, var(--line)); }

.ibtn[disabled] { opacity: .35; cursor: default; }

.ibtn.primary { background: linear-gradient(135deg, var(--grad-a), var(--grad-b)); border-color: transparent; color: var(--on-accent); }

.ibtn.primary:hover:not([disabled]) { filter: brightness(1.08); background: linear-gradient(135deg, var(--accent), var(--accent2)); }

.ibtn.danger:not([disabled]) { color: var(--crit-t); }

.ibtn.danger:hover:not([disabled]) { background: color-mix(in srgb, var(--crit) 14%, transparent); border-color: color-mix(in srgb, var(--crit) 50%, var(--line)); }

.ibtn.on { background: color-mix(in srgb, var(--accent) 22%, transparent); border-color: var(--accent); }

.ex-window .ribbon .rsep { flex: none; width: 1px; height: 24px; background: var(--line); margin: 0 4px; }

.selcount { flex: none; display: inline-flex; align-items: center; gap: 4px; padding: 3px 4px 3px 12px; border-radius: var(--r-pill); font-size: var(--fs-xs); font-weight: 600; background: color-mix(in srgb, var(--accent) 18%, transparent); border: 1px solid color-mix(in srgb, var(--accent) 45%, var(--line)); white-space: nowrap; }

.selclear { width: 24px; height: 24px; display: grid; place-items: center; border: 0; border-radius: 50%; background: none; color: var(--muted); cursor: pointer; }

.selclear:hover { background: var(--card-hi); color: var(--text); }

.selclear .ic { width: 14px; height: 14px; }

.chk { width: 17px; height: 17px; accent-color: var(--accent); flex: none; cursor: pointer; }

.ex-ico { position: relative; }

.ex-ico .chk { position: absolute; left: 8px; top: 8px; opacity: 0; transition: opacity .12s; }

.ex-ico:hover .chk, .ex-ico.picked .chk, .ex-ico .chk:checked, .ex-icons:has(.chk:checked) .chk { opacity: 1; }

.ex-line .ncell .chk { margin-right: 2px; }

.movelist { display: grid; gap: 4px; max-height: 55vh; overflow: auto; }

.movetarget { display: flex; align-items: center; gap: 10px; width: 100%; padding: 10px 12px; border: 0; border-radius: var(--r-sm); background: none; color: var(--text); font: inherit; text-align: left; cursor: pointer; }

.movetarget:hover { background: var(--card-hi); }

.movetarget .ic { width: 18px; height: 18px; color: var(--accent-t); }

@media (max-width: 860px) {
   .ibtn { width: 40px; height: 40px; }
}

@media (hover: none) {
   .ex-ico .chk { opacity: 1; }
}

.ex-line, .ex-ico { cursor: pointer; }

.tnode.guest { opacity: .9; }

.tnode.guest .tico2 { width: 16px; height: 16px; display: grid; place-items: center; color: var(--muted); }

.tnode.guest .tico2 .ic { width: 15px; height: 15px; }

.tnodes { grid-template-columns: minmax(0, 1fr); }

.tnode { min-width: 0; }

.tnode .tc { flex: none; min-width: 18px; text-align: right; }

.tnode .sdot { flex: none; }

.tnode .tico2, .tnode .fico { flex: none; }

.ex-tree:not(.rail) .tnodes { max-height: 65vh; overflow-y: auto; overflow-x: hidden; scrollbar-width: thin; }

.ex-split > * { min-width: 0; }

/* Verlaufsstreifen, „Jetzt zu tun“ */
.status-row { flex-wrap: wrap; }

.sr-hist { flex: 0 0 100%; margin: 4px 0 0; height: 10px; }

.hist { display: flex; gap: 2px; height: 14px; margin: 8px 0 4px; }

.hist i { flex: 1; border-radius: calc(var(--r-xs) / 2); background: var(--line); }

.hist .h-ok { background: color-mix(in srgb, var(--ok) 70%, transparent); }

.hist .h-warn { background: var(--warn); }

.hist .h-crit { background: var(--crit); }

.hist.big { height: 28px; gap: 3px; margin-top: 14px; }

.hist-axis { display: flex; justify-content: space-between; font-size: var(--fs-xs); color: var(--muted); }

.hist-card { margin-bottom: 14px; }

.todo { margin-bottom: 14px; padding-bottom: 8px; }

.todo-row { display: flex; align-items: center; gap: 12px; padding: 9px 4px; border-top: 1px solid var(--line); color: var(--text); text-decoration: none; }

.todo-row:hover { background: var(--card-hi); border-radius: var(--r-sm); }

.todo-main { flex: 1; min-width: 0; display: grid; }

.todo-main small { color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.todo-row time { color: var(--muted); font-size: var(--fs-xs); white-space: nowrap; }

.chip-s { font-size: var(--fs-xs); padding: 2px 8px; border-radius: var(--r-pill); background: color-mix(in srgb, var(--crit) 16%, transparent); color: var(--crit-t); white-space: nowrap; }

.pal-t { font-weight: 600; } a.pal-item { color: inherit; text-decoration: none; }

.pal-ic { width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; font-size: var(--fs-xs); background: var(--line); flex: none; }

.pal-ic.ok { background: color-mix(in srgb, var(--ok) 25%, transparent); color: var(--ok-t); }

.pal-ic.warn { background: color-mix(in srgb, var(--warn) 25%, transparent); color: var(--warn-t); }

.pal-ic.crit { background: color-mix(in srgb, var(--crit) 25%, transparent); color: var(--crit-t); }

/* Netzwerk durchsuchen */
.scan-bar { display: flex; gap: 8px; margin-bottom: 8px; }

.scan-bar input { flex: 1; min-width: 0; }

.scan-out { display: grid; gap: 4px; max-height: 46vh; overflow: auto; margin-top: 6px; }

.scan-row { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: var(--r-sm); cursor: pointer; }

.scan-row:hover { background: var(--card-hi); }

.scan-row.done { opacity: .5; cursor: default; }

.scan-main { display: grid; min-width: 0; }

.scan-main small, .scan-ports { color: var(--muted); font-size: var(--fs-xs); }

.scan-ports { margin-left: auto; text-align: right; }

@media (max-width: 640px) {
   .scan-row { flex-wrap: wrap; }
   .scan-ports { margin-left: 28px; text-align: left; flex: 0 0 100%; }
}

.scan-row.merge { background: color-mix(in srgb, var(--accent) 9%, transparent); }

.scan-tag { color: var(--accent-t); }

/* System erweitern */
.ext-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 10px; margin: 10px 0; }

.ext-card { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border: 1px solid var(--line); border-radius: var(--r-md); background: var(--card); }

.ext-card > div { flex: 1; min-width: 0; display: grid; }

.ext-card small { color: var(--muted); }

.ext-card > .ic { width: 22px; height: 22px; color: var(--accent-t); flex: none; }

.ext-row { display: flex; align-items: center; gap: 10px; padding: 8px 4px; border-top: 1px solid var(--line); }

.ext-row small { color: var(--muted); min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.scan-head { display: flex; align-items: center; gap: 10px; padding: 10px 6px 4px; border-top: 1px solid var(--line); margin-top: 6px; flex-wrap: wrap; }

.scan-head:first-child { border-top: 0; margin-top: 0; }

.scan-head small { color: var(--muted); }

/* ===== Überarbeitung nach UI-Prüfung ===== */

.subtabs { max-width: 100%; overflow-x: auto; scrollbar-width: thin; } /* glaze-ok: orb-Einstellungen */

/* A3: geöffnetes Kachel-Menü liegt über den Nachbarn */
.pill:has(.menu:not([hidden])), .guest:has(.menu:not([hidden])) { position: relative; z-index: var(--z-menu); }

/* A14: Wertespalten brechen nicht mitten im Wort */
.grid-table .c-val { min-width: 7em; overflow-wrap: break-word; word-break: normal; }

.grid-table .c-hint { min-width: 10em; }

.detail-values td { overflow-wrap: break-word; word-break: normal; }

/* A15: Explorer bei mittlerer Breite ohne Typ-Spalte */
@media (max-width: 1180px) {
    .ex-line { grid-template-columns: minmax(180px, 2.4fr) 112px minmax(110px, 1fr) minmax(120px, 1.6fr); }
    .ex-line > :nth-child(3) { display: none !important; }
    .ex-body { overflow-x: auto; }
    .ex-lines, .ex-line { min-width: 560px; }
}

@media (max-width: 640px) {
    /* A17: Tippflächen mobil mindestens 40 px */
    .back, .pal-btn, .btn.sm, .icon-btn, .seg button, .seg-a { min-height: 40px; } /* glaze-ok: orb-Variante (Dashboard, Tippflächen) */
    .back { padding: 8px 4px; } /* glaze-ok: orb-Variante (Dashboard, Tippflächen) */
    .guests-head, .gname { min-height: 40px; }
    .gname { display: inline-flex; align-items: center; }
    .ex-body .chk, .scan-row .chk { width: 22px; height: 22px; }
}

@media (max-width: 640px) {
    .chip { min-height: 40px; } /* glaze-ok: orb-Variante (Dashboard, Tippflächen) */
    .tile-menu, .guest .tile-menu { width: 40px; height: 40px; }
    .navtoggle, .ex-line.hdr .hd { min-height: 36px; min-width: 36px; }
    .tile h2 a, .pill strong a, .group-head h2 a { display: inline-block; padding: 10px 0; }
}

/* ===== B1–B4 ===== */
/* Termine: einklappbar, ohne eigenen Scrollbereich */
.cal-slot .calendar { position: static; overflow: visible; max-height: none; }

.cal-slot { min-height: 0; }

.calendar > summary.cal-head { cursor: pointer; list-style: none; }

.calendar > summary.cal-head::-webkit-details-marker { display: none; }

.calendar > summary.cal-head::before { content: none; }

.cal-next { margin-left: auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--muted); font-size: var(--fs-sm); }

.calendar[open] .cal-next { display: none; }

.calendar > summary.cal-head::after { content: "›"; margin-left: 4px; color: var(--muted); transition: transform .15s; }

.calendar[open] > summary.cal-head::after { transform: rotate(90deg); margin-left: auto; }

@media (min-width: 961px) {
   .cal-slot { position: relative; min-height: 210px; }
   .cal-slot .calendar { position: absolute; inset: 0; overflow: auto; }
}

.top-row + .todo, #top > .todo { margin-bottom: 18px; }

/* Statuszähler als Filter */

.filter-note { display: flex; align-items: center; gap: 12px; justify-content: space-between; margin-bottom: 12px; padding: 8px 14px; border-radius: var(--r-md); background: color-mix(in srgb, var(--accent) 12%, transparent); border: 1px solid color-mix(in srgb, var(--accent) 35%, var(--line)); font-size: var(--fs-md); }

/* Ereigniszeilen */
.ev-main { min-width: 0; display: grid; gap: 3px; }

.ev-top { display: flex; align-items: baseline; gap: 8px; justify-content: space-between; }

.ev-top strong { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.ev-flow { display: flex; align-items: center; gap: 6px; }

.evs { font-size: var(--fs-xs); font-weight: 650; padding: 1px 8px; border-radius: var(--r-pill); background: color-mix(in srgb, var(--c, var(--unknown)) 10%, transparent); color: var(--c, var(--muted)); white-space: nowrap; }

.evs.ok { --c: var(--ok-t); }

 .evs.warn { --c: var(--warn-t); }

 .evs.crit { --c: var(--crit-t); }

 .evs.unknown { --c: var(--muted); }

.timeline .ev, .ev-list .ev { grid-template-columns: 28px minmax(0, 1fr); } /* glaze-ok: orb-Dashboard */

/* Detailseite: Aktionen */
.hero-actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin: -8px 0 16px; }

.hero-actions .btn { text-decoration: none; }

.dd { position: relative; margin-top: 0; }   /* steht in einer Knopfreihe: kein Abstand wie bei aufklappbaren Abschnitten */

.dd > summary { list-style: none; cursor: pointer; }

.dd > summary::-webkit-details-marker { display: none; }

.dd > summary::before { content: none; }

.dd > summary::after { content: " ▾"; color: var(--muted); }

.dd-list { position: absolute; z-index: var(--z-nav); top: calc(100% + 6px); left: 0; min-width: 190px; display: grid; padding: 6px; border-radius: var(--r-md); border: 1px solid var(--line); background: color-mix(in srgb, var(--bg) 90%, var(--text)); box-shadow: var(--shadow); }

.dd-list button { text-align: left; padding: 9px 12px; border: 0; border-radius: var(--r-xs); background: none; color: var(--text); font: inherit; cursor: pointer; }

.dd-list button:hover { background: color-mix(in srgb, var(--accent) 14%, transparent); }

.dd-list button.end { color: var(--ok-t); }

/* ===== B10: Prüfung vor dem Speichern ===== */

input.invalid, select.invalid, .pair.invalid input { border-color: var(--crit) !important; box-shadow: 0 0 0 3px color-mix(in srgb, var(--crit) 20%, transparent); }

.err-msg { display: block; color: var(--crit-t); font-size: var(--fs-xs); font-weight: 600; }

.th-row.invalid { background: color-mix(in srgb, var(--crit) 7%, transparent); border-radius: var(--r-sm); }

.th-row.invalid .th-in input { border-color: var(--crit); }

/* ===== B11: Explorer auf kleinen Bildschirmen ===== */
.ribbon-legend { display: flex; flex-wrap: wrap; gap: 6px 16px; padding: 10px 14px; border-top: 1px solid var(--line); font-size: var(--fs-xs); color: var(--muted); }

.ribbon-legend span { display: inline-flex; align-items: center; gap: 6px; }

.ribbon-legend .ic { width: 16px; height: 16px; color: var(--accent-t); }

.selbar { display: none; }

@media (max-width: 1180px) {
    .ex-window .ribbon { padding-right: 40px; scrollbar-width: none; -webkit-mask-image: linear-gradient(to right, #000 calc(100% - 44px), transparent); mask-image: linear-gradient(to right, #000 calc(100% - 44px), transparent); }
    .ex-window .ribbon::-webkit-scrollbar { display: none; }
}

@media (max-width: 860px) {
    .ex-window .ribbon { padding-right: 40px; -webkit-mask-image: linear-gradient(to right, #000 calc(100% - 44px), transparent); mask-image: linear-gradient(to right, #000 calc(100% - 44px), transparent); }
    .selbar { position: fixed; z-index: var(--z-nav); left: 8px; right: 8px; bottom: calc(8px + env(safe-area-inset-bottom)); display: flex; align-items: stretch; gap: 4px; padding: 6px; border-radius: var(--r-xl);
      background: color-mix(in srgb, var(--bg) 88%, var(--text)); border: 1px solid var(--line); box-shadow: var(--shadow); }
    body:has(#savebar.show) .selbar { bottom: calc(86px + env(safe-area-inset-bottom)); }
    .selbar .sb-n { display: grid; place-items: center; min-width: 40px; font-weight: 700; color: var(--accent-t); }
    .sb-act { flex: 1; min-width: 0; display: grid; justify-items: center; gap: 2px; padding: 6px 2px; border: 0; border-radius: var(--r-md); background: none; color: var(--text); font: inherit; font-size: var(--fs-xs); cursor: pointer; min-height: 48px; }
    .sb-act:active { background: color-mix(in srgb, var(--accent) 18%, transparent); }
    .sb-act .ic { width: 20px; height: 20px; }
    .sb-act.danger { color: var(--crit-t); }
    .ex-window { margin-bottom: 84px; }
}

/* ===== B13–B15, B19 ===== */

/* Werkzeugleiste des Dashboards bleibt bei mittlerer Breite in einer Zeile */
@media (min-width: 641px) and (max-width: 1180px) {
    .toolbar { flex-wrap: nowrap; } /* glaze-ok: orb-Dashboard */
    .toolbar .search { flex: 1 1 140px; min-width: 120px; } /* glaze-ok: orb-Dashboard */
    #edit-btn span { display: none; }
    .toolbar .tgl, .toolbar .seg { flex: none; } /* glaze-ok: orb-Dashboard */
}

/* Verlaufsstreifen: gesunde Abschnitte treten zurück, Probleme fallen auf */
.hist i.h-ok { opacity: .55; align-self: flex-end; height: 62%; }

.hist.big i.h-ok { opacity: .7; height: 70%; }

.hist:not(:has(.h-warn, .h-crit)) i.h-ok { opacity: .32; height: 46%; }

.hist.big:not(:has(.h-warn, .h-crit)) i.h-ok { opacity: .5; height: 56%; }

.hist i.h-warn, .hist i.h-crit { height: 100%; }

.sr-axis { flex: 0 0 100%; margin-top: 2px; }

/* Speicherleiste verdeckt die letzten Felder nicht */
body:has(#savebar.show) .panel { padding-bottom: 110px; }

/* ===== B17: Kiosk-Modus ===== */
.kiosk-exit { display: none; }

html[data-kiosk] body.dash { cursor: default; }

html[data-kiosk] body.dash.idle { cursor: none; }

html[data-kiosk] { font-size: 120%; }

html[data-kiosk] body.dash #toolbar, html[data-kiosk] body.dash .cal-slot, html[data-kiosk] body.dash .side-col,
html[data-kiosk] body.dash .top .icon-btn, html[data-kiosk] body.dash .top .pal-btn, html[data-kiosk] body.dash .filter-note { display: none !important; }

html[data-kiosk] body.dash .top-row.has-cal { grid-template-columns: minmax(0, 1fr); }

html[data-kiosk] body.dash .layout { grid-template-columns: minmax(0, 1fr); }

html[data-kiosk] body.dash .kiosk-exit { display: inline-flex; opacity: .35; }

html[data-kiosk] body.dash .kiosk-exit:hover, html[data-kiosk] body.dash .kiosk-exit:focus-visible { opacity: 1; }

html[data-kiosk] body.dash .hero h1 { font-size: var(--fs-2xl); }

html[data-kiosk] body.dash main { max-width: none; padding-left: 28px; padding-right: 28px; }

html[data-kiosk] body.dash .tiles { grid-template-columns: repeat(auto-fill, minmax(min(100%, 24rem), 1fr)); }

html[data-kiosk] body.dash .tile .tile-top { flex-wrap: wrap; }

/* ===== Anbindung an die Glaze-Shell ===== */
.nav-desk { }
@media (max-width: 760px) { .top-menu .nav-desk { display: none; } } /* glaze-ok: orb-Einstellungen */
body:has(#selbar) .toasts { bottom: calc(96px + env(safe-area-inset-bottom)); }
.top .kiosk-exit { display: none; } /* glaze-ok: orb-Dashboard */
html[data-kiosk] body.dash .top .kiosk-exit { display: inline-flex; opacity: .35; }
html[data-kiosk] body.dash .top .kiosk-exit:hover, html[data-kiosk] body.dash .top .kiosk-exit:focus-visible { opacity: 1; }
html[data-kiosk] body.dash .top .top-menu { display: none; }
/* Mindestgröße 12 px (Glaze nutzt hier .72rem; Anhebung in Glaze vorgeschlagen) */
.clock-d, .badge { font-size: var(--fs-xs); } /* glaze-ok: orb-Schriftgrößen und Scrollbereiche */
/* Eigene Scrollbereiche: Höhenbegrenzung und kein Durchrutschen in die Seite (Glaze, Abschnitt „Scrollen“) */
.pal-list, .ex-body, .dd-list, .movelist, .scan-out, .hist-list, .ex-tree .tnodes, .table.wide { overscroll-behavior: contain; } /* glaze-ok: orb-Schriftgrößen und Scrollbereiche */
.table.wide, .grid-table.wide { max-width: 100%; }

/* Reiterleiste: das 1px überlappende Unterstrich-Element löste einen senkrechten Scrollbalken aus */
.subtabs { overflow-y: hidden; padding-bottom: 1px; } /* glaze-ok: orb-Einstellungen */

/* ===== glaze 0.3: Seitenbreiten und kleine Hilfsklassen statt Inline-Styles ===== */
main.w-narrow { max-width: 560px; margin-inline: auto; }
main.w-medium { max-width: 720px; margin-inline: auto; }
main.w-wide { max-width: 980px; margin-inline: auto; }

.wiz-card h3 { margin-top: var(--sp-3); } /* glaze-ok: orb-Dashboard */
.wiz-card .list .li { cursor: pointer; } /* glaze-ok: orb-Dashboard */
.wiz-card .list .li input { flex: none; width: 18px; height: 18px; accent-color: var(--accent); } /* glaze-ok: orb-Dashboard */
.ack-card { text-align: center; padding: var(--sp-9) var(--sp-8); }
.ack-card .si { margin: 0 auto var(--sp-4); }
.ack-card h2 { margin: 0; }
.ackdlg .hint { margin: 0 0 var(--sp-5); }
.sec-title.sec-gap { margin-top: var(--sp-7); } /* glaze-ok: orb-Einstellungen */
.empty-steps { text-align: left; margin: var(--sp-5) auto var(--sp-7); padding-left: var(--sp-8); max-width: 520px; display: grid; gap: var(--sp-3); line-height: 1.5; }

/* Noch nie aktualisiert: Punkt grau und ohne Puls (GLAZE.md 11) */
.live.never .live-dot { background: var(--unknown); animation: none; }
