/* ================================================================
   RUPscribe — Stylesheet
   Design-Tokens und Komponenten gemäß Design „RUPscribe v2"
   ================================================================ */

:root {
  --bg: #ffffff;
  --surface: #f5f5f4;
  --surface2: #e9e9e7;
  --card: #ffffff;
  --text: #1c1c1e;
  --text2: #8e8e93;
  --sep: rgba(60, 60, 67, .09);
  --sep2: rgba(60, 60, 67, .17);
  --glass: rgba(255, 255, 255, .82);
  --scrub: #d8d8d5;
  --accent: #0a84ff;
  --rec: #ff3b30;
  --ok: #28a745;
  --warnbg: #fbf4dd;
  --warntx: #7a6200;
}
:root[data-theme="dark"] {
  --bg: #000000;
  --surface: #1c1c1e;
  --surface2: #2c2c2e;
  --card: #1c1c1e;
  --text: #f2f2f7;
  --text2: #98989e;
  --sep: rgba(84, 84, 88, .38);
  --sep2: rgba(84, 84, 88, .55);
  --glass: rgba(28, 28, 30, .8);
  --scrub: #3a3a3c;
  --ok: #30d158;
  --warnbg: #2b291b;
  --warntx: #ffd60a;
}

@keyframes pulse { 0%, 100% { opacity: 1 } 50% { opacity: .25 } }
@keyframes wave { 0%, 100% { transform: scaleY(.3) } 50% { transform: scaleY(1) } }
@keyframes fade { from { opacity: 0; transform: translateY(8px) } to { opacity: 1; transform: none } }
@keyframes ring {
  0% { box-shadow: 0 0 0 0 rgba(255, 59, 48, .35) }
  70% { box-shadow: 0 0 0 16px rgba(255, 59, 48, 0) }
  100% { box-shadow: 0 0 0 0 rgba(255, 59, 48, 0) }
}
@keyframes spin { to { transform: rotate(360deg) } }

* { box-sizing: border-box }
html, body { height: 100% }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Text', 'Segoe UI', sans-serif;
  -webkit-font-smoothing: antialiased;
  overflow: hidden;
}
a { color: var(--accent); text-decoration: none }
a:hover { text-decoration: underline }
input, button, select { font-family: inherit }
input::placeholder { color: #a2a2a7 }
button { cursor: pointer }
.mono { font-family: ui-monospace, 'SF Mono', Menlo, monospace; font-variant-numeric: tabular-nums }
.hidden { display: none !important }

/* ---------- Screens ---------- */
#app { height: 100%; position: relative }
.screen {
  position: absolute; inset: 0;
  display: none;
  flex-direction: column;
  overflow: hidden;
  animation: fade .28s ease-out;
}
.screen.active { display: flex }

/* ---------- Typo-Bausteine ---------- */
.eyebrow {
  font-size: 11px; font-weight: 600; letter-spacing: .07em;
  text-transform: uppercase; color: var(--text2);
}
.eyebrow-lg { font-size: 12px; letter-spacing: .08em }
h1.page-title { margin: 6px 0 0; font-size: 40px; font-weight: 600; letter-spacing: -.03em }

/* ---------- Buttons ---------- */
.btn { border: none; background: transparent; color: var(--text); padding: 0 }
.btn-outline {
  display: inline-flex; align-items: center; gap: 7px;
  height: 36px; padding: 0 14px; border-radius: 12px;
  border: 1px solid var(--sep2); background: transparent;
  color: var(--text); font-size: 13px; font-weight: 500;
}
.btn-outline:hover { background: var(--surface) }
.btn-primary {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  height: 36px; padding: 0 16px; border-radius: 12px; border: none;
  background: var(--accent); color: #fff; font-size: 13px; font-weight: 600;
  box-shadow: 0 4px 14px rgba(10, 132, 255, .28);
  transition: transform .15s;
}
.btn-primary:hover { transform: scale(1.02) }
.btn-link { border: none; background: transparent; color: var(--accent); font-size: 13px; font-weight: 500; padding: 0 }
.btn-icon { border: none; background: transparent; color: var(--text2); padding: 6px; display: inline-flex; border-radius: 6px }
.btn-icon:hover { color: var(--text) }
.btn-cta {
  height: 46px; border-radius: 12px; border: none;
  background: var(--accent); color: #fff; font-size: 14.5px; font-weight: 600;
  box-shadow: 0 4px 14px rgba(10, 132, 255, .28);
}
.btn-busy { opacity: .55; pointer-events: none }

/* Record-Buttons */
.btn-rec {
  border-radius: 50%; border: 2.5px solid var(--sep2); background: transparent;
  display: flex; align-items: center; justify-content: center; padding: 0;
  transition: transform .2s;
}
.btn-rec:hover { transform: scale(1.06) }
.btn-rec .dot {
  display: block; border-radius: 50%; background: var(--rec);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .25), 0 6px 18px rgba(255, 59, 48, .32);
}
.btn-rec.size-64 { width: 64px; height: 64px } .btn-rec.size-64 .dot { width: 48px; height: 48px }
.btn-stop {
  width: 72px; height: 72px; border-radius: 50%;
  border: 2.5px solid rgba(255, 59, 48, .35); background: transparent;
  display: flex; align-items: center; justify-content: center; padding: 0;
  transition: transform .2s; animation: ring 1.8s ease-out infinite;
}
.btn-stop:hover { transform: scale(1.05) }
.btn-stop .sq { display: block; width: 26px; height: 26px; border-radius: 7px; background: var(--rec); box-shadow: 0 4px 14px rgba(255, 59, 48, .35) }
.btn-round-52 {
  width: 52px; height: 52px; border-radius: 50%; border: 1px solid var(--sep2);
  background: var(--surface); color: var(--text);
  display: flex; align-items: center; justify-content: center;
}
.btn-round-52:hover { background: var(--surface2) }
.ctrl-col { display: flex; flex-direction: column; align-items: center; gap: 7px }
.ctrl-col > span { font-size: 11px; color: var(--text2) }

/* ---------- Toggle ---------- */
.tgl {
  width: 46px; height: 28px; border-radius: 14px; border: none; padding: 2px;
  background: var(--surface2); transition: background .2s; display: block; flex: none;
}
.tgl .knob {
  display: block; width: 24px; height: 24px; border-radius: 12px; background: #fff;
  box-shadow: 0 1px 3px rgba(0, 0, 0, .25); transform: translateX(0); transition: transform .2s;
}
.tgl.on { background: var(--accent) }
.tgl.on .knob { transform: translateX(18px) }
.tgl:disabled { opacity: .35; pointer-events: none }
.tgl:disabled { opacity: .4; cursor: not-allowed }

/* ---------- Segment-Control ---------- */
.seg { display: inline-flex; padding: 2px; border-radius: 8px; background: var(--surface2); gap: 2px }
.seg.r9 { border-radius: 9px }
.seg > button {
  height: 28px; padding: 0 14px; border: none; border-radius: 6px;
  background: transparent; color: var(--text); font-size: 12.5px; font-weight: 500;
}
.seg.r9 > button { height: 30px; border-radius: 7px }
.seg.tall > button { height: 32px; flex: 1; font-size: 13px }
.seg > button.on { background: var(--card); box-shadow: 0 1px 3px rgba(0, 0, 0, .12) }

/* ---------- Panels & Zeilen ---------- */
.panel { background: var(--surface); border-radius: 16px; margin: 0 0 28px }
.panel-label { margin: 0 0 8px; padding: 0 16px }
.row {
  display: flex; align-items: center; justify-content: space-between; gap: 14px;
  padding: 14px 18px; border-bottom: 1px solid var(--sep);
}
.panel > .row:last-child, .panel > .row.last { border-bottom: none }
.row .row-txt { display: flex; flex-direction: column; gap: 2px }
.row .row-title { font-size: 14.5px; color: var(--text) }
.row .row-sub { font-size: 12px; color: var(--text2) }

/* ---------- Inputs ---------- */
.input {
  height: 44px; border: 1px solid var(--sep2); border-radius: 12px;
  background: var(--card); padding: 0 14px; font-size: 14px; color: var(--text); outline: none;
}
.input:focus { border-color: var(--accent) }
.searchbar {
  display: flex; align-items: center; gap: 8px; height: 40px; padding: 0 14px;
  border-radius: 12px; background: var(--surface); color: var(--text2);
}
.searchbar input { flex: 1; border: none; background: transparent; outline: none; font-size: 14px; color: var(--text) }
.search-x {
  border: none; background: var(--surface2); color: var(--text2); width: 18px; height: 18px;
  border-radius: 50%; display: flex; align-items: center; justify-content: center;
  padding: 0; font-size: 11px; line-height: 1;
}

/* ---------- Badges ---------- */
.badge-lang {
  font-size: 10px; font-weight: 600; letter-spacing: .09em; padding: 3px 9px;
  border-radius: 6px; border: 1px solid var(--sep2); background: transparent; color: var(--text2);
  flex: none;
}
/* „Offline"-Kennzeichnung in der Übersicht: lokal erstellt, nicht in der Ablage */
.badge-local {
  display: inline-flex; align-items: center; gap: 4px; flex: none;
  font-size: 10px; font-weight: 600; letter-spacing: .04em; padding: 3px 8px;
  border-radius: 6px; border: 1px solid var(--sep2); background: transparent; color: var(--text2);
}
.badge-local svg { width: 10px; height: 10px }
/* Erkannte Sprache (Flagge) im Aufnahme-Screen neben dem Timer */
.live-lang { display: inline-flex; align-items: center; gap: 4px; font-size: 12.5px; font-weight: 600; color: var(--text2) }
.live-lang .fl { font-size: 15px; line-height: 1 }
.badge-lang .fl { font-size: 12px; letter-spacing: 0 }
/* Mehrfach-Zielsprachen (Übersetzung): Pillen (entfernbar) + „hinzufügen"-Auswahl */
.row.row-col { flex-direction: column; align-items: stretch; gap: 12px }
.lang-pills { display: flex; flex-wrap: wrap; gap: 8px }
.lang-pills:empty { display: none }
.lang-pill { display: inline-flex; align-items: center; gap: 6px; border: 1px solid var(--accent); background: rgba(10, 132, 255, .08); color: var(--accent); font-size: 13px; font-weight: 600; padding: 6px 6px 6px 12px; border-radius: 999px }
.lang-pill .fl { font-size: 15px; line-height: 1 }
.lang-pill-x { border: none; background: transparent; color: var(--accent); cursor: pointer; font-size: 11px; line-height: 1; padding: 3px 5px; border-radius: 50%; opacity: .65 }
.lang-pill-x:hover { opacity: 1; background: rgba(10, 132, 255, .16) }
.lang-add { align-self: flex-start; border: 1px solid var(--sep2); background: var(--card); color: var(--text); font-size: 13px; font-weight: 500; padding: 8px 12px; border-radius: 10px; cursor: pointer; max-width: 100% }
.lang-add:hover { border-color: var(--text2) }
.lang-add:disabled { opacity: .4; cursor: default }
/* Kompakter Mehrfach-Sprachwähler (Dropdown) — ersetzt die überlaufenden Pillen */
.lang-ms { position: relative; display: inline-block; text-align: left }
.lang-ms-btn { display: inline-flex; align-items: center; gap: 8px; min-height: 36px; max-width: 320px; padding: 5px 10px; border: 1px solid var(--sep2); border-radius: 10px; background: var(--card); color: var(--text); font-size: 13px; cursor: pointer }
.lang-ms-btn:hover { border-color: var(--text2) }
.lang-ms-val { display: inline-flex; align-items: center; gap: 4px; flex-wrap: wrap; min-width: 40px }
.lang-ms-val .fl { font-size: 16px; line-height: 1 }
.lang-ms-ph { color: var(--text2) }
.lang-ms-more { color: var(--text2); font-size: 12px; font-weight: 600 }
.lang-ms-chev { color: var(--text2); flex: none; margin-left: auto }
.lang-ms-panel { position: absolute; z-index: 50; top: calc(100% + 6px); left: 0; width: 250px; max-width: 78vw; padding: 6px; background: var(--card); border: 1px solid var(--sep); border-radius: 12px; box-shadow: 0 14px 34px -10px rgba(0, 0, 0, .3) }
.lang-ms-list { max-height: 288px; overflow-y: auto; display: flex; flex-direction: column; gap: 1px }
.lang-ms-row { display: flex; align-items: center; gap: 9px; width: 100%; padding: 7px 9px; border: none; background: transparent; border-radius: 8px; color: var(--text); font-size: 13.5px; text-align: left; cursor: pointer }
.lang-ms-row:hover { background: var(--surface) }
.lang-ms-row.on { color: var(--accent); font-weight: 600 }
.lang-ms-row .fl { font-size: 17px; line-height: 1; flex: none }
.lang-ms-row .nm { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap }
.lang-ms-row .ck { flex: none; color: var(--accent); font-weight: 700 }
.lang-ms-sep { height: 1px; background: var(--sep); margin: 5px 6px }
.lang-ms-clear { display: block; width: 100%; margin-top: 4px; padding: 7px; border: none; background: transparent; color: var(--text2); font-size: 12.5px; cursor: pointer; border-radius: 8px }
.lang-ms-clear:hover { background: var(--surface); color: var(--text) }
:root[data-theme="dark"] .lang-ms-panel { box-shadow: 0 16px 40px -10px rgba(0, 0, 0, .72) }
/* „Als App installieren" — Hinweis im Login + Anleitung-Dialog */
.app-hint { display: inline-flex; align-items: center; gap: 7px; margin: 26px auto 0; border: 1px solid var(--sep2); background: transparent; color: var(--text2); font-size: 12.5px; font-weight: 500; padding: 8px 15px; border-radius: 999px; cursor: pointer; transition: all .15s }
.app-hint:hover { color: var(--text); border-color: var(--text2) }
.dl-row { display: flex; gap: 12px; align-items: flex-start; padding: 11px 0; border-bottom: 1px solid var(--sep) }
.dl-row:last-of-type { border-bottom: none }
.dl-ico { font-size: 19px; flex: none; line-height: 1.3 }
.dl-txt { display: flex; flex-direction: column; gap: 3px; min-width: 0 }
.dl-txt b { font-size: 13.5px; font-weight: 600 }
/* Live-Übersetzungs-Modus: Übersetzung im Fokus, Original klein darunter;
   Titel, Pause, Marker und die Umschalter ausgeblendet — nur Stopp bleibt */
.translate-mode .rec-title-input { display: none }
.translate-mode #ctl-pause, .translate-mode #ctl-marker { display: none }
.translate-mode #btn-live-toggle, .translate-mode #btn-livetr-toggle { display: none }
/* Der Aufnahme-Sprachpicker gehört nur in den normalen Aufnahme-Modus */
.translate-mode #rec-transl-langs { display: none }
/* Kompakte Flaggen-Pillen: nur Flagge + ✕ (Name im Tooltip + im Dropdown) —
   viele Sprachen bleiben so übersichtlich und brechen sauber um. */
/* Aufnahme-Screen: eigene Sprachwahl-Reihe (nur wenn Übersetzung EIN) */
#rec-transl-langs.lang-picker {
  display: flex; align-items: center; justify-content: center; flex-wrap: wrap;
  gap: 9px; max-width: 640px; margin: 20px auto 0;
}
.lang-picker-label { font-size: 13px; color: var(--text2) }
/* Aufnahme-Pille + Hinweis: im Übersetzen-Modus übernimmt die eigene Computer-Ton-Reihe */
.translate-mode #btn-rec-sys, .translate-mode #rec-sys-hint { display: none }
.rec-sys-hint { font-size: 11.5px; color: var(--text2); opacity: .75; margin-top: 7px; text-align: center; max-width: 480px }
/* Die Computer-Ton-Reihe sitzt ÜBER der Sprachwahl — etwas enger an den Pillen */
#translate-sys-row { margin-top: 14px }
#translate-sys-row + .translate-langs { margin-top: 10px }
.translate-mode .live-text { font-size: 14.5px; color: var(--text2) }
/* Original ist bereits die Zielsprache (geprüft, keine Übersetzung nötig):
   im großen Übersetzungs-Design anzeigen — einheitliches Bild */
.translate-mode .live-text.solo { font-size: 19px; font-weight: 500; color: var(--text); line-height: 1.55 }
.translate-mode .live-tr { font-size: 19px; font-style: normal; font-weight: 500; color: var(--text); line-height: 1.55; margin-top: 5px }
/* Sprachwahl „Übersetzen von → in" — nur im Übersetzungs-Modus sichtbar */
.translate-langs { display: none }
.translate-mode .translate-langs { display: flex; align-items: center; justify-content: center; gap: 10px; margin-top: 16px; font-size: 13px; color: var(--text2); flex-wrap: wrap }
.translate-langs .lang-add, #rec-transl-langs .lang-add {
  -webkit-appearance: none; appearance: none; align-self: auto; cursor: pointer;
  padding: 8px 30px 8px 13px; font-size: 13px; font-weight: 500; color: var(--text);
  border: 1px solid var(--sep2); border-radius: 11px; background: var(--card)
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M4 6.2l4 4 4-4' fill='none' stroke='%23909095' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E")
    no-repeat right 10px center / 11px;
  box-shadow: 0 1px 2px rgba(0, 0, 0, .05); transition: border-color .15s;
}
.translate-langs .lang-add:hover, #rec-transl-langs .lang-add:hover { border-color: var(--accent) }
.translate-hint { display: none }
.translate-mode .translate-hint { display: block; text-align: center; font-size: 11.5px; color: var(--text2); margin: 9px 0 22px; opacity: .85 }
.translate-mode .translate-hint.hidden { display: none }
/* Aufnahme-Screen: Zustands-Pills (Live-Text / Übersetzung) in EINER Reihe */
.live-toggles { display: flex; gap: 8px; justify-content: center; margin-top: 12px }
.state-pill { display: inline-flex; align-items: center; gap: 7px; border: 1px solid var(--sep2); background: transparent; color: var(--text2); font-size: 12.5px; font-weight: 500; padding: 6px 13px; border-radius: 999px; cursor: pointer; transition: all .15s }
.state-pill:hover { color: var(--text); border-color: var(--text2) }
.state-pill.on { color: var(--accent); border-color: var(--accent); background: rgba(10, 132, 255, .08) }
.state-pill:disabled { opacity: .4; cursor: default; pointer-events: none }
/* Notizen während der Aufnahme: Knopf rechts unten + Seitenpanel mit Editor */
.notes-fab {
  position: absolute; right: 26px; bottom: 130px; z-index: 15;
  width: 46px; height: 46px; border-radius: 50%; border: 1px solid var(--sep2);
  background: var(--card); color: var(--text2); display: flex; align-items: center;
  justify-content: center; cursor: pointer; box-shadow: 0 6px 20px rgba(0, 0, 0, .12);
  transition: all .15s;
}
.notes-fab:hover { color: var(--accent); border-color: var(--accent) }
.notes-fab.on { color: var(--accent); border-color: var(--accent); background: rgba(10, 132, 255, .08) }
.translate-mode .notes-fab { display: none }   /* dort wird nichts gespeichert */
/* Notizen als echte Seitenleiste: volle Höhe, rechts angedockt, Inhalt rückt mit.
   Breite per Drag an der linken Kante verstellbar (--notes-w, wird gemerkt). */
.notes-panel {
  position: absolute; top: 0; right: 0; bottom: 0;
  width: var(--notes-w, min(400px, 92vw)); max-width: 92vw; z-index: 14;
  display: flex; flex-direction: column; background: var(--card);
  border-left: 1px solid var(--sep); box-shadow: -14px 0 40px rgba(0, 0, 0, .10);
  padding: 22px 22px 16px; text-align: left;
  animation: notesFade .2s ease-out;
}
@keyframes notesFade { from { opacity: 0 } to { opacity: 1 } }
.rec-screen { transition: padding-right .22s ease-out }
#screen-record.notes-open { padding-right: min(var(--notes-w, 400px), 92vw) }
.notes-resize {
  position: absolute; left: -4px; top: 0; bottom: 0; width: 9px;
  cursor: ew-resize; z-index: 2; touch-action: none;
}
.notes-resize:hover, .notes-resize.dragging { background: rgba(10, 132, 255, .16) }
.notes-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; flex: none }
.report-toolbar.notes-toolbar { position: static; max-width: none; margin: 0 0 10px; padding: 4px 8px; flex: none }
.notes-editor { flex: 1; overflow-y: auto; font-size: 14px; line-height: 1.6; padding-bottom: 12px; max-width: none; margin: 0; text-align: left }
.notes-editor:empty::before { content: attr(data-ph); color: var(--text2); opacity: .7; user-select: none; pointer-events: none }
#notes-detail-editor:empty::before { content: attr(data-ph); color: var(--text2); opacity: .55; user-select: none; pointer-events: none }
.notes-editor h2, .notes-editor h3 { font-size: 15px; font-weight: 600; margin: 14px 0 6px }
.notes-editor p { margin: 0 0 8px }
.notes-editor ul, .notes-editor ol { margin: 0 0 8px 20px }
.notes-hint { flex: none; font-size: 11px; color: var(--text2); opacity: .8; border-top: 1px solid var(--sep); padding-top: 9px }
@media (max-width: 700px) {
  .notes-panel { width: 100% }
  #screen-record.notes-open { padding-right: 0 }
}
/* Notizen-Tab in der Detailansicht: linksbündig statt mittig (kurze Notizen wirkten „verloren") */
#pane-notes .report-toolbar { margin: 0 0 16px }
#pane-notes .report-editor { margin: 0 }
/* Sidebar-Editor (Aufnahme-Screen): volle Breite erzwingen. Das margin:0 auto
   der SPÄTEREN .report-editor-Regel machte ihn als Flex-Item sonst
   inhaltsbreit UND zentriert — das war die hartnäckige „mittige" Notiz. */
#notes-editor { margin: 0; width: 100%; max-width: none }
.pill-state { font-weight: 700; font-size: 10.5px; letter-spacing: .04em; text-transform: uppercase; opacity: .85 }
/* Aufnahme-Knopf in der Übersicht: normaler Button mit rotem Punkt */
.rec-dot { width: 11px; height: 11px; border-radius: 50%; background: var(--rec); flex: none; box-shadow: 0 2px 8px rgba(255, 59, 48, .35) }
/* Seitenleiste: „Transkript neu erstellen" (Rettungsnetz) */
.side-retrans { border-top: 1px solid var(--sep); padding-top: 14px }
/* Bericht-Tab: Mini-Toolbar + frei editierbarer Fließtext */
.report-toolbar { display: flex; align-items: center; gap: 4px; max-width: 720px; margin: 0 auto 16px; padding: 6px 10px; border: 1px solid var(--sep); border-radius: 12px; background: var(--card); position: sticky; top: 0; z-index: 5; box-shadow: 0 6px 18px -8px rgba(0, 0, 0, .22) }
:root[data-theme="dark"] .report-toolbar { box-shadow: 0 8px 22px -8px rgba(0, 0, 0, .6) }
/* Kurzer Qualitäts-/Transparenz-Hinweis (Aufnahme-Screen + Transkript-Tab), bernstein */
.hint-banner { display: flex; align-items: center; gap: 8px; margin: 2px auto 12px; max-width: 720px; padding: 8px 12px; border-radius: 10px; font-size: 12.5px; line-height: 1.45; color: #8a5a00; background: rgba(255, 176, 32, .13); border: 1px solid rgba(255, 176, 32, .34) }
.hint-banner .hint-ico { flex: none; color: #e08a00 }
.hint-banner .hint-txt { flex: 1; min-width: 0 }
.hint-banner .hint-x { flex: none; border: none; background: transparent; color: inherit; opacity: .55; cursor: pointer; font-size: 13px; line-height: 1; padding: 3px 5px; border-radius: 6px }
.hint-banner .hint-x:hover { opacity: 1; background: rgba(255, 176, 32, .2) }
:root[data-theme="dark"] .hint-banner { color: #ffcf7a; background: rgba(255, 176, 32, .12); border-color: rgba(255, 176, 32, .28) }
:root[data-theme="dark"] .hint-banner .hint-ico { color: #ffbb44 }
/* Auf dem Aufnahme-Screen: den Hinweis klar von der Sprachwahl darüber absetzen */
#rec-hint-slot .hint-banner { margin-top: 22px }
.report-toolbar [data-cmd] { border: none; background: transparent; color: var(--text); width: 30px; height: 28px; border-radius: 7px; font-size: 13px; cursor: pointer }
.report-toolbar [data-cmd]:hover { background: var(--surface) }
.rt-sep { width: 1px; height: 18px; background: var(--sep); margin: 0 6px; flex: none }
.report-toolbar .btn-link { font-size: 12.5px; padding: 0 6px }
/* Leerer/wartender Berichts-Zustand: einladende Karte statt nackter Zeile */
.report-empty { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 6px; margin: 64px auto 0; max-width: 430px }
.report-empty-ico {
  width: 58px; height: 58px; border-radius: 50%; display: flex; align-items: center; justify-content: center;
  background: rgba(10, 132, 255, .09); color: var(--accent); margin-bottom: 8px;
}
.report-empty-title { font-size: 16.5px; font-weight: 600; color: var(--text) }
.report-empty-sub { font-size: 13.5px; line-height: 1.65; color: var(--text2); text-wrap: pretty }
.report-empty .btn-primary { margin-top: 14px }
.report-editor { max-width: 720px; margin: 0 auto; outline: none; font-size: 15.5px; line-height: 1.75; color: var(--text); padding-bottom: 80px; caret-color: var(--accent) }
/* Getippter Text startet IMMER links — WebKit backt beim Formatieren sonst
   die geerbte Ausrichtung als Inline-Stil in neue Blöcke (wirkte zentriert). */
.report-editor, .report-editor * { text-align: left !important }
/* Gesprächsbericht wie Notizen: Toolbar + Text beginnen links statt mittig */
#pane-report .report-toolbar { margin: 0 0 16px }
#pane-report .report-editor { margin: 0 }
.report-editor h2, .report-editor h3 { font-size: 17px; font-weight: 600; margin: 22px 0 8px }
.report-editor p { margin: 0 0 10px }
.report-editor ul, .report-editor ol { margin: 0 0 10px 22px }
.dl-files { display: flex; flex-direction: column; gap: 6px; margin-top: 4px }
.dl-file { display: flex; align-items: center; justify-content: space-between; gap: 12px; border: 1px solid var(--sep2); border-radius: 10px; padding: 8px 12px; font-size: 13px; font-weight: 500; color: var(--accent); text-decoration: none; transition: all .15s }
.dl-file:hover { border-color: var(--accent); background: rgba(10, 132, 255, .06) }
.dl-file-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap }
.dl-size { flex: none; font-size: 11.5px; color: var(--text2); font-weight: 500 }

/* ---------- Banner ---------- */
.banner {
  margin: 14px 0 0; display: flex; align-items: center; gap: 12px;
  padding: 12px 16px; border-radius: 12px; background: var(--surface);
  animation: fade .25s ease-out;
}
.banner.accent { background: rgba(10, 132, 255, .08) }
.banner .banner-txt { flex: 1; font-size: 13px; line-height: 1.5; color: var(--text) }

/* ---------- Home ---------- */
.home-head { padding: 44px 0 0; width: 860px; max-width: calc(100% - 48px); margin: 0 auto; flex: none }
.home-topbar { display: flex; align-items: flex-start; justify-content: space-between }
.home-actions { display: flex; align-items: center; gap: 20px }
.home-scroll { flex: 1; overflow: auto; padding: 10px 0 60px }
.home-list { width: 860px; max-width: calc(100% - 48px); margin: 0 auto }
.group-label { padding: 0 14px 8px }
.rec-group { margin: 26px 0 0 }
.rec-row {
  display: flex; align-items: center; gap: 16px; padding: 16px 14px;
  border-radius: 12px; cursor: pointer; border-bottom: 1px solid var(--sep);
  transition: background .2s;
}
.rec-row:hover { background: var(--surface) }
.rec-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 4px }
.rec-title-line { display: flex; align-items: center; gap: 8px; min-width: 0 }
.rec-title-line > .t { font-size: 15px; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis }
.rec-meta { display: flex; align-items: center; gap: 7px; font-size: 13px; color: var(--text2) }
.rename-input {
  font-size: 15px; font-weight: 500; border: none; outline: none;
  background: var(--surface2); border-radius: 6px; padding: 3px 9px;
  color: var(--text); width: min(420px, 60%);
  box-shadow: 0 0 0 2px rgba(10, 132, 255, .3);
}
.rec-prog { display: flex; flex-direction: column; gap: 6px }
.rec-prog .p-label { font-size: 13px; color: var(--accent) }
.rec-prog .p-track { display: block; width: 220px; height: 3px; border-radius: 2px; background: var(--surface2); overflow: hidden }
.rec-prog .p-fill { display: block; width: 40%; height: 3px; border-radius: 2px; background: var(--accent); animation: pulse 1.4s ease-in-out infinite }
.row-actions { display: flex; gap: 2px; color: var(--text2) }
.row-actions button {
  border: none; background: transparent; color: inherit; padding: 6px;
  opacity: .4; border-radius: 6px; display: inline-flex;
}
.row-actions button:hover { opacity: 1; background: var(--surface2) }
.hit-row { display: flex; align-items: flex-start; gap: 16px; padding: 15px 14px; border-radius: 12px; cursor: pointer; border-bottom: 1px solid var(--sep); transition: background .2s }
.hit-row:hover { background: var(--surface) }
.hit-snippet { font-size: 13.5px; color: var(--text2); line-height: 1.55 }
.hit-snippet .hit { color: var(--accent); font-weight: 600 }
.empty-state { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 22px; padding-bottom: 80px }
.empty-circle {
  width: 110px; height: 110px; border-radius: 50%; border: 1.5px dashed var(--sep2);
  display: flex; align-items: center; justify-content: center; color: var(--text2);
}

/* ---------- Aufnahme ---------- */
.rec-screen { align-items: center }
.rec-head { flex: none; padding: 38px 0 0; display: flex; flex-direction: column; align-items: center; gap: 14px }
.source-pill {
  display: inline-flex; align-items: center; gap: 7px; font-size: 12px; font-weight: 500;
  color: var(--text2); padding: 5px 12px; border-radius: 20px; background: var(--surface);
}
.rec-title-input {
  border: none; background: transparent; outline: none; text-align: center;
  font-size: 24px; font-weight: 600; color: var(--text); width: min(600px, 90vw);
}
.timer-line { display: flex; align-items: center; gap: 10px }
.live-dot { width: 9px; height: 9px; border-radius: 50%; background: var(--rec); animation: pulse 1.4s ease-in-out infinite }
.live-dot.paused { background: var(--text2); animation: none }
.timer {
  font-family: ui-monospace, 'SF Mono', Menlo, monospace; font-variant-numeric: tabular-nums;
  font-size: 56px; font-weight: 200; letter-spacing: .01em; color: var(--text); transition: color .2s;
}
.timer.paused { color: var(--text2) }
.save-hint { display: inline-flex; align-items: center; gap: 5px; font-size: 11.5px; color: var(--text2) }
.live-area {
  flex: 1; width: min(720px, calc(100vw - 56px)); overflow-y: auto;
  display: flex; flex-direction: column; padding: 24px 0 28px;
}
/* Inhalt unten „andocken", trotzdem nach oben scrollbar */
.live-area > .live-seg:first-child { margin-top: auto }
.live-seg { margin: 16px 0 0 }
.live-tr { margin: 3px 0 0; font-size: 15px; font-style: italic; color: var(--text2); line-height: 1.5 }
.live-toggle { display: inline-flex; align-items: center; gap: 6px; border: none; background: transparent; color: var(--text2); font-size: 12px; padding: 4px 6px; border-radius: 8px }
.live-toggle:hover { background: var(--surface); color: var(--text) }
.live-toggle.off { opacity: .5 }
.live-hidden-hint { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px; color: var(--text2); font-size: 14px; text-align: center; padding: 0 32px }
.export-sep { height: 1px; background: var(--sep); margin: 5px 0 }
#export-menu button { display: flex; align-items: center; gap: 9px }
.live-sp-line { display: flex; align-items: center; gap: 8px; margin: 0 0 3px }
.sp-dot { width: 7px; height: 7px; border-radius: 50%; flex: none }
.sp-name {
  border: none; background: transparent; font-size: 12.5px; font-weight: 600;
  color: var(--text2); padding: 2px 0; cursor: pointer; text-align: left;
}
.sp-name:hover { color: var(--accent) }

/* Feste Sprecherleiste über dem Live-Text — scrollt NICHT mit dem Transkript */
.live-speakers {
  display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; flex: none;
  width: min(720px, calc(100vw - 56px)); margin: 0 auto; padding: 4px 0 2px;
}
.sp-chip {
  display: inline-flex; align-items: center; gap: 7px; background: var(--surface);
  border: 1px solid var(--sep); border-radius: 14px; padding: 5px 12px 5px 10px;
}
.sp-chip:focus-within { border-color: var(--accent) }
.sp-chip input {
  border: none; background: transparent; outline: none; color: var(--text);
  font: inherit; font-size: 12.5px; font-weight: 600; padding: 0; width: 8.5em;
}
.sp-chip input::placeholder { color: var(--text2); font-weight: 500 }
.pencil { color: var(--text2); opacity: .85; display: inline-flex; flex: none; cursor: pointer; padding: 2px }
.pencil:hover { color: var(--accent); opacity: 1 }
.live-text { margin: 0; font-size: 21px; line-height: 1.7; font-weight: 300; color: var(--text2); text-wrap: pretty }
.live-text.cur { color: var(--text) }
.live-text.cur .hl { background: rgba(10, 132, 255, .13); border-radius: 5px; padding: 1px 3px }
.marker-chip {
  display: inline-flex; align-items: center; gap: 6px; font-size: 11.5px; font-weight: 600;
  color: var(--accent); background: rgba(10, 132, 255, .1); padding: 4px 11px; border-radius: 12px;
  animation: fade .25s ease-out;
}
.rec-foot { flex: none; width: 100%; display: flex; flex-direction: column; align-items: center; gap: 26px; padding: 0 0 44px }
.wave {
  display: flex; align-items: center; justify-content: center; gap: 4.5px; height: 44px;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 15%, #000 85%, transparent);
  mask-image: linear-gradient(90deg, transparent, #000 15%, #000 85%, transparent);
}
.wave span {
  width: 2.5px; border-radius: 2px; background: var(--text); opacity: .35;
  transform-origin: center; flex: none; transition: height .12s ease-out;
}
.rec-ctrls { display: flex; align-items: center; gap: 44px }

/* ---------- Overlay / Modal ---------- */
.overlay {
  position: absolute; inset: 0; background: rgba(0, 0, 0, .32);
  -webkit-backdrop-filter: blur(3px); backdrop-filter: blur(3px);
  display: flex; align-items: center; justify-content: center; z-index: 30;
}
.modal {
  width: 400px; max-width: calc(100vw - 40px); background: var(--card); border-radius: 20px; padding: 32px;
  box-shadow: 0 30px 80px rgba(0, 0, 0, .28); display: flex; flex-direction: column; gap: 18px;
  animation: fade .25s ease-out;
}
.modal h2 { margin: 0; font-size: 19px; font-weight: 600 }
.modal-note { font-size: 12px; color: var(--text2); line-height: 1.5 }
.modal-btns { display: flex; gap: 10px; justify-content: flex-end; margin-top: 4px }
.btn-cancel { height: 36px; padding: 0 16px; border-radius: 12px; border: none; background: transparent; color: var(--accent); font-size: 14px; font-weight: 500 }
.btn-start-rec { height: 36px; padding: 0 18px; border-radius: 10px; border: none; background: var(--rec); color: #fff; font-size: 14px; font-weight: 600 }
.mode-ico { display: inline-flex; align-items: center; color: var(--text2); margin-right: 2px }
.spcount-row { display: flex; flex-direction: column; align-items: stretch; gap: 8px }
.spcount-slider { display: flex; flex-direction: column; gap: 4px; width: 100% }
.spcount-slider input[type="range"] { width: 100%; accent-color: var(--accent); cursor: pointer }
.spcount-val { font-size: 14px; font-weight: 600; text-align: right }
.spcount-scale { display: flex; justify-content: space-between; font-size: 10.5px; color: var(--text2) }

/* Zusammenfassung: Entscheidungen, offene Punkte, Kapitel, Namen, Aktionen */
.dec-ico { flex: none; display: inline-flex; color: var(--ok); margin-top: 2px }
.open-ico { flex: none; display: inline-flex; color: var(--text2); margin-top: 2px }
.chapters { display: flex; flex-direction: column }
.chapter-row {
  display: flex; align-items: center; gap: 12px; padding: 9px 2px;
  border: none; background: transparent; cursor: pointer; text-align: left;
  border-bottom: 1px solid var(--sep); font-size: 13.5px; color: var(--text);
}
.chapter-row:last-child { border-bottom: none }
.chapter-row:hover .ch-t { color: var(--accent) }
.chapter-row .ch-ts { flex: none; font-size: 11.5px; color: var(--text2) }
.names-card {
  display: flex; flex-direction: column; gap: 9px; padding: 13px 14px;
  border: 1.5px solid color-mix(in srgb, var(--accent) 45%, transparent);
  border-radius: 12px; background: color-mix(in srgb, var(--accent) 6%, transparent);
}
.names-card .names-list { font-size: 13.5px; line-height: 1.6 }
.names-card .names-sep { color: var(--text2); margin: 0 8px }
.sum-actions { display: flex; align-items: center; gap: 16px; padding-top: 2px }

/* Vorgeschlagene Anschlussfragen im Transkript-Chat */
.chat-suggests { display: flex; flex-wrap: wrap; gap: 8px; padding: 10px 0 2px }
.chat-suggests button {
  /* Luftig statt grau gefüllt: weißer Grund, Grau nur als Outline + Text */
  border: 1px solid var(--sep2); background: var(--card); color: var(--text2);
  border-radius: 999px; padding: 7px 13px; font-size: 12.5px; cursor: pointer; text-align: left;
}
.chat-suggests button:hover { border-color: var(--accent); color: var(--accent) }

/* Aufnahmeart: zwei große, selbsterklärende Karten (Meeting | Diktat) */
.consent-row { display: flex; align-items: flex-start; gap: 10px; border: none; background: transparent; padding: 0; text-align: left }
.checkbox {
  flex: none; width: 20px; height: 20px; border-radius: 6px; border: 1.5px solid var(--sep2);
  background: transparent; display: flex; align-items: center; justify-content: center; color: #fff; margin-top: 1px;
}
.checkbox.on { background: var(--accent); border-color: var(--accent) }
.consent-row .c-label { font-size: 13px; line-height: 1.45; color: var(--text) }

/* ---------- Detail ---------- */
.detail-head { flex: none; padding: 26px 56px 18px }
.back-link { display: inline-flex; align-items: center; gap: 4px; margin: 0 0 10px }
.detail-title-line { display: flex; align-items: flex-start; justify-content: space-between; gap: 30px }
/* Titel + Stift sitzen direkt beieinander (Stift „klebt" am Titel, damit klar
   editierbar). Die Breite des Feldes folgt dem Inhalt (per JS gesetzt). */
.detail-title-edit { display: inline-flex; align-items: center; gap: 8px; max-width: 100%; min-width: 0 }
.detail-title-input {
  border: none; background: transparent; outline: none; font-size: 30px; font-weight: 600;
  letter-spacing: -.02em; color: var(--text); max-width: 100%; min-width: 40px; padding: 0;
}
#detail-title-edit { flex: none; border: none; background: transparent }
.detail-meta { display: flex; align-items: center; gap: 8px; margin-top: 6px; font-size: 13px; color: var(--text2); flex-wrap: wrap }
.detail-meta .saved { color: var(--ok); display: inline-flex; align-items: center; gap: 4px }
.detail-actions { display: flex; align-items: center; gap: 10px; position: relative; flex: none; padding-top: 4px }
.export-menu {
  position: absolute; top: 42px; right: 40px; width: 190px; background: var(--card);
  border: 1px solid var(--sep); border-radius: 12px; box-shadow: 0 12px 40px rgba(0, 0, 0, .16);
  padding: 6px; z-index: 10; display: flex; flex-direction: column; animation: fade .2s ease-out;
}
.export-menu button {
  text-align: left; border: none; background: transparent; color: var(--text);
  font-size: 13px; padding: 9px 12px; border-radius: 8px;
}
.export-menu button:hover { background: var(--surface) }
.tabs-line { flex: none; display: flex; align-items: center; gap: 14px; padding: 14px 56px 14px; position: relative; z-index: 3; background: var(--bg); box-shadow: 0 7px 16px -10px rgba(0, 0, 0, .22) }
:root[data-theme="dark"] .tabs-line { box-shadow: 0 9px 22px -10px rgba(0, 0, 0, .62) }
.tabs-hint { font-size: 11.5px; color: var(--text2) }
.tab-pane { flex: 1; overflow: auto; padding: 30px 56px 130px }
.tab-inner { max-width: 720px; margin: 0 auto; display: flex; flex-direction: column; gap: 38px }
.sec-label { margin: 0 0 12px }
.summary-text { margin: 0; font-size: 17px; line-height: 1.75; font-weight: 300; color: var(--text); text-wrap: pretty }
.summary-text[contenteditable]:focus { outline: none; border-radius: 8px; box-shadow: 0 0 0 2px rgba(10, 132, 255, .25) }
.bullets { display: flex; flex-direction: column; gap: 9px; margin: 18px 0 0 }
.bullet { display: flex; gap: 11px; align-items: baseline }
.bullet .b-dot { flex: none; width: 6px; height: 6px; border-radius: 50%; background: var(--accent); align-self: center }
.bullet .b-txt { font-size: 15px; line-height: 1.6 }
.todo-row { display: flex; align-items: center; gap: 14px; padding: 13px 2px; border-bottom: 1px solid var(--sep) }
.todo-check {
  flex: none; width: 22px; height: 22px; border-radius: 50%; border: 1.5px solid var(--sep2);
  background: transparent; color: #fff; display: flex; align-items: center; justify-content: center;
  padding: 0; transition: background .2s, border-color .2s;
}
.todo-check.on { background: var(--accent); border-color: var(--accent) }
.todo-t { flex: 1; font-size: 15px; color: var(--text); transition: opacity .2s }
.todo-row.done .todo-t { opacity: .45; text-decoration: line-through }
.todo-who { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; color: var(--text2) }
.todo-due { font-size: 12px; color: var(--text2); width: 84px; text-align: right }
.insights-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px }
.insight-card { background: var(--surface); border-radius: 16px; padding: 20px 22px; display: flex; flex-direction: column; gap: 10px }
.insight-card .i-label { font-size: 12.5px; color: var(--text2) }
.insight-card .i-value { font-size: 19px; font-weight: 500 }
.insight-card .i-note { font-size: 12.5px; line-height: 1.5; color: var(--text2) }
.share-row { display: flex; align-items: center; gap: 10px }
.share-row .s-name { font-size: 13px; width: 72px; flex: none }
.share-row .s-track { flex: 1; height: 5px; border-radius: 3px; background: var(--surface2) }
.share-row .s-fill { display: block; height: 5px; border-radius: 3px }
.share-row .s-pct { font-size: 12px; color: var(--text2); width: 34px; text-align: right; font-variant-numeric: tabular-nums }
.spinner {
  width: 14px; height: 14px; border-radius: 50%; flex: none;
  border: 2px solid var(--surface2); border-top-color: var(--accent);
  animation: spin .8s linear infinite;
}

/* Transkript-Tab */
.tr-wrap { flex: 1; display: flex; overflow: hidden }
.tr-scroll { flex: 1; overflow: auto; padding: 34px 56px 110px }
.tr-inner { max-width: 720px; margin: 0 auto; display: flex; flex-direction: column; gap: 34px }
.tr-block .tr-head { display: flex; align-items: baseline; gap: 9px; margin: 0 0 8px }
.tr-sp-dot { width: 8px; height: 8px; border-radius: 50%; align-self: center; flex: none }
.tr-sp-input {
  border: none; background: transparent; outline: none; padding: 0; font-size: 13px;
  font-weight: 600; color: var(--text); width: 110px; cursor: text;
}
.tr-sp-input:focus { color: var(--accent) }
.tr-ts { font-size: 11.5px; color: var(--text2); margin-left: auto }
.tr-text { margin: 0; font-size: 17px; line-height: 1.85; color: var(--text); text-wrap: pretty }
.tr-text .w { border-radius: 4px; padding: 0 1px; cursor: pointer; transition: background .15s }
.tr-text .w.cur { background: rgba(10, 132, 255, .25) }
.tr-text-tr { margin: 7px 0 0; font-size: 15.5px; font-style: italic; color: var(--text2); line-height: 1.7; text-wrap: pretty }
/* Satz-Paar (Original + Übersetzung): Hover-Lasur verbindet beide sichtbar */
.tr-pair { border-radius: 10px; padding: 5px 10px; margin: 0 -10px 8px; transition: background .15s }
.tr-pair:hover { background: rgba(10, 132, 255, .07) }
.tr-pair .tr-text-tr { margin-top: 4px }
.tr-pair:last-child { margin-bottom: 0 }
.tr-transl-bar { max-width: 720px; margin: 0 auto 4px; display: flex; justify-content: flex-end }
.tr-transl-btn { display: inline-flex; align-items: center; gap: 7px; border: 1px solid var(--sep); background: transparent; color: var(--text2); font-size: 12.5px; font-weight: 500; padding: 5px 11px; border-radius: 999px; cursor: pointer; transition: all .15s }
.tr-transl-btn:hover { color: var(--text); border-color: var(--text2) }
.tr-transl-btn.on { color: var(--accent); border-color: var(--accent); background: rgba(10, 132, 255, .08) }
.tr-transl-state { font-weight: 600 }
.hide-ts .tr-ts { display: none }
/* Umschalter Original ⇄ Geglättet + read-only geglättete Blöcke */
.tr-flip { max-width: 720px; margin: 0 auto 14px; display: flex; align-items: center; gap: 12px }
.tr-flip-seg { flex: none }
.tr-flip-regen { margin-left: auto; font-size: 12.5px }
.tr-sp-name { font-size: 14px; font-weight: 600; color: var(--text) }
.tr-block-smooth .tr-text { line-height: 1.65 }
.tr-side {
  flex: none; width: 280px; border-left: 1px solid var(--sep); overflow: auto;
  padding: 26px 24px 110px; display: flex; flex-direction: column; gap: 30px;
}
.side-sp-row { display: flex; align-items: center; gap: 9px }
.side-sp-row input {
  flex: 1; min-width: 0; border: none; background: transparent; outline: none;
  font-size: 13.5px; color: var(--text); padding: 2px 0; border-bottom: 1px solid transparent;
}
.side-sp-row input:focus { border-bottom-color: var(--accent) }
.marker-row {
  display: flex; align-items: center; gap: 9px; font-size: 13.5px; border: none;
  background: transparent; padding: 0; color: var(--text); text-align: left;
}
.marker-row:hover { color: var(--accent) }
.marker-row .m-ts { font-size: 11.5px; color: var(--text2) }
.tag-chip { font-size: 12px; padding: 4px 10px; border-radius: 14px; background: var(--surface2); color: var(--text) }
.side-toggle-row { display: flex; align-items: center; justify-content: space-between; border: none; background: transparent; padding: 0; color: var(--text) }
.tgl.small { width: 42px; height: 26px; border-radius: 13px }
.tgl.small .knob { width: 22px; height: 22px; border-radius: 11px }
.tgl.small.on .knob { transform: translateX(16px) }

/* Chat-Tab */
.chat-wrap { flex: 1; display: flex; flex-direction: column; overflow: hidden }
.chat-scroll { flex: 1; overflow: auto; padding: 30px 56px 10px }
.chat-inner { max-width: 640px; margin: 0 auto; display: flex; flex-direction: column; gap: 16px }
.chat-empty { display: flex; flex-direction: column; align-items: center; gap: 16px; padding: 56px 0 20px }
.chat-empty .c-ico {
  width: 54px; height: 54px; border-radius: 50%; background: var(--surface);
  display: flex; align-items: center; justify-content: center; color: var(--accent);
}
.chat-empty .c-hint { font-size: 15px; color: var(--text2); text-align: center; max-width: 400px; line-height: 1.6 }
.chip-btns { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; max-width: 520px }
.chip-btns button {
  border: 1px solid var(--sep2); background: transparent; color: var(--text);
  font-size: 13px; padding: 7px 14px; border-radius: 18px;
}
.chip-btns button:hover { background: var(--surface) }
.msg-user {
  align-self: flex-end; max-width: 75%; background: var(--surface2); color: var(--text);
  border-radius: 18px 18px 5px 18px; padding: 10px 16px; font-size: 14.5px; line-height: 1.55;
}
.msg-ai { align-self: flex-start; max-width: 88%; display: flex; gap: 11px }
.msg-ai .a-dot { flex: none; width: 7px; height: 7px; border-radius: 50%; background: var(--accent); margin-top: 9px }
.msg-ai p { margin: 0; font-size: 15px; line-height: 1.7; color: var(--text); text-wrap: pretty }
.msg-ai code { background: var(--surface2); border-radius: 5px; padding: 1px 5px; font-size: 13px; font-family: ui-monospace, 'SF Mono', Menlo, monospace }
.msg-ai .md-li { display: block; position: relative; padding-left: 16px; margin: 3px 0 }
.msg-ai .md-li::before { content: '•'; position: absolute; left: 2px; color: var(--accent) }
.typing { align-self: flex-start; color: var(--text2); font-size: 14px; animation: pulse 1.2s ease-in-out infinite; padding-left: 18px }
.chat-inputbar { flex: none; padding: 14px 56px 108px }
.chat-inputbar .bar {
  max-width: 640px; margin: 0 auto; display: flex; align-items: center; gap: 10px; height: 48px;
  border: 1px solid var(--sep2); border-radius: 24px; padding: 0 6px 0 18px; background: var(--card);
}
.chat-inputbar input { flex: 1; border: none; background: transparent; outline: none; font-size: 14.5px; color: var(--text) }
.chat-send {
  flex: none; width: 36px; height: 36px; border-radius: 50%; border: none; background: var(--accent);
  color: #fff; display: flex; align-items: center; justify-content: center;
  box-shadow: 0 3px 10px rgba(10, 132, 255, .28);
}

/* Player-Bar */
.playerbar {
  position: absolute; left: 50%; transform: translateX(-50%); bottom: 18px;
  width: min(780px, calc(100vw - 32px)); height: 64px; border: 1px solid var(--sep); border-radius: 32px;
  background: var(--glass); -webkit-backdrop-filter: blur(24px); backdrop-filter: blur(24px);
  box-shadow: 0 18px 50px rgba(0, 0, 0, .16);
  display: flex; align-items: center; gap: 16px; padding: 0 22px; z-index: 15;
}
.play-btn {
  width: 42px; height: 42px; border-radius: 50%; border: none; background: var(--surface2);
  color: var(--text); display: flex; align-items: center; justify-content: center; flex: none;
}
.play-btn:hover { background: var(--sep2) }
.mute-btn {
  width: 34px; height: 34px; border-radius: 50%; border: none; background: transparent;
  color: var(--text); display: flex; align-items: center; justify-content: center; flex: none;
}
.mute-btn:hover { background: var(--surface2) }
.mute-btn.muted { color: var(--text2) }
.player-time { font-size: 12px; color: var(--text2); flex: none }
.scrub-wrap { flex: 1; position: relative }
.scrub { display: flex; align-items: center; gap: 2px; height: 36px; cursor: pointer }
.scrub span { flex: 1; border-radius: 1.5px; background: var(--scrub) }
.scrub span.played { background: var(--accent) }
.scrub-mark {
  position: absolute; top: 0; width: 8px; height: 8px; border-radius: 50%;
  background: var(--accent); border: 2px solid var(--card); cursor: pointer;
  transform: translateX(-50%); z-index: 2;
}
.speed-btn {
  height: 28px; padding: 0 12px; border-radius: 8px; border: 1px solid var(--sep2);
  background: transparent; color: var(--text); font-size: 12px; font-weight: 600;
  flex: none; font-variant-numeric: tabular-nums;
}
.speed-btn:hover { background: var(--surface) }

/* Aussteuerung Mikrofon / Computer-Ton — beide getrennt sichtbar. Die
   Wellenform zeigt nur die Summe; ob die eigene Stimme überhaupt ankommt,
   war daran nicht zu erkennen. */
.lvl-row { display: flex; gap: 22px; justify-content: center; margin: 2px 0 0; flex-wrap: wrap }
.lvl { display: inline-flex; align-items: center; gap: 8px }
.lvl-cap { font-size: 11.5px; color: var(--text2); letter-spacing: .02em }
.lvl-track { display: block; width: 92px; height: 4px; border-radius: 2px; background: var(--surface2); overflow: hidden }
.lvl-track i { display: block; height: 100%; width: 0; border-radius: 2px; background: var(--accent); transition: width .08s linear }
/* Stumm: der Balken bleibt leer und die Beschriftung wird rot — das fällt auf */
.lvl.silent .lvl-cap { color: var(--rec) }

/* Verarbeitungsleiste im Detail — zeigt, dass nach dem Stopp noch gearbeitet
   wird (Transkript → Zusammenfassung → Bericht → Mail). Unbestimmter Balken:
   die Dauer hängt an der KI, eine Prozentzahl wäre erfunden. */
.proc-bar {
  position: relative; overflow: hidden;
  display: flex; align-items: center; gap: 11px;
  margin: 14px auto 12px; width: min(980px, calc(100vw - 40px));   /* bündig mit dem Inhalt darunter */
  /* Getönt statt umrandet: eine Kastenlinie direkt unter der Reiterleiste ließ
     die Leiste „ankleben" — die Tönung liegt ruhiger in der Seite. */
  background: rgba(10, 132, 255, .07); border-radius: 12px;
  padding: 10px 16px 11px; animation: fade .25s ease-out;
}
:root[data-theme="dark"] .proc-bar { background: rgba(10, 132, 255, .14) }
.proc-body { flex: 1; min-width: 0; display: flex; align-items: baseline; gap: 9px; flex-wrap: wrap }
.proc-txt { font-size: 13px; font-weight: 600; color: var(--text) }
.proc-hint { font-size: 12.5px; color: var(--text2) }
.proc-ico { width: 16px; height: 16px; flex: none; display: inline-flex; align-items: center; justify-content: center }
.proc-spin {
  width: 15px; height: 15px; border-radius: 50%;
  border: 2px solid rgba(10, 132, 255, .25); border-top-color: var(--accent);
  animation: spin .8s linear infinite;
}
.proc-check { display: none; color: var(--ok) }

/* Fortschritt als HAARLINIE an der Unterkante — Teil der Fläche, kein
   zweites Bedienelement mitten im Text. */
.proc-track { position: absolute; left: 0; right: 0; bottom: 0; height: 2px; overflow: hidden }
.proc-fill {
  position: absolute; top: 0; bottom: 0; left: 0; width: 32%;
  background: var(--accent); border-radius: 2px;
  animation: proc-slide 1.6s ease-in-out infinite;
}
@keyframes proc-slide {
  0% { transform: translateX(-105%) }
  100% { transform: translateX(420%) }
}
/* Bekannte Gesamtgröße (Audio-Download) → echter Fortschritt statt Endlos-Lauf */
.proc-bar.determinate .proc-fill { animation: none; transition: width .25s ease-out }

/* „Fertig": Haken statt Spinner, dezent grün getönt, Balken weg — und nach
   kurzem Verweilen von selbst ausblenden statt wegzuspringen. */
.proc-bar.done { background: rgba(48, 209, 88, .10); animation: procOut .45s ease-in 1.9s forwards }
:root[data-theme="dark"] .proc-bar.done { background: rgba(48, 209, 88, .16) }
.proc-bar.done .proc-track { display: none }
.proc-bar.done .proc-spin { display: none }
.proc-bar.done .proc-check { display: block }
@keyframes procOut { to { opacity: 0; transform: translateY(-6px) } }

/* Call-Hinweis — schwebt über allen Bildschirmen, oben mittig.
   Höher als Toast (40) und Overlays, damit ihn nichts verdeckt. */
.call-prompt {
  position: fixed; top: 16px; left: 50%; transform: translateX(-50%);
  display: flex; align-items: center; gap: 12px; z-index: 60;
  background: var(--glass); -webkit-backdrop-filter: saturate(180%) blur(20px); backdrop-filter: saturate(180%) blur(20px);
  border: 1px solid var(--sep2); border-radius: 20px;
  padding: 9px 10px 9px 16px; box-shadow: 0 14px 44px rgba(0, 0, 0, .2);
  animation: fade .22s ease-out; max-width: min(540px, calc(100vw - 24px));
}
.call-prompt .cp-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--rec); animation: pulse 1.4s ease-in-out infinite; flex: none }
.call-prompt .cp-txt { font-size: 13.5px; font-weight: 500; color: var(--text) }
.call-prompt .cp-go {
  border: none; background: var(--accent); color: #fff; font-size: 13px; font-weight: 600;
  padding: 7px 15px; border-radius: 13px; cursor: pointer; flex: none;
}
.call-prompt .cp-go:hover { filter: brightness(1.08) }
.call-prompt .cp-x { color: var(--text2); flex: none; padding: 3px }

/* Toast */
.toast {
  position: absolute; left: 50%; transform: translateX(-50%); bottom: 100px;
  display: flex; align-items: center; gap: 14px; background: var(--text); color: var(--bg);
  padding: 11px 12px 11px 18px; border-radius: 24px; box-shadow: 0 12px 40px rgba(0, 0, 0, .25);
  z-index: 40; animation: fade .25s ease-out; max-width: min(460px, calc(100vw - 32px));
}
.toast .t-txt { font-size: 13.5px; font-weight: 500 }
.toast button { border: none; background: transparent; color: var(--accent); font-size: 13px; font-weight: 600; padding: 0 }
/* Klebender Hinweis (sticky): mehrzeilig lesbar, X-Knopf rechts oben */
.toast.sticky { align-items: flex-start; border-radius: 16px; padding: 13px 12px 13px 18px }
.toast.sticky .t-txt { line-height: 1.5 }
/* .toast .toast-x: muss die generische .toast-button-Regel (accent) schlagen —
   sonst war das ✕ blau auf dunklem Grund und kaum lesbar. var(--bg) = weiß im
   Hellmodus, dunkel im Dunkelmodus (Toast-Hintergrund ist invertiert). */
.toast .toast-x { display: inline-flex; align-items: center; color: var(--bg); opacity: .95; flex: none; cursor: pointer; padding: 2px }
.toast .toast-x:hover { opacity: 1 }

/* ---------- Login ---------- */
/* Wichtig: kein position-Override — .screen ist bereits absolute+inset:0 */
.login-screen { align-items: center; justify-content: center }
.login-foot { position: absolute; bottom: 26px; left: 0; right: 0; text-align: center; font-size: 11.5px; color: var(--text2); letter-spacing: .02em }
.login-brand { display: flex; flex-direction: column; align-items: center; gap: 16px; margin: 0 0 44px }
.login-logo {
  width: 72px; height: 72px; border-radius: 50%; border: 2.5px solid var(--sep2);
  display: flex; align-items: center; justify-content: center;
}
.login-logo .dot {
  display: block; width: 54px; height: 54px; border-radius: 50%; background: var(--rec);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .25), 0 6px 18px rgba(255, 59, 48, .32);
}
.login-name { font-size: 30px; font-weight: 600; letter-spacing: -.02em }
.login-claim { font-size: 14px; color: var(--text2) }
.login-form { width: 340px; max-width: calc(100vw - 48px); display: flex; flex-direction: column; gap: 8px }
.login-hint { font-size: 12px; color: var(--text2); text-align: center; line-height: 1.5; margin: 4px 0 0 }
/* Not-Zugang-Bereich mittig unter dem Microsoft-Knopf (sonst klebte „Mit E-Mail und
   Passwort anmelden" am linken Rand des 340px-Blocks, während der Trenner mittig lag). */
#login-secondary { display: flex; flex-direction: column; align-items: center }
.login-divider { width: 340px; max-width: calc(100vw - 48px); display: flex; align-items: center; gap: 12px; margin: 32px 0 }
.login-divider span:not(.d-txt) { flex: 1; height: 1px; background: var(--sep) }
.login-divider .d-txt { font-size: 11.5px; color: var(--text2) }
.error-box {
  border: 1px solid rgba(255, 59, 48, .4); border-radius: 12px; background: rgba(255, 59, 48, .07);
  padding: 10px 14px; color: var(--rec); font-size: 13px; line-height: 1.5;
}

/* ---------- Einstellungen ---------- */
.settings-scroll { flex: 1; overflow: auto }
.settings-inner { width: 640px; max-width: calc(100% - 40px); margin: 0 auto; padding: 44px 0 80px }
.settings-inner h1 { margin: 0 0 30px; font-size: 40px; font-weight: 600; letter-spacing: -.03em }
.value-input { flex: 1; text-align: right; border: none; background: transparent; outline: none; font-size: 14.5px; color: var(--text2) }
.value-input:focus { color: var(--text) }
.key-mask { font-family: ui-monospace, 'SF Mono', Menlo, monospace; font-size: 13px; color: var(--text2) }
.key-input {
  flex: 1; border: none; background: transparent; outline: none; text-align: right;
  font-family: ui-monospace, 'SF Mono', Menlo, monospace; font-size: 13px; color: var(--text);
}
.conn-ok-row { display: flex; align-items: center; gap: 9px; padding: 14px 18px; border-bottom: 1px solid var(--sep); color: var(--ok) }
.conn-ok-row span { font-size: 14.5px; font-weight: 500 }
.logout-btn {
  width: 100%; display: flex; justify-content: center; border: none; background: transparent;
  color: var(--rec); font-size: 14.5px; font-weight: 500; padding: 14px 18px; border-radius: 16px;
}
.logout-btn:hover { background: var(--surface2) }
.settings-foot { font-size: 11.5px; color: var(--text2); text-align: center; margin: 14px 0 0 }
.lang-row { width: 100%; display: flex; align-items: center; justify-content: space-between; padding: 14px 18px; border: none; background: transparent; text-align: left }
.lang-opt { width: 100%; display: flex; align-items: center; justify-content: space-between; padding: 12px 18px; border: none; border-top: 1px solid var(--sep); background: transparent; text-align: left }
.chev { transition: transform .2s }
.chev.open { transform: rotate(90deg) }
.dl-track { display: block; height: 4px; border-radius: 2px; background: var(--surface2); overflow: hidden }
.dl-fill { display: block; height: 4px; border-radius: 2px; background: var(--accent); transition: width .3s }

/* ---------- Admin ---------- */
.admin-wrap { flex: 1; display: flex; overflow: hidden }
.admin-nav {
  flex: none; width: 216px; border-right: 1px solid var(--sep); padding: 36px 14px;
  display: flex; flex-direction: column; gap: 2px; background: var(--surface);
}
.admin-nav .nav-label { padding: 0 12px 18px }
.admin-nav button {
  text-align: left; border: none; border-radius: 8px; background: transparent;
  color: var(--text2); font-size: 13.5px; font-weight: 500; padding: 9px 12px;
}
.admin-nav button:hover { color: var(--text) }
.admin-nav button.on { background: var(--surface2); color: var(--text) }
.admin-nav .back-app { margin-top: auto; color: var(--accent) }
.admin-main { flex: 1; overflow: auto; padding: 44px 48px 60px }
.admin-main h1 { margin: 0 0 26px; font-size: 30px; font-weight: 600; letter-spacing: -.02em }
.warn-banner {
  display: flex; align-items: center; gap: 10px; padding: 11px 16px; border-radius: 10px;
  background: var(--warnbg); color: var(--warntx); font-size: 13px; margin: 0 0 26px;
}
.warn-banner .w-dot { width: 7px; height: 7px; border-radius: 50%; background: currentColor; flex: none }
.stat-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin: 0 0 16px }
.stat-card { border-radius: 18px; padding: 24px; display: flex; flex-direction: column; gap: 9px; background: var(--surface) }
.stat-card .s-label { font-size: 12.5px; color: var(--text2) }
.stat-card .s-value { font-size: 31px; font-weight: 500; letter-spacing: -.02em; font-variant-numeric: tabular-nums }
.stat-card .s-sub { font-size: 12px; color: var(--text2) }
.chart-card { border-radius: 18px; padding: 26px; background: var(--surface) }
.chart-card .c-title { font-size: 13.5px; font-weight: 600; margin: 0 0 16px }
.chart-x { display: flex; justify-content: space-between; font-size: 11px; color: var(--text2); padding: 6px 0 0 }
.prov-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px }
.prov-card { background: var(--surface); border-radius: 18px; padding: 22px 24px; display: flex; flex-direction: column; gap: 16px }
.prov-head { display: flex; align-items: center; justify-content: space-between; gap: 12px }
.prov-name { font-size: 15px; font-weight: 600 }
.prov-role { font-size: 12px; color: var(--text2) }
.prov-status { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; flex: none }
.prov-status .p-dot { width: 7px; height: 7px; border-radius: 50%; background: currentColor }
.prov-key-row { display: flex; align-items: center; gap: 10px }
.prov-key {
  flex: 1; min-width: 0; font-family: ui-monospace, 'SF Mono', Menlo, monospace; font-size: 12.5px;
  color: var(--text2); background: var(--surface2); border-radius: 8px; padding: 8px 12px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; border: none; outline: none;
}
input.prov-key { color: var(--text) }
.btn-test {
  height: 32px; padding: 0 14px; border-radius: 9px; border: 1px solid var(--sep2);
  background: transparent; color: var(--text); font-size: 12.5px; font-weight: 500; flex: none;
}
.btn-test:hover { background: var(--surface2) }
.route-panel { background: var(--surface); border-radius: 16px }
.route-row { display: flex; align-items: center; justify-content: space-between; padding: 13px 20px; border-bottom: 1px solid var(--sep) }
.route-row:last-child { border-bottom: none }
.route-row .r-label { font-size: 14px; display: inline-flex; align-items: center; gap: 8px }
.select {
  border: 1px solid var(--sep2); border-radius: 8px; background: var(--card); color: var(--text);
  font-size: 12.5px; padding: 6px 10px; cursor: pointer;
}
.users-table { background: var(--surface); border-radius: 18px; overflow: hidden }
.users-head, .user-row { display: grid; grid-template-columns: 2.1fr 1fr 1fr .6fr .6fr auto; gap: 12px; padding: 13px 22px; align-items: center }
.user-row .u-revoke { font-size: 11.5px; color: var(--text2); background: none; border: 1px solid var(--sep); border-radius: 7px; padding: 4px 9px; cursor: pointer; white-space: nowrap }
.user-row .u-revoke:hover { color: var(--danger, #d33); border-color: var(--danger, #d33) }
.users-head { padding: 12px 22px }
.users-head span:nth-child(4), .users-head span:nth-child(5) { text-align: right }
.user-row { border-top: 1px solid var(--sep) }
.user-row .u-mail { font-size: 13.5px; font-weight: 500; color: var(--text); overflow: hidden; text-overflow: ellipsis }
.user-row .u-sub { display: block; font-size: 11.5px; font-weight: 400; color: var(--text2); margin-top: 1px }
.user-row .u-badge { font-size: 10px; letter-spacing: .02em; color: var(--accent); border: 1px solid var(--accent); border-radius: 5px; padding: 1px 5px; margin-left: 5px; white-space: nowrap }
.user-row .u-first, .user-row .u-last { font-size: 12.5px; color: var(--text2) }
.user-row .u-recs, .user-row .u-min { font-size: 13px; color: var(--text2); text-align: right; font-variant-numeric: tabular-nums }
.admin-hint { font-size: 13px; color: var(--text2); line-height: 1.6; max-width: 520px }

/* ---------- Mobile ---------- */
.mobile-tabbar { display: none }
@media (max-width: 1060px) {
  .prov-grid { grid-template-columns: 1fr }
  .stat-grid { grid-template-columns: 1fr 1fr }
  .insights-grid { grid-template-columns: 1fr }
}
@media (max-width: 760px) {
  h1.page-title { font-size: 32px; font-weight: 700 }
  .home-head { padding-top: 24px; width: auto; max-width: none; margin: 0; padding-left: 20px; padding-right: 20px }
  .home-list { width: auto; max-width: none; padding: 0 20px }
  .home-actions { display: none }
  .home-scroll { padding-bottom: 130px }
  .mobile-tabbar {
    display: flex; position: absolute; left: 0; right: 0; bottom: 0; height: 104px;
    background: var(--glass); -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px);
    border-top: 1px solid var(--sep); align-items: center; justify-content: space-between;
    padding: 0 40px 12px; z-index: 20;
  }
  .mobile-tabbar .btn-icon { color: var(--text2) }
  .rec-row, .hit-row { padding: 12px 0; border-radius: 0 }
  .rec-row:hover, .hit-row:hover { background: transparent }
  /* Touch: kein Hover → Zeilen-Aktionen (Umbenennen/PDF/Löschen) dauerhaft zeigen */
  .row-actions { display: flex; gap: 4px }
  .row-actions button { opacity: .75; padding: 8px }
  .detail-head { padding: 20px 20px 14px }
  .detail-title-line { flex-direction: column; gap: 12px }
  .detail-title-input { font-size: 22px }
  .detail-meta { row-gap: 2px }
  .detail-actions { padding-top: 0; flex-wrap: wrap; justify-content: flex-start }
  .detail-actions #btn-sidebar { display: none }
  .export-menu { top: 42px; right: auto; left: 0 }
  /* Schmale Screens: Tab-Leiste horizontal scrollbar statt abgeschnitten */
  .tabs-line { padding: 12px 16px 12px; flex-wrap: nowrap }
  .tabs-line .seg { max-width: 100%; overflow-x: auto; scrollbar-width: none }
  .tabs-line .seg::-webkit-scrollbar { display: none }
  .tabs-line .seg > button { flex: 0 0 auto }
  .tabs-hint { display: none }
  .tab-pane { padding: 24px 20px 150px }
  .tr-scroll { padding: 24px 20px 150px }
  .tr-side { display: none }
  .chat-scroll { padding: 24px 20px 10px }
  .chat-inputbar { padding: 10px 16px 120px }
  .playerbar { bottom: 12px; padding: 0 14px; gap: 10px }
  .mute-btn { display: none }
  .rec-head { padding-top: 24px }
  .timer { font-size: 30px; font-weight: 300 }
  .rec-title-input { font-size: 19px }
  .live-area { width: auto; align-self: stretch; padding: 20px 28px 22px }
  .live-text { font-size: 17px }
  .rec-ctrls { gap: 36px }
  .wave-wrap-outer { width: 300px !important }
  .settings-inner { padding-top: 24px }
  .settings-inner h1 { font-size: 32px }
  .stat-grid { grid-template-columns: 1fr 1fr }
  .prov-grid { grid-template-columns: 1fr }
  .insights-grid { grid-template-columns: 1fr }
  .admin-wrap { flex-direction: column }
  .admin-nav {
    width: auto; flex-direction: row; overflow-x: auto; padding: 12px 14px; gap: 6px;
    border-right: none; border-bottom: 1px solid var(--sep); align-items: center;
  }
  .admin-nav .nav-label { display: none }
  .admin-nav button { flex: none }
  .admin-nav .back-app { margin-top: 0; margin-left: auto }
  .admin-main { padding: 24px 20px 60px }
  .users-head, .user-row { grid-template-columns: 1fr 1fr; row-gap: 6px }
  .users-head span:nth-child(n+3) { display: none }
}
