/* Allgemeine KI (unten links) */
.oai-fab { position: fixed; left: 16px; bottom: 16px; z-index: 95; width: 52px; height: 52px; border-radius: 50%; border: 0; cursor: pointer; background: var(--ink, #1b1b24); color: var(--chalk, #fff); font: inherit; font-weight: 700; box-shadow: 0 6px 20px rgba(0, 0, 0, .3); }
.oai-fab:focus-visible { outline: 3px solid var(--brass, #b8923a); outline-offset: 2px; }
.oai-panel { position: fixed; left: 16px; bottom: 80px; z-index: 96; width: min(26rem, calc(100vw - 32px)); height: min(36rem, calc(100vh - 110px)); display: flex; flex-direction: column; gap: 10px; padding: 14px; border-radius: 18px; background: var(--paper, #fff); color: var(--ink, #1b1b24); border: 1px solid var(--line, #e2e0da); box-shadow: 0 12px 40px rgba(0, 0, 0, .25); }
.oai-head { display: flex; align-items: center; gap: 10px; }
.oai-bal { margin-left: auto; font-size: .85rem; opacity: .75; }
.oai-x { border: 0; background: transparent; color: inherit; font-size: 1.5rem; line-height: 1; cursor: pointer; padding: 0 6px; }
.oai-tabs { display: flex; gap: 6px; }
.oai-tab { font: inherit; font-size: .85rem; padding: 5px 12px; border-radius: 999px; border: 1px solid var(--line, #e2e0da); background: transparent; color: inherit; cursor: pointer; }
.oai-tab[aria-pressed="true"] { background: var(--ink, #1b1b24); color: var(--chalk, #fff); }
.oai-log { flex: 1 1 auto; overflow-y: auto; display: flex; flex-direction: column; gap: 8px; padding: 2px; }
.oai-msg { max-width: 92%; padding: 10px 14px; border-radius: 18px; display: grid; gap: 4px; }
.oai-msg--ai { align-self: flex-start; background: var(--brass-soft, #f1e7cf); border-bottom-left-radius: 6px; }
.oai-msg--me { align-self: flex-end; background: var(--ink, #1b1b24); color: var(--chalk, #fff); border-top-right-radius: 6px; }
.oai-text { white-space: pre-wrap; overflow-wrap: anywhere; line-height: 1.45; }
.oai-md { white-space: normal; display: grid; gap: 8px; }
.oai-md p, .oai-md ul, .oai-md ol { margin: 0; }
.oai-md ul, .oai-md ol { padding-left: 1.2rem; display: grid; gap: 3px; }
.oai-md code { font-size: .88em; padding: 1px 6px; border-radius: 6px; background: rgba(127, 127, 127, .18); }
.oai-blk { animation: oai-blk .45s cubic-bezier(.22, 1, .36, 1) both; }
.oai-msg { animation: oai-pop .35s cubic-bezier(.22, 1, .36, 1) both; }
.oai-typing { display: flex; gap: 5px; padding: 6px 2px; }
.oai-typing span { width: 8px; height: 8px; border-radius: 50%; background: currentColor; opacity: .35; animation: oai-dot 1.1s ease-in-out infinite; }
.oai-typing span:nth-child(2) { animation-delay: .15s; }
.oai-typing span:nth-child(3) { animation-delay: .3s; }
.oai-chips { display: flex; flex-wrap: wrap; gap: 8px; align-self: stretch; }
.oai-chip { font: inherit; font-size: .86rem; text-align: left; padding: 8px 14px; border-radius: 999px; cursor: pointer; border: 1px solid var(--line, #e2e0da); background: transparent; color: inherit; animation: oai-pop .4s cubic-bezier(.22, 1, .36, 1) both; transition: transform .15s, background .2s, border-color .2s; }
.oai-chip:hover { transform: translateY(-2px); background: var(--brass-soft, #f1e7cf); border-color: var(--brass, #b8923a); }
.oai-chip--more { opacity: .7; border-style: dashed; }
@keyframes oai-pop { from { opacity: 0; transform: translateY(10px) scale(.97); } to { opacity: 1; transform: none; } }
@keyframes oai-blk { from { opacity: 0; transform: translateY(6px); filter: blur(3px); } to { opacity: 1; transform: none; filter: none; } }
@keyframes oai-dot { 0%, 80%, 100% { transform: translateY(0); opacity: .3; } 40% { transform: translateY(-5px); opacity: .9; } }
@media (prefers-reduced-motion: reduce) { .oai-msg, .oai-blk, .oai-chip, .oai-typing span { animation: none !important; transition: none !important; } }
.oai-meta { font-size: .75rem; opacity: .7; }
.oai-plan { align-self: stretch; display: grid; gap: 6px; padding: 10px 12px; border-radius: 14px; border: 1px solid var(--line, #e2e0da); font-size: .85rem; }
.oai-plan ul { margin: 0; padding-left: 1.1rem; max-height: 10rem; overflow-y: auto; }
.oai-plan-a { display: flex; gap: 8px; }
.oai-btn { font: inherit; font-size: .85rem; padding: 5px 14px; border-radius: 999px; border: 1px solid var(--line, #e2e0da); background: transparent; color: inherit; cursor: pointer; }
.oai-btn--pri { background: var(--ink, #1b1b24); color: var(--chalk, #fff); border-color: transparent; }
.oai-btn:disabled { opacity: .5; cursor: default; }
.oai-form { display: flex; gap: 8px; }
.oai-input { flex: 1 1 auto; min-width: 0; font: inherit; padding: 10px 14px; border-radius: 999px; border: 1px solid var(--line, #e2e0da); }
.oai-send { font: inherit; padding: 10px 16px; border-radius: 999px; border: 0; background: var(--ink, #1b1b24); color: var(--chalk, #fff); cursor: pointer; }
.oai-send:disabled { opacity: .5; cursor: default; }
.oai-note { margin: 0; font-size: .72rem; opacity: .65; }

/* Quarantaene (Verwaltung) */
.oai-qbtn { position: fixed; left: 76px; bottom: 16px; z-index: 95; height: 52px; padding: 0 18px; border-radius: 999px; border: 1px solid var(--line, #e2e0da); cursor: pointer; background: var(--paper, #fff); color: var(--ink, #1b1b24); font: inherit; font-size: .85rem; box-shadow: 0 6px 20px rgba(0, 0, 0, .2); }
.oai-qbtn--solo { left: 16px; }
.oai-qbtn--alert { background: var(--brass-soft, #f1e7cf); font-weight: 700; }
.oai-panel--q { bottom: 80px; }
.oai-qrow { display: grid; gap: 4px; padding: 10px 12px; border-radius: 14px; border: 1px solid var(--line, #e2e0da); }
.oai-qname { overflow-wrap: anywhere; }

/* ---- Optik wie in der Kunden-App (Avatar, Blasen mit Rand, Kopfzeile, Senden-Knopf) ---- */
.oai-panel, .cai { width: min(28rem, calc(100vw - 32px)); gap: 12px; padding: 16px; border-radius: 20px; }
.oai-head { gap: 12px; flex-wrap: wrap; }
.oai-ttl { display: grid; gap: 1px; min-width: 0; }
.oai-ttl strong { font-size: 1rem; }
.oai-sub { font-size: .78rem; opacity: .65; }
.oai-bal { margin-left: auto; font-size: .82rem; opacity: .75; white-space: nowrap; }
.oai-new { font: inherit; font-size: .8rem; font-weight: 700; padding: 6px 12px; border-radius: 999px; cursor: pointer; border: 1px solid var(--line, #e2e0da); background: transparent; color: inherit; transition: transform .15s, background .2s; }
.oai-new:hover { transform: translateY(-1px); background: var(--brass-soft, #f1e7cf); }
.oai-av { flex: none; width: 34px; height: 34px; display: grid; place-items: center; border-radius: 12px; color: #fff; background: linear-gradient(135deg, var(--brass, #b8923a), #7a5aa6); box-shadow: 0 6px 16px rgba(122, 90, 166, .35); }
.oai-av__i { width: 18px; height: 18px; }
.oai-log, .cai-log { gap: 12px; padding: 6px 2px; scroll-behavior: smooth; }
.oai-row { display: flex; align-items: flex-end; gap: 10px; animation: oai-pop .38s cubic-bezier(.22, 1, .36, 1) both; }
.oai-row--me { align-self: flex-end; justify-content: flex-end; }
.oai-row--ai { align-self: flex-start; }
.oai-row .oai-msg { animation: none; max-width: min(100%, 22rem); box-shadow: 0 2px 10px rgba(0, 0, 0, .12); border-radius: 20px; padding: 12px 16px; }
.oai-row .oai-msg--ai { background: var(--brass-soft, #f1e7cf); border: 1px solid rgba(184, 146, 58, .25); border-bottom-left-radius: 6px; }
.oai-row .oai-msg--me { border-top-right-radius: 6px; }
.oai-text { line-height: 1.55; }
.oai-md strong { font-weight: 700; }
.oai-md li::marker { color: var(--brass, #b8923a); font-weight: 700; }
.oai-chips { padding-left: 44px; }
.oai-form { gap: 10px; }
.oai-send { display: inline-flex; align-items: center; gap: 8px; font-weight: 700; transition: transform .15s; }
.oai-send:hover:not(:disabled) { transform: translateY(-1px); }
.oai-send__i { width: 18px; height: 18px; transition: transform .3s; }
.oai-send:hover:not(:disabled) .oai-send__i { transform: translateX(3px) rotate(-8deg); }
.oai-input { transition: box-shadow .2s, border-color .2s; }
.oai-input:focus { outline: none; box-shadow: 0 0 0 3px rgba(184, 146, 58, .35); border-color: var(--brass, #b8923a); }
.oai-plan { padding: 14px 16px; border-radius: 18px; box-shadow: 0 8px 24px rgba(0, 0, 0, .18); margin-left: 44px; align-self: stretch; animation: oai-pop .45s cubic-bezier(.22, 1, .36, 1) both; }
.oai-plan-h { display: flex; align-items: center; gap: 8px; }
.oai-plan__i { width: 18px; height: 18px; color: var(--brass, #b8923a); }
@media (prefers-reduced-motion: reduce) { .oai-row, .oai-plan { animation: none !important; } .oai-log, .cai-log { scroll-behavior: auto; } }
