/* Heilsan – Posteingang, Freigaben, Automationen, Dolmetscher */
.ib-grid { display: grid; grid-template-columns: minmax(280px, 380px) minmax(0, 1fr); gap: 14px; align-items: start; }
@media (max-width: 1100px) { .ib-grid { grid-template-columns: minmax(0, 1fr); } }
.ib-list { display: flex; flex-direction: column; gap: 6px; max-height: calc(100vh - 300px); overflow: auto; }
.ib-li { align-items: flex-start; }
.ib-kind { width: 30px; height: 30px; flex: 0 0 30px; display: grid; place-items: center; border-radius: 9px; background: var(--accent-soft); color: var(--accent); }
.ib-kind svg { width: 16px; height: 16px; }
.ib-kind.lg { width: 38px; height: 38px; flex-basis: 38px; }
.ib-kind.lg svg { width: 19px; height: 19px; }
.ib-detail { min-height: 420px; }
.ib-dgrid { display: grid; grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr); gap: 16px; }
@media (max-width: 1300px) { .ib-dgrid { grid-template-columns: minmax(0, 1fr); } }
.ib-pre { margin: 0; white-space: pre-wrap; word-break: break-word; font-family: var(--mono); font-size: 12px; line-height: 1.5; background: var(--bg2); border: 1px solid var(--line); border-radius: 10px; padding: 12px; max-height: 520px; overflow: auto; color: var(--text2); }
.ib-thumb { width: 120px; height: 90px; object-fit: cover; border-radius: 8px; border: 1px solid var(--line2); }
.ib-labs td { vertical-align: middle; }
.ib-labs tr.ib-crit td { background: var(--err-soft); }
.ib-summary { font-size: 13px; padding: 10px 12px; border-radius: 10px; background: var(--panel2); border: 1px solid var(--line); }
.ib-appr { align-items: flex-start; }
.ib-appr > .chip, .ib-li > .chip, .ib-li > .pill-status { flex: 0 0 auto; max-width: none; }
.ib-appr.lv-ci, .ib-appr.lv-major { border-color: rgba(248, 113, 113, 0.45); }
.ib-appr.lv-moderate { border-color: rgba(251, 191, 36, 0.4); }
.ib-rule.off { opacity: 0.55; }
.ib-switch { position: relative; width: 42px; height: 24px; flex: 0 0 42px; cursor: pointer; }
.ib-switch input { opacity: 0; width: 0; height: 0; position: absolute; }
.ib-switch span { position: absolute; inset: 0; border-radius: 999px; background: var(--panel3); border: 1px solid var(--line2); transition: background var(--t); }
.ib-switch span::after { content: ""; position: absolute; left: 3px; top: 3px; width: 16px; height: 16px; border-radius: 50%; background: var(--muted); transition: transform var(--t), background var(--t); }
.ib-switch input:checked + span { background: var(--accent-soft); border-color: var(--accent); }
.ib-switch input:checked + span::after { transform: translateX(18px); background: var(--accent); }
.card.kpi.alert .val { color: var(--err); }

/* Dolmetscher */
.ib-int { display: flex; flex-direction: column; gap: 12px; }
.ib-int-head { align-items: flex-end; gap: 14px; }
.ib-int-pane { min-height: 420px; }
.ib-conv { display: grid; grid-template-columns: minmax(220px, 300px) minmax(0, 1fr) minmax(220px, 300px); gap: 12px; align-items: stretch; }
@media (max-width: 1050px) { .ib-conv { grid-template-columns: minmax(0, 1fr); } }
.ib-side { display: flex; flex-direction: column; gap: 8px; padding: 12px; border-radius: 12px; border: 1px solid var(--line); background: var(--panel2); }
.ib-side.me { border-color: rgba(56, 189, 248, 0.35); }
.ib-side.pt { border-color: rgba(167, 139, 250, 0.4); }
.ib-side textarea { min-height: 84px; font-size: 15px; }
.ib-feed { display: flex; flex-direction: column; gap: 10px; max-height: 460px; min-height: 300px; overflow: auto; padding: 4px; }
.ib-bubble { max-width: 88%; padding: 10px 12px; border-radius: 14px; border: 1px solid var(--line); background: var(--panel2); display: flex; flex-direction: column; gap: 5px; }
.ib-bubble.me { align-self: flex-start; border-color: rgba(56, 189, 248, 0.3); border-bottom-left-radius: 4px; }
.ib-bubble.pt { align-self: flex-end; border-color: rgba(167, 139, 250, 0.35); border-bottom-right-radius: 4px; }
.ib-orig { font-size: 14px; color: var(--text2); }
.ib-trans { font-size: 19px; font-weight: 620; line-height: 1.35; display: flex; gap: 6px; align-items: flex-start; justify-content: space-between; }
.ib-trans[dir="rtl"] { font-size: 21px; }
.ib-de { font-weight: 600; }
.ib-book { display: flex; flex-direction: column; gap: 6px; max-height: 470px; overflow: auto; }
.ib-phrase { display: flex; gap: 12px; align-items: center; padding: 10px 12px; border-radius: 10px; border: 1px solid var(--line); background: var(--panel2); }
.ib-phrase .ib-trans { font-size: 16px; font-weight: 560; color: var(--text); }
.ib-phrase.pt { border-color: rgba(167, 139, 250, 0.3); }
.ib-ask { font-size: 20px; font-weight: 650; margin-bottom: 10px; }
.ib-pain { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 8px; }
.ib-face { display: flex; flex-direction: column; align-items: center; gap: 3px; padding: 10px 4px; border-radius: 12px; border: 1px solid var(--line2); background: var(--panel2); color: var(--text); cursor: pointer; font: inherit; transition: transform var(--t), border-color var(--t); text-align: center; }
.ib-face:hover { transform: translateY(-2px); border-color: var(--accent); }
.ib-face b { font-size: 18px; }
.ib-body { position: relative; width: 100%; max-width: 420px; margin: 0 auto; aspect-ratio: 1 / 1; }
.ib-body-svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.ib-spot { position: absolute; transform: translate(-50%, -50%); display: flex; flex-direction: column; align-items: center; padding: 3px 7px; border-radius: 999px; border: 1px solid var(--accent); background: var(--panel-solid); color: var(--text); font: inherit; font-size: 11px; line-height: 1.2; cursor: pointer; white-space: nowrap; box-shadow: var(--shadow-sm); }
.ib-spot:hover { background: var(--accent); color: var(--accent-ink); }
.ib-spot .muted { font-size: 10px; }
