/* =====================================================================
   Business Cockpit — Designsystem (hell, minimalistisch, ein Akzent)
   Linien-Icons (currentColor), dünne Ränder, viel Weißraum, breite Inhalte.
   Alle Klassennamen bleiben erhalten; nur die Optik ist neu.
   ===================================================================== */
:root {
  /* Flächen — hell & ruhig */
  --bg: #f6f7f9;            /* App-Hintergrund */
  --surface: #ffffff;      /* Karten / Panels */
  --surface-2: #f1f2f5;    /* Inputs / verschachtelte Flächen */
  --surface-hover: #eceef1;
  --sidebar-bg: #fbfbfc;

  /* Linien — dünn & zurückhaltend */
  --border: #e4e6eb;
  --border-soft: #eef0f3;

  /* Text */
  --text: #1f2329;
  --muted: #6b7280;
  --faint: #9aa1ad;

  /* EIN Akzent: Indigo */
  --accent: #4f46e5;
  --accent-hover: #4338ca;
  --accent-soft: rgba(79, 70, 229, 0.10);

  /* Semantische Status (Text dunkel genug für helle Tints) */
  --success: #15803d;
  --success-soft: rgba(21, 128, 61, 0.12);
  --danger: #c0392b;
  --danger-soft: rgba(192, 57, 43, 0.11);
  --warn: #92660a;
  --warn-soft: rgba(146, 102, 10, 0.12);

  --radius: 10px;
  --radius-sm: 6px;

  --shadow: 0 1px 2px rgba(16, 24, 40, 0.06);
  --shadow-md: 0 8px 28px rgba(16, 24, 40, 0.12);
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica,
    Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.55;
  font-size: 14px;
  -webkit-font-smoothing: antialiased;
}

.muted { color: var(--muted); }
.error, .err { color: var(--danger); }

/* Icons — eine Quelle, skaliert mit der Schriftgröße des Kontexts */
.ico { display: inline-block; width: 1.1em; height: 1.1em; vertical-align: -0.18em; flex: none; }

/* dezente Scrollbars */
* { scrollbar-width: thin; scrollbar-color: #d4d7dd transparent; }
*::-webkit-scrollbar { width: 10px; height: 10px; }
*::-webkit-scrollbar-thumb { background: #d4d7dd; border-radius: 999px; border: 3px solid transparent; background-clip: padding-box; }
*::-webkit-scrollbar-thumb:hover { background: #c2c6cf; background-clip: padding-box; }

:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

/* =====================================================================
   Login
   ===================================================================== */
.login-page { display: grid; place-items: center; min-height: 100vh; padding: 24px; }
.login-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 32px;
  width: min(360px, 92vw);
  display: flex;
  flex-direction: column;
  gap: 14px;
  box-shadow: var(--shadow);
}
.login-card h1 { margin: 0; font-size: 19px; font-weight: 650; letter-spacing: -0.01em; }
.login-card p { margin: 0; }
.login-card input,
.login-card button {
  padding: 11px 13px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  font-size: 14px;
}
.login-card input { background: var(--surface); color: var(--text); }
.login-card input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.login-card button {
  background: var(--accent);
  color: #fff;
  border: none;
  cursor: pointer;
  font-weight: 600;
  margin-top: 4px;
}
.login-card button:hover { background: var(--accent-hover); }

/* =====================================================================
   App-Layout (Sidebar + Hauptbereich)
   ===================================================================== */
.app { display: flex; min-height: 100vh; }

.sidebar {
  width: 232px;
  flex-shrink: 0;
  background: var(--sidebar-bg);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  padding: 16px 12px;
  position: sticky;
  top: 0;
  height: 100vh;
}
.sidebar .brand { font-size: 15px; font-weight: 650; padding: 6px 8px 20px; letter-spacing: -0.01em; }
.main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.view { flex: 1; }

.brand { display: flex; align-items: center; gap: 9px; }
.brand .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--accent); }

/* =====================================================================
   Navigation (Hauptreiter + immer sichtbare Unterreiter)
   ===================================================================== */
.nav { display: flex; flex-direction: column; gap: 2px; flex: 1; }
.nav-item { display: flex; flex-direction: column; margin-bottom: 8px; }

.nav-link {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 8px 10px;
  border-radius: var(--radius-sm);
  color: var(--text);
  text-decoration: none;
  font-size: 13.5px;
  line-height: 1.2;
}
.nav-link:hover { background: var(--surface-hover); }

.nav-top { font-weight: 600; }
.nav-top.active { color: var(--accent); }

.nav-ic { width: 18px; display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; color: var(--muted); }
.nav-top .nav-ic { color: var(--faint); }
.nav-top.active .nav-ic { color: var(--accent); }
.nav-ic .ico { width: 17px; height: 17px; }

.nav-children {
  display: flex;
  flex-direction: column;
  gap: 1px;
  margin: 3px 0 0 9px;
  padding-left: 9px;
  border-left: 1px solid var(--border);
}
.nav-child { font-weight: 500; font-size: 13px; color: var(--muted); padding: 7px 10px; }
.nav-child:hover { color: var(--text); }
.nav-child .nav-ic { width: 16px; }
.nav-child .nav-ic .ico { width: 15px; height: 15px; }
.nav-child.active { background: var(--accent-soft); color: var(--accent); font-weight: 600; }
.nav-child.active .nav-ic { color: var(--accent); }

.sidebar-foot { padding-top: 12px; margin-top: 8px; border-top: 1px solid var(--border); }
.sidebar-foot .btn { width: 100%; }

/* =====================================================================
   Topbar
   ===================================================================== */
.topbar {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 12px 28px;
  min-height: 58px;
  background: rgba(255, 255, 255, 0.8);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border);
}
.topbar .status { flex: 1; font-size: 12.5px; color: var(--muted); text-align: right; display: inline-flex; align-items: center; justify-content: flex-end; gap: 5px; }
.topbar .status .ico { width: 14px; height: 14px; }
.topbar .actions { display: flex; gap: 8px; }

.crumb { font-weight: 600; font-size: 14px; letter-spacing: -0.01em; }
.crumb .sep { color: var(--faint); margin: 0 6px; font-weight: 400; }

/* =====================================================================
   Buttons (primär = Akzent, ghost = dezent)
   ===================================================================== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 8px 14px;
  border-radius: var(--radius-sm);
  border: 1px solid transparent;
  background: var(--accent);
  color: #fff;
  cursor: pointer;
  font-size: 13.5px;
  font-weight: 600;
  line-height: 1.2;
  transition: background 0.12s ease, border-color 0.12s ease, color 0.12s ease;
}
.btn:hover { background: var(--accent-hover); }
.btn .ico { width: 15px; height: 15px; }
.btn.ghost { background: var(--surface); color: var(--text); border-color: var(--border); }
.btn.ghost:hover { background: var(--surface-2); }
.btn:disabled { opacity: 0.5; cursor: not-allowed; }
.btn.small { padding: 6px 11px; font-size: 13px; }
.btn.danger { background: var(--danger); color: #fff; border-color: transparent; }
.btn.danger:hover { background: var(--danger); filter: brightness(0.92); }
.btn.like.liked { background: var(--accent-soft); color: var(--accent); border-color: transparent; }
.btn.like.liked .ico { fill: currentColor; }
.btn.recording { background: var(--danger); color: #fff; border-color: transparent; }

.link-btn {
  display: inline-flex; align-items: center; justify-content: center;
  background: none; border: none; color: var(--muted); cursor: pointer;
  padding: 5px; border-radius: var(--radius-sm);
}
.link-btn .ico { width: 16px; height: 16px; }
.link-btn:hover { color: var(--text); background: var(--surface-2); }

/* =====================================================================
   Badges & Tags (dezente Tints, kaum gerundet)
   ===================================================================== */
.badge {
  display: inline-block;
  padding: 2px 8px;
  border-radius: var(--radius-sm);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.01em;
  background: var(--surface-2);
  border: 1px solid var(--border);
  color: var(--muted);
  white-space: nowrap;
}
.st-processed, .st-published { background: var(--success-soft); color: var(--success); border-color: transparent; }
.st-error { background: var(--danger-soft); color: var(--danger); border-color: transparent; }
.st-processing, .st-publishing, .st-downloading { background: var(--accent-soft); color: var(--accent); border-color: transparent; }

.badge-dry {
  display: inline-block;
  background: var(--warn-soft); color: var(--warn);
  padding: 2px 8px; border-radius: var(--radius-sm); font-size: 11px; font-weight: 700;
}

/* Chevron (Icon, rotiert beim Aufklappen) */
.chev { width: 15px; height: 15px; color: var(--faint); transition: transform 0.15s ease; }
.post-ctx.open .chev,
.lc-card.open .chev,
.idea-row.open .chev { transform: rotate(90deg); }

/* =====================================================================
   Liste & Kommentar-Karten  (breiter — mehr Fläche genutzt)
   ===================================================================== */
.list {
  max-width: 1040px;
  margin: 28px auto;
  padding: 0 28px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.empty { text-align: center; padding: 72px 0; color: var(--muted); }
.empty p { margin: 4px 0; }

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px;
  display: flex;
  flex-direction: column;
  gap: 13px;
  box-shadow: var(--shadow);
  transition: opacity 0.25s ease;
}
.card.removing { opacity: 0; }

/* Kommentar-Block: gleiche Abstaende wie die Karte. Bei vorhandenem Post wird er
   eingerueckt + bekommt eine dezente Verbindungslinie, damit klar ist: gehoert zum Post. */
.comment-block { display: flex; flex-direction: column; gap: 13px; }
.card.has-post .comment-block {
  margin-left: 13px;
  padding-left: 18px;
  border-left: 2px solid var(--border);
}
.card.has-post .post-ctx { margin-bottom: 1px; }

.card-head { display: flex; align-items: center; gap: 12px; }
.avatar { width: 38px; height: 38px; border-radius: 50%; object-fit: cover; background: var(--surface-2); }
.who { flex: 1; min-width: 0; }
.who .name { font-weight: 600; font-size: 14px; }
.who .sub { display: flex; gap: 8px; align-items: center; font-size: 12px; color: var(--muted); flex-wrap: wrap; }
.group-badge {
  padding: 1px 7px; border-radius: var(--radius-sm);
  background: var(--surface-2); border: 1px solid var(--border);
  font-weight: 600; font-size: 11px; color: var(--muted);
}
/* Offizielle Community-Farben: Business = blau, Kostenlos = gelb (Hintergrund). */
.group-badge.biz { background: #2563eb; color: #fff; border-color: transparent; }
.group-badge.free { background: #f5c518; color: #1a1a1a; border-color: transparent; }

/* Kommentare-Toolbar: Sortierung + Community-Filter */
/* Kommentare-Toolbar: gleiche Breite/Raender wie die Karten darunter. */
.comments-toolbar {
  max-width: 1040px; margin: 24px auto 0; padding: 0 28px;
  display: flex; align-items: center; gap: 14px; flex-wrap: wrap;
}
.comments-toolbar + .list { margin-top: 14px; }
.comments-toolbar .tb-right { margin-left: auto; display: flex; align-items: center; gap: 12px; }
.tb-select {
  background: var(--surface); color: var(--text);
  border: 1px solid var(--border); border-radius: var(--radius-sm);
  padding: 7px 10px; font: inherit; font-size: 13px; cursor: pointer;
}
#c-count { font-size: 12.5px; white-space: nowrap; }

/* Segment-Control: Community-Filter (genau ein aktiver Button) */
.seg {
  display: inline-flex; background: var(--surface-2);
  border: 1px solid var(--border); border-radius: var(--radius-sm);
  padding: 3px; gap: 2px;
}
.seg-btn {
  border: none; background: none; cursor: pointer;
  padding: 6px 14px; border-radius: 5px;
  font: inherit; font-size: 13px; font-weight: 600; line-height: 1.2;
  color: var(--muted);
}
.seg-btn:hover { color: var(--text); }
.seg-btn.active { background: var(--surface); color: var(--text); box-shadow: var(--shadow); }
.seg-btn.seg-biz.active { background: #2563eb; color: #fff; }
.seg-btn.seg-free.active { background: #f5c518; color: #1a1a1a; }
.open-link { color: var(--faint); text-decoration: none; padding: 5px 7px; border-radius: var(--radius-sm); display: inline-flex; }
.open-link .ico { width: 17px; height: 17px; }
.open-link:hover { background: var(--surface-2); color: var(--text); }

.incoming {
  margin: 0;
  padding: 11px 14px;
  background: var(--surface-2);
  border-left: 2px solid var(--accent);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  white-space: pre-wrap;
  word-break: break-word;
}

.draft, .lc-desc, .lc-input, .lc-course {
  width: 100%;
  background: var(--surface);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 10px 12px;
  font: inherit;
}
.draft, .lc-desc { resize: vertical; }
.draft:focus, .lc-desc:focus, .lc-input:focus, .lc-course:focus {
  outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft);
}

.card-actions { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.row-status { margin-left: auto; font-size: 12.5px; color: var(--muted); }
.row-status.ok { color: var(--success); }
.row-status.err { color: var(--danger); }

/* Toolbar: Filter + Sortierung + Anzahl links gruppiert, Zahnrad rechts */
.comments-toolbar .tb-left { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.btn.icon-btn { padding: 8px; }
.btn.icon-btn .ico { width: 17px; height: 17px; }

/* Langer Kommentar: auf 3 Zeilen klemmen + Aufklapp-Link */
.incoming.clamped {
  display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden;
}
.incoming-more {
  align-self: flex-start;
  background: none; border: none; cursor: pointer; padding: 2px 0;
  color: var(--accent); font: inherit; font-size: 12.5px; font-weight: 600;
}
.incoming-more:hover { text-decoration: underline; }

/* Antwort diktieren: Aufnahme-Leiste (Wellenform + Fertig/Abbrechen) */
.dictate-rec { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.dictate-wave {
  width: 240px; height: 34px; border-radius: var(--radius-sm);
  background: var(--surface-2); border: 1px solid var(--border);
}
.btn.dictate-ok { background: var(--success); border-color: transparent; }
.btn.dictate-ok:hover { background: var(--success); filter: brightness(0.94); }
.dictate-status { font-size: 12.5px; }

/* Original-Post-Kontext (aufklappbar) */
.post-ctx { background: var(--surface-2); border: 1px solid var(--border-soft); border-radius: var(--radius-sm); overflow: hidden; }
.post-toggle {
  width: 100%; display: flex; align-items: center; gap: 10px;
  background: none; border: none; color: var(--text); cursor: pointer;
  padding: 9px 12px; font: inherit; text-align: left;
}
.post-toggle:hover { background: var(--surface-hover); }
.post-icon { width: 15px; height: 15px; color: var(--muted); }
.post-title { flex: 1; font-weight: 600; font-size: 13px; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.post-thumb { order: -1; width: 34px; height: 24px; object-fit: cover; border-radius: 4px; flex-shrink: 0; }
.post-body {
  padding: 11px 14px; border-top: 1px solid var(--border-soft);
  white-space: pre-wrap; word-break: break-word;
  font-size: 13px; color: var(--muted); max-height: 360px; overflow-y: auto;
}

/* =====================================================================
   Übersichtsseite
   ===================================================================== */
.overview { max-width: 1100px; margin: 32px auto; padding: 0 28px; }
.overview h1 { margin: 0 0 4px; font-size: 22px; font-weight: 650; letter-spacing: -0.02em; }
.tool-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 14px; margin-top: 22px; }
.tool-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  text-decoration: none;
  color: var(--text);
  display: flex;
  flex-direction: column;
  gap: 8px;
  box-shadow: var(--shadow);
  transition: border-color 0.12s ease, box-shadow 0.12s ease;
}
.tool-card:hover { border-color: var(--accent); box-shadow: var(--shadow-md); }
.tool-ic { color: var(--accent); display: inline-flex; }
.tool-ic .ico { width: 24px; height: 24px; }
.tool-label { font-weight: 600; }
.tool-desc { font-size: 13px; color: var(--muted); }

/* =====================================================================
   Live-Calls
   ===================================================================== */
.lc-toolbar {
  max-width: 1040px;
  margin: 24px auto 0;
  padding: 0 28px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  font-size: 13px;
}
.lc-classroom { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.lc-classroom-bar {
  max-width: 1040px; margin: 16px auto 0; padding: 0 28px;
  display: flex; align-items: center; font-size: 13px; flex-wrap: wrap; gap: 6px;
}
.classroom-name { font-weight: 600; }
.classroom-edit { display: inline-flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.lc-input.small { font-size: 13px; padding: 6px 9px; }
#classroom-name { min-width: 240px; }

.lc-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); }
.lc-head { display: flex; align-items: center; gap: 8px; padding: 2px 12px 2px 2px; }
.lc-toggle {
  flex: 1; display: flex; align-items: center; gap: 10px;
  background: none; border: none; color: var(--text); cursor: pointer;
  padding: 13px 12px; font: inherit; text-align: left; min-width: 0;
}
.lc-toggle:hover { background: var(--surface-2); }
.lc-date { font-size: 12px; color: var(--muted); flex-shrink: 0; }
.lc-title-text { flex: 1; font-weight: 600; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lc-link { color: var(--accent); text-decoration: none; padding: 6px 8px; display: inline-flex; }
.lc-link .ico { width: 16px; height: 16px; }
.lc-link:hover { color: var(--accent-hover); }
.lc-del { color: var(--muted); background: none; border: none; cursor: pointer; padding: 6px 8px; display: inline-flex; border-radius: 8px; flex-shrink: 0; }
.lc-del .ico { width: 16px; height: 16px; }
.lc-del:hover { color: var(--danger); background: var(--surface-2); }
.lc-del:disabled { opacity: 0.5; cursor: default; }
.lc-body { padding: 0 16px 16px; display: flex; flex-direction: column; gap: 8px; border-top: 1px solid var(--border-soft); }
.lc-label { font-size: 11.5px; color: var(--muted); margin-top: 10px; letter-spacing: 0.01em; }
.lc-count.err { font-weight: 700; }
.lc-title-input { width: 100%; }
.lc-actions { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.lc-sep { flex: 1; }
.lc-rowstatus { font-size: 12.5px; color: var(--muted); }
.lc-rowstatus.ok { color: var(--success); }
.lc-rowstatus.err { color: var(--danger); }
.lc-error { font-size: 12px; white-space: pre-wrap; }

/* =====================================================================
   Modal
   ===================================================================== */
.modal { position: fixed; inset: 0; z-index: 100; display: flex; align-items: center; justify-content: center; padding: 20px; }
.modal-overlay { position: absolute; inset: 0; background: rgba(16, 24, 40, 0.4); backdrop-filter: blur(2px); }
.modal-box {
  position: relative; z-index: 1;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px 24px;
  width: min(560px, 94vw);
  max-height: 86vh;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 14px;
  box-shadow: var(--shadow-md);
}
.modal-head { display: flex; align-items: center; justify-content: space-between; }
.modal-head h2 { margin: 0; font-size: 17px; font-weight: 650; letter-spacing: -0.01em; }
.modal-section { display: flex; flex-direction: column; gap: 8px; border-top: 1px solid var(--border-soft); padding-top: 14px; }
.modal-section h3 { margin: 0; font-size: 13.5px; font-weight: 600; display: inline-flex; align-items: center; gap: 7px; }
.modal-section h3 .ico { width: 16px; height: 16px; color: var(--muted); }
.modal-section p { margin: 0; font-size: 12.5px; color: var(--muted); }
.modal-section .row { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.modal-section .row .lc-input { flex: 1; min-width: 180px; }
.modal-section.dev { background: var(--surface-2); border-radius: var(--radius-sm); padding: 14px; border-top: 1px solid var(--border); }
.modal-status { font-size: 12.5px; min-height: 18px; color: var(--muted); }
.modal-status.ok { color: var(--success); }
.modal-status.err { color: var(--danger); }

/* Breiteres Modal mit Mini-Sidebar (Kommentar-Einstellungen) */
.modal-box.modal-wide { width: min(760px, 95vw); }
.settings-layout { display: flex; gap: 18px; align-items: stretch; }
.settings-nav {
  display: flex; flex-direction: column; gap: 2px; min-width: 150px;
  border-right: 1px solid var(--border-soft); padding-right: 12px;
}
.settings-nav-item {
  display: flex; align-items: center; gap: 8px; text-align: left;
  background: none; border: none; cursor: pointer; font: inherit; font-size: 13.5px; font-weight: 600;
  color: var(--muted); padding: 9px 10px; border-radius: var(--radius-sm);
}
.settings-nav-item .ico { width: 16px; height: 16px; }
.settings-nav-item:hover { background: var(--surface-2); color: var(--text); }
.settings-nav-item.active { background: var(--accent-soft); color: var(--accent); }
.settings-panes { flex: 1; min-width: 0; }
.settings-pane { display: flex; flex-direction: column; gap: 6px; }
.settings-pane textarea { width: 100%; font-size: 13px; line-height: 1.5; resize: vertical; }
.settings-pane .lc-label { margin-top: 8px; }
.settings-pane .row { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin-top: 8px; }
@media (max-width: 640px) {
  .settings-layout { flex-direction: column; }
  .settings-nav {
    flex-direction: row; border-right: none; border-bottom: 1px solid var(--border-soft);
    padding-right: 0; padding-bottom: 8px;
  }
}

/* Generisches Bestätigungs-Modal (z.B. Löschen) */
.confirm-box { width: min(440px, 94vw); }
.confirm-message { margin: 0; font-size: 13.5px; color: var(--text); white-space: pre-line; line-height: 1.5; }
.confirm-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 4px; }

/* =====================================================================
   Ideen-Katalog  (breiteste Ansicht)
   ===================================================================== */
.ideas-toolbar {
  max-width: 1200px; margin: 24px auto 0; padding: 0 28px;
  display: flex; flex-direction: column; gap: 12px;
}
.ideas-filters { display: flex; gap: 6px; flex-wrap: wrap; }
.ideas-controls { display: flex; gap: 10px; align-items: stretch; }

/* Großes, prägnantes Suchfeld über die ganze Breite; Buttons rechts daneben. */
.search-wrap { position: relative; display: flex; align-items: center; flex: 1; min-width: 0; }
.search-wrap > .ico { position: absolute; left: 15px; width: 18px; height: 18px; color: var(--muted); pointer-events: none; }
#idea-search { width: 100%; height: 46px; font-size: 15px; padding: 0 16px 0 44px; border-radius: var(--radius); }
.ideas-controls .btn { height: 46px; flex: none; }

.domain-chip {
  padding: 4px 10px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--muted);
  cursor: pointer;
  font-size: 12px;
  font-weight: 600;
}
.domain-chip:hover { color: var(--text); background: var(--surface-2); }
.domain-chip.on { background: var(--accent-soft); color: var(--accent); border-color: transparent; }

.ideas-count { max-width: 1200px; margin: 12px auto 0; padding: 0 28px; font-size: 12px; color: var(--muted); }

.idea-list { max-width: 1200px; margin: 8px auto 36px; padding: 0 28px; display: flex; flex-direction: column; gap: 6px; }
.idea-row { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-sm); overflow: hidden; box-shadow: var(--shadow); }
.idea-row.st-done { opacity: 0.6; }
.idea-head { display: flex; align-items: center; gap: 4px; padding-right: 8px; }
.idea-toggle {
  flex: 1; display: flex; align-items: center; gap: 10px;
  background: none; border: none; color: var(--text); cursor: pointer;
  padding: 12px; font: inherit; text-align: left; min-width: 0;
}
.idea-toggle:hover { background: var(--surface-2); }
.idea-title-text { flex: 1; font-weight: 600; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.idea-row.st-done .idea-title-text { text-decoration: line-through; }

.idea-prio { flex-shrink: 0; min-width: 30px; text-align: center; font-variant-numeric: tabular-nums; }
.prio-high { background: var(--success-soft); color: var(--success); border-color: transparent; }
.prio-mid { background: var(--warn-soft); color: var(--warn); border-color: transparent; }
.prio-low { background: var(--surface-2); color: var(--muted); }

.idea-domains { display: flex; gap: 4px; flex-shrink: 0; flex-wrap: wrap; }
.domain-tag {
  padding: 1px 7px; border-radius: var(--radius-sm);
  background: var(--surface-2); border: 1px solid var(--border);
  font-size: 11px; color: var(--muted); white-space: nowrap;
}
.idea-status { flex-shrink: 0; }
.ist-done { background: var(--success-soft); color: var(--success); border-color: transparent; }
.ist-in_progress { background: var(--accent-soft); color: var(--accent); border-color: transparent; }
.ist-needs_info { background: var(--danger-soft); color: var(--danger); border-color: transparent; }

.idea-quick { display: flex; gap: 2px; flex-shrink: 0; }
.idea-quick .idea-done:hover { color: var(--success); }
.idea-quick .idea-del:hover { color: var(--danger); }

.idea-body { padding: 4px 16px 16px; border-top: 1px solid var(--border-soft); display: flex; flex-direction: column; gap: 10px; }
.idea-summary { margin: 10px 0 0; }
.idea-detail { margin: 0; font-size: 13px; color: var(--muted); }
.idea-questions {
  background: var(--warn-soft);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 9px 12px;
  font-size: 13px;
}
.idea-questions strong { color: var(--warn); font-weight: 600; }
.idea-questions ul { margin: 6px 0 0; padding-left: 18px; }
.idea-meta-grid { display: flex; gap: 12px; flex-wrap: wrap; }
.idea-meta-grid label { display: flex; flex-direction: column; gap: 4px; font-size: 11.5px; color: var(--muted); }
.idea-domain-edit { display: flex; gap: 6px; flex-wrap: wrap; }
.idea-raw { font-size: 13px; }
.idea-raw summary { cursor: pointer; color: var(--muted); }
.idea-reason { margin: 8px 0 4px; font-size: 12px; color: var(--muted); }
.idea-rawtext {
  margin: 0; padding: 9px 12px;
  background: var(--surface-2); border-left: 2px solid var(--border);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  white-space: pre-wrap; word-break: break-word; font-size: 12px; color: var(--muted);
}
.idea-actions { display: flex; gap: 8px; align-items: center; }
.idea-rowstatus { font-size: 12.5px; color: var(--muted); }
.idea-rowstatus.err { color: var(--danger); }
.idea-rowstatus.ok { color: var(--success); }

#idea-add-text { width: 100%; }
.idea-add-foot { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.idea-curl {
  background: var(--surface-2); border: 1px solid var(--border); border-radius: var(--radius-sm);
  padding: 10px 12px; font-size: 12px; white-space: pre-wrap; word-break: break-all; overflow-x: auto;
}

/* =====================================================================
   YouTube › Videobeschreibung
   ===================================================================== */
.yt-desc { max-width: 1040px; margin: 28px auto; padding: 0 28px; display: flex; flex-direction: column; gap: 14px; }
.yt-drop {
  display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 16px; box-shadow: var(--shadow);
}
.yt-drop #yt-filename { flex: 1; min-width: 120px; font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.yt-hint { font-size: 12.5px; margin: 0; }
.yt-status { font-size: 13px; min-height: 18px; }
.yt-status.ok { color: var(--success); }
.yt-status.err { color: var(--danger); }

/* Adobe-Verbindungsstatus (Audio verbessern) */
.adobe-status {
  display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 12px 16px; box-shadow: var(--shadow);
}
.ae-pill { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 600; }
.ae-pill .ae-dot { width: 10px; height: 10px; border-radius: 999px; background: var(--text-muted); flex: none; }
.ae-pill.ok { color: var(--success); }
.ae-pill.ok .ae-dot { background: var(--success); }
.ae-pill.err { color: var(--danger); }
.ae-pill.err .ae-dot { background: var(--danger); }
.ae-pill.checking { color: var(--text-muted); }
.ae-pill.checking .ae-dot { background: var(--text-muted); animation: ae-blink 1s ease-in-out infinite; }
@keyframes ae-blink { 0%, 100% { opacity: 0.3; } 50% { opacity: 1; } }
.ae-actions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-left: auto; }

/* Fortschrittsleiste */
.yt-progress { display: flex; flex-direction: column; gap: 6px; }
.bar { height: 8px; background: var(--surface-2); border: 1px solid var(--border); border-radius: 999px; overflow: hidden; }
.bar-fill {
  height: 100%; width: 0%;
  background: var(--accent); border-radius: 999px;
  transition: width 0.5s ease;
  position: relative; overflow: hidden;
}
.bar-fill.active::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.45), transparent);
  transform: translateX(-100%);
  animation: barshimmer 1.25s ease-in-out infinite;
}
@keyframes barshimmer { to { transform: translateX(100%); } }
.bar-meta { display: flex; justify-content: space-between; font-size: 12.5px; color: var(--muted); }
.yt-output { display: flex; flex-direction: column; gap: 8px; }
.yt-output-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
#yt-desc-text { min-height: 460px; font-size: 13.5px; line-height: 1.6; }

/* =====================================================================
   Responsiv
   ===================================================================== */
@media (max-width: 640px) {
  .app { flex-direction: column; }
  .sidebar { width: 100%; height: auto; position: static; border-right: none; border-bottom: 1px solid var(--border); }
  .sidebar-foot { border: none; padding-top: 8px; }
  .list, .overview, .lc-toolbar, .idea-list, .ideas-toolbar, .ideas-count, .lc-classroom-bar { padding-left: 16px; padding-right: 16px; }
  .toast-host { left: 12px; right: 12px; }
  .toast { max-width: none; }
}

/* =====================================================================
   Mikrofon-Pegel (Waveform während der Aufnahme)
   ===================================================================== */
.rec-wave {
  height: 34px;
  width: 220px;
  max-width: 100%;
  display: block;
  border-radius: var(--radius-sm);
  background: var(--surface-2);
  border: 1px solid var(--border);
}

/* =====================================================================
   Toasts (Push-Benachrichtigungen oben rechts)
   ===================================================================== */
.toast-host {
  position: fixed;
  top: 16px;
  right: 16px;
  z-index: 1000;
  display: flex;
  flex-direction: column;
  gap: 8px;
  pointer-events: none;
}
.toast {
  pointer-events: auto;
  display: flex;
  align-items: flex-start;
  gap: 10px;
  max-width: 340px;
  padding: 12px 14px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-left: 3px solid var(--accent);
  border-radius: var(--radius);
  box-shadow: var(--shadow-md);
  font-size: 13px;
  color: var(--text);
  transform: translateX(120%);
  opacity: 0;
  transition: transform 0.28s ease, opacity 0.28s ease;
}
.toast.show { transform: translateX(0); opacity: 1; }
.toast.ok { border-left-color: var(--success); }
.toast.err { border-left-color: var(--danger); }
.toast .toast-ico { flex: 0 0 auto; display: flex; margin-top: 1px; }
.toast.ok .toast-ico { color: var(--success); }
.toast.err .toast-ico { color: var(--danger); }
.toast-body { flex: 1; min-width: 0; line-height: 1.45; }
.toast-title { font-weight: 600; }
.toast-msg { color: var(--muted); font-size: 12.5px; }
