/**
 * src/css/dobo2-dock.css
 * DoBo 2.0 — Kodee-style redesign (2026-07-31).
 * Launcher: "DoBo fragen" pill w/ animated gradient border in the navbar.
 * Panel: white sheet, Chat|Verlauf tabs, greeting empty-state w/ suggestions,
 * one rounded input (attach bottom-left, mic bottom-right), disclaimer.
 * All selectors #dobo2-* / .dobo2-* — no collisions with app CSS.
 * AI-iridescent gradient: amber → coral → violet → sky (brand amber tied in).
 */

@property --dobo2-angle {
  syntax: '<angle>';
  initial-value: 0deg;
  inherits: false;
}

#dobo2-root {
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
}
#dobo2-root *, #dobo2-root *::before, #dobo2-root *::after { box-sizing: border-box; }

/* ─── Nav group ───────────────────────────────────────────────────────────── */
.dobo2-navgroup {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.dobo2-navgroup-floating {
  position: fixed;
  top: 14px;
  right: 16px;
  z-index: 9998;
}
/* Base icon button (memory / usage modules share this class) */
.dobo2-navbtn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border: 1px solid #E2E8F0;
  border-radius: 9999px;
  background: #ffffff;
  color: #334155;
  cursor: pointer;
  transition: background .15s ease, color .15s ease, border-color .15s ease, transform .12s ease;
}
.dobo2-navbtn:hover { background: #F1F5F9; color: #022448; }
.dobo2-navbtn:active { transform: scale(.95); }
.dobo2-navgroup svg { width: 20px; height: 20px; display: block; }
.dobo2-navgroup .dobo2-navbtn-glyph { display: none; }

/* ─── Launcher pill: "DoBo fragen" w/ animated gradient border ────────────── */
.dobo2-pill {
  width: auto;
  height: 38px;
  padding: 0;
  border: none;
  background: transparent;
  position: relative;
  border-radius: 9999px;
}
.dobo2-pill::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 9999px;
  padding: 1.5px;
  background: conic-gradient(from var(--dobo2-angle),
    #fea619, #ff6b4a, #8b5cf6, #38bdf8, #fea619);
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
          mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
          mask-composite: exclude;
  animation: dobo2-rotate 4.5s linear infinite;
}
.dobo2-pill:hover::before { animation-duration: 1.8s; }
.dobo2-pill-inner {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  height: 38px;
  padding: 0 14px 0 11px;
  border-radius: 9999px;
  background: #ffffff;
  color: #0f172a;
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
  transition: background .15s ease;
}
.dobo2-pill:hover .dobo2-pill-inner { background: #fafbff; }
.dobo2-pill:active { transform: scale(.97); }
.dobo2-pill-spark { width: 17px; height: 17px; color: #7c5cff; flex-shrink: 0; }
@keyframes dobo2-rotate { to { --dobo2-angle: 360deg; } }
@media (max-width: 520px) {
  .dobo2-pill-label { display: none; }
  .dobo2-pill-inner { padding: 0 11px; }
}

/* ─── Approval bell: nav badge button ─────────────────────────────────────── */
.dobo2-bell {
  display: none;
  align-items: center;
  justify-content: center;
  min-width: 22px;
  height: 22px;
  padding: 0 6px;
  border: 2px solid #ffffff;
  border-radius: 9999px;
  background: #dc2626;
  color: #ffffff;
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(0,0,0,.22);
}
.dobo2-bell.show { display: inline-flex; }

/* ─── Panel sheet ─────────────────────────────────────────────────────────── */
.dobo2-panel {
  position: fixed;
  right: 18px;
  bottom: 18px;
  top: auto;
  width: 440px;
  max-width: calc(100vw - 24px);
  height: min(680px, calc(100vh - 96px));
  background: #ffffff;
  border-radius: 22px;
  border: 1px solid rgba(226, 232, 240, .9);
  box-shadow: 0 28px 80px rgba(2, 36, 72, .30), 0 6px 20px rgba(2, 36, 72, .12);
  display: none;
  flex-direction: column;
  overflow: hidden;
  z-index: 9999;
}
.dobo2-panel.open { display: flex; animation: dobo2-sheet-in .28s cubic-bezier(.16,1,.3,1); }
@keyframes dobo2-sheet-in {
  from { opacity: 0; transform: translateY(14px) scale(.98); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}
/* Floating ambient color inside (Kodee vibe): two soft blobs, slow drift */
.dobo2-panel::before {
  content: '';
  position: absolute;
  inset: -40% -30% auto -30%;
  height: 60%;
  background:
    radial-gradient(38% 45% at 22% 60%, rgba(254,166,25,.14), transparent 70%),
    radial-gradient(34% 42% at 78% 40%, rgba(139,92,246,.13), transparent 70%),
    radial-gradient(30% 40% at 55% 75%, rgba(56,189,248,.11), transparent 70%);
  filter: blur(28px);
  animation: dobo2-drift 11s ease-in-out infinite alternate;
  pointer-events: none;
  z-index: 0;
}
@keyframes dobo2-drift {
  from { transform: translate3d(-3%, 0, 0) rotate(-2deg); }
  to   { transform: translate3d(3%, 6%, 0) rotate(2deg); }
}
.dobo2-panel > * { position: relative; z-index: 1; }
@media (prefers-reduced-motion: reduce) {
  .dobo2-panel::before, .dobo2-pill::before { animation: none; }
}

/* ─── Header: tabs + actions ──────────────────────────────────────────────── */
.dobo2-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 12px 12px 8px 14px;
  background: transparent;
  border-bottom: none;
}
.dobo2-tabs {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  padding: 3px;
  border-radius: 9999px;
  background: #F1F5F9;
}
.dobo2-tab {
  border: none;
  background: transparent;
  border-radius: 9999px;
  padding: 6px 16px;
  font-family: inherit;
  font-size: 13px;
  font-weight: 600;
  color: #64748b;
  cursor: pointer;
  transition: background .15s ease, color .15s ease, box-shadow .15s ease;
}
.dobo2-tab.active {
  background: #ffffff;
  color: #0f172a;
  box-shadow: 0 1px 3px rgba(15,23,42,.12);
}
.dobo2-head-actions { display: inline-flex; align-items: center; gap: 2px; }
.dobo2-iconbtn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border: none;
  border-radius: 9px;
  background: transparent;
  color: #64748b;
  cursor: pointer;
  transition: background .13s ease, color .13s ease, transform .1s ease;
}
.dobo2-iconbtn:hover { background: #F1F5F9; color: #022448; }
.dobo2-iconbtn:active { transform: scale(.93); }
.dobo2-iconbtn svg { width: 18px; height: 18px; }
.dobo2-close {
  border: none;
  background: transparent;
  width: 32px;
  height: 32px;
  border-radius: 9px;
  font-size: 20px;
  color: #64748b;
  cursor: pointer;
  line-height: 1;
  transition: background .13s ease, color .13s ease;
}
.dobo2-close:hover { background: #F1F5F9; color: #022448; }

/* Session caption (empty = hidden) */
.dobo2-session-label {
  padding: 0 16px 4px;
  font-size: 11px;
  font-weight: 600;
  color: #94a3b8;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.dobo2-session-label:empty { display: none; }

/* ─── Views ───────────────────────────────────────────────────────────────── */
.dobo2-body { flex: 1; display: flex; min-height: 0; }
.dobo2-view { flex: 1; display: none; flex-direction: column; min-width: 0; min-height: 0; }
.dobo2-view.active { display: flex; }

/* ─── Empty state: greeting + suggestions (Kodee) ─────────────────────────── */
.dobo2-empty {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;   /* Kodee: greeting block + suggestions sit just above the input */
  gap: 6px;
  padding: 12px 22px 10px;
  text-align: center;
  min-height: 0;
  overflow-y: auto;
}
.dobo2-panel.has-content .dobo2-empty { display: none; }
.dobo2-panel:not(.has-content) .dobo2-chat { display: none; }
.dobo2-empty-logo {
  width: 46px;
  height: 46px;
  color: #7c5cff;
  margin-bottom: 6px;
  filter: drop-shadow(0 4px 14px rgba(124, 92, 255, .35));
  animation: dobo2-bob 3.2s ease-in-out infinite;
  margin-top: auto;
}
.dobo2-sugg-list { margin-top: 18px; }
.dobo2-empty-logo svg { width: 100%; height: 100%; }
@keyframes dobo2-bob {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-5px); }
}
.dobo2-empty-title {
  font-size: 20px;
  font-weight: 700;
  letter-spacing: -.015em;
  color: #0f172a;
}
.dobo2-empty-sub {
  font-size: 13.5px;
  color: #64748b;
  margin-bottom: 14px;
}
.dobo2-sugg-list {
  width: 100%;
  display: flex;
  flex-direction: column;
  text-align: left;
}
.dobo2-sugg {
  display: flex;
  align-items: center;
  gap: 11px;
  width: 100%;
  padding: 11px 6px;
  border: none;
  border-top: 1px solid #F1F5F9;
  background: transparent;
  font-family: inherit;
  font-size: 13px;
  font-weight: 500;
  color: #334155;
  text-align: left;
  cursor: pointer;
  transition: background .13s ease, color .13s ease, padding .15s ease;
}
.dobo2-sugg:first-child { border-top: none; }
.dobo2-sugg:hover { background: #FAFBFF; color: #022448; padding-left: 10px; border-radius: 10px; }
.dobo2-sugg svg { width: 17px; height: 17px; color: #8b5cf6; flex-shrink: 0; }

/* ─── Chat stream ─────────────────────────────────────────────────────────── */
.dobo2-chat {
  flex: 1;
  overflow-y: auto;
  padding: 10px 16px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-height: 0;
}
.dobo2-chat::-webkit-scrollbar { width: 5px; }
.dobo2-chat::-webkit-scrollbar-thumb { background: #E2E8F0; border-radius: 3px; }
.dobo2-bubble {
  max-width: 86%;
  padding: 10px 13px;
  border-radius: 15px;
  font-size: 13.5px;
  line-height: 1.55;
  white-space: pre-wrap;
  word-wrap: break-word;
}
.dobo2-user {
  align-self: flex-end;
  background: #022448;
  color: #fff;
  border-bottom-right-radius: 5px;
  box-shadow: 0 1px 3px rgba(2,36,72,.22);
}
.dobo2-assistant {
  align-self: flex-start;
  background: #F8FAFC;
  color: #1e293b;
  border: 1px solid #EEF2F7;
  border-bottom-left-radius: 5px;
}

/* ─── Rendered markdown (assistant FINAL replies only) ─────────────────
 * Applied via renderAssistantHTML() in dobo2-dock.js/dobo-page.js when the
 * bubble's content is HTML from window.DoboMarkdown.render() (marked ->
 * DOMPurify — see src/js/dobo-markdown.js) rather than plain textContent.
 * Live-streaming partial tokens stay PLAIN textContent (no .dobo2-rendered
 * class, so the base .dobo2-bubble white-space:pre-wrap above still governs
 * them — correct for raw in-flight text). Once the .dobo2-rendered class is
 * added, `white-space: normal` takes over instead: marked's HTML output has
 * real newline characters BETWEEN block tags (e.g. right after `</h1>`,
 * before `<p>`) purely for source readability — with pre-wrap still active
 * those would render as extra visible blank lines; block elements' own
 * margins below are what create spacing instead. `<pre>` gets its OWN
 * explicit white-space rule further down since code blocks must still
 * preserve their internal formatting exactly. */
.dobo2-bubble.dobo2-rendered { white-space: normal; }
.dobo2-bubble.dobo2-rendered > *:first-child { margin-top: 0; }
.dobo2-bubble.dobo2-rendered > *:last-child { margin-bottom: 0; }

.dobo2-bubble.dobo2-rendered p { margin: 0 0 8px; }
.dobo2-bubble.dobo2-rendered p:last-child { margin-bottom: 0; }

.dobo2-bubble.dobo2-rendered h1,
.dobo2-bubble.dobo2-rendered h2,
.dobo2-bubble.dobo2-rendered h3,
.dobo2-bubble.dobo2-rendered h4 {
  margin: 14px 0 6px;
  font-weight: 700;
  line-height: 1.3;
  color: #0f172a;
}
.dobo2-bubble.dobo2-rendered h1 { font-size: 17px; }
.dobo2-bubble.dobo2-rendered h2 { font-size: 15.5px; }
.dobo2-bubble.dobo2-rendered h3 { font-size: 14.5px; }
.dobo2-bubble.dobo2-rendered h4 { font-size: 13.5px; }

.dobo2-bubble.dobo2-rendered ul,
.dobo2-bubble.dobo2-rendered ol {
  margin: 4px 0 8px;
  padding-left: 22px;
}
.dobo2-bubble.dobo2-rendered li { margin: 3px 0; }
.dobo2-bubble.dobo2-rendered li > ul,
.dobo2-bubble.dobo2-rendered li > ol { margin: 3px 0 3px; }

.dobo2-bubble.dobo2-rendered strong { font-weight: 700; color: inherit; }
.dobo2-bubble.dobo2-rendered em { font-style: italic; }
.dobo2-bubble.dobo2-rendered del { text-decoration: line-through; opacity: .75; }

.dobo2-bubble.dobo2-rendered blockquote {
  margin: 6px 0;
  padding: 2px 12px;
  border-left: 3px solid #fea619;
  color: #475569;
  background: rgba(254,166,25,.06);
  border-radius: 0 6px 6px 0;
}
.dobo2-bubble.dobo2-rendered blockquote p { margin: 4px 0; }

.dobo2-bubble.dobo2-rendered code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, 'Liberation Mono', monospace;
  font-size: .92em;
  background: #EEF2F7;
  color: #0f172a;
  padding: 1px 5px;
  border-radius: 5px;
  word-break: break-word;
}
.dobo2-bubble.dobo2-rendered pre {
  margin: 6px 0;
  padding: 10px 12px;
  background: #0f172a;
  color: #e2e8f0;
  border-radius: 10px;
  overflow-x: auto;
  white-space: pre;
  max-width: 100%;
}
.dobo2-bubble.dobo2-rendered pre code {
  background: transparent;
  color: inherit;
  padding: 0;
  border-radius: 0;
  font-size: 12px;
  line-height: 1.5;
}

.dobo2-bubble.dobo2-rendered a {
  color: #b45309;
  font-weight: 600;
  text-decoration: underline;
  text-decoration-color: rgba(180,83,9,.35);
  text-underline-offset: 2px;
}
.dobo2-bubble.dobo2-rendered a:hover { text-decoration-color: currentColor; }

.dobo2-bubble.dobo2-rendered hr {
  margin: 10px 0;
  border: none;
  border-top: 1px solid #E2E8F0;
}

.dobo2-bubble.dobo2-rendered table {
  margin: 6px 0;
  border-collapse: collapse;
  font-size: 12.5px;
  display: block;
  width: max-content;
  max-width: 100%;
  overflow-x: auto;
}
.dobo2-bubble.dobo2-rendered th,
.dobo2-bubble.dobo2-rendered td {
  padding: 5px 10px;
  border: 1px solid #E2E8F0;
  text-align: left;
}
.dobo2-bubble.dobo2-rendered th {
  background: #F1F5F9;
  font-weight: 600;
  color: #334155;
}

/* ─── Tool trace ──────────────────────────────────────────────────────────── */
.dobo2-trace {
  align-self: flex-start;
  max-width: 86%;
  font-size: 11.5px;
  color: #64748b;
  background: #F8FAFC;
  border: 1px solid #EEF2F7;
  border-radius: 11px;
  padding: 2px 11px;
  margin: 0;
}
.dobo2-trace-summary {
  cursor: pointer;
  padding: 6px 0;
  list-style: none;
  font-weight: 600;
  color: #475569;
  user-select: none;
}
.dobo2-trace-summary::-webkit-details-marker { display: none; }
.dobo2-trace-summary::before {
  content: '▸';
  display: inline-block;
  margin-right: 6px;
  transition: transform .12s ease;
}
.dobo2-trace[open] > .dobo2-trace-summary::before { transform: rotate(90deg); }
.dobo2-trace-list { padding: 2px 0 8px 4px; display: flex; flex-direction: column; gap: 4px; }
.dobo2-trace-row { display: flex; align-items: baseline; gap: 6px; line-height: 1.4; }
.dobo2-trace-glyph { flex-shrink: 0; width: 14px; text-align: center; }
.dobo2-trace-running .dobo2-trace-glyph { color: #fea619; animation: dobo2-spin 1s linear infinite; display: inline-block; }
.dobo2-trace-ok .dobo2-trace-glyph { color: #16a34a; }
.dobo2-trace-fail .dobo2-trace-glyph { color: #dc2626; }
.dobo2-trace-fail .dobo2-trace-label, .dobo2-trace-fail .dobo2-trace-extra { color: #b91c1c; }
.dobo2-trace-extra { color: #94a3b8; }
@keyframes dobo2-spin { from { transform: rotate(0); } to { transform: rotate(360deg); } }

/* ─── Status line ─────────────────────────────────────────────────────────── */
.dobo2-status { min-height: 14px; padding: 0 16px; font-size: 11px; color: #64748b; }
.dobo2-status.error { color: #dc2626; }

/* ─── Composer (Kodee: one rounded box, controls inside) ──────────────────── */
.dobo2-composer {
  padding: 8px 12px 10px;
  background: transparent;
  border-top: none;
}
.dobo2-inputwrap {
  border: 1.5px solid #0f172a;
  border-radius: 18px;
  background: #ffffff;
  padding: 10px 12px 8px;
  transition: border-color .15s ease, box-shadow .18s ease;
}
.dobo2-inputwrap:focus-within {
  border-color: transparent;
  box-shadow: 0 0 0 2px #fea619, 0 0 0 5px rgba(254,166,25,.18), 0 8px 24px rgba(139,92,246,.10);
}
.dobo2-input {
  display: block;
  width: 100%;
  border: none;
  resize: none;
  padding: 2px 2px 6px;
  font-family: inherit;
  font-size: 13.5px;
  line-height: 1.5;
  color: #0f172a;
  background: transparent;
  outline: none;
  max-height: 120px;
}
.dobo2-input::placeholder { color: #94a3b8; }
.dobo2-input:disabled { opacity: .55; }
/* RK review fix: design-system.css's global a11y rule
   (`textarea:focus-visible { outline: 2px solid var(--amber-500); ... }`,
   specificity (0,1,1)) drew a SECOND amber box around this textarea, INSIDE
   .dobo2-inputwrap, which already shows its own gradient focus ring on the
   wrap itself (see .dobo2-inputwrap:focus-within above). We do not touch
   design-system.css (shared a11y rule for every other input in the app) —
   instead we out-specify it here (0,3,0) and neutralize the inner box
   entirely; the OUTER glow on .dobo2-inputwrap is the only ring left. */
.dobo2-inputwrap .dobo2-input,
.dobo2-inputwrap .dobo2-input:focus,
.dobo2-inputwrap .dobo2-input:focus-visible {
  outline: none !important;
  border: none !important;
  box-shadow: none !important;
  background: transparent;
}
.dobo2-inputbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.dobo2-bar-left, .dobo2-bar-right { display: inline-flex; align-items: center; gap: 4px; }
.dobo2-attach { color: #64748b; }
.dobo2-autobtn { color: #94a3b8; }
.dobo2-autobtn.on { color: #b45309; background: #FEF3C7; }
.dobo2-autobtn.on:hover { background: #FDE68A; color: #92400e; }

/* Send: amber circle, arrow-up */
.dobo2-send {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border: none;
  border-radius: 9999px;
  background: #fea619;
  color: #3d2800;
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(254,166,25,.35);
  transition: background .13s ease, transform .1s ease, box-shadow .13s ease, opacity .13s ease;
}
.dobo2-send:hover { background: #feb53c; }
.dobo2-send:active { transform: scale(.92); }
.dobo2-send:disabled { opacity: .45; cursor: default; box-shadow: none; }
.dobo2-send svg { width: 17px; height: 17px; }
.dobo2-stop { background: #0f172a; color: #fff; box-shadow: none; }
.dobo2-stop:hover { background: #334155; }

/* Mic (voice-input.js .vin-btn) inside the bar: gradient-ring circle */
.dobo2-bar-right .vin-btn {
  width: 34px !important;
  height: 34px !important;
  border-radius: 9999px !important;
  border: none !important;
  position: relative;
  background: #fff !important;
  color: #0f172a !important;
}
.dobo2-bar-right .vin-btn::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 9999px;
  padding: 1.5px;
  background: conic-gradient(from var(--dobo2-angle), #fea619, #ff6b4a, #8b5cf6, #38bdf8, #fea619);
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
          mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
          mask-composite: exclude;
  animation: dobo2-rotate 4.5s linear infinite;
}
.dobo2-bar-right .vin-btn.vin-recording { background: #FEF2F2 !important; color: #dc2626 !important; }

.dobo2-disclaimer {
  padding: 7px 4px 0;
  text-align: center;
  font-size: 10.5px;
  color: #94a3b8;
}

/* ─── Buttons still used by draft cards / history ─────────────────────────── */
.dobo2-btn {
  border: none;
  border-radius: 11px;
  padding: 9px 14px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
  transition: filter .13s ease, background .13s ease, transform .1s ease;
}
.dobo2-btn:active { transform: scale(.97); }
.dobo2-btn-amber { background: #fea619; color: #3d2800; box-shadow: 0 1px 4px rgba(254,166,25,.35); }
.dobo2-btn-amber:hover { filter: brightness(1.05); }
.dobo2-btn-amber:disabled { opacity: .5; cursor: default; }
.dobo2-btn-ghost { background: #F1F5F9; color: #475569; }
.dobo2-btn-ghost:hover { background: #E2E8F0; }

/* ─── History view ────────────────────────────────────────────────────────── */
.dobo2-hist-top { padding: 6px 14px 10px; }
.dobo2-hist-top .dobo2-btn { width: 100%; }
.dobo2-session-list { flex: 1; overflow-y: auto; padding: 0 10px 12px; min-height: 0; }
.dobo2-session-list::-webkit-scrollbar { width: 5px; }
.dobo2-session-list::-webkit-scrollbar-thumb { background: #E2E8F0; border-radius: 3px; }
.dobo2-session-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  color: #334155;
  font-size: 13px;
  padding: 10px 10px;
  border-radius: 11px;
  cursor: pointer;
  margin-bottom: 2px;
  transition: background .12s ease;
}
.dobo2-session-item:hover { background: #F8FAFC; }
.dobo2-session-item.active { background: #FFF7E8; color: #0f172a; }
.dobo2-session-name { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; cursor: pointer; font-weight: 500; }
.dobo2-session-actions { display: none; gap: 2px; }
.dobo2-session-item:hover .dobo2-session-actions { display: inline-flex; }
.dobo2-mini { background: none; border: none; color: #94a3b8; font-size: 12px; cursor: pointer; padding: 2px 4px; border-radius: 6px; }
.dobo2-mini:hover { color: #b45309; background: #FEF3C7; }
.dobo2-hist-empty { padding: 26px 14px; text-align: center; font-size: 13px; color: #94a3b8; }

/* ─── Approval card / write note / draft cards ────────────────────────────── */
.dobo2-approval-card {
  align-self: flex-start;
  max-width: 92%;
  background: #FFFBEB;
  border: 1px solid #FDE68A;
  border-radius: 14px;
  padding: 11px 13px;
  font-size: 12.5px;
  color: #78350F;
  display: flex;
  flex-direction: column;
  gap: 4px;
  box-shadow: 0 1px 3px rgba(180,83,9,.08);
}
.dobo2-approval-card-title { font-weight: 700; color: #92400E; }
.dobo2-approval-card-summary { white-space: pre-wrap; word-wrap: break-word; color: #78350F; }
.dobo2-approval-card-note { font-size: 11px; color: #A16207; font-style: italic; }
.dobo2-write-note {
  align-self: flex-start;
  max-width: 92%;
  background: #ECFDF5;
  border: 1px solid #A7F3D0;
  border-radius: 11px;
  padding: 6px 11px;
  font-size: 12px;
  color: #065F46;
}
.dobo2-draft-card {
  align-self: flex-start;
  width: 96%;
  background: #ffffff;
  border: 1px solid #E2E8F0;
  border-radius: 16px;
  padding: 13px 14px;
  display: flex;
  flex-direction: column;
  gap: 9px;
  box-shadow: 0 4px 16px rgba(2,36,72,.07);
}
.dobo2-draft-card-header { display: flex; flex-direction: column; gap: 2px; }
.dobo2-draft-card-title { font-size: 14.5px; font-weight: 700; color: #0f172a; letter-spacing: -.01em; }
.dobo2-draft-card-counts { font-size: 12px; color: #64748b; font-weight: 500; }
.dobo2-draft-card-sources { font-size: 11px; color: #94a3b8; }
.dobo2-draft-section { display: flex; flex-direction: column; gap: 4px; font-size: 12px; color: #334155; }
.dobo2-draft-grid-wrap { overflow-x: auto; border: 1px solid #EEF2F7; border-radius: 10px; }
.dobo2-draft-grid { border-collapse: collapse; font-size: 11.5px; min-width: 100%; }
.dobo2-draft-grid th, .dobo2-draft-grid td { padding: 5px 9px; border-bottom: 1px solid #F1F5F9; text-align: left; white-space: nowrap; }
.dobo2-draft-grid th { background: #F8FAFC; font-weight: 600; color: #475569; position: sticky; top: 0; }
.dobo2-draft-warning { padding: 5px 9px; border-radius: 8px; font-size: 11.5px; }
.dobo2-warn-error { background: #FEF2F2; color: #b91c1c; }
.dobo2-warn-warning, .dobo2-warn-warn { background: #FFFBEB; color: #b45309; }
.dobo2-warn-info { background: #EFF6FF; color: #1d4ed8; }
.dobo2-draft-warning-list, .dobo2-draft-unmapped-list { display: flex; flex-direction: column; gap: 3px; }
.dobo2-draft-unmapped-item { font-size: 11.5px; color: #64748b; }
.dobo2-draft-more-note { font-size: 11px; color: #94a3b8; font-style: italic; }
.dobo2-draft-actions { display: flex; gap: 7px; flex-wrap: wrap; }
.dobo2-conf-badge { display: inline-flex; padding: 2px 8px; border-radius: 9999px; font-size: 10.5px; font-weight: 700; }
.dobo2-conf-high, .dobo2-conf-hoch { background: #DCFCE7; color: #15803d; }
.dobo2-conf-medium, .dobo2-conf-mittel { background: #FEF3C7; color: #b45309; }
.dobo2-conf-low, .dobo2-conf-niedrig { background: #F1F5F9; color: #64748b; }

/* ─── Admin approval inbox ────────────────────────────────────────────────── */
.dobo2-inbox-panel {
  position: fixed;
  right: 18px;
  bottom: 18px;
  width: 390px;
  max-width: calc(100vw - 24px);
  max-height: min(600px, calc(100vh - 96px));
  background: #ffffff;
  border-radius: 18px;
  box-shadow: 0 24px 64px rgba(2,36,72,.28);
  display: none;
  flex-direction: column;
  overflow: hidden;
  z-index: 9999;
  border: 1px solid #E2E8F0;
}
.dobo2-inbox-panel.open { display: flex; }
.dobo2-inbox-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 15px;
  background: #022448;
  color: #fff;
  font-weight: 600;
  font-size: 14px;
}
.dobo2-inbox-close { background: none; border: none; color: #fff; font-size: 18px; cursor: pointer; }
.dobo2-inbox-list { flex: 1; overflow-y: auto; padding: 10px 12px; display: flex; flex-direction: column; gap: 9px; }
.dobo2-inbox-item { border: 1px solid #E2E8F0; border-radius: 13px; padding: 11px 12px; display: flex; flex-direction: column; gap: 6px; font-size: 12.5px; }
.dobo2-inbox-item-meta { font-size: 11px; color: #64748b; }
.dobo2-inbox-item-summary { color: #0f172a; font-weight: 500; white-space: pre-wrap; word-wrap: break-word; }
.dobo2-inbox-item-detail { font-size: 11.5px; color: #475569; white-space: pre-wrap; word-wrap: break-word; }
.dobo2-inbox-item-actions { display: flex; gap: 7px; }
.dobo2-inbox-btn { border: none; border-radius: 9px; padding: 7px 13px; font-size: 12.5px; font-weight: 600; cursor: pointer; font-family: inherit; }
.dobo2-inbox-btn-approve { background: #DCFCE7; color: #15803d; }
.dobo2-inbox-btn-approve:hover { background: #BBF7D0; }
.dobo2-inbox-btn-deny { background: #FEF2F2; color: #b91c1c; }
.dobo2-inbox-btn-deny:hover { background: #FECACA; }
.dobo2-inbox-empty { padding: 24px 14px; text-align: center; font-size: 13px; color: #94a3b8; }
.dobo2-inbox-readonly-note { font-size: 11px; color: #94a3b8; font-style: italic; }

/* ─── Sidebar entry (injected on every page) ──────────────────────────────── */
.dobo2-sidelink-ic { width: 20px; height: 20px; flex-shrink: 0; color: #fea619; }

/* ─── Mobile: full sheet ──────────────────────────────────────────────────── */
@media (max-width: 640px) {
  .dobo2-panel {
    right: 8px;
    left: 8px;
    bottom: 8px;
    width: auto;
    height: calc(100dvh - 76px);
    border-radius: 18px;
  }
  .dobo2-inbox-panel { top: auto; right: 8px; left: 8px; bottom: 8px; width: auto; }
  .dobo2-bubble { max-width: 92%; }
}
@supports (padding: env(safe-area-inset-bottom)) {
  @media (max-width: 640px) {
    .dobo2-panel, .dobo2-inbox-panel { bottom: calc(8px + env(safe-area-inset-bottom)); }
  }
}

/* ── Read-aloud (TTS): composer toggle + per-message speaker ─────────────── */
.dobo2-ttsbtn { color: #94a3b8; }
.dobo2-ttsbtn.on { color: #b45309; background: #FEF3C7; }
.dobo2-ttsbtn.on:hover { background: #FDE68A; color: #92400e; }
.dobo2-bubble.dobo2-assistant { position: relative; }
.dobo2-ttsmsg {
  position: absolute; top: 6px; right: 6px;
  width: 26px; height: 26px; padding: 4px;
  opacity: 0; color: #94a3b8; background: rgba(255,255,255,.85);
  border-radius: 8px; transition: opacity .12s ease;
}
.dobo2-bubble.dobo2-assistant:hover .dobo2-ttsmsg,
.dobo2-ttsmsg.is-speaking { opacity: 1; }
.dobo2-ttsmsg:hover { color: #022448; background: #F1F5F9; }
.dobo2-ttsbtn.is-speaking, .dobo2-ttsmsg.is-speaking { color: #b45309; }
@media (prefers-reduced-motion: no-preference) {
  .dobo2-ttsbtn.is-speaking svg, .dobo2-ttsmsg.is-speaking svg { animation: dobo2-tts-pulse 1s ease-in-out infinite; }
  @keyframes dobo2-tts-pulse { 0%,100% { opacity: 1; } 50% { opacity: .45; } }
}
