:root {
  --bg: #f5f6f9;
  --panel: #ffffff;
  --rail: #10233f;
  --rail-fg: #d5dfee;
  --ink: #17202e;
  --muted: #66708a;
  --line: #e2e6ee;
  --soft: #eef1f6;
  --accent: #ec7a1c;
  --accent-ink: #10233f;
  --accent-text: #b5560c;
  --navy: #10233f;
  --navy-2: #1d3d6b;
  --orange: #f28c28;
  --accent-soft: #fdeedd;
  --danger: #c2410c;
  --warn: #b45309;
  --radius: 10px;
  --shadow: 0 1px 2px rgba(16,22,34, .06), 0 8px 24px rgba(16,22,34, .08);
  font-family: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  color: var(--ink);
  font-size: 14px;
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; background: var(--bg); }
button, input, select, textarea { font: inherit; color: inherit; }
a { color: var(--accent-text); }
.hidden { display: none !important; }
.muted { color: var(--muted); }
.small { font-size: 12px; }
.grow { flex: 1; min-width: 0; }
.row { display: flex; align-items: center; gap: 8px; }
.stack { display: flex; flex-direction: column; gap: 12px; }
.ellipsis { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* Buttons & Inputs */
.btn { display: inline-flex; align-items: center; gap: 6px; border: 1px solid var(--line); background: var(--panel);
  padding: 7px 12px; border-radius: 8px; cursor: pointer; font-weight: 500; white-space: nowrap; }
.btn:hover { background: var(--soft); }
.btn.primary { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.btn.primary:hover { filter: brightness(1.08); }
.btn.danger { color: var(--danger); }
.btn.ghost { border-color: transparent; background: transparent; }
.btn.ghost:hover { background: var(--soft); }
.btn.icon { padding: 6px; }
.btn:disabled { opacity: .5; cursor: default; }
.btn svg { width: 16px; height: 16px; }
.input, select.input, textarea.input { width: 100%; border: 1px solid var(--line); border-radius: 8px; padding: 8px 10px; background: #fff; }
.input:focus, textarea:focus { outline: 2px solid var(--accent-soft); border-color: var(--accent); }
label.field { display: flex; flex-direction: column; gap: 4px; font-weight: 500; }
label.field > span { font-size: 12px; color: var(--muted); }
.check { display: flex; align-items: center; gap: 8px; padding: 4px 0; cursor: pointer; }
.badge { display: inline-flex; align-items: center; gap: 4px; font-size: 11px; font-weight: 600; padding: 2px 8px;
  border-radius: 999px; background: var(--soft); color: var(--muted); white-space: nowrap; }
.role-badge { color: #fff; }
.count { min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px; background: var(--accent); color: var(--accent-ink);
  font-size: 11px; font-weight: 700; display: inline-flex; align-items: center; justify-content: center; }

/* Login */
.login { min-height: 100%; display: grid; place-items: center; padding: 24px;
  background: radial-gradient(1200px 600px at 10% -10%, #fde3c8 0, transparent 60%), var(--bg); }
.login-card { width: 100%; max-width: 380px; background: var(--panel); border-radius: 16px; padding: 32px; box-shadow: var(--shadow); }
.login-card h1 { margin: 12px 0 4px; font-size: 22px; }
.logo { width: 40px; height: 40px; border-radius: 10px; background: var(--accent); display: grid; place-items: center; }
.logo svg { width: 22px; height: 22px; }
.demo-users { margin-top: 20px; border-top: 1px solid var(--line); padding-top: 16px; }
.demo-users button { display: flex; width: 100%; justify-content: space-between; border: 0; background: none; padding: 6px 4px;
  border-radius: 6px; cursor: pointer; text-align: left; }
.demo-users button:hover { background: var(--soft); }
.error { color: var(--danger); font-size: 13px; }

/* Shell */
.shell { display: grid; grid-template-columns: 76px 1fr; height: 100vh; }
.rail { background: var(--rail); color: var(--rail-fg); display: flex; flex-direction: column; align-items: center; padding: 12px 0; gap: 4px; }
.rail .org-btn { width: 48px; height: 48px; border-radius: 14px; border: 0; cursor: pointer; font-weight: 700; color: #fff;
  font-size: 15px; margin-bottom: 10px; position: relative; }
.rail .org-btn::after { content: ""; position: absolute; right: -4px; bottom: -4px; width: 14px; height: 14px; border-radius: 50%;
  background: var(--rail) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23d5dfee' stroke-width='3'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E") center/10px no-repeat; }
.rail .nav { width: 64px; padding: 8px 0 6px; border: 0; background: transparent; color: var(--rail-fg); border-radius: 10px;
  cursor: pointer; display: flex; flex-direction: column; align-items: center; gap: 4px; font-size: 11px; position: relative; }
.rail .nav svg { width: 22px; height: 22px; }
.rail .nav:hover { background: rgba(255,255,255,.07); }
.rail .nav.active { background: rgba(255,255,255,.14); color: #fff; }
.rail .nav .count { position: absolute; top: 2px; right: 8px; background: #f97316; }
.rail .spacer { flex: 1; }
.rail .nav.nav-bottom { margin-bottom: 8px; }
.rail .me { width: 40px; height: 40px; border-radius: 50%; border: 2px solid rgba(255,255,255,.25); cursor: pointer; padding: 0; }
.main { min-width: 0; min-height: 0; display: flex; flex-direction: column; }
.view { flex: 1; min-height: 0; display: flex; }
.page { flex: 1; overflow: auto; padding: 24px 32px; }
.page-head { display: flex; align-items: center; gap: 12px; margin-bottom: 20px; flex-wrap: wrap; }
.page-head h2 { margin: 0; font-size: 20px; }

/* Popover menu */
.menu { position: fixed; z-index: 50; background: var(--panel); border-radius: 12px; box-shadow: var(--shadow); border: 1px solid var(--line);
  min-width: 240px; padding: 6px; }
.menu .item { display: flex; align-items: center; gap: 10px; width: 100%; border: 0; background: none; padding: 8px 10px;
  border-radius: 8px; cursor: pointer; text-align: left; }
.menu .item:hover { background: var(--soft); }
.menu .item.active { background: var(--accent-soft); }
.menu hr { border: 0; border-top: 1px solid var(--line); margin: 6px 0; }
.menu .label { padding: 6px 10px; font-size: 11px; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); }

/* Avatar */
.avatar { width: 32px; height: 32px; border-radius: 50%; display: inline-grid; place-items: center; color: #fff; font-weight: 600;
  font-size: 12px; flex-shrink: 0; position: relative; }
.avatar.sm { width: 24px; height: 24px; font-size: 10px; }
.avatar .dot { position: absolute; right: -1px; bottom: -1px; width: 10px; height: 10px; border-radius: 50%; border: 2px solid #fff; background: #9ca3af; }
.avatar .dot.on { background: #2f6fbf; }

/* Modal */
.backdrop { position: fixed; inset: 0; background: rgba(16,22,34, .4); display: grid; place-items: center; z-index: 100; padding: 16px; }
.modal { background: var(--panel); border-radius: 14px; width: 100%; max-width: 480px; max-height: 90vh; display: flex; flex-direction: column; box-shadow: var(--shadow); }
.modal.wide { max-width: 860px; }
.modal header { padding: 18px 20px 0; font-size: 17px; font-weight: 600; display: flex; align-items: center; }
.modal .body { padding: 16px 20px; overflow: auto; }
.modal footer { padding: 0 20px 18px; display: flex; justify-content: flex-end; gap: 8px; }

/* Toast */
#toasts { position: fixed; bottom: 20px; right: 20px; display: flex; flex-direction: column; gap: 8px; z-index: 400; }
.toast { background: #17202e; color: #fff; padding: 10px 14px; border-radius: 10px; box-shadow: var(--shadow); max-width: 360px; animation: pop .15s ease-out; }
.toast.error { background: var(--danger); }
@keyframes pop { from { transform: translateY(6px); opacity: 0; } }

/* Two-column module layout (Chat) */
.side { width: 260px; background: var(--panel); border-right: 1px solid var(--line); display: flex; flex-direction: column; min-height: 0; }
.side-head { padding: 16px 16px 8px; }
.side-head .org-name { font-weight: 700; font-size: 16px; }
.side-scroll { overflow: auto; flex: 1; padding: 0 8px 16px; }
.side-section { display: flex; align-items: center; justify-content: space-between; padding: 14px 8px 4px; font-size: 12px; font-weight: 600; color: var(--muted); }
.side-item { display: flex; align-items: center; gap: 8px; padding: 6px 8px; border-radius: 8px; cursor: pointer; color: var(--ink); text-decoration: none; }
.side-item:hover { background: var(--soft); }
.side-item.active { background: var(--accent-soft); color: var(--accent-text); font-weight: 600; }
.side-item.unread { font-weight: 700; }
.side-item svg { width: 15px; height: 15px; color: var(--muted); flex-shrink: 0; }
.side-section .presence-dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: #9ca3af; margin-right: 6px; vertical-align: 1px; }
.side-section .presence-dot.on { background: #2f6fbf; }
.side-toggle { width: 100%; border: 0; background: none; font: inherit; cursor: pointer; text-align: left; }
.side-toggle:hover { color: var(--ink); }
.side-toggle .chev { display: inline-block; font-size: 15px; line-height: 1; transition: transform .15s; }
.side-toggle .chev.open { transform: rotate(90deg); }
.side-item.offline { color: var(--muted); }
.side-item.offline .avatar { opacity: .6; }
.side-item.offline.unread, .side-item.offline.active { color: var(--ink); }
.side-item.offline.active { color: var(--accent-text); }
.side-more { padding: 2px 8px 6px; }
body.reloading { cursor: progress; opacity: .7; transition: opacity .2s; }

.chat { flex: 1; display: flex; flex-direction: column; min-width: 0; background: var(--panel); }
.chat-head { padding: 12px 20px; border-bottom: 1px solid var(--line); display: flex; align-items: center; gap: 10px; }
.chat-head .title { font-weight: 700; font-size: 16px; }
.messages { flex: 1; overflow: auto; padding: 12px 20px; }
.day { text-align: center; margin: 16px 0 8px; font-size: 12px; color: var(--muted); display: flex; align-items: center; gap: 12px; }
.day::before, .day::after { content: ""; flex: 1; border-top: 1px solid var(--line); }
.msg { display: flex; gap: 10px; padding: 4px 8px; margin: 0 -8px; border-radius: 8px; position: relative; }
.msg:hover { background: #fafbfc; }
.msg .meta { display: flex; align-items: baseline; gap: 8px; }
.msg .name { font-weight: 700; }
.msg .time { font-size: 11px; color: var(--muted); }
.msg .text { white-space: pre-wrap; word-wrap: break-word; line-height: 1.45; }
.msg.cont { padding-top: 0; }
.msg.cont .avatar { visibility: hidden; height: 0; }
.msg.offline > .avatar { opacity: .6; }
.msg .avatar { transition: opacity .3s; }
.msg .tools { position: absolute; right: 8px; top: 2px; display: none; }
.msg:hover .tools { display: block; }
.msg .deleted { color: var(--muted); font-style: italic; }
.attach { margin-top: 6px; display: inline-flex; align-items: center; gap: 10px; border: 1px solid var(--line); border-radius: 10px; padding: 8px 12px; text-decoration: none; color: var(--ink); max-width: 360px; }
.attach:hover { background: var(--soft); }
.attach-img { margin-top: 6px; display: block; max-width: 360px; max-height: 260px; border-radius: 10px; border: 1px solid var(--line); }
.typing { height: 20px; padding: 0 20px; font-size: 12px; color: var(--muted); }
.composer { padding: 0 20px 16px; }
.composer-box { border: 1px solid var(--line); border-radius: 12px; display: flex; align-items: flex-end; gap: 6px; padding: 6px; }
.composer-box:focus-within { border-color: var(--accent); }
.composer textarea { flex: 1; border: 0; resize: none; outline: none; padding: 6px; max-height: 160px; min-height: 22px; background: transparent; }
.readonly-note { padding: 12px 20px 16px; color: var(--muted); display: flex; gap: 8px; align-items: center; }
.empty { padding: 48px; text-align: center; color: var(--muted); }

/* Tabelle (Ablage, Admin) */
.table { width: 100%; border-collapse: collapse; background: var(--panel); border-radius: var(--radius); overflow: hidden; border: 1px solid var(--line); }
.table th { text-align: left; font-size: 12px; color: var(--muted); font-weight: 600; padding: 10px 12px; border-bottom: 1px solid var(--line); background: #fafbfc; }
.table td { padding: 10px 12px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.table tr:last-child td { border-bottom: 0; }
.table tr.click { cursor: pointer; }
.table tr.click:hover td { background: #fafbfc; }
.file-ico { width: 32px; height: 32px; border-radius: 8px; display: grid; place-items: center; background: var(--soft); color: var(--muted); flex-shrink: 0; }
.file-ico.folder { background: #fdf3d7; color: #b7791f; }
.file-ico.folder.personal { background: #fdeedd; color: #ec7a1c; }
.file-ico svg { width: 18px; height: 18px; }
.crumbs { display: flex; align-items: center; gap: 4px; font-size: 18px; font-weight: 600; flex-wrap: wrap; }
.crumbs a { color: var(--muted); text-decoration: none; cursor: pointer; }
.crumbs a:hover { color: var(--ink); }
.dropzone { position: fixed; inset: 0; background: rgba(236,122,28, .12); border: 3px dashed var(--accent); z-index: 90; display: grid; place-items: center; font-size: 18px; font-weight: 600; color: var(--accent-text); pointer-events: none; }
.preview-frame { width: 100%; height: 70vh; border: 1px solid var(--line); border-radius: 8px; }
.preview-text { white-space: pre-wrap; background: #fafbfc; border: 1px solid var(--line); padding: 12px; border-radius: 8px; max-height: 70vh; overflow: auto; font-family: ui-monospace, monospace; font-size: 13px; }
.progress { height: 4px; background: var(--soft); border-radius: 2px; overflow: hidden; margin-top: 6px; }
.progress > div { height: 100%; background: #f5a95a; width: 0; transition: width .2s; }

/* Karten (Video, Übersicht) */
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 16px; }
.card { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; display: flex; flex-direction: column; gap: 10px; }
.card h3 { margin: 0; font-size: 16px; }
.stat { font-size: 26px; font-weight: 700; }

/* Video */
.call { flex: 1; display: flex; flex-direction: column; background: #081428; color: #fff; min-height: 0; }
.call-head { padding: 12px 20px; display: flex; align-items: center; gap: 12px; }
.tiles { flex: 1; display: grid; gap: 10px; padding: 10px 20px; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); align-content: center; overflow: auto; }
.tile { position: relative; background: #1d2636; border-radius: 12px; aspect-ratio: 16/9; overflow: hidden; display: grid; place-items: center; }
.tile video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
/* Safari: ohne absolute Position nimmt das Video in der Kachel seine eigene Höhe an und zeigt nur den oberen Bildteil */
.tile video.portrait { object-fit: contain; background: #081428; }
.tile .who { position: absolute; left: 10px; bottom: 8px; background: rgba(0,0,0,.5); padding: 3px 8px; border-radius: 6px; font-size: 12px; }
.tile .placeholder { position: absolute; inset: 0; display: grid; place-items: center; }
.call-bar { display: flex; justify-content: center; gap: 12px; padding: 16px; }
.round { width: 48px; height: 48px; border-radius: 50%; border: 0; background: #2b3b37; color: #fff; display: grid; place-items: center; cursor: pointer; }
.round svg { width: 22px; height: 22px; }
.round.off { background: #fff; color: #081428; }
.round.leave { background: #dc2626; }
.jitsi { flex: 1; border: 0; width: 100%; }

/* Rechte-Matrix */
.matrix { border-collapse: separate; border-spacing: 0; background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); }
.matrix th, .matrix td { padding: 8px 12px; border-bottom: 1px solid var(--line); }
.matrix thead th { position: sticky; top: 0; background: #fafbfc; z-index: 1; font-size: 12px; text-align: center; }
.matrix td.c { text-align: center; }
.matrix tr.group td { background: #f4f6f4; font-weight: 700; font-size: 12px; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); }
.matrix code { font-size: 11px; color: var(--muted); }
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); margin-bottom: 20px; }
.tab { padding: 10px 14px; border: 0; background: none; cursor: pointer; border-bottom: 2px solid transparent; color: var(--muted); font-weight: 600; }
.tab.active { color: var(--accent-text); border-color: var(--accent); }
.audit-row { display: flex; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.mono { font-family: ui-monospace, monospace; font-size: 12px; }
.secret { font-family: ui-monospace, monospace; font-size: 16px; background: var(--soft); padding: 10px; border-radius: 8px; text-align: center; letter-spacing: .05em; user-select: all; }

.back-mobile { display: none !important; }
input[type=checkbox] { accent-color: var(--accent); width: 16px; height: 16px; }

@media (max-width: 760px) {
  .shell { grid-template-columns: 1fr; grid-template-rows: 1fr 64px; }
  .rail { order: 2; flex-direction: row; justify-content: space-around; padding: 4px 8px; }
  .rail .org-btn { width: 40px; height: 40px; margin: 0; }
  .rail .spacer { display: none; }
  .side { width: 100%; }
  .view.has-active .side { display: none; }
  .view:not(.has-active) .chat { display: none; }
  .page { padding: 16px; }
  .back-mobile { display: inline-flex !important; }
}

/* Zweisprachigkeit */
.lang-tag { display: inline-block; font-size: 10px; font-weight: 700; letter-spacing: .04em; padding: 1px 5px; border-radius: 4px; background: var(--soft); color: var(--muted); }
.lang-switch { display: inline-flex; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; flex-shrink: 0; }
.lang-switch button { border: 0; background: transparent; padding: 5px 9px; font-size: 12px; font-weight: 700; cursor: pointer; color: var(--muted); }
.lang-switch button.on { background: var(--accent); color: var(--accent-ink); }
.rail .lang-switch.rail-lang { border-color: rgba(255,255,255,.2); margin: 10px 0 2px; }
.rail .lang-switch.rail-lang button { color: var(--rail-fg); padding: 4px 7px; font-size: 11px; }
.rail .lang-switch.rail-lang button.on { background: #fff; color: var(--rail); }
.rail .org-btn.long { font-size: 12px; letter-spacing: -.02em; }
.bi { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.bi-col { display: flex; align-items: center; gap: 6px; }
.bi-col .lang-tag { flex-shrink: 0; }
.msg .translation { margin-top: 4px; padding: 6px 10px; border-left: 3px solid var(--accent-soft); background: #f7f9fc; border-radius: 0 8px 8px 0; color: #34403c; white-space: pre-wrap; }
.msg .tr-link { border: 0; background: none; padding: 0; margin-top: 2px; font-size: 12px; color: var(--accent-text); cursor: pointer; display: inline-flex; align-items: center; gap: 4px; }
.msg .tr-link:hover { text-decoration: underline; }
.affil { font-size: 12px; color: var(--muted); }
@media (max-width: 760px) {
  .rail .lang-switch.rail-lang { margin: 0; }
  .bi { grid-template-columns: 1fr; }
}

/* Logo des Verbands */
.brand-slot { display: inline-flex; align-items: center; }
.login-logo { height: 46px; width: auto; display: block; margin-bottom: 4px; }
.topbar { height: 48px; flex-shrink: 0; display: flex; align-items: center; gap: 12px; padding: 0 20px; background: var(--panel); border-bottom: 1px solid var(--line); }
.top-logo { height: 26px; width: auto; display: block; }
.top-sep { width: 1px; height: 22px; background: var(--line); }
.top-title { font-size: 13px; color: var(--muted); }
.view-host { flex: 1; min-height: 0; display: flex; flex-direction: column; }
.view-host > .view { flex: 1; min-height: 0; }
@media (max-width: 760px) { .top-sep, .top-title { display: none; } .topbar { height: 44px; padding: 0 14px; } }
@media (max-width: 760px) {
  .shell { grid-template-columns: minmax(0, 1fr); }
  .rail { overflow-x: auto; gap: 2px; }
  .rail .nav { width: auto; min-width: 58px; padding: 6px 6px; font-size: 10px; }
  .rail .lang-switch.rail-lang { display: none; } /* Sprache auf dem Handy über das Profilmenü */
  .rail .me { flex-shrink: 0; }
}
.login { grid-template-rows: 1fr auto; }
.login-card { align-self: center; justify-self: center; }
.login-sub { margin-top: 10px; }
.login-foot { justify-self: center; padding: 16px 0 4px; font-size: 12px; color: var(--muted); letter-spacing: .04em; }

/* Emoji-Auswahl */
.composer-box { position: relative; }
.emoji-btn { font-size: 18px; line-height: 1; width: 32px; height: 32px; justify-content: center; filter: grayscale(.3); }
.emoji-btn:hover { filter: none; }
.emoji-pop { position: absolute; bottom: calc(100% + 8px); right: 44px; width: min(340px, calc(100vw - 32px)); background: var(--panel);
  border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--shadow); z-index: 30; display: flex; flex-direction: column; }
.emoji-tabs { display: flex; gap: 2px; padding: 6px; border-bottom: 1px solid var(--line); }
.emoji-tabs button { border: 0; background: none; font-size: 18px; border-radius: 6px; padding: 4px 6px; cursor: pointer; }
.emoji-tabs button:hover { background: var(--soft); }
.emoji-scroll { max-height: 260px; overflow-y: auto; padding: 4px 8px 8px; }
.emoji-cat { font-size: 11px; font-weight: 600; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; padding: 8px 2px 4px; }
.emoji-grid { display: grid; grid-template-columns: repeat(8, 1fr); }
.emoji-grid button { border: 0; background: none; font-size: 22px; line-height: 1; padding: 5px 0; border-radius: 6px; cursor: pointer; }
.emoji-grid button:hover { background: var(--soft); transform: scale(1.15); }
@media (max-width: 760px) { .emoji-pop { right: 0; } }

/* Aufzeichnung */
.round.rec { color: #f87171; }
.t-glyph { font: 700 19px/1 Georgia, 'Times New Roman', serif; }
.file-ico.t-glyph { display: grid; place-items: center; font-size: 20px; }
.round.rec-text { color: #93c5fd; }
.round:disabled { opacity: .4; cursor: not-allowed; }
.round.rec.recording { background: #dc2626; color: #fff; animation: recpulse 1.6s infinite; }
.round:disabled { opacity: .45; cursor: default; }
@keyframes recpulse { 0%, 100% { box-shadow: 0 0 0 0 rgba(220,38,38,.6); } 50% { box-shadow: 0 0 0 8px rgba(220,38,38,0); } }
.rec-banner { display: inline-flex; align-items: center; gap: 8px; background: rgba(220,38,38,.18); border: 1px solid rgba(248,113,113,.6);
  color: #fecaca; padding: 5px 12px; border-radius: 999px; font-size: 13px; font-weight: 600; }
.rec-dot { width: 10px; height: 10px; border-radius: 50%; background: #ef4444; animation: blink 1.2s infinite; }
@keyframes blink { 50% { opacity: .25; } }
.rec-option { display: flex; gap: 12px; align-items: center; border: 1px solid var(--line); border-radius: 10px; padding: 12px; cursor: pointer; }
.rec-option:has(input:checked) { border-color: var(--accent); background: var(--accent-soft); }
.rec-note { display: flex; gap: 8px; align-items: flex-start; background: #fff7ed; border: 1px solid #fed7aa; color: #9a3412; padding: 10px 12px; border-radius: 10px; font-size: 13px; margin-bottom: 12px; }
.rec-note svg { flex-shrink: 0; margin-top: 2px; }
.rec-player { width: 100%; max-height: 46vh; background: #000; border-radius: 10px; margin-bottom: 14px; }
.rec-audio { width: 100%; margin-bottom: 14px; }
.badge.status-done { background: #dde8f7; color: #1d3d6b; }
.badge.status-error { background: #fee2e2; color: #991b1b; }
.badge.status-recording { background: #fee2e2; color: #b91c1c; }
.badge.status-transcribing, .badge.status-summarizing { background: #fdeedd; color: #1d3d6b; }
.spin { width: 10px; height: 10px; border: 2px solid currentColor; border-right-color: transparent; border-radius: 50%; display: inline-block; animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.md h3 { font-size: 15px; margin: 14px 0 6px; }
.md h4 { font-size: 14px; margin: 14px 0 4px; color: var(--accent-text); }
.md p { margin: 4px 0; line-height: 1.5; }
.md ul { margin: 4px 0 8px; padding-left: 20px; }
.md li { margin: 2px 0; line-height: 1.45; }
.rec-detail .tabs { margin-top: 4px; }
a.btn { text-decoration: none; color: inherit; }
.folder-link { color: var(--accent-text); text-decoration: none; gap: 6px; }
.folder-link:hover { text-decoration: underline; }
.folder-link svg, .card .small.row svg { width: 15px; height: 15px; flex-shrink: 0; }

/* Einstellungen für Kamera und Ton (Videokonferenz) */
.tile video.mirror, .av-video.mirror { transform: scaleX(-1); }
.av-settings .tabs { margin-bottom: 16px; }
.av-preview { position: relative; background: #081428; border-radius: 10px; aspect-ratio: 16/9; overflow: hidden; }
.av-preview video { width: 100%; height: 100%; object-fit: cover; display: block; }
.av-note { position: absolute; inset: 0; display: grid; place-items: center; color: #d5dfee; font-size: 13px; text-align: center; padding: 12px; }
.av-meter { height: 8px; background: var(--soft); border-radius: 4px; overflow: hidden; margin: 2px 0 6px; }
.av-meter-bar { height: 100%; width: 0; background: var(--accent); transition: width .08s linear; }
.av-hint { display: block; font-weight: 400; }
.check > span { display: flex; flex-direction: column; }
.tile.failed { outline: 2px solid #f87171; }
.tile.failed::after { content: '⚠'; position: absolute; top: 8px; right: 10px; color: #fca5a5; font-size: 18px; }

/* ---------- Meeting wie Zoom/Teams: Teilnehmende, Warteraum, Hand, Reaktionen ---------- */
.call-main { flex: 1; display: flex; min-height: 0; }
.stage { flex: 1; position: relative; display: flex; min-width: 0; }
.stage .tiles { flex: 1; }
.meeting-flag { display: inline-flex; align-items: center; gap: 4px; font-size: 12px; background: rgba(255,255,255,.12); padding: 2px 8px; border-radius: 999px; }
.meeting-flag svg { width: 13px; height: 13px; }
.call-bar .round.active { background: #f5f7f6; color: #081428; }
.call-bar .round.locked { background: #7f1d1d; color: #fecaca; }
.round .emoji { font-size: 20px; line-height: 1; }
.people-btn { position: relative; }
.count-badge { position: absolute; top: -4px; right: -6px; background: #334155; color: #fff; font-size: 11px; font-weight: 700; padding: 1px 6px; border-radius: 999px; min-width: 18px; }
.people-btn.attention .count-badge { background: #f59e0b; color: #1c1917; animation: recpulse 1.6s infinite; }
.in-lobby .meeting-only { display: none; }
.in-lobby .tiles { display: none; }

.tile-hand { position: absolute; top: 8px; left: 10px; background: #fbbf24; color: #1c1917; font-weight: 700; font-size: 14px; padding: 3px 9px; border-radius: 999px; z-index: 2; }
.tile .who { display: inline-flex; align-items: center; gap: 4px; }
.mic-ind svg { width: 13px; height: 13px; color: #fca5a5; }
.reaction-float { position: absolute; left: 50%; bottom: 40px; font-size: 44px; transform: translateX(-50%); animation: reactfloat 2.6s ease-out forwards; pointer-events: none; z-index: 3; }
@keyframes reactfloat { 0% { opacity: 0; transform: translate(-50%, 20px) scale(.6); } 15% { opacity: 1; transform: translate(-50%, 0) scale(1.1); } 80% { opacity: 1; } 100% { opacity: 0; transform: translate(-50%, -120px) scale(1); } }
.react-pop { position: fixed; z-index: 60; display: flex; gap: 2px; background: #1f2d2a; border: 1px solid #2f3b4f; padding: 6px; border-radius: 14px; box-shadow: 0 10px 30px rgba(0,0,0,.35); }
.react-btn { background: none; border: 0; font-size: 26px; padding: 4px 6px; border-radius: 10px; cursor: pointer; }
.react-btn:hover { background: rgba(255,255,255,.12); }
.react-hand { border-left: 1px solid #2f3b4f; border-radius: 0 10px 10px 0; margin-left: 4px; padding-left: 10px; }
.react-hand.active { background: #fbbf24; }

.people-panel { width: 340px; flex-shrink: 0; background: #ffffff; color: var(--ink); border-left: 1px solid #222c3d; overflow: auto; padding: 14px; display: flex; flex-direction: column; gap: 12px; }
.pp-head { display: flex; align-items: center; gap: 8px; font-size: 15px; }
.pp-actions { display: flex; gap: 6px; flex-wrap: wrap; }
.small-btn { padding: 5px 10px; font-size: 13px; min-height: 0; }
.btn.icon.small-btn { padding: 5px; }
.pp-section { display: flex; flex-direction: column; gap: 2px; }
.pp-title { display: flex; align-items: center; gap: 8px; font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .03em; color: var(--muted, #64748b); padding: 6px 0; }
.pp-row { display: flex; align-items: center; gap: 8px; padding: 6px 4px; border-radius: 8px; }
.pp-row:hover { background: var(--soft, #f1f4f8); }
.pp-name { min-width: 0; font-size: 14px; overflow: hidden; text-overflow: ellipsis; }
.pp-role { font-size: 11px; color: var(--accent, #ec7a1c); font-weight: 600; }
.pp-hand { background: #fef3c7; color: #92400e; font-size: 12px; font-weight: 700; padding: 2px 7px; border-radius: 999px; }
.pp-ico { display: inline-flex; color: var(--muted, #64748b); }
.pp-ico svg { width: 16px; height: 16px; }
.pp-ico.off { color: #dc2626; }

.lobby { position: absolute; inset: 0; display: grid; place-items: center; padding: 20px; }
.lobby-card { width: min(520px, 100%); background: #13211e; border: 1px solid #222c3d; border-radius: 16px; padding: 24px; text-align: center; }
.lobby-card h2 { margin: 14px 0 2px; }
.lobby-room { opacity: .7; margin-bottom: 8px; }
.lobby-card p { margin: 6px 0 12px; line-height: 1.5; }
.lobby-preview { position: relative; aspect-ratio: 16/9; background: #081428; border-radius: 12px; overflow: hidden; }
.lobby-preview video { width: 100%; height: 100%; object-fit: cover; display: block; }
.lobby-preview video.mirror { transform: scaleX(-1); }
.lobby-avatar { position: absolute; inset: 0; display: grid; place-items: center; transform: scale(2); }
.lobby-hint { opacity: .65; margin-top: 10px; }
.lobby-dots { display: flex; justify-content: center; gap: 6px; }
.lobby-dots span { width: 8px; height: 8px; border-radius: 50%; background: #f5a95a; animation: blink 1.2s infinite; }
.lobby-dots span:nth-child(2) { animation-delay: .2s; } .lobby-dots span:nth-child(3) { animation-delay: .4s; }

.call-alerts { position: absolute; top: 10px; right: 14px; display: flex; flex-direction: column; gap: 8px; z-index: 5; max-width: 420px; }
.call-alert { display: flex; align-items: center; gap: 8px; background: #fff; color: #1c2b28; padding: 10px 12px; border-radius: 12px; box-shadow: 0 10px 30px rgba(0,0,0,.3); font-size: 14px; }

@media (max-width: 760px) {
  .people-panel { position: absolute; inset: 0; width: auto; z-index: 20; border-left: 0; }
  .call-main { position: relative; }
  .call-bar { flex-wrap: wrap; gap: 8px; padding: 10px; }
}

/* ---------- Kalender (angelehnt an Teams/Outlook) ---------- */
.seg { display: inline-flex; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; background: #fff; }
.seg button { border: 0; background: none; padding: 7px 12px; font: inherit; font-size: 13px; cursor: pointer; display: inline-flex; align-items: center; gap: 5px; color: inherit; }
.seg button + button { border-left: 1px solid var(--line); }
.seg button.on { background: var(--accent); color: var(--accent-ink); }
.seg button svg { width: 15px; height: 15px; }
.seg.rsvp button.on.rsvp-maybe { background: #d97706; }
.seg.rsvp button.on.rsvp-no { background: #b91c1c; }
.cal-page { display: flex; flex-direction: column; gap: 12px; height: 100%; min-height: 0; }
.cal-head { flex-wrap: wrap; gap: 10px; margin-bottom: 0; }
.cal-nav { gap: 4px; }
.cal-title { margin-left: 8px; font-size: 16px; }
.cal-ev { border: 0; text-align: left; font: inherit; cursor: pointer; background: #edf2ec; color: #26332b; border-left: 3px solid #8aa592; border-radius: 6px; }
.cal-ev.online { background: var(--accent-soft, #fdeedd); border-left-color: var(--accent, #ec7a1c); color: #1d3d6b; }
.cal-ev.pending { background-image: repeating-linear-gradient(135deg, transparent 0 6px, rgba(255,255,255,.55) 6px 12px); outline: 1px dashed currentColor; outline-offset: -1px; }
.cal-ev.maybe { opacity: .85; border-left-style: dashed; }
.cal-ev.declined { opacity: .55; text-decoration: line-through; }
.cal-ev:hover { filter: brightness(.96); }

.cal-week { display: flex; flex-direction: column; flex: 1; min-height: 0; background: #fff; border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
.cal-week-head, .cal-allday, .cal-grid { display: grid; grid-template-columns: 56px repeat(7, minmax(0, 1fr)); }
.cal-week-head { border-bottom: 1px solid var(--line); }
.cal-dayhead { padding: 6px 8px; display: flex; gap: 6px; align-items: baseline; font-size: 13px; color: var(--muted); }
.cal-dayhead strong { font-size: 18px; color: var(--ink); }
.cal-dayhead.today strong { background: var(--accent); color: var(--accent-ink); border-radius: 999px; padding: 0 8px; }
.cal-allday { border-bottom: 1px solid var(--line); }
.cal-allday > div { padding: 3px; display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.cal-gutter { font-size: 11px; color: var(--muted); }
.cal-scroll { flex: 1; overflow: auto; min-height: 260px; }
.cal-hour { height: 48px; text-align: right; padding-right: 6px; transform: translateY(-7px); }
.cal-col { position: relative; border-left: 1px solid var(--line); cursor: copy; }
.cal-col.today { background: #f7fbf7; }
.cal-slot { height: 48px; border-top: 1px solid #eef1f6; pointer-events: none; }
.cal-block { position: absolute; padding: 3px 6px; display: flex; flex-direction: column; overflow: hidden; font-size: 12px; line-height: 1.3; cursor: pointer; }
.cal-block strong { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cal-ico { position: absolute; right: 4px; top: 3px; }
.cal-ico svg { width: 13px; height: 13px; }
.cal-now { position: absolute; left: 0; right: 0; height: 2px; background: #dc2626; pointer-events: none; }
.cal-now::before { content: ''; position: absolute; left: -4px; top: -3px; width: 8px; height: 8px; border-radius: 50%; background: #dc2626; }
.cal-chip { display: block; width: 100%; font-size: 12px; padding: 2px 6px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cal-time { font-weight: 600; margin-right: 4px; }

.cal-month { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); grid-template-rows: auto; grid-auto-rows: minmax(96px, 1fr); flex: 1; background: #fff; border: 1px solid var(--line); border-radius: 12px; overflow: auto; }
.cal-mhead { padding: 6px 8px; font-size: 12px; color: var(--muted); border-bottom: 1px solid var(--line); text-transform: capitalize; min-height: 0; }
.cal-mcell { border-right: 1px solid #eef1f6; border-bottom: 1px solid #eef1f6; padding: 4px; display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.cal-mcell.other { background: #fafbfb; color: #94a3b8; }
.cal-mday { align-self: flex-start; border: 0; background: none; font: inherit; font-size: 13px; font-weight: 600; cursor: pointer; padding: 0 6px; border-radius: 999px; color: inherit; }
.cal-mcell.today .cal-mday { background: var(--accent); color: var(--accent-ink); }
.cal-more { border: 0; background: none; font-size: 12px; color: var(--muted); text-align: left; cursor: pointer; padding: 0 6px; }

.cal-list { display: flex; flex-direction: column; gap: 14px; }
.cal-ldate { font-weight: 700; text-transform: capitalize; margin-bottom: 6px; }
.cal-ldate.today { color: var(--accent-text); }
.cal-lrow { display: flex; gap: 12px; align-items: center; width: 100%; padding: 10px 12px; margin-bottom: 6px; }
.cal-lrow .grow { display: flex; flex-direction: column; min-width: 0; }
.cal-ltime { width: 100px; flex-shrink: 0; font-size: 13px; font-weight: 600; }
.badge.warn { background: #fef3c7; color: #92400e; }
.badge.rsvp-yes { background: #dde8f7; color: #1d3d6b; }
.badge.rsvp-maybe { background: #fef3c7; color: #92400e; }
.badge.rsvp-no { background: #fee2e2; color: #991b1b; }

.cal-detail { gap: 12px; }
.cal-dline { display: flex; gap: 10px; align-items: flex-start; }
.cal-dline > svg { flex-shrink: 0; margin-top: 2px; color: var(--muted); }
.cal-desc { white-space: pre-wrap; background: var(--soft, #f4f6fa); border-radius: 10px; padding: 10px 12px; font-size: 14px; }
.chip-person { display: inline-flex; align-items: center; gap: 5px; font-size: 13px; background: var(--soft, #f4f6fa); border-radius: 999px; padding: 2px 8px 2px 2px; }
.cal-responses summary { cursor: pointer; font-size: 13px; color: var(--accent-text); }
.cal-times { gap: 6px; flex-wrap: wrap; }
.cal-times .input { width: auto; }
.cal-opts { border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; display: flex; flex-direction: column; gap: 8px; background: #fafbfd; }
.cal-people { max-height: 180px; overflow: auto; border: 1px solid var(--line); border-radius: 10px; padding: 6px 10px; margin-top: 6px; display: flex; flex-direction: column; gap: 4px; }

.cal-reminders { position: fixed; right: 16px; bottom: 16px; display: flex; flex-direction: column; gap: 10px; z-index: 80; }
.cal-reminder { width: 300px; background: #fff; border-radius: 14px; box-shadow: 0 14px 40px rgba(0,0,0,.25); padding: 12px 14px; display: flex; flex-direction: column; gap: 8px; border-left: 4px solid var(--accent); }

.upcoming { background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 12px 16px; margin-bottom: 18px; }
.upcoming h3 { margin: 0 0 8px; font-size: 15px; }
.upcoming-row { display: flex; align-items: center; gap: 14px; padding: 8px 0; border-top: 1px solid #eef1f6; }
.upcoming-row:first-of-type { border-top: 0; }
.upcoming-row.live .up-when strong { color: var(--accent-text); }
.up-when { width: 120px; flex-shrink: 0; display: flex; flex-direction: column; font-size: 13px; }

@media (max-width: 760px) {
  .cal-head .seg { order: 5; }
  .cal-ltime { width: 74px; }
  .upcoming-row { flex-wrap: wrap; }
  .up-when { width: auto; }
}

.check > span.cal-person { flex-direction: row; align-items: center; gap: 8px; }

/* ---------- KI-Assistent «Roboter» ---------- */
.bot-dock { position: fixed; right: 18px; bottom: 18px; z-index: 70; display: flex; flex-direction: column; align-items: flex-end; gap: 8px; pointer-events: none; }
.bot-dock > * { pointer-events: auto; }
.bot { position: relative; width: 66px; height: 66px; border: 0; padding: 0; background: none; cursor: grab; filter: drop-shadow(0 6px 14px rgba(0,0,0,.25)); touch-action: none; }
.bot:active { cursor: grabbing; }
.bot-figure { display: inline-flex; }
.bot .bot-svg { transition: transform .2s; }
.bot:hover .bot-svg { transform: translateY(-2px) rotate(-3deg); }
.bot-eye { transform-box: fill-box; transform-origin: center; animation: botblink 4.2s infinite; }
/* Blinzeln wie beim SLH-Roboter: kurz zu, ab und zu doppelt */
@keyframes botblink { 0%, 44%, 50%, 90%, 94%, 97%, 100% { transform: scaleY(1); } 47%, 92%, 95.5% { transform: scaleY(.08); } }
.bot.wave .bot-svg { transform-origin: 50% 85%; animation: botwave .45s ease-in-out 4 alternate; }
@keyframes botwave { from { transform: rotate(-9deg); } to { transform: rotate(9deg); } }
.bot.thinking .bot-dot { animation: botlight .7s steps(2) infinite; }
.bot.thinking .bot-eyes { animation: botlook 1.4s ease-in-out infinite; }
@keyframes botlook { 0%, 100% { transform: translateX(-2.5px); } 50% { transform: translateX(2.5px); } }
.bot.thinking .bot-light { animation: botlight .7s steps(2) infinite; }
@keyframes botlight { 50% { fill: #fff; } }
.bot-badge { position: absolute; top: 2px; right: 2px; width: 14px; height: 14px; border-radius: 50%; background: #ef4444; border: 2px solid #fff; }
.bot-bubble { max-width: 240px; background: #fff; color: var(--ink); border-radius: 14px 14px 4px 14px; padding: 9px 12px; font-size: 13px; line-height: 1.4; box-shadow: 0 8px 24px rgba(0,0,0,.18); cursor: pointer; animation: botpop .25s ease-out; }
@keyframes botpop { from { opacity: 0; transform: translateY(6px) scale(.96); } to { opacity: 1; transform: none; } }
.bot-dock.win-open .bot { opacity: .0; pointer-events: none; }

.bot-win { position: fixed; z-index: 75; background: #fff; color: var(--ink); border-radius: 16px; box-shadow: 0 20px 60px rgba(0,0,0,.3); display: flex; flex-direction: column; overflow: hidden; border: 1px solid var(--line); }
.bot-win.drop { outline: 3px dashed var(--accent); outline-offset: -6px; }
.bot-head { display: flex; align-items: center; gap: 8px; padding: 8px 10px 8px 12px; background: linear-gradient(135deg, #10233f, #1d3d6b); color: #fff; cursor: move; user-select: none; }
.bot-head strong { display: block; font-size: 14px; }
.bot-sub { font-size: 11px; opacity: .8; }
.bot-hbtn { border: 0; background: rgba(255,255,255,.12); color: #fff; border-radius: 8px; padding: 5px 8px; cursor: pointer; font: inherit; font-size: 12px; display: inline-flex; align-items: center; }
.bot-hbtn:hover { background: rgba(255,255,255,.22); }
.bot-hbtn svg { width: 15px; height: 15px; }
.bot-list { flex: 1; overflow: auto; padding: 12px; display: flex; flex-direction: column; gap: 10px; background: #f7f9fc; }
.bot-msg { max-width: 88%; padding: 9px 12px; border-radius: 14px; font-size: 14px; line-height: 1.45; word-wrap: break-word; }
.bot-u { align-self: flex-end; background: var(--accent); color: var(--accent-ink); border-bottom-right-radius: 4px; white-space: pre-wrap; }
.bot-a { align-self: flex-start; background: #fff; border: 1px solid var(--line); border-bottom-left-radius: 4px; }
.bot-a .md p { margin: 0 0 6px; } .bot-a .md p:last-child { margin-bottom: 0; }
.bot-a .md h4 { margin: 8px 0 4px; font-size: 14px; }
.bot-a .md ul, .bot-a .md ol { margin: 2px 0 6px; padding-left: 20px; }
.bot-a .md code { background: var(--soft); padding: 1px 4px; border-radius: 4px; font-size: 12px; }
.bot-a .btn { margin-top: 8px; }
.bot-err { align-self: flex-start; background: #fef2f2; color: #991b1b; border: 1px solid #fecaca; }
.bot-ufiles { display: flex; flex-wrap: wrap; gap: 4px; margin-bottom: 4px; }
.bot-ufiles span { display: inline-flex; align-items: center; gap: 3px; font-size: 12px; background: rgba(255,255,255,.2); border-radius: 6px; padding: 1px 6px; }
.bot-ufiles svg { width: 12px; height: 12px; }
.thinking.bot-msg { display: flex; align-items: center; gap: 8px; color: var(--muted); font-size: 13px; }
.dots { display: inline-flex; gap: 3px; } .dots i { width: 6px; height: 6px; border-radius: 50%; background: #f28c28; animation: blink 1.2s infinite; }
.dots i:nth-child(2) { animation-delay: .2s; } .dots i:nth-child(3) { animation-delay: .4s; }
.bot-hello p { margin: 0 0 8px; font-size: 14px; line-height: 1.45; }
.bot-sugg { display: flex; flex-direction: column; gap: 6px; }
.bot-sugg button { text-align: left; border: 1px solid #c4d6f0; background: #f1f6fd; color: #10233f; border-radius: 10px; padding: 8px 10px; font: inherit; font-size: 13px; cursor: pointer; display: flex; gap: 6px; align-items: center; }
.bot-sugg button:hover { background: #dde8f7; }
.bot-sugg svg { width: 14px; height: 14px; }
.bot-note { display: flex; gap: 10px; background: #fff7ed; border: 1px solid #fed7aa; color: #9a3412; border-radius: 12px; padding: 10px 12px; font-size: 13px; }
.bot-note .btn { margin-top: 8px; }
.bot-prop { align-self: stretch; background: #fffbeb; border: 1px solid #fcd34d; border-radius: 14px; padding: 10px 12px; font-size: 13px; }
.bot-prop.done { background: #f8fafc; border-color: var(--line); opacity: .85; }
.bot-prop-head { display: flex; align-items: center; gap: 8px; margin-bottom: 6px; }
.bot-prop-head svg { width: 16px; height: 16px; color: #a16207; }
.bot-prop-intro { margin: 0 0 8px; font-size: 13px; line-height: 1.45; }
.bot-prop dl { display: grid; grid-template-columns: auto 1fr; gap: 3px 10px; margin: 0 0 8px; }
.bot-prop dt { color: var(--muted); }
.bot-prop dd { margin: 0; white-space: pre-wrap; }
.bot-preview { background: #fff; border: 1px solid #fde68a; border-radius: 10px; padding: 8px 10px; white-space: pre-wrap; margin-bottom: 8px; }
.bot-preview.md { white-space: normal; max-height: 260px; overflow: auto; font-size: 13px; }
.bot-preview.md h1, .bot-preview.md h2, .bot-preview.md h3 { font-size: 14px; margin: 8px 0 4px; }
.bot-preview.md ul, .bot-preview.md ol { margin: 4px 0; padding-left: 20px; }
.bot-prop dd { white-space: pre-line; }
.bot-prop-actions { display: flex; justify-content: flex-end; gap: 6px; }
.btn.bot-apply { background: #facc15; border-color: #eab308; color: #422006; font-weight: 600; }
.btn.bot-apply:hover { background: #fde047; }
.bot-foot { border-top: 1px solid var(--line); padding: 8px; background: #fff; }
.bot-files { display: flex; flex-wrap: wrap; gap: 4px; }
.bot-files:not(:empty) { margin-bottom: 6px; }
.bot-chip { display: inline-flex; align-items: center; gap: 4px; background: var(--soft); border-radius: 8px; padding: 3px 6px 3px 8px; font-size: 12px; max-width: 100%; }
.bot-chip svg { width: 13px; height: 13px; }
.bot-chip button { border: 0; background: none; cursor: pointer; font-size: 15px; line-height: 1; color: var(--muted); }
.bot-row { display: flex; align-items: flex-end; gap: 6px; }
.bot-input { flex: 1; resize: none; border: 1px solid var(--line); border-radius: 12px; padding: 9px 11px; font: inherit; font-size: 14px; max-height: 140px; outline: none; }
.bot-input:focus { border-color: var(--accent); }
.bot-ibtn { border: 0; background: var(--soft); border-radius: 10px; width: 38px; height: 38px; display: grid; place-items: center; cursor: pointer; color: var(--ink); flex-shrink: 0; }
.bot-ibtn:disabled { opacity: .45; cursor: default; }
.bot-send { background: var(--accent); color: var(--accent-ink); }
.bot-resize { position: absolute; right: 0; bottom: 0; width: 18px; height: 18px; cursor: nwse-resize; background: linear-gradient(135deg, transparent 50%, #cbd5e1 50%, #cbd5e1 58%, transparent 58%, transparent 70%, #cbd5e1 70%, #cbd5e1 78%, transparent 78%); }
.bot-orbox { border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; background: #fafbfd; }
.rec-option.disabled { opacity: .5; }

@media (max-width: 760px) {
  .bot-dock { right: 12px; bottom: 76px; }
  .bot { width: 56px; height: 56px; }
  .bot .bot-svg { width: 54px; height: 54px; }
  .bot-win { left: 0 !important; right: 0; bottom: 0; top: auto !important; width: auto !important; height: 62vh !important; border-radius: 16px 16px 0 0; }
  .bot-head { cursor: default; }
  .bot-resize { display: none; }
}

.av-help { display: flex; flex-direction: column; align-items: center; gap: 8px; max-width: 420px; line-height: 1.45; }
.av-help .btn { margin-top: 2px; }

/* Handy: Navigation fest unten angedockt; die Seite selbst scrollt nicht, nur die Inhalte.
   100dvh = sichtbare Höhe (ohne ein- und ausfahrende Adresszeile des Browsers).
   --nav-lift: Safari ab iOS 26 legt seine schwebende Adressleiste über den unteren Rand, ohne das der Seite zu melden –
   dann hebt pwa.js die Leiste um diesen Wert an (in der installierten App und anderswo bleibt er 0). */
:root { --nav-lift: 0px; --bottom-inset: calc(env(safe-area-inset-bottom, 0px) + var(--nav-lift)); }
.shell { height: 100vh; height: 100dvh; }
@media (max-width: 760px) {
  html, body { overflow: hidden; overscroll-behavior: none; }
  .shell { grid-template-rows: minmax(0, 1fr); padding-bottom: calc(64px + var(--bottom-inset)); box-sizing: border-box; }
  .rail { position: fixed; left: 0; right: 0; bottom: 0; z-index: 60; height: calc(64px + var(--bottom-inset));
    padding-bottom: calc(4px + var(--bottom-inset)); box-sizing: border-box; }
  .main { overflow: hidden; }
  .bot-dock { bottom: calc(76px + var(--bottom-inset)); }
  .bot-win { bottom: var(--nav-lift) !important; }
  .page { overflow-x: hidden; }
  /* Reiter (z.B. Verwaltung) in einer Zeile, seitlich wischbar statt umbrochen und abgeschnitten */
  .tabs { overflow-x: auto; scrollbar-width: none; -webkit-overflow-scrolling: touch; }
  .tabs::-webkit-scrollbar { display: none; }
  .tab { white-space: nowrap; flex-shrink: 0; padding: 10px 12px; }
}
.menu { max-height: calc(100dvh - 90px); overflow-y: auto; }
/* Messenger: der Roboter hat seinen festen Platz rechts NEBEN dem Eingabefeld – so deckt er keine Nachrichten ab
   (gilt, solange er nicht von Hand verschoben wurde). Die Sprechblase erscheint im Messenger nicht; neue Antworten zeigt der rote Punkt. */
body:has(.chat .composer) .bot-dock:not([style*="left"]) { bottom: 14px; }
body:has(.bot-dock:not([style*="left"])) .chat .composer { padding-right: 100px; }
body:has(.chat .composer) .bot-bubble { display: none; }
@media (max-width: 760px) {
  body:has(.view.has-active .chat .composer) .bot-dock { bottom: calc(68px + var(--bottom-inset)); right: 8px; }
  body:has(.view.has-active .chat .composer):has(.bot-dock) .chat .composer { padding-right: 72px; }
}

/* Automatisches Abmelden */
.idle-warn { position: fixed; inset: 0; z-index: 200; background: rgba(15,23,42,.35); display: grid; place-items: center; padding: 16px; }
.idle-card { background: #fff; color: var(--ink); border-radius: 16px; box-shadow: 0 20px 60px rgba(0,0,0,.3); padding: 18px 20px; display: flex; gap: 14px; align-items: center; flex-wrap: wrap; max-width: 560px; }
.idle-card > svg { width: 28px; height: 28px; color: var(--accent-text); flex-shrink: 0; }
.idle-card .grow { min-width: 220px; }
.idle-count { font-variant-numeric: tabular-nums; }
.login-notice { display: flex; gap: 8px; align-items: flex-start; background: #f1f6fd; border: 1px solid #c4d6f0; color: #10233f; border-radius: 10px; padding: 10px 12px; font-size: 14px; }
.login-notice svg { flex-shrink: 0; margin-top: 2px; }
.login-remember { margin-top: -4px; }

/* Ruhiges Farbbild: Personen-Kreise in Grüntönen, leicht plastisch wie ein Blatt im Licht */
.avatar { background-image: radial-gradient(circle at 30% 22%, rgba(255,255,255,.30), rgba(255,255,255,0) 58%), linear-gradient(160deg, rgba(255,255,255,0) 40%, rgba(0,0,0,.14));
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.18), 0 1px 2px rgba(16,35,63,.18); text-shadow: 0 1px 1px rgba(0,0,0,.18); letter-spacing: .02em; }
.role-badge { box-shadow: inset 0 0 0 1px rgba(255,255,255,.15); }

/* ---------- Web-App: Installieren & Mitteilungen ---------- */
.pwa-head { gap: 12px; }
.pwa-icon { width: 52px; height: 52px; border-radius: 13px; border: 1px solid var(--line); box-shadow: 0 3px 10px rgba(16,35,63,.12); }
.pwa-steps { margin: 0; padding-left: 22px; display: flex; flex-direction: column; gap: 6px; line-height: 1.45; }
.pwa-push { gap: 14px; }
.pwa-dev { display: flex; flex-direction: column; gap: 10px; background: var(--soft); border-radius: 12px; padding: 12px 14px; }
.pwa-dev-state { font-weight: 600; display: flex; align-items: center; gap: 8px; }
.pwa-dev-state::before { content: ''; width: 9px; height: 9px; border-radius: 50%; background: #9ca3af; flex-shrink: 0; }
.pwa-dev-state.ok::before { background: #2f6fbf; }
.pwa-dev-state.warn { font-weight: 500; color: #92400e; }
.pwa-dev-state.warn::before { background: #f59e0b; }
.pwa-sec { display: flex; flex-direction: column; gap: 6px; }
.pwa-opt { align-items: flex-start; }
.pwa-opt input { margin-top: 3px; }
.pwa-devrow { gap: 8px; font-size: 13px; padding: 4px 0; border-bottom: 1px solid var(--line); }
.pwa-devrow svg { width: 15px; height: 15px; color: var(--muted); }
.pwa-hint { position: fixed; left: 16px; bottom: 16px; z-index: 85; display: flex; align-items: center; gap: 12px; max-width: 460px;
  background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 12px 14px; box-shadow: 0 12px 36px rgba(0,0,0,.18); animation: botpop .25s ease-out; }
.pwa-hint img { width: 44px; height: 44px; border-radius: 11px; flex-shrink: 0; border: 1px solid var(--line); }
.pwa-hint .small { color: var(--muted); margin-top: 2px; line-height: 1.35; }
.pwa-hint-btns { display: flex; gap: 6px; flex-shrink: 0; }
@media (max-width: 760px) {
  .pwa-hint { left: 10px; right: 10px; max-width: none; bottom: calc(74px + var(--bottom-inset)); flex-wrap: wrap; }
  .pwa-hint .grow { flex: 1 1 60%; }
  .pwa-hint-btns { width: 100%; justify-content: flex-end; }
}
/* Als App gestartet: oben Platz für die Statusleiste (iPhone) */
@media (display-mode: standalone) {
  .topbar { padding-top: env(safe-area-inset-top, 0px); height: calc(48px + env(safe-area-inset-top, 0px)); }
}

/* ---------- Grosse Runden über den Videoverteiler ---------- */
.tiles.many { grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); grid-auto-rows: minmax(110px, auto); }
.tile { transition: box-shadow .15s ease; }
.tiles .tile.speaking { box-shadow: 0 0 0 3px #f5a95a, 0 0 16px rgba(242,140,40, .45); }
.tiles.many .tile.spotlight { grid-column: span 2; grid-row: span 2; }
@media (max-width: 760px) { .tiles.many { grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); } .tiles.many .tile.spotlight { grid-column: 1 / -1; } }
.call-bar .round.disabled { opacity: .4; }
.pp-stage-row { display: flex; align-items: center; gap: 6px; }
.pp-stage-row > .pp-row { flex: 1; min-width: 0; }

/* Live-Untertitel */
.captions-holder { position: absolute; left: 0; right: 0; bottom: 14px; display: flex; justify-content: center; pointer-events: none; z-index: 6; }
.captions { max-width: min(92%, 860px); background: rgba(8,16,32, .82); color: #fff; border-radius: 10px; padding: 8px 14px;
  font-size: 18px; line-height: 1.4; box-shadow: 0 4px 18px rgba(0,0,0,.25); }
.cap-line + .cap-line { margin-top: 2px; }
.cap-line strong { color: #9fe0b8; font-weight: 600; }
.cap-line.pending { opacity: .7; font-style: italic; }
.cc { display: inline-block; font-weight: 800; font-size: 11px; line-height: 14px; border: 1.5px solid currentColor; border-radius: 4px; padding: 0 3px; letter-spacing: .5px; }
.call-bar .round.cc-btn.on { background: var(--accent); color: var(--accent-ink); }
.cap-badge { display: inline-flex; align-items: center; gap: 8px; background: rgba(236,122,28,.25); border: 1px solid rgba(250,165,80,.6);
  color: #cdeedb; padding: 5px 12px; border-radius: 999px; font-size: 13px; font-weight: 600; }
@media (max-width: 760px) {
  .captions { font-size: 15px; padding: 6px 10px; max-width: 100%; }
  .captions-holder { bottom: 8px; padding: 0 68px 0 8px; }   /* rechts Platz für den Roboter */
  .cap-badge { font-size: 12px; padding: 3px 8px; white-space: nowrap; }
  .cap-line:not(:nth-last-child(-n+2)) { display: none; }   /* Handy: nur die letzten zwei Zeilen */
}
/* Während eines Calls keinen Installationshinweis über den Anruf-Knöpfen */
body:has(.call) .pwa-hint { display: none; }
/* Tabellen in Assistent-Antworten und Vorschauen */
.md-table { overflow-x: auto; margin: 6px 0 8px; }
.md-table table { border-collapse: collapse; font-size: 12.5px; min-width: 100%; }
.md-table th, .md-table td { border: 1px solid #d4e3d9; padding: 3px 6px; text-align: left; vertical-align: top; white-space: normal; }
.md-table th { background: #fdeedd; color: #1f3a2b; font-weight: 600; }
.md li.sub { margin-left: 16px; list-style-type: circle; }
/* Funktionswünsche (Verwaltung) */
.wish { display: flex; gap: 14px; align-items: flex-start; padding: 12px 0; border-bottom: 1px solid var(--line); }
.wish:last-child { border-bottom: none; }
.wish .wish-main { flex: 1; min-width: 0; }
.wish .wish-text { font-weight: 600; margin-bottom: 2px; }
.wish .wish-req { font-size: 13px; color: var(--muted); font-style: italic; margin: 2px 0 4px; }
.wish .wish-note { font-size: 13px; margin-top: 4px; padding: 6px 8px; background: var(--soft); border-radius: 8px; }
.wish-status { font-size: 12px; padding: 2px 8px; border-radius: 999px; background: var(--soft); white-space: nowrap; }
.wish-status.neu { background: #fdf3d7; color: #8a5a12; }
.wish-status.geplant { background: #fdeedd; color: #ec7a1c; }
.wish-status.umgesetzt { background: #ec7a1c; color: #fff; }
.wish-status.abgelehnt { background: #eceeed; color: #5f6b63; }
/* Ablage: Auswahl und Zielordner-Wahl */
.file-check { width: 16px; height: 16px; accent-color: var(--accent); flex-shrink: 0; cursor: pointer; }
.selbar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 8px 12px; margin: -6px 0 10px; background: #fdeedd; border-radius: 10px; }
.selbar.quiet { background: transparent; padding: 0 4px; margin: -8px 0 6px; }
.selbar .check { display: inline-flex; align-items: center; gap: 6px; cursor: pointer; }
.picker-list { max-height: 46vh; overflow: auto; border: 1px solid var(--line); border-radius: 10px; padding: 4px; }
.picker-head { font-size: 12px; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); padding: 8px 8px 4px; }
.picker-item { display: flex; align-items: center; gap: 10px; width: 100%; text-align: left; border: 0; background: none; padding: 6px 8px; border-radius: 8px; cursor: pointer; font: inherit; color: inherit; }
.picker-item:hover { background: var(--soft); }
.picker-item.active { background: #fdeedd; outline: 2px solid #ec7a1c; }
.picker-item .file-ico { width: 28px; height: 28px; }
.picker-path { font-weight: 500; }

/* Breite Tabellen scrollen in sich, nicht die ganze Seite (sonst verschiebt sich auf Handy und Tablet alles seitlich) */
.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; border-radius: var(--radius); }
.table-wrap > .table { min-width: 100%; }
/* Handy quer und andere niedrige Bildschirme mit Seitenleiste: Leiste kompakt (nur Symbole) und notfalls scrollbar */
@media (min-width: 761px) and (max-height: 560px) {
  .rail { overflow-y: auto; padding: 6px 0; gap: 2px; scrollbar-width: none; }
  .rail::-webkit-scrollbar { display: none; }
  .rail .nav { font-size: 0; padding: 7px 0; }
  .rail .nav .count { font-size: 10px; }
  .rail .me { width: 36px; height: 36px; flex-shrink: 0; }
}

/* Handy: keine seitlich scrollenden Tabellen – jede Zeile wird eine Karte (erste Spalte oben, der Rest darunter in einer Zeile) */
@media (max-width: 760px) {
  .table-wrap { overflow-x: visible; }
  .table-wrap > .table { min-width: 0; }
  .table, .table tbody { display: block; width: 100%; }
  .table thead { display: none; }
  .table tr { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 12px; padding: 10px 12px; border-bottom: 1px solid var(--line); }
  .table tr:last-child { border-bottom: 0; }
  .table td { display: block; border: 0 !important; padding: 0 !important; min-width: 0; overflow-wrap: anywhere; font-size: 13px; color: var(--muted); }
  .table td:first-child { flex: 1 1 100%; font-size: 14px; color: inherit; }
  .table td:empty { display: none; }
  .table td:last-child:not(:first-child) { margin-left: auto; }
  .table td .ellipsis { white-space: normal; }
  .table td select.input { width: auto; max-width: 100%; }
  /* iPhone zoomt beim Tippen in Felder mit weniger als 16 px Schrift hinein – danach ist die Ansicht zu breit */
  input, select, textarea, .input, .bot-input, .composer textarea { font-size: 16px !important; }
}
@media (max-width: 760px) {
  .roles-bar { flex-wrap: wrap; }
  .roles-bar > .grow { flex: 1 1 100%; }
  .role-group { padding: 8px 12px; margin-bottom: 10px; }
  .role-group-head { font-size: 12px; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); padding: 4px 0 6px; }
  .role-perm { display: flex; align-items: center; gap: 10px; padding: 8px 0; border-top: 1px solid var(--line); font-size: 14px; }
  .role-perm input { width: 20px; height: 20px; accent-color: var(--accent); flex-shrink: 0; }
  .role-perm.off { color: var(--muted); }
  /* Ablage-Kopf: Pfad eigene Zeile, Suche volle Breite */
  .page-head { flex-wrap: wrap; }
  .page-head .crumbs { flex: 1 1 100%; }
  .page-head > input.input { flex: 1 1 100%; width: 100% !important; }
}
/* «Aus der Ablage senden» im Messenger */
.ab-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(104px, 1fr)); gap: 8px; max-height: min(52vh, 440px); overflow-y: auto; padding: 2px; }
.ab-tile { position: relative; display: flex; flex-direction: column; gap: 4px; padding: 6px; border: 1px solid var(--line); border-radius: 10px; background: var(--panel, #fff); cursor: pointer; text-align: left; font: inherit; color: inherit; min-width: 0; }
.ab-tile:hover { border-color: var(--accent); }
.ab-tile.on { border-color: var(--accent); box-shadow: 0 0 0 2px var(--accent) inset; }
.ab-thumb { display: flex; align-items: center; justify-content: center; aspect-ratio: 1; border-radius: 6px; background: var(--bg, #f4f4f2); overflow: hidden; color: var(--muted); }
.ab-thumb img { width: 100%; height: 100%; object-fit: cover; }
.ab-tile.folder .ab-thumb { color: #b7791f; background: #fdf3dc; }
.ab-name { font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ab-check { position: absolute; top: 10px; right: 10px; width: 22px; height: 22px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 13px; font-weight: 700; background: rgba(255,255,255,.9); border: 1px solid var(--line); color: #fff; }
.ab-tile.on .ab-check { background: var(--accent); border-color: var(--accent); }
.ab-tile.folder .ab-check { display: none; }
@media (max-width: 760px) { .ab-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); max-height: 50vh; } }
.toast a { color: #a8e6c9; text-decoration: underline; cursor: pointer; }
.top-home { display: flex; align-items: center; gap: 12px; min-width: 0; color: inherit; text-decoration: none; cursor: pointer; border-radius: 6px; }
.top-home:hover .top-logo { opacity: .85; }
.top-home:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
/* Chat im Videomeeting */
.meet-chat { overflow: hidden; gap: 8px; }
.mc-list { flex: 1; min-height: 0; overflow-y: auto; display: flex; flex-direction: column; gap: 8px; padding: 2px 2px 4px; }
.mc-empty { padding: 16px 4px; text-align: center; }
.mc-msg { background: var(--soft, #f1f4f8); border-radius: 10px; padding: 8px 10px; font-size: 14px; }
.mc-msg.mine { background: #fbe6d0; }
.mc-msg.private { background: #fff4e0; box-shadow: inset 3px 0 0 #d97706; }
.mc-meta { display: flex; gap: 2px; font-size: 12px; color: var(--muted, #64748b); margin-bottom: 2px; min-width: 0; }
.mc-meta strong { color: var(--ink, #17202e); }
.mc-text { white-space: pre-wrap; overflow-wrap: anywhere; }
.mc-tr { margin-top: 4px; padding-top: 4px; border-top: 1px dashed var(--line); font-size: 13px; color: var(--muted, #475569); white-space: pre-wrap; }
.mc-acts { display: flex; gap: 12px; margin-top: 4px; }
.link-btn { background: none; border: 0; padding: 0; color: var(--accent-text); cursor: pointer; font: inherit; font-size: 12px; }
.link-btn:hover { text-decoration: underline; }
.mc-compose { display: flex; flex-direction: column; gap: 6px; border-top: 1px solid var(--line); padding-top: 8px; }
.mc-torow, .mc-moderow { display: flex; align-items: center; gap: 8px; }
.mc-torow .input, .mc-moderow .input { flex: 1; min-width: 0; padding: 6px 8px; }
.mc-torow.private .input { border-color: #d97706; background: #fffaf0; }
.mc-inrow { display: flex; gap: 6px; align-items: flex-end; }
.mc-input { flex: 1; min-width: 0; resize: none; max-height: 120px; overflow-y: hidden; line-height: 1.4; }
.mc-hint { font-size: 11px; }
.mc-toast { cursor: pointer; }
.chat-btn.attention .count-badge { background: #f59e0b; color: #1c1917; }
.as-btn { border: 0; cursor: pointer; font: inherit; }
button.pp-ico.as-btn { background: none; padding: 2px; border-radius: 6px; }
button.pp-ico.as-btn:hover { background: #e2e8e5; color: var(--ink); }
button.pp-hand.as-btn:hover { background: #fde68a; }
.tile-hand.as-btn { cursor: pointer; pointer-events: auto; }
.tile-mod { position: absolute; top: 8px; right: 8px; z-index: 3; width: 32px; height: 32px; border-radius: 50%; border: 0; background: rgba(0,0,0,.55); color: #fff; display: flex; align-items: center; justify-content: center; cursor: pointer; opacity: .85; }
.tile-mod:hover { opacity: 1; background: rgba(0,0,0,.75); }
.tile-mod svg { width: 18px; height: 18px; }
@media (hover: hover) { .tile .tile-mod { opacity: 0; } .tile:hover .tile-mod, .tile-mod:focus-visible { opacity: .9; } }
/* Seitenleiste im Meeting offen: Assistent nicht über Chat/Teilnehmende legen */
@media (min-width: 761px) { body:has(.call-main > .people-panel:not(.hidden)) .bot-dock { right: 362px; } }
@media (max-width: 760px) { body:has(.call-main > .people-panel:not(.hidden)) .bot-dock { display: none; } }
.call-tools { display: flex; gap: 8px; padding: 0 20px 4px; }
.call-tools .round { width: 38px; height: 38px; }
.call-tools .round svg { width: 18px; height: 18px; }
.call-tools .t-glyph { font-size: 17px; }
.in-lobby .call-tools { display: none; }
@media (max-width: 760px) { .call-tools { padding: 0 12px 4px; } }
/* Bildansicht in der App */
.lightbox { position: fixed; inset: 0; z-index: 300; background: rgba(8,11,18, .94); display: flex; flex-direction: column; color: #fff;
  padding: env(safe-area-inset-top, 0px) env(safe-area-inset-right, 0px) env(safe-area-inset-bottom, 0px) env(safe-area-inset-left, 0px); animation: pop .12s ease-out; }
.lb-bar { display: flex; align-items: center; gap: 10px; padding: 10px 12px 10px 18px; min-height: 56px; }
.lb-title { font-size: 14px; opacity: .9; min-width: 0; }
.lb-count { font-size: 13px; opacity: .7; }
.lb-btn { width: 44px; height: 44px; border-radius: 50%; border: 0; background: rgba(255,255,255,.12); color: #fff; display: grid; place-items: center; cursor: pointer; flex-shrink: 0; }
.lb-btn:hover { background: rgba(255,255,255,.22); }
.lb-btn svg { width: 22px; height: 22px; }
.lb-stage { flex: 1; min-height: 0; position: relative; display: flex; align-items: center; justify-content: center; padding: 8px 16px 24px; }
.lb-img { max-width: 100%; max-height: 100%; object-fit: contain; border-radius: 6px; user-select: none; -webkit-user-drag: none; }
.lb-nav { position: absolute; top: 50%; transform: translateY(-50%); width: 48px; height: 48px; border-radius: 50%; border: 0; background: rgba(255,255,255,.14); color: #fff; font-size: 30px; line-height: 1; cursor: pointer; }
.lb-nav:hover { background: rgba(255,255,255,.26); }
.lb-nav.prev { left: 14px; } .lb-nav.next { right: 14px; }
@media (max-width: 760px) { .lb-nav { width: 40px; height: 40px; font-size: 26px; } .lb-nav.prev { left: 6px; } .lb-nav.next { right: 6px; } .lb-stage { padding: 4px 4px 16px; } }
.lb-extra { display: contents; }
.lb-btn.lb-wide { width: auto; padding: 0 16px 0 12px; border-radius: 22px; gap: 8px; display: inline-flex; align-items: center; font: inherit; font-size: 14px; }
.lb-btn:disabled { opacity: .5; cursor: default; }
@media (max-width: 760px) { .lb-btn.lb-wide span { display: none; } .lb-btn.lb-wide { width: 44px; padding: 0; justify-content: center; } }
/* Virtueller Hintergrund: Auswahl */
.bg-pick { display: grid; grid-template-columns: repeat(auto-fill, minmax(92px, 1fr)); gap: 8px; }
.bg-item { display: flex; flex-direction: column; gap: 4px; padding: 4px; border: 2px solid transparent; border-radius: 10px; background: none; cursor: pointer; font: inherit; color: inherit; text-align: center; }
.bg-item:hover { background: var(--soft, #f1f4f8); }
.bg-item.active { border-color: var(--accent); }
.bg-thumb { width: 100%; aspect-ratio: 16/9; border-radius: 6px; object-fit: cover; display: grid; place-items: center; background: #e7ece9; color: var(--muted); border: 1px solid var(--line); }
.bg-thumb svg { width: 20px; height: 20px; }
.bg-thumb.blur { background: radial-gradient(circle at 30% 40%, #b9c9c0, #6f7f96 70%); color: #fff; filter: saturate(.8); }
.bg-thumb.blur.strong { background: radial-gradient(circle at 50% 50%, #c9d6cf, #8aa395 60%, #6f7f96); }
.bg-label { font-size: 11px; line-height: 1.2; color: var(--muted); }
.bg-upload { grid-column: 1 / -1; justify-self: start; }
/* Bildschirm teilen (wie Zoom): Bildschirm gross, Kameras als Leiste */
.tile.screen video { object-fit: contain !important; background: #000; }
.screen-stage { flex: 1; min-width: 0; min-height: 0; display: flex; padding: 10px 0 10px 20px; }
.screen-stage .tile { width: 100%; height: 100%; aspect-ratio: auto; }
.stage.presenting .tiles { flex: 0 0 260px; grid-template-columns: 1fr !important; grid-auto-rows: auto; align-content: start; padding: 10px 20px 10px 10px; }
.stage.presenting .tiles .tile.spotlight { grid-column: auto; grid-row: auto; }
.tile.share-self { display: grid; place-items: center; background: #183229; border: 1px dashed #3f7a5f; }
.share-card { display: flex; flex-direction: column; align-items: center; gap: 6px; text-align: center; padding: 10px; color: #d5dfee; }
.share-card svg { width: 26px; height: 26px; color: #6ee7b7; }
.share-card .small { opacity: .8; max-width: 220px; }
@media (max-width: 760px) {
  .stage.presenting { flex-direction: column; }
  .screen-stage { padding: 8px 10px 4px; }
  .stage.presenting .tiles { flex: 0 0 auto; display: flex; overflow-x: auto; padding: 4px 10px 8px; }
  .stage.presenting .tiles .tile { flex: 0 0 140px; }
  .tile.share-self .share-card .small { display: none; }
}
/* «Fehler oder Idee melden» */
.top-feedback { margin-left: auto; display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; border: 1px solid var(--line); border-radius: 999px; background: var(--panel); color: var(--ink, #17202e); font: inherit; font-size: 13px; cursor: pointer; flex-shrink: 0; }
.top-feedback:hover { border-color: var(--accent); color: var(--accent-text); }
.top-feedback svg { width: 16px; height: 16px; }
@media (max-width: 760px) { .top-feedback span { display: none; } .top-feedback { padding: 6px; } }
.fb-kinds { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.fb-kind { display: flex; align-items: center; justify-content: center; gap: 8px; padding: 12px; border: 2px solid var(--line); border-radius: 10px; background: var(--panel); font: inherit; font-weight: 600; cursor: pointer; color: inherit; }
.fb-kind svg { width: 20px; height: 20px; }
.fb-kind.active { border-color: var(--accent); background: #fdf1e4; color: var(--accent-text); }
.fb-shot { position: relative; margin-top: 8px; max-width: 320px; }
.fb-shot img { width: 100%; border-radius: 8px; border: 1px solid var(--line); display: block; }
.fb-shot-x { position: absolute; top: 6px; right: 6px; background: rgba(255,255,255,.9) !important; }
.fb-ctx summary { cursor: pointer; font-size: 13px; color: var(--muted); }
.fb-ctx pre { max-height: 220px; overflow: auto; font-size: 11px; background: #f6f7fa; border: 1px solid var(--line); border-radius: 8px; padding: 10px; white-space: pre-wrap; overflow-wrap: anywhere; }
.fb-privacy { display: flex; gap: 8px; align-items: flex-start; background: #f6f7fa; border-radius: 8px; padding: 8px 10px; }
.fb-privacy svg { width: 16px; height: 16px; flex-shrink: 0; margin-top: 1px; }
.fb-item { display: flex; flex-direction: column; gap: 8px; }
.fb-text { white-space: pre-wrap; overflow-wrap: anywhere; }
.fb-badge { display: inline-flex; align-items: center; gap: 4px; font-size: 12px; font-weight: 700; padding: 2px 8px; border-radius: 999px; }
.fb-badge svg { width: 14px; height: 14px; }
.fb-badge.fehler { background: #fde8e8; color: #b42318; }
.fb-badge.idee { background: #fef3c7; color: #92400e; }
.fb-thumb { max-width: 260px; max-height: 160px; object-fit: cover; border-radius: 8px; border: 1px solid var(--line); cursor: zoom-in; }
/* Ablage: «Im Assistenten bearbeiten» – Vorschläge */
.ai-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.ai-chip { border: 1px solid var(--line); background: var(--panel); border-radius: 999px; padding: 6px 12px; font: inherit; font-size: 13px; cursor: pointer; color: inherit; text-align: left; }
.ai-chip:hover { border-color: var(--accent); color: var(--accent-text); background: #fdf1e4; }
/* Assistent: Auftragsbuch */
.bot-queue { border: 1px dashed var(--line); border-radius: 12px; padding: 8px 10px; background: #fafbfc; display: flex; flex-direction: column; gap: 4px; }
.bot-queue-head { display: flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 600; color: var(--muted); }
.bot-queue-head svg { width: 14px; height: 14px; }
.bot-queue-item { display: flex; align-items: center; gap: 8px; font-size: 13px; }
.bot-queue-n { width: 20px; height: 20px; border-radius: 50%; background: #fbe6d0; color: var(--accent-text); font-size: 11px; font-weight: 700; display: grid; place-items: center; flex-shrink: 0; }

/* Ablage: Ordner anordnen (nur Admins) */
.arrange-hint { margin: -8px 0 14px; }
.table tr.arrange-row, .table tr.arrange-row td { background: #fffdf7; }
.table tr.arrange-row { cursor: grab; }
.table tr.arrange-row.dragging { opacity: .45; }
.table tr.arrange-row.drop-before td { box-shadow: inset 0 3px 0 var(--accent); }
.table tr.arrange-row.drop-after td { box-shadow: inset 0 -3px 0 var(--accent); }
.drag-grip { color: var(--muted); cursor: grab; display: inline-flex; }
@media (max-width: 760px) { .table tr.arrange-row td:nth-child(n+2):not(:last-child) { display: none; } }

/* Ablage: Zugriff für Rollen und Personen */
.access-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; align-items: start; }
.access-box { border: 1px solid var(--line); border-radius: 10px; padding: 12px 14px; display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.access-label { font-size: 12px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .03em; margin-top: 10px; }
.access-inherit { margin-top: 10px; display: flex; flex-wrap: wrap; gap: 4px; align-items: center; }
.person-chips { display: flex; flex-wrap: wrap; gap: 6px; margin: 4px 0 6px; }
.person-chip { display: inline-flex; align-items: center; gap: 5px; background: #eef4f0; color: #1f3d2c; border-radius: 999px; padding: 2px 8px 2px 3px; font-size: 12px; font-weight: 600; }
.person-chip .avatar.sm { width: 20px; height: 20px; font-size: 9px; }
.person-chip button { border: 0; background: transparent; cursor: pointer; font-size: 15px; line-height: 1; color: #4b5d52; padding: 0 0 0 2px; }
.row .person-chip > span:first-child svg { width: 12px; height: 12px; }
.person-search { position: relative; }
.person-results { position: absolute; left: 0; right: 0; top: calc(100% + 4px); background: #fff; border: 1px solid var(--line); border-radius: 10px; box-shadow: 0 8px 24px rgba(0,0,0,.12); z-index: 20; max-height: 260px; overflow: auto; padding: 4px; }
.person-hit { display: flex; align-items: center; gap: 8px; width: 100%; border: 0; background: transparent; padding: 7px 8px; border-radius: 8px; cursor: pointer; text-align: left; font: inherit; }
.person-hit:hover { background: #f2f5f3; }
@media (max-width: 760px) { .access-grid { grid-template-columns: 1fr; } }

/* Videoräume: Teilnehmende und Knöpfe bei allen Karten unten auf gleicher Höhe */
.room-card .room-people { margin-top: auto; }
.room-card.arranging { cursor: grab; background: #fffdf7; }
.room-card.dragging { opacity: .45; }
.room-card.drop-before { box-shadow: inset 4px 0 0 var(--accent); }
.room-card.drop-after { box-shadow: inset -4px 0 0 var(--accent); }

/* Verwaltung: Reihenfolge der Rollen */
.role-order { max-width: 640px; gap: 0; padding: 12px 14px; }
.role-order-row { display: flex; align-items: center; gap: 10px; padding: 8px 6px; border-top: 1px solid var(--line); cursor: grab; background: var(--panel); }
.role-order-row.dragging { opacity: .45; }
.role-order-row.drop-before { box-shadow: inset 0 3px 0 var(--accent); }
.role-order-row.drop-after { box-shadow: inset 0 -3px 0 var(--accent); }

/* Messenger: eigene Reihenfolge der Kanäle und Direktnachrichten */
.side-item.sorting { cursor: grab; gap: 6px; padding: 3px 4px 3px 6px; background: #fffdf7; margin-bottom: 2px; }
.side-item.sorting.dragging { opacity: .45; }
.side-item.sorting.drop-before { box-shadow: inset 0 3px 0 var(--accent); }
.side-item.sorting.drop-after { box-shadow: inset 0 -3px 0 var(--accent); }
.btn.icon.tiny { width: 26px; height: 26px; padding: 0; }
.side-section .btn.icon.on { color: var(--accent-text); background: var(--accent-soft); }

/* Office-Editor (Word, Excel, PowerPoint) im Vollbild */
.office-overlay { position: fixed; inset: 0; z-index: 300; background: var(--panel); display: flex; flex-direction: column; }
.office-bar { display: flex; align-items: center; gap: 10px; padding: 8px 14px; border-bottom: 1px solid var(--line); min-height: 52px; }
.office-body { flex: 1; min-height: 0; }
.office-body > div, .office-body iframe { width: 100%; height: 100%; border: 0; display: block; }
body.office-open { overflow: hidden; }
@media (max-width: 760px) { .office-hint { display: none; } .office-bar { padding: 6px 10px; } }

/* Videochat: Dokument aus der Ablage zeigen (Steuerung für die vortragende Person) */
.stage { position: relative; }
.present-panel { position: absolute; left: 12px; bottom: 12px; width: min(420px, calc(100% - 24px)); z-index: 6; background: rgba(16,22,34,.92); color: #fff;
  border-radius: 12px; box-shadow: 0 8px 30px rgba(0,0,0,.35); overflow: hidden; }
.present-preview canvas { display: block; width: 100%; height: auto; aspect-ratio: 16 / 9; background: #1f2531; }
.present-ctrl { display: flex; align-items: center; gap: 6px; padding: 6px 8px; }
.present-ctrl .btn.ghost { color: #fff; }
.present-ctrl .btn.ghost:disabled { opacity: .35; background: transparent; }
.present-count { font-variant-numeric: tabular-nums; font-weight: 600; min-width: 56px; text-align: center; }
@media (max-width: 760px) { .present-panel { left: 8px; right: 8px; width: auto; bottom: 8px; } }

/* Auswahl «Aus der Ablage zeigen»: Liste mit vollem Dateinamen */
.pick-list { display: flex; flex-direction: column; gap: 2px; max-height: min(52vh, 460px); overflow: auto; border: 1px solid var(--line); border-radius: 10px; padding: 4px; }
.pick-row { display: flex; align-items: center; gap: 10px; width: 100%; text-align: left; border: 0; background: transparent; padding: 8px 10px; border-radius: 8px; cursor: pointer; font: inherit; color: var(--ink); }
.pick-row:hover { background: var(--soft); }
.pick-row.on { background: var(--accent-soft); box-shadow: inset 0 0 0 2px var(--accent); }
.pick-name { flex: 1; min-width: 0; overflow-wrap: anywhere; word-break: break-word; line-height: 1.3; }
.pick-meta { display: block; margin-top: 2px; }
.pick-check { color: var(--accent-text); width: 18px; display: inline-flex; }
.pick-row .file-ico { flex-shrink: 0; }

/* Eigene Reihenfolge der Navigation */
.nav-order { display: flex; flex-direction: column; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; }
.nav-order-row { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-top: 1px solid var(--line); background: var(--panel); cursor: grab; }
.nav-order-row:first-child { border-top: 0; }
.nav-order-row.dragging { opacity: .45; }
.nav-order-row.drop-before { box-shadow: inset 0 3px 0 var(--accent); }
.nav-order-row.drop-after { box-shadow: inset 0 -3px 0 var(--accent); }
.nav-order-ico { display: inline-flex; width: 30px; height: 30px; align-items: center; justify-content: center; border-radius: 8px; background: var(--soft); color: var(--accent-text); }

/* Passwort anzeigen (Auge) */
.pw-wrap { position: relative; display: block; width: 100%; }
.pw-wrap > input { width: 100%; padding-right: 42px; }
.pw-eye { position: absolute; right: 4px; top: 50%; transform: translateY(-50%); width: 34px; height: 34px; border: 0; background: transparent;
  color: var(--muted); border-radius: 8px; display: inline-flex; align-items: center; justify-content: center; cursor: pointer; }
.pw-eye:hover { background: var(--soft); color: var(--ink); }
.pw-eye svg { width: 18px; height: 18px; }
input::-ms-reveal { display: none; }

/* ---------- Angedocktes Meeting (weiter zuhören in anderen Bereichen) ---------- */
.call-dock { position: fixed; right: 18px; bottom: 96px; /* über dem Assistenten-Roboter */ z-index: 950; width: 360px; background: #14130f; border-radius: 12px; overflow: hidden;
  box-shadow: 0 10px 36px rgba(0, 0, 0, .35); color: #fff; }
.call-dock-stage { position: relative; width: 360px; height: 203px; overflow: hidden; cursor: pointer; }
.call-dock-stage > .view.mini { position: absolute; left: 0; top: 0; width: 1280px; height: 720px; transform: scale(.28125); transform-origin: 0 0; pointer-events: none; }
.call-dock-stage > .view.mini .call-bar, .call-dock-stage > .view.mini .call-tools { visibility: hidden; }
.call-dock-bar { display: flex; align-items: center; gap: 6px; padding: 6px 8px; background: #1f1d19; }
.call-dock-bar .round { width: 34px; height: 34px; }
.call-dock-bar .round.off { background: #b4321f; }
.call-dock-name { font-size: 12px; display: inline-flex; align-items: center; gap: 6px; }
.call-dock-name .rec-dot { width: 8px; height: 8px; border-radius: 50%; background: #4caf50; flex-shrink: 0; }
@media (max-width: 700px) {
  .call-dock { width: 240px; right: 10px; bottom: 76px; }
  .call-dock-stage { width: 240px; height: 135px; }
  .call-dock-stage > .view.mini { transform: scale(.1875); }
}

/* Mini-Meeting verschiebbar (11.11.2026) */
.call-dock { touch-action: none; }
.call-dock-bar { cursor: grab; }
.call-dock.zieht, .call-dock.zieht * { cursor: grabbing !important; user-select: none; }
.call-dock.zieht { box-shadow: 0 14px 40px rgba(0,0,0,.45); }

/* Assistent im Meeting ausgeblendet (Alexander, 11.11.2026) – im verkleinerten Meeting (Dock) ist er wieder da */
body:has(#app .call) .bot-dock { display: none; }

/* Meeting-Ansichten wie Zoom (11.11.2026): Sprecher gross, die anderen als Leiste; eigenes Bild ausblenden; angeheftet */
.tiles > .tile.selbst-aus { display: none !important; }
.tiles.ansicht-sprecher { display: flex; flex-wrap: wrap; align-content: flex-start; align-items: flex-start; gap: 8px; padding: 10px 20px; }
.tiles.ansicht-sprecher > .tile { flex: 0 0 168px; width: 168px; height: 95px; aspect-ratio: auto; grid-column: auto; grid-row: auto; }
.tiles.ansicht-sprecher > .tile.haupt { order: -1; flex: 1 1 100%; width: 100%; height: calc(100% - 103px); min-height: 180px; }
.tiles.ansicht-sprecher.allein > .tile.haupt { height: 100%; }
.tiles.ansicht-sprecher > .tile:not(.haupt) .placeholder > div { transform: scale(1) !important; }
.tiles.ansicht-sprecher > .tile:not(.haupt) .who { font-size: 11px; }
.tiles.ansicht-sprecher > .tile.haupt video { object-fit: contain; background: #000; }
.tile.angeheftet::before { content: '📌'; position: absolute; top: 8px; right: 10px; z-index: 3; font-size: 15px; }
.stage.presenting .tiles.ansicht-sprecher { display: grid; }
.stage.presenting .tiles.ansicht-sprecher > .tile { width: auto; height: auto; aspect-ratio: 16/9; order: 0; flex: none; }
@media (max-width: 760px) {
  .tiles.ansicht-sprecher { padding: 6px 8px; }
  .tiles.ansicht-sprecher > .tile { flex-basis: 110px; width: 110px; height: 62px; }
  .tiles.ansicht-sprecher > .tile.haupt { height: calc(100% - 70px); }
}

/* Meeting-Uhr (11.11.2026) */
.meet-uhr { display: inline-flex; align-items: center; gap: 6px; margin-left: 10px; padding: 3px 10px; border-radius: 999px; background: rgba(255,255,255,.08); font-size: 13px; font-variant-numeric: tabular-nums; color: inherit; }
.meet-uhr svg { width: 14px; height: 14px; opacity: .75; }
.meet-uhr .mu-trenn { opacity: .5; }
.meet-uhr .mu-dauer { font-weight: 600; }
@media (max-width: 760px) { .meet-uhr { margin-left: 6px; padding: 2px 8px; font-size: 12px; } }

/* Meeting-Chat: Zwischenablage, Bilder (11.11.2026, aus Finestead) */
.mc-anhang { display: flex; align-items: flex-start; gap: 6px; margin-bottom: 6px; }
.mc-anhang img { max-height: 90px; max-width: 70%; border-radius: 6px; border: 1px solid var(--line); }
.mc-bild { display: block; max-width: 100%; max-height: 220px; margin-top: 4px; border-radius: 8px; cursor: zoom-in; border: 1px solid var(--line); }

/* Family & Friends Hub – Orange und Dunkelblau */
.rail .nav.active { color: #fff; background: rgba(242,140,40,.18); }
.rail .nav.active::before { content: ""; position: absolute; left: -6px; top: 10px; bottom: 10px; width: 3px; border-radius: 3px; background: var(--orange); }
.rail .nav.active svg { color: var(--orange); }
.logo { background: linear-gradient(135deg, #f28c28, #d9650f); }
.btn.primary { font-weight: 600; }
.e2e-badge { background: #e8eef8; color: #1d3d6b; } @media (max-width: 760px) { .e2e-badge { display: none; } }
/* Nur Emojis (1–3) gross wie bei WhatsApp */
.msg .text.emoji-only { line-height: 1.15; margin: 2px 0; }
.msg .text.emoji-1 { font-size: 48px; }
.msg .text.emoji-2 { font-size: 40px; }
.msg .text.emoji-3 { font-size: 34px; }
/* Familienbereiche im Messenger */
.side-section.group-section { color: var(--accent-text); font-weight: 700; }
.side-item.subchat { padding-left: 26px; }
/* Animierte Emojis und «bearbeitet» */
.emoji-anim { display: inline-block; vertical-align: middle; cursor: pointer; }
.msg .edited { margin-left: 2px; font-size: 11px; }
.msg .tools { display: flex; gap: 2px; }

/* Design-Umschalter (Admins) und Begrüssung der Anmeldeseite – die Begrüssung zeigt nur das peppige Design (pep.css) */
.login-hello { display: none; }
.top-design { display: inline-grid; place-items: center; width: 32px; height: 32px; border: 1px solid var(--line); border-radius: 50%; background: var(--panel); color: var(--ink); cursor: pointer; flex-shrink: 0; }
.top-design:hover { border-color: var(--accent); color: var(--accent-text); }
.top-design svg { width: 16px; height: 16px; }
.check > span.avatar { display: inline-grid; }   /* Personen-Kreis in Auswahllisten: Initialen mittig */
/* Termin: Von … bis … (auch mehrtägig, z.B. Ferien) */
.cal-span { display: grid; grid-template-columns: auto 1fr; gap: 6px 10px; align-items: center; }
.cal-span-l { min-width: 26px; }
