/* 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=tel], 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; }
/* Anmeldeseite im Erscheinungsbild der Organisation: Hintergrundbild bzw. -farbe (web/brand.js) */
.auth-form { background-color: var(--auth-bg, transparent); background-image: var(--auth-bg-image, none); background-size: cover; background-position: center; }
.brand-help { margin: 14px 0 0; text-align: center; }
.brand-assets { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 12px; margin: 12px 0; }
.brand-asset { display: flex; flex-direction: column; gap: 6px; border: 1px solid var(--line); border-radius: 8px; padding: 10px; }
.brand-asset-preview { height: 72px; display: grid; place-items: center; border-radius: 6px; background: #FFFFFF; border: 1px dashed var(--line); overflow: hidden; }
.brand-asset-preview.on-dark { background: #181C1F; }
.brand-asset-preview img { max-width: 100%; max-height: 64px; object-fit: contain; }
.brand-asset-background .brand-asset-preview img, .brand-asset-wallpaper .brand-asset-preview img { max-height: none; width: 100%; height: 100%; object-fit: cover; }
/* Linux-Richtlinie ohne Fachangaben: Programmkatalog und Zeilen für WLAN und Drucker */
.sw-catalog { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 12px; margin: 8px 0; }
.sw-group { display: flex; flex-direction: column; gap: 4px; }
.sw-item { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 4px 0; border-bottom: 1px solid var(--line); }
.sw-item select { flex: none; width: 7.5em; }
.policy-rows { display: flex; flex-direction: column; gap: 6px; margin-bottom: 6px; }
.policy-row > input { flex: 1 1 160px; min-width: 0; }
.grp-list { display: flex; flex-direction: column; gap: 8px; margin: 8px 0; }
.grp-card { border: 1px solid var(--line); border-radius: 8px; padding: 8px 12px; }
.grp-card > summary { cursor: pointer; }
/* Arbeitsplatz im Firmen-Design: Schalter und Vorschau */
.ws-section { border: 1px solid var(--line); border-radius: 8px; padding: 10px 12px; margin: 12px 0; }
.ws-switch { padding: 8px 0; }
.ws-preview { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 12px; margin: 8px 0 14px; }
.ws-screen { margin: 0; display: flex; flex-direction: column; gap: 4px; }
.ws-shot { position: relative; aspect-ratio: 16 / 10; border-radius: 8px; overflow: hidden; background-size: cover; background-position: center; border: 1px solid var(--line); display: grid; place-items: center; color: #FFFFFF; }
.ws-panel { position: absolute; left: 0; right: 0; bottom: 0; height: 14px; background: rgba(0, 0, 0, 0.55); display: flex; gap: 4px; align-items: center; padding: 0 6px; }
.ws-dot { width: 7px; height: 7px; border-radius: 2px; background: rgba(255, 255, 255, 0.8); }
.ws-lock, .ws-login { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 8px 10px; max-width: 90%; text-align: center; background: rgba(0, 0, 0, 0.45); border-radius: 8px; }
.ws-clock { font-size: 1.4rem; font-weight: 600; line-height: 1; }
.ws-msg { font-size: 0.68rem; line-height: 1.3; overflow-wrap: anywhere; }
.ws-login img { max-height: 22px; max-width: 120px; object-fit: contain; }
.ws-field { width: 110px; height: 12px; border-radius: 4px; background: rgba(255, 255, 255, 0.9); }
.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; overflow-x: hidden; }
/* Lange Adressen oder Wörter brechen um, statt das Fenster seitlich zu verschieben; Text höchstens vier Zeilen */
.notif { display: grid; gap: 2px; padding: 8px 10px; border-radius: 8px; color: var(--text); text-decoration: none; min-width: 0; overflow-wrap: anywhere; }
.notif-body { display: -webkit-box; -webkit-line-clamp: 4; line-clamp: 4; -webkit-box-orient: vertical; overflow: hidden; }
.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; position: relative; } /* hält absolut gesetzte Elemente (z. B. .sr-only) im Bereich – sonst verbreitern sie auf dem Handy die Seite */
.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="tel"], 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: var(--on-accent, #14181A); }
.news.must { border-left-color: var(--accent); }
.skip { background: var(--accent); color: var(--on-accent, #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; }
/* Apps mit eigenem Erscheinungsbild (z. B. mySupermail.app): Logo und Markenfarbe des Herstellers */
.app-icon.has-logo { background: transparent; overflow: hidden; padding: 0; }
.app-icon img { width: 100%; height: 100%; display: block; border-radius: 12px; }
.store-card.branded { border-top: 4px solid var(--app-color); }
.store-card.branded .btn.primary { background: var(--app-color); border-color: var(--app-color); color: var(--app-on, #fff); }
@media (prefers-color-scheme: dark) { .store-card.branded { border-top-color: var(--app-color-dark); } .store-card.branded .btn.primary { background: var(--app-color-dark); border-color: var(--app-color-dark); color: var(--app-on-dark, #1a1a1a); } }
.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: var(--on-accent, #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); }
/* Produktkürzel auf der Kachel (z. B. SAP-Produkte ohne freigegebenes Logo) */
.app-icon.mono { color: #fff; font-family: var(--font-display); font-weight: 800; font-size: 13px; letter-spacing: -.02em; }

/* Firmenverzeichnis: Ergebnis des Verbindungstests */
.steps-check { list-style: none; padding: 0; margin: 8px 0; display: grid; gap: 6px; }

/* OnDev-Verbinder: Einrichtung in Schritten */
.steps-setup { padding-left: 1.2rem; display: grid; gap: 10px; }

/* Whiteboard im Teamraum */
.board-main { position: relative; display: grid; grid-template-columns: auto 1fr; min-height: 0; }
.board-stage { position: relative; overflow: hidden; touch-action: none; }
.board-stage[data-tool="hand"] { cursor: grab; }
.board-stage[data-tool="pen"], .board-stage[data-tool="rectangle"], .board-stage[data-tool="ellipse"], .board-stage[data-tool="diamond"],
.board-stage[data-tool="arrow"], .board-stage[data-tool="line"], .board-stage[data-tool="note"] { cursor: crosshair; }
.board-stage[data-tool="text"] { cursor: text; }
.board-stage[data-tool="eraser"] { cursor: cell; }
.board-svg { display: block; width: 100%; height: 100%; user-select: none; }
.board-tools { display: flex; flex-direction: column; gap: 4px; padding: 8px 6px; background: var(--surface); border-right: 1px solid var(--border); overflow-y: auto; }
.board-tools hr { width: 100%; border: 0; border-top: 1px solid var(--border); margin: 4px 0; }
.board-tool { width: 38px; height: 38px; border: 1px solid transparent; border-radius: 8px; background: transparent; color: var(--text); font-size: 18px; cursor: pointer; }
.board-tool:hover { background: var(--surface-2); }
.board-tool[aria-pressed="true"] { background: var(--brand-soft); border-color: var(--brand); color: var(--brand); }
.board-tool:focus-visible, .board-swatch:focus-visible { outline: 2px solid var(--brand); outline-offset: 1px; }
.board-swatches { display: grid; grid-template-columns: repeat(2, 17px); gap: 4px; justify-content: center; }
.board-swatch { width: 17px; height: 17px; border-radius: 50%; border: 1px solid var(--border); padding: 0; cursor: pointer; }
.board-swatch.none { background: linear-gradient(135deg, transparent 45%, #C62828 45% 55%, transparent 55%), var(--surface); }
.board-swatch.width { border-radius: 4px; background: var(--surface); display: grid; place-items: center; }
.board-swatch.width span { display: block; width: 11px; background: var(--text); border-radius: 2px; }
.board-swatch[aria-pressed="true"] { box-shadow: 0 0 0 2px var(--surface), 0 0 0 4px var(--brand); }
.board-zoom { position: absolute; right: 12px; bottom: 12px; display: flex; gap: 4px; background: var(--surface); border: 1px solid var(--border); border-radius: 10px; padding: 4px; box-shadow: var(--shadow); }
.board-text { position: absolute; min-width: 40px; min-height: 1.4em; padding: 0; margin: 0; border: 1px dashed #00719F; background: rgba(255,255,255,.85); font-family: Helvetica, Arial, sans-serif; line-height: 1.25; resize: none; overflow: hidden; outline: none; }
.board-people { display: inline-flex; gap: 2px; }
.board-person { display: inline-grid; place-items: center; width: 24px; height: 24px; border-radius: 50%; color: #fff; font-size: 12px; font-weight: 600; border: 2px solid var(--surface); }
.board-texts { margin: 0; padding-left: 20px; white-space: pre-wrap; }
@media (max-width: 640px) { .board .office-bar { flex-wrap: wrap; row-gap: 6px; } .board .office-bar strong { flex: 1 1 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } .board-tools { flex-direction: row; flex-wrap: wrap; border-right: 0; border-bottom: 1px solid var(--border); } .board-main { grid-template-columns: 1fr; grid-template-rows: auto 1fr; } .board-tools hr { display: none; } }

/* Einmal-Zugang: Code gut lesbar zum Durchgeben */
.pass-code { font: 600 24px/1.4 ui-monospace, Consolas, monospace; letter-spacing: .08em; text-align: center; padding: 12px; background: var(--surface-2); border-radius: 8px; user-select: all; }
.inline-row { flex-wrap: wrap; gap: 6px; margin: 6px 0; align-items: center; }
.inline-row > input, .inline-row > select { width: auto; flex: 1 1 140px; max-width: 320px; }
.inline-row > input[maxlength="2"] { flex: 0 0 5em; }
.indent { margin-left: 26px; }
.ai-notice { border-left: 3px solid var(--brand, #00719F); padding: 6px 10px; background: var(--surface-2, transparent); border-radius: 4px; }

/* Regelgruppen (AZ-01): Bedingung als Zeile wie ein Satz, auf schmalen Bildschirmen zweispaltig */
.rule-rows { display: grid; gap: 6px; margin: 6px 0; }
.rule-row { display: grid; grid-template-columns: minmax(8em, 1fr) minmax(7em, .8fr) minmax(9em, 1.4fr) auto; gap: 6px; align-items: center; }
.rule-row > select, .rule-row > input { width: 100%; min-width: 0; }
@media (max-width: 560px) { .rule-row { grid-template-columns: 1fr 1fr auto; } .rule-row > :nth-child(3) { grid-column: 1 / 3; grid-row: 2; } .rule-row > :nth-child(4) { grid-column: 3; grid-row: 1; } }
.rule-preview { border: 1px solid var(--border); border-radius: var(--radius); padding: 8px 12px; }
.warn-text { color: var(--danger); }
.rule-pending { margin: 4px 0; }

/* Telefon als Schlüssel (docs/33 S1) */
.pair-code { font-size: 2rem; letter-spacing: .15em; font-weight: 700; margin: 6px 0; }

/* Verwaltung in Bereichen (docs/32 B-01) */
.admin-layout { display: grid; grid-template-columns: 230px minmax(0, 1fr); gap: 20px; align-items: start; }
.admin-nav ul { list-style: none; margin: 0; padding: 0; position: sticky; top: 12px; display: grid; gap: 2px; }
.admin-nav a { display: flex; gap: 8px; align-items: center; min-height: 40px; padding: 6px 10px; border-radius: var(--radius); color: var(--text); text-decoration: none; }
.admin-nav a:hover { background: var(--surface-2, var(--brand-soft)); }
.admin-nav a[aria-current="page"] { background: var(--brand-soft); color: var(--brand); font-weight: 600; box-shadow: inset 3px 0 0 var(--accent); }
.admin-nav-icon { width: 1.4em; text-align: center; }
.admin-main > h2 { margin: 0 0 2px; }
.admin-search { position: relative; max-width: 560px; margin: 0 0 16px; }
.admin-search input { width: 100%; }
.admin-search-hits { position: absolute; z-index: 20; left: 0; right: 0; margin: 4px 0 0; padding: 4px; list-style: none; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: 0 6px 20px rgba(0,0,0,.12); }
.admin-search-hits a { display: block; padding: 8px 10px; border-radius: var(--radius); text-decoration: none; color: var(--text); }
.admin-search-hits a:hover, .admin-search-hits a:focus { background: var(--brand-soft); }
.admin-search-hits li.small { padding: 8px 10px; }
.admin-todo { margin: 0; padding-left: 1.2em; }
.admin-todo li { margin: 4px 0; }
.admin-found { outline: 3px solid var(--accent); outline-offset: 3px; transition: outline-color 1s; }
@media (max-width: 800px) {
  .admin-layout { grid-template-columns: 1fr; }
  .admin-nav ul { position: static; display: flex; overflow-x: auto; gap: 4px; padding-bottom: 4px; }
  .admin-nav a { white-space: nowrap; }
  .admin-nav a[aria-current="page"] { box-shadow: inset 0 -3px 0 var(--accent); }
}
.admin-main h2, .admin-main h3 { scroll-margin-top: 84px; }

/* Verwaltung: breite Tabellen scrollen im Abschnitt, nicht die ganze Seite (docs/32 B-01) */
.admin-main .panel { overflow-x: auto; }
/* Personenfeld (docs/32 B-04): genug Platz für Namen; die Zeile bricht lieber um */
.row > input.person-input, input.person-input { min-width: 13em; flex: 1 1 13em; }
.row:has(> input.person-input) { flex-wrap: wrap; }
.company-logo { height: 20px; max-width: 80px; object-fit: contain; vertical-align: middle; margin-left: 8px; }

/* Raumdisplay am Besprechungsraum: große Schrift, Grün frei / Rot belegt (Weiß auf beiden mit mehr als 4,5:1) */
.room-display { min-height: 100vh; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 16px; text-align: center; padding: 24px; color: #fff; background: #3b4148; }
.room-free { background: #1b7f3b; }
.room-busy { background: #b3261e; }
.room-name { font-size: 2rem; font-weight: 600; }
.room-state { font-size: 5rem; font-weight: 700; line-height: 1; }
.room-until { font-size: 1.6rem; }
.room-book { display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; }
.room-book .btn { font-size: 1.3rem; padding: 14px 22px; }
.room-today { list-style: none; padding: 0; margin: 0; font-size: 1.2rem; }
.room-today .past { opacity: .6; text-decoration: line-through; }
.room-clock { font-size: 1.4rem; opacity: .9; }
.room-msg { font-size: 1.2rem; }

/* Chat im Teamraum */
.chat { display: grid; grid-template-columns: 200px minmax(0, 1fr); gap: 16px; align-items: start; }
.chat.with-thread { grid-template-columns: 200px minmax(0, 1fr) 360px; }
.chat-channels { display: flex; flex-direction: column; gap: 2px; position: sticky; top: 8px; }
.chat-channels a { display: flex; align-items: center; gap: 6px; padding: 6px 10px; border-radius: 8px; color: var(--text); text-decoration: none; }
.chat-channels a:hover { background: var(--surface-2, rgba(127,127,127,.08)); }
.chat-channels a.active { background: var(--accent-soft, rgba(127,127,127,.16)); font-weight: 600; }
.chat-channels a.unread { font-weight: 700; }
.chat-main { min-width: 0; display: flex; flex-direction: column; gap: 8px; }
.chat-head h2 { margin: 0; font-size: 1.15rem; }
.chat-head input[type=search] { max-width: 220px; }
.chat-stream { border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); padding: 8px 12px; height: max(260px, calc(100vh - 330px)); overflow-y: auto; display: flex; flex-direction: column; gap: 4px; }
.chat-msg { padding: 8px 6px; border-radius: 8px; position: relative; }
.chat-msg:hover, .chat-msg:focus-within { background: var(--surface-2, rgba(127,127,127,.06)); }
.chat-msg.new { border-left: 3px solid var(--accent); padding-left: 9px; }
.chat-body { white-space: pre-wrap; overflow-wrap: anywhere; margin-top: 2px; }
.chat-mention { background: var(--accent-soft, rgba(255,196,0,.22)); border-radius: 4px; padding: 0 2px; font-weight: 600; }
.chat-pick { display: inline-flex; gap: 2px; }
.chat-pick[hidden] { display: none; }
.chat-reactions { display: flex; gap: 4px; margin-top: 4px; flex-wrap: wrap; }
.chat-actions { display: flex; gap: 2px; flex-wrap: wrap; margin-top: 2px; opacity: .55; }
.chat-msg:hover .chat-actions, .chat-msg:focus-within .chat-actions { opacity: 1; }
.chat-actions .btn { padding: 2px 6px; }
.chat-replies { margin-top: 4px; }
.chat-compose { display: flex; gap: 8px; align-items: flex-end; position: relative; }
.chat-compose textarea { flex: 1; resize: vertical; min-height: 44px; }
.chat-suggest { position: absolute; bottom: 100%; left: 0; list-style: none; margin: 0 0 4px; padding: 4px; background: var(--surface); border: 1px solid var(--border); border-radius: 8px; box-shadow: 0 4px 16px rgba(0,0,0,.15); z-index: 5; }
.chat-thread { border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); padding: 12px; display: flex; flex-direction: column; gap: 6px; max-height: 78vh; overflow-y: auto; }
.chat-thread[hidden] { display: none; }
.list-plain { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 6px; }
a.strong { font-weight: 700; }
@media (max-width: 1400px) {
  .chat.with-thread { grid-template-columns: 200px minmax(0, 1fr); }
  .chat-thread { position: fixed; top: 0; right: 0; bottom: 0; width: min(420px, 100vw); max-height: none; z-index: 30; border-radius: 0; box-shadow: -6px 0 24px rgba(0,0,0,.18); }
}
@media (max-width: 960px) {
  .chat, .chat.with-thread { grid-template-columns: 1fr; }
  .chat-channels { flex-direction: row; flex-wrap: wrap; position: static; }
  .chat-stream { height: 55vh; }
}

/* Chat 1:1 und Gruppen */
.chat-system { color: var(--muted, #6b7280); font-size: .85rem; text-align: center; padding: 4px 0; }
.chat-direct li { display: flex; gap: 8px; align-items: baseline; }
.chat-direct li .preview { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.chat-picked { display: flex; flex-wrap: wrap; gap: 4px; margin: 6px 0; }

/* Umschalter Meine Ansicht ↔ Verwaltung */
.view-switch { display: inline-flex; border: 1px solid var(--border); border-radius: 99px; overflow: hidden; white-space: nowrap; }
.view-switch-part { display: inline-flex; align-items: center; gap: 6px; padding: 4px 12px; font-size: 13px; color: var(--text); text-decoration: none; }
/* Aktive Seite in der Unternehmensfarbe (--brand, textsicher abgeleitet), sonst OnDev-Cyan */
.view-switch-part.on { background: var(--brand); color: #fff; font-weight: 600; }
.view-switch-part.on:hover { background: var(--brand-strong); }
@media (prefers-color-scheme: dark) { .view-switch-part.on { color: #0F1416; } }
@media (forced-colors: active) { .view-switch-part.on { forced-color-adjust: none; background: Highlight; color: HighlightText; } }
.view-switch-part:not(.on):hover { background: var(--surface-2, rgba(127,127,127,.1)); }
@media (max-width: 640px) { .view-switch-label { display: none; } .view-switch-part { padding: 4px 8px; } }
/* Bereiche der Verwaltung stehen in der Seitenleiste – innen nur noch auf schmalen Bildschirmen */
@media (min-width: 861px) { .admin-layout { grid-template-columns: minmax(0, 1fr); } .admin-layout > .admin-nav { display: none; } }

/* Hersteller werden: Schritte */
.onb-steps { list-style: none; padding: 0; margin: 12px 0 0; display: flex; flex-direction: column; gap: 6px; }
.onb-steps li { display: flex; gap: 10px; align-items: center; padding: 8px 10px; border-radius: 8px; }
.onb-steps li.next { background: var(--accent-soft, rgba(239,125,0,.12)); }
.onb-steps li.done { opacity: .7; }
.onb-mark { width: 22px; height: 22px; flex: none; border-radius: 50%; border: 2px solid var(--border); display: inline-flex; align-items: center; justify-content: center; font-size: 13px; }
.onb-steps li.done .onb-mark { background: var(--accent); border-color: var(--accent); color: var(--on-accent, #14181A); }
.panel progress { width: 100%; height: 8px; }
.vendor-landing { max-width: 820px; }
.vendor-landing li { margin: 4px 0; }

/* Chat: Anhänge */
.chat-files { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 4px; }
.chat-image img { max-width: 240px; max-height: 180px; border-radius: 8px; border: 1px solid var(--border); display: block; }
.brand-asset-preview.on-dark .muted { color: #C9CFCB; }
/* Nur Logo in der Kopfzeile: proportional größer (Breite folgt der Höhe) */
.logo.logo-only img.org-logo { height: 42px; max-width: 260px; }
@media (max-width: 640px) { .logo.logo-only img.org-logo { height: 34px; max-width: 160px; } }

/* Arbeitszeit */
.time-btn { display: inline-flex; gap: 4px; align-items: center; }
/* Arbeitszeit: Tabelle über die ganze Breite, Zahlen rechtsbündig und gleich breit */
.time-table { width: 100%; border-collapse: collapse; }
.time-table th, .time-table td { padding: 7px 14px; text-align: left; vertical-align: top; border-bottom: 1px solid var(--border); }
.time-table th { font-weight: 600; color: var(--muted, inherit); white-space: nowrap; }
.time-table .num { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; width: 10%; }
.time-table .day { white-space: nowrap; width: 14%; }
.time-table .notes { width: 30%; }
.time-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: 10px; margin: 10px 0; }
.time-stat { display: grid; gap: 2px; padding: 10px 12px; border: 1px solid var(--border); border-radius: 8px; background: var(--surface-2); }
.time-stat strong { font-size: 20px; font-variant-numeric: tabular-nums; }
.time-stat span { font-size: 12px; color: var(--muted); }
@media (max-width: 640px) { .time-btn .badge { display: none; } }

/* Kopfzeile auf schmalen Bildschirmen: nie breiter als der Bildschirm (sonst verschiebt sich die ganze Seite seitlich) */
.side-account { display: none; }
.top { min-width: 0; }
.top > * { flex-shrink: 0; }
.top .search { flex-shrink: 1; min-width: 0; }
/* Zwischen Tablet und breitem Bildschirm: Name ausblenden (steht unter „Ich“), damit „Abmelden“ sichtbar bleibt */
.top .who { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; flex-shrink: 1; }
@media (max-width: 1240px) { .top .who { display: none; } }
@media (min-width: 861px) and (max-width: 1100px) {
  .top .time-btn .time-label { display: none; }
  .top .logo { max-width: 200px; overflow: hidden; }
  .top .logo.logo-only img.org-logo, .top .logo img.org-logo { max-width: 150px; }
}
@media (max-width: 860px) {
  .side-account { display: grid; gap: 8px; padding: 14px 12px; margin-top: 12px; border-top: 1px solid var(--border); }
  .top .top-logout { display: none; }
}
@media (max-width: 640px) {
  .top { gap: 6px; padding: 0 8px; }
  .top .logo:not(.logo-only) { font-size: 0; gap: 0; }
  .top .logo.logo-only img.org-logo { max-width: 96px; }
  .top .search { flex: 1 1 40px; }
  .time-btn .btn.ghost { display: none; }
  .time-btn .btn { padding: 4px 8px; }
  .bell-panel { position: fixed; left: 8px; right: 8px; top: 56px; width: auto; max-width: none; }
}
@media (max-width: 380px) { .top .search { display: none; } }
/* Handy: Verwaltungsleiste und Kalender bleiben in der Bildschirmbreite (die Leiste scrollt für sich, das Monatsraster schrumpft) */
.admin-layout > * { min-width: 0; }
@media (max-width: 860px) { .admin-layout { grid-template-columns: minmax(0, 1fr); } .admin-nav { min-width: 0; overflow: hidden; } }
@media (max-width: 700px) { .cal-grid { min-width: 0; } .cal-head { padding: 4px 2px; font-size: 11px; overflow: hidden; text-overflow: ellipsis; } .cal-day { padding: 2px; } }
/* Umschalter: Symbol im aktiven Teil in Schriftfarbe (sonst Unternehmensfarbe auf Unternehmensfarbe = unsichtbar) */
.view-switch-part .icon { color: currentColor; width: 18px; height: 18px; }

/* App-Store-Suche */
.store-search { display: grid; gap: 8px; margin: 8px 0 12px; }
.store-search-input { width: 100%; max-width: 640px; font-size: 16px; padding: 10px 12px; }
.store-search-filters { gap: 6px; align-items: center; }
.store-search-filters .btn.active { background: var(--brand); border-color: var(--brand); color: var(--on-accent, #fff); }
.tabs.muted-tabs { opacity: .55; }
.store-empty { padding: 24px 12px; text-align: center; }

/* App-Store: Detailseite */
.store-card-link { color: inherit; text-decoration: none; }
.store-card-link:hover, .store-card-link:focus-visible { text-decoration: underline; }
.store-hero { display: grid; grid-template-columns: auto minmax(0, 1fr) minmax(220px, 280px); gap: 18px; align-items: start; margin: 10px 0 16px; }
.store-hero.branded { border-top: 4px solid var(--app-color); }
.store-hero-icon .app-icon, .store-hero-icon > * { width: 88px; height: 88px; font-size: 28px; border-radius: 20px; }
.store-hero-icon img { width: 88px; height: 88px; border-radius: 20px; object-fit: contain; }
.store-hero .title { margin: 0 0 2px; }
.store-hero-meta { gap: 6px; margin: 8px 0; }
.store-hero-meta a.badge { text-decoration: none; }
.store-hero-summary { margin: 6px 0 0; }
.store-hero-buy { display: grid; gap: 8px; padding: 12px; border: 1px solid var(--border); border-radius: 10px; background: var(--surface-2); }
.store-hero-price { font-size: 20px; font-weight: 700; }
.store-hero-actions { gap: 8px; }
.store-hero.branded .btn.primary { background: var(--app-color); border-color: var(--app-color); color: var(--app-on, #fff); }
@media (prefers-color-scheme: dark) { .store-hero.branded { border-top-color: var(--app-color-dark); } .store-hero.branded .btn.primary { background: var(--app-color-dark); border-color: var(--app-color-dark); color: var(--app-on-dark, #1a1a1a); } }
.store-shots { display: flex; gap: 12px; overflow-x: auto; scroll-snap-type: x mandatory; padding: 4px 2px 12px; margin-bottom: 8px; }
.store-shot { flex: 0 0 auto; width: min(560px, 82vw); scroll-snap-align: start; padding: 0; border: 1px solid var(--border); border-radius: 10px; overflow: hidden; background: var(--surface-2); cursor: zoom-in; display: grid; text-align: left; }
.store-shot img { width: 100%; aspect-ratio: 16 / 10; object-fit: cover; object-position: top left; display: block; }
.store-shot-caption { padding: 6px 10px; font-size: 13px; color: var(--muted); }
.store-detail { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 20px; align-items: start; }
.store-detail-section { margin: 0 0 18px; }
.store-detail-section h2 { font-size: 18px; margin: 0 0 8px; }
.store-detail-section p { line-height: 1.55; max-width: 72ch; }
.store-features { display: grid; gap: 6px; padding-left: 20px; margin: 0; max-width: 72ch; }
.store-detail-info h2 { font-size: 16px; margin: 0 0 8px; }
.store-detail-info dl { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 6px 12px; margin: 0; font-size: 14px; }
.store-detail-info dt { color: var(--muted); }
.store-detail-info dd { margin: 0; overflow-wrap: anywhere; }
.store-similar { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 10px; }
.store-similar-card { display: flex; gap: 10px; align-items: center; color: inherit; text-decoration: none; margin: 0; }
.store-similar-card:hover { border-color: var(--brand); }
.store-viewer { display: grid; place-items: center; background: rgba(0, 0, 0, .85); z-index: 1000; }
.store-viewer figure { margin: 0; max-width: 94vw; max-height: 88vh; display: grid; gap: 6px; }
.store-viewer img { max-width: 94vw; max-height: 82vh; object-fit: contain; border-radius: 8px; background: #fff; }
.store-viewer figcaption .muted { color: #ddd; }
.store-viewer-prev, .store-viewer-next, .store-viewer-close { position: fixed; font-size: 22px; }
.store-viewer-prev { left: 12px; top: 50%; } .store-viewer-next { right: 12px; top: 50%; } .store-viewer-close { right: 12px; top: 12px; }
@media (max-width: 900px) { .store-hero { grid-template-columns: auto minmax(0, 1fr); } .store-hero-buy { grid-column: 1 / -1; } .store-detail { grid-template-columns: 1fr; } }
@media (max-width: 560px) { .store-hero-icon .app-icon, .store-hero-icon > *, .store-hero-icon img { width: 64px; height: 64px; border-radius: 14px; } }

/* App-Store: Wer bekommt die App? */
.store-access { display: grid; gap: 10px; width: min(480px, 100%); }
.store-access-choice { align-items: flex-start; }
.store-access-choice > span { display: grid; gap: 2px; }
.store-access-picker { display: grid; gap: 8px; padding: 10px; border: 1px solid var(--border); border-radius: 8px; background: var(--surface-2); }
.store-access-results { max-height: 220px; overflow: auto; }

/* Arbeitsplätze: Linux und Windows getrennt */
.device-os-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr)); gap: 12px; margin: 10px 0 14px; }
.device-os { border: 1px solid var(--border); border-radius: 10px; padding: 12px 14px; display: grid; gap: 8px; align-content: start; min-width: 0; }
.device-os h4 { margin: 0; }
.device-os p { margin: 0; }
.device-tabs { margin: 6px 0 12px; }
.device-tabs .btn .badge { margin-left: 6px; }
.device-os pre.code { white-space: pre-wrap; word-break: break-all; }
/* Lange Knopftexte (z. B. „… Installationsdatei herunterladen“) umbrechen statt über den Rand zu ragen */
.device-os .btn { white-space: normal; text-align: left; max-width: 100%; }
.device-os-grid { grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr)); }
/* Schmale Bildschirme: breite Firmenlogos in der Kopfzeile verkleinern, damit Stempeln, Ansicht und Glocke Platz haben */
@media (max-width: 480px) {
  .top .logo { min-width: 0; flex-shrink: 1; }
  .top .logo img, .top .logo picture img { max-width: 84px; height: auto; max-height: 30px; object-fit: contain; }
}

/* Notizbuch */
.nb-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 240px), 1fr)); gap: 12px; margin-top: 12px; }
.nb-card { display: grid; gap: 4px; color: inherit; text-decoration: none; border-left: 6px solid var(--nb, var(--brand)); margin: 0; }
.nb-card:hover { border-color: var(--nb, var(--brand)); }
.nb-orange { --nb: #EF7D00; } .nb-blue { --nb: #1E6FD9; } .nb-green { --nb: #2E8540; } .nb-purple { --nb: #7B4BC4; } .nb-red { --nb: #C62828; } .nb-grey { --nb: #6B7C8F; }
.nb-search { width: 100%; max-width: 420px; }
.nb-hits { display: grid; gap: 4px; margin: 8px 0; }
.nb-hit { display: block; padding: 6px 8px; border: 1px solid var(--border); border-radius: 6px; color: inherit; text-decoration: none; }
.nb-layout { display: grid; grid-template-columns: 260px minmax(0, 1fr); gap: 16px; align-items: start; }
.nb-side { display: grid; gap: 8px; position: sticky; top: 8px; max-height: calc(100vh - 90px); overflow: auto; padding-right: 4px; }
.nb-side-head { display: grid; gap: 4px; }
.nb-title { border-left: 4px solid var(--nb, var(--brand)); padding-left: 8px; }
.nb-sec { border-top: 1px solid var(--border); padding-top: 6px; }
.nb-sec-head { display: flex; align-items: center; gap: 4px; }
.nb-sec-head strong { flex: 1; font-size: 13px; text-transform: none; }
.nb-page-link { display: block; padding: 4px 8px; border-radius: 6px; color: inherit; text-decoration: none; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.nb-page-link:hover { background: var(--surface-2); }
.nb-page-link.active { background: var(--brand-soft, var(--surface-2)); font-weight: 600; }
.nb-side-actions { gap: 6px; }
.nb-main { min-width: 0; max-width: 860px; }
.nb-toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding-bottom: 8px; border-bottom: 1px solid var(--border); margin-bottom: 10px; }
.nb-tool select { min-width: 140px; }
.nb-page-title { width: 100%; font-size: 26px; font-weight: 700; border: 0; background: transparent; padding: 4px 0; color: inherit; }
.nb-page-title:focus { outline: none; border-bottom: 2px solid var(--brand); }
.nb-hint { margin-bottom: 8px; }
.nb-blocks { display: grid; gap: 2px; padding-bottom: 40vh; }
.nb-row { display: flex; gap: 8px; align-items: baseline; }
.nb-row input[type="checkbox"] { width: 18px; height: 18px; margin: 0; flex: 0 0 auto; transform: translateY(3px); }
.nb-bullet { flex: 0 0 auto; min-width: 16px; color: var(--muted); }
.nb-text { flex: 1; min-width: 0; padding: 3px 4px; border-radius: 4px; line-height: 1.6; white-space: pre-wrap; overflow-wrap: anywhere; outline: none; }
.nb-text:focus { background: var(--surface-2); }
.nb-text[data-empty]:not(:focus)::before { content: attr(data-empty); color: var(--muted); }
.nb-text.done { text-decoration: line-through; color: var(--muted); }
.nb-h1 { font-size: 22px; font-weight: 700; margin-top: 10px; }
.nb-h2 { font-size: 18px; font-weight: 700; margin-top: 8px; }
.nb-h3 { font-size: 16px; font-weight: 700; }
.nb-quote { border-left: 3px solid var(--border); padding-left: 10px; color: var(--muted); font-style: italic; }
.nb-code { font-family: ui-monospace, SFMono-Regular, Consolas, monospace; font-size: 13px; background: var(--surface-2); padding: 8px 10px; }
.nb-hr { padding: 4px 0; } .nb-hr:focus { outline: 2px solid var(--brand); }
.nb-text code { font-family: ui-monospace, Consolas, monospace; background: var(--surface-2); padding: 0 4px; border-radius: 3px; }
@media (max-width: 760px) {
  .nb-layout { grid-template-columns: 1fr; }
  .nb-side { position: static; max-height: none; border-bottom: 1px solid var(--border); padding-bottom: 8px; }
  .nb-page-title { font-size: 21px; }
}

/* OnDev auf dem Handy (QR-Code) */
.phone-app-row { display: flex; flex-wrap: wrap; gap: 16px; align-items: center; }
.phone-qr { display: grid; gap: 4px; justify-items: center; }
.phone-qr .qr { border-radius: 8px; border: 1px solid var(--border); background: #fff; }
.phone-steps { flex: 1; min-width: min(100%, 240px); margin: 0; padding-left: 20px; display: grid; gap: 6px; }
.btn.btn-wrap { white-space: normal; text-align: left; max-width: 100%; height: auto; }

/* Seitenleiste anordnen */
.nav .nav-arrange { display: flex; align-items: center; gap: 10px; width: 100%; padding: 8px 12px; border: 0; border-radius: 8px; background: none; color: var(--muted); font: inherit; font-size: .9em; cursor: pointer; text-align: left; }
.nav .nav-arrange:hover { background: var(--surface-2); color: var(--text); }
.nav-edit { list-style: none; margin: 8px 0 0; padding: 0; display: grid; gap: 4px; max-height: 55vh; overflow: auto; }
.nav-edit-row { display: flex; align-items: center; gap: 8px; padding: 6px 8px; border: 1px solid var(--border); border-radius: 8px; background: var(--surface); }
.nav-edit-row[draggable="true"] { cursor: grab; }
.nav-edit-row.dragging { opacity: .5; }
.nav-edit-row.off .nav-edit-label { color: var(--muted); text-decoration: line-through; }
.nav-edit-row.locked { background: var(--surface-2); }
.nav-edit-grip { width: 1.2em; color: var(--muted); text-align: center; }
.nav-edit-label { flex: 1; min-width: 0; }
.nav-edit-actions { display: flex; gap: 4px; flex-wrap: wrap; justify-content: flex-end; }
.nav-layout-list { display: grid; gap: 8px; margin: 8px 0; }
.nav-layout-card { display: flex; align-items: center; gap: 8px; padding: 10px 12px; border: 1px solid var(--border); border-radius: 10px; flex-wrap: wrap; }
@media (max-width: 520px) { .nav-edit-row { flex-wrap: wrap; } .nav-edit-actions { width: 100%; } }
.linux-cmd ol { margin: 4px 0 6px; padding-left: 20px; }
.linux-cmd pre { white-space: pre-wrap; word-break: break-all; }
/* Hell/Dunkel */
.theme-btn .icon { width: 18px; height: 18px; }
.theme-choice { display: grid; gap: 6px; }
.theme-opt { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border: 1px solid var(--border); border-radius: 8px; cursor: pointer; }
.theme-opt:has(input:checked) { border-color: var(--brand); background: var(--brand-soft); }
.theme-swatch { width: 34px; height: 22px; border-radius: 5px; border: 1px solid var(--border); flex: none; }
.theme-light .theme-swatch { background: linear-gradient(#fff 0 40%, #eef2f5 40%); }
.theme-dark .theme-swatch { background: linear-gradient(#0f1416 0 40%, #1c2428 40%); }
.theme-auto .theme-swatch { background: linear-gradient(135deg, #fff 0 50%, #0f1416 50%); }

/* Handy-Kopfzeile aufgeräumt: Logo klein und nie unter anderen Knöpfen, Stempeln nur als Symbol, alles in einer Zeile */
@media (max-width: 480px) {
  .top { gap: 4px; padding: 0 6px; }
  .top .menu-btn { padding: 4px 6px; }
  .top .logo { overflow: hidden; flex: 0 1 auto; }
  .top .logo.logo-only img.org-logo, .top .logo img.org-logo, .top .logo picture img { width: auto; height: auto; max-width: 80px; max-height: 28px; }
  .top .spacer { flex: 1 1 0; min-width: 0; }
  .time-btn .time-label { display: none; }
  .time-btn .btn { padding: 4px 8px; font-size: 16px; }
  .top .theme-btn { padding: 4px 6px; }
  .view-switch-part { padding: 4px 6px; }
  .foot { font-size: 13px; }
  .foot select { width: auto; max-width: 100%; }
}

/* Ohne Netz: Hinweis über dem Inhalt */
.offline-banner { margin: 0 0 12px; padding: 8px 12px; border-radius: 8px; background: var(--surface-2); border: 1px solid var(--border); border-left: 4px solid var(--warn); font-size: 14px; }


/* OnDev Office: Neu, gemeinsam arbeiten */
.office { grid-template-rows: auto 1fr; }
.office-body { display: grid; grid-template-columns: 1fr auto; min-height: 0; }
.office-panel { width: min(360px, 90vw); overflow: auto; padding: 12px; border-left: 1px solid var(--border); background: var(--surface); display: grid; align-content: start; gap: 8px; }
.office-panel[hidden] { display: none; }
.office-bar { flex-wrap: wrap; row-gap: 6px; }
.office-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 40ch; }
.office-people { display: inline-flex; align-items: center; gap: 4px; }
.office-avatar { display: inline-grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; background: var(--surface-2); border: 2px solid var(--border); font-size: 12px; font-weight: 600; }
.office-avatar.editing { border-color: var(--accent); }
.office-diff { list-style: none; padding: 0; margin: 0; display: grid; gap: 4px; font-size: 14px; }
.office-diff .add { background: color-mix(in srgb, #2e7d32 12%, transparent); padding: 4px 6px; border-radius: 6px; }
.office-diff .del { background: color-mix(in srgb, var(--danger) 12%, transparent); padding: 4px 6px; border-radius: 6px; text-decoration: line-through; }
.office-comment { padding: 6px 0; border-bottom: 1px solid var(--border); }
.office-new-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 10px; margin: 8px 0 12px; }
.office-new-tile { display: grid; gap: 4px; justify-items: start; text-align: left; padding: 14px; border: 1px solid var(--border); border-radius: 10px; background: var(--surface); color: var(--text); cursor: pointer; font: inherit; }
.office-new-tile:hover, .office-new-tile:focus-visible { border-color: var(--brand); background: var(--brand-soft); }
.office-new-icon { display: inline-grid; place-items: center; width: 34px; height: 34px; border-radius: 8px; color: #fff; font-weight: 700; }
.office-docx .office-new-icon { background: #2b579a; } .office-xlsx .office-new-icon { background: #217346; } .office-pptx .office-new-icon { background: #c43e1c; }
.office-tpl-list { display: flex; flex-wrap: wrap; gap: 6px; }
.office-ai textarea { width: 100%; margin: 6px 0; }
@media (max-width: 640px) { .office-panel { position: absolute; right: 0; top: 0; bottom: 0; z-index: 2; } .office-body { position: relative; grid-template-columns: 1fr; } .office-people-label { display: none; } }

/* Gespeicherte Auswertungen (AZ-15): Balken ohne Diagramm-Bibliothek */
.report-bars { display: grid; gap: 4px; margin: 8px 0; }
.report-row { display: grid; grid-template-columns: minmax(90px, 32%) 1fr 56px; gap: 8px; align-items: center; font-size: 13px; }
.report-label { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.report-bar { background: var(--border); border-radius: 3px; height: 12px; overflow: hidden; }
.report-bar i { display: block; height: 100%; background: var(--brand); }
.report-count { text-align: right; font-variant-numeric: tabular-nums; }
.report-cols { display: flex; align-items: flex-end; gap: 2px; height: 120px; margin: 8px 0 4px; border-bottom: 1px solid var(--border); }
.report-col { flex: 1 1 0; height: 100%; display: flex; align-items: flex-end; min-width: 2px; }
.report-col i { display: block; width: 100%; background: var(--brand); border-radius: 2px 2px 0 0; }
.report-actions { justify-content: flex-end; gap: 4px; }

/* Zeiterfassung: Arbeitsplatz erst nach dem Einstempeln */
.time-gate { position: fixed; inset: 0; z-index: 1000; display: grid; place-items: center; padding: 16px; background: color-mix(in srgb, var(--bg) 75%, transparent); backdrop-filter: blur(6px); }
.time-gate-card { width: min(520px, 100%); background: var(--surface); color: var(--text); border-radius: 16px; padding: 28px; box-shadow: 0 20px 60px rgba(0,0,0,.35); text-align: center; display: grid; gap: 12px; }
.time-gate-card h1 { margin: 4px 0; font-size: 1.8rem; }
.time-gate-card .btn.big { padding: 12px 18px; font-size: 1.05rem; justify-content: center; text-align: center; }
.time-gate-card details { text-align: left; border-top: 1px solid var(--border); padding-top: 10px; }
/* Fehler oder Vorschlag melden */
.fb-report { white-space: pre-wrap; word-break: break-word; max-height: 240px; overflow: auto; margin: 6px 0; padding: 8px 10px; font-size: 12px; background: var(--surface); color: var(--text); border: 1px solid var(--border); border-radius: 6px; }
.fb-item + .fb-item { margin-top: 8px; }
details.fb-item { border-top: 1px solid var(--border); padding: 8px 0; }
.fb-reply { border-left: 3px solid var(--border); padding: 4px 10px; margin-top: 8px; }
fieldset.plain { border: 0; padding: 0; margin: 0 0 8px; }
/* Telefoneinwahl auf der Besprechungsseite */
.meet-phone { position: relative; }
.meet-phone summary { cursor: pointer; }
.meet-phone-box { position: absolute; right: 0; top: 1.8em; z-index: 5; min-width: 260px; padding: 8px 12px; background: var(--surface); color: var(--text); border: 1px solid var(--border); border-radius: 6px; }
.meet-phone-box ul { margin: 4px 0; padding-left: 18px; }
/* Logo des IT-Dienstleisters in der IT-Hilfe */
.partner-logo { max-height: 36px; max-width: 140px; object-fit: contain; }
/* Bilder und Dateien im Notizbuch */
.nb-file { display: flex; flex-direction: column; align-items: flex-start; gap: 4px; padding: 4px 0; }
.nb-img { max-width: 100%; max-height: 480px; border-radius: 4px; border: 1px solid var(--border); }
/* Hilfe und Handbuch (/handbuch) */
.hb-page { max-width: 1200px; margin: 0 auto; padding: 0 16px 40px; }
.hb-head { display: flex; align-items: center; gap: 10px; padding: 14px 0; border-bottom: 1px solid var(--border); }
.hb-logo { display: inline-flex; align-items: center; gap: 8px; color: inherit; text-decoration: none; }
.hb-search { margin: 16px 0 8px; } .hb-search input { width: 100%; font-size: 16px; padding: 10px 12px; }
.hb-layout { display: grid; grid-template-columns: 280px minmax(0, 1fr); gap: 28px; align-items: start; }
.hb-nav { position: sticky; top: 12px; max-height: calc(100vh - 24px); overflow: auto; font-size: 14px; }
.hb-nav-ch > a { display: block; font-weight: 600; padding: 6px 8px; border-radius: 6px; color: inherit; text-decoration: none; }
.hb-nav-ch > a.active, .hb-nav a:hover { background: var(--brand-soft); }
.hb-nav ul { list-style: none; margin: 0 0 6px; padding: 0 0 0 10px; } .hb-nav li a { display: block; padding: 2px 8px; color: var(--muted, inherit); text-decoration: none; }
.hb-main { min-width: 0; line-height: 1.55; } .hb-main h2 { margin-top: 8px; } .hb-main h3 { margin-top: 28px; scroll-margin-top: 12px; }
.hb-main li.hb-d1 { margin-left: 22px; } .hb-main li.hb-d2 { margin-left: 44px; }
.hb-fig { margin: 14px 0 18px; } .hb-fig img { display: block; max-width: 100%; height: auto; border: 1px solid var(--border); border-radius: 8px; box-shadow: 0 1px 4px rgba(0,0,0,.08); }
.hb-fig figcaption { margin-top: 6px; }
.hb-table { overflow-x: auto; margin: 10px 0; }
.hb-hit { border-top: 1px solid var(--border); padding-top: 6px; }
.hb-pager { margin-top: 32px; padding-top: 12px; border-top: 1px solid var(--border); }
.hb-foot { margin-top: 28px; padding-top: 10px; border-top: 1px solid var(--border); }
@media (max-width: 820px) { .hb-layout { grid-template-columns: 1fr; } .hb-nav { position: static; max-height: none; border-bottom: 1px solid var(--border); padding-bottom: 8px; } .hb-nav ul { display: none; } }
@media print { .hb-head, .hb-search, .hb-layout > aside, .hb-pager, .hb-foot a { display: none !important; } .hb-layout { display: block; } .hb-fig img { box-shadow: none; } }
/* Hilfe: Startseite mit Themen und häufigen Fragen */
.hb-tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 12px; margin: 12px 0 28px; }
.hb-tile { display: flex; flex-direction: column; gap: 4px; padding: 14px; border: 1px solid var(--border); border-radius: 10px; background: var(--surface); color: inherit; text-decoration: none; }
.hb-tile:hover, .hb-tile:focus-visible { border-color: var(--brand); box-shadow: 0 2px 8px rgba(0,0,0,.08); }
.hb-tile-icon { font-size: 26px; line-height: 1; }
.hb-faq { columns: 2 280px; padding-left: 18px; } .hb-faq li { margin: 0 0 8px; break-inside: avoid; }
@media (max-width: 820px) { .hb-head { flex-wrap: wrap; } .hb-head .spacer { flex-basis: 100%; height: 0; } .hb-layout > aside { order: 2; border-top: 1px solid var(--border); padding-top: 8px; } .hb-nav { border-bottom: 0; } }
/* Benachrichtigungen: Symbol, Text, Aktionen; Tagesgruppen und zusammengefasste Meldungen */
.notif { grid-template-columns: 28px 1fr auto; align-items: start; gap: 8px; }
.notif-icon { font-size: 18px; line-height: 1.3; text-align: center; }
.notif-main { display: grid; gap: 2px; color: var(--text); text-decoration: none; min-width: 0; }
.notif-title { overflow-wrap: anywhere; }
.notif.unread .notif-title, .notif-bundle.unread > summary .notif-title { font-weight: 600; }
.notif.unread { background: color-mix(in srgb, var(--brand) 7%, transparent); }
.notif.unread .notif-icon::after { content: ""; display: block; width: 8px; height: 8px; border-radius: 50%; background: var(--brand); margin: 4px auto 0; }
.notif-actions { display: flex; gap: 2px; opacity: .55; } .notif:hover .notif-actions, .notif:focus-within .notif-actions { opacity: 1; }
.notif-day { text-transform: uppercase; letter-spacing: .04em; margin: 6px 4px 0; }
.notif-bundle > summary { display: grid; grid-template-columns: 28px 1fr; gap: 8px; padding: 8px 10px; border-radius: 8px; cursor: pointer; list-style: none; }
.notif-bundle > summary::-webkit-details-marker { display: none; } .notif-bundle > summary:hover { background: var(--surface-2); }
.notif-bundle-items { padding-left: 18px; border-left: 2px solid var(--border); margin-left: 22px; display: grid; gap: 4px; }
.notif-tabs { gap: 6px; flex-wrap: wrap; } .notif-list { display: grid; gap: 4px; } .notif-all { text-align: center; padding: 6px; }
@media (hover: none) { .notif-actions { opacity: 1; } }
/* Hilfe: Fragen nach Thema */
.hb-faq-topic { border: 1px solid var(--border); border-radius: 10px; margin: 0 0 8px; background: var(--surface); }
.hb-faq-topic > summary { padding: 10px 14px; cursor: pointer; font-weight: 600; }
.hb-faq-topic[open] > summary { border-bottom: 1px solid var(--border); }
.hb-faq-topic .hb-faq { margin: 10px 0; }
/* Kalender anderer: Farbe je Person, schmale Leiste zum Ein-/Ausblenden */
.cal-ev.shared { border-left: 4px solid var(--brand); background: color-mix(in srgb, var(--surface-2) 70%, transparent); }
.cal-shared { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; padding: 8px 12px; margin: 8px 0; }
.cal-shared-item { gap: 6px; align-items: center; }
.cal-dot { display: inline-block; width: 10px; height: 10px; border-radius: 50%; }
.cal-share-list table td { vertical-align: middle; }
/* Eigene Mail-Regeln und Anhänge aus OnDev */
.mail-rules { list-style: none; padding: 0; display: grid; gap: 6px; } .mail-rules li { display: flex; gap: 8px; align-items: center; justify-content: space-between; }
.drive-attach { list-style: none; padding: 0; margin: 4px 0 0; } .drive-pick { display: grid; gap: 4px; max-height: 50vh; overflow: auto; margin-top: 8px; }
