:root {
  --ink: #171a21;
  --paper: #f5f6f8;
  --muted: #5a6372;
  --seal: #b23a2e;
  --line: #d8dce3;
  --sent: #2e3a52;
  --sent-text: #f5f6f8;
  --ok: #1d7a4f;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

body {
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  background: var(--paper);
  color: var(--ink);
  height: 100vh;
  height: 100dvh;
}

.wordmark { font-family: ui-monospace, "Cascadia Mono", Consolas, Menlo, monospace; font-size: 1.05rem; }
.wordmark b { font-weight: 600; }
.wordmark .dot { color: var(--seal); }

.flash {
  position: fixed; top: 14px; left: 50%; transform: translateX(-50%);
  background: var(--ink); color: #fff;
  padding: .55rem 1rem; border-radius: 999px;
  font-size: .85rem; z-index: 50; max-width: 92%;
}

.lang-switch { display: flex; gap: .25rem; }
.lang-btn {
  border: 1px solid var(--line); background: #fff; color: var(--muted);
  border-radius: 6px; font-size: .72rem; padding: .2rem .45rem; cursor: pointer;
}
.lang-btn.active { background: var(--ink); color: #fff; border-color: var(--ink); }

/* ===== Auth ===== */
.auth-view { height: 100%; display: flex; align-items: center; justify-content: center; padding: 1rem; }
.auth-card {
  width: min(24rem, 100%);
  background: #fff; border: 1px solid var(--line); border-radius: 14px;
  padding: 1.8rem; display: flex; flex-direction: column; gap: .45rem;
}
.auth-top { display: flex; justify-content: space-between; align-items: center; margin-bottom: .8rem; }
.auth-card h1 { font-size: 1.25rem; font-weight: 650; margin-bottom: .6rem; }
.auth-card label { font-size: .8rem; color: var(--muted); margin-top: .4rem; }
.auth-card input {
  padding: .65rem .85rem; border: 1px solid var(--line); border-radius: 10px;
  font-size: 1rem; outline: none;
}
.auth-card input:focus { border-color: var(--seal); }
.hint { font-size: .75rem; color: var(--muted); }
.auth-error { font-size: .82rem; color: var(--seal); min-height: 1.1rem; }
.primary-btn {
  margin-top: .4rem; padding: .7rem; border: none; border-radius: 10px;
  background: var(--ink); color: #fff; font-size: 1rem; cursor: pointer;
}
.primary-btn:hover { background: var(--seal); }
.link-btn {
  margin-top: .3rem; background: none; border: none; color: var(--muted);
  font-size: .85rem; cursor: pointer; text-decoration: underline; text-underline-offset: 3px;
}
.link-btn:hover { color: var(--seal); }

/* ===== Chat-Layout ===== */
.chat-layout { height: 100%; display: flex; max-width: 75rem; margin: 0 auto; background: #fff; border-left: 1px solid var(--line); border-right: 1px solid var(--line); }

.sidebar {
  width: 270px; flex-shrink: 0;
  border-right: 1px solid var(--line);
  display: flex; flex-direction: column;
  background: #fff;
}
.sidebar-head { display: flex; justify-content: space-between; align-items: baseline; padding: .85rem .9rem .5rem; }
.status { font-size: .72rem; color: var(--muted); }
.status.online { color: var(--ok); }
.status.offline { color: var(--seal); }

.me-row { display: flex; align-items: center; gap: .6rem; padding: 0 .9rem .6rem; border-bottom: 1px solid var(--line); }
.me-name { font-weight: 650; font-size: .95rem; flex: 1; }
.mini-link { background: none; border: none; color: var(--muted); font-size: .78rem; cursor: pointer; text-decoration: underline; text-underline-offset: 3px; }
.mini-link:hover { color: var(--seal); }

.add-contact { display: flex; gap: .4rem; padding: .7rem .9rem; }
.add-contact input {
  flex: 1; min-width: 0; padding: .45rem .6rem;
  border: 1px solid var(--line); border-radius: 8px; font-size: .85rem; outline: none;
}
.add-contact input:focus { border-color: var(--seal); }

.mini-btn {
  border: 1px solid var(--line); background: #fff; color: var(--ink);
  border-radius: 8px; font-size: .75rem; padding: .35rem .6rem; cursor: pointer; white-space: nowrap;
}
.mini-btn:hover { border-color: var(--seal); color: var(--seal); }
.mini-btn.accept { background: var(--ink); color: #fff; border-color: var(--ink); }
.mini-btn.accept:hover { background: var(--seal); border-color: var(--seal); color: #fff; }

.request-list { padding: 0 .9rem; }
.request-row { display: flex; align-items: center; gap: .4rem; font-size: .82rem; padding: .3rem 0; }
.request-row span:first-child { flex: 1; }
.request-row.muted { color: var(--muted); }

.sidebar-label {
  font-size: .68rem; letter-spacing: .14em; text-transform: uppercase;
  color: var(--muted); padding: .7rem .9rem .3rem;
}
.contact-list { flex: 1 1 auto; min-height: 120px; overflow-y: auto; padding: 0 .5rem .5rem; }
.contact-row {
  width: 100%; display: flex; align-items: center; gap: .55rem;
  padding: .55rem .5rem; border: none; background: none;
  border-radius: 8px; cursor: pointer; font-size: .92rem; text-align: left;
}
.contact-row:hover { background: var(--paper); }
.contact-row.selected { background: var(--paper); font-weight: 650; }
.presence-dot { width: 9px; height: 9px; border-radius: 50%; background: var(--line); flex-shrink: 0; }
.presence-dot.online { background: var(--ok); }
.contact-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.empty-hint { font-size: .82rem; color: var(--muted); padding: .5rem; }

.sidebar-langs { padding: .6rem .9rem; border-top: 1px solid var(--line); flex-shrink: 0; margin-top: auto; }

/* ===== Chat-Bereich ===== */
.chat-pane { flex: 1; display: flex; flex-direction: column; min-width: 0; }
.chat-head { display: flex; align-items: baseline; gap: .7rem; padding: .85rem 1rem; border-bottom: 1px solid var(--line); }
.chat-title { font-weight: 650; }
.peer-status { font-size: .75rem; color: var(--muted); }
.peer-status.online { color: var(--ok); }

.empty-state { flex: 1; display: flex; align-items: center; justify-content: center; color: var(--muted); font-size: .92rem; padding: 1rem; text-align: center; }

.messages {
  flex: 1; overflow-y: auto; padding: 1rem;
  background: var(--paper);
  display: flex; flex-direction: column; gap: .65rem;
}
.message { display: flex; flex-direction: column; max-width: 76%; }
.message.sent { align-self: flex-end; align-items: flex-end; }
.message.received { align-self: flex-start; align-items: flex-start; }
.message-content {
  position: relative; padding: .55rem .8rem; border-radius: 14px;
  font-size: .95rem; line-height: 1.45; word-break: break-word;
}
.sent .message-content { background: var(--sent); color: var(--sent-text); border-bottom-right-radius: 4px; }
.received .message-content { background: #fff; border: 1px solid var(--line); border-bottom-left-radius: 4px; }
.message-time { font-size: .64rem; opacity: .65; margin-top: .25rem; }

.delete-btn {
  position: absolute; top: -8px; right: -8px;
  width: 20px; height: 20px; border: none; border-radius: 50%;
  background: var(--seal); color: #fff; font-size: 11px;
  cursor: pointer; display: none; line-height: 1;
}
.message:hover .delete-btn { display: block; }

.file-preview { display: block; max-width: 240px; max-height: 180px; border-radius: 8px; margin-bottom: .3rem; }
.file-link { color: inherit; font-size: .9rem; text-underline-offset: 3px; }
.sent .file-link { color: var(--sent-text); }
.file-hint { font-size: .64rem; opacity: .6; margin-top: .2rem; }

.typing-indicator { min-height: 1.3rem; padding: 0 1rem; font-size: .78rem; font-style: italic; color: var(--muted); background: var(--paper); }

.input-area { border-top: 1px solid var(--line); background: #fff; padding: .65rem 1rem .75rem; }
.message-input-area { display: flex; gap: .6rem; }
.message-input-area input {
  flex: 1; min-width: 0; padding: .6rem .9rem;
  border: 1px solid var(--line); border-radius: 999px; font-size: .95rem; outline: none;
}
.message-input-area input:focus { border-color: var(--seal); }
.message-input-area button {
  padding: .55rem 1.1rem; border: none; border-radius: 999px;
  background: var(--ink); color: #fff; font-size: .92rem; cursor: pointer;
}
.message-input-area button:hover { background: var(--seal); }

.file-area { display: flex; align-items: center; gap: .8rem; margin-top: .5rem; }
.file-btn {
  padding: .32rem .75rem; border: 1px solid var(--line); border-radius: 999px;
  background: #fff; color: var(--ink); font-size: .82rem; cursor: pointer;
}
.file-btn:hover { border-color: var(--seal); color: var(--seal); }
.progress-bar { flex: 0 0 110px; height: 6px; background: var(--line); border-radius: 3px; overflow: hidden; display: none; }
.progress-fill { height: 100%; width: 0%; background: var(--seal); transition: width .25s; }
.privacy-hint { font-size: .68rem; color: var(--muted); margin-left: auto; text-align: right; }

/* ===== Admin ===== */
.admin-body { overflow-y: auto; }
.admin-wrap { max-width: 50rem; margin: 0 auto; padding: 2rem 1rem; }
.admin-wrap h1 { font-size: 1.3rem; font-weight: 650; margin: 1rem 0 .3rem; }
.admin-table { width: 100%; margin-top: 1.2rem; border-collapse: collapse; background: #fff; border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
.admin-table th { text-align: left; font-size: .72rem; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); padding: .7rem .8rem; border-bottom: 1px solid var(--line); }
.admin-table td { padding: .65rem .8rem; border-bottom: 1px solid var(--line); font-size: .9rem; }
.admin-table tr:last-child td { border-bottom: none; }
.admin-table td.ok { color: var(--ok); }
.admin-table td.bad { color: var(--seal); }
.admin-table .mini-btn { margin-right: .35rem; }

/* ===== Mobil ===== */
@media (max-width: 720px) {
  .chat-layout { flex-direction: column; border: none; padding-bottom: 56px; position: relative; }
  .sidebar { width: 100%; max-height: 58vh; border-right: none; border-bottom: 1px solid var(--line); overflow-y: auto; }
  .contact-list { flex: 0 0 auto; min-height: 0; overflow: visible; }
  .chat-pane { flex: 1 1 auto; min-height: 42vh; overflow: hidden; }
  .nav-switch { display: none; }   /* wird durch die untere Tab-Leiste ersetzt */
  .nav-switch, .group-call-btn, #webinarBtn { flex-shrink: 0; }
  .privacy-hint { display: none; }
  .message { max-width: 88%; }
  .sidebar-langs { margin-top: 0; padding: .4rem .9rem; justify-content: center; gap: .5rem; border-top: 1px solid var(--line); background: #faf9f7; }
  .sidebar-langs .lang-btn { font-size: .72rem; padding: .2rem .5rem; }

  /* Untere Tab-Leiste — daumenfreundlich am unteren Rand */
  .mobile-tabs {
    display: flex; position: fixed; bottom: 0; left: 0; right: 0; z-index: 60;
    background: #fff; border-top: 1px solid var(--line);
    box-shadow: 0 -2px 8px rgba(23,26,33,.06);
    padding-bottom: env(safe-area-inset-bottom, 0);
  }
  .mobile-tab {
    flex: 1; border: none; background: none; cursor: pointer;
    display: flex; flex-direction: column; align-items: center; gap: 2px;
    padding: .5rem 0 .45rem; color: var(--muted); font-size: .7rem;
  }
  .mobile-tab svg { width: 22px; height: 22px; }
  .mobile-tab.active { color: var(--seal); }
}

/* ===== Anrufe ===== */
.call-buttons { margin-left: auto; display: flex; gap: .4rem; }
.call-btn {
  border: 1px solid var(--line); background: #fff; border-radius: 999px;
  font-size: 1rem; padding: .25rem .6rem; cursor: pointer;
}
.call-btn:hover { border-color: var(--seal); }

.call-modal {
  position: fixed; inset: 0; z-index: 80;
  background: rgba(23,26,33,.55);
  display: flex; align-items: center; justify-content: center; padding: 1rem;
}
.call-modal-card {
  background: #fff; border-radius: 16px; padding: 2rem 2.5rem;
  display: flex; flex-direction: column; align-items: center; gap: .5rem;
  animation: callpulse 1.6s ease-in-out infinite;
  max-height: calc(100vh - 2rem); overflow-y: auto; box-sizing: border-box;
}
@keyframes callpulse {
  0%,100% { box-shadow: 0 0 0 0 rgba(178,58,46,.35); }
  50% { box-shadow: 0 0 0 16px rgba(178,58,46,0); }
}
.call-avatar {
  width: 64px; height: 64px; border-radius: 50%;
  background: var(--sent); color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.6rem; font-weight: 650;
}
.call-avatar.big { width: 110px; height: 110px; font-size: 2.6rem; }
.call-modal-name { font-size: 1.15rem; font-weight: 650; }
.call-modal-kind { font-size: .85rem; color: var(--muted); }
.call-modal-actions { display: flex; gap: .8rem; margin-top: 1rem; flex-wrap: wrap; justify-content: center; }
.call-action {
  border: none; border-radius: 999px; padding: .7rem 1.4rem;
  font-size: .95rem; cursor: pointer; color: #fff;
}
.call-action.accept { background: var(--ok); }
.call-action.reject { background: var(--seal); }

@media (max-width: 480px) {
  .call-modal-card { padding: 1.5rem 1.2rem; }
  .call-modal-actions .call-action { flex: 1 1 auto; }
}

.call-overlay { position: fixed; inset: 0; z-index: 70; background: #11141b; }
#remoteVideo { width: 100%; height: 100%; object-fit: cover; }
#remoteVideo.screen-fit { object-fit: contain; background: #000; }
#localVideo {
  position: absolute; right: 14px; bottom: 110px;
  width: 26%; max-width: 200px; border-radius: 12px;
  border: 2px solid rgba(255,255,255,.5);
}
.call-audio-face { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; }
.call-topbar {
  position: absolute; top: 0; left: 0; right: 0;
  display: flex; gap: 1rem; align-items: baseline;
  padding: 1rem 1.2rem; color: #fff;
  background: linear-gradient(rgba(0,0,0,.45), transparent);
}
.call-topbar span:first-child { font-weight: 650; }
.call-topbar span { font-size: .9rem; }
.call-controls {
  position: absolute; bottom: 28px; left: 0; right: 0;
  display: flex; justify-content: center; gap: 1.1rem;
}
.call-control {
  width: 56px; height: 56px; border-radius: 50%; border: none;
  background: rgba(255,255,255,.18); color: #fff; font-size: 1.3rem;
  cursor: pointer; backdrop-filter: blur(4px);
}
.call-control.off { background: rgba(255,255,255,.85); }
.call-control.hangup { background: var(--seal); }

/* ===== SVG-Icons (V2.2) ===== */
.call-btn svg { width: 18px; height: 18px; display: block; }
.call-btn { padding: .4rem .55rem; color: var(--ink); }
.call-btn:hover { color: var(--seal); }
.call-control { display: flex; align-items: center; justify-content: center; }
.call-control svg { width: 24px; height: 24px; }
.call-control .slash { display: none; }
.call-control.off { background: rgba(255,255,255,.85); color: var(--seal); }
.call-control.off .slash { display: block; }

/* ===== PWA (V2.3) ===== */
.push-banner {
  margin: .6rem .9rem 0; padding: .5rem .7rem;
  border: 1px dashed var(--line); border-radius: 10px;
  background: var(--paper); color: var(--muted);
  font-size: .8rem; cursor: pointer; text-align: left; width: calc(100% - 1.8rem);
}
.push-banner:hover { border-color: var(--seal); color: var(--seal); }

/* ===== Lifecycle (V2.4) ===== */
.guest-hint { color: var(--seal); }

/* ===== Stufe 3 (V2.5) ===== */
.email-status {
  margin: .4rem .9rem 0; padding: .3rem .7rem; width: calc(100% - 1.8rem);
  border: none; background: none; color: var(--muted);
  font-size: .75rem; cursor: pointer; text-align: left;
}
.email-status:hover { color: var(--seal); }
.email-status.verified { color: var(--ok); cursor: default; }
#forgotLink { display: block; text-align: center; margin-top: .6rem; font-size: .8rem; }

/* ===== Screen Sharing (V2.6) ===== */
.call-control.active { background: var(--ok); color: #fff; }

/* ===== Passwort-Auge (V2.6.1) ===== */
.pw-wrap { position: relative; display: block; }
.pw-wrap input { width: 100%; padding-right: 42px; box-sizing: border-box; }
.pw-toggle {
  position: absolute; right: 6px; top: 50%; transform: translateY(-50%);
  border: none; background: none; padding: 6px; cursor: pointer;
  color: var(--muted); display: flex; align-items: center;
}
.pw-toggle:hover { color: var(--ink); }
.pw-toggle svg { width: 20px; height: 20px; }
.pw-toggle.shown { color: var(--seal); }

/* ===== Gruppenanruf (V2.7) ===== */
.group-call-btn {
  margin: .6rem .9rem 0; padding: .5rem .7rem; width: calc(100% - 1.8rem);
  border: 1px solid var(--line); border-radius: 10px; background: #fff;
  color: var(--ink); font-size: .85rem; cursor: pointer; text-align: center;
}
.group-call-btn:hover { border-color: var(--seal); color: var(--seal); }
.group-select-card { align-items: stretch; min-width: 280px; }
.group-select-list { max-height: 240px; overflow-y: auto; margin: .6rem 0; text-align: left; }
.group-select-row { display: flex; align-items: center; gap: 10px; padding: 8px 4px; cursor: pointer; font-size: .95rem; }
.group-select-row input { width: 18px; height: 18px; }
.group-grid {
  position: absolute; inset: 0; display: grid; gap: 4px; padding: 4px;
  grid-template-columns: 1fr; background: #11141b;
}
.group-grid:has(.group-tile:nth-child(2)) { grid-template-columns: 1fr 1fr; }
.group-grid:has(.group-tile:nth-child(5)) { grid-template-columns: 1fr 1fr 1fr; }
.group-tile { position: relative; background: #1a1e27; border-radius: 10px; overflow: hidden; min-height: 0; }
.group-tile video { width: 100%; height: 100%; object-fit: cover; }
.tile-label {
  position: absolute; left: 8px; bottom: 8px; color: #fff; font-size: .8rem;
  background: rgba(0,0,0,.45); padding: 2px 8px; border-radius: 6px;
}

/* ===== Kalender (V2.9) ===== */
.nav-switch { display: flex; gap: 4px; margin: .6rem .9rem 0; }
.nav-btn {
  flex: 1; padding: .5rem .4rem; border: 1px solid var(--line); border-radius: 8px;
  background: #fff; color: var(--ink); cursor: pointer; font-size: .85rem;
  display: flex; align-items: center; justify-content: center; gap: .4rem;
  transition: background .15s, color .15s, border-color .15s;
}
.nav-btn svg { width: 16px; height: 16px; flex-shrink: 0; }
.nav-btn:hover { border-color: var(--seal); color: var(--seal); }
.nav-btn.active { background: var(--seal); color: #fff; border-color: var(--seal); }
.nav-btn.active:hover { color: #fff; }

/* Mobile: untere Tab-Leiste — auf Desktop ausgeblendet */
.mobile-tabs { display: none; }
.calendar-pane { flex: 1; display: flex; flex-direction: column; min-width: 0; background: #fff; }
.cal-head { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 8px; padding: .8rem 1rem; border-bottom: 1px solid var(--line); }
.cal-nav { display: flex; align-items: center; gap: 8px; }
.cal-navbtn { border: none; background: none; font-size: 1.4rem; cursor: pointer; color: var(--seal); line-height: 1; padding: 0 .3rem; }
.cal-title { font-weight: 600; min-width: 150px; }
.cal-todaybtn, .cal-modebtn, .cal-newbtn { border: 1px solid var(--line); background: #fff; border-radius: 8px; padding: .35rem .7rem; cursor: pointer; font-size: .8rem; color: var(--ink); }
.cal-modebtn.active { background: var(--seal); color: #fff; border-color: var(--seal); }
.cal-newbtn { background: var(--seal); color: #fff; border-color: var(--seal); }
.cal-actions { display: flex; gap: 6px; }
.cal-grid { flex: 1; display: grid; grid-template-columns: repeat(7, 1fr); gap: 1px; background: var(--line); overflow-y: auto; padding: 1px; }
.cal-wd { background: #f7f7f4; text-align: center; padding: .4rem 0; font-size: .75rem; color: var(--muted); font-weight: 600; }
.cal-cell { background: #fff; min-height: 90px; padding: 3px; font-size: .75rem; overflow: hidden; }
.cal-cell.blank { background: #fafafa; }
.cal-cell.today { background: #fff8ec; }
.cal-daynum { font-weight: 600; color: var(--muted); margin-bottom: 2px; }
.cal-cell.today .cal-daynum { color: var(--seal); }
.cal-chip { background: var(--seal); color: #fff; border-radius: 5px; padding: 1px 5px; margin-bottom: 2px; cursor: pointer; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cal-chip.declined { background: #bbb; text-decoration: line-through; }
.cal-listview { flex: 1; overflow-y: auto; padding: .5rem 1rem; }
.cal-listrow { display: flex; align-items: center; gap: 12px; padding: .7rem .3rem; border-bottom: 1px solid var(--line); cursor: pointer; }
.cal-listrow:hover { background: #f7f7f4; }
.cal-listwhen { color: var(--muted); font-size: .8rem; min-width: 160px; }
.cal-listtitle { flex: 1; font-weight: 500; }
.cal-liststatus { font-size: 1rem; }
.cal-liststatus.accepted { color: var(--ok); }
.cal-liststatus.declined { color: #c0392b; }
.cal-empty { text-align: center; color: var(--muted); padding: 2rem; }
.cal-form-card, .cal-detail-card { align-items: stretch; min-width: 320px; max-width: 420px; text-align: left; }
.cal-input { width: 100%; box-sizing: border-box; margin: .3rem 0; padding: .5rem .6rem; border: 1px solid var(--line); border-radius: 8px; font-size: .9rem; }
.cal-field { display: flex; align-items: center; gap: 8px; margin: .2rem 0; }
.cal-field label { min-width: 70px; font-size: .8rem; color: var(--muted); }
.cal-att-label { font-size: .8rem; color: var(--muted); margin: .5rem 0 .2rem; }
.cal-att-list { max-height: 130px; overflow-y: auto; }
.cal-att-row { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 4px 0; font-size: .9rem; }
.cal-att-status { padding: 3px 0; font-size: .85rem; }
.cal-detail-when { color: var(--seal); margin: .3rem 0; }
.cal-detail-loc { color: var(--muted); font-size: .85rem; }
.cal-detail-desc { margin: .5rem 0; white-space: pre-wrap; }
.cal-rsvp-row { display: flex; gap: 6px; margin: .6rem 0; }
.cal-rsvp { flex: 1; padding: .5rem; border: 1px solid var(--line); border-radius: 8px; background: #fff; cursor: pointer; font-size: .85rem; }
.cal-rsvp.accept.active { background: var(--ok); color: #fff; border-color: var(--ok); }
.cal-rsvp.tentative.active { background: #e8a13a; color: #fff; }
.cal-rsvp.decline.active { background: #c0392b; color: #fff; }
@media (max-width: 720px) { .cal-cell { min-height: 60px; } .cal-listwhen { min-width: 110px; } }

/* ===== Serientermine (V2.10) ===== */
.cal-detail-series { font-size: .8rem; color: var(--seal); margin: .2rem 0; }
.privacy-link { display: block; text-align: center; margin-top: .4rem; font-size: .78rem; }

/* ===== Webinar (V2.11) ===== */
.webinar-stage { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; background: #0d0f14; }
.webinar-video { width: 100%; height: 100%; object-fit: contain; background: #0d0f14; }

/* ===== Webinar-Chat (V2.11.4) ===== */
.webinar-chat { position: absolute; right: 0; top: 0; bottom: 0; width: 320px; max-width: 80vw;
  background: rgba(17,20,27,.92); border-left: 1px solid rgba(255,255,255,.12);
  display: flex; flex-direction: column; transform: translateX(100%); transition: transform .2s; z-index: 5; }
.webinar-chat.open { transform: translateX(0); }
.webinar-chat-msgs { flex: 1; overflow-y: auto; padding: 1rem; display: flex; flex-direction: column; gap: .5rem; }
.webinar-chat-msg { color: #eee; font-size: .85rem; line-height: 1.35; }
.webinar-chat-msg .who { color: var(--seal); font-weight: 600; margin-right: .35rem; }
.webinar-chat-input { display: flex; gap: .4rem; padding: .6rem; border-top: 1px solid rgba(255,255,255,.12); }
.webinar-chat-input input { flex: 1; padding: .5rem .6rem; border-radius: 8px; border: 1px solid rgba(255,255,255,.2); background: #1a1e27; color: #fff; }
.webinar-chat-input button { padding: .5rem .8rem; border: none; border-radius: 8px; background: var(--seal); color: #fff; cursor: pointer; }
.webinar-chat-toggle { position: absolute; right: 14px; top: 14px; z-index: 6; width: 44px; height: 44px;
  border-radius: 50%; border: none; background: rgba(255,255,255,.15); color: #fff; font-size: 1.2rem; cursor: pointer; }

/* ===== Admin-Dashboard Statistik (V2.12.0) ===== */
.stat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: .8rem; margin: 1.2rem 0; }
.stat-card { background: #fff; border: 1px solid var(--line); border-radius: 10px; padding: 1rem; text-align: center; }
.stat-value { font-size: 1.8rem; font-weight: 650; color: var(--seal); }
.stat-label { font-size: .8rem; color: var(--muted); margin-top: .2rem; text-transform: uppercase; letter-spacing: .05em; }
.stat-sub { font-size: .72rem; color: var(--muted); margin-top: .3rem; }
.section-h { font-size: 1rem; margin: 1.6rem 0 .6rem; }
.webinar-panel { background: #fff8ec; border: 1px solid var(--seal); border-radius: 10px; padding: 1rem; margin: 1rem 0; }
.webinar-panel h2 { font-size: .95rem; margin-bottom: .6rem; color: var(--seal); }
.webinar-row { display: flex; justify-content: space-between; gap: 1rem; padding: .4rem 0; border-bottom: 1px solid var(--line); font-size: .85rem; }
.webinar-row:last-child { border-bottom: none; }
.mono { font-family: ui-monospace, monospace; color: var(--muted); }

/* ===== Kalender Swipe-Navigation (V2.12.0) ===== */
.cal-grid {
  touch-action: pan-y;            /* vertikales Scrollen bleibt erlaubt, horizontal fangen wir ab */
  will-change: transform, opacity;
}
.cal-grid.cal-dragging {
  transition: none;               /* während des Ziehens dem Finger 1:1 folgen */
  cursor: grabbing;
  user-select: none;
}
/* Monat gleitet beim Vorwärtswischen von rechts herein */
@keyframes calSlideFromRight {
  from { transform: translateX(40px); opacity: 0; }
  to   { transform: translateX(0);    opacity: 1; }
}
/* Monat gleitet beim Rückwärtswischen von links herein */
@keyframes calSlideFromLeft {
  from { transform: translateX(-40px); opacity: 0; }
  to   { transform: translateX(0);     opacity: 1; }
}
.cal-grid.cal-enter-from-right { animation: calSlideFromRight 240ms ease-out; }
.cal-grid.cal-enter-from-left  { animation: calSlideFromLeft  240ms ease-out; }

/* Barrierefreiheit: Wer reduzierte Bewegung wünscht, bekommt keine Animation */
@media (prefers-reduced-motion: reduce) {
  .cal-grid.cal-enter-from-right,
  .cal-grid.cal-enter-from-left { animation: none; }
}

/* ===== Benutzerverwaltung-Optik (V2.12.2) ===== */
.admin-table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; border-radius: 12px; }
.admin-table td:last-child { white-space: nowrap; }
.admin-actions { display: flex; flex-wrap: wrap; gap: .35rem; }
.admin-actions .mini-btn { margin: 0; }
.admin-table .role-badge { display: inline-block; padding: .15rem .5rem; border-radius: 999px; font-size: .72rem; font-weight: 600; }
.role-badge.super { background: #fdecea; color: var(--seal); }
.role-badge.admin { background: #eef0fb; color: #4250b4; }
.role-badge.user { background: #eef1f4; color: var(--muted); }
.admin-table td.ok::before { content: '\25CF'; color: var(--ok); margin-right: .3rem; font-size: .7rem; }
.admin-table td.bad::before { content: '\25CF'; color: var(--seal); margin-right: .3rem; font-size: .7rem; }
.admin-table td.muted-cell { color: var(--muted); font-size: .82rem; }

@media (max-width: 640px) {
  /* Auf schmalen Geräten: Tabelle als Karten darstellen */
  .admin-table, .admin-table tbody, .admin-table tr, .admin-table td { display: block; width: 100%; }
  .admin-table thead { display: none; }
  .admin-table tr { border: 1px solid var(--line); border-radius: 10px; margin-bottom: .7rem; padding: .3rem .2rem; background: #fff; }
  .admin-table td { border: none; padding: .4rem .8rem; font-size: .95rem; }
  .admin-table td::before { content: attr(data-label); display: inline-block; min-width: 90px; margin-right: .6rem; padding-right: .4rem; color: var(--muted); font-size: .72rem; text-transform: uppercase; letter-spacing: .05em; }
  .admin-table td:last-child { white-space: normal; }
  .admin-actions { margin-top: .3rem; }
}

/* ===== Einwilligungs-Checkboxen bei Registrierung (V2.12.3) ===== */
.consent-box { margin: .8rem 0; display: flex; flex-direction: column; gap: .55rem; }
.consent-row { display: flex; align-items: flex-start; gap: .55rem; font-size: .85rem; color: var(--muted); line-height: 1.4; cursor: pointer; }
.consent-row input[type="checkbox"] { margin-top: .15rem; flex-shrink: 0; width: 16px; height: 16px; cursor: pointer; accent-color: var(--seal); }
.consent-row a { color: var(--seal); text-underline-offset: 2px; }

/* ===== Kalender Wochenansicht (V2.12.4) ===== */
.cal-grid.cal-week .cal-cell.cal-weekcell {
  min-height: 140px;            /* größere Zellen, da nur 7 statt ~35 */
  align-content: start;
}
.cal-grid.cal-week .cal-wd {
  font-weight: 600;
}
@media (max-width: 640px) {
  .cal-grid.cal-week .cal-cell.cal-weekcell { min-height: 90px; }
}

/* ===== Gruppen-Chat (V2.13.0) ===== */
.sidebar-label-row {
  display: flex; align-items: center; justify-content: space-between;
}
.mini-add-btn {
  border: none; background: var(--seal); color: #fff;
  width: 22px; height: 22px; border-radius: 50%; cursor: pointer;
  font-size: 16px; line-height: 1; display: flex; align-items: center; justify-content: center;
  padding: 0;
}
.mini-add-btn:hover { filter: brightness(1.1); }
.group-avatar { background: var(--sent); color: var(--sent-text); }
.group-item .group-count {
  margin-left: auto; background: var(--paper); border: 1px solid var(--line); border-radius: 10px;
  padding: 1px 8px; font-size: 12px; min-width: 20px; text-align: center; color: var(--muted);
}
.sidebar-empty { padding: 8px 12px; color: var(--muted); font-size: .85rem; }
.msg-sender { display: block; font-size: .75rem; font-weight: 650; color: var(--seal); margin-bottom: 2px; }
.mini-btn.danger { color: var(--seal); border-color: var(--seal); }
.mini-btn.danger:hover { background: var(--seal); color: #fff; }
