/* MeineGemeinde+ – Schriften kommen vom eigenen Server (/fonts/fonts.css), keine Verbindung zu Google */

/* Layout: app shell – header, group list beside chat (stacked on phones), demo strip at the bottom. Colors follow the liturgical palette. */
:root {
  --bg: #EFEEF3;
  --surface: #FFFFFF;
  --surface-2: #F6F5F9;
  --line: #DCD8E4;
  --fg: #1C1924;
  --muted: #5E596B;
  --accent: #6A3FA0;
  --accent-hover: #56308A;
  --accent-fg: #FFFFFF;
  --accent-soft: #ECE4F6;
  --own: #E6DCF3;
  --danger: #B42318;
  --danger-soft: #FBE7E5;
  --warn: #9A4A16;
  --warn-soft: #FBEEDC;
  --ok: #2E7D5B;
  --ok-soft: #DDEFE6;
  --lit-gruen: #2E7D5B;
  --lit-violett: #7C55B5;
  --lit-rot: #B03A2E;
  --lit-gold: #A27420;
  --lit-schiefer: #3F4A55;
  --gem-tra: #1E5A86;
  --gem-tra-soft: #DDEAF4;
  --gem-kue: #8C4528;
  --gem-kue-soft: #F5E4DC;
  --shadow: 0 10px 30px rgba(28, 20, 44, .16);
  --font-display: "Bricolage Grotesque", "Segoe UI", system-ui, sans-serif;
  --font-body: "Atkinson Hyperlegible", "Segoe UI", system-ui, -apple-system, sans-serif;
  --r: 12px;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #121017; --surface: #1A1721; --surface-2: #211D2A; --line: #332D3E; --fg: #ECE9F2; --muted: #A49EB2;
    --accent: #B99BEA; --accent-hover: #CBB4F1; --accent-fg: #1A1027; --accent-soft: #2F2442; --own: #33284B;
    --danger: #F08074; --danger-soft: #3A1E1B; --warn: #E3A06A; --warn-soft: #3A2A1A; --ok: #6CC79C; --ok-soft: #1C3328;
    --lit-gruen: #3E9A72; --lit-violett: #9474CC; --lit-rot: #C9544A; --lit-gold: #B98A34; --lit-schiefer: #5B6874;
    --gem-tra: #7DB5E0; --gem-tra-soft: #19303F; --gem-kue: #E3967A; --gem-kue-soft: #3A241C;
    --shadow: 0 10px 30px rgba(0, 0, 0, .5);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #121017; --surface: #1A1721; --surface-2: #211D2A; --line: #332D3E; --fg: #ECE9F2; --muted: #A49EB2;
    --accent: #B99BEA; --accent-hover: #CBB4F1; --accent-fg: #1A1027; --accent-soft: #2F2442; --own: #33284B;
    --danger: #F08074; --danger-soft: #3A1E1B; --warn: #E3A06A; --warn-soft: #3A2A1A; --ok: #6CC79C; --ok-soft: #1C3328;
    --lit-gruen: #3E9A72; --lit-violett: #9474CC; --lit-rot: #C9544A; --lit-gold: #B98A34; --lit-schiefer: #5B6874;
  --gem-tra: #7DB5E0; --gem-tra-soft: #19303F; --gem-kue: #E3967A; --gem-kue-soft: #3A241C;
  --shadow: 0 10px 30px rgba(0, 0, 0, .5);
  color-scheme: dark;
}

html, body { height: 100%; }
body { background: var(--bg); color: var(--fg); font-family: var(--font-body); font-size: 16px; line-height: 1.45; }
#root { height: 100%; }
* { box-sizing: border-box; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
h1, h2, h3 { font-family: var(--font-display); margin: 0; text-wrap: balance; letter-spacing: -.01em; }
p { margin: 0; }

/* Buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 40px; padding: 0 14px; border-radius: 10px; border: 1px solid var(--line); background: var(--surface); font-weight: 700; font-size: 15px; white-space: nowrap; }
.btn:hover { background: var(--surface-2); }
.btn.primary { background: var(--accent); border-color: var(--accent); color: var(--accent-fg); }
.btn.primary:hover { background: var(--accent-hover); border-color: var(--accent-hover); }
.btn.danger { background: var(--danger); border-color: var(--danger); color: var(--surface); }
.btn.ghost { border-color: transparent; background: transparent; }
.btn.ghost:hover { background: var(--surface-2); }
.btn.small { min-height: 32px; padding: 0 10px; font-size: 14px; }
.btn.danger-text { color: var(--danger); }
.icon-btn { display: inline-grid; place-items: center; width: 40px; height: 40px; border-radius: 10px; border: 0; background: transparent; color: var(--muted); flex: none; }
.icon-btn:hover { background: var(--surface-2); color: var(--fg); }
.ico { width: 20px; height: 20px; display: inline-block; flex: none; }
.ico svg { width: 100%; height: 100%; display: block; }
.linkbtn { border: 0; background: none; padding: 0; color: var(--accent); font-weight: 700; text-decoration: underline; text-underline-offset: 3px; }

/* Form fields */
.field { display: grid; gap: 6px; align-content: start; }
.field label, .field .label { font-weight: 700; font-size: 14px; }
.field .hint { font-size: 13px; color: var(--muted); }
input[type=text], input[type=email], input[type=tel], input[type=password], input[type=search], input[type=date], input[type=time], input[type=number], input[type=url], select, textarea.input {
  width: 100%; min-height: 44px; padding: 8px 12px; border-radius: 10px; border: 1px solid var(--line); background: var(--surface);
}
input:focus, select:focus, textarea:focus { outline: 2px solid var(--accent); outline-offset: -1px; border-color: var(--accent); }
.pin-input { letter-spacing: .4em; font-variant-numeric: tabular-nums; }
.form-err { color: var(--danger); font-weight: 700; font-size: 14px; min-height: 1.2em; }
.row { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.row > input { flex: 1 1 140px; }

/* Chips & avatars */
.chip { display: inline-flex; align-items: center; height: 24px; padding: 0 9px; border-radius: 999px; background: var(--accent-soft); color: var(--accent); font-size: 12px; font-weight: 700; letter-spacing: .02em; white-space: nowrap; }
.chip.neutral { background: var(--surface-2); color: var(--muted); border: 1px solid var(--line); }
.chip.locked { background: var(--warn-soft); color: var(--warn); }
.chip.admin { background: var(--fg); color: var(--bg); }
.chip.ok { background: var(--ok-soft); color: var(--ok); }
.chip.off { opacity: .75; }
.perm-chips { display: flex; gap: 4px; flex-wrap: wrap; }
.perm-opts { display: grid; gap: 8px; }
.perm-opt { display: flex; gap: 12px; align-items: flex-start; padding: 10px 12px; border-radius: 12px; border: 1px solid var(--line); background: var(--surface-2); cursor: pointer; }
.perm-opt:has(input:checked) { border-color: var(--accent); background: var(--accent-soft); }
.perm-opt input { width: 20px; height: 20px; margin-top: 2px; accent-color: var(--accent); flex: none; }
.perm-opt > span { display: grid; gap: 2px; }
.perm-opt > span > span { font-size: 14px; color: var(--muted); }
.avatar { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 14px; color: #fff; font-family: var(--font-display); font-weight: 700; font-size: 16px; flex: none; }
.avatar.person { border-radius: 50%; background: var(--surface-2); color: var(--muted); border: 1px solid var(--line); width: 38px; height: 38px; font-size: 14px; }
.avatar.sm { width: 36px; height: 36px; font-size: 14px; border-radius: 11px; }

/* Login */
.login-shell { min-height: 100%; display: flex; flex-direction: column; }
.login-main { flex: 1; display: grid; place-items: center; padding-block: 32px; padding-left: 16px; padding-right: 16px; }
.login-stack { width: 100%; max-width: 420px; display: grid; gap: 16px; }
.login-card { background: var(--surface); border: 1px solid var(--line); border-radius: 18px; padding: 28px 24px; display: grid; gap: 16px; box-shadow: var(--shadow); }
.login-brand { display: flex; align-items: center; gap: 12px; }
.login-brand h1 { font-size: 26px; }
.login-card .sub { color: var(--muted); }
.demo-accounts { border: 1px dashed var(--line); border-radius: 14px; padding: 16px; display: grid; gap: 10px; }
.demo-accounts h2 { font-size: 15px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); font-family: var(--font-body); }
.demo-accounts ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.demo-acc { width: 100%; display: grid; grid-template-columns: 1fr auto; gap: 2px 12px; text-align: left; padding: 8px 12px; border-radius: 10px; border: 1px solid transparent; background: var(--surface-2); }
.demo-acc:hover { border-color: var(--accent); }
.demo-acc .n { font-weight: 700; }
.demo-acc .p { font-variant-numeric: tabular-nums; color: var(--muted); grid-row: span 2; align-self: center; letter-spacing: .15em; }
.demo-acc .r { font-size: 13px; color: var(--muted); }

/* App shell */
#app { height: 100%; display: flex; flex-direction: column; }
.top { position: relative; display: flex; align-items: center; gap: 10px; padding-block: 8px; padding-left: 10px; padding-right: 10px; background: var(--surface); border-bottom: 1px solid var(--line); flex: none; z-index: 20; }
.brand { display: flex; align-items: center; gap: 10px; font-family: var(--font-display); font-weight: 700; font-size: 19px; margin-right: auto; min-width: 0; border: 0; background: transparent; padding: 6px 10px 6px 6px; border-radius: 12px; color: var(--fg); }
.brand:hover, .brand[aria-expanded=true] { background: var(--surface-2); }
.brand-mark { position: relative; display: inline-grid; flex: none; transition: transform .15s ease; }
.brand:hover .brand-mark { transform: rotate(-6deg); }
.brand-dot { position: absolute; top: -2px; right: -3px; width: 10px; height: 10px; border-radius: 50%; background: var(--warn); border: 2px solid var(--surface); }
.brand-name { white-space: nowrap; letter-spacing: -.02em; }
.brand-cur { display: none; font-family: var(--font-body); font-size: 15px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.brand-caret { font-size: 12px; color: var(--muted); }
@media (prefers-reduced-motion: reduce) { .brand-mark { transition: none; } }
.popmenu { position: absolute; top: calc(100% + 6px); left: 10px; width: min(320px, calc(100vw - 20px)); max-height: calc(100vh - 90px); overflow: auto; background: var(--surface); border: 1px solid var(--line); border-radius: 16px; box-shadow: var(--shadow); padding: 8px; display: grid; gap: 2px; z-index: 40; animation: slide .18s ease-out; }
@media (prefers-reduced-motion: reduce) { .popmenu { animation: none; } }
.pm-item { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border: 0; border-radius: 10px; background: transparent; text-align: left; font-weight: 700; font-size: 15px; color: var(--fg); }
.pm-item > span:not(.ico):not(.badge) { flex: 1; }
.pm-item .ico { color: var(--muted); }
.pm-item:hover, .pm-item:focus-visible { background: var(--surface-2); }
.pm-item.on { background: var(--accent-soft); color: var(--accent); }
.pm-item.on .ico { color: var(--accent); }
.pm-sep { height: 1px; background: var(--line); margin: 6px 4px; }
.pm-profile { display: flex; align-items: center; gap: 12px; padding: 8px; border: 0; border-radius: 12px; background: transparent; text-align: left; color: var(--fg); }
.pm-profile:hover { background: var(--surface-2); }
.pm-who { display: grid; gap: 1px; min-width: 0; }
.pm-who span { font-size: 13px; color: var(--muted); }
.pm-who .pm-link { color: var(--accent); font-weight: 700; }
.pm-theme { display: grid; gap: 6px; padding: 6px 10px 8px; }
.pm-theme .seg button { flex: 1; justify-content: center; }
.pm-theme .seg, .profile .seg { display: flex; }
.seg { display: inline-flex; padding: 3px; border-radius: 12px; background: var(--surface-2); border: 1px solid var(--line); }
.seg button { display: inline-flex; align-items: center; gap: 6px; border: 0; background: transparent; padding: 6px 12px; border-radius: 9px; font-weight: 700; font-size: 14px; color: var(--muted); }
.seg button.on { background: var(--surface); color: var(--fg); box-shadow: 0 1px 3px rgba(0,0,0,.12); }
.top .me { display: flex; align-items: center; gap: 8px; padding: 4px 6px; min-width: 0; border: 0; background: transparent; border-radius: 12px; color: var(--fg); }
.top .me:hover { background: var(--surface-2); }
.admin-btn { position: relative; margin-left: auto; color: var(--fg); }
.admin-btn:hover { background: var(--surface-2); }
.admin-btn.on { background: var(--accent-soft); color: var(--accent); }
.admin-btn .ico { width: 22px; height: 22px; }
.admin-btn .nav-badge { position: absolute; top: 2px; right: 2px; }
.admin-btn + .me { margin-left: 0; }
img.avatar { object-fit: cover; padding: 0; }
.avatar.xs { width: 30px; height: 30px; font-size: 12px; }
.avatar.sm { width: 32px; height: 32px; font-size: 12px; }
.avatar.md { width: 46px; height: 46px; font-size: 16px; }
.avatar.xl { width: 96px; height: 96px; font-size: 32px; }
.msg { align-items: flex-end; gap: 8px; }
.msg-av { flex: none; margin-bottom: 2px; }
.msg-av-space { width: 32px; flex: none; }
.profile { display: grid; gap: 18px; }
.pf-top { display: flex; gap: 18px; align-items: center; flex-wrap: wrap; }
.pf-who { display: grid; gap: 6px; flex: 1 1 220px; min-width: 0; }
.pf-who strong { font-family: var(--font-display); font-size: 21px; }
.pf-who > span { color: var(--muted); }
.perm-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.perm-list li { display: flex; gap: 8px; align-items: center; font-size: 15px; }
.perm-list li span { width: 22px; height: 22px; border-radius: 6px; display: grid; place-items: center; font-weight: 700; font-size: 13px; }
.perm-list li.yes span { background: var(--ok-soft); color: var(--ok); }
.perm-list li.no { color: var(--muted); }
.perm-list li.no span { background: var(--surface-2); }
.me-name { font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 160px; }

main { flex: 1; min-height: 0; display: grid; grid-template-columns: 330px minmax(0, 1fr); }
main.admin-mode { display: block; overflow: auto; }

/* Sidebar */
.sidebar { background: var(--surface); border-right: 1px solid var(--line); overflow: auto; min-width: 0; }
.side-head { display: flex; align-items: baseline; gap: 8px; padding: 18px 16px 10px; }
.side-head h2 { font-size: 15px; font-family: var(--font-body); text-transform: uppercase; letter-spacing: .07em; color: var(--muted); }
.side-head .count { color: var(--muted); font-size: 14px; }
.glist { list-style: none; margin: 0; padding: 0 8px 16px; display: grid; gap: 2px; }
.gitem { width: 100%; display: flex; align-items: center; gap: 12px; padding: 10px; border: 0; border-radius: 12px; background: transparent; text-align: left; }
.gitem:hover { background: var(--surface-2); }
.gitem.active { background: var(--accent-soft); }
.gtext { flex: 1; min-width: 0; display: grid; gap: 2px; }
.grow { display: flex; align-items: center; gap: 8px; min-width: 0; }
.gname { font-weight: 700; flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.gtime { font-size: 12px; color: var(--muted); font-variant-numeric: tabular-nums; flex: none; }
.gprev { flex: 1; min-width: 0; font-size: 14px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.badge { min-width: 22px; height: 22px; padding: 0 7px; border-radius: 999px; background: var(--accent); color: var(--accent-fg); font-size: 12px; font-weight: 700; display: inline-grid; place-items: center; font-variant-numeric: tabular-nums; flex: none; }
.side-empty { padding: 8px 16px; color: var(--muted); }

/* Chat */
.chat { display: flex; flex-direction: column; min-height: 0; min-width: 0; background: var(--bg); }
.chat-head { display: flex; align-items: center; gap: 12px; padding: 10px 12px 10px 16px; background: var(--surface); border-bottom: 1px solid var(--line); flex: none; }
.chat-title { flex: 1; min-width: 0; }
.chat-title h2 { font-size: 19px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.chat-title p { font-size: 14px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.back { display: none; }
.msgs { flex: 1; overflow-y: auto; padding: 16px; display: flex; flex-direction: column; gap: 4px; }
.day { align-self: center; margin: 14px 0 8px; padding: 3px 12px; border-radius: 999px; background: var(--surface); border: 1px solid var(--line); font-size: 12px; font-weight: 700; color: var(--muted); letter-spacing: .04em; }
.msg { display: flex; }
.msg.mine { justify-content: flex-end; }
.msg + .msg:not(.cont) { margin-top: 6px; }
.bubble { max-width: min(560px, 78%); min-width: 0; background: var(--surface); border: 1px solid var(--line); border-radius: 4px 14px 14px 14px; padding: 8px 12px 6px; display: grid; gap: 4px; }
.msg.cont .bubble { border-radius: 14px; }
.msg.mine .bubble { background: var(--own); border-color: transparent; border-radius: 14px 4px 14px 14px; }
.msg.mine.cont .bubble { border-radius: 14px; }
.author { font-size: 13px; font-weight: 700; color: var(--accent); display: flex; align-items: center; gap: 6px; }
.author .tag { font-size: 11px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; }
.text { white-space: pre-wrap; overflow-wrap: anywhere; }
.meta { display: flex; align-items: center; justify-content: flex-end; gap: 4px; font-size: 12px; color: var(--muted); font-variant-numeric: tabular-nums; }
.del { border: 0; background: none; padding: 2px; border-radius: 6px; color: var(--muted); display: inline-grid; opacity: .55; }
.del:hover, .del:focus-visible { opacity: 1; color: var(--danger); }
.del .ico { width: 15px; height: 15px; }
.att-img { padding: 0; border: 0; background: none; border-radius: 10px; overflow: hidden; display: block; max-width: 320px; }
.att-img img { display: block; width: 100%; max-height: 320px; object-fit: cover; }
.att-file { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 10px; background: var(--surface-2); border: 1px solid var(--line); min-width: 0; }
.msg.mine .att-file { background: var(--surface); }
.att-file .fn { flex: 1; min-width: 0; display: grid; }
.att-file .fn strong { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-size: 14px; }
.att-file .fn span { font-size: 12px; color: var(--muted); }
.empty { flex: 1; display: grid; place-content: center; text-align: center; gap: 8px; padding: 32px 16px; color: var(--muted); }
.empty h2 { color: var(--fg); font-size: 22px; }
.empty p { max-width: 36ch; margin-inline: auto; }

.composer { flex: none; background: var(--surface); border-top: 1px solid var(--line); padding: 10px 12px; display: grid; gap: 8px; }
.composer-row { display: flex; align-items: flex-end; gap: 8px; }
.composer textarea { flex: 1; min-width: 0; resize: none; min-height: 44px; max-height: 160px; padding: 10px 14px; border-radius: 22px; border: 1px solid var(--line); background: var(--surface-2); line-height: 1.4; }
.send { width: 44px; height: 44px; border-radius: 50%; border: 0; background: var(--accent); color: var(--accent-fg); display: grid; place-items: center; flex: none; }
.send:hover { background: var(--accent-hover); }
.pending:empty { display: none; }
.pending-chip { display: flex; align-items: center; gap: 10px; padding: 6px 6px 6px 8px; border-radius: 12px; background: var(--surface-2); border: 1px solid var(--line); max-width: 420px; }
.pending-chip img { width: 44px; height: 44px; object-fit: cover; border-radius: 8px; }
.pending-chip .fn { flex: 1; min-width: 0; display: grid; font-size: 14px; }
.pending-chip .fn strong { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pending-chip .fn span { color: var(--muted); font-size: 12px; }

/* Demo strip */
.demobar { flex: none; display: flex; flex-wrap: wrap; align-items: center; gap: 6px 16px; padding-block: 8px; padding-left: 16px; padding-right: 16px; background: var(--surface-2); border-top: 1px solid var(--line); font-size: 13px; color: var(--muted); }
.demo-tag { font-weight: 700; text-transform: uppercase; letter-spacing: .08em; color: var(--warn); }
.demo-text { margin-right: auto; }
.demo-toggle { display: inline-flex; align-items: center; gap: 6px; color: var(--fg); }
.demo-toggle input { width: 16px; height: 16px; accent-color: var(--accent); }

/* Admin */
.admin-wrap { max-width: 980px; margin: 0 auto; padding-block: 24px 40px; padding-left: 16px; padding-right: 16px; display: grid; grid-template-columns: minmax(0, 1fr); gap: 18px; }
.admin-head h1 { font-size: 28px; }
.admin-head p { color: var(--muted); margin-top: 4px; max-width: 60ch; }
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); }
.tabs button { border: 0; background: none; padding: 10px 14px; font-weight: 700; color: var(--muted); border-bottom: 3px solid transparent; margin-bottom: -1px; }
.tabs button[aria-selected=true] { color: var(--fg); border-bottom-color: var(--accent); }
.toolbar { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.toolbar input { flex: 1 1 220px; max-width: 360px; }
.toolbar .btn.primary { margin-left: auto; }
.alist { list-style: none; margin: 0; padding: 0; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; overflow: hidden; }
.arow { display: flex; align-items: center; gap: 14px; padding: 14px 16px; flex-wrap: wrap; }
.arow + .arow { border-top: 1px solid var(--line); }
.arow-main { flex: 1 1 260px; min-width: 0; display: grid; gap: 4px; }
.arow-title { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.arow-title strong { font-size: 16px; }
.arow-sub { font-size: 14px; color: var(--muted); overflow-wrap: anywhere; }
.arow-actions { display: flex; gap: 4px; flex-wrap: wrap; }
.arow.locked .arow-title strong { color: var(--muted); }
.alist-empty { padding: 20px 16px; color: var(--muted); }

/* Modal */
[hidden] { display: none !important; }
#modal-layer { position: fixed; inset: 0; z-index: 50; display: grid; place-items: center; padding: 16px; }
.scrim { position: absolute; inset: 0; background: rgba(16, 10, 26, .45); }
.modal { position: relative; width: 100%; max-width: 520px; max-height: calc(100vh - 32px - env(safe-area-inset-top, 0px) - env(safe-area-inset-bottom, 0px)); max-height: calc(100dvh - 32px - env(safe-area-inset-top, 0px) - env(safe-area-inset-bottom, 0px)); display: flex; flex-direction: column; background: var(--surface); border-radius: 18px; box-shadow: var(--shadow); border: 1px solid var(--line); }
.modal.wide { max-width: 720px; }
.modal-head { display: flex; align-items: center; gap: 8px; padding: 16px 12px 8px 20px; }
.modal-head h2 { flex: 1; font-size: 21px; min-width: 0; overflow-wrap: anywhere; }
.modal-body { padding: 8px 20px 16px; overflow: auto; display: grid; gap: 14px; min-height: 0; flex: 1 1 auto; align-content: start; }
.modal-head, .modal-foot { flex: none; }
.modal-foot { display: flex; justify-content: flex-end; gap: 8px; flex-wrap: wrap; padding: 12px 20px 18px; border-top: 1px solid var(--line); }
.lightbox-img { max-width: 100%; max-height: 65vh; border-radius: 10px; justify-self: center; }
.mlist { list-style: none; margin: 0; padding: 0; display: grid; }
.mrow { display: flex; align-items: center; gap: 10px; padding: 8px 0; flex-wrap: wrap; }
.mrow + .mrow { border-top: 1px solid var(--line); }
.mrow .nm { flex: 1 1 140px; min-width: 0; font-weight: 700; display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.add-row { display: flex; gap: 8px; flex-wrap: wrap; padding-top: 8px; border-top: 1px solid var(--line); }
.add-row select { flex: 1 1 200px; }
.gtable { display: grid; gap: 6px; }
.gtable-row { display: flex; align-items: center; gap: 12px; padding: 8px 10px; border-radius: 10px; background: var(--surface-2); flex-wrap: wrap; }
.gtable-row .gn { flex: 1 1 150px; font-weight: 700; display: flex; align-items: center; gap: 8px; }
.dot { width: 12px; height: 12px; border-radius: 4px; flex: none; }
.check { display: inline-flex; align-items: center; gap: 6px; font-size: 14px; }
.check input { width: 18px; height: 18px; accent-color: var(--accent); }
.colors { display: flex; gap: 8px; flex-wrap: wrap; }
.color-opt { display: inline-flex; align-items: center; gap: 8px; padding: 6px 12px 6px 8px; border-radius: 999px; border: 1px solid var(--line); font-size: 14px; font-weight: 700; }
.color-opt input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.color-opt:has(input:checked) { border-color: var(--accent); outline: 2px solid var(--accent); }
.color-opt:has(input:focus-visible) { outline: 2px solid var(--accent); outline-offset: 2px; }
.color-opt .dot { width: 18px; height: 18px; border-radius: 6px; }
.creds dl { display: grid; grid-template-columns: auto 1fr; gap: 6px 16px; margin: 4px 0 0; padding: 14px 16px; border-radius: 12px; background: var(--surface-2); border: 1px solid var(--line); }
.creds dt { color: var(--muted); font-weight: 700; }
.creds dd { margin: 0; font-weight: 700; }
.creds .pin { font-size: 22px; letter-spacing: .3em; font-variant-numeric: tabular-nums; }
.note { font-size: 14px; color: var(--muted); }

textarea.input { min-height: 90px; resize: vertical; line-height: 1.4; }
.two { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.two > * { min-width: 0; }

/* Gemeinde tags */
.chip.gem { border: 0; }
.chip.gem.tra { background: var(--gem-tra-soft); color: var(--gem-tra); }
.chip.gem.kue { background: var(--gem-kue-soft); color: var(--gem-kue); }
.gem-mark { display: inline-flex; gap: 3px; }
.gem-mark i { width: 10px; height: 10px; border-radius: 3px; display: block; }
.gem-mark .tra { background: var(--gem-tra); }
.gem-mark .kue { background: var(--gem-kue); }
.gem-mark .none { background: var(--line); }
.gsec + .gsec { margin-top: 6px; }
.gsec-head { display: flex; align-items: center; gap: 8px; padding: 12px 18px 6px; }
.gsec-head h3 { font-family: var(--font-body); font-size: 13px; text-transform: uppercase; letter-spacing: .07em; color: var(--muted); flex: 1; min-width: 0; }
.gsec-head .count { font-size: 13px; color: var(--muted); font-variant-numeric: tabular-nums; }
.title-tags { display: inline-flex; gap: 4px; vertical-align: middle; margin-left: 4px; }
.chk-row { display: flex; gap: 16px; flex-wrap: wrap; }

/* Calendar */
main.cal-mode { display: block; overflow: auto; }
.calwrap { display: grid; grid-template-columns: 290px minmax(0, 1fr); min-height: 100%; }
.cal-side { background: var(--surface); border-right: 1px solid var(--line); padding: 18px 16px; display: grid; gap: 18px; align-content: start; min-width: 0; }
.cal-side summary { font-weight: 700; cursor: pointer; padding: 4px 0; list-style: none; display: flex; align-items: center; gap: 8px; }
.cal-side summary::-webkit-details-marker { display: none; }
.cal-side summary::after { content: "▾"; color: var(--muted); margin-left: auto; }
.cal-side details:not([open]) summary::after { content: "▸"; }
.cal-side details > div { display: grid; gap: 18px; padding-top: 10px; }
.side-label { font-size: 13px; text-transform: uppercase; letter-spacing: .07em; color: var(--muted); font-weight: 700; }
.gem-filter { display: grid; gap: 4px; }
.gem-filter button { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 10px; border: 1px solid transparent; background: transparent; text-align: left; font-weight: 700; }
.gem-filter button:hover { background: var(--surface-2); }
.gem-filter button[aria-pressed=true] { background: var(--accent-soft); color: var(--accent); }
.callist { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }
.calitem { display: flex; align-items: flex-start; gap: 10px; padding: 8px 6px 8px 10px; border-radius: 10px; }
.calitem:hover { background: var(--surface-2); }
.calitem input { width: 18px; height: 18px; margin-top: 2px; flex: none; }
.calitem label { flex: 1; min-width: 0; display: grid; gap: 4px; cursor: pointer; }
.calitem .cn { font-weight: 700; overflow-wrap: anywhere; }
.calitem .cc { display: flex; gap: 4px; flex-wrap: wrap; }
.calitem .icon-btn { width: 32px; height: 32px; }
.cal-main { padding: 18px 16px 32px; display: grid; gap: 14px; align-content: start; min-width: 0; }
.cal-toolbar { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.cal-toolbar h1 { font-size: 26px; margin-right: auto; min-width: 9ch; }
.cal-toolbar .nav { display: inline-flex; gap: 2px; }
.banner { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 10px 14px; border-radius: 12px; background: var(--accent-soft); color: var(--fg); font-size: 14px; }
.banner strong { flex: 1; min-width: 0; }
.month-scroll { overflow-x: auto; }
.month { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: 14px; overflow: hidden; }
.dow { background: var(--surface-2); padding: 6px 8px; font-size: 12px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; }
.cell { background: var(--surface); min-height: 104px; padding: 5px; display: flex; flex-direction: column; align-items: stretch; gap: 3px; border: 0; text-align: left; min-width: 0; border-radius: 0; }
.cell:hover { background: var(--surface-2); }
.cell.out { background: var(--surface-2); color: var(--muted); }
.cell.out .ev-pill { opacity: .6; }
.cell.sel { box-shadow: inset 0 0 0 2px var(--accent); }
.cell .dn { font-weight: 700; font-size: 13px; font-variant-numeric: tabular-nums; width: 26px; height: 26px; display: grid; place-items: center; border-radius: 50%; }
.cell.today .dn { background: var(--accent); color: var(--accent-fg); }
.ev-pill { display: flex; align-items: center; gap: 4px; min-width: 0; font-size: 12px; line-height: 1.3; padding: 1px 2px; }
.ev-pill .t { font-variant-numeric: tabular-nums; color: var(--muted); flex: none; }
.ev-pill .tt { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.ev-pill .dot, .dots .dot { width: 8px; height: 8px; border-radius: 3px; background: var(--c); }
.more { font-size: 12px; color: var(--muted); padding-left: 2px; }
.dots { display: none; gap: 3px; flex-wrap: wrap; padding-left: 4px; }
.agenda { display: grid; gap: 10px; }
.agenda-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.agenda-head h2 { font-size: 19px; flex: 1; min-width: 0; }
.agenda-day + .agenda-day { margin-top: 10px; }
.agenda-day h3 { font-size: 15px; margin-bottom: 6px; }
.agenda-day h3.today { color: var(--accent); }
.ev-list { display: grid; gap: 6px; }
.ev-row { display: grid; grid-template-columns: 104px minmax(0, 1fr); gap: 12px; padding: 11px 14px; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; text-align: left; width: 100%; }
.ev-row:hover { border-color: var(--accent); }
.ev-time { font-weight: 700; font-variant-numeric: tabular-nums; color: var(--muted); font-size: 14px; padding-top: 1px; }
.ev-body { display: grid; gap: 3px; min-width: 0; }
.ev-title { font-weight: 700; overflow-wrap: anywhere; }
.ev-sub { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; font-size: 14px; color: var(--muted); }
.ev-sub .dot { width: 9px; height: 9px; border-radius: 3px; }
.cal-empty { padding: 18px 16px; border-radius: 12px; border: 1px dashed var(--line); color: var(--muted); }
.evd { display: grid; grid-template-columns: auto 1fr; gap: 8px 16px; margin: 0; }
.evd dt { color: var(--muted); font-weight: 700; font-size: 14px; padding-top: 1px; }
.evd dd { margin: 0; overflow-wrap: anywhere; white-space: pre-wrap; display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.admins-box { display: grid; gap: 8px; }
.admins-box ul { list-style: none; margin: 0; padding: 0; display: flex; gap: 6px; flex-wrap: wrap; }
.admins-box li { display: inline-flex; align-items: center; gap: 4px; padding: 3px 4px 3px 10px; border-radius: 999px; background: var(--surface-2); border: 1px solid var(--line); font-weight: 700; font-size: 14px; }
.admins-box li .icon-btn { width: 26px; height: 26px; }
.admins-box li .ico { width: 14px; height: 14px; }
.rights { display: grid; gap: 6px; }
.rights .gtable-row select { flex: 0 1 210px; min-width: 0; min-height: 36px; }

/* People, types, event detail */
.func { font-size: 13px; font-weight: 400; color: var(--muted); }
.chip.type { background: var(--surface-2); color: var(--fg); border: 1px solid var(--line); }
.open { color: var(--warn); font-style: italic; }
.inline { display: inline-flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.dot.inline-dot { display: inline-block; }
.evdetail { display: grid; gap: 18px; }
.chips-row { display: flex; gap: 6px; flex-wrap: wrap; }
.ed-sec { display: grid; gap: 10px; padding-top: 14px; border-top: 1px solid var(--line); }
.ed-sec h3 { font-family: var(--font-body); font-size: 13px; text-transform: uppercase; letter-spacing: .07em; color: var(--muted); display: flex; align-items: center; gap: 8px; }
.ed-sec h3 .chip { text-transform: none; letter-spacing: .02em; }
.doclist { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 8px; }
.doclist .check { padding: 8px 10px; border-radius: 10px; background: var(--surface-2); border: 1px solid var(--line); font-size: 15px; }
.doclist .check:has(input:checked) { background: var(--accent-soft); border-color: transparent; }
.todo-list, .file-list, .task-list { list-style: none; margin: 0; padding: 0; display: grid; }
.todo { display: flex; align-items: center; gap: 10px; padding: 6px 0; flex-wrap: wrap; }
.todo + .todo { border-top: 1px solid var(--line); }
.todo input[type=checkbox], .task-row input[type=checkbox] { width: 20px; height: 20px; accent-color: var(--accent); flex: none; }
.todo-text { flex: 1 1 180px; min-width: 0; overflow-wrap: anywhere; cursor: pointer; }
.todo.done .todo-text, .task-row.done .task-text { text-decoration: line-through; color: var(--muted); }
.todo-who { flex: 0 1 180px; min-height: 36px; min-width: 0; }
.todo-who-txt { font-size: 14px; color: var(--muted); }
.add-row input[type=text] { flex: 2 1 200px; }
.file-list li { display: flex; align-items: center; gap: 10px; padding: 6px 0; flex-wrap: wrap; }
.file-list li + li { border-top: 1px solid var(--line); }
.file-list .fn { flex: 1 1 160px; min-width: 0; display: grid; }
.file-list .fn strong { font-size: 14px; overflow-wrap: anywhere; }
.file-list .fn span { font-size: 12px; color: var(--muted); }
.thumb { width: 48px; height: 48px; padding: 0; border: 0; border-radius: 8px; overflow: hidden; background: none; flex: none; }
.thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.picker { display: grid; gap: 6px; }
.type-box { display: grid; gap: 14px; padding: 14px; border-radius: 12px; background: var(--surface-2); border: 1px solid var(--line); }
.type-box:empty { display: none; }
.rep-box { display: grid; gap: 8px; padding: 12px 14px; border-radius: 12px; border: 1px dashed var(--line); }
.linkbtn.small { font-size: 14px; text-align: left; }
.muted { color: var(--muted); font-size: 14px; }
.warn-text { color: var(--warn); }

/* Nav badge */
.seg button { position: relative; }
.nav-badge { position: absolute; top: -4px; right: -4px; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 999px; background: var(--accent); color: var(--accent-fg); font-size: 11px; font-weight: 700; display: grid; place-items: center; font-variant-numeric: tabular-nums; }

/* Pages: Aufgaben, Übersichten */
main.page-mode { display: block; overflow: auto; }
.page-wrap { max-width: 1180px; margin: 0 auto; padding-block: 24px 40px; padding-left: 16px; padding-right: 16px; display: grid; grid-template-columns: minmax(0, 1fr); gap: 18px; }
.page-wrap .tabs, .admin-wrap .tabs { overflow-x: auto; scrollbar-width: none; }
.tabs button { white-space: nowrap; flex: none; }
.page-head { display: flex; gap: 12px; align-items: flex-start; flex-wrap: wrap; }
.page-head > div { flex: 1 1 300px; min-width: 0; }
.page-head h1 { font-size: 28px; }
.page-head p { color: var(--muted); margin-top: 4px; max-width: 62ch; }
.new-task { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr) minmax(0, 170px) auto; gap: 10px; align-items: end; padding: 14px; border-radius: 14px; background: var(--surface); border: 1px solid var(--line); }
.split { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 22px; align-items: start; }
.split-main { display: grid; gap: 16px; min-width: 0; }
.split-side { display: grid; gap: 10px; min-width: 0; }
.split-side h2, .task-group h2 { font-size: 17px; display: flex; align-items: baseline; gap: 8px; }
.split-side h2 .count, .task-group h2 .count { font-family: var(--font-body); font-size: 14px; font-weight: 400; color: var(--muted); }
.filters { display: flex; gap: 10px; flex-wrap: wrap; align-items: end; }
.filters .field { flex: 1 1 200px; max-width: 280px; }
.task-group { display: grid; gap: 8px; }
.tg-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; flex-wrap: wrap; }
.icon-gap { width: 40px; flex: none; }
.ed-sec h3 .h3-act { margin-left: auto; font-family: var(--font-body); text-transform: none; letter-spacing: 0; font-size: 14px; }
.dash-bulk { justify-self: start; margin: 4px 6px 0; }
.task-list { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; }
.task-row { display: flex; align-items: flex-start; gap: 12px; padding: 12px 10px 12px 14px; }
.task-row + .task-row { border-top: 1px solid var(--line); }
.task-row input[type=checkbox] { margin-top: 2px; }
.task-main { flex: 1; min-width: 0; display: grid; gap: 6px; }
.task-text { font-weight: 700; overflow-wrap: anywhere; cursor: pointer; }
.task-meta { display: flex; gap: 6px 10px; flex-wrap: wrap; align-items: center; }
.task-row .icon-btn { width: 34px; height: 34px; }
.svc-row { display: grid; grid-template-columns: 58px minmax(0, 1fr); gap: 12px; align-items: start; padding: 10px 12px; border-radius: 12px; border: 1px solid var(--line); background: var(--surface); text-align: left; width: 100%; }
.svc-row:hover { border-color: var(--accent); }
.svc-date { display: grid; justify-items: center; padding: 6px 0; border-radius: 10px; background: var(--accent-soft); color: var(--accent); font-variant-numeric: tabular-nums; }
.svc-date strong { font-family: var(--font-display); font-size: 20px; line-height: 1.1; }
.svc-date span { font-size: 11px; font-weight: 700; }
.summary { display: flex; gap: 6px; flex-wrap: wrap; }
.tbl-wrap { overflow-x: auto; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; }
.tbl-wrap table { border-collapse: collapse; width: 100%; font-size: 14px; min-width: 760px; }
.tbl-wrap th { text-align: left; background: var(--surface-2); color: var(--muted); font-size: 12px; text-transform: uppercase; letter-spacing: .06em; padding: 10px 12px; white-space: nowrap; border-bottom: 1px solid var(--line); }
.tbl-wrap td { padding: 10px 12px; border-top: 1px solid var(--line); vertical-align: top; }
.tbl-wrap tbody tr:first-child td { border-top: 0; }
.tbl-wrap tbody tr { cursor: pointer; }
.tbl-wrap tbody tr:hover td, .tbl-wrap tbody tr:focus-visible td { background: var(--surface-2); }
.tbl-wrap td.num { font-variant-numeric: tabular-nums; white-space: nowrap; }
.tbl-wrap td.me { font-weight: 700; color: var(--accent); }
.tbl-wrap td.strong { font-weight: 700; }
.tbl-wrap td .chip { margin: 2px 4px 0 0; }
.miss { display: flex; flex-wrap: wrap; gap: 4px; }

/* Urlaub */
.vac-bar { display: flex; align-items: flex-end; gap: 16px; flex-wrap: wrap; border-bottom: 1px solid var(--line); }
.vac-bar .tabs { border-bottom: 0; flex: 1 1 auto; }
.vac-bar .field { width: 120px; padding-bottom: 6px; }
.vac-month { font-size: 22px; margin-right: auto; }
.vac-cell { cursor: default; gap: 3px; }
.vac-cell.busy { background: var(--danger-soft); }
.vac-chip { display: flex; align-items: center; gap: 5px; border: 0; padding: 2px 6px; border-radius: 6px; background: var(--surface-2); font-size: 12px; font-weight: 700; color: var(--fg); text-align: left; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.vac-chip:hover { background: var(--accent-soft); }
.vac-dot { width: 9px; height: 9px; border-radius: 3px; background: var(--c); flex: none; display: inline-block; }
.vac-person { display: grid; gap: 10px; }
.vac-person + .vac-person { padding-top: 10px; }
.vac-person-head { display: flex; align-items: center; gap: 12px; padding-bottom: 8px; border-bottom: 3px solid var(--c); }
.vac-person-head h2 { font-size: 20px; }
.vac-person-head p { color: var(--muted); font-size: 14px; }
.tbl-wrap table.compact { min-width: 560px; }
.syn-wrap { max-height: 70vh; }
.tbl-wrap table.syn { min-width: 560px; }
.syn th { position: sticky; top: 0; z-index: 1; }
.syn td { padding: 6px 10px; white-space: nowrap; }
.syn td.syn-on { background: var(--surface-2); box-shadow: inset 4px 0 0 var(--c); }
.syn td.syn-on button { border: 0; background: none; padding: 0; font-weight: 700; font-size: 13px; color: var(--fg); }
.syn tr.busy td { background: var(--danger-soft); }
.syn tr.busy td.syn-on { background: var(--danger-soft); }
.syn tr.now td:first-child { color: var(--accent); }
.syn tr.now td { border-top: 2px solid var(--accent); }
.syn tbody tr { cursor: default; }
@media (max-width: 760px) {
  .vac-cell .vac-chip { font-size: 10px; padding: 1px 3px; }
  .vac-cell .vac-chip .vac-dot { display: none; }
}

/* Sign-in and security */
.boot { display: grid; place-items: center; height: 100%; color: var(--muted); font-size: 15px; }
.login-card h2 { font-size: 21px; }
.login-info { padding: 10px 12px; border-radius: 10px; background: var(--ok-soft); color: var(--ok); font-weight: 700; font-size: 14px; }
.pw-wrap { position: relative; display: flex; }
.pw-wrap input { padding-right: 96px; }
.pw-eye { position: absolute; right: 4px; top: 50%; transform: translateY(-50%); border: 0; background: transparent; color: var(--accent); font-weight: 700; font-size: 13px; padding: 6px 10px; border-radius: 8px; }
.pw-eye:hover { background: var(--accent-soft); }
.pw-strength { display: grid; gap: 4px; }
.pw-meter { display: grid; grid-template-columns: repeat(4, 1fr); gap: 4px; }
.pw-meter i { height: 5px; border-radius: 3px; background: var(--line); }
.pw-meter[data-s="1"] i:nth-child(-n+1) { background: var(--danger); }
.pw-meter[data-s="2"] i:nth-child(-n+2) { background: var(--warn); }
.pw-meter[data-s="3"] i:nth-child(-n+3) { background: var(--ok); }
.pw-meter[data-s="4"] i { background: var(--ok); }
.quick-who { display: grid; justify-items: center; gap: 6px; text-align: center; }
.quick-who p { font-size: 20px; font-family: var(--font-display); }
.steps { margin: 0; padding-left: 20px; display: grid; gap: 6px; font-size: 15px; }
.qr-box { width: 200px; height: 200px; justify-self: center; display: grid; place-items: center; padding: 6px; border-radius: 12px; background: #fff; border: 1px solid var(--line); text-align: center; }
.qr-box svg { width: 100%; height: 100%; }
.qr-box .hint { color: #5E596B; }
.secret { display: grid; gap: 4px; justify-items: center; }
.secret code, .codes code, .demo-accounts code { font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace; font-size: 15px; letter-spacing: .06em; background: var(--surface-2); border: 1px solid var(--line); padding: 4px 8px; border-radius: 8px; overflow-wrap: anywhere; }
.codes { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px; }
.codes code { display: block; text-align: center; }
.demo-help { display: flex; flex-wrap: wrap; gap: 6px 10px; align-items: center; padding: 10px 12px; border-radius: 10px; border: 1px dashed var(--warn); font-size: 14px; }
.muted-link { color: var(--muted); }
.demo-acc .n { display: flex; gap: 6px; align-items: center; }
.demo-acc .r { overflow-wrap: anywhere; }
.sec-box { display: grid; gap: 8px; padding: 12px 14px; border-radius: 14px; border: 1px solid var(--line); background: var(--surface-2); }
.sec-row { display: flex; gap: 10px; align-items: center; justify-content: space-between; flex-wrap: wrap; padding: 6px 0; }
.sec-row + .sec-row { border-top: 1px solid var(--line); }
.sec-row > div:first-child { display: grid; gap: 2px; flex: 1 1 220px; min-width: 0; }
.sec-row span { font-size: 13px; color: var(--muted); overflow-wrap: anywhere; }
.sec-line { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.dev-list { list-style: none; margin: 0; padding: 0; display: grid; }
.dev-list li { display: flex; gap: 10px; align-items: center; padding: 8px 0; flex-wrap: wrap; }
.dev-list li + li { border-top: 1px solid var(--line); }
.dev-list .fn { flex: 1 1 200px; display: grid; gap: 2px; min-width: 0; }
.dev-list .fn strong { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.dev-list .fn span { font-size: 13px; color: var(--muted); }
.creds .pw { font-size: 18px; letter-spacing: .02em; font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace; overflow-wrap: anywhere; }
.avatar.xxs { width: 20px; height: 20px; font-size: 9px; }
.person-tag { display: inline-flex; align-items: center; gap: 5px; padding: 2px 8px 2px 3px; border-radius: 999px; background: var(--surface-2); border: 1px solid var(--line); font-size: 14px; }
.person-tag:not(:has(.avatar)) { padding-left: 8px; }
.person-tag.me { background: var(--accent-soft); border-color: transparent; color: var(--accent); font-weight: 700; }

.mpick { display: grid; gap: 6px; }
.mp-chips { display: flex; gap: 6px; flex-wrap: wrap; }
.mp-add { display: flex; gap: 6px; flex-wrap: wrap; }
.mp-add select { flex: 1 1 200px; min-height: 40px; }
.mp-add input { flex: 1 1 160px; }
.mp-x { border: 0; background: none; padding: 0 2px 0 4px; font-size: 16px; line-height: 1; color: var(--muted); border-radius: 4px; }
.mp-x:hover { color: var(--danger); }
.todo-main { flex: 1 1 200px; min-width: 0; display: grid; gap: 4px; }
.todo-who-txt { display: flex; flex-wrap: wrap; gap: 4px; }
.todo-add { display: grid; grid-template-columns: minmax(0, 1fr); gap: 8px; padding-top: 8px; border-top: 1px solid var(--line); }
.todo-add > .btn { justify-self: start; }
.task-btns { display: inline-flex; gap: 2px; flex-wrap: wrap; align-items: center; }
.task-row .task-btns { align-self: center; }
.task-log { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; font-size: 14px; }
.task-log li { display: grid; gap: 1px; padding-left: 10px; border-left: 2px solid var(--line); }
.task-log li span { font-size: 12px; color: var(--muted); }
@media (max-width: 600px) { .task-row { flex-wrap: wrap; } .task-row .task-btns { width: 100%; padding-left: 32px; } }

/* Dashboard */
.dash { gap: 20px; }
.dash-profile { display: flex; gap: 20px; align-items: center; flex-wrap: wrap; padding: 20px 22px; border-radius: 18px; background: var(--surface); border: 1px solid var(--line); }
.dp-av { position: relative; flex: none; }
.dp-dot { position: absolute; right: 2px; bottom: 4px; width: 22px; height: 22px; border-radius: 50%; border: 4px solid var(--surface); background: var(--sc); }
.dp-main { flex: 1 1 280px; min-width: 0; display: grid; gap: 2px; }
.dp-greet { color: var(--muted); font-size: 15px; }
.dp-main h1 { font-size: 30px; }
.dp-sub { color: var(--muted); font-size: 15px; }
.dp-next { margin-top: 6px; font-size: 15px; }
.dp-status { display: grid; gap: 6px; flex: 0 1 230px; }
.dp-status .hint { font-size: 12px; }
.status { display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px 3px 8px; border-radius: 999px; font-size: 13px; font-weight: 700; background: var(--surface-2); border: 1px solid var(--line); justify-self: start; white-space: nowrap; }
.status i { width: 9px; height: 9px; border-radius: 50%; background: var(--sc); }
.st-online { --sc: var(--ok); }
.st-termin { --sc: var(--warn); }
.st-urlaub { --sc: var(--gem-tra); }
.st-frei { --sc: var(--muted); }
.dash-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 16px; align-items: start; }
.dash-card { display: grid; grid-template-rows: auto 1fr auto; background: var(--surface); border: 1px solid var(--line); border-radius: 16px; overflow: hidden; min-width: 0; }
.dash-head { display: flex; align-items: center; gap: 10px; padding: 14px 16px 6px; }
.dash-head h2 { font-size: 18px; flex: 1; }
.dash-head .count { font-size: 13px; font-weight: 700; color: var(--accent); background: var(--accent-soft); padding: 2px 9px; border-radius: 999px; }
.dash-ico { width: 32px; height: 32px; border-radius: 10px; background: var(--accent-soft); color: var(--accent); display: grid; place-items: center; }
.dash-body { padding: 4px 10px 10px; display: grid; gap: 8px; align-content: start; min-width: 0; }
.dash-body > .note { padding: 6px; }
.dash-seg { justify-self: start; margin-left: 6px; }
.dash-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }
.dash-item { width: 100%; display: flex; align-items: center; gap: 10px; padding: 8px 6px; border: 0; border-radius: 10px; background: transparent; text-align: left; color: var(--fg); min-width: 0; }
.dash-item:hover { background: var(--surface-2); }
.dash-item.live { background: var(--accent-soft); }
.di-main { flex: 1; min-width: 0; display: grid; gap: 1px; }
.di-main strong, .di-main label { font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.di-main span { font-size: 13px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.di-side { display: grid; justify-items: end; gap: 3px; font-size: 12px; color: var(--muted); flex: none; }
.di-time { display: grid; justify-items: center; width: 56px; flex: none; font-variant-numeric: tabular-nums; }
.di-time strong { font-size: 15px; }
.di-time span { font-size: 11px; color: var(--accent); font-weight: 700; }
.dash-task { display: flex; align-items: center; gap: 10px; padding: 6px; }
.dash-task input { width: 20px; height: 20px; accent-color: var(--accent); flex: none; }
.dash-task label { cursor: pointer; }
.dash-vac { display: flex; align-items: center; gap: 10px; padding: 4px 6px; }
.vac-next { display: grid; gap: 2px; padding: 8px 10px; border-radius: 12px; background: var(--gem-tra-soft); color: var(--fg); margin: 0 6px; }
.vac-next strong { font-family: var(--font-display); font-size: 22px; color: var(--gem-tra); }
.vac-next span { font-size: 14px; }
.dash-go { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 12px 16px; border: 0; border-top: 1px solid var(--line); background: var(--surface-2); color: var(--accent); font-weight: 700; font-size: 15px; text-align: left; }
.dash-go:hover { background: var(--accent-soft); }
@media (max-width: 600px) { .dash-grid { grid-template-columns: minmax(0, 1fr); } .dp-main h1 { font-size: 24px; } .dash-profile { padding: 16px; } }

/* Calendar side: sections */
.side-sec.dim .callist { opacity: .6; }
.side-head-btn { display: flex; align-items: center; gap: 8px; width: 100%; padding: 8px 10px; border: 0; border-radius: 10px; background: transparent; font-size: 13px; text-transform: uppercase; letter-spacing: .07em; font-weight: 700; color: var(--muted); text-align: left; }
.side-head-btn:hover { background: var(--surface-2); }
.side-head-btn.on { background: var(--accent-soft); color: var(--accent); }
.shb-hint { margin-left: auto; text-transform: none; letter-spacing: 0; font-size: 12px; font-weight: 400; }
.res-group { display: grid; gap: 2px; }
.res-kind { font-size: 12px; color: var(--muted); padding: 4px 10px 0; }
.res-cn { display: inline-flex; align-items: center; gap: 6px; }
.res-cn .ico { width: 16px; height: 16px; color: var(--muted); }
.res-tag .ico { width: 16px; height: 16px; margin-left: 4px; color: var(--muted); }
.conflict { padding: 10px 12px; border-radius: 10px; background: var(--danger-soft); color: var(--fg); font-size: 14px; display: grid; gap: 4px; }
.conflict strong { color: var(--danger); }
.conflict ul { margin: 0; padding-left: 18px; }
.alist-group { padding: 10px 16px 6px; font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .07em; color: var(--muted); background: var(--surface-2); border-top: 1px solid var(--line); }
.alist-group:first-child { border-top: 0; }
.h1-sub { font-family: var(--font-body); font-size: 16px; font-weight: 700; color: var(--muted); }

/* Week grid */
.wk-scroll { overflow-x: auto; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); }
.wk { min-width: 720px; }
.wk-row { display: grid; grid-template-columns: 56px repeat(7, minmax(0, 1fr)); }
.wk-head { border-bottom: 1px solid var(--line); background: var(--surface-2); position: sticky; top: 0; z-index: 2; }
.wk-day { display: grid; justify-items: center; gap: 0; padding: 6px 2px; border: 0; background: transparent; color: var(--fg); border-left: 1px solid var(--line); }
.wk-day span { font-size: 12px; color: var(--muted); font-weight: 700; text-transform: uppercase; }
.wk-day strong { font-size: 17px; font-family: var(--font-display); width: 30px; height: 30px; display: grid; place-items: center; border-radius: 50%; }
.wk-day.today strong { background: var(--accent); color: var(--accent-fg); }
.wk-day.sel { box-shadow: inset 0 -3px 0 var(--accent); }
.wk-lab { font-size: 11px; color: var(--muted); padding: 6px 4px; text-align: right; }
.wk-all { border-bottom: 1px solid var(--line); min-height: 34px; }
.wk-allcell { border-left: 1px solid var(--line); padding: 3px; display: grid; gap: 2px; align-content: start; min-width: 0; }
.wk-chip { border: 0; border-radius: 6px; padding: 2px 6px; font-size: 12px; font-weight: 700; text-align: left; color: var(--fg); background: color-mix(in srgb, var(--c) 22%, var(--surface)); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.wk-body { position: relative; }
.wk-hours { position: relative; }
.wk-hours span { position: absolute; right: 6px; transform: translateY(-50%); font-size: 11px; color: var(--muted); font-variant-numeric: tabular-nums; }
.wk-hours span:first-child { transform: none; }
.wk-col { position: relative; border-left: 1px solid var(--line); background-image: linear-gradient(to bottom, var(--line) 1px, transparent 1px); background-size: 100% var(--hpx); }
.wk-col.today { background-color: color-mix(in srgb, var(--accent) 5%, transparent); }
.wk-ev { position: absolute; display: grid; align-content: start; gap: 0; padding: 3px 6px; border: 0; border-radius: 7px; text-align: left; overflow: hidden; color: var(--fg); background: color-mix(in srgb, var(--c) 20%, var(--surface)); box-shadow: inset 3px 0 0 var(--c), 0 0 0 1px var(--surface); font-size: 12px; line-height: 1.25; }
.wk-ev:hover { background: color-mix(in srgb, var(--c) 32%, var(--surface)); z-index: 1; }
.wk-ev strong { font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.wk-t, .wk-p { font-size: 11px; color: var(--muted); font-variant-numeric: tabular-nums; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.wk-now { position: absolute; left: 0; right: 0; height: 2px; background: var(--danger); pointer-events: none; }
.wk-now::before { content: ""; position: absolute; left: -4px; top: -3px; width: 8px; height: 8px; border-radius: 50%; background: var(--danger); }

/* Resource board */
.rg-scroll { overflow-x: auto; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); }
.resgrid { border-collapse: collapse; width: 100%; min-width: 860px; font-size: 13px; table-layout: fixed; }
.resgrid.month { min-width: 1100px; }
.resgrid th, .resgrid td { border-top: 1px solid var(--line); border-left: 1px solid var(--line); vertical-align: top; }
.resgrid thead th { background: var(--surface-2); padding: 8px 6px; font-size: 12px; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); text-align: left; border-top: 0; }
.resgrid thead th.today { color: var(--accent); box-shadow: inset 0 -3px 0 var(--accent); }
.resgrid .rg-name { width: 190px; padding: 8px 10px; text-align: left; font-weight: 700; border-left: 0; background: var(--surface); position: sticky; left: 0; z-index: 1; }
.resgrid .rg-name .chip { margin-top: 4px; }
.resgrid thead .rg-name { background: var(--surface-2); }
.resgrid .rg-group th { background: var(--surface-2); text-align: left; font-size: 11px; text-transform: uppercase; letter-spacing: .07em; color: var(--muted); padding: 5px 10px; position: static; }
.resgrid td { padding: 4px; height: 52px; }
.resgrid td.today { background: color-mix(in srgb, var(--accent) 5%, transparent); }
.resgrid td.clash { background: var(--danger-soft); }
.resgrid td.we { background: var(--surface-2); }
.bk { display: grid; width: 100%; gap: 0; padding: 3px 6px; margin-bottom: 3px; border: 0; border-radius: 6px; text-align: left; color: var(--fg); background: color-mix(in srgb, var(--c, var(--muted)) 20%, var(--surface)); box-shadow: inset 3px 0 0 var(--c, var(--muted)); min-width: 0; }
.bk:hover { background: color-mix(in srgb, var(--c, var(--muted)) 32%, var(--surface)); }
.bk-hidden { background: repeating-linear-gradient(135deg, var(--surface-2) 0 6px, var(--surface) 6px 12px); box-shadow: inset 3px 0 0 var(--muted); }
.bk-t { font-size: 11px; color: var(--muted); font-variant-numeric: tabular-nums; }
.bk-n { font-size: 12px; font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.clash-note { display: block; font-size: 11px; font-weight: 700; color: var(--danger); }
.resgrid.month thead th { text-align: center; padding: 4px 0; text-transform: none; }
.resgrid.month thead th span { display: block; font-size: 10px; }
.resgrid.month thead th strong { font-size: 13px; color: var(--fg); }
.resgrid.month td { padding: 2px; height: 40px; }
.mcell { width: 100%; height: 100%; border: 0; border-radius: 6px; background: var(--accent-soft); display: flex; flex-direction: column; justify-content: center; gap: 2px; padding: 3px; }
.mcell i { display: block; height: 5px; border-radius: 3px; background: var(--muted); }
.mcell b { font-size: 10px; line-height: 1; color: var(--accent); }
.resgrid.month td.clash .mcell { background: var(--danger-soft); outline: 2px solid var(--danger); }

/* Schnellstart, Banner, Anfragen */
.brand-plus { color: var(--accent); margin-left: 1px; }
.dash-banner { position: relative; height: 150px; border-radius: 18px; margin-bottom: -46px; overflow: hidden; background-size: cover; background-position: center;
  background-color: var(--accent-soft); background-image: radial-gradient(circle at 18% 40%, color-mix(in srgb, var(--accent) 22%, transparent) 0 70px, transparent 71px), radial-gradient(circle at 70% 110%, color-mix(in srgb, var(--gem-tra) 18%, transparent) 0 120px, transparent 121px); }
.banner-actions { position: absolute; top: 10px; right: 10px; display: flex; gap: 6px; }
.banner-btn { background: color-mix(in srgb, var(--surface) 88%, transparent); backdrop-filter: blur(6px); border-color: transparent; }
.dash-banner + .dash-profile { position: relative; margin: 0 14px; box-shadow: var(--shadow); }
.quickbar { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 10px; }
.qa { display: flex; align-items: center; gap: 10px; padding: 12px 14px; border-radius: 14px; border: 1px solid var(--line); background: var(--surface); font-weight: 700; font-size: 15px; text-align: left; color: var(--fg); min-width: 0; }
.qa:hover:not(:disabled) { border-color: var(--accent); background: var(--accent-soft); }
.qa:disabled { opacity: .5; cursor: not-allowed; }
.qa-ico { width: 36px; height: 36px; border-radius: 10px; background: var(--accent); color: var(--accent-fg); display: grid; place-items: center; flex: none; }
.qa span:last-child { min-width: 0; hyphens: auto; -webkit-hyphens: auto; line-height: 1.2; }
.dash-req { display: grid; gap: 10px; }
.dash-req-head { display: flex; align-items: baseline; gap: 12px; }
.dash-req-head h2 { font-size: 18px; flex: 1; }
.req-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 12px; }
.deleg { --bar: var(--warn); display: grid; gap: 6px; padding: 14px; border-radius: 14px; background: var(--surface); border: 1px solid var(--line); min-width: 0; }
.deleg.poll-card { --bar: var(--hl, var(--accent)); }
.deleg.done { --bar: var(--ok); }
.deleg .dl-title::after { content: ""; display: block; width: 48px; height: 4px; margin-top: 8px; border-radius: 4px; background: var(--bar); }
.deleg.compact { margin: 0 8px 8px; padding: 10px 12px; }
.dl-head { display: flex; gap: 6px; flex-wrap: wrap; }
.dl-title { border: 0; background: none; padding: 0; text-align: left; font-family: var(--font-display); font-weight: 700; font-size: 18px; color: var(--fg); overflow-wrap: anywhere; }
.compact .dl-title { font-size: 15px; }
.dl-title:hover { color: var(--accent); }
.dl-when { font-size: 14px; }
.dl-note { font-size: 14px; color: var(--muted); white-space: pre-wrap; }
.dl-by { font-size: 12px; color: var(--muted); }
.dl-resp { display: flex; gap: 4px; flex-wrap: wrap; }
.dl-resp .person-tag { font-size: 13px; }
.dl-resp em { font-style: normal; color: var(--muted); font-size: 12px; margin-left: 2px; }
.dl-resp .person-tag.no { opacity: .7; text-decoration: line-through; }
.dl-actions { display: flex; gap: 6px; flex-wrap: wrap; padding-top: 4px; }
.dl-actions .btn.chosen { outline: 2px solid var(--accent); }
.compact .dl-note, .compact .dl-by { display: none; }
.feed-sec { border-bottom: 1px solid var(--line); padding-bottom: 6px; }
.feed-head { width: calc(100% - 16px); margin: 10px 8px 8px; display: flex; align-items: center; gap: 12px; padding: 10px; border: 0; border-radius: 12px; background: var(--surface-2); text-align: left; color: var(--fg); }
.feed-head:hover, .feed-head.active { background: var(--accent-soft); }
.feed-list { gap: 12px; }
.feed-list .deleg { max-width: 640px; }
.feed-av { background: var(--accent-soft); color: var(--accent); }
.modal.xwide { max-width: 1040px; }
.bulk-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: 12px; }
.bulk { border-collapse: collapse; width: 100%; min-width: 1060px; font-size: 14px; }
.bulk select { min-width: 120px; }
.bulk th { text-align: left; background: var(--surface-2); color: var(--muted); font-size: 12px; text-transform: uppercase; letter-spacing: .05em; padding: 8px 6px; }
.bulk td { padding: 4px; border-top: 1px solid var(--line); }
.bulk input, .bulk select { width: 100%; min-height: 36px; padding: 4px 8px; font-size: 14px; border-radius: 8px; border: 1px solid var(--line); background: var(--surface); }
.bulk td:first-child input { min-width: 140px; }
.bulk td:nth-child(2) input { min-width: 96px; }
.bulk td:last-child { width: 40px; }
.poll-opts { display: grid; gap: 6px; }
.poll-opt { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.poll-opt input[type=date] { flex: 1 1 150px; }
.poll-opt input[type=time] { flex: 0 1 110px; }
table.poll { min-width: 0; width: 100%; border-collapse: collapse; }
table.poll th, table.poll td { padding: 8px; border-top: 1px solid var(--line); text-align: center; white-space: nowrap; }
table.poll thead th { display: table-cell; font-size: 12px; text-transform: none; letter-spacing: 0; }
table.poll thead th span { display: block; color: var(--muted); }
table.poll thead th strong { color: var(--fg); font-variant-numeric: tabular-nums; }
table.poll tbody th, table.poll tfoot th { text-align: left; font-weight: 700; }
table.poll .best { background: var(--ok-soft); }
table.poll tr.my-row th { color: var(--accent); }
table.poll tbody th .chip { margin-left: 6px; }
.pv { font-weight: 700; font-size: 16px; }
.pv.ja { color: var(--ok); background: color-mix(in srgb, var(--ok) 12%, transparent); }
.pv.vielleicht { color: var(--warn); background: color-mix(in srgb, var(--warn) 12%, transparent); }
.pv.nein { color: var(--danger); }
.pv-btn { width: 38px; height: 34px; border-radius: 8px; border: 2px dashed var(--accent); background: var(--surface); font-weight: 700; font-size: 16px; color: inherit; }
.pv-fix { display: block; margin: 6px auto 0; }
.tbl-wrap table.poll tbody tr { cursor: default; }
@media (max-width: 900px) { .quickbar { grid-template-columns: repeat(2, minmax(0, 1fr)); } .quickbar .qa:last-child { grid-column: 1 / -1; } }
@media (max-width: 600px) { .dash-banner { height: 110px; margin-bottom: -30px; } .dash-banner + .dash-profile { margin: 0 6px; } }

.dl-manage { display: flex; gap: 2px; flex-wrap: wrap; padding-top: 6px; margin-top: 2px; border-top: 1px dashed var(--line); }
.compact .dl-manage .btn { min-height: 30px; padding: 0 8px; font-size: 13px; }
.assign-list { display: grid; gap: 6px; }
.assign-opt { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 12px; border: 1px solid var(--line); cursor: pointer; }
.assign-opt:has(input:checked) { border-color: var(--accent); background: var(--accent-soft); }
.assign-opt input { width: 18px; height: 18px; accent-color: var(--accent); flex: none; }
.assign-opt .di-main span { white-space: normal; }

.bulk-steps { list-style: none; margin: 0; padding: 0; display: flex; gap: 6px; flex-wrap: wrap; counter-reset: st; }
.bulk-steps li { counter-increment: st; display: inline-flex; align-items: center; gap: 6px; padding: 4px 12px 4px 4px; border-radius: 999px; background: var(--surface-2); color: var(--muted); font-size: 13px; font-weight: 700; }
.bulk-steps li::before { content: counter(st); width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; background: var(--line); color: var(--fg); font-size: 12px; }
.bulk-steps li.on { background: var(--accent-soft); color: var(--accent); }
.bulk-steps li.on::before { background: var(--accent); color: var(--accent-fg); }
.bulk-cols { grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); }
.bulk-sum { display: flex; gap: 12px; align-items: baseline; flex-wrap: wrap; font-size: 15px; }

.mail-sim { display: grid; gap: 8px; }
.mail-msg { display: grid; gap: 4px; padding: 10px 12px; border-radius: 10px; background: var(--surface-2); border: 1px solid var(--line); font-size: 14px; }
.mail-msg > span:first-child { font-size: 12px; color: var(--muted); }
.mail-code { font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace; font-size: 17px; letter-spacing: .08em; color: var(--accent); }
.hint.center { text-align: center; }
.login-card .hint { font-size: 13px; color: var(--muted); }

.gf-ctl { flex: 1 1 100%; display: grid; gap: 6px; padding-top: 12px; border-top: 1px solid var(--line); }
.gf-seg { display: flex; flex-wrap: wrap; justify-self: start; }
.gf-seg button { gap: 8px; }
.gf-seg button.on { background: var(--accent); color: var(--accent-fg); }
.gf-ctl.compact { border-top: 0; padding-top: 0; }
.gf-ctl.compact .gf-seg { justify-self: stretch; }
.gf-ctl.compact .gf-seg button { flex: 1; justify-content: center; padding: 6px 6px; }
.gf-badge { display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; border-radius: 999px; border: 1px solid var(--accent); background: var(--accent-soft); color: var(--accent); font-weight: 700; font-size: 13px; white-space: nowrap; }
@media (max-width: 480px) { .gf-badge { font-size: 12px; padding: 3px 8px; } }

.dp-controls { flex: 1 1 100%; display: flex; flex-wrap: wrap; gap: 10px 16px; align-items: center; padding-top: 12px; border-top: 1px solid var(--line); }
.st-seg .st-dot { width: 9px; height: 9px; border-radius: 50%; background: var(--sc); display: inline-block; }
.st-seg button.on .st-dot { box-shadow: 0 0 0 2px var(--accent-fg); }
.st-seg { margin-left: auto; }
.gf-seg.compact { display: flex; }
.gf-seg.compact button { flex: 1; justify-content: center; padding: 6px 6px; }
.dp-sub .status { vertical-align: middle; margin-left: 4px; }
@media (max-width: 900px) { .st-seg { margin-left: 0; } }

/* Settings */
.settings { display: grid; gap: 14px; }
.set-sec { display: grid; grid-template-columns: minmax(0, 260px) minmax(0, 1fr); gap: 16px 24px; padding: 18px; border-radius: 14px; background: var(--surface); border: 1px solid var(--line); }
.set-head h2 { font-size: 18px; }
.set-head p { font-size: 14px; color: var(--muted); margin-top: 4px; }
.set-body { display: grid; gap: 14px; min-width: 0; }
.grid3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.num-wrap { display: flex; align-items: center; gap: 8px; }
.num-wrap input { width: 96px; flex: none; }
.num-wrap span { color: var(--muted); font-size: 14px; }
.set-foot { position: sticky; bottom: 0; display: flex; gap: 10px; align-items: center; justify-content: flex-end; flex-wrap: wrap; padding: 12px 0; background: var(--bg); }
.set-foot .form-err { margin-right: auto; }
.center-link { justify-self: center; font-size: 14px; }
@media (max-width: 900px) { .set-sec { grid-template-columns: minmax(0, 1fr); } .grid3 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 520px) { .grid3 { grid-template-columns: minmax(0, 1fr); } .set-foot { position: static; } .set-sec { padding: 14px; } }

.gem-head, .gem-row { display: grid; grid-template-columns: 14px minmax(0, 2fr) minmax(0, 1fr) minmax(0, 0.9fr) auto; gap: 8px; align-items: center; }
.gem-head span { font-size: 13px; color: var(--muted); }
.gem-list { display: grid; gap: 8px; }
.gem-dot { width: 14px; height: 14px; border-radius: 4px; display: block; }
.gem-acts { display: flex; gap: 4px; align-items: center; }
@media (max-width: 640px) {
  .gem-head { display: none; }
  .gem-row { grid-template-columns: 14px minmax(0, 1fr) minmax(0, 1fr); grid-template-areas: "dot lab lab" ". sh col" ". acts acts"; padding: 10px; border: 1px solid var(--line); border-radius: 12px; }
  .gem-row .gem-dot { grid-area: dot; } .gem-row .g-lab { grid-area: lab; } .gem-row .g-sh { grid-area: sh; } .gem-row .g-col { grid-area: col; }
  .gem-acts { grid-area: acts; justify-content: flex-end; }
}

/* Requests in columns */
.feed-cols { display: grid; grid-template-columns: minmax(0, 1fr) minmax(220px, 280px); gap: 16px; align-items: start; align-content: start; }
.feed-cols.done-open { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
.feed-col { display: grid; gap: 12px; min-width: 0; align-content: start; }
.feed-col-head { display: flex; align-items: center; gap: 8px; padding: 8px 12px; border-radius: 12px; background: var(--surface-2); border: 0; color: var(--fg); text-align: left; width: 100%; font: inherit; }
.feed-col-head h3 { font-size: 16px; margin: 0; }
.feed-col-head .count { margin-left: 4px; }
.feed-col-head.toggle { cursor: pointer; }
.feed-col-head.toggle:hover { background: var(--accent-soft); }
.feed-col-head .chev { margin-left: auto; color: var(--muted); }
.feed-col .deleg { max-width: none; }
.feed-none { padding: 4px 12px; }
@media (max-width: 1100px) { .feed-cols, .feed-cols.done-open { grid-template-columns: minmax(0, 1fr); } }
/* Statistik */
.stat-card { grid-column: 1 / -1; }
.stat-controls { display: flex; flex-wrap: wrap; gap: 8px; justify-content: space-between; align-items: center; margin: 0 6px 12px; }
.stat-controls .dash-seg { margin-left: 0; }
.stat-tiles { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; margin: 0 6px; }
.stat-tile { display: grid; gap: 2px; padding: 14px; border-radius: 12px; background: var(--surface-2); }
.stat-tile strong { font-family: var(--font-display); font-size: 34px; line-height: 1.1; color: var(--accent); font-variant-numeric: tabular-nums; }
.stat-tile span { font-weight: 600; }
.stat-tile small { color: var(--muted); font-size: 13px; }
button.stat-tile { border: 1px solid transparent; text-align: left; font: inherit; color: var(--fg); cursor: pointer; }
button.stat-tile:hover { border-color: var(--accent); background: var(--accent-soft); }
.stat-table { margin: 0 6px; }
.stat-table table { min-width: 560px; }
.stat-table tbody tr { cursor: default; }
.stat-table tbody th { text-transform: none; letter-spacing: 0; font-size: 14px; color: var(--fg); background: transparent; border-bottom: 0; border-top: 1px solid var(--line); font-weight: 600; }
.stat-table tbody tr:first-child th { border-top: 0; }
.stat-table th.num { text-align: right; }
.stat-table .num { text-align: right; font-variant-numeric: tabular-nums; }
.stat-table tr.stat-none th, .stat-table tr.stat-none td { color: var(--muted); font-style: italic; }
.stat-note { margin: 10px 6px 0; }
@media (max-width: 700px) { .stat-tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* Toasts (simulated push) */
#toasts { position: fixed; top: calc(12px + env(safe-area-inset-top, 0px)); right: calc(12px + env(safe-area-inset-right, 0px)); z-index: 60; display: grid; gap: 8px; width: min(360px, calc(100vw - 24px)); }
.toast { display: grid; grid-template-columns: auto 1fr auto; gap: 4px 10px; align-items: start; padding: 12px 8px 12px 14px; border-radius: 14px; background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow); animation: slide .25s ease-out; }
.toast .t-ico { grid-row: span 3; width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; color: #fff; font-family: var(--font-display); font-weight: 700; font-size: 13px; background: var(--accent); }
.toast strong { font-size: 14px; }
.toast .t-text { grid-column: 2; font-size: 14px; color: var(--muted); overflow-wrap: anywhere; }
.toast .t-act { grid-column: 2; justify-self: start; margin-top: 4px; }
.toast .x { grid-column: 3; grid-row: 1; border: 0; background: none; width: 28px; height: 28px; border-radius: 8px; color: var(--muted); font-size: 18px; line-height: 1; }
.toast .x:hover { background: var(--surface-2); }
.toast.warn .t-ico { background: var(--warn); }
@keyframes slide { from { transform: translateY(-8px); opacity: 0; } to { transform: none; opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .toast { animation: none; } }

/* Phones */
@media (max-width: 760px) {
  main { grid-template-columns: minmax(0, 1fr); }
  main.show-chat .sidebar { display: none; }
  main:not(.show-chat):not(.admin-mode) .chat { display: none; }
  .sidebar { border-right: 0; }
  .back { display: inline-grid; margin-left: -8px; }
  .chat-head { padding-left: 12px; }
  .chat-head .lbl { display: none; }
  .bubble { max-width: 86%; }
}
@media (max-width: 900px) {
  .split { grid-template-columns: minmax(0, 1fr); }
  .new-task { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .new-task > .field:first-child { grid-column: 1 / -1; }
}
@media (max-width: 760px) {
  .calwrap { grid-template-columns: minmax(0, 1fr); }
  .cal-side { border-right: 0; border-bottom: 1px solid var(--line); padding-block: 12px; }
  .cell { min-height: 54px; padding: 4px 2px; align-items: center; }
  .cell .ev-pill, .cell .more { display: none; }
  .cell .dots { display: flex; justify-content: center; padding-left: 0; }
  .dow { padding: 6px 2px; text-align: center; }
  .cal-toolbar h1 { font-size: 22px; flex-basis: 100%; }
  .ev-row { grid-template-columns: 1fr; gap: 2px; }
  .two { grid-template-columns: 1fr; }
}
@media (max-width: 600px) {
  .top .lbl, .me-name { display: none; }
  .top { gap: 6px; }
}
@media (max-width: 480px) {
  .top .me .chip { display: none; }
}
@media (max-width: 760px) {
  .main-nav { display: none; }
  .brand-cur { display: inline; }
  .brand-cur::before { content: "· "; }
}
@media (max-width: 600px) {
  .brand span { font-size: 16px; }
  .seg button { padding: 6px 10px; }
  .demo-text { display: none; }
  .admin-head h1, .page-head h1 { font-size: 24px; }
  .new-task { grid-template-columns: minmax(0, 1fr); }
  .seg button { padding: 6px 8px; }
  .arow-actions { width: 100%; }
}

/* Eingabefelder und Häkchen: gut lesbar in hell und dunkel, unabhängig vom Browser */
:root[data-theme="light"] { color-scheme: light; }
input:-webkit-autofill, input:-webkit-autofill:hover, input:-webkit-autofill:focus {
  -webkit-text-fill-color: var(--fg); caret-color: var(--fg);
  -webkit-box-shadow: 0 0 0 1000px var(--surface) inset; box-shadow: 0 0 0 1000px var(--surface) inset;
  transition: background-color 9999s ease-out 0s;
}
input[type=checkbox], input[type=radio] {
  -webkit-appearance: none; appearance: none; margin: 0; flex: none; cursor: pointer; vertical-align: middle;
  width: 20px; height: 20px; border: 2px solid var(--muted); border-radius: 5px; background: var(--surface);
  display: inline-grid; place-content: center;
}
input[type=radio] { border-radius: 50%; }
input[type=checkbox]::before { content: ""; width: 10px; height: 5px; border-left: 2.5px solid var(--accent-fg); border-bottom: 2.5px solid var(--accent-fg); transform: translateY(-1px) rotate(-45deg) scale(0); transition: transform .1s ease-out; }
input[type=checkbox]:checked { background: var(--cb, var(--accent)); border-color: var(--cb, var(--accent)); }
input[type=checkbox]:checked::before { transform: translateY(-1px) rotate(-45deg) scale(1); }
input[type=radio]::before { content: ""; width: 10px; height: 10px; border-radius: 50%; background: var(--accent); transform: scale(0); transition: transform .1s ease-out; }
input[type=radio]:checked { border-color: var(--accent); }
input[type=radio]:checked::before { transform: scale(1); }
input[type=checkbox]:hover:not(:disabled), input[type=radio]:hover:not(:disabled) { border-color: var(--accent); }
input[type=checkbox]:focus-visible, input[type=radio]:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
input[type=checkbox]:disabled, input[type=radio]:disabled { opacity: .5; cursor: not-allowed; }
@media (prefers-reduced-motion: reduce) { input[type=checkbox]::before, input[type=radio]::before { transition: none; } }

/* Dashboard: requests in a slightly darker box */
.dash-req { padding: 14px 16px 16px; border-radius: 18px; background: color-mix(in srgb, var(--fg) 5%, var(--bg)); border: 1px solid color-mix(in srgb, var(--fg) 7%, transparent); }
.dash-req .req-grid > * { background: var(--surface); }
.req-grid { align-items: start; }
.req-grid .deleg { align-content: start; }
/* Personal status text */
.dp-msg { margin-top: 4px; font-size: 15px; color: var(--fg); display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.dp-msg q { font-style: italic; }
.dp-msg .linkbtn { font-size: 14px; }
.st-msg { font-size: 13px; color: var(--muted); font-style: italic; overflow-wrap: anywhere; }
.pm-who .st-msg { font-size: 13px; }
.msg-presets { display: flex; flex-wrap: wrap; gap: 6px; }
.msg-presets button { border: 1px solid var(--line); background: var(--surface-2); border-radius: 999px; padding: 4px 10px; font-size: 13px; color: var(--fg); }
.msg-presets button:hover { background: var(--accent-soft); }
.msg-row { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.msg-row input[type=text] { flex: 1 1 220px; }
/* Birthdays */
.bday { display: flex; align-items: center; gap: 10px; padding: 6px 4px; }
.bday-date { display: grid; place-items: center; width: 44px; flex: none; padding: 4px 0; border-radius: 10px; background: var(--lit-rot); color: #fff; line-height: 1.1; }
.bday-date strong { font-size: 17px; }
.bday-date span { font-size: 11px; text-transform: uppercase; letter-spacing: .04em; }
.bday.today .bday-date { background: var(--lit-gold); }
.bday .di-main { flex: 1; }
.bday-when { font-size: 13px; color: var(--muted); white-space: nowrap; }
.bday.today .bday-when { color: var(--lit-gold); font-weight: 700; }

.ov-mon-row { display: flex; align-items: center; gap: 4px; }
.ov-mon-row input { flex: 1; min-width: 0; }

/* Version 27 */
.cal-side details, .cal-side details > div, .gem-filter, .callist { min-width: 0; }
.cal-side details > div, .gem-filter, .callist.compact { grid-template-columns: minmax(0, 1fr); }
.gem-filter .calrow button.calrow-name { padding: 6px 6px; font-weight: 600; border: 0; background: none; color: var(--fg); }
.gem-filter .calrow button.icon-btn { padding: 0; display: grid; place-items: center; border: 0; background: none; color: var(--muted); }
.gem-filter .calrow button.icon-btn:hover { background: var(--surface); color: var(--fg); }
.gem-filter .calrow button[aria-pressed=true] { background: none; color: var(--muted); }
.gem-filter .calrow.off button.calrow-name { color: var(--muted); }
.linkish { background: none; border: 0; padding: 0; font: inherit; color: inherit; text-align: left; cursor: pointer; }
.linkish:hover { color: var(--accent); text-decoration: underline; }
.cal-sw { width: 12px; height: 12px; border-radius: 4px; flex: none; display: inline-block; }
.callist.compact { gap: 0; }
.calrow { display: flex; align-items: center; gap: 2px; border-radius: 10px; padding: 0 2px 0 0; }
.calrow:hover { background: var(--surface-2); }
.calrow-name { flex: 1; min-width: 0; display: flex; align-items: center; gap: 10px; padding: 7px 8px; background: none; border: 0; font: inherit; color: var(--fg); text-align: left; cursor: pointer; border-radius: 10px; }
.calrow-name .cn { font-weight: 600; font-size: 15px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.calrow .icon-btn { width: 30px; height: 30px; flex: none; color: var(--muted); }
.calrow .icon-btn:hover { color: var(--fg); }
.calrow.off .calrow-name { color: var(--muted); }
.calrow.off .cal-sw { opacity: .35; }
.cal-grem { margin-top: 4px; }
.grem-head .cn { font-weight: 700; }
.grem-head .chip { margin-left: 2px; }
.grem-chev { display: inline-grid; transition: transform .15s; transform: rotate(-90deg); color: var(--muted); }
.grem-chev.open { transform: none; }
.callist.sub { padding-left: 14px; }
.rot180 { display: inline-grid; transform: rotate(180deg); }
.cell { cursor: pointer; }
.cell button.dn { border: 0; background: none; color: inherit; cursor: pointer; padding: 0; font: inherit; font-weight: 700; font-size: 13px; }
.cell button.dn:hover { background: var(--surface-2); }
.cell.today button.dn { background: var(--accent); color: var(--accent-fg); }
button.ev-pill { width: 100%; border: 0; background: none; font: inherit; font-size: 12px; color: inherit; text-align: left; cursor: pointer; border-radius: 5px; }
button.ev-pill:hover { background: color-mix(in srgb, var(--c) 18%, transparent); }
.colors .color-opt.custom .dot { box-shadow: inset 0 0 0 1px rgba(0,0,0,.15); }
.color-custom { display: inline-flex; align-items: center; gap: 6px; }
.color-custom input[type=color] { width: 40px; height: 34px; padding: 2px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); cursor: pointer; }
.color-custom .hex-in { width: 100px; font-variant-numeric: tabular-nums; }
.rk-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.rk-row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.rk-row input[type=text] { flex: 1 1 180px; }
.rk-ico { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 10px; background: var(--surface-2); }
.contact-lines { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.contact-lines li { display: flex; align-items: center; gap: 8px; overflow-wrap: anywhere; }
.contact-lines .ico { color: var(--muted); }
.contact-lines.compact { gap: 2px; font-size: 14px; color: var(--muted); }
.contact-lines.compact a { color: var(--fg); }
.contacts .mrow { align-items: flex-start; }
.contacts .contact-lines { flex: 1 1 220px; }
.pcard { display: grid; gap: 14px; }
.uf-more summary { cursor: pointer; font-weight: 700; padding: 6px 0; }
.alist-group .count { margin-left: 8px; font-weight: 600; letter-spacing: 0; }
.urow { padding: 10px 16px; }
.urow-head { flex: 1 1 260px; min-width: 0; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; justify-content: space-between; }
.urow-btns { display: flex; gap: 4px; }
.tgl-ico { display: inline-grid; transition: transform .15s; }
.tgl-ico.open { transform: rotate(180deg); }
.rights select { min-width: 230px; }
@media (max-width: 760px) { .calwrap { grid-template-rows: auto 1fr; } .rights select { min-width: 0; } }
.urow-more { flex-basis: 100%; padding: 8px 0 2px 58px; }
@media (max-width: 600px) { .urow-more { padding-left: 0; } }
.grem-list { display: grid; gap: 12px; }
.grem-card { display: flex; gap: 16px; padding: 16px; border: 1px solid var(--line); border-radius: 16px; background: var(--surface); }
.grem-body h3::after { content: ""; display: block; width: 48px; height: 4px; margin-top: 8px; border-radius: 4px; background: var(--c); }
.grem-card.next { box-shadow: 0 0 0 2px color-mix(in srgb, var(--c) 45%, transparent); }
.grem-card.past { opacity: .8; }
.grem-date { flex: none; width: 58px; display: grid; justify-items: center; align-content: start; padding: 6px 0; border-radius: 12px; background: color-mix(in srgb, var(--c) 14%, var(--surface)); line-height: 1.15; }
.grem-date strong { font-size: 24px; }
.grem-date span { font-size: 12px; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); }
.grem-body { flex: 1; min-width: 0; display: grid; gap: 8px; }
.grem-top { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
.grem-body h3 { margin: 0; font-size: 19px; }
.grem-meta { margin: 0; color: var(--muted); }
.grem-notes, .grem-files { display: grid; gap: 4px; }
.grem-notes p { margin: 0; white-space: pre-wrap; }
.grem-notes { padding: 10px 12px; border-radius: 12px; background: var(--surface-2); }
.grem-actions { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
.grem-h { font-size: 15px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); margin: 22px 0 10px; }
.grem-filter { margin: 4px 0 0; flex-wrap: wrap; }
.grem-filter button { display: inline-flex; align-items: center; gap: 6px; }
.grem-banner { margin: 8px 0; }
@media (max-width: 600px) { .grem-card { padding: 12px; gap: 12px; } .grem-date { width: 48px; } }

/* ===== Version 28: designs Talar / Stola / Albe, topbar navigation ===== */
:root { --font-display: "Geist", "Segoe UI", system-ui, -apple-system, sans-serif; --font-body: "Geist", "Segoe UI", system-ui, -apple-system, sans-serif; --font-mono: "Geist Mono", ui-monospace, "SFMono-Regular", Menlo, monospace; --font-nav: var(--font-body); --r: 14px; }
:root[data-design="talar"] {
  --bg: #01010D; --surface: #0A0A18; --surface-2: #131326; --line: rgba(255,255,255,.11); --fg: #F3F2FA; --muted: #A3A1BC;
  --accent: #8B6CFF; --accent-hover: #A28AFF; --accent-fg: #01010D; --accent-soft: rgba(99,49,251,.24); --own: #23135C;
  --btn: #6331FB; --btn-hover: #7650FF; --btn-fg: #FFFFFF; --hl: #88F9C0; --hl-fg: #01010D;
  --danger: #FF8A80; --danger-soft: #3A1717; --warn: #F2B36B; --warn-soft: #33240F; --ok: #88F9C0; --ok-soft: #0F2E22;
  --lit-gruen: #3FB487; --lit-violett: #8B6CFF; --lit-rot: #E0605A; --lit-gold: #D3A04A; --lit-schiefer: #6E7A90;
  --gem-tra: #7DB5E0; --gem-tra-soft: #13263A; --gem-kue: #E3967A; --gem-kue-soft: #33201A;
  --shadow: 0 18px 44px rgba(0,0,0,.65); color-scheme: dark;
}
:root[data-design="stola"] {
  --bg: #DBF2FC; --surface: #FFFFFF; --surface-2: #EEF8FD; --line: rgba(7,45,89,.14); --fg: #072D59; --muted: #3F5D80;
  --accent: #072D59; --accent-hover: #0B3F7D; --accent-fg: #FFFFFF; --accent-soft: rgba(7,45,89,.08); --own: #C9E9F7;
  --btn: #072D59; --btn-hover: #0B3F7D; --btn-fg: #FFFFFF; --hl: #FD6E88; --hl-fg: #072D59;
  --danger: #B42318; --danger-soft: #FDE7EA; --warn: #9A4A16; --warn-soft: #FBEEDC; --ok: #1F7A57; --ok-soft: #DDF2E8;
  --lit-gruen: #2E7D5B; --lit-violett: #6B4FC6; --lit-rot: #C8364E; --lit-gold: #A27420; --lit-schiefer: #3F4A55;
  --gem-tra: #1E5A86; --gem-tra-soft: #D4EAF6; --gem-kue: #8C4528; --gem-kue-soft: #F5E4DC;
  --shadow: 0 18px 40px rgba(7,45,89,.16); color-scheme: light;
}
:root[data-design="albe"] {
  --bg: #F8F1E7; --surface: #FFFCF7; --surface-2: #F2E8DA; --line: rgba(80,60,40,.15); --fg: #2B2620; --muted: #6A5F52;
  --accent: #5E6B32; --accent-hover: #4D5828; --accent-fg: #FFFFFF; --accent-soft: rgba(107,122,58,.13); --own: #F1DCDC;
  --btn: #5E6B32; --btn-hover: #4D5828; --btn-fg: #FFFFFF; --hl: #D8A7A7; --hl-fg: #2B2620;
  --danger: #A8321E; --danger-soft: #F8E2DC; --warn: #8F4E14; --warn-soft: #F7EAD6; --ok: #5E6B32; --ok-soft: #E8ECD8;
  --lit-gruen: #5E7A3A; --lit-violett: #7A5A9E; --lit-rot: #B04A3E; --lit-gold: #A27420; --lit-schiefer: #5A5248;
  --gem-tra: #2F5E80; --gem-tra-soft: #E2ECF2; --gem-kue: #9A5634; --gem-kue-soft: #F3E3D8;
  --shadow: 0 18px 40px rgba(60,40,20,.14); color-scheme: light;
}
:root[data-size="large"] body { zoom: 1.12; }
body { font-family: var(--font-body); -webkit-font-smoothing: antialiased; letter-spacing: -.005em; }
h1, h2, h3 { font-family: var(--font-display); letter-spacing: -.025em; font-weight: 600; }
.admin-head h1, .page-head h1, .cal-toolbar h1 { font-weight: 400; letter-spacing: -.035em; font-size: 38px; line-height: 1.05; }
@media (max-width: 600px) { .admin-head h1, .page-head h1 { font-size: 28px; } .cal-toolbar h1 { font-size: 24px; } }
/* mono labels */
.side-label, .alist-group, .tbl-wrap th, .grem-h, .res-kind, .navord-n, .dc-sw small, .set-head + .set-body .label.mono, .demo-accounts h2 {
  font-family: var(--font-mono); font-weight: 500; text-transform: uppercase; letter-spacing: .08em; }
.btn { border-radius: 10px; font-weight: 600; }
.btn.primary { background: var(--btn); border-color: var(--btn); color: var(--btn-fg); }
.btn.primary:hover { background: var(--btn-hover); border-color: var(--btn-hover); }
.chip { font-weight: 600; }
.seg button { font-weight: 600; }
.seg button.on { background: var(--surface); color: var(--fg); }
/* --- topbar --- */
#app { gap: 0; }
.top { margin: 10px 12px 0; padding: 6px 8px; border: 1px solid var(--line); border-radius: 16px;
  background: color-mix(in srgb, var(--surface) 84%, transparent); -webkit-backdrop-filter: blur(10px) saturate(140%); backdrop-filter: blur(10px) saturate(140%); box-shadow: 0 2px 14px rgba(0,0,0,.04); }
.brand { margin-right: 0; font-weight: 600; letter-spacing: -.03em; }
.brand-name { font-weight: 500; }
.brand-plus { color: var(--hl); -webkit-text-stroke: .4px var(--hl-fg); }
:root[data-design="talar"] .brand-plus { -webkit-text-stroke: 0; }
.brand-cur { display: none !important; }
.topnav { display: flex; align-items: center; gap: 2px; margin: 0 auto; min-width: 0; }
.topnav button { position: relative; display: inline-flex; align-items: center; gap: 8px; height: 40px; padding: 0 13px; border: 0; border-radius: 10px; background: none; color: var(--fg); font-weight: 500; font-size: 15px; letter-spacing: -.01em; white-space: nowrap; }
.topnav button .ico { color: var(--muted); }
.topnav button:hover { background: var(--surface-2); }
.topnav button.on { background: var(--hl); color: var(--hl-fg); }
.topnav button.on .ico { color: var(--hl-fg); }
.topnav .nav-badge { position: static; margin-left: 1px; background: var(--btn); color: var(--btn-fg); }
.topnav button.on .nav-badge { background: var(--hl-fg); color: var(--hl); }
:root[data-navlabels="icons"] .topnav .nav-badge { position: absolute; top: 2px; right: 2px; }
:root[data-navlabels="icons"] .topnav .lbl { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
:root[data-navlabels="icons"] .topnav button { padding: 0 11px; }
.admin-btn { margin-left: 0; }
.admin-btn.on { background: var(--hl); color: var(--hl-fg); }
.nav-badge { background: var(--btn); color: var(--btn-fg); }
@media (max-width: 1100px) and (min-width: 761px) { :root:not([data-navlabels="icons"]) .topnav button { padding: 0 9px; gap: 6px; font-size: 14px; } :root:not([data-navlabels="icons"]) .topnav button .ico { display: none; } }
@media (max-width: 760px) {
  .top { flex-wrap: wrap; margin: 8px 8px 0; row-gap: 4px; }
  .brand { margin-right: auto; }
  .top .main-nav { display: flex; order: 10; width: 100%; margin: 0; overflow-x: auto; scrollbar-width: none; justify-content: space-between; border-top: 1px solid var(--line); padding-top: 4px; }
  .top .main-nav::-webkit-scrollbar { display: none; }
  .topnav button { flex-direction: column; gap: 2px; height: auto; padding: 6px 8px; font-size: 11px; flex: 1 0 auto; }
  .top .topnav .lbl { display: block; }
  .topnav .nav-badge { position: absolute; top: 2px; right: 4px; }
  :root[data-navlabels="icons"] .topnav button { padding: 9px 10px; }
}
/* --- dashboard --- */
.dash-card, .dash-profile, .qa, .grem-card, .alist, .set-sec, .tbl-wrap, .month { border-radius: 18px; }
.dash-card { box-shadow: none; }
.dash-ico { background: var(--surface-2); color: var(--fg); border-radius: 10px; }
.dash-head .count { background: var(--hl); color: var(--hl-fg); }
.dash-go { font-family: var(--font-mono); font-size: 13px; font-weight: 500; text-transform: uppercase; letter-spacing: .07em; color: var(--fg); background: var(--surface); }
.dash-go .ico { display: grid; place-items: center; width: 30px; height: 30px; border-radius: 8px; background: var(--hl); color: var(--hl-fg); }
.dash-go:hover { background: var(--surface-2); }
.dash-banner:not(.has-img) { background-color: var(--bg);
  background-image: radial-gradient(ellipse 60% 140% at 12% 30%, color-mix(in srgb, var(--btn) 70%, transparent), transparent 70%),
    radial-gradient(ellipse 50% 120% at 62% 110%, color-mix(in srgb, var(--hl) 85%, transparent), transparent 70%),
    radial-gradient(ellipse 45% 110% at 95% 0%, color-mix(in srgb, var(--accent) 45%, transparent), transparent 70%); filter: saturate(1.05); }
/* --- design picker --- */
.design-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(176px, 1fr)); gap: 12px; }
.design-card { display: grid; gap: 8px; padding: 12px; border: 1px solid var(--line); border-radius: 18px; background: var(--surface); text-align: left; color: var(--fg); cursor: pointer; }
.design-card:hover { border-color: var(--muted); }
.design-card.on { border-color: var(--fg); box-shadow: 0 0 0 2px var(--fg) inset; }
.dc-prev { display: grid; gap: 8px; padding: 10px; border-radius: 12px; background: var(--p); height: 118px; align-content: start; border: 1px solid rgba(0,0,0,.06); }
.dc-bar { display: flex; gap: 6px; padding: 6px; border-radius: 8px; background: color-mix(in srgb, var(--p) 70%, #ffffff 30%); }
.design-card[style*="#01010D"] .dc-bar { background: #15152a; }
.dc-bar i { height: 8px; flex: 1; border-radius: 4px; background: color-mix(in srgb, var(--s) 35%, transparent); }
.dc-bar i:first-child { background: var(--a); }
.dc-h { height: 12px; width: 70%; border-radius: 4px; background: var(--s); opacity: .9; }
.dc-l { height: 8px; width: 50%; border-radius: 4px; background: var(--s); opacity: .35; }
.dc-btn { display: flex; gap: 4px; }
.dc-btn b { width: 64px; height: 18px; border-radius: 5px; background: var(--s); }
.dc-btn em { width: 18px; height: 18px; border-radius: 5px; background: var(--a); }
.dc-name { font-size: 20px; font-weight: 500; letter-spacing: -.02em; display: flex; align-items: center; gap: 8px; }
.dc-desc { font-size: 14px; color: var(--muted); }
.dc-sw { display: grid; gap: 3px; }
.dc-sw span { display: flex; align-items: center; gap: 6px; }
.dc-sw i { width: 14px; height: 14px; border-radius: 4px; border: 1px solid var(--line); }
.dc-sw small { font-size: 11px; color: var(--muted); }
/* --- nav order editor --- */
.navord { display: grid; gap: 8px; }
.navord-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; max-width: 420px; }
.navord-list li { display: flex; align-items: center; gap: 10px; padding: 4px 4px 4px 10px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); }
.navord-n { font-size: 12px; color: var(--muted); }
.navord-l { flex: 1; font-weight: 500; }
.navord-list .icon-btn { width: 34px; height: 34px; }
.qa-ico { background: var(--btn); color: var(--btn-fg); }

/* ===== Version 29 ===== */
:root { --font-nav: var(--font-body); }
.topnav button { font-family: var(--font-nav); }
.tbl-wrap th, .side-label, .alist-group, .grem-h, .res-kind, .navord-n, .dc-sw small, .demo-accounts h2, .dash-go, .adm-dd-k { font-family: var(--font-mono); }
/* Verwaltung dropdown */
.adm-dd { position: relative; display: inline-block; margin: 4px 0 2px; z-index: 15; }
.adm-dd-btn { display: inline-flex; align-items: center; gap: 10px; min-height: 48px; padding: 6px 12px 6px 14px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); color: var(--fg); font-size: 18px; font-weight: 500; cursor: pointer; }
.adm-dd-btn:hover { border-color: var(--muted); }
.adm-dd-k { font-size: 11px; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); padding-right: 6px; border-right: 1px solid var(--line); }
.adm-dd-l { letter-spacing: -.01em; }
.adm-dd-n { font-size: 12px; font-weight: 600; padding: 1px 8px; border-radius: 999px; background: var(--surface-2); color: var(--muted); }
.adm-dd-chev { display: inline-grid; transition: transform .15s; color: var(--muted); }
.adm-dd.is-open .adm-dd-chev { transform: rotate(180deg); }
.adm-dd-menu { display: none; position: absolute; top: calc(100% + 6px); left: 0; min-width: 260px; padding: 6px; border: 1px solid var(--line); border-radius: 16px; background: var(--surface); box-shadow: var(--shadow); }
.adm-dd.is-open .adm-dd-menu { display: grid; gap: 2px; }
.adm-dd-menu button { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border: 0; border-radius: 10px; background: none; color: var(--fg); font-size: 15px; font-weight: 500; text-align: left; }
.adm-dd-menu button > span:not(.ico):not(.adm-dd-n) { flex: 1; }
.adm-dd-menu button .ico { color: var(--muted); }
.adm-dd-menu button:hover, .adm-dd-menu button:focus-visible { background: var(--surface-2); }
.adm-dd-menu button.on { background: var(--hl); color: var(--hl-fg); }
.adm-dd-menu button.on .ico { color: var(--hl-fg); }
.admin-head + .adm-dd { margin-top: 8px; }
/* profile card */
.top { position: relative; }
.mecard { position: absolute; top: calc(100% + 8px); right: 0; width: min(340px, calc(100vw - 20px)); padding: 16px; display: grid; gap: 14px; border: 1px solid var(--line); border-radius: 18px; background: var(--surface); box-shadow: var(--shadow); z-index: 40; animation: mecard-in .14s ease-out; }
@keyframes mecard-in { from { opacity: 0; transform: translateY(-4px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .mecard { animation: none; } }
.mecard-top { display: flex; align-items: center; gap: 12px; }
.mecard-top .avatar.lg { width: 64px; height: 64px; border-radius: 50%; font-size: 22px; }
.mecard-who { display: grid; gap: 2px; min-width: 0; }
.mecard-who strong { font-size: 18px; font-weight: 600; letter-spacing: -.02em; }
.mecard-who > span { font-size: 14px; color: var(--muted); }
.mecard-sec { display: grid; gap: 6px; }
.mecard .gf-seg { width: 100%; }
.mecard-edit { width: 100%; }
/* topbar: keep everything on one line */
.top .me .chip { display: none; }
.top .me-name { max-width: 150px; font-weight: 500; }
.topnav { flex: 0 1 auto; overflow-x: auto; scrollbar-width: none; }
.topnav::-webkit-scrollbar { display: none; }
@media (max-width: 1440px) and (min-width: 761px) { .topnav button { padding: 0 9px; gap: 6px; } .top .me-name { max-width: 110px; } }
@media (max-width: 1280px) and (min-width: 761px) { .top .me-name { display: none; } .topnav button { padding: 0 7px; } }
@media (max-width: 1280px) { .gf-badge { font-size: 0; gap: 0; padding: 7px 8px; } }
@media (max-width: 1100px) and (min-width: 761px) { .topnav button { padding: 0 6px !important; font-size: 13.5px !important; } .brand-name { font-size: 17px; } }
/* gemeinde colour picker in Einstellungen */
.gem-row .g-col { display: inline-flex; align-items: center; gap: 6px; }
.gem-row .g-pick { width: 40px; height: 34px; padding: 2px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); cursor: pointer; }
.gem-row .g-hex { width: 96px; }
/* fonts */
.font-grid { display: grid; gap: 12px; }
.font-row { display: grid; grid-template-columns: minmax(200px, 280px) 1fr; gap: 14px; align-items: end; }
.font-sample { padding: 10px 14px; border: 1px dashed var(--line); border-radius: 12px; background: var(--surface-2); min-height: 46px; display: flex; align-items: center; overflow-wrap: anywhere; }
@media (max-width: 700px) { .font-row { grid-template-columns: minmax(0, 1fr); gap: 6px; } }

/* ===== Version 30 ===== */
:root[data-design="casuallight"], :root[data-design="casualdark"] { --btn: var(--accent); --btn-hover: var(--accent-hover); --btn-fg: var(--accent-fg); --hl: var(--accent-soft); --hl-fg: var(--accent); }
.feed-sec { border-bottom: 1px solid var(--line); padding: 6px 0; }
.feed-item .feed-av { display: grid; place-items: center; background: var(--hl); color: var(--hl-fg); }
.design-card.dark .dc-bar { background: color-mix(in srgb, var(--p) 80%, #ffffff 20%); }
.custom-design { display: grid; gap: 10px; margin-top: 14px; padding: 14px; border: 1px solid var(--line); border-radius: 18px; background: var(--surface); }
.custom-design.on { border-color: var(--fg); box-shadow: 0 0 0 2px var(--fg) inset; }
.cd-head { display: flex; align-items: center; gap: 8px; font-size: 18px; }
.cd-grid { display: grid; grid-template-columns: minmax(0, 260px) minmax(0, 1fr); gap: 14px; align-items: start; }
@media (max-width: 760px) { .cd-grid { grid-template-columns: minmax(0, 1fr); } }
.cd-fields { display: grid; gap: 10px; }
.cd-field { display: grid; gap: 4px; }
.cd-field label { font-weight: 600; font-size: 14px; }
.cd-prev { display: grid; gap: 10px; padding: 12px; border-radius: 14px; background: var(--bg); color: var(--fg); border: 1px solid var(--line); font-size: 14px; }
.cd-bar { display: flex; gap: 6px; align-items: center; padding: 6px 8px; border-radius: 10px; background: var(--surface); border: 1px solid var(--line); flex-wrap: wrap; }
.cd-bar b { margin-right: auto; font-weight: 600; }
.cd-bar span { padding: 3px 8px; border-radius: 7px; }
.cd-bar .cd-on { background: var(--hl); color: var(--hl-fg); }
.cd-card { display: grid; gap: 4px; padding: 10px 12px; border-radius: 12px; background: var(--surface); border: 1px solid var(--line); }
.cd-card > span:not(.cd-link):not(.cd-btns) { color: var(--muted); }
.cd-link { color: var(--accent); font-weight: 600; text-decoration: underline; }
.cd-btns { display: flex; gap: 6px; align-items: center; margin-top: 4px; }
.cd-btn { padding: 5px 12px; border-radius: 9px; background: var(--btn); color: var(--btn-fg); font-weight: 600; }
.cd-chip { padding: 2px 9px; border-radius: 999px; background: var(--hl); color: var(--hl-fg); font-weight: 600; font-size: 12px; }

/* ===== Version 31 ===== */
@media (max-width: 760px) {
  .top { padding: 4px 6px; }
  .top .brand { margin-right: auto; min-width: 0; }
  .top .brand-name { font-size: 17px; white-space: nowrap; }
  .top .brand-caret { display: none; }
  .top .me { padding: 2px; }
  .top .me-name, .top .me .chip { display: none; }
  .topnav button { padding: 6px 5px; font-size: 10.5px; min-width: 52px; }
}
@media (max-width: 370px) { .top .brand-name { font-size: 15px; } }
.dash-ann { display: grid; gap: 10px; }
.ann { display: grid; gap: 6px; padding: 16px 18px; border-radius: 18px; border: 1px solid var(--line); background: var(--surface); min-width: 0; }
.ann.home { background: var(--hl); color: var(--hl-fg); border-color: transparent; }
.ann.home .ann-by, .ann.home .ann-until, .ann.home .ann-k { color: var(--hl-fg); opacity: .85; }
.ann.read { opacity: .85; }
.ann-head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.ann-k { display: inline-flex; align-items: center; gap: 6px; font-family: var(--font-mono); font-size: 12px; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); }
.ann-until { margin-left: auto; font-size: 13px; color: var(--muted); }
.ann-title { margin: 0; font-size: 21px; letter-spacing: -.02em; }
.ann-text { margin: 0; white-space: pre-wrap; overflow-wrap: anywhere; }
.ann-by { margin: 0; font-size: 13px; color: var(--muted); }
.ann-actions { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 4px; }
.ann.home .btn { color: var(--hl-fg); border-color: color-mix(in srgb, var(--hl-fg) 35%, transparent); background: transparent; }
.ann.home .btn.ann-ok { background: var(--hl-fg); color: var(--hl); border-color: var(--hl-fg); }
.ann-list { display: grid; gap: 12px; align-content: start; }
.ann-list .ann { max-width: 760px; }
.ann-item .feed-av { background: var(--btn); color: var(--btn-fg); }
.an-pick { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface-2); }
.an-pick[hidden] { display: none; }
@media (max-width: 600px) { .an-pick { grid-template-columns: 1fr; } }
.check-list { display: grid; gap: 4px; margin-top: 6px; }
/* notification centre */
.bell-btn { position: relative; }
.bell-btn .nav-badge { position: absolute; top: 2px; right: 2px; }
.bell-btn.on { background: var(--hl); color: var(--hl-fg); }
.notifs { position: absolute; top: calc(100% + 8px); right: 0; width: min(400px, calc(100vw - 20px)); max-height: min(70vh, 560px); display: grid; grid-template-rows: auto minmax(0, 1fr); border: 1px solid var(--line); border-radius: 18px; background: var(--surface); box-shadow: var(--shadow); z-index: 40; overflow: hidden; animation: mecard-in .14s ease-out; }
@media (prefers-reduced-motion: reduce) { .notifs { animation: none; } }
.notifs-head { display: flex; align-items: center; gap: 8px; padding: 14px 16px 10px; border-bottom: 1px solid var(--line); font-size: 17px; }
.notifs-list { list-style: none; margin: 0; padding: 6px; overflow-y: auto; display: grid; gap: 2px; align-content: start; }
.notif { width: 100%; display: flex; align-items: flex-start; gap: 12px; padding: 10px; border: 0; border-radius: 12px; background: none; color: var(--fg); text-align: left; cursor: pointer; }
.notif:hover, .notif:focus-visible { background: var(--surface-2); }
.notif-ico { flex: none; display: grid; place-items: center; width: 34px; height: 34px; border-radius: 10px; background: var(--surface-2); color: var(--fg); }
.notif.new .notif-ico { background: var(--hl); color: var(--hl-fg); }
.notif-main { flex: 1; min-width: 0; display: grid; gap: 1px; }
.notif-main strong { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.notif-k { font-family: var(--font-mono); font-size: 11px; text-transform: uppercase; letter-spacing: .07em; color: var(--muted); }
.notif-t { font-size: 14px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.notif-dot { flex: none; width: 9px; height: 9px; margin-top: 6px; border-radius: 50%; background: var(--btn); }
.notifs-empty { padding: 16px; }

/* ===== Version 33: sidebar navigation ===== */
#side { display: none; }
:root { --side-w: 236px; }
:root[data-side="mini"] { --side-w: 68px; }
:root[data-nav="side"] #app { display: grid; grid-template-columns: var(--side-w) minmax(0, 1fr); grid-template-rows: auto minmax(0, 1fr) auto; }
:root[data-nav="side"] #side { display: flex; flex-direction: column; gap: 6px; grid-column: 1; grid-row: 1 / 3; min-height: 0; margin: 10px 0 10px 12px; padding: 8px; border: 1px solid var(--line); border-radius: 16px;
  background: color-mix(in srgb, var(--surface) 84%, transparent); -webkit-backdrop-filter: blur(10px) saturate(140%); backdrop-filter: blur(10px) saturate(140%); overflow-y: auto; overflow-x: hidden; }
:root[data-nav="side"] #top { grid-column: 2; grid-row: 1; }
:root[data-nav="side"] #main { grid-column: 2; grid-row: 2; }
:root[data-nav="side"] .demobar { grid-column: 1 / -1; grid-row: 3; }
:root[data-nav="side"] .top .topnav { display: none; }
:root[data-nav="side"] .top .admin-btn { display: none; }
.top-title { display: flex; align-items: center; gap: 10px; min-width: 0; margin-right: auto; }
.top-title-text { font-size: 19px; font-weight: 500; letter-spacing: -.02em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; padding-left: 6px; }
.top .side-open { display: none; }
.side-brand { display: flex; align-items: center; gap: 10px; height: 46px; padding: 0 8px; border: 0; border-radius: 12px; background: none; color: var(--fg); cursor: pointer; font-size: 18px; font-weight: 600; letter-spacing: -.03em; white-space: nowrap; }
.side-brand:hover { background: var(--surface-2); }
.side-brand .brand-mark { flex: none; }
.side-nav { display: grid; gap: 2px; padding-top: 6px; border-top: 1px solid var(--line); }
.side-foot { display: grid; gap: 2px; margin-top: auto; padding-top: 6px; border-top: 1px solid var(--line); }
.side-item { position: relative; display: flex; align-items: center; gap: 12px; height: 42px; padding: 0 12px; border: 0; border-radius: 10px; background: none; color: var(--fg); font-family: var(--font-nav); font-size: 15px; font-weight: 500; text-align: left; cursor: pointer; white-space: nowrap; }
.side-item .ico { flex: none; color: var(--muted); }
.side-item:hover { background: var(--surface-2); }
.side-item.on { background: var(--hl); color: var(--hl-fg); }
.side-item.on .ico { color: var(--hl-fg); }
.side-item:focus-visible, .side-brand:focus-visible { outline: 2px solid var(--fg); outline-offset: 1px; }
.side-lbl { overflow: hidden; text-overflow: ellipsis; }
.side-badge { margin-left: auto; min-width: 20px; height: 20px; padding: 0 6px; border-radius: 999px; background: var(--btn); color: var(--btn-fg); font-size: 12px; font-weight: 700; display: grid; place-items: center; }
.side-item.on .side-badge { background: var(--hl-fg); color: var(--hl); }
.fold-ico { display: inline-grid; transform: rotate(90deg); transition: transform .15s; color: var(--muted); }
.fold-ico.mini { transform: rotate(-90deg); }
.side-fold { color: var(--muted); }
:root[data-side="mini"] .side-lbl { display: none; }
:root[data-side="mini"] .side-item, :root[data-side="mini"] .side-brand { justify-content: center; padding: 0; }
:root[data-side="mini"] .side-badge { position: absolute; top: 3px; right: 3px; min-width: 17px; height: 17px; padding: 0 4px; font-size: 10.5px; margin: 0; }
@media (prefers-reduced-motion: reduce) { .fold-ico, #side { transition: none !important; } }
.side-scrim { display: none; }
/* phones: the sidebar becomes a drawer, opened with the logo */
@media (max-width: 760px) {
  :root[data-nav="side"] #app { display: flex; flex-direction: column; }
  :root[data-nav="side"] #side { position: fixed; z-index: 60; top: 0; bottom: 0; left: 0; width: min(290px, 84vw); margin: 0; border-radius: 0 18px 18px 0; border-left: 0;
    padding: calc(8px + env(safe-area-inset-top, 0px)) 8px calc(8px + env(safe-area-inset-bottom, 0px)) calc(8px + env(safe-area-inset-left, 0px));
    background: var(--surface); transform: translateX(-105%); transition: transform .2s ease-out; box-shadow: var(--shadow); }
  :root[data-nav="side"][data-sideopen="1"] #side { transform: none; }
  :root[data-nav="side"][data-sideopen="1"] .side-scrim { display: block; position: fixed; inset: 0; z-index: 55; background: rgba(0, 0, 0, .35); }
  :root[data-nav="side"] .side-lbl { display: inline !important; }
  :root[data-nav="side"] .side-item, :root[data-nav="side"] .side-brand { justify-content: flex-start !important; padding: 0 12px !important; }
  :root[data-nav="side"] .side-badge { position: static !important; margin-left: auto !important; }
  :root[data-nav="side"] .top .side-open { display: inline-flex; }
  :root[data-nav="side"] .top .top-title-text { font-size: 17px; padding-left: 0; }
}
/* profile card: former menu entries */
.mecard-links { display: grid; gap: 2px; padding-top: 8px; border-top: 1px solid var(--line); }
.mecard-links .pm-item { width: 100%; }
/* layout picker */
.layout-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(176px, 1fr)); gap: 12px; }
.layout-card { display: grid; gap: 6px; padding: 12px; border: 1px solid var(--line); border-radius: 18px; background: var(--surface); color: var(--fg); text-align: left; cursor: pointer; }
.layout-card:hover { border-color: var(--muted); }
.layout-card.on { border-color: var(--fg); box-shadow: 0 0 0 2px var(--fg) inset; }
.layout-card strong { font-size: 17px; font-weight: 500; }
.layout-card > span:not(.lc-prev) { font-size: 14px; color: var(--muted); }
.lc-prev { position: relative; height: 84px; border-radius: 10px; background: var(--bg); border: 1px solid var(--line); display: grid; gap: 6px; padding: 8px; }
.lc-prev.top { grid-template-rows: 12px 1fr; }
.lc-prev.side { grid-template-columns: 22% 1fr; }
.lc-prev .lc-bar { border-radius: 5px; background: var(--hl); }
.lc-prev .lc-body { border-radius: 5px; background: var(--surface); border: 1px dashed var(--line); }

/* ===== Version 34 ===== */
.res-ico { display: inline-grid; place-items: center; width: 16px; flex: none; color: var(--muted); }
.res-ico .ico { width: 16px; height: 16px; }
.calrow.off .res-ico { opacity: .4; }
.grem-filters { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-top: 6px; }
.grem-filters .adm-dd { margin: 0; }
.grem-picks button.on { background: var(--hl); color: var(--hl-fg); border-color: transparent; }
.adm-dd-menu .gem-mark, .adm-dd-btn .gem-mark { flex: none; }

/* ===== Version 35: bottom tab bar on phones and small tablets (iPad mini included) ===== */
.topnav .lbl-s { display: none; }
@media (max-width: 820px) {
  :root[data-nav="top"] .top { flex-wrap: nowrap; margin: 8px 8px 0; padding: 4px 6px; gap: 6px; -webkit-backdrop-filter: none; backdrop-filter: none; background: var(--surface); }
  :root[data-nav="top"] .top .brand { margin-right: auto; min-width: 0; }
  :root[data-nav="top"] .top .brand-name { font-size: 17px; white-space: nowrap; }
  :root[data-nav="top"] .top .me-name, :root[data-nav="top"] .top .me .chip { display: none; }
  :root[data-nav="top"] #app { padding-bottom: calc(62px + env(safe-area-inset-bottom, 0px)); }
  :root[data-nav="top"] .top .main-nav { position: fixed; z-index: 40; left: 0; right: 0; bottom: 0; order: 0; width: auto; margin: 0;
    display: flex; justify-content: stretch; gap: 0; overflow: visible; border: 0; border-top: 1px solid var(--line);
    padding: 4px max(4px, env(safe-area-inset-right, 0px)) calc(4px + env(safe-area-inset-bottom, 0px)) max(4px, env(safe-area-inset-left, 0px));
    background: var(--surface); box-shadow: 0 -4px 18px rgba(0,0,0,.06); }
  :root[data-nav="top"] .top .topnav button { flex: 1 1 0; min-width: 0; max-width: 120px; flex-direction: column; justify-content: center; gap: 3px; height: 54px; padding: 4px 2px !important; border-radius: 12px; font-size: 11px !important; line-height: 1.1; }
  :root[data-nav="top"] .top .topnav button .ico { display: block !important; width: 22px; height: 22px; flex: none; }
  :root[data-nav="top"] .top .topnav .lbl { display: none !important; }
  :root[data-nav="top"] .top .topnav .lbl-s { display: block; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  :root[data-nav="top"][data-navlabels="icons"] .top .topnav .lbl-s { display: none; }
  :root[data-nav="top"] .top .topnav .nav-badge { position: absolute; top: 3px; left: calc(50% + 6px); right: auto; margin: 0; }
  :root[data-nav="top"] .top .main-nav { justify-content: space-around; }
}
@media (max-width: 380px) {
  :root[data-nav="top"] .top .topnav button { font-size: 10px !important; gap: 2px; }
  :root[data-nav="top"] .top .topnav button .ico { width: 20px; height: 20px; }
  :root[data-nav="top"] .top .brand-name { font-size: 15px; }
  :root[data-nav="top"] .top .gf-badge { display: none; }
}
@media (max-width: 340px) { :root[data-nav="top"] .top .brand-name { display: none; } :root[data-nav="top"] .top .topnav button { font-size: 9.5px !important; letter-spacing: -.02em; padding: 4px 0 !important; } }
@media (max-width: 820px) and (min-width: 761px) {
  :root[data-nav="top"] .top .brand-caret { display: none; }
}

/* ===== Version 36: mehrtägige Termine ===== */
.dur-checks { display: flex; flex-wrap: wrap; gap: 4px 18px; }

/* ===== Version 37: Gebäude ===== */
.bld-sec { display: grid; gap: 2px; }
.res-group, .bld-sec { grid-template-columns: minmax(0, 1fr); min-width: 0; }
.bld-row .cn { font-weight: 600; }
.callist.in-bld { padding-left: 14px; margin-left: 8px; border-left: 1px solid var(--line); }
.resgrid tr.rg-bld th, .resgrid tr.rg-bld td { background: var(--surface-2); font-weight: 600; }
.resgrid tr.rg-bld .res-cn .ico { color: var(--muted); }
.resgrid td.bld-sum { font-size: 12px; color: var(--muted); text-align: center; white-space: nowrap; }
.resgrid td.bld-sum.some { color: var(--fg); background: color-mix(in srgb, var(--hl) 22%, var(--surface-2)); }
.resgrid td.bld-sum.full { color: var(--hl-fg); background: var(--hl); }
.resgrid tr.in-bld th.rg-name { padding-left: 26px; }
.bld-chip { display: inline-flex; align-items: center; gap: 4px; }
.bld-chip .ico { width: 13px; height: 13px; }
.bld-rooms { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 2px 14px; padding: 8px 10px; border: 1px solid var(--line); border-radius: 12px; max-height: 240px; overflow: auto; }
.bld-rooms .muted { color: var(--muted); font-size: 13px; }
/* the room month table shares the class "month" with the calendar grid; keep it a real table */
.resgrid.month { display: table; gap: 0; background: none; border: 0; border-radius: 0; overflow: visible; }

/* ===== Version 38 ===== */
.look-scope { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; padding: 14px 16px; border: 1px solid var(--line); border-radius: 18px; background: var(--surface); }
.look-scope .hint { flex: 1 1 260px; min-width: 0; }
.bld-arow { cursor: default; }
.bld-toggle { display: grid; place-items: center; width: 32px; height: 32px; flex: none; border: 0; border-radius: 8px; background: none; color: var(--muted); }
.bld-toggle:hover { background: var(--surface-2); color: var(--fg); }
.bld-toggle .bt-ico { display: inline-grid; transition: transform .15s; }
.bld-toggle .bt-ico.shut { transform: rotate(-90deg); }
.alist .arow.sub { padding-left: 64px; background: color-mix(in srgb, var(--surface-2) 45%, var(--surface)); }
.alist .arow.sub .avatar { width: 30px; height: 30px; }
.alist .arow.sub.empty { padding-block: 10px; }
@media (max-width: 600px) { .alist .arow.sub { padding-left: 28px; } }
@media (prefers-reduced-motion: reduce) { .bld-toggle .bt-ico { transition: none; } }

/* ===== Version 40: Schriftstil je Bereich ===== */
.font-row { grid-template-columns: minmax(0, 360px) 1fr; }
.font-pick { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: 10px; align-items: end; }
:root[data-fw-display] :is(h1, h2, h3, .brand-name, .pf-who strong) { font-weight: var(--fw-display) !important; }
:root[data-fw-body] :is(body, p, li, td, dd, input, textarea, select, .hint, .arow-sub, .msg-text, .bubble) { font-weight: var(--fw-body); }
:root[data-fw-nav] :is(.topnav button, .side-item, .side-lbl) { font-weight: var(--fw-nav) !important; }
:root[data-fw-mono] :is(.tbl-wrap th, .side-label, .alist-group, .grem-h, .res-kind, .navord-n, .dc-sw small, .demo-accounts h2, .dash-go, .adm-dd-k, .ann-k, .notif-k) { font-weight: var(--fw-mono) !important; }
@media (max-width: 700px) { .font-pick { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); } }

/* ===== Version 42: Website ===== */
.pub-box .check span { display: inline-flex; align-items: center; gap: 6px; font-weight: 600; }
.pub-box .check .ico, .pub-yes .ico { width: 16px; height: 16px; }
.pub-yes { color: var(--fg); }

.pub-key { display: grid; gap: 8px; padding: 12px 14px; border: 1px dashed var(--line); border-radius: 12px; background: var(--surface-2); }
.pub-key code { font-size: 15px; word-break: break-all; }
