/* Gestaltung nach Corporate Design von www.ondev.cloud (Orange/Cyan, Barlow/Archivo, gerade Kanten)
   und Gebrauchstauglichkeit nach ISO 9241-110/-11 und WCAG 2.2 AA (Kontrast ≥ 4,5:1, Zielgrößen ≥ 24 px, besser 40 px) */
:root {
  --brand: #00719F; --brand-strong: #005A80; --brand-soft: #E6F4FA;   /* Cyan, textsicher (5,3:1 auf Weiß) */
  --accent: #EF7D00; --accent-text: #A85400; --accent-soft: #FDF0E1;   /* Orange: Hervorhebung, Logo, Fortschritt */
  --bg: #FCFCFA; --surface: #FFFFFF; --surface-2: #F2F3EF; --border: #E1E4DD;
  --text: #14181A; --muted: #4C5459; --danger: #B3261E; --danger-soft: #FCEDEC; --ok: #1B7F3B; --ok-soft: #E7F5EC;
  --warn: #8A5A00; --warn-soft: #FFF4DC;
  --radius: 2px; --shadow: 0 1px 2px rgba(20,24,26,.06), 0 4px 14px rgba(20,24,26,.06);
  --font: Barlow, "Segoe UI", system-ui, -apple-system, Roboto, Arial, sans-serif;
  --font-display: Archivo, "Helvetica Neue", Arial, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, Consolas, monospace;
  --target: 40px;   /* Mindest-Zielgröße für Bedienelemente (Fitts' Gesetz, WCAG 2.5.8) */
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --brand: #4FC3F7; --brand-strong: #8AD8FA; --brand-soft: #0E2A36;
    --accent: #FF9A2E; --accent-text: #FFB561; --accent-soft: #3A2710;
    --bg: #111416; --surface: #181C1F; --surface-2: #20262A; --border: #2E363B;
    --text: #ECEFEA; --muted: #A8B0AC; --danger: #FF8A80; --danger-soft: #3A1C1C; --ok: #5BD187; --ok-soft: #173325;
    --warn: #FFC65C; --warn-soft: #3A2E14;
    --shadow: 0 1px 2px rgba(0,0,0,.35), 0 4px 16px rgba(0,0,0,.35);
    color-scheme: dark;
  }
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { margin: 0; height: 100%; }
body { font: 16px/1.5 var(--font); background: var(--bg); color: var(--text); }
h1, h2, h3, .title, .logo { font-family: var(--font-display); letter-spacing: -0.01em; }
.rich p, .page p, .panel > p, .empty, .notice { max-width: 72ch; } /* Zeilenlänge 45–75 Zeichen */
a { color: var(--brand); }
button, input, select { font: inherit; color: inherit; }
.boot { display: grid; place-items: center; height: 100vh; color: var(--muted); }

/* Buttons & Formulare */
.btn { display: inline-flex; align-items: center; gap: 6px; border: 1px solid var(--border); background: var(--surface);
  padding: 8px 16px; min-height: var(--target); border-radius: var(--radius); cursor: pointer; text-decoration: none; color: var(--text); white-space: nowrap; }
.btn:hover { background: var(--surface-2); }
.btn:focus-visible, input:focus-visible, select:focus-visible, .nav a:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }
.btn.primary { background: var(--brand); border-color: var(--brand); color: #fff; }
.btn.primary:hover { background: var(--brand-strong); }
.btn.danger { color: var(--danger); border-color: var(--danger); background: transparent; }
.btn.danger:hover { background: var(--danger-soft); }
.btn.ghost { border-color: transparent; background: transparent; }
.btn.small { padding: 3px 9px; font-size: 13px; }
.btn[disabled] { opacity: .5; cursor: not-allowed; }
label.field { display: grid; gap: 4px; margin-bottom: 12px; font-size: 13px; color: var(--muted); }
input[type=text], input[type=email], input[type=password], input[type=number], input[type=search], select, textarea {
  width: 100%; padding: 9px 11px; border: 1px solid var(--border); border-radius: 8px; background: var(--surface); }
.check { display: flex; gap: 8px; align-items: flex-start; font-size: 13px; color: var(--muted); margin-bottom: 12px; }
.row { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.spacer { flex: 1; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.mono { font-family: var(--font-mono); font-size: 13px; word-break: break-all; }
.error { background: var(--danger-soft); color: var(--danger); padding: 8px 12px; border-radius: 8px; margin-bottom: 12px; }
.notice { background: var(--warn-soft); color: var(--warn); padding: 10px 14px; border-radius: 8px; margin-bottom: 14px; }
.success { background: var(--ok-soft); color: var(--ok); padding: 10px 14px; border-radius: 8px; margin-bottom: 14px; }
.badge { display: inline-block; font-size: 11px; padding: 1px 8px; border-radius: 99px; background: var(--brand-soft); color: var(--brand); font-weight: 600; }
.badge.ok { background: var(--ok-soft); color: var(--ok); }
.badge.warn { background: var(--warn-soft); color: var(--warn); }

/* Login */
.auth { min-height: 100vh; display: grid; grid-template-columns: 1fr 1fr; }
.auth-hero { background: #14181A; border-top: 6px solid #EF7D00; color: #fff; padding: 48px; display: flex; flex-direction: column; justify-content: center; }
.auth-hero h1 { font-size: 34px; margin: 0 0 12px; }
.auth-hero ul { padding-left: 18px; opacity: .92; }
.auth-hero li { margin: 6px 0; }
.auth-form { display: grid; place-items: center; padding: 32px 16px; }
.auth-form.full { min-height: 100vh; }
.divider { display: flex; align-items: center; gap: 10px; color: var(--muted); font-size: 12px; margin: 16px 0 12px; }
.divider::before, .divider::after { content: ''; flex: 1; border-top: 1px solid var(--border); }
.kv { display: grid; grid-template-columns: max-content 1fr; gap: 4px 12px; font-size: 13px; margin: 8px 0; }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; min-width: 0; overflow-wrap: anywhere; }
.clients.wide { grid-template-columns: 1fr; }
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); padding: 28px; width: 100%; max-width: 420px; }
.card h2 { margin: 0 0 16px; font-size: 22px; }
.logo { display: flex; align-items: center; gap: 10px; font-weight: 700; font-size: 18px; color: inherit; text-decoration: none; }
.logo img { width: 30px; height: 30px; }
@media (max-width: 860px) { .auth { grid-template-columns: 1fr; } .auth-hero { display: none; } }

/* Shell */
.shell { display: grid; grid-template-columns: 250px 1fr; grid-template-rows: 56px 1fr auto; min-height: 100vh; }
.top { grid-column: 1 / -1; display: flex; align-items: center; gap: 16px; padding: 0 16px; background: var(--surface); border-bottom: 1px solid var(--border); position: sticky; top: 0; z-index: 5; }
.top .search { flex: 1; max-width: 560px; }
.side { background: var(--surface); border-right: 1px solid var(--border); padding: 12px 8px; overflow-y: auto; }
.nav { display: grid; gap: 2px; }
.nav a { display: flex; align-items: center; gap: 10px; padding: 8px 12px; border-radius: 8px; color: var(--text); text-decoration: none; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.nav a:hover { background: var(--surface-2); }
.nav a.active { background: var(--brand-soft); color: var(--brand); font-weight: 600; }
.nav .head { font-size: 11px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); padding: 14px 12px 4px; display: flex; align-items: center; }
.main { padding: 20px 24px; min-width: 0; }
.foot { grid-column: 1 / -1; padding: 10px 24px; font-size: 12px; color: var(--muted); border-top: 1px solid var(--border); background: var(--surface); display: flex; gap: 16px; flex-wrap: wrap; }
.menu-btn { display: none; }
@media (max-width: 860px) {
  .shell { grid-template-columns: 1fr; }
  .side { position: fixed; inset: 56px 0 0 0; z-index: 10; display: none; }
  .side.open { display: block; }
  .menu-btn { display: inline-flex; }
  .top .who { display: none; }
  .main { padding: 14px; }
}

/* Dateien */
.crumbs { display: flex; flex-wrap: wrap; gap: 4px; align-items: center; font-size: 18px; margin-bottom: 14px; }
.crumbs a { text-decoration: none; color: var(--muted); }
.crumbs a:last-child { color: var(--text); font-weight: 600; }
.crumbs .sep { color: var(--muted); }
.toolbar { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 14px; }
.drop { border: 2px dashed transparent; border-radius: var(--radius); transition: border-color .15s, background .15s; }
.drop.over { border-color: var(--brand); background: var(--brand-soft); }
table.list { width: 100%; border-collapse: collapse; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; }
.list th, .list td { text-align: left; padding: 9px 12px; border-bottom: 1px solid var(--border); vertical-align: middle; }
.list th { font-size: 12px; font-weight: 600; color: var(--muted); background: var(--surface-2); }
.list tr:last-child td { border-bottom: none; }
.list tbody tr:hover { background: var(--surface-2); }
.list .name { display: flex; align-items: center; gap: 10px; min-width: 0; }
.list .name a, .list .name span.t { color: var(--text); text-decoration: none; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.list .name a:hover { text-decoration: underline; }
.list .actions { text-align: right; white-space: nowrap; }
.list td.hide-sm { white-space: nowrap; }
.toolbar .badge { align-self: center; }
.icon { width: 22px; height: 22px; flex: none; }
.empty { padding: 48px 16px; text-align: center; color: var(--muted); background: var(--surface); border: 1px dashed var(--border); border-radius: var(--radius); }
@media (max-width: 640px) { .list .hide-sm { display: none; } }

.uploads { position: fixed; right: 16px; bottom: 16px; width: 320px; max-width: calc(100vw - 32px); display: grid; gap: 8px; z-index: 30; }
.upload { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); padding: 10px 12px; font-size: 13px; }
.bar { height: 6px; background: var(--surface-2); border-radius: 99px; overflow: hidden; margin-top: 6px; }
.bar > i { display: block; height: 100%; background: var(--brand); width: 0; transition: width .2s; }

/* Panels */
.panel { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 20px; margin-bottom: 16px; }
.panel h3 { margin: 0 0 12px; font-size: 17px; }
.grid2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 16px; }
.stat { font-size: 26px; font-weight: 700; }
h1.title { font-size: 22px; margin: 0 0 16px; }

/* Downloads */
.clients { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 16px; }
.client { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 18px; display: flex; flex-direction: column; gap: 8px; }
.client.mine { border-color: var(--brand); box-shadow: 0 0 0 2px var(--brand-soft); }
.client h3 { margin: 0; font-size: 17px; display: flex; gap: 8px; align-items: center; }
.client .grow { flex: 1; }
pre.code { background: var(--surface-2); border: 1px solid var(--border); border-radius: 8px; padding: 10px 12px; overflow-x: auto; font-size: 13px; }

/* Modal & Toasts */
.backdrop { position: fixed; inset: 0; background: rgba(10,20,30,.45); display: grid; place-items: center; z-index: 40; padding: 16px; }
.modal { background: var(--surface); border-radius: var(--radius); box-shadow: var(--shadow); width: 100%; max-width: 520px; max-height: calc(100vh - 32px); overflow: auto; }
.modal header { padding: 16px 20px; border-bottom: 1px solid var(--border); font-weight: 600; font-size: 17px; }
.modal .body { padding: 18px 20px; }
.modal footer { padding: 12px 20px; border-top: 1px solid var(--border); display: flex; justify-content: flex-end; flex-wrap: wrap; gap: 8px; }
#toasts { position: fixed; left: 50%; transform: translateX(-50%); bottom: 20px; display: grid; gap: 8px; z-index: 50; }
.toast { background: #17212b; color: #fff; padding: 10px 16px; border-radius: 8px; box-shadow: var(--shadow); font-size: 14px; }
.toast.err { background: var(--danger); }
.toast .toast-act, .toast .toast-act:hover { color: #9fd0ff; font-weight: 600; margin-left: 12px; background: none; border: 0; cursor: pointer; font-size: 14px; text-decoration: underline; }
.toast { pointer-events: auto; }

/* Dateiverwaltung: Auswahl, Favoriten, Zielordner-Auswahl */
.list th.sel, .list td.sel { width: 34px; padding-right: 0; }
.selbar { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; padding: 8px 12px; margin-bottom: 10px; border-radius: var(--radius);
  background: var(--brand-soft); color: var(--brand); position: sticky; top: 64px; z-index: 4; }
.star { color: var(--muted); opacity: .35; font-size: 15px; padding: 0 4px; }
.star:hover, .star.on { opacity: 1; }
.star.on { color: #e3a237; }
.picker { display: grid; gap: 2px; max-height: 320px; overflow-y: auto; border: 1px solid var(--border); border-radius: 8px; padding: 6px; }
.picker .crumbs { font-size: 14px; margin: 2px 4px 6px; }
.pick { display: flex; gap: 8px; align-items: center; border: 0; background: transparent; padding: 7px 10px; border-radius: 6px; cursor: pointer; text-align: left; }
.pick:hover { background: var(--surface-2); }

/* Vorschau */
.modal.wide { max-width: min(1100px, calc(100vw - 32px)); }
.preview { display: grid; place-items: center; min-height: 200px; }
.preview-media { max-width: 100%; max-height: 70vh; border-radius: 6px; }
.preview-frame { width: 100%; height: 72vh; border: 1px solid var(--border); border-radius: 6px; background: #fff; }
.preview-text { width: 100%; max-height: 70vh; overflow: auto; white-space: pre-wrap; word-break: break-word; }

/* Office im Browser */
.office { position: fixed; inset: 0; z-index: 60; display: grid; grid-template-rows: auto 1fr; background: var(--bg); }
.office-bar { display: flex; gap: 10px; align-items: center; padding: 8px max(16px, env(safe-area-inset-left, 0px)); background: var(--surface); border-bottom: 1px solid var(--border); }
.office-frame { width: 100%; height: 100%; border: 0; background: #fff; }
@media (max-width: 640px) { .office-bar .badge { display: none; } }

/* Zusammenarbeit: Teilen-Dialog, Details, Benachrichtigungen */
.people { margin-bottom: 16px; padding-bottom: 12px; border-bottom: 1px solid var(--border); }
.people h4, .modal h4 { margin: 4px 0 8px; font-size: 14px; }
.tabs { display: flex; gap: 6px; margin-bottom: 12px; }
.tabs .btn.active { background: var(--brand-soft); color: var(--brand); border-color: var(--brand); }
.comments { display: grid; gap: 10px; margin-bottom: 12px; max-height: 45vh; overflow-y: auto; }
.comment { background: var(--surface-2); border-radius: 8px; padding: 8px 12px; }
.comment-body { white-space: pre-wrap; word-break: break-word; }
.details textarea { width: 100%; padding: 9px 11px; border: 1px solid var(--border); border-radius: 8px; background: var(--surface); margin-bottom: 8px; font: inherit; }
.bell-wrap { position: relative; }
.bell { position: relative; font-size: 17px; }
.bell-count { position: absolute; top: 0; right: 0; background: var(--danger); color: #fff; border-radius: 99px; font-size: 10px; padding: 0 5px; font-weight: 700; }
.bell-panel { position: absolute; right: 0; top: 42px; width: 360px; max-width: calc(100vw - 32px); max-height: 70vh; overflow-y: auto; background: var(--surface);
  border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); padding: 10px; z-index: 20; display: grid; gap: 6px; }
.notif { display: grid; gap: 2px; padding: 8px 10px; border-radius: 8px; color: var(--text); text-decoration: none; }
.notif:hover { background: var(--surface-2); }
.notif.unread { background: var(--brand-soft); }

/* Nur-Ansicht mit Wasserzeichen (öffentliche Freigabe) */
.viewonly { position: relative; width: min(900px, 100%); }
.viewonly img, .viewonly video { max-width: 100%; display: block; margin: 0 auto; border-radius: 6px; }
.viewonly iframe { width: 100%; height: 70vh; border: 1px solid var(--border); border-radius: 6px; background: #fff; }
.viewonly pre { max-height: 70vh; overflow: auto; white-space: pre-wrap; }
.watermark { position: absolute; inset: 0; pointer-events: none; overflow: hidden; display: grid; place-items: center; }
.watermark span { transform: rotate(-28deg); font-size: clamp(14px, 2.4vw, 22px); font-weight: 700; color: rgba(200, 30, 30, .22); white-space: nowrap; line-height: 3.2; text-align: center; }
.card.card-wide { max-width: min(960px, 100%); }

/* Suche, Tags, Berichte */
.tag { display: inline-block; font-size: 11px; padding: 0 7px; border-radius: 99px; background: var(--surface-2); color: var(--muted); text-decoration: none; border: 1px solid var(--border); white-space: nowrap; }
.tag:hover { color: var(--brand); border-color: var(--brand); }
.snippet { margin: 2px 0 0 32px; }
.snippet mark { background: #fff3b0; color: inherit; padding: 0 1px; border-radius: 2px; }
.kpis { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; margin: 8px 0 12px; }
.kpi { border: 1px solid var(--border); border-radius: 8px; padding: 10px 12px; }
.kpi.warn { border-color: var(--warn); background: var(--warn-soft); }
.kpi-v { font-size: 20px; font-weight: 700; font-variant-numeric: tabular-nums; }
.panel textarea { width: 100%; padding: 9px 11px; border: 1px solid var(--border); border-radius: 8px; background: var(--surface); font: inherit; }

/* Paket E: Intranet, Listen, Workflows, KI */
.badge.err { background: var(--danger-soft); color: var(--danger); }
.tabs { flex-wrap: wrap; }
.panel h2 { margin: 0 0 12px; font-size: 18px; }
.news { border-top: 1px solid var(--border); padding: 12px 0; }
.news:first-of-type { border-top: 0; }
.news h3 { margin: 4px 0; font-size: 16px; }
.news.must { border-left: 4px solid var(--warn); padding-left: 12px; }
.news .badge { margin-left: 6px; }
.rich h2, .rich h3, .rich h4 { margin: 14px 0 6px; }
.rich p { margin: 6px 0; }
.rich ul { margin: 6px 0; padding-left: 22px; }
.page .title { margin-top: 4px; }
.ai-answer { margin-top: 12px; padding: 12px 14px; border: 1px dashed var(--brand); border-radius: 8px; background: var(--brand-soft); }
.row > input[type="text"] { flex: 1; min-width: 0; }
.cols .col { gap: 6px; margin-bottom: 6px; flex-wrap: wrap; }
.cols .col input[type="text"] { flex: 1; min-width: 120px; }
fieldset { border: 1px solid var(--border); border-radius: 8px; margin: 0 0 12px; padding: 10px 12px 0; }
legend { font-weight: 600; padding: 0 4px; }
.scroll-x { overflow-x: auto; }
.list.grid th { text-align: left; font-size: 13px; color: var(--muted); white-space: nowrap; }
textarea { font: inherit; color: inherit; width: 100%; }
select.lang { padding: 2px 6px; border: 1px solid var(--border); border-radius: 6px; background: var(--surface); }

/* Barrierefreiheit */
.skip { position: absolute; left: 8px; top: -60px; z-index: 1000; background: var(--brand); color: #fff; padding: 8px 14px; border-radius: 8px; }
.skip:focus { top: 8px; }
main:focus { outline: none; }
textarea:focus-visible, a:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } }
@media (forced-colors: active) {
  .btn, .badge, .panel, .modal, input, select, textarea { border: 1px solid CanvasText; }
  .btn.primary, .nav a.active, .tabs .btn.active { forced-color-adjust: none; background: Highlight; color: HighlightText; }
  .icon path { stroke: CanvasText; }
}

/* ondev ID */
.apps { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; margin-bottom: 16px; }
.app-tile { display: grid; justify-items: center; gap: 6px; padding: 16px 10px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); color: var(--text); text-decoration: none; text-align: center; }
.app-tile:hover { border-color: var(--brand); }
.app-icon { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 12px; background: var(--brand-soft); color: var(--brand); font-weight: 700; font-size: 20px; }

/* Umzugs-Assistent */
.provider-pick { display: flex; flex-wrap: wrap; gap: 8px; margin: 8px 0 14px; }
.wizard fieldset { margin-bottom: 12px; }
.dir-import { margin-top: 16px; border-top: 1px solid var(--border); padding-top: 10px; }
.dir-import summary { cursor: pointer; font-weight: 600; }

/* Erste Schritte */
.onboarding { border-color: var(--brand); }
.progress { height: 6px; background: var(--surface-2); border-radius: 99px; overflow: hidden; margin: 4px 0 12px; }
.progress i { display: block; height: 100%; background: var(--brand); }
.steps { list-style: none; margin: 0; padding: 0; }
.steps li { display: flex; align-items: center; gap: 12px; padding: 10px 0; border-top: 1px solid var(--border); }
.steps li:first-child { border-top: 0; }
.steps li.done { opacity: .65; }
.steps li.next { background: var(--brand-soft); margin: 0 -12px; padding: 10px 12px; border-radius: 8px; }
.steps .tick { display: grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; border: 2px solid var(--brand); color: var(--brand); font-weight: 700; flex: none; }
.steps li.done .tick { background: var(--brand); color: #fff; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
@media (max-width: 640px) { .steps li { flex-wrap: wrap; } .steps li .btn { margin-left: 38px; } }

/* Gebrauchstauglichkeit: ausreichend große Ziele, klare Fokusmarkierung, Hauptaktion in Akzentfarbe */
.btn.small { min-height: 32px; }
input[type="text"], input[type="email"], input[type="password"], input[type="search"], input[type="date"], select, textarea { min-height: var(--target); border-radius: var(--radius); }
input[type="checkbox"] { width: 20px; height: 20px; accent-color: var(--brand); }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
.logo { font-weight: 800; }
.steps li.next { background: var(--accent-soft); }
.progress i { background: var(--accent); }
.steps .tick { border-color: var(--accent); color: var(--accent-text); }
.steps li.done .tick { background: var(--accent); color: #14181A; }
.news.must { border-left-color: var(--accent); }
.skip { background: var(--accent); color: #14181A; }

.icon { color: var(--brand); }

/* App-Store, Kennzahlen, Anwesenheit */
.store-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 14px; }
.store-card { display: grid; gap: 8px; align-content: start; margin: 0; }
.store-card h3 { margin: 0; font-size: 17px; }
.tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 12px; margin-bottom: 14px; }
.stat-tile { margin: 0; text-decoration: none; color: var(--text); }
.stat-tile .stat { font-family: var(--font-display); font-size: 26px; font-weight: 800; }
.presence { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; color: var(--accent-text); margin-left: 8px; }
.presence .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--accent); animation: pulse 2s infinite; }
@keyframes pulse { 50% { opacity: .35; } }

/* Listen als Board (Kanban) */
.seg { display: inline-flex; }
.seg .btn { border-radius: 0; }
.seg .btn[aria-pressed="true"], .seg .btn[aria-current="page"] { background: var(--text); color: var(--bg); border-color: var(--text); }
/* Galerie und Summenzeile */
.gallery { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 12px; }
.gallery-card { border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); overflow: hidden; }
.gallery-hit { display: block; width: 100%; padding: 0; border: 0; background: none; font: inherit; color: inherit; text-align: left; cursor: pointer; }
.gallery-hit:disabled { cursor: default; }
.gallery-hit:focus-visible { outline: 2px solid var(--brand); outline-offset: -2px; }
.gallery-card:hover { border-color: var(--brand); }
.gallery-img { aspect-ratio: 4 / 3; background: var(--bg); display: flex; align-items: center; justify-content: center; overflow: hidden; }
.gallery-img img { width: 100%; height: 100%; object-fit: cover; }
.gallery-ph { font-size: 40px; opacity: .5; }
.gallery-body { padding: 8px 10px; display: flex; flex-direction: column; gap: 2px; }
.gallery-body .tone { border-radius: 4px; padding: 0 4px; }
.list tfoot td.agg { font-weight: 600; border-top: 2px solid var(--border); white-space: nowrap; }
/* Personen und Organigramm */
.org-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 10px; margin: 8px 0; }
.org-card { display: flex; gap: 10px; align-items: center; padding: 10px 12px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); color: var(--text); text-decoration: none; min-height: 56px; }
.org-card:hover { border-color: var(--brand); }
.org-card.current { border: 2px solid var(--brand); background: var(--brand-soft); }
.org-text { display: flex; flex-direction: column; min-width: 0; }
.org-text > * { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.avatar { flex: none; width: 36px; height: 36px; border-radius: 999px; background: var(--brand); color: var(--surface); display: inline-flex; align-items: center; justify-content: center; font-weight: 700; font-size: 13px; }
.avatar.big { width: 64px; height: 64px; font-size: 22px; }
img.avatar { object-fit: cover; background: var(--bg); }
.person-head { display: flex; gap: 16px; align-items: center; }
.org-chain { list-style: none; padding: 0; margin: 0 0 4px; display: flex; flex-direction: column; align-items: flex-start; }
.org-chain li { position: relative; padding-bottom: 14px; }
.org-chain li::after { content: ''; position: absolute; left: 30px; bottom: 2px; height: 10px; border-left: 2px solid var(--border); }
.org-chain li .org-card, .org-self .org-card { display: inline-flex; min-width: 260px; max-width: 100%; }
.org-self { margin-bottom: 8px; }
/* Berechnete Spalten und Hervorhebung */
td.calc { color: var(--muted); }
td.tone-red { background: var(--danger-soft); color: var(--danger); }
td.tone-amber { background: var(--warn-soft); color: var(--warn); }
td.tone-green { background: var(--ok-soft); color: var(--ok); }
td.tone-blue { background: var(--brand-soft); color: var(--brand-strong); }
td.tone-grey { color: var(--muted); }
td.tone-bold { font-weight: 700; }
.col-edit { border-bottom: 1px solid var(--border); padding: 6px 0; }
.col-edit .mono { font-family: var(--font-mono); width: 100%; margin-top: 4px; }
.fmt-box { margin-top: 4px; }
.fmt-rule { gap: 6px; margin: 4px 0; flex-wrap: wrap; }
.fmt-rule input[type=text] { width: 9em; }
/* Duplikate */
.dup-group { border: 1px solid var(--border); border-radius: var(--radius); padding: 8px 12px; margin: 10px 0; }
.dup-group legend { font-weight: 600; padding: 0 4px; }
.dup-item { display: flex; gap: 10px; align-items: flex-start; padding: 6px 0; }
.dup-item + .dup-item { border-top: 1px solid var(--border); }
.dup-item input { margin-top: 3px; }
/* Kalenderansicht für Listen */
.cal-title { min-width: 11em; text-align: center; }
.cal-grid { width: 100%; border-collapse: collapse; table-layout: fixed; min-width: 640px; }
.cal-grid th { font-size: 12px; font-weight: 600; color: var(--muted); padding: 6px; text-align: left; }
.cal-day { vertical-align: top; height: 96px; border: 1px solid var(--border); padding: 4px; background: var(--surface); }
.cal-day.other { background: var(--bg); color: var(--muted); }
.cal-day.today .cal-num { background: var(--brand); color: var(--surface); font-weight: 700; border-radius: 999px; padding: 0 6px; }
.cal-head { display: flex; align-items: center; justify-content: space-between; font-size: 12px; min-height: 22px; }
.cal-add { opacity: 0; padding: 0 6px; }
.cal-day:hover .cal-add, .cal-add:focus-visible { opacity: 1; }
@media (hover: none) { .cal-add { opacity: .6; } }
.cal-item { display: block; width: 100%; text-align: left; font: inherit; font-size: 12px; margin-top: 3px; padding: 2px 6px; border-radius: 4px;
  border: 0; background: var(--brand-soft); color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; cursor: pointer; }
.cal-item:disabled { cursor: default; }
.cal-item:hover:not(:disabled) { outline: 1px solid var(--brand); }
.board { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(240px, 1fr); gap: 12px; overflow-x: auto; padding-bottom: 8px; }
.lane { background: var(--surface-2); border: 1px solid var(--border); border-radius: 2px; padding: 10px; min-height: 120px; }
.lane.over { outline: 2px dashed var(--accent); }
.lane h3 { font-size: 14px; margin: 0 0 8px; }
.card-item { background: var(--surface); border: 1px solid var(--border); border-radius: 2px; padding: 10px; margin-bottom: 8px; display: grid; gap: 6px; }
.card-item[draggable="true"] { cursor: grab; }
.card-item select { min-height: 32px; font-size: 13px; }
.linkish { background: none; border: 0; padding: 0; text-align: left; font: inherit; font-weight: 600; color: var(--text); cursor: pointer; }
.linkish:hover { text-decoration: underline; }
.checklist { padding-left: 20px; display: grid; gap: 8px; }

/* Zurücksetzen-Assistent */
.row.wrap { flex-wrap: wrap; gap: 6px; }
.rewind-list { max-height: 220px; overflow: auto; padding-left: 0; list-style: none; display: grid; gap: 4px; }

/* Partner-Sitzung: immer sichtbar, in wessen Organisation gearbeitet wird */
.partner-banner { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 16px; justify-content: space-between; background: var(--accent-soft); border: 1px solid var(--accent); color: var(--text); padding: 10px 14px; margin-bottom: 16px; border-radius: 2px; }

/* --- Status-Seite und Dienstzustand --- */
.status-page { max-width: 860px; margin: 0 auto; padding: 24px 16px 48px; }
.status-page h2 { font-size: 18px; margin: 28px 0 12px; }
.status-page .panel h2 { margin-top: 0; }
.status-head { display: flex; align-items: center; gap: 12px; margin-bottom: 20px; flex-wrap: wrap; }
.status-overall { display: flex; gap: 14px; align-items: center; padding: 18px 20px; border-radius: var(--radius); margin-bottom: 8px; font-size: 18px; }
.status-overall .small { font-size: 13px; opacity: .85; }
.status-overall .dot { width: 14px; height: 14px; border-radius: 50%; background: currentColor; flex: none; box-shadow: 0 0 0 4px color-mix(in srgb, currentColor 20%, transparent); }
.status-overall.ok, .status-pill.ok { background: var(--ok-soft); color: var(--ok); }
.status-overall.warn, .status-pill.warn { background: var(--warn-soft); color: var(--warn); }
.status-overall.err, .status-pill.err { background: var(--danger-soft); color: var(--danger); }
.status-overall.info, .status-pill.info { background: var(--brand-soft); color: var(--brand); }
.status-pill { font-size: 12px; font-weight: 600; padding: 2px 10px; border-radius: 99px; white-space: nowrap; }
.status-comp { padding: 12px 0; border-bottom: 1px solid var(--border); }
.status-comp:last-of-type { border-bottom: 0; }
.status-bars { display: grid; grid-template-columns: repeat(90, 1fr); gap: 2px; height: 28px; margin: 8px 0 4px; }
.status-bars i { border-radius: 2px; background: var(--ok); opacity: .75; }
.status-bars i.warn { background: var(--warn); opacity: 1; }
.status-bars i.err { background: var(--danger); opacity: 1; }
.status-bars i.info { background: var(--brand); opacity: 1; }
.status-bars i:hover { opacity: 1; outline: 1px solid var(--text); }
@media (max-width: 560px) { .status-bars { grid-template-columns: repeat(45, 1fr); } .status-bars i:nth-child(-n+45) { display: none; } }
.status-incident { background: var(--surface); border: 1px solid var(--border); border-left: 4px solid var(--ok); border-radius: var(--radius); padding: 16px 18px; margin-bottom: 12px; }
.status-incident.warn { border-left-color: var(--warn); }
.status-incident.err { border-left-color: var(--danger); }
.status-incident.info { border-left-color: var(--brand); }
.status-incident h3 { margin: 0 0 2px; font-size: 16px; }
.status-timeline { list-style: none; margin: 12px 0 0; padding: 0 0 0 14px; border-left: 2px solid var(--border); }
.status-timeline li { margin-bottom: 10px; }
.status-timeline p { margin: 2px 0 0; }
.status-sub { display: flex; gap: 8px; flex-wrap: wrap; }
.status-sub input, .status-sub select { width: auto; margin: 0; }
.status-sub input { flex: 1 1 220px; }
.status-page footer { margin-top: 32px; text-align: center; }
.pre { white-space: pre-wrap; }
.health-banner { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; padding: 8px 8px 8px 16px; margin-bottom: 16px; background: var(--warn-soft); color: var(--warn); border-radius: var(--radius); font-size: 14px; }
.health-banner.err { background: var(--danger-soft); color: var(--danger); }
.health-banner.info { background: var(--brand-soft); color: var(--brand); }

/* Elektronische Signatur: öffentliche Seite /sign/… und /verify */
.sign-page { max-width: 820px; margin: 0 auto; padding: 24px 16px 48px; display: grid; gap: 16px; }
.sign-page .card { width: 100%; max-width: none; }
.sign-card h1 { font-size: 1.5rem; margin: 0 0 6px; }
.sign-card h2, .sign-doc h2 { font-size: 1.15rem; margin: 0 0 8px; overflow-wrap: anywhere; }
.sign-message { margin: 10px 0; padding: 8px 14px; border-left: 3px solid var(--accent); background: var(--surface-2); white-space: pre-wrap; }
.sign-people { margin: 0; padding-left: 20px; display: grid; gap: 4px; }
.sign-preview { display: block; width: 100%; height: 70vh; min-height: 360px; border: 1px solid var(--border); background: var(--surface-2); margin: 12px 0; }
.sign-preview.img { height: auto; min-height: 0; max-height: 70vh; object-fit: contain; }
.sign-pad .tabs { margin-bottom: 8px; }
.sign-box { position: relative; border: 1px dashed var(--muted); background: var(--surface); }
.sign-box.typed { padding: 12px; border-style: solid; border-color: var(--border); }
.sign-canvas { display: block; width: 100%; aspect-ratio: 3 / 1; touch-action: none; cursor: crosshair; background: #FCFCFA; }
.sign-hint { position: absolute; left: 16px; bottom: 22%; color: #8A9096; pointer-events: none; border-top: 1px solid #C3C8BE; padding-top: 4px; width: calc(100% - 32px); font-size: 14px; }
.sign-clear { position: absolute; right: 6px; top: 6px; }
.sign-typed { font: italic 34px/1.3 Georgia, "Times New Roman", serif; color: #0B2E6B; min-height: 56px; border-bottom: 1px solid #C3C8BE; margin-bottom: 10px; overflow-wrap: anywhere; }
.sign-consent { display: flex; gap: 10px; align-items: flex-start; margin: 14px 0; line-height: 1.4; }
.sign-consent input { width: 22px; height: 22px; flex: none; margin-top: 2px; }
.sign-step { background: var(--surface-2); padding: 12px 14px; margin-bottom: 12px; }
.sign-step input { max-width: 140px; letter-spacing: .2em; font-family: var(--font-mono); }
.btn.big { min-height: 48px; padding: 10px 22px; font-weight: 600; }
.sign-foot { text-align: center; }
.sign-result.ok { border-left: 4px solid var(--ok); }
.sign-result.bad { border-left: 4px solid var(--danger); }
.sign-result.ok h2 { color: var(--ok); }
.sign-result.bad h2 { color: var(--danger); }
.sign-facts { display: grid; grid-template-columns: max-content 1fr; gap: 6px 16px; margin: 10px 0 0; }
.sign-facts dt { color: var(--muted); }
.sign-facts dd { margin: 0; overflow-wrap: anywhere; }
.sign-facts ul { margin: 0; padding-left: 18px; }
@media (max-width: 560px) { .sign-facts { grid-template-columns: 1fr; } .sign-facts dd { margin-bottom: 6px; } }
.sig-progress { display: inline-block; width: 80px; height: 6px; background: var(--surface-2); vertical-align: middle; margin-right: 6px; }
.sig-progress i { display: block; height: 100%; background: var(--accent); }
.sig-signer { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.sig-signer input { flex: 1 1 180px; }
.notice.ok { background: var(--ok-soft); color: var(--ok); }
.grid { display: grid; }
div.field { display: grid; gap: 6px; margin-bottom: 12px; font-size: 13px; color: var(--muted); }

/* Nachrichtencenter */
.nav-count { margin-left: auto; min-width: 20px; padding: 0 6px; border-radius: 99px; background: var(--accent); color: #14181A; font-size: 11px; font-weight: 700; text-align: center; line-height: 18px; }
.msg-list tr.unread .msg-title { font-weight: 700; }
.msg-title { display: inline-flex; align-items: center; gap: 8px; color: inherit; text-decoration: none; }
.msg-title:hover { text-decoration: underline; }
.msg-title .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--brand); flex: none; }
.msg-title .dot.upd { background: var(--accent); }
button.kpi { text-align: left; font: inherit; color: inherit; background: var(--surface); cursor: pointer; }
button.kpi:hover { border-color: var(--brand); }
.msg-facts { display: grid; grid-template-columns: max-content 1fr; gap: 4px 16px; margin: 12px 0; font-size: 14px; }
.msg-facts dt { color: var(--muted); }
.msg-facts dd { margin: 0; }
.msg-body { margin: 12px 0; line-height: 1.55; }
.msg-action { border-left: 4px solid var(--accent); background: var(--surface-2); padding: 10px 14px; margin: 12px 0; }
.msg-done { margin-top: 12px; }

/* Meine Aufgaben */
ul.tasks { list-style: none; margin: 0; padding: 0; }
li.task { display: flex; align-items: center; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--border); }
li.task:last-child { border-bottom: 0; }
li.task input[type=checkbox] { width: 20px; height: 20px; flex: none; }
li.task.done a { text-decoration: line-through; color: var(--muted); }
li.task .grow { flex: 1; min-width: 0; }
.task-group.warn h2 { color: var(--warn); }
.task-group h2 { font-size: 17px; margin: 0 0 4px; }
tr.overdue td:first-child { box-shadow: inset 3px 0 0 var(--warn); }

/* Kommentare und Reaktionen */
.reactions { display: flex; gap: 6px; flex-wrap: wrap; margin: 4px 0 12px; }
.btn.react.active { background: var(--brand-soft); border-color: var(--brand); color: var(--brand); }
ul.comments { list-style: none; margin: 0 0 12px; padding: 0; }
ul.comments.replies { margin: 8px 0 0 18px; padding-left: 12px; border-left: 2px solid var(--border); }
li.comment { padding: 10px 0; border-bottom: 1px solid var(--border); }
ul.replies li.comment:last-child, li.comment:last-child { border-bottom: 0; }
li.comment p { margin: 4px 0; }
li.comment.hidden-c > p:first-of-type { font-style: italic; }
.comment-form { display: flex; flex-direction: column; gap: 6px; align-items: flex-start; margin-top: 8px; }
.comment-form textarea { width: 100%; }

/* Auswertung von Listen und Formularen */
table.bars { width: 100%; border-collapse: collapse; margin: 4px 0 12px; }
table.bars th { text-align: left; font-weight: 500; padding: 4px 10px 4px 0; width: 30%; font-size: 14px; }
table.bars td { padding: 4px 0; }
table.bars td.num { width: 110px; text-align: right; font-variant-numeric: tabular-nums; font-size: 14px; padding-left: 8px; }
.bar-cell { background: var(--surface-2); border-radius: 4px; height: 14px; }
.bar-fill { display: block; height: 14px; background: var(--brand); border-radius: 0 4px 4px 0; min-width: 2px; }
.days { display: flex; align-items: flex-end; gap: 2px; height: 60px; margin: 4px 0 14px; border-bottom: 1px solid var(--border); }
.days .day { flex: 1; background: var(--brand); border-radius: 2px 2px 0 0; min-height: 2px; }
.summary-col { margin-top: 10px; }

/* Kurzumfrage */
.panel.survey { border-left: 4px solid var(--accent); }
.scale { display: flex; gap: 6px; flex-wrap: wrap; margin: 4px 0 10px; }
.scale-opt { display: inline-flex; flex-direction: column; align-items: center; gap: 2px; min-width: 36px; padding: 4px 0; border: 1px solid var(--border); border-radius: 6px; cursor: pointer; font-size: 13px; }
.scale-opt:has(input:checked) { border-color: var(--brand); background: var(--brand-soft); }
.days.weeks { height: 48px; }

/* Video mit Untertiteln und Kapiteln */
.media-wrap { display: grid; gap: 12px; width: 100%; }
.media-side h4 { margin: 4px 0; }
ol.chapters { margin: 0 0 8px; padding-left: 20px; }
ol.chapters li { margin: 2px 0; }

/* Checklisten je Aufgabe */
ul.checklist { list-style: none; margin: 4px 0 8px; padding: 0; display: grid; gap: 6px; }
ul.checklist li { display: flex; align-items: center; gap: 8px; }
ul.checklist li input[type=text] { flex: 1; min-width: 0; }
ul.checklist li input[type=checkbox] { width: 18px; height: 18px; flex: none; }
li.task details.task-steps summary { cursor: pointer; color: var(--muted); margin-top: 2px; }
li.task details.task-steps label.check span { font-size: 0.92em; }
ul.checklist li { border: 0; padding: 0; background: none; }
ul.checklist label.check { margin: 0; padding: 0; border: 0; }
li.task:has(details.task-steps) { align-items: flex-start; }
li.task:has(details.task-steps) > input[type=checkbox] { margin-top: 2px; }

/* Reichweite einer News */
.reach-curve { display: flex; align-items: flex-end; gap: 3px; height: 52px; margin-top: 12px; }
.reach-curve span { flex: 1; background: var(--accent); border-radius: 3px 3px 0 0; min-width: 6px; }
details.reach .stat { font-size: 22px; font-weight: 600; }
.reach-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 12px; margin-top: 8px; }

/* Untertitel korrigieren */
.cue-list { display: grid; gap: 8px; max-height: 60vh; overflow-y: auto; }
.cue { display: grid; grid-template-columns: 48px 80px 80px 1fr; gap: 8px; align-items: start; }
.cue textarea { min-height: 2.6em; }
@media (max-width: 640px) { .cue { grid-template-columns: 48px 1fr 1fr; } .cue textarea { grid-column: 1 / -1; } }
/* Mehrseitige Formulare */
.pager { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-top: 8px; }
.pager .small { flex: 1; text-align: center; }

/* Listen: Verlauf, Papierkorb, CSV-Import */
.hist { list-style: none; margin: 0; padding: 0; }
.hist > li { border-left: 3px solid var(--border); padding: 6px 0 10px 12px; margin-left: 4px; }
.hist > li:first-child { border-left-color: var(--accent, var(--primary)); }
.hist-head { display: flex; align-items: center; gap: 4px; flex-wrap: wrap; }
.hist-head .spacer { flex: 1; }
.hist-changes { margin-top: 4px; border-collapse: collapse; font-size: .9em; }
.hist-changes th { text-align: left; font-weight: 500; color: var(--muted); padding: 2px 12px 2px 0; vertical-align: top; white-space: nowrap; }
.hist-changes td { padding: 2px 0; overflow-wrap: anywhere; }
.hist-changes del { color: var(--muted); }
.imp-errors { max-height: 220px; overflow: auto; padding-left: 18px; margin: 6px 0; }
.imp-errors li { margin: 2px 0; }

/* Listen: Kommentare je Eintrag */
ul.row-comments { max-height: 50vh; overflow-y: auto; }
.row-comment-form textarea { width: 100%; box-sizing: border-box; }
td.actions .btn.ghost { min-width: 2.6em; }
.row-comment-form .row { display: flex; align-items: center; gap: 8px; margin-top: 6px; }
.row-comment-form .row .spacer { flex: 1; }

/* Kachelansicht in Ordnern */
.gallery.tiles { grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); }
.tile { position: relative; display: flex; flex-direction: column; }
.tile .gallery-img { display: flex; }
.tile-sel { position: absolute; top: 8px; left: 8px; z-index: 1; width: 20px; height: 20px; accent-color: var(--brand); }
.tile-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 600; }
.tile-actions { display: flex; gap: 6px; padding: 0 10px 10px; margin-top: auto; }
.row-thumb { width: 24px; height: 24px; object-fit: cover; border-radius: var(--radius); flex: none; background: var(--surface-2); }

/* Sortieren und Filtern in Ordnern */
.folder-tools { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 0 0 12px; }
.folder-tools .folder-filter { flex: 1 1 220px; min-width: 0; }
.folder-tools label.inline { display: inline-flex; align-items: center; gap: 6px; margin: 0; white-space: nowrap; }
.th-sort { all: unset; cursor: pointer; display: inline-flex; gap: 4px; align-items: center; font-weight: inherit; }
.th-sort:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }
.sort-ind { font-size: 10px; color: var(--muted); }
@media (max-width: 600px) { .folder-tools .folder-filter { flex-basis: 100%; } }

/* Aktionsmenü „⋯“ je Zeile (Handy) und per Rechtsklick */
.row-more { display: none; }
.menu { position: fixed; z-index: 40; min-width: 190px; max-width: calc(100vw - 16px); max-height: calc(100vh - 16px); overflow-y: auto; padding: 4px 0;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); }
.menu-item { all: unset; box-sizing: border-box; display: block; width: 100%; padding: 10px 16px; cursor: pointer; color: var(--text); white-space: nowrap; }
.menu-item:hover, .menu-item:focus { background: var(--surface-2); }
.menu-item:focus-visible { outline: 2px solid var(--brand); outline-offset: -2px; }
.menu-item.danger { color: var(--danger, #b42318); }
@media (max-width: 640px) {
  .list td.row-acts > :not(.row-more):not(.primary) { display: none; }
  .list td.row-acts .row-more { display: inline-flex; min-width: 2.6em; justify-content: center; }
  .list td.row-acts { padding-left: 4px; }
}

/* Abwesenheit im Personenverzeichnis und Profil */
.org-card .absent-badge { align-self: flex-start; margin-top: 4px; }
.absent-note { margin: 10px 0 0; }
.absent-msg { white-space: pre-line; margin-top: 4px; overflow-wrap: anywhere; }

/* Tastenkürzel: aktive Zeile bzw. Kachel sichtbar markieren (WCAG 2.4.7) */
.item-row:focus { outline: none; }
.item-row:focus-visible { outline: 2px solid var(--brand); outline-offset: -2px; background: var(--surface-2); }
kbd { display: inline-block; min-width: 1.4em; padding: 1px 6px; border: 1px solid var(--border); border-bottom-width: 2px; border-radius: 4px; background: var(--surface-2); font: inherit; font-size: .85em; text-align: center; }
.list.keys td:first-child { white-space: nowrap; width: 1%; padding-right: 16px; }
@media (max-width: 640px) { .keys-btn { display: none; } }

/* Benachrichtigen: Einträge nur im Menü „⋯“/Rechtsklick, Glocke an gefolgten Zeilen */
.list td.row-acts > .menu-only { display: none !important; }
.follow-bell { padding: 0 4px; font-size: .9em; }
.follow-opt { align-items: flex-start; margin: 10px 0; }
.block { display: block; }

/* Verknüpfungen in „Mein Laufwerk“ */
.shortcuts { margin: 4px 0 12px; }
.shortcuts h2 { margin: 0 0 4px; font-weight: 600; }
.shortcuts .sc-arrow { font-size: 12px; margin-left: -6px; color: var(--accent, #2563eb); }
.shortcuts tr.gone .name { opacity: .7; }

/* Ausscheiden: Abwesenheitsnotiz unter dem Postfach-Haken */
.offboard-reply { margin: 4px 0 8px 28px; }
.offboard-reply textarea { width: 100%; margin-top: 4px; }

/* Benutzer-Import: Vorschau scrollt im Dialog */
.import-preview { max-height: 320px; overflow: auto; border: 1px solid var(--border); border-radius: 8px; }
.danger-text { color: var(--danger, #b42318); }

/* Benutzerliste der Verwaltung: Suche und Filter */
.user-filter { margin: 8px 0; gap: 8px; flex-wrap: wrap; align-items: center; }
.user-filter input[type=search] { flex: 1 1 240px; min-width: 0; }
/* Anmeldung blockieren, Mehrfachauswahl in der Benutzerliste */
.badge.danger { background: var(--danger-soft); color: var(--danger); }
#admin-users th.sel, #admin-users td.sel { width: 28px; padding-right: 0; }
#admin-users tr.blocked td:not(.sel):not(.actions) { opacity: .75; }
.block-info { margin-top: 2px; }
.bulk-bar { position: sticky; top: 0; z-index: 2; gap: 8px; flex-wrap: wrap; align-items: center; padding: 8px 12px; margin: 4px 0 8px; border-radius: 8px; background: var(--warn-soft); }
.bulk-bar[hidden] { display: none; }
.block-effects { margin: 4px 0 12px 18px; padding: 0; }
.small.warn { color: var(--warn); }
.tpl-space { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.tpl-space select { width: auto; min-width: 140px; margin: 0; }

/* E-Mail-Signaturen */
.signature-preview { white-space: pre-wrap; font-family: Arial, sans-serif; font-size: 13px; line-height: 1.45; background: var(--surface-2); color: var(--text); border: 1px solid var(--border); border-radius: 6px; padding: 10px 12px; margin: 8px 0; }
.signature-preview.small { font-size: 12px; color: var(--muted); }

/* Mailfluss-Regeln */
.rule-sentence { display: flex; flex-wrap: wrap; gap: 4px 8px; align-items: baseline; margin-top: 6px; }
.rule-key { font-weight: 600; color: var(--accent-text); text-transform: uppercase; font-size: 11px; letter-spacing: .04em; }
.rule-part { background: var(--surface-2); border: 1px solid var(--border); border-radius: 4px; padding: 1px 6px; }

/* Organisationsdesign */
.logo img.org-logo { width: auto; max-width: 180px; height: 30px; object-fit: contain; }
.brand-logo-preview { max-height: 40px; max-width: 200px; object-fit: contain; border: 1px solid var(--border); padding: 4px; background: #fff; }
.brand-sample { display: flex; flex-direction: column; gap: 6px; padding: 10px 12px; border: 1px solid var(--border); border-radius: 6px; min-width: 130px; }
.brand-sample.brand-light { background: #FFFFFF; color: #14181A; }
.brand-sample.brand-dark { background: #181C1F; color: #ECEFEA; }
.brand-sample .brand-btn { display: inline-block; padding: 6px 10px; border-radius: 2px; color: #fff; background: var(--brand); font-weight: 600; text-align: center; }
.brand-sample.brand-dark .brand-btn { color: #111416; }
.brand-sample .brand-link { text-decoration: underline; color: var(--brand); }
.auth-brand-msg { background: var(--brand-soft); border-left: 3px solid var(--brand); padding: 8px 10px; }

/* Nutzungsbedingungen */
.terms-text { white-space: pre-wrap; max-height: 50vh; overflow: auto; border: 1px solid var(--border); background: var(--surface-2); padding: 12px 14px; margin: 8px 0; line-height: 1.5; }
.terms-text:focus-visible { outline: 2px solid var(--brand); }

/* Organisationsportal */
.nav .nav-sub { padding-left: 42px !important; font-size: 14px; }
.nav .nav-sub-head { padding: 6px 12px 2px 42px; font-size: 11px; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); }
.portal-grid { display: grid; grid-template-columns: 2fr 1fr; gap: 16px; align-items: start; }
@media (max-width: 800px) { .portal-grid { grid-template-columns: 1fr; } }
.portal-pages { list-style: none; padding: 0; margin: 0; }
.portal-pages li { padding: 6px 0; border-bottom: 1px solid var(--border); }
.portal-nav-row { flex-wrap: wrap; gap: 6px; padding: 4px 0; }
.portal-nav-row.is-section input { font-weight: 700; }

/* Teamraum-Vorlagen */
.tpl-cards { border: 0; padding: 0; margin: 8px 0 12px; display: grid; gap: 6px; }
.tpl-cards legend { font-weight: 600; margin-bottom: 4px; }
.tpl-card { display: grid; grid-template-columns: auto 1fr; gap: 2px 10px; align-items: start; padding: 8px 10px; border: 1px solid var(--border); border-radius: 4px; cursor: pointer; }
.tpl-card:has(input:checked) { border-color: var(--brand); background: var(--brand-soft); }
.tpl-card .tpl-what { grid-column: 2; color: var(--muted); }

/* E-Mail */
.mail-shell { display: grid; grid-template-columns: 190px minmax(240px, 1fr) 2fr; gap: 12px; min-height: 60vh; }
@media (max-width: 960px) { .mail-shell { grid-template-columns: 1fr; } }
.mail-folders { display: flex; flex-direction: column; gap: 2px; }
.mail-folders a { padding: 6px 10px; border-radius: 4px; color: inherit; text-decoration: none; display: flex; gap: 6px; align-items: center; }
.mail-folders a.active { background: var(--brand-soft); font-weight: 600; }
.mail-folders .badge { margin-left: auto; }
.mail-col { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.mail-list { border: 1px solid var(--border); border-radius: 4px; overflow: auto; max-height: 70vh; background: var(--surface); }
.mail-item { display: grid; grid-template-columns: 1fr auto; gap: 2px 8px; width: 100%; text-align: left; padding: 8px 10px; border: 0; border-bottom: 1px solid var(--border); background: transparent; color: inherit; font: inherit; cursor: pointer; }
.mail-item:hover, .mail-item.active { background: var(--brand-soft); }
.mail-item.unread .mail-from, .mail-item.unread .mail-subj { font-weight: 700; }
.mail-subj, .mail-snip { grid-column: 1 / -1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mail-reader { min-width: 0; border: 1px solid var(--border); border-radius: 4px; padding: 12px 14px; background: var(--surface); display: flex; flex-direction: column; gap: 8px; }
.mail-reader h2 { margin: 0; font-size: 18px; }
.mail-html { width: 100%; min-height: 50vh; border: 1px solid var(--border); background: #fff; }
.mail-text { white-space: pre-wrap; font-family: var(--font); margin: 0; }

/* App-Passwort */
.app-pw { display: flex; gap: 10px; align-items: center; margin: 10px 0; }
.app-pw code { font-family: var(--font-mono); font-size: 20px; letter-spacing: .06em; padding: 8px 12px; background: var(--surface-2); border: 1px solid var(--border); border-radius: 4px; user-select: all; }

/* Kalender und Kontakte */
.cal-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); border-top: 1px solid var(--border); border-left: 1px solid var(--border); }
.cal-head { padding: 6px; font-size: 12px; font-weight: 600; color: var(--muted); border-right: 1px solid var(--border); border-bottom: 1px solid var(--border); background: var(--surface-2); }
.cal-day { min-height: 96px; padding: 4px; border-right: 1px solid var(--border); border-bottom: 1px solid var(--border); background: var(--surface); display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.cal-day.other { background: var(--surface-2); color: var(--muted); }
.cal-day.today .cal-num { background: var(--brand); color: #fff; border-radius: 10px; padding: 0 6px; }
.cal-num { align-self: flex-end; font-size: 12px; }
.cal-ev { text-align: left; font: inherit; font-size: 12px; border: 0; border-left: 3px solid var(--brand); background: var(--brand-soft); color: var(--text); padding: 1px 4px; border-radius: 2px; cursor: pointer; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
@media (max-width: 700px) { .cal-day { min-height: 60px; } .cal-ev { font-size: 10px; } }
.contact { display: flex; gap: 10px; align-items: center; padding: 8px 0; border-bottom: 1px solid var(--border); }

/* Terminplanung (M5a): Status im Monat, Teilnehmende, Verfügbarkeit, Einladung in der Mail */
.cal-ev.cancelled { text-decoration: line-through; opacity: .65; border-left-color: var(--muted); }
.cal-ev.pending { border-left-style: dashed; background: transparent; outline: 1px dashed var(--brand); outline-offset: -1px; }
.cal-ev.declined { opacity: .55; }
.attendees { list-style: none; padding: 0; margin: 4px 0 8px; }
.attendees li { padding: 2px 0; }
.ps { display: inline-block; width: 1.3em; text-align: center; font-weight: 700; }
.ps-accepted { color: var(--ok, #1a7f37); }
.ps-declined { color: var(--danger, #b42318); }
.ps-tentative, .ps-needs-action { color: var(--muted); }
.fb { margin: 6px 0; }
.fb-row { display: flex; align-items: center; gap: 8px; margin: 3px 0; }
.fb-name { flex: 0 0 9em; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fb-bar { position: relative; flex: 1; height: 16px; background: var(--brand-soft); border-radius: 3px; overflow: hidden; }
.fb-busy { position: absolute; top: 0; bottom: 0; background: var(--brand); opacity: .75; }
.fb-busy.tent { background: repeating-linear-gradient(45deg, var(--brand) 0 3px, transparent 3px 6px); opacity: .9; }
.fb-me { position: absolute; top: 0; bottom: 0; border: 2px solid var(--text); border-radius: 3px; box-sizing: border-box; }
.fb-ticks { flex: 1; display: flex; justify-content: space-between; }
.slots { flex-wrap: wrap; gap: 6px; margin: 4px 0; }
.invite { border-left: 4px solid var(--brand); }
.pre { white-space: pre-wrap; }

/* ondev Meet */
.meet-body { margin: 0; height: 100vh; display: flex; flex-direction: column; background: var(--bg); }
.meet-page { flex: 1; display: flex; flex-direction: column; min-height: 0; }
.meet-bar { display: flex; align-items: center; gap: 12px; padding: 8px 16px; border-bottom: 1px solid var(--border); background: var(--surface, var(--bg)); flex-wrap: wrap; }
.meet-bar .spacer { flex: 1; }
.meet-frame { flex: 1; width: 100%; border: 0; min-height: 0; }
.meet-card { max-width: 420px; margin: 10vh auto; padding: 24px; border: 1px solid var(--border); border-radius: 8px; display: flex; flex-direction: column; gap: 10px; }
@media (max-width: 600px) { .meet-card { margin: 16px; } }

/* Buchungsseite (öffentlich) */
.book-body { margin: 0; background: var(--bg); }
.book-page { padding: 16px; }
.book-card { max-width: 720px; margin: 4vh auto; padding: 24px; border: 1px solid var(--border); border-radius: 10px; background: var(--surface, var(--bg)); }
.book-head h1 { margin: 0 0 6px; }
.book-types { display: grid; gap: 10px; }
.book-type { display: flex; flex-direction: column; align-items: flex-start; gap: 4px; text-align: left; padding: 12px 14px; border: 1px solid var(--border); border-radius: 8px; background: transparent; color: var(--text); font: inherit; cursor: pointer; }
.book-type:hover, .book-type:focus-visible { border-color: var(--brand); }
.book-slots { display: grid; gap: 14px; margin-top: 10px; }
.book-day h3 { margin: 0 0 6px; font-size: 15px; }
.book-times { display: flex; flex-wrap: wrap; gap: 6px; }
.book-trap { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.book-foot { margin-top: 18px; }
@media (max-width: 600px) { .book-card { margin: 0; padding: 16px; } }
.book-days { border: 0; padding: 0; margin: 0 0 12px; display: flex; flex-wrap: wrap; gap: 10px; }
/* Buchungsseite B2: Akzentfarbe (Kontrast zu weißer Schrift ≥ 4,5:1 serverseitig geprüft), Logo, Einbett-Modus */
.book-accent .btn.primary { background: var(--book-accent); border-color: var(--book-accent); color: #fff; }
.book-accent .btn.primary:hover { filter: brightness(.88); }
.book-accent .book-card { border-top: 4px solid var(--book-accent); }
.book-accent .book-type:hover, .book-accent .book-type:focus-visible { border-color: var(--book-accent); }
.book-logo { display: block; max-height: 48px; max-width: 220px; margin-bottom: 12px; }
.book-body.book-embed { background: transparent; }
.book-embed .book-page { padding: 4px; }
.book-embed .book-card { margin: 0 auto; }
.book-page h1[tabindex], .book-page h2[tabindex] { outline: none; }
.book-confirm { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.book-embed-code { width: 100%; font: 12px/1.4 ui-monospace, monospace; }
.book-route { border: 1px solid var(--border); border-radius: 8px; padding: 10px 14px; margin: 0 0 12px; display: grid; gap: 6px; }
.book-route legend { font-weight: 600; padding: 0 4px; }
.book-rules { display: grid; gap: 8px; margin-bottom: 8px; }
.book-rules select { max-width: 220px; }
.book-bill { margin: 8px 0 12px; }
.book-bill summary { cursor: pointer; font-weight: 600; }
.book-data { margin-top: 20px; padding-top: 12px; border-top: 1px solid var(--border); }
.mail-history:empty { display: none; }
.mail-history { padding: 6px 10px; border-radius: 6px; background: var(--brand-soft); }
