.office-dashboard-layout{display:grid;grid-template-columns:minmax(0,1fr) minmax(300px,320px);gap:20px;align-items:start}.office-dashboard-content{min-width:0}.office-dashboard-chat{border:1px solid var(--line);border-radius:20px;background:var(--solid);padding:20px;position:sticky;top:15px;min-width:0}.office-dashboard-chat header{display:flex;gap:10px;align-items:center}.office-dashboard-chat header h2{margin:0}.office-chat-avatar{display:grid;place-items:center;border:1px solid #23bfd799;border-radius:35%;width:36px;height:36px;color:#2cbcd5;background:linear-gradient(130deg,#163c6660,#8971d630);font-size:24px}.office-chat-turns{max-height:48vh;min-height:160px;overflow-y:auto;overflow-wrap:anywhere;border-block:1px solid var(--line);padding-block:10px;margin-block:12px}.office-chat-turn{padding:10px 0;border-bottom:1px solid var(--line)}.office-chat-question{padding:10px;border-radius:12px;background:#44a5df20;white-space:pre-wrap}.office-chat-answer{white-space:pre-wrap;line-height:1.55}.office-chat-limitation{font-size:.88em;opacity:.82}.office-dashboard-chat textarea{width:100%;box-sizing:border-box;resize:vertical;min-height:85px}.office-dashboard-chat [data-chat-threads]{min-width:0;max-width:100%;flex:1}.office-chat-tool-table{max-width:100%;overflow-x:auto}.office-chat-tool-table table{font-size:.85em;white-space:nowrap}.office-dashboard-chat [aria-busy="true"] [data-chat-send]::before{content:'◌ ';display:inline-block;animation:office-chat-spin 1s linear infinite}@keyframes office-chat-spin{to{transform:rotate(360deg)}}@media(max-width:1100px){.office-dashboard-layout{grid-template-columns:minmax(0,1fr)}.office-dashboard-chat{position:static}}

.office-chat-files{border-block:1px solid var(--line);padding-block:12px;margin-block:12px}.office-chat-files input[type=file]{display:block;max-width:100%;font-size:.85em}.office-chat-files progress{width:100%;height:8px}.office-chat-file{padding:9px 0;border-bottom:1px solid var(--line);overflow-wrap:anywhere}.office-chat-file p{font-size:.85em;margin:4px 0}.office-chat-ocr-text{white-space:pre-wrap;overflow-wrap:anywhere;max-height:250px;overflow:auto;border:1px solid var(--line);padding:10px;background:var(--pale)}
/* The same assistant artwork is used on overview and the dedicated chat page. */
.office-dashboard-chat .office-chat-avatar{display:block;width:38px;height:38px;object-fit:contain;border:0;border-radius:0;background:none}
.office-assistant-hero{height:210px;margin:14px -10px 16px;border-radius:14px;background:#071b34 url('/static/assets/assistant-hero-dark-v1.png') center / cover no-repeat}
html[data-theme=light] .office-assistant-hero{background-color:#edf7ff;background-image:url('/static/assets/assistant-hero-light-v1.png')}
@media(max-width:700px){.office-assistant-hero{height:170px}}
.office-assistant-page{display:grid;grid-template-columns:minmax(0,1.7fr) minmax(300px,.8fr);gap:20px;align-items:start}
.office-assistant-page .office-dashboard-chat{position:static;min-height:600px}
.office-assistant-page .office-chat-turns{max-height:58vh;min-height:220px}
.office-assistant-settings summary{cursor:pointer;font-weight:700;padding:8px 0}
.office-assistant-settings[open]>section{margin-top:14px}
@media(max-width:1050px){.office-assistant-page{grid-template-columns:minmax(0,1fr)}}

/* Keep the overview assistant aligned with the reference's translucent card. */
.office-dashboard-chat{background:linear-gradient(155deg,var(--panel),var(--solid));border-color:var(--line);box-shadow:var(--shadow);backdrop-filter:blur(18px) saturate(1.1)}

/* The overview has a deliberate no-client state; keep the AI column visible there too. */
#office-dashboard-chat-host:not(:has(.office-dashboard-chat)){display:grid;grid-template-columns:minmax(0,1fr);padding:16px;border:1px solid var(--line);border-radius:18px;background:linear-gradient(155deg,var(--panel),var(--solid));box-shadow:var(--shadow);backdrop-filter:blur(18px) saturate(1.1);min-width:0}
#office-dashboard-chat-host:not(:has(.office-dashboard-chat)) h2{display:flex;align-items:center;gap:10px;margin:0;font-size:18px;order:1}
#office-dashboard-chat-host:not(:has(.office-dashboard-chat)) h2::before{content:"";display:block;flex:0 0 38px;width:38px;height:38px;background:url('/static/assets/assistant-avatar-v1.png') center/contain no-repeat}
#office-dashboard-chat-host:not(:has(.office-dashboard-chat)) p{margin:0;color:var(--muted);line-height:1.55;order:3}
#office-dashboard-chat-host:not(:has(.office-dashboard-chat)) h2+p{margin-top:12px}
#office-dashboard-chat-host:not(:has(.office-dashboard-chat))::after{content:"";display:block;height:210px;margin:14px -6px 0;border-radius:14px;background:#071b34 url('/static/assets/assistant-hero-dark-v1.png') center/cover no-repeat;order:2}
html[data-theme=light] #office-dashboard-chat-host:not(:has(.office-dashboard-chat))::after{background-color:#edf7ff;background-image:url('/static/assets/assistant-hero-light-v1.png')}

/* Overview rail: keep the assistant useful at a glance; the dedicated page keeps its full-height layout. */
#office-dashboard-chat-host .office-dashboard-chat-overview{padding:16px;}
#office-dashboard-chat-host .office-dashboard-chat-overview .office-assistant-hero{height:210px;margin:10px 0 14px;border-radius:14px;}
#office-dashboard-chat-host .office-chat-greeting{margin:0 0 10px;font-weight:600;}
#office-dashboard-chat-host .office-chat-prompts{display:grid;grid-template-columns:minmax(0,1fr);gap:7px;margin:0 0 12px;}
#office-dashboard-chat-host .office-chat-prompts button{width:100%;min-height:48px;text-align:left;font-size:.9em;padding:10px 12px;border:1px solid #268fc766;border-radius:11px;background:linear-gradient(110deg,#0c3154,#102b4a);box-shadow:inset 3px 0 #17bce8;}
#office-dashboard-chat-host .office-dashboard-chat-overview .office-chat-turns{max-height:185px;min-height:56px;margin:6px 0 10px;padding-block:4px;}
#office-dashboard-chat-host .office-chat-preview-label{font-size:.82em;font-weight:700;margin:8px 0 0;opacity:.8;}
#office-dashboard-chat-host .office-chat-advanced{border-top:1px solid var(--line);padding:8px 0;margin-top:8px;}
#office-dashboard-chat-host .office-chat-advanced summary{cursor:pointer;font-size:.88em;font-weight:650;}
#office-dashboard-chat-host .office-chat-advanced[open]>:not(summary){margin-top:10px;}
#office-dashboard-chat-host .office-dashboard-chat-overview textarea{min-height:66px;}
#office-dashboard-chat-host .office-chat-history-search{margin:4px 0 8px;}

/* General KI-Assistent chat (no mandant needed) */
.general-chat .general-chat-list{display:flex;flex-direction:column;gap:12px;max-height:60vh;overflow:auto;margin:8px 0}
.general-chat .general-chat-message{border-radius:12px;padding:10px 12px;max-width:100%}
.general-chat .general-chat-user{align-self:flex-end;background:rgba(80,160,230,.18)}
.general-chat .general-chat-assistant{align-self:stretch;background:rgba(255,255,255,.06)}
.general-chat .general-chat-role{font-size:12px;opacity:.7;margin-bottom:4px}
.general-chat .general-chat-text{white-space:pre-wrap;overflow-wrap:anywhere;line-height:1.5}
.general-chat .general-chat-sources{margin-top:8px;font-size:13px}
.general-chat .general-chat-sources ol{margin:4px 0 0 18px;padding:0}
.general-chat .general-chat-sources small{opacity:.6}
.general-chat .general-chat-note{display:block;margin-top:6px;opacity:.6}
.general-chat .general-chat-form textarea{width:100%;box-sizing:border-box;resize:vertical}
.general-chat .general-chat-actions{display:flex;gap:10px;align-items:center;flex-wrap:wrap;margin-top:6px}
.general-chat .general-chat-web{margin-right:auto}
.general-chat .general-chat-hint{opacity:.75;font-size:13px}
.general-chat .general-chat-sent{margin-top:8px;font-size:13px}
.general-chat .general-chat-sent pre{white-space:pre-wrap;overflow-wrap:anywhere;max-height:300px;overflow:auto;background:rgba(0,0,0,.25);padding:8px;border-radius:8px}
