/* trainedup. Backend – ein Stylesheet für LMS, Mandanten-Admin, Login und Lernportal.
   Farben: Markengrau #292929, Markengrün #81FE58 nur als „hier bin ich“-Marker und Fokus,
   Statusfarben getrennt davon (Ampel). Mandantenfarbe überschreibt --color-primary inline. */
@font-face { font-family: "Inter"; src: url("/assets/fonts/inter-latin-wght-normal.woff2") format("woff2"); font-weight: 100 900; font-display: swap; }
@font-face { font-family: "Manrope"; src: url("/assets/fonts/manrope-latin-wght-normal.woff2") format("woff2"); font-weight: 200 800; font-display: swap; }
:root {
  --ink: #292929;
  --ink-2: #3a3a3a;
  --signal: #81FE58;
  --color-primary: #292929;
  --color-primary-contrast: #ffffff;
  --color-ok: #2e7d32;
  --color-warn: #b7791f;
  --color-danger: #c0392b;
  --color-info: #2b6cb0;
  --color-muted: #8c938b;
  --color-bg: #f3f5f4;
  --color-surface: #ffffff;
  --color-surface-2: #f7f8f7;
  --color-text: #292929;
  --color-text-soft: #5e655d;
  --color-border: #dde1dc;
  --color-border-strong: #c5cbc4;
  --radius: 6px;
  --radius-lg: 10px;
  --space-1: 4px; --space-2: 8px; --space-3: 12px; --space-4: 16px; --space-5: 24px; --space-6: 32px;
  --font: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  --font-head: "Manrope", "Inter", system-ui, sans-serif;
  --shadow: 0 1px 2px rgba(41, 41, 41, .06);
  --focus: 0 0 0 3px rgba(129, 254, 88, .55);
}
* { box-sizing: border-box; }
html { font-size: 16px; -webkit-text-size-adjust: 100%; }
body { margin: 0; font-family: var(--font); font-size: .94rem; color: var(--color-text); background: var(--color-bg); line-height: 1.5; font-feature-settings: "cv11", "ss01"; }
a { color: var(--color-text); text-decoration-color: var(--color-border-strong); text-underline-offset: 2px; }
a:hover { text-decoration-color: currentColor; }
h1, h2, h3 { font-family: var(--font-head); line-height: 1.2; margin: 0 0 var(--space-3); color: var(--ink); letter-spacing: -.01em; }
h1 { font-size: 1.6rem; font-weight: 700; } h2 { font-size: 1.12rem; font-weight: 700; } h3 { font-size: 1rem; font-weight: 700; }
h1 small, h2 small { font-family: var(--font); font-weight: 500; color: var(--color-text-soft); font-size: .62em; }
p { margin: 0 0 var(--space-3); }
small, .muted { color: var(--color-text-soft); }
code { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: .86em; background: var(--color-surface-2); border: 1px solid var(--color-border); padding: 0 4px; border-radius: 4px; }
hr { border: 0; border-top: 1px solid var(--color-border); margin: var(--space-5) 0; }
:focus-visible { outline: none; box-shadow: var(--focus); border-radius: 4px; }
@media (prefers-reduced-motion: reduce) { * { transition: none !important; animation: none !important; } }

/* layout: admin */
.app { display: flex; min-height: 100vh; }
.sidebar { width: 264px; flex: 0 0 264px; background: var(--ink); color: #e6e8e5; display: flex; flex-direction: column; position: sticky; top: 0; height: 100vh; }
.sidebar .brand { padding: 20px 20px 14px; display: flex; align-items: center; justify-content: space-between; gap: var(--space-2); }
.sidebar .brand .logo { display: block; line-height: 0; }
.sidebar .brand .logo img { height: 26px; width: auto; max-width: 170px; }
.sidebar .brand .logo span { font-family: var(--font-head); font-weight: 800; font-size: 1.15rem; color: #fff; line-height: 1.2; }
.sidebar .area { margin: 0 20px 6px; padding: 8px 10px; border-radius: var(--radius); background: rgba(255,255,255,.06); font-size: .8rem; color: #b9beb8; line-height: 1.3; }
.sidebar .area strong { display: block; color: #fff; font-weight: 600; font-size: .86rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sidebar nav { padding: 6px 12px 16px; flex: 1; overflow-y: auto; scrollbar-width: thin; scrollbar-color: #555 transparent; }
.sidebar nav .group { padding: 12px 10px 6px; font-size: .76rem; font-weight: 600; color: #8f958e; letter-spacing: .01em; }
.sidebar nav a { position: relative; display: flex; align-items: center; gap: 11px; padding: 7px 10px; margin: 1px 0; color: #d4d7d3; text-decoration: none; border-radius: var(--radius); font-size: .9rem; }
.sidebar nav a svg { width: 18px; height: 18px; flex: 0 0 18px; stroke: currentColor; fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; opacity: .8; }
.sidebar nav a:hover { background: rgba(255,255,255,.07); color: #fff; }
.sidebar nav a.active { background: rgba(255,255,255,.1); color: #fff; font-weight: 600; }
.sidebar nav a.active::before { content: ""; position: absolute; left: -12px; top: 7px; bottom: 7px; width: 3px; border-radius: 0 3px 3px 0; background: var(--signal); }
.sidebar nav a.active svg { opacity: 1; }
.sidebar nav a .count { margin-left: auto; min-width: 20px; padding: 0 6px; border-radius: 999px; background: var(--signal); color: var(--ink); font-size: .74rem; font-weight: 700; text-align: center; line-height: 20px; }
.sidebar nav a .ext { margin-left: auto; width: 14px; height: 14px; flex-basis: 14px; opacity: .55; }
.sidebar .user { display: flex; align-items: center; gap: 8px; padding: 14px 14px 14px 18px; border-top: 1px solid rgba(255,255,255,.08); font-size: .85rem; }
.sidebar .user .avatar { width: 34px; height: 34px; flex: 0 0 34px; border-radius: 50%; background: #444; color: #fff; display: grid; place-items: center; font-weight: 700; font-size: .8rem; }
.sidebar .user .who { flex: 1; min-width: 0; line-height: 1.3; }
.sidebar .user .who strong { display: block; color: #fff; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sidebar .user .who span { color: #a3a8a2; font-size: .78rem; }
.sidebar .user .icon-btn { width: 30px; height: 30px; flex: 0 0 30px; display: grid; place-items: center; border-radius: var(--radius); color: #c8ccc7; }
.sidebar .user .icon-btn:hover { background: rgba(255,255,255,.08); color: #fff; }
.sidebar .user .icon-btn svg { width: 18px; height: 18px; stroke: currentColor; fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.topbar { display: none; }
/* volle Breite: Listen nutzen den Platz, Formulare begrenzt .form selbst */
.content { padding: 28px 32px 48px; width: 100%; }
.page-head { display: flex; flex-wrap: wrap; gap: var(--space-3); align-items: center; justify-content: space-between; margin-bottom: var(--space-5); }
/* Titel immer so hoch wie ein Button (.btn min-height 36px): gleiche Fluchtlinie mit und ohne Aktionen, auch umbrochen */
.page-head h1 { margin: 0; padding-block: calc((36px - 1.2em) / 2); }
.actions { display: flex; flex-wrap: wrap; gap: var(--space-2); align-items: center; }
/* Umschalter zwischen zusammengehörigen Seiten (partials/view_switch.php) */
.view-switch { display: inline-flex; flex-wrap: wrap; gap: 4px; padding: 4px; margin-bottom: var(--space-5); max-width: 100%; background: var(--color-surface); border: 1px solid var(--color-border); border-radius: var(--radius-lg); }
.page-head + .view-switch { margin-top: calc(-1 * var(--space-2)); }
.view-switch a { display: inline-flex; align-items: center; gap: 8px; padding: 6px 14px; border-radius: var(--radius); color: var(--color-text-soft); text-decoration: none; font-weight: 600; font-size: .9rem; }
.view-switch a:hover { color: var(--ink); background: var(--color-surface-2); }
.view-switch a[aria-current="page"] { background: var(--ink); color: #fff; }
.view-switch .count { min-width: 20px; padding: 0 6px; border-radius: 999px; background: var(--color-surface-2); border: 1px solid var(--color-border); color: var(--ink); font-size: .74rem; font-weight: 700; text-align: center; line-height: 18px; }
.context-banner { background: #fff7e0; color: #5f4500; padding: 10px 32px; border-bottom: 1px solid #ecd9a4; display: flex; justify-content: space-between; align-items: center; gap: var(--space-3); flex-wrap: wrap; font-size: .9rem; }

/* panels & tiles */
.card { background: var(--color-surface); border: 1px solid var(--color-border); border-radius: var(--radius-lg); padding: 20px; margin-bottom: var(--space-4); }
.card > h2:first-child, .card > h3:first-child { margin-top: 0; }
.card h2 { margin-bottom: var(--space-3); }
.card > .table-wrap { margin: 0 -20px -20px; border: 0; border-top: 1px solid var(--color-border); border-radius: 0 0 var(--radius-lg) var(--radius-lg); }
/* Tabelle mitten in der Karte (Hinweis oder Aktionen darunter): unten abschließen statt überlappen */
.card > .table-wrap:not(:last-child) { margin-bottom: var(--space-4); border-bottom: 1px solid var(--color-border); border-radius: 0; }
.card > h2 + .table-wrap { margin-top: var(--space-2); }
.tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 0; margin-bottom: var(--space-5); background: var(--color-surface); border: 1px solid var(--color-border); border-radius: var(--radius-lg); overflow: hidden; }
.tile { position: relative; display: block; padding: 16px 20px 16px 22px; text-decoration: none; color: inherit; border-right: 1px solid var(--color-border); }
.tile:last-child { border-right: 0; }
.tile .label { line-height: 1.3; }
a.tile:hover { background: var(--color-surface-2); }
.tile .num { font-family: var(--font-head); font-size: 1.9rem; font-weight: 700; line-height: 1.1; font-variant-numeric: tabular-nums; color: var(--ink); }
.tile .label { display: flex; align-items: center; gap: 6px; font-size: .84rem; color: var(--color-text-soft); margin-top: 2px; }
.tile.ok .label::before, .tile.warn .label::before, .tile.danger .label::before, .tile.info .label::before { content: ""; width: 8px; height: 8px; border-radius: 50%; flex: 0 0 8px; }
.tile.ok .label::before { background: var(--color-ok); } .tile.warn .label::before { background: var(--color-warn); } .tile.danger .label::before { background: var(--color-danger); } .tile.info .label::before { background: var(--color-info); }
.grid-2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(340px, 1fr)); gap: var(--space-4); }
.grid-2 > .card { margin-bottom: 0; }

/* buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 36px; padding: 7px 14px; border-radius: var(--radius); border: 1px solid var(--color-border-strong); background: var(--color-surface); color: var(--ink); font: inherit; font-size: .9rem; font-weight: 600; cursor: pointer; text-decoration: none; line-height: 1.2; white-space: nowrap; transition: background .12s, border-color .12s; }
.btn:hover { background: var(--color-surface-2); border-color: var(--color-muted); }
.btn.primary { background: var(--color-primary); border-color: var(--color-primary); color: var(--color-primary-contrast); }
.btn.primary:hover { filter: brightness(1.15); }
.btn.danger { color: var(--color-danger); border-color: #e7b9b3; }
.btn.danger:hover { background: #fcf0ee; border-color: var(--color-danger); }
.btn.small { min-height: 30px; padding: 4px 10px; font-size: .84rem; font-weight: 500; }
.btn.link { border: 0; background: none; color: var(--ink); padding: 0; min-height: 0; font-weight: 500; text-decoration: underline; text-decoration-color: var(--color-border-strong); }
.btn[disabled], .btn.disabled { opacity: .45; cursor: not-allowed; pointer-events: none; }
.btn-block { width: 100%; }

/* forms */
.form { max-width: 780px; }
.field { margin-bottom: 18px; }
.field label { display: block; font-weight: 600; font-size: .88rem; margin-bottom: 6px; }
.field .hint { font-size: .82rem; color: var(--color-text-soft); margin-top: 5px; line-height: 1.4; }
.field .error { color: var(--color-danger); font-size: .85rem; margin-top: 5px; font-weight: 500; }
.field.has-error input, .field.has-error select, .field.has-error textarea { border-color: var(--color-danger); background: #fffafa; }
input:not([type]), input[type=text], input[type=email], input[type=password], input[type=number], input[type=date], input[type=search], input[type=tel], input[type=url], input[type=file], input[type=color], select, textarea {
  width: 100%; min-height: 38px; padding: 8px 11px; border: 1px solid var(--color-border-strong); border-radius: var(--radius); font: inherit; font-size: .92rem; background: #fff; color: var(--color-text);
}
input[type=file] { padding: 6px; }
input[type=color] { padding: 3px; width: 64px; }
textarea { min-height: 100px; resize: vertical; line-height: 1.5; }
input::placeholder, textarea::placeholder { color: #9aa098; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--ink); box-shadow: var(--focus); }
.check { display: flex; align-items: flex-start; gap: 9px; font-weight: 500; margin-bottom: 6px; }
.check input { width: 18px; height: 18px; margin-top: 2px; flex: 0 0 auto; accent-color: var(--ink); }
.form-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: var(--space-4); }
fieldset { border: 0; border-top: 1px solid var(--color-border); margin: 24px 0 8px; padding: 18px 0 0; min-width: 0; }
fieldset legend { padding: 0 10px 0 0; font-family: var(--font-head); font-weight: 700; font-size: 1rem; color: var(--ink); }
fieldset.card { background: none; border-radius: 0; box-shadow: none !important; border: 0 !important; border-top: 1px solid var(--color-border) !important; padding: 18px 0 0; }
/* long forms: the save bar stays visible */
form.form > .actions:last-child, form.card > .actions:last-child { position: sticky; bottom: 0; z-index: 5; margin: 20px -20px -20px; padding: 14px 20px; background: rgba(255,255,255,.96); backdrop-filter: blur(4px); border-top: 1px solid var(--color-border); border-radius: 0 0 var(--radius-lg) var(--radius-lg); }
.filters { display: flex; flex-wrap: wrap; gap: var(--space-2) var(--space-3); align-items: flex-end; margin-bottom: var(--space-4); }
.filters .field { margin: 0; min-width: 160px; }
.filters .field label { font-size: .78rem; color: var(--color-text-soft); font-weight: 600; margin-bottom: 4px; }
.filters input, .filters select { min-height: 36px; padding: 6px 10px; }
.filters.card { padding: 14px 16px; }
/* Häkchen in Filterzeilen: die Feldhöhe oben gilt nicht für Checkboxen (sonst sitzt das Kästchen tiefer als sein
   Text); das Label ist so hoch wie die Auswahlfelder daneben und mittig ausgerichtet */
.filters input[type=checkbox], .filters input[type=radio] { min-height: 0; padding: 0; }
.filters .check { align-items: center; min-height: 36px; margin-bottom: 0; }
.filters .check input { margin-top: 0; }
.inline-form { display: inline; }

/* tables */
/* Tabellen wachsen mit der Seite (kein Scrollen im Kasten), die Kopfzeile klebt am Fensterrand.
   Nur wenn eine Tabelle wirklich breiter ist als der Platz, setzt app.js .is-wide → waagerechtes Scrollen. */
.table-wrap { overflow: visible; border-radius: var(--radius-lg); background: var(--color-surface); border: 1px solid var(--color-border); }
.table-wrap.is-wide, html:not(.js) .table-wrap { overflow-x: auto; }
.table-wrap:not(.is-wide) > table > thead > tr:first-child > th:first-child { border-top-left-radius: calc(var(--radius-lg) - 1px); }
.table-wrap:not(.is-wide) > table > thead > tr:first-child > th:last-child { border-top-right-radius: calc(var(--radius-lg) - 1px); }
.card > .table-wrap > table > thead > tr:first-child > th { border-radius: 0; }
table.table { width: 100%; border-collapse: separate; border-spacing: 0; font-size: .9rem; font-variant-numeric: tabular-nums; }
table.table th, table.table td { padding: 11px 12px; border-bottom: 1px solid var(--color-border); text-align: left; vertical-align: middle; }
table.table tbody tr:last-child td { border-bottom: 0; }
table.table th { position: sticky; top: 0; background: var(--color-surface-2); font-weight: 600; font-size: .8rem; color: var(--color-text-soft); z-index: 1; white-space: nowrap; }
table.table th a { color: inherit; text-decoration: none; display: inline-flex; align-items: center; gap: 4px; }
table.table th a::after { content: ""; width: 7px; height: 7px; border-right: 1.5px solid currentColor; border-bottom: 1.5px solid currentColor; transform: rotate(45deg) translateY(-2px); opacity: .35; }
table.table th a:hover { color: var(--ink); }
table.table th a[aria-sort="ascending"]::after { transform: rotate(-135deg) translateY(-1px); opacity: 1; }
table.table th a[aria-sort="descending"]::after { opacity: 1; }
table.table tbody tr:hover td { background: #fafbfa; }
table.table td.num, table.table th.num { text-align: right; }
table.table .nowrap { white-space: nowrap; }
table.table a.row-link { color: var(--ink); text-decoration: none; font-weight: 600; }
table.table a.row-link:hover { text-decoration: underline; }
.table-actions { white-space: nowrap; text-align: right; }
.table-actions .btn + .btn, .table-actions form + .btn, .table-actions .btn + form { margin-left: 4px; }
/* zweite Zeile einer Zelle: Kennungen und Merkmale immer an derselben Stelle unter dem Haupttext */
.cell-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 6px; margin-top: 4px; font-size: .8rem; color: var(--color-text-soft); line-height: 1.4; }
.cell-meta code { font-size: .92em; }
.badges { display: flex; flex-wrap: wrap; gap: 4px; align-items: flex-start; }
.badges.stack { flex-direction: column; }
/* Fließtext-Spalten (Titel, Namen): lange Komposita wie „Elektroschweißen/Schutzgasschweißen“ dürfen umbrechen, statt die Tabelle zu verbreitern */
table.table td.text { overflow-wrap: anywhere; min-width: 120px; }
/* Aufklapp-Zeile (Akkordeon): Details über die volle Tabellenbreite unter der Zeile, Spalten bleiben stehen */
.row-toggle { display: inline-grid; grid-template-columns: auto auto; align-items: center; text-align: left; column-gap: 6px; padding: 0; border: 0; background: none; font: inherit; font-size: .88rem; font-weight: 500; color: var(--ink); cursor: pointer; white-space: nowrap; }
.row-toggle > span { grid-row: 1; grid-column: 1; text-decoration: underline; text-decoration-color: var(--color-border-strong); text-underline-offset: 2px; }
.row-toggle:hover > span { text-decoration-color: currentColor; }
/* beide Beschriftungen liegen übereinander – der Button ist immer so breit wie die längere, die Spalte springt nicht */
.row-toggle .when-open, .row-toggle[aria-expanded="true"] .when-closed { visibility: hidden; }
.row-toggle[aria-expanded="true"] .when-open { visibility: visible; }
.row-toggle::after { content: ""; grid-row: 1; grid-column: 2; width: 6px; height: 6px; border-right: 1.5px solid currentColor; border-bottom: 1.5px solid currentColor; transform: rotate(45deg) translateY(-2px); transition: transform .15s; }
.row-toggle[aria-expanded="true"]::after { transform: rotate(-135deg) translate(-2px, -2px); }
table.table tbody tr.is-open > td { background: var(--color-surface-2); border-bottom-color: transparent; }
table.table tbody tr.detail-row > td { padding: 0 12px 14px; background: var(--color-surface-2); }
table.table tr.detail-row pre.log { width: 0; min-width: 100%; margin: 0; max-height: none; white-space: pre-wrap; overflow-wrap: anywhere; }
.empty { padding: 36px var(--space-5); text-align: center; color: var(--color-text-soft); }

/* badges & traffic light (Ampel) */
.badge { display: inline-flex; align-items: center; gap: 5px; padding: 2px 9px; border-radius: 999px; font-size: .76rem; font-weight: 600; background: #eceeeb; color: #4a5049; white-space: nowrap; line-height: 1.6; }
.badge.ok, .badge.warn, .badge.danger, .badge.info { background: #fff; border: 1px solid var(--color-border); color: var(--ink); }
.badge.ok::before, .badge.warn::before, .badge.danger::before, .badge.info::before { content: ""; width: 7px; height: 7px; border-radius: 50%; }
.badge.ok::before { background: var(--color-ok); } .badge.warn::before { background: var(--color-warn); } .badge.danger::before { background: var(--color-danger); } .badge.info::before { background: var(--color-info); }
.badge.muted { background: #f0f1ef; color: #6d736c; }
.light { display: inline-flex; align-items: center; gap: 7px; white-space: nowrap; }
.light::before { content: ""; width: 9px; height: 9px; border-radius: 50%; background: var(--color-muted); flex: 0 0 auto; }
.light.valid::before { background: var(--color-ok); } .light.expiring::before { background: var(--color-warn); } .light.expired::before, .light.revoked::before { background: var(--color-danger); } .light.active::before { background: var(--color-info); } .light.none::before { background: var(--color-border-strong); }

/* matrix */
.matrix { font-size: .86rem; }
.matrix th.type { writing-mode: initial; max-width: 140px; white-space: normal; font-size: .78rem; }
.matrix td.cell { text-align: center; padding: 4px; }
.matrix td.cell a { display: block; padding: 6px 4px; border-radius: 5px; text-decoration: none; color: inherit; font-size: .78rem; font-weight: 500; }
.matrix td.cell a.valid { background: #e5f2e6; } .matrix td.cell a.expiring { background: #fbf0dc; } .matrix td.cell a.expired, .matrix td.cell a.revoked { background: #f8e3e0; } .matrix td.cell a.active { background: #e3edf7; } .matrix td.cell a.none { background: var(--color-surface-2); color: var(--color-text-soft); }

/* flash */
.flash { display: flex; gap: 10px; align-items: flex-start; padding: 12px 16px; border-radius: var(--radius); margin-bottom: var(--space-4); border: 1px solid var(--color-border); border-left-width: 4px; background: #fff; font-size: .9rem; }
.flash.success { border-left-color: var(--color-ok); } .flash.error { border-left-color: var(--color-danger); background: #fffafa; } .flash.warning { border-left-color: var(--color-warn); background: #fffdf6; } .flash.info { border-left-color: var(--color-info); }

/* dialogs */
dialog { border: 1px solid var(--color-border); border-radius: var(--radius-lg); box-shadow: 0 16px 48px rgba(41,41,41,.22); padding: var(--space-5); max-width: 520px; width: calc(100% - 32px); }
dialog::backdrop { background: rgba(41, 41, 41, .5); }
dialog h2 { margin-top: 0; }
.dialog-actions { display: flex; gap: var(--space-2); justify-content: flex-end; margin-top: var(--space-4); }
/* Rückfrage- und Hinweisfenster (partials/confirm_modal.php, AppDialog in app.js) statt window.confirm()/alert() */
dialog.confirm-modal { max-width: 460px; padding: 22px 24px 20px; }
dialog.confirm-modal[open] { animation: confirm-in .14s ease-out; }
@keyframes confirm-in { from { opacity: 0; transform: translateY(6px) scale(.985); } to { opacity: 1; transform: none; } }
.confirm-head { display: flex; align-items: center; gap: 12px; margin-bottom: 10px; }
.confirm-head h2 { margin: 0; font-size: 1.08rem; }
.confirm-icon { display: inline-flex; align-items: center; justify-content: center; width: 38px; height: 38px; flex: 0 0 38px; border-radius: 50%; background: var(--color-surface-2); border: 1px solid var(--color-border); color: var(--ink); }
.confirm-modal.is-danger .confirm-icon { background: #fbeceb; border-color: #f0c9c5; color: var(--color-danger); }
.confirm-modal p { margin: 0; color: var(--color-text); line-height: 1.5; overflow-wrap: anywhere; }
.confirm-modal .dialog-actions { margin-top: 20px; }
.btn.danger-solid { background: var(--color-danger); border-color: var(--color-danger); color: #fff; }
.btn.danger-solid:hover { background: #a93226; border-color: #a93226; }
@media (max-width: 520px) { .confirm-modal .dialog-actions { flex-direction: column-reverse; } .confirm-modal .dialog-actions .btn { width: 100%; justify-content: center; } }

/* public */
.public { min-height: 100vh; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: var(--space-4); }
/* Anmeldung & öffentliche Seiten: Baustellenfoto mit dunklem Verlauf wie auf der Bestellseite */
.public { position: relative; isolation: isolate; overflow: hidden; background: var(--ink) url("/assets/img/login-bg.jpg") 30% center / cover no-repeat; }
.public::before { content: ""; position: absolute; inset: 0; z-index: -1;
  background: radial-gradient(60% 50% at 85% 20%, rgba(129,254,88,.16), transparent 70%),
    linear-gradient(to bottom, rgba(41,41,41,.25), rgba(41,41,41,.15) 45%, rgba(41,41,41,.9)),
    linear-gradient(to right, rgba(41,41,41,.35), rgba(41,41,41,.55) 50%, rgba(41,41,41,.92)); }
/* Karte im Button-Grau, alles darin umgekehrt (helles Logo, helle Schrift, grüner Hauptbutton) */
.public .box {
  --ink: #ffffff; --color-surface: #292929; --color-surface-2: #333333; --color-text: #f3f4f6; --color-text-soft: rgba(255,255,255,.66);
  --color-border: rgba(255,255,255,.12); --color-border-strong: rgba(255,255,255,.26); --color-muted: rgba(255,255,255,.45);
  --color-primary: #81FE58; --color-primary-contrast: #292929;
  position: relative; background: var(--color-surface); color: var(--color-text); border: 0; border-radius: var(--radius-lg); padding: 36px 32px; width: 100%; max-width: 420px;
  box-shadow: 0 30px 80px -20px rgba(0,0,0,.75), 0 0 0 1px rgba(255,255,255,.09);
}
.public .box :is(input, select, textarea) { background: #333333; color: #fff; border-color: rgba(255,255,255,.2); }
.public .box :is(input, select, textarea):focus { border-color: #81FE58; }
.public .box input::placeholder { color: rgba(255,255,255,.4); }
.public .box input:-webkit-autofill { -webkit-text-fill-color: #fff; box-shadow: 0 0 0 40px #333333 inset; caret-color: #fff; }
.public .box .field.has-error :is(input, select, textarea) { background: rgba(192,57,43,.14); border-color: #ff7a6b; }
.public .box .field .error { color: #ff9c90; }
.public .box .flash { background: rgba(255,255,255,.06); color: #fff; }
.public .box pre.log { background: #1d1d1d; }
.public .box .btn.primary:hover { filter: brightness(1.06); background: #9dff7e; }
.public-claim { display: none; }
@media (max-width: 999px) { .public::before { background: linear-gradient(to bottom, rgba(41,41,41,.55), rgba(41,41,41,.85)); } }
@media (min-width: 1000px) {
  .public { align-items: flex-end; padding-right: max(var(--space-4), 9vw); }
  .public-claim { display: block; position: absolute; left: max(32px, 5vw); bottom: max(32px, 6vh); max-width: 520px; color: #fff; }
  .public-claim img { height: 40px; width: auto; margin-bottom: 18px; }
  .public-claim p { margin: 0; font-family: var(--font-head); font-size: clamp(1.6rem, 2.4vw, 2.3rem); font-weight: 800; line-height: 1.15; letter-spacing: -.02em; }
  .public-claim span { color: #81FE58; }
}
.public .brand { text-align: center; margin-bottom: 28px; font-family: var(--font-head); font-size: 1.4rem; font-weight: 800; }
.public .brand img { height: 30px; width: auto; }
.public .box h1 { font-size: 1.35rem; }
.public .btn.primary { width: 100%; min-height: 42px; }
.public .links { margin-top: var(--space-4); font-size: .9rem; text-align: center; }
.verify-status { font-size: 1.3rem; font-weight: 700; padding: var(--space-3); border-radius: var(--radius); text-align: center; margin-bottom: var(--space-4); }
.verify-status.valid { background: #e5f2e6; color: #1e5a22; } .verify-status.demo { background: #fff4d6; color: #7a4d00; } .verify-status.expired, .verify-status.revoked, .verify-status.unknown { background: #f8e3e0; color: #8a2a20; }
dl.kv { display: grid; grid-template-columns: max-content 1fr; gap: 6px 16px; margin: 0; }
dl.kv dt { color: var(--color-text-soft); } dl.kv dd { margin: 0; overflow-wrap: anywhere; }
@media (max-width: 600px) { dl.kv { grid-template-columns: minmax(0, 1fr); gap: 0; } dl.kv dd { margin-bottom: 8px; } }

/* learner (me) */
.me { max-width: 480px; margin: 0 auto; padding: var(--space-4); font-size: 18px; }
.me h1 { font-size: 1.4rem; } .me h2 { font-size: 1.1rem; margin-top: var(--space-5); }
.me .card { padding: var(--space-4); }
.me .btn { font-size: 18px; padding: 14px 18px; width: 100%; }
.me .meta { color: var(--color-text-soft); font-size: .95rem; margin-bottom: var(--space-3); }
.me .topline { display: flex; justify-content: space-between; align-items: center; gap: var(--space-3); margin-bottom: var(--space-4); }
.me .topline img { max-height: 40px; }
.me .topline a { font-size: .95rem; }
.me .cert { display: flex; justify-content: space-between; align-items: center; gap: var(--space-3); }
.me .cert .btn { width: auto; font-size: 16px; padding: 10px 14px; }

/* player */
.player { margin: 0; height: 100vh; display: flex; flex-direction: column; background: #111; }
.player header { height: 48px; flex: 0 0 48px; background: var(--ink); color: #fff; display: flex; align-items: center; gap: var(--space-3); padding: 0 var(--space-3); font-size: .95rem; }
.player header .title { font-weight: 600; flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.player header .who { color: #b7c2cd; white-space: nowrap; }
.player header .btn { padding: 6px 12px; font-size: .9rem; }
.player header .status { color: #ffd66b; font-size: .85rem; white-space: nowrap; }
.player iframe { flex: 1; width: 100%; border: 0; background: #fff; }
@media (max-width: 600px) { .player header { height: 44px; flex-basis: 44px; } .player header .who { display: none; } }

/* cards print page */
.cards-page { background: #fff; }
.cards-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8mm; padding: 10mm; }
.access-card { border: 1px dashed #999; border-radius: 6px; padding: 6mm; display: flex; gap: 5mm; align-items: center; break-inside: avoid; page-break-inside: avoid; height: 60mm; }
.access-card img { width: 42mm; height: 42mm; }
.access-card .name { font-weight: 700; font-size: 1.05rem; }
.access-card .howto { font-size: .78rem; color: #333; margin-top: 3mm; }
.access-card .url { font-size: .62rem; color: #666; word-break: break-all; margin-top: 2mm; }
@media print { .no-print { display: none !important; } body { background: #fff; } .cards-grid { padding: 0; } .access-card { height: 62mm; } }

/* responsive */
@media (max-width: 900px) {
  .app { flex-direction: column; }
  .sidebar { width: 100%; flex: none; position: static; height: auto; }
  .sidebar .brand { padding: 12px 16px; }
  .sidebar .area { margin: 0 16px 10px; }
  .sidebar nav, .sidebar .user { display: none; }
  .sidebar nav.is-open { display: block; }
  .sidebar nav.is-open + .user { display: flex; }
  .nav-toggle { display: inline-flex; align-items: center; gap: 6px; background: none; border: 1px solid rgba(255,255,255,.3); color: #fff; border-radius: var(--radius); padding: 6px 10px; font: inherit; font-size: .86rem; }
  .content { padding: 18px 16px 40px; }
  .context-banner { padding: 10px 16px; }
  .tile { border-right: 0; border-bottom: 1px solid var(--color-border); }
}
@media (min-width: 901px) { .nav-toggle { display: none; } }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.pagination { display: flex; gap: var(--space-2); align-items: center; margin-top: var(--space-3); }
pre.log { background: var(--ink); color: #d6dee7; padding: var(--space-3); border-radius: var(--radius); overflow: auto; font-size: .8rem; max-height: 400px; }
.rich p { margin: 0 0 var(--space-2); }
.progress-note { font-size: .85rem; color: var(--color-text-soft); }

/* Ausbau 2026-10 */
.check-list { max-height: 260px; overflow: auto; border: 1px solid var(--color-border); border-radius: var(--radius); padding: var(--space-2) var(--space-3); columns: 2 280px; }
.check-list .check { break-inside: avoid; margin-bottom: 4px; }
/* Anschluss eines externen Dienstes (Einstellungen → Mailversand → Microsoft 365) */
.connect-box { border: 1px solid var(--color-border); border-radius: var(--radius-lg); padding: 16px 18px; margin-bottom: var(--space-5); background: var(--color-surface-2); }
.connect-head { display: flex; align-items: center; gap: var(--space-3); margin-bottom: 6px; }
.connect-head strong { font-family: var(--font-head); font-size: 1rem; }
.connect-box dl.kv { margin: var(--space-3) 0; font-size: .9rem; }
.connect-box .flash { margin: var(--space-3) 0; }
.connect-box .flash ul { margin: 4px 0 0; padding-left: 18px; }
.connect-test { margin-top: var(--space-4); max-width: 520px; }
.connect-test label { display: block; font-weight: 600; font-size: .88rem; margin-bottom: 6px; }
.inline-fields { display: flex; gap: var(--space-2); }
.inline-fields input { flex: 1; }
.connect-setup { margin-top: var(--space-4); font-size: .9rem; }
.connect-setup summary { cursor: pointer; font-weight: 600; }
.text-danger { color: var(--color-danger); }
/* Auswahlliste mit Suche (data-pick-list): eine Spalte, gewählte oben, Suche oben fest */
.pick-list { border: 1px solid var(--color-border-strong); border-radius: var(--radius); background: #fff; }
.pick-head { display: flex; align-items: center; gap: var(--space-3); padding: 8px; border-bottom: 1px solid var(--color-border); background: var(--color-surface-2); border-radius: var(--radius) var(--radius) 0 0; }
.pick-head input[type=search] { flex: 1; min-height: 34px; padding: 6px 10px; }
.pick-count { margin-left: auto; font-size: .84rem; color: var(--color-text-soft); white-space: nowrap; }
.pick-items { max-height: 340px; overflow-y: auto; padding: 4px 0; }
/* .pick-list davor: schlägt .field label { display: block } */
.pick-list .pick-item { display: grid; grid-template-columns: 18px 52px 1fr; align-items: center; gap: 10px; margin: 0; padding: 6px 12px; cursor: pointer; font-weight: 500; font-size: .92rem; }
.pick-item:hover { background: var(--color-surface-2); }
.pick-item input { width: 18px; height: 18px; margin: 0; accent-color: var(--ink); }
.pick-item code { justify-self: start; }
.pick-item:has(input:checked) { background: #f1f8ee; }
.pick-item:has(input:checked) + .pick-item:not(:has(input:checked)) { border-top: 1px solid var(--color-border); }
.pick-list .pick-item[hidden] { display: none; }
.pick-list .pick-item.is-disabled { cursor: default; color: var(--color-text-soft); }
.pick-list .pick-item.is-disabled:hover { background: none; }
.pick-empty { margin: 0; padding: 10px 12px; }
.lock-note { font-size: .88rem; color: var(--color-text-soft); margin-top: 4px; }
.card.locked { opacity: .85; }
.icon-lock { vertical-align: -2px; color: var(--color-text-soft); }

/* Demo-Hinweis (P10) */
.demo-bar { background: #81FE58; color: #292929; text-align: center; font-size: 14px; padding: 6px 12px; }
.demo-bar a { color: #292929; font-weight: 700; margin-left: 8px; }
.demo-choice { display: grid; gap: 12px; margin: 20px 0; }
.demo-choice form, .demo-choice a { margin: 0; }
.demo-choice .btn { white-space: normal; width: 100%; justify-content: flex-start; text-align: left; padding: 14px 16px; height: auto; flex-direction: column; align-items: flex-start; }
/* Untertitel in der Schriftfarbe des Buttons (nicht das helle --color-text-soft der dunklen Box – auf Grün unlesbar) */
.demo-choice .btn small { font-weight: 400; color: inherit; opacity: .8; }
.form > fieldset:first-of-type { border-top: 0; margin-top: 0; padding-top: 0; }
.form > fieldset:first-of-type legend { margin-bottom: 14px; }
fieldset legend { margin-bottom: 14px; }

/* sortable rows (drag & drop, touch, keyboard) */
.drag-handle { display: inline-grid; place-items: center; width: 30px; height: 30px; border: 0; border-radius: var(--radius); background: none; color: var(--color-muted); cursor: grab; touch-action: none; padding: 0; }
.drag-handle:hover { background: var(--color-surface-2); color: var(--ink); }
.drag-handle svg { width: 16px; height: 16px; fill: currentColor; }
tr.is-dragging td { background: #fff !important; box-shadow: 0 1px 0 var(--ink), 0 -1px 0 var(--ink); }
tr.is-dragging .drag-handle { cursor: grabbing; color: var(--ink); }
body.is-sorting { cursor: grabbing; user-select: none; }
.sort-status { font-size: .84rem; color: var(--color-text-soft); margin-left: 8px; }
.sort-status.ok { color: var(--color-ok); } .sort-status.err { color: var(--color-danger); }
.lang-switch { display: flex; flex-wrap: wrap; gap: 4px 12px; justify-content: center; margin-top: var(--space-4); font-size: .85rem; }
.lang-switch a { color: var(--color-text-soft); text-decoration: none; }
.lang-switch a[aria-current] { color: var(--ink); font-weight: 600; text-decoration: underline; }

/* Anfragen → Kommunikation (PlusLeads-Posteingang, assets/js/communication.js): Liste links, Verlauf rechts */
.btn .icon, .comm .icon { width: 16px; height: 16px; flex: 0 0 16px; stroke: currentColor; fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.comm-updated { font-size: .82rem; }
.comm-intro { margin-top: calc(-1 * var(--space-2)); }
.comm { display: grid; grid-template-columns: minmax(300px, 400px) minmax(0, 1fr); gap: var(--space-4); align-items: start; }
.comm > .card { margin: 0; }
.comm-list.card { padding: 0; display: flex; flex-direction: column; position: sticky; top: 16px; max-height: calc(100vh - 32px); overflow: hidden; }
.comm-filters { display: flex; flex-wrap: wrap; gap: var(--space-2); padding: 12px; border-bottom: 1px solid var(--color-border); }
.comm-filters select, .comm-filters input { min-height: 34px; padding: 5px 10px; font: inherit; font-size: .88rem; border: 1px solid var(--color-border-strong); border-radius: var(--radius); background: var(--color-surface); }
.comm-filters select { flex: 1 1 120px; }
.comm-filters input { flex: 1 1 100%; }
.comm-seg { display: inline-flex; padding: 2px; border: 1px solid var(--color-border); border-radius: var(--radius); background: var(--color-surface-2); }
.comm-seg button { border: 0; background: none; font: inherit; font-size: .86rem; font-weight: 600; color: var(--color-text-soft); padding: 4px 12px; border-radius: 4px; cursor: pointer; }
.comm-seg button[aria-pressed="true"] { background: var(--ink); color: #fff; }
.comm-rows { overflow-y: auto; flex: 1; min-height: 120px; }
.comm-row { display: flex; gap: 10px; width: 100%; text-align: left; padding: 11px 12px; border: 0; border-bottom: 1px solid var(--color-border); background: none; font: inherit; color: inherit; cursor: pointer; position: relative; }
.comm-row:hover { background: var(--color-surface-2); }
.comm-row.is-active { background: var(--color-surface-2); }
.comm-row.is-active::before { content: ""; position: absolute; left: 0; top: 8px; bottom: 8px; width: 3px; border-radius: 0 3px 3px 0; background: var(--ink); }
.comm-row-icon { flex: 0 0 30px; width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; background: var(--color-surface-2); border: 1px solid var(--color-border); color: var(--ink); }
.comm-row-body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.comm-row-head { display: flex; align-items: center; gap: 6px; }
.comm-row-name { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.comm-row.is-unread .comm-row-name { font-weight: 700; }
.comm-row-time { margin-left: auto; flex-shrink: 0; font-size: .76rem; color: var(--color-text-soft); font-variant-numeric: tabular-nums; }
.comm-row-link { font-size: .78rem; color: var(--color-text-soft); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.comm-row-preview { font-size: .84rem; color: var(--color-text-soft); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; word-break: break-word; }
.comm-row.is-unread .comm-row-preview { color: var(--color-text); }
.comm-unread { flex-shrink: 0; min-width: 20px; padding: 0 6px; border-radius: 999px; background: var(--signal); color: var(--ink); font-size: .72rem; font-weight: 700; text-align: center; line-height: 20px; }
.comm-more { padding: 10px 12px; text-align: center; }
.comm-more:has(> [hidden]) { display: none; }
.comm-state { padding: 24px 16px; text-align: center; color: var(--color-text-soft); font-size: .9rem; }
.comm-state.is-error { color: var(--color-danger); }
.comm-detail.card { min-height: 420px; display: flex; flex-direction: column; gap: var(--space-3); }
.comm-head { display: flex; gap: var(--space-3); align-items: flex-start; }
.comm-head-main { flex: 1; min-width: 0; }
.comm-head h2 { margin: 0 0 2px; }
.comm-head .muted { font-size: .86rem; word-break: break-word; }
.comm-head-link { margin-top: 6px; font-size: .86rem; }
.comm-back { display: none; }
.comm-tabs { display: flex; flex-wrap: wrap; gap: 6px; }
.comm-tab { display: inline-flex; align-items: center; gap: 6px; padding: 5px 12px; border-radius: 999px; border: 1px solid var(--color-border-strong); background: var(--color-surface); font: inherit; font-size: .84rem; font-weight: 600; color: var(--color-text-soft); cursor: pointer; }
.comm-tab:hover { color: var(--ink); border-color: var(--color-muted); }
.comm-tab[aria-selected="true"] { background: var(--ink); border-color: var(--ink); color: #fff; }
.comm-compose { display: flex; flex-direction: column; gap: var(--space-2); }
.comm-subject, .comm-text { width: 100%; font: inherit; font-size: .92rem; padding: 8px 10px; border: 1px solid var(--color-border-strong); border-radius: var(--radius); background: var(--color-surface); color: var(--color-text); }
.comm-text { resize: vertical; min-height: 76px; }
.comm-compose-actions { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-2); }
.comm-hint { flex: 1 1 200px; font-size: .8rem; color: var(--color-text-soft); }
.comm-status { font-size: .84rem; color: var(--color-ok); }
.comm-status.is-error { color: var(--color-danger); }
.comm-reply-target { display: flex; align-items: center; justify-content: space-between; gap: 8px; font-size: .82rem; color: var(--color-text-soft); border: 1px dashed var(--color-border-strong); border-radius: var(--radius); padding: 4px 10px; }
.comm-linkbtn { border: 0; background: none; padding: 2px 0; font: inherit; font-size: .8rem; color: var(--ink); text-decoration: underline; text-decoration-color: var(--color-border-strong); text-underline-offset: 2px; cursor: pointer; }
.comm-reply-target .comm-linkbtn { font-size: 1.1rem; text-decoration: none; line-height: 1; color: var(--color-text-soft); }
.comm-history { display: flex; flex-direction: column; gap: var(--space-2); max-height: 62vh; overflow-y: auto; padding: 2px; border-top: 1px solid var(--color-border); padding-top: var(--space-3); }
.comm-msg { max-width: 86%; padding: 9px 12px; border-radius: 12px; border: 1px solid var(--color-border); background: var(--color-surface); font-size: .9rem; line-height: 1.45; word-break: break-word; }
.comm-msg.is-in { align-self: flex-start; border-bottom-left-radius: 4px; }
.comm-msg.is-out { align-self: flex-end; border-bottom-right-radius: 4px; background: #eceeeb; border-color: #dfe2de; }
.comm-msg-subject { font-weight: 600; margin-bottom: 4px; }
.comm-msg-meta { margin-top: 6px; font-size: .74rem; color: var(--color-text-soft); }
.comm-quote { margin-top: 4px; padding-left: 8px; border-left: 2px solid var(--color-border-strong); color: var(--color-text-soft); font-size: .84rem; }
.comm-html[hidden], .comm-quote[hidden] { display: none; }
.comm-html { display: block; width: 100%; height: 380px; margin-top: 6px; border: 1px solid var(--color-border); border-radius: var(--radius); background: #fff; }
.comm-files { margin-top: 6px; font-size: .82rem; display: flex; flex-wrap: wrap; gap: 4px 10px; }
.comm-thread { display: flex; flex-direction: column; gap: var(--space-2); padding: 10px; border: 1px solid var(--color-border); border-radius: var(--radius-lg); background: var(--color-surface-2); }
.comm-thread .comm-msg { max-width: 100%; }
.comm-thread-head { display: flex; align-items: center; gap: 8px; }
.comm-thread-subject { flex: 1; min-width: 0; font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.comm-thread-count { min-width: 22px; padding: 0 6px; border-radius: 999px; border: 1px solid var(--color-border); background: var(--color-surface); font-size: .74rem; text-align: center; line-height: 18px; }
.comm-older { align-self: center; }
.comm-sentinel { display: flex; justify-content: center; }
.comm-end { text-align: center; font-size: .76rem; color: var(--color-text-soft); padding: 6px 0; }
@media (max-width: 999px) {
  .comm { grid-template-columns: minmax(0, 1fr); }
  .comm-list.card { position: static; max-height: none; }
  .comm-rows { max-height: none; }
  .comm:not(.is-detail) .comm-detail { display: none; }
  .comm.is-detail .comm-list { display: none; }
  .comm-back { display: inline-flex; }
  .comm-head { flex-wrap: wrap; }
  .comm-head-main { flex-basis: 100%; order: 2; }
  .comm-msg { max-width: 94%; }
  .comm-history { max-height: none; }
}

/* Mitarbeiter-Dashboard /me (.me.is-wide, resources/views/me/home.php): Kacheln, „Als Nächstes“, kompakte Zeilen, ab 1000 px zwei Spalten */
/* Kopfleiste /me: Grau und Hover-Töne wie die Admin-Seitenleiste (.sidebar), helles Logo */
.me-top { background: var(--ink); color: #e6e8e5; }
.me-top-inner { max-width: 1080px; margin: 0 auto; padding: 12px var(--space-4); display: flex; align-items: center; justify-content: space-between; gap: var(--space-3); min-height: 64px; }
.me-top .me-brand { display: inline-flex; align-items: center; line-height: 0; flex-shrink: 0; }
.me-top .me-brand img { height: 26px; width: auto; max-width: 180px; }
.me-top .me-brand.has-tenant-logo { background: #fff; border-radius: var(--radius); padding: 6px 10px; }
.me-top .me-brand.has-tenant-logo img { height: 28px; max-width: 160px; }
.me-user { display: flex; align-items: center; gap: 4px; min-width: 0; }
.me-user .avatar { width: 32px; height: 32px; flex: 0 0 32px; border-radius: 50%; background: #444; color: #fff; display: grid; place-items: center; font-weight: 700; font-size: .78rem; }
.me-user .who { margin: 0 10px 0 6px; padding-right: 14px; border-right: 1px solid rgba(255,255,255,.12); color: #fff; font-weight: 600; font-size: .9rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 200px; line-height: 32px; }
.me-action { display: inline-flex; align-items: center; gap: 7px; height: 34px; padding: 0 10px; border-radius: var(--radius); color: #c8ccc7; text-decoration: none; font-size: .88rem; white-space: nowrap; }
.me-action:hover { background: rgba(255,255,255,.08); color: #fff; }
.me-action.is-active { background: rgba(255,255,255,.1); color: #fff; box-shadow: inset 0 -2px 0 var(--signal); }
.me-action svg { width: 18px; height: 18px; flex: 0 0 18px; stroke: currentColor; fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.me-action:focus-visible { outline: 2px solid var(--signal); outline-offset: 2px; }
.me.is-wide { max-width: 1080px; font-size: 16px; padding-top: var(--space-5); }
.me-hello { margin-bottom: var(--space-4); }
.me-hello h1 { margin: 0 0 2px; }
.me-hello .meta { margin: 0; }
.me-tiles { gap: 1px; background: var(--color-border); grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); }
.me-tiles .tile { border-right: 0; background: var(--color-surface); padding: 14px 16px; }
.me-tiles .tile .num { font-size: 1.7rem; }
.me-tiles .tile .sub { font-size: .8rem; color: var(--color-danger); font-weight: 600; margin-top: 2px; }
.me-tiles .tile.is-zero .num { color: var(--color-muted); }
.me-section { margin-bottom: var(--space-5); }
.me .me-section h2 { font-size: 1.05rem; margin: 0 0 var(--space-2); }
.me-group { display: flex; align-items: center; gap: 8px; font-size: .9rem; font-weight: 700; color: var(--color-text-soft); margin: var(--space-3) 0 6px; }
.me-group.is-overdue { color: var(--color-danger); }
.me-count { min-width: 22px; padding: 0 6px; border-radius: 999px; border: 1px solid var(--color-border); background: var(--color-surface); color: var(--ink); font-size: .75rem; text-align: center; line-height: 18px; }
.me .card.me-list { padding: 0; margin-bottom: var(--space-2); }
.me-row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; padding: 12px 16px; border-bottom: 1px solid var(--color-border); }
.me-row:last-child { border-bottom: 0; }
.me-row-main { flex: 1 1 220px; min-width: 0; }
.me-row-main strong { display: block; line-height: 1.35; }
.me .me-row .meta { margin: 2px 0 0; font-size: .88rem; }
.me .me-row .lock-note { margin: 6px 0 0; font-size: .88rem; }
.me .me-row form { margin: 0; }
.me .me-row .btn { width: auto; min-height: 36px; padding: 7px 14px; font-size: 15px; }
.me-row.is-history { opacity: .85; }
.me-row.is-locked strong { color: var(--color-text-soft); }
.me .card.me-next { padding: 18px 20px; }
.me .card.me-next strong { font-size: 1.1rem; }
.me .card.me-next .meta { margin: 4px 0 12px; }
.me .card.me-next.is-overdue { border-left: 4px solid var(--color-danger); }
.me .card.me-next.is-done .meta { margin: 0; }
.me-details { margin: var(--space-2) 0 var(--space-3); }
.me-details > summary { cursor: pointer; font-weight: 600; padding: 6px 0; color: var(--ink); }
.me-details[open] > summary { margin-bottom: 6px; }
.me-wallet { margin: 4px 0 0; font-size: .9rem; }
@media (min-width: 1000px) {
  .me-grid { display: grid; grid-template-columns: minmax(0, 3fr) minmax(0, 2fr); gap: var(--space-5); align-items: start; }
}
@media (max-width: 600px) {
  .me.is-wide { padding-top: var(--space-4); }
}
@media (max-width: 720px) {
  .me-top-inner { padding: 10px 16px; min-height: 56px; }
  .me-top .me-brand img { height: 22px; }
  .me-user .who { display: none; }
  .me-user .avatar { margin-right: 6px; }
  .me-action { width: 40px; height: 40px; padding: 0; justify-content: center; }
  .me-action span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
}

/* Rückmeldungen als Toast (partials/flash.php + app.js): unten rechts, Smartphone unten volle Breite; ohne JS oben im Inhalt */
.flash .flash-text { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.flash-stack.is-toast { position: fixed; right: 20px; bottom: 20px; z-index: 1000; display: flex; flex-direction: column; gap: 10px; width: min(420px, calc(100vw - 40px)); pointer-events: none; }
.flash-stack.is-toast .flash { pointer-events: auto; margin: 0; align-items: center; box-shadow: 0 12px 32px rgba(41, 41, 41, .16), 0 2px 6px rgba(41, 41, 41, .08); animation: toast-in .22s ease-out; }
.flash-close { flex: 0 0 auto; width: 28px; height: 28px; margin: -4px -8px -4px 0; display: grid; place-items: center; border: 0; border-radius: var(--radius); background: transparent; color: var(--color-text-soft); font-size: 20px; line-height: 1; cursor: pointer; }
.flash-close:hover { background: rgba(41, 41, 41, .07); color: var(--ink); }
.flash-close:focus-visible { outline: 2px solid var(--ink); outline-offset: 1px; }
.flash.is-leaving { opacity: 0; transform: translateY(8px); transition: opacity .2s ease, transform .2s ease; }
@keyframes toast-in { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
@media (max-width: 600px) { .flash-stack.is-toast { left: 12px; right: 12px; bottom: 12px; width: auto; } }
@media (prefers-reduced-motion: reduce) { .flash-stack.is-toast .flash { animation: none; } .flash.is-leaving { transition: none; } }

/* Einstellungs-Liste (z. B. Erinnerungen): Titel + Erklärung links, schmales Zahlenfeld mit Einheit rechts – gleiche Zeilenhöhe statt Raster mit unterschiedlich langen Beschriftungen */
.setting-list { border: 1px solid var(--color-border); border-radius: var(--radius-lg); background: var(--color-surface); margin-bottom: var(--space-5); }
.setting-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 8px 24px; padding: 14px 18px; border-bottom: 1px solid var(--color-border); }
.setting-row:last-child { border-bottom: 0; }
.setting-row label { display: block; font-weight: 600; font-size: .92rem; margin: 0; }
.setting-row .hint { font-size: .82rem; color: var(--color-text-soft); margin-top: 3px; line-height: 1.4; }
.setting-row .error { color: var(--color-danger); font-size: .85rem; margin-top: 5px; font-weight: 500; }
.setting-input { display: flex; align-items: center; gap: 10px; }
.setting-input input { width: 84px; text-align: right; }
.setting-input .unit { min-width: 96px; font-size: .88rem; color: var(--color-text-soft); }
.setting-row.has-error input { border-color: var(--color-danger); background: #fffafa; }
@media (max-width: 600px) { .setting-row { grid-template-columns: minmax(0, 1fr); } .setting-input .unit { min-width: 0; } }

/* Nachrichten-Vorlagen (admin/templates): Übersicht nach Empfänger, Editor links, Vorschau + Test rechts */
.tpl-intro { margin: 0 0 var(--space-4); max-width: 820px; }
.tpl-group h2 { display: flex; align-items: center; gap: 10px; }
.tpl-table { table-layout: fixed; width: 100%; }
.tpl-table td { vertical-align: middle; }
.tpl-col-channels { width: 230px; } .tpl-col-state { width: 120px; } .tpl-col-action { width: 120px; }
@media (max-width: 760px) { .tpl-table { table-layout: auto; } }
.tpl-table tr.is-off td { opacity: .6; }
.tpl-channels { white-space: nowrap; }
.tpl-chip { display: inline-block; padding: 2px 9px; margin: 2px 4px 2px 0; border-radius: 999px; border: 1px dashed var(--color-border); color: var(--color-text-soft); font-size: .78rem; font-weight: 600; text-decoration: none; }
.tpl-chip.is-on { border-style: solid; border-color: var(--ink); background: var(--ink); color: #fff; }
.tpl-chip:hover { border-color: var(--ink); }
.tpl-back { margin: 0 0 4px; font-size: .88rem; }
.page-head h1 small { font-size: .95rem; font-weight: 500; }
.tpl-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: var(--space-5); align-items: start; }
.tpl-editor textarea { font: inherit; line-height: 1.5; }
.tpl-note { margin-top: 0; }
.tpl-placeholders { margin: var(--space-3) 0; padding: 12px 14px; border: 1px solid var(--color-border); border-radius: var(--radius); background: var(--color-surface-2); }
.tpl-ph-list { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.tpl-ph { display: inline-flex; align-items: baseline; gap: 6px; padding: 4px 9px; border: 1px solid var(--color-border); border-radius: var(--radius); background: var(--color-surface); font: inherit; font-size: .8rem; color: var(--color-text-soft); cursor: pointer; }
.tpl-ph code { color: var(--ink); font-weight: 600; }
.tpl-ph:hover { border-color: var(--ink); }
.tpl-side { position: sticky; top: var(--space-4); }
.tpl-side-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.tpl-side-head h2 { margin: 0; }
.tpl-frame { display: block; width: 100%; height: 520px; border: 1px solid var(--color-border); border-radius: var(--radius); background: #f4f6f9; }
.tpl-frame.is-phone { height: 300px; }
.tpl-test { margin-top: var(--space-4); }
.tpl-test label { display: block; font-weight: 600; font-size: .88rem; margin-bottom: 6px; }
@media (max-width: 1100px) { .tpl-grid { grid-template-columns: minmax(0, 1fr); } .tpl-side { position: static; } }

/* Reiter innerhalb einer Seite (data-tabs, app.js) – Aussehen wie .view-switch; ohne JS: Reiterleiste aus, alle Bereiche sichtbar */
.tabs-box { margin-bottom: var(--space-5); }
.tabs-box .tabs-nav { margin-bottom: var(--space-3); }
html:not(.js) .tabs-box .tabs-nav { display: none; }
.tabs-nav button { display: inline-flex; align-items: center; gap: 8px; padding: 6px 14px; border: 0; border-radius: var(--radius); background: transparent; color: var(--color-text-soft); font: inherit; font-weight: 600; font-size: .9rem; cursor: pointer; }
.tabs-nav button:hover { color: var(--ink); background: var(--color-surface-2); }
.tabs-nav button[aria-selected="true"] { background: var(--ink); color: #fff; }
.tabs-nav button[aria-selected="true"] .badge { background: rgba(255, 255, 255, .15); color: #fff; border-color: transparent; }
.tabs-nav button:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }
.tabs-box > [data-tab-panel] > .connect-box, .tabs-box > .connect-box { margin-bottom: 0; }
/* Schalter (Checkbox mit role=switch) */
.switch-row { display: flex; align-items: flex-start; gap: 12px; margin: var(--space-3) 0; cursor: pointer; }
.switch-row input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.switch-row .switch { flex: 0 0 40px; width: 40px; height: 22px; margin-top: 2px; border-radius: 999px; background: #c9cdd2; position: relative; transition: background .15s; }
.switch-row .switch::after { content: ""; position: absolute; top: 3px; left: 3px; width: 16px; height: 16px; border-radius: 50%; background: #fff; box-shadow: 0 1px 2px rgba(0, 0, 0, .2); transition: transform .15s; }
.switch-row input:checked + .switch { background: var(--ink); }
.switch-row input:checked + .switch::after { transform: translateX(18px); background: var(--signal); }
.switch-row input:focus-visible + .switch { outline: 2px solid var(--ink); outline-offset: 2px; }
.switch-row.is-disabled { cursor: not-allowed; opacity: .55; }
.tpl-notes { margin: var(--space-3) 0 0; padding-left: 18px; }
.tpl-notes li { margin-bottom: 4px; }
@media (prefers-reduced-motion: reduce) { .switch-row .switch, .switch-row .switch::after { transition: none; } }
.role-form { display: inline-flex; gap: 6px; align-items: center; }
.role-form select { width: auto; min-width: 140px; }
html.js .role-form button { display: none; } /* Auswahl speichert sofort (form[data-autosubmit], app.js) */
.operators-table td.table-actions { white-space: normal; }
.operators-table td.table-actions .inline-form { display: inline-block; margin: 2px 0 2px 4px; }

/* White Label (Mandant bearbeiten / Mandantenseite) */
.flash[hidden], [data-wl-fields][hidden] { display: none; }
.input-suffix { display: flex; align-items: stretch; }
.input-suffix input { border-top-right-radius: 0; border-bottom-right-radius: 0; min-width: 0; }
.input-suffix span { display: flex; align-items: center; padding: 0 10px; border: 1px solid var(--color-border); border-left: 0; border-radius: 0 var(--radius) var(--radius) 0; background: var(--color-surface-2); color: var(--color-text-soft); white-space: nowrap; font-size: .9rem; }
.color-pair { display: flex; gap: 8px; align-items: stretch; }
.color-pair input[type=color] { flex: 0 0 48px; width: 48px; }
.color-pair input[type=text] { flex: 1; min-width: 0; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; }
.swatch { display: inline-block; width: 14px; height: 14px; border-radius: 3px; border: 1px solid var(--color-border-strong); vertical-align: -2px; }
.wl-icon-thumb { width: 48px; height: 48px; border-radius: 10px; border: 1px solid var(--color-border); }
.wl-preview { --bg: #292929; --surface: #333333; --surface-2: #3a3a3a; --line: #444444; --text: #f3f4f6; --muted: #aaaaaa; --accent: #81FE58; --on-accent: #292929; --head-bg: rgba(41,41,41,.96); --ok: #66bb6a;
  max-width: 380px; border-radius: var(--radius-lg); overflow: hidden; border: 1px solid var(--color-border); background: var(--bg); color: var(--text); font-size: 14px; }
.wl-head { background: var(--head-bg); border-bottom: 1px solid var(--line); padding: 10px 14px; display: flex; justify-content: center; }
.wl-head img { height: 24px; width: auto; max-width: 200px; display: block; }
.wl-body { padding: 14px; display: grid; gap: 12px; }
.wl-tabs { display: flex; gap: 4px; background: var(--surface); border-radius: 8px; padding: 3px; }
.wl-tabs span { flex: 1; text-align: center; padding: 5px; border-radius: 6px; color: var(--muted); font-weight: 600; font-size: 13px; }
.wl-tabs span.on { background: var(--surface-2); color: var(--text); box-shadow: inset 0 -2px 0 var(--accent); }
.wl-card { display: flex; justify-content: space-between; align-items: center; gap: 10px; background: var(--surface); border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; }
.wl-card small { display: block; color: var(--muted); font-size: 12px; }
.wl-ok { width: 10px; height: 10px; border-radius: 50%; background: var(--ok); flex: 0 0 auto; }
.wl-btn { display: block; text-align: center; background: var(--accent); color: var(--on-accent); font-weight: 700; border-radius: 8px; padding: 9px; }

/* Fälligkeits-Ampel (DECISIONS #77, App\Support\StatusTone): grün erledigt, violett ≤ 1 Monat, blau ≤ 2 Monate, rot überfällig, grau in Bearbeitung */
:root { --color-soon: #7b3fc4; --color-due: #2b6cb0; --color-neutral: #8c938b; }
.light.ok::before { background: var(--color-ok); } .light.soon::before { background: var(--color-soon); } .light.due::before { background: var(--color-due); }
.light.danger::before { background: var(--color-danger); } .light.warn::before { background: var(--color-warn); } .light.neutral::before { background: var(--color-neutral); } .light.muted::before { background: var(--color-border-strong); }
.light.expiring::before { background: var(--color-due); } .light.active::before { background: var(--color-neutral); }
.badge.soon, .badge.due, .badge.neutral { background: #fff; border: 1px solid var(--color-border); color: var(--ink); }
.badge.soon::before, .badge.due::before, .badge.neutral::before { content: ""; width: 7px; height: 7px; border-radius: 50%; }
.badge.soon::before { background: var(--color-soon); } .badge.due::before { background: var(--color-due); } .badge.neutral::before { background: var(--color-neutral); }
.tile.soon .label::before, .tile.due .label::before { content: ""; width: 8px; height: 8px; border-radius: 50%; flex: 0 0 8px; }
.tile.soon .label::before { background: var(--color-soon); } .tile.due .label::before { background: var(--color-due); }
.matrix td.cell a.ok { background: #e5f2e6; } .matrix td.cell a.soon { background: #efe5fa; } .matrix td.cell a.due { background: #e3edf7; }
.matrix td.cell a.danger { background: #f8e3e0; } .matrix td.cell a.neutral { background: #eceeec; color: var(--color-text-soft); }
.matrix td.cell a[class*="edge-"] { box-shadow: inset 4px 0 0 var(--edge); }
.matrix td.cell a.edge-soon { --edge: var(--color-soon); } .matrix td.cell a.edge-due { --edge: var(--color-due); } .matrix td.cell a.edge-danger { --edge: var(--color-danger); }

/* Matrix kompakt: kurze Spaltenköpfe (Kursnummer, Titel als Tooltip), Auswahl- und Namensspalte bleiben beim Scrollen stehen */
.matrix th.type { max-width: none; white-space: nowrap; text-align: center; font-size: .78rem; padding: 8px 6px; }
.matrix th.type abbr { text-decoration: none; cursor: help; }
.matrix td.cell { min-width: 74px; }
.matrix-wrap .matrix .m-check, .matrix-wrap .matrix .m-name { position: sticky; z-index: 2; background: var(--color-surface); }
.matrix-wrap .matrix th.m-check, .matrix-wrap .matrix th.m-name { z-index: 3; background: var(--color-surface-2); }
.matrix-wrap .matrix .m-check { left: 0; width: 38px; min-width: 38px; }
.matrix-wrap .matrix .m-name { left: 38px; white-space: nowrap; box-shadow: 1px 0 0 var(--color-border); }
.matrix-wrap .matrix .m-dep { white-space: nowrap; font-size: .82rem; color: var(--color-text-soft); }
/* Matrix-Kopf mit Umschalter Zeilen/Spalten; Ansicht „Mitarbeiter in Spalten“: Kurse als Zeilen, Kursspalte bleibt stehen */
.matrix-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--space-2) var(--space-4); margin-bottom: var(--space-3); }
.matrix-head h2 { margin: 0; }
.matrix-head .view-switch { margin-bottom: 0; }
.matrix-head .view-switch a { padding: 4px 12px; font-size: .84rem; }
.matrix-wrap .matrix.is-cols .m-name { left: 0; min-width: 220px; max-width: 320px; white-space: normal; text-align: left; font-weight: 500; }
.matrix-wrap .matrix.is-cols tbody .m-name { background: var(--color-surface); }
.matrix.is-cols .m-corner .check { font-weight: 600; }
.matrix.is-cols .t-code { display: inline-block; min-width: 3.2em; font-weight: 700; font-variant-numeric: tabular-nums; }
.matrix.is-cols .t-name { color: var(--color-text-soft); font-size: .82rem; }
.matrix.is-cols th.person { vertical-align: bottom; text-align: center; min-width: 86px; max-width: 120px; padding: 8px 6px; font-size: .78rem; white-space: normal; line-height: 1.25; }
.matrix.is-cols th.person .row-check { display: block; margin: 0 auto 4px; }
.matrix.is-cols th.person .row-link { display: block; color: var(--ink); }
.matrix.is-cols th.person .row-link::after { content: none; }
.matrix.is-cols th.person .p-last { display: block; font-weight: 700; }
.matrix.is-cols th.person .p-first { display: block; font-weight: 500; }
.matrix.is-cols th.person .p-dep { display: block; margin-top: 2px; color: var(--color-text-soft); font-weight: 400; font-size: .72rem; }
@media (max-width: 600px) { .matrix-wrap .matrix.is-cols .m-name { min-width: 150px; } }
.matrix-legend { display: flex; flex-wrap: wrap; gap: 6px 16px; font-size: .82rem; margin: 4px 0 10px; }
.matrix-courses { position: relative; }
.matrix-courses > summary { list-style: none; }
.matrix-courses > summary::-webkit-details-marker { display: none; }
.matrix-courses[open] { flex-basis: 100%; }
.matrix-courses[open] .pick-list { margin-top: 8px; max-width: 560px; }
.me-group.is-soon { color: var(--color-soon); }
.public-legal { display: flex; justify-content: center; gap: 16px; margin-top: 18px; font-size: .8rem; } .public-legal a { color: var(--color-text-soft); text-decoration: none; } .public-legal a:hover { text-decoration: underline; }
.public-legal { display: flex; justify-content: center; gap: 16px; margin-top: 18px; font-size: .8rem; } .public-legal a { color: var(--color-text-soft); text-decoration: none; } .public-legal a:hover { text-decoration: underline; }

/* Support-Chat (partials/support_thread.php): eigene Nachrichten rechts, Betreiber-Antworten mit grauem Grund */
.support-thread { display: flex; flex-direction: column; gap: 10px; margin: 0 0 var(--space-4); max-width: 860px; }
.support-msg { max-width: 78%; padding: 10px 14px; border: 1px solid var(--color-border); border-radius: var(--radius-lg); background: var(--color-surface); }
.support-msg.is-own { align-self: flex-end; }
.support-msg.is-operator { background: var(--color-surface-2); }
.support-meta { font-size: .78rem; color: var(--color-text-soft); margin-bottom: 4px; }
.support-body { white-space: normal; overflow-wrap: anywhere; line-height: 1.5; }
/* Mitarbeiter-Typen: Mapping-Matrix Kurse × Typen */
.etype-matrix td.cell { text-align: center; min-width: 64px; }
.etype-matrix .m-name { left: 0; white-space: normal; min-width: 260px; }
.etype-edit { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.etype-edit input[type=text] { max-width: 260px; } .etype-edit .etype-code { max-width: 120px; text-transform: uppercase; }

/* ---- Mitarbeiter anlegen: geführter Ablauf in Abschnitten (data-flow), Kursauswahl mit Platz-Ausblick ---- */
.flow { max-width: 880px; }
.flow-steps { list-style: none; display: flex; flex-wrap: wrap; gap: 6px 22px; margin: 0 0 var(--space-4); padding: 0; font-size: .9rem; color: var(--color-text-soft); }
.flow-steps li { display: flex; align-items: center; gap: 8px; }
.flow-steps li.is-current { color: var(--ink); font-weight: 600; }
.step-no { display: inline-flex; align-items: center; justify-content: center; width: 26px; height: 26px; flex: 0 0 26px; border-radius: 50%; border: 1.5px solid var(--color-border-strong); font: 700 .82rem var(--font); color: var(--color-text-soft); background: var(--color-surface); }
.is-current > .step-no, .flow-step.is-open .step-no { background: var(--ink); border-color: var(--ink); color: #fff; }
.is-done > .step-no, .flow-step.is-done:not(.is-open) .step-no { background: var(--color-ok); border-color: var(--color-ok); color: #fff; }
.flow-step.card { padding: 0; }
.card .flow-title { margin: 0; font-size: 1.12rem; }
.flow-head { display: flex; align-items: center; gap: 12px; width: 100%; padding: 16px 20px; border: 0; background: none; text-align: left; font: inherit; color: inherit; cursor: default; border-radius: var(--radius-lg); }
.js .flow-head { cursor: pointer; }
.js .flow-step:not(.is-open):not(.is-done) .step-name { color: var(--color-text-soft); }
.step-summary { margin-left: auto; font: 500 .88rem var(--font); color: var(--color-text-soft); text-align: right; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.step-edit { display: none; font: 600 .84rem var(--font); text-decoration: underline; text-decoration-color: var(--color-border-strong); text-underline-offset: 2px; white-space: nowrap; }
.js .flow-step.is-done:not(.is-open) .step-edit { display: inline; }
.flow-step.is-open .step-summary { display: none; }
.flow-body { padding: 0 20px 20px; }
.js .flow-step:not(.is-open) .flow-body { display: none; }
.flow-next { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-4); margin-top: var(--space-4); padding-top: var(--space-4); border-top: 1px solid var(--color-border); }
html:not(.js) [data-step-next], html:not(.js) [data-flow-skip], html:not(.js) .flow-recap, html:not(.js) .flow-steps { display: none; }
.flow-recap { background: var(--color-surface-2); border: 1px solid var(--color-border); border-radius: var(--radius); padding: 14px 16px; margin-bottom: var(--space-4); }
.more-fields { margin: 4px 0 0; }
.more-fields > summary { cursor: pointer; font-weight: 600; padding: 8px 0; }
.more-fields[open] > summary { margin-bottom: 8px; }
.field-label { display: block; font-weight: 600; font-size: .88rem; margin-bottom: 6px; }
.field .check { display: flex; }
.course-picker .pick-items { max-height: 380px; }
.seat-summary { margin: 10px 0 0; font-size: .9rem; font-weight: 600; }
.seat-summary.is-loading { font-weight: 500; color: var(--color-text-soft); }
.seat-warning { margin: 6px 0 0; font-size: .88rem; color: var(--color-danger); font-weight: 600; }
.seat-summary.is-empty { font-weight: 500; color: var(--color-text-soft); }
dialog.wide { max-width: 760px; }
dialog.wide .course-picker .pick-items { max-height: 42vh; }
.notice-line { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; padding: 10px 12px; margin-bottom: 12px; border: 1px solid var(--color-border); border-left: 3px solid var(--color-info); border-radius: var(--radius); background: var(--color-surface-2); }
/* „Weitere Aktionen“: seltene und endgültige Aktionen aus der Kopfzeile */
.more-menu { position: relative; }
.more-menu > summary { list-style: none; cursor: pointer; }
.more-menu > summary::-webkit-details-marker { display: none; }
.more-menu > summary::after { content: ""; display: inline-block; width: 7px; height: 7px; margin-left: 8px; border-right: 1.8px solid currentColor; border-bottom: 1.8px solid currentColor; transform: translateY(-2px) rotate(45deg); }
.more-menu-list { position: absolute; right: 0; top: calc(100% + 6px); z-index: 20; min-width: 230px; padding: 6px; background: var(--color-surface); border: 1px solid var(--color-border); border-radius: var(--radius-lg); box-shadow: 0 12px 32px rgba(41,41,41,.16); }
.more-menu-list a, .more-menu-list button { display: block; width: 100%; padding: 9px 12px; border: 0; background: none; border-radius: var(--radius); font: inherit; color: var(--ink); text-align: left; text-decoration: none; cursor: pointer; }
.more-menu-list a:hover, .more-menu-list button:hover { background: var(--color-surface-2); }
.more-menu-list form { margin: 0; }
.more-menu-list .danger { color: var(--color-danger); border-top: 1px solid var(--color-border); border-radius: 0 0 var(--radius) var(--radius); margin-top: 4px; padding-top: 11px; }
/* CSV-Import, Vorschau: Kurs und sein Platz-Etikett in einer Zeile */
.import-course { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; font-size: .85rem; margin-bottom: 6px; }
.import-course .check { margin: 0; align-items: center; }
.gap-form { display: flex; flex-wrap: wrap; justify-content: flex-end; align-items: center; gap: 8px; margin: 0; }
.gap-form select { max-width: 250px; min-height: 34px; }
.gap-form input[type=text] { min-height: 34px; }
.gap-courses { margin: 6px 0 0; padding-left: 18px; font-size: .88rem; color: var(--color-text-soft); }
