
:root{--navy:#081D31;--navy-soft:#102B45;--gold:#B18D5A;--gold-dark:#946F3F;--bg:#F4F6F8;--surface:#FFF;--text:#14202B;--muted:#66727E;--border:#DDE3E8;--success:#2E7D5B;--blue:#3478C8;--orange:#CF7B13;--shadow:0 8px 24px rgba(8,29,49,.08)}
*{box-sizing:border-box}html,body{margin:0;min-height:100%;font-family:Inter,Segoe UI,Arial,sans-serif;color:var(--text);background:var(--bg)}button,textarea,input,select{font:inherit}button{cursor:pointer}
.app-shell{min-height:100vh;display:grid;grid-template-columns:270px 1fr}.sidebar{background:linear-gradient(180deg,var(--navy),#06192A);color:#fff;padding:24px 18px;display:flex;flex-direction:column;position:sticky;top:0;height:100vh}.brand{display:flex;align-items:center;gap:14px;padding:0 8px 26px}.brand-logo{width:58px;height:58px}.brand-name{font-family:Georgia,serif;text-transform:uppercase;font-size:22px;letter-spacing:.5px}.brand-subtitle{color:#D6B173;margin-top:7px}.nav-list{display:flex;flex-direction:column;gap:8px}.nav-item{border:0;background:transparent;color:#fff;text-align:left;padding:15px 14px;border-radius:10px;display:flex;align-items:center;gap:14px;font-size:17px}.nav-item:hover,.nav-item.active{background:rgba(255,255,255,.09)}.nav-item.active{color:#F4C57D;border-left:3px solid var(--gold);border-radius:0 10px 10px 0}.nav-icon{width:25px;text-align:center;font-size:22px}.nav-divider{height:1px;background:rgba(255,255,255,.18);margin:8px 10px}.admin-badge{margin-left:auto;background:rgba(177,141,90,.22);color:#F5D79E;padding:4px 8px;border-radius:999px;font-size:11px}.sidebar-footer{margin-top:auto;color:#E3E8EC;font-size:13px;line-height:1.8;padding:0 10px}.footer-links{display:flex;gap:16px}.footer-links a{color:#fff;text-decoration:none}.main-column{min-width:0}.topbar{height:72px;background:var(--surface);border-bottom:1px solid var(--border);display:flex;align-items:center;padding:0 30px;gap:18px;position:sticky;top:0;z-index:10}.topbar-spacer{flex:1}.system-status{font-size:14px;display:flex;align-items:center;gap:8px}.status-dot{width:10px;height:10px;border-radius:50%;background:#0C9B58;display:inline-block}.status-dot.warning{background:var(--orange)}.profile-button,.menu-button{border:0;background:transparent;color:var(--text)}.profile-button{display:flex;align-items:center;gap:10px}.profile-initials{display:grid;place-items:center;width:38px;height:38px;border-radius:50%;background:var(--navy);color:#fff;font-size:13px}.profile-name{font-weight:600}.menu-button{display:none;font-size:26px}.content{max-width:1280px;margin:0 auto;padding:36px 42px 56px}.view{display:none}.view.active{display:block}.hero-grid{display:grid;grid-template-columns:minmax(0,1fr) 310px;gap:30px;align-items:start}h1{font-size:34px;margin:0 0 8px;color:var(--navy)}.hero-content>p,.page-heading p{margin:0 0 24px;color:var(--muted);font-size:18px}.avatar-wrap{display:flex;justify-content:center;align-items:flex-start}.avatar{width:290px;max-width:100%;border-radius:50%;object-fit:cover;filter:drop-shadow(0 10px 24px rgba(8,29,49,.12))}.prompt-card{background:var(--surface);border:1px solid var(--border);box-shadow:var(--shadow);border-radius:16px;padding:20px}.prompt-card label{display:block;color:var(--gold-dark);font-weight:700;font-size:20px;margin-bottom:12px}.prompt-card textarea{width:100%;resize:vertical;min-height:108px;border:1px solid #CBD3DA;border-radius:10px;padding:14px;font-size:17px;outline:none}.prompt-card textarea:focus,input:focus,select:focus{border-color:var(--gold);box-shadow:0 0 0 3px rgba(177,141,90,.14);outline:none}.prompt-actions{display:flex;justify-content:space-between;align-items:center;margin-top:12px;gap:12px}.primary-button{border:0;border-radius:8px;background:linear-gradient(180deg,#C79C5E,var(--gold));color:#fff;padding:12px 18px;font-weight:700;box-shadow:0 6px 14px rgba(177,141,90,.24)}.primary-button:hover{background:var(--gold-dark)}.text-button,.link-button{border:0;background:transparent;color:var(--gold-dark);font-weight:700;padding:8px 0}.text-button{color:var(--text)}.examples{color:var(--muted);font-size:14px;padding:12px 18px 0}.section-block{margin-top:30px}.section-block h2,.placeholder-panel h2{font-size:21px;margin:0 0 14px}.quick-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:20px}.quick-card{background:var(--surface);border:1px solid var(--border);border-radius:14px;padding:20px;display:grid;grid-template-columns:48px 1fr;gap:14px;box-shadow:var(--shadow)}.quick-icon{width:44px;height:44px;border-radius:50%;display:grid;place-items:center;background:var(--navy);color:#fff;font-size:23px}.quick-card h3{font-size:17px;margin:0 0 7px}.quick-card p{font-size:14px;color:var(--muted);line-height:1.5;margin:0 0 12px}.section-heading-row,.page-heading{display:flex;justify-content:space-between;align-items:center;gap:16px}.orders-list{background:var(--surface);border:1px solid var(--border);border-radius:14px;box-shadow:var(--shadow);overflow:hidden}.order-row{display:grid;grid-template-columns:34px minmax(250px,1.7fr) minmax(140px,.8fr) 90px 160px;align-items:center;gap:14px;padding:14px 16px;border-bottom:1px solid var(--border)}.order-row:last-child{border-bottom:0}.order-status{width:24px;height:24px;border-radius:50%;display:grid;place-items:center;font-weight:800}.order-status.success{color:#0C9B58;border:2px solid #0C9B58}.order-status.running{color:var(--blue);border:2px dotted var(--blue)}.order-main{display:flex;flex-direction:column;gap:4px}.order-main span,.order-time{color:var(--muted);font-size:14px}.status-badge{justify-self:start;padding:5px 10px;border-radius:7px;font-size:13px}.status-badge.done{background:#E3F3EB;color:#177146}.status-badge.live{background:#E4F0FC;color:#1D67AE}.outline-button{border:1px solid var(--gold);background:#fff;color:var(--gold-dark);border-radius:7px;padding:9px 12px}.placeholder-panel{background:#fff;border:1px solid var(--border);border-radius:14px;padding:24px;box-shadow:var(--shadow);margin-top:22px}.admin-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:18px}.reports-toolbar{display:flex;gap:12px;margin:24px 0 14px}.reports-toolbar input,.reports-toolbar select{border:1px solid var(--border);background:#fff;border-radius:8px;padding:11px 12px}.reports-toolbar input{flex:1}.modal-backdrop{position:fixed;inset:0;background:rgba(8,29,49,.55);display:none;place-items:center;padding:20px;z-index:50}.modal-backdrop.open{display:grid}.modal{width:min(620px,100%);background:#fff;border-radius:16px;box-shadow:0 24px 80px rgba(0,0,0,.25);overflow:hidden}.modal-header,.modal-footer{display:flex;justify-content:space-between;align-items:center;padding:20px 24px;border-bottom:1px solid var(--border)}.modal-footer{border-top:1px solid var(--border);border-bottom:0;justify-content:flex-end;gap:12px}.modal-header h2{margin:4px 0 0}.eyebrow{text-transform:uppercase;letter-spacing:.12em;color:var(--gold-dark);font-weight:800;font-size:12px}.icon-close{border:0;background:transparent;font-size:30px;color:var(--muted)}.modal-body{padding:24px;display:grid;gap:18px}.modal-body label{display:grid;gap:8px;font-weight:700}.modal-body select,.modal-body input,.modal-body textarea{width:100%;border:1px solid var(--border);border-radius:8px;padding:11px 12px;background:#fff}.date-grid{display:grid;grid-template-columns:1fr 1fr;gap:14px}.progress-layout{display:grid;grid-template-columns:minmax(0,1fr) 310px;gap:24px;margin-top:24px}.progress-card,.summary-card{background:#fff;border:1px solid var(--border);border-radius:16px;box-shadow:var(--shadow);padding:28px}.progress-card{text-align:center}.progress-logo{width:76px;height:76px}.progress-card h2{margin:12px 0 6px}.progress-intro{color:var(--muted)}.progress-track{height:10px;background:#E8ECEF;border-radius:999px;overflow:hidden;margin:28px 0 8px}.progress-fill{height:100%;width:0;background:var(--gold);transition:width .5s ease}.progress-percent{font-weight:800;color:var(--gold-dark);margin-bottom:24px}.step-list{text-align:left;display:grid;gap:10px}.step{display:grid;grid-template-columns:36px 1fr;gap:12px;padding:12px;border-radius:10px;color:var(--muted)}.step>span{width:30px;height:30px;border-radius:50%;display:grid;place-items:center;background:#EEF1F3;font-weight:800}.step strong{display:block;color:var(--text)}.step small{display:block;margin-top:4px}.step.active{background:#FBF5EC}.step.active>span{background:var(--gold);color:#fff}.step.done>span{background:var(--success);color:#fff}.summary-card dl{display:grid;grid-template-columns:95px 1fr;gap:12px 8px}.summary-card dt{color:var(--muted)}.summary-card dd{margin:0;font-weight:700}.toast{position:fixed;right:24px;bottom:24px;background:var(--navy);color:#fff;padding:14px 18px;border-radius:10px;box-shadow:var(--shadow);opacity:0;transform:translateY(10px);pointer-events:none;transition:.25s;z-index:60}.toast.show{opacity:1;transform:none}
@media(max-width:1100px){.app-shell{grid-template-columns:86px 1fr}.sidebar{padding:20px 12px}.brand>div,.nav-item span:not(.nav-icon),.admin-badge,.sidebar-footer{display:none}.brand{justify-content:center;padding:0 0 22px}.brand-logo{width:48px;height:48px}.nav-item{justify-content:center;padding:14px}.hero-grid{grid-template-columns:1fr 220px}.avatar{width:215px}.quick-grid{grid-template-columns:1fr 1fr}.quick-card:last-child{grid-column:span 2}.order-row{grid-template-columns:34px 1fr 110px 90px}.order-row .outline-button{grid-column:2/-1;justify-self:end}.progress-layout{grid-template-columns:1fr}}
@media(max-width:767px){.app-shell{display:block}.sidebar{position:fixed;left:-285px;top:0;width:270px;height:100vh;z-index:30;transition:left .25s}.sidebar.open{left:0}.brand>div,.nav-item span:not(.nav-icon),.admin-badge,.sidebar-footer{display:block}.nav-item{justify-content:flex-start}.menu-button{display:block}.topbar{height:62px;padding:0 14px}.system-status,.profile-name{display:none}.content{padding:24px 16px 40px}.hero-grid{grid-template-columns:1fr}.avatar-wrap{position:absolute;right:18px;top:80px}.avatar{width:88px}h1{font-size:26px;padding-right:92px}.hero-content>p{font-size:16px;padding-right:90px}.prompt-card{margin-top:24px}.quick-grid{grid-template-columns:1fr}.quick-card:last-child{grid-column:auto}.order-row{grid-template-columns:30px 1fr auto;padding:14px 12px}.order-time{display:none}.status-badge{grid-column:3}.order-row .outline-button{grid-column:2/4;justify-self:stretch}.page-heading{align-items:flex-start;flex-direction:column}.admin-grid{grid-template-columns:1fr}.date-grid{grid-template-columns:1fr}.reports-toolbar{flex-direction:column}.modal-header,.modal-body,.modal-footer{padding-left:18px;padding-right:18px}}

/* Berechtigungszentrum – MVP */
.order-status.permission{border:2px solid var(--gold);color:var(--gold-dark);font-size:12px;background:#FBF5EC}
.status-badge.permission{background:#FBF0DE;color:#7B5A2C}
.status-badge.error{background:#FBE8E8;color:#9B2C2C}
.order-status.error{color:#A32929;border:2px solid #A32929}
.permission-overlay{position:fixed;inset:0;background:rgba(8,29,49,.58);z-index:10000;display:none;align-items:center;justify-content:center;padding:24px}
.permission-dialog{width:min(720px,100%);max-height:88vh;overflow:auto;background:#fff;border-radius:18px;padding:28px;box-shadow:0 24px 80px rgba(0,0,0,.28)}
.permission-heading{display:flex;align-items:center;gap:16px;margin-bottom:20px}
.permission-heading h2{margin:4px 0 0;color:var(--navy)}
.permission-lock{width:52px;height:52px;border-radius:50%;display:grid;place-items:center;background:#FBF0DE;font-size:24px}
.permission-message{white-space:pre-wrap;line-height:1.65;color:#24384a;background:#F7F9FA;border:1px solid var(--border);border-radius:12px;padding:16px}
.permission-details{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px;margin-top:16px}
.permission-detail{display:flex;flex-direction:column;gap:5px;border:1px solid var(--border);border-radius:10px;padding:13px;min-width:0}
.permission-detail span{font-size:12px;color:var(--muted);text-transform:uppercase;letter-spacing:.05em}
.permission-detail strong{overflow-wrap:anywhere}
.permission-note{color:var(--muted);font-size:14px;line-height:1.55;margin:18px 0}
.permission-actions{display:flex;justify-content:flex-end;gap:10px;flex-wrap:wrap}
.danger-outline{border-color:#A32929;color:#A32929}
@media(max-width:767px){.permission-dialog{padding:20px}.permission-details{grid-template-columns:1fr}.permission-actions{flex-direction:column-reverse}.permission-actions button{width:100%}}

/* Loreleys Arbeitsfenster */
.order-main small.order-current-step{display:block;margin-top:4px;color:var(--gold-dark);font-size:12px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:560px}
.work-overlay{position:fixed;inset:0;background:rgba(8,29,49,.62);z-index:9500;display:none;align-items:center;justify-content:center;padding:22px}
.work-window{width:min(900px,100%);max-height:90vh;display:flex;flex-direction:column;background:#fff;border-radius:18px;box-shadow:0 26px 90px rgba(0,0,0,.3);overflow:hidden}
.work-header{display:flex;justify-content:space-between;align-items:flex-start;gap:18px;padding:22px 26px;border-bottom:1px solid var(--border)}
.work-header h2{margin:5px 0 0;color:var(--navy);font-size:22px;line-height:1.3}
.work-status-grid{display:grid;grid-template-columns:1.1fr 2fr 1fr 1.3fr;gap:1px;background:var(--border);border-bottom:1px solid var(--border)}
.work-status-grid>div{background:#fff;padding:16px 18px;min-width:0}
.work-status-grid small{display:block;color:var(--muted);font-size:11px;text-transform:uppercase;letter-spacing:.06em;margin-bottom:5px}
.work-status-grid strong{display:block;overflow-wrap:anywhere;color:var(--navy)}
.work-state-card{display:flex;align-items:center;gap:11px}
.work-pulse{width:13px;height:13px;border-radius:50%;background:#9AA7B1;flex:0 0 auto}
.work-pulse.active{background:#0C9B58;box-shadow:0 0 0 0 rgba(12,155,88,.45);animation:workPulse 1.7s infinite}
.work-pulse.warning{background:var(--gold)}
.work-pulse.error{background:#A32929;animation:none}
@keyframes workPulse{0%{box-shadow:0 0 0 0 rgba(12,155,88,.45)}70%{box-shadow:0 0 0 9px rgba(12,155,88,0)}100%{box-shadow:0 0 0 0 rgba(12,155,88,0)}}
.work-warning{margin:16px 24px 0;padding:12px 14px;border-radius:10px;background:#FFF3D8;color:#72501F;border:1px solid #E9CF99;line-height:1.45}
.work-log-heading{display:flex;justify-content:space-between;align-items:center;padding:18px 26px 10px}
.work-log-heading h3{margin:0;color:var(--navy)}
.work-log-heading span{color:var(--muted);font-size:13px}
.work-log{margin:0 26px 18px;border:1px solid var(--border);border-radius:12px;background:#F8FAFB;min-height:230px;max-height:390px;overflow:auto;padding:8px 0}
.work-log-entry{display:grid;grid-template-columns:82px 1fr;gap:12px;padding:11px 16px;border-bottom:1px solid #E9EDF0}
.work-log-entry:last-child{border-bottom:0}
.work-log-entry time{font-variant-numeric:tabular-nums;color:var(--muted);font-size:13px;padding-top:2px}
.work-log-entry strong{color:#20384C}
.work-log-entry p{margin:5px 0 0;color:var(--muted);line-height:1.45;white-space:pre-wrap;overflow-wrap:anywhere}
.work-log-entry.tool strong{color:var(--gold-dark)}
.work-log-entry.error strong{color:#A32929}
.work-log-entry.completed strong{color:#177146}
.work-log-empty{padding:24px;color:var(--muted);text-align:center}
.work-footer{display:flex;justify-content:flex-end;gap:10px;padding:16px 26px;border-top:1px solid var(--border);background:#FBFCFD}
@media(max-width:800px){.work-overlay{padding:0}.work-window{max-height:100vh;height:100vh;border-radius:0}.work-status-grid{grid-template-columns:1fr 1fr}.work-log{margin-left:14px;margin-right:14px}.work-header,.work-footer{padding-left:16px;padding-right:16px}.work-log-heading{padding-left:16px;padding-right:16px}.work-log-entry{grid-template-columns:68px 1fr;padding-left:12px;padding-right:12px}}

/* Arbeitsfenster – Ergebniszusammenfassung und Markdown */
.work-summary{margin:16px 24px 0;padding:15px 17px;border:1px solid #CFE4D8;border-radius:12px;background:#F3FAF6;display:grid;grid-template-columns:38px 1fr;gap:13px;align-items:flex-start}
.work-summary[hidden]{display:none}
.work-summary.error{border-color:#E8C7C7;background:#FFF6F6}
.work-summary.cancelled{border-color:#D9DEE3;background:#F7F9FA}
.work-summary-icon{width:34px;height:34px;border-radius:50%;display:grid;place-items:center;background:#177146;color:#fff;font-weight:900;font-size:18px}
.work-summary.error .work-summary-icon{background:#A32929}
.work-summary.cancelled .work-summary-icon{background:#66727E}
.work-summary small{display:block;color:var(--muted);font-size:11px;text-transform:uppercase;letter-spacing:.06em;margin-bottom:5px}
.work-summary p{margin:0;color:#24384A;line-height:1.55}
.work-summary strong{color:var(--navy)}
.work-log-detail{margin-top:5px;color:var(--muted);line-height:1.5;overflow-wrap:anywhere}
.work-log-detail p{margin:3px 0;white-space:normal}
.work-log-detail ul,.work-log-detail ol,.agent-result-content ul,.agent-result-content ol{margin:7px 0 7px 20px;padding:0}
.work-log-detail li,.agent-result-content li{margin:4px 0}
.work-log-detail code,.agent-result-content code{font-family:Consolas,"Courier New",monospace;background:#EAF0F3;border-radius:5px;padding:2px 5px;color:#17324A;font-size:.92em}
.work-log-detail pre,.agent-result-content pre{margin:7px 0;padding:11px 13px;background:#102538;color:#E7EEF4;border-radius:8px;overflow:auto;white-space:pre-wrap;line-height:1.45}
.work-log-detail pre code,.agent-result-content pre code{padding:0;background:none;color:inherit}
.work-log-detail .tool-command{border-left:3px solid var(--gold)}
.work-log-detail h3,.work-log-detail h4,.work-log-detail h5{margin:8px 0 4px;color:var(--navy);font-size:1em}
.agent-result-content{line-height:1.65;color:#24384A;overflow-wrap:anywhere}
.agent-result-content p{margin:0 0 11px}
.agent-result-content h3,.agent-result-content h4,.agent-result-content h5{color:var(--navy);margin:20px 0 8px}
.md-spacer{height:7px}
@media(max-width:800px){.work-summary{margin-left:14px;margin-right:14px}}

/* PriceRangeVisualization (siehe reporting/components/price_range_visualization.py).
   Server-gerendertes Markup (dieselbe Zeichenkette wie in der Markdown->HTML->PDF-Pipeline,
   per innerHTML eingefuegt - siehe app.js::renderValuationOverlayContent) - dieselben
   Klassennamen wie in branding/loreley_lavise.py::build_pdf_css() (dort bewusst OHNE
   @media, da eine Druckseite keinen Viewport hat). Hier, im echten Browser-Viewport,
   gilt der volle Desktop/Tablet/Mobile-Breakpoint. */
.price-range-viz{display:flex;gap:24px;align-items:flex-start;margin:12px 0 18px}
.price-range-viz-graphic{flex:1 1 62%;min-width:0}
.price-range-viz-text{flex:1 1 38%;min-width:0}
.price-range-viz-text p{color:var(--muted);font-size:14px;line-height:1.5;margin:0}
.price-range-viz svg{display:block;width:100%;height:auto}
.price-range-legend{display:flex;flex-wrap:wrap;gap:18px;margin-top:8px;font-size:12px;color:var(--muted)}
.price-range-legend-item{display:inline-flex;align-items:center;gap:6px}
.price-range-legend-swatch{width:10px;height:10px;display:inline-block}
.price-range-legend-swatch.band{background:var(--navy)}
.price-range-legend-swatch.circle{background:var(--gold);border-radius:50%}
.price-range-legend-swatch.diamond{background:var(--gold);transform:rotate(45deg)}
.price-range-legend-swatch.triangle{background:var(--gold);clip-path:polygon(50% 0%,0% 100%,100% 100%)}
@media(max-width:800px){.price-range-viz{flex-direction:column}}

/* Report-Artefakte im Arbeitsfenster */
.report-artifact-actions{display:flex;gap:10px;flex-wrap:wrap;justify-content:center;margin-top:24px}
.report-artifact-actions[hidden]{display:none}
@media(max-width:767px){.report-artifact-actions{flex-direction:column}.report-artifact-actions button{width:100%}}

/* "Erzeugte Dateien" im Arbeitsfenster (Aufgaben mit verknuepftem Report) */
.work-artifacts{margin:16px 24px 0;padding:15px 17px;border:1px solid var(--border);border-radius:12px;background:#F8FAFB}
.work-artifacts[hidden]{display:none}
.work-artifacts h3{margin:0 0 10px;font-size:15px;color:var(--navy)}
.work-artifacts .report-artifact-actions,.permission-dialog .report-artifact-actions{justify-content:flex-start;margin-top:16px}
@media(max-width:800px){.work-artifacts{margin-left:14px;margin-right:14px}}

/* Historie: Lade-/Leer-/Fehlerzustand fuer Auftrags- und Reportlisten */
.history-placeholder{padding:32px 16px;color:var(--muted);text-align:center}
.history-placeholder.error{color:#9B2C2C}

/* Vorgangs-Chat (Auftrag "Loreley Frontend: Vorgangs-Chats") */
.status-badge.neutral{background:#EEF1F3;color:#3b4b58}
.order-status.neutral{color:var(--muted);border:2px solid var(--border)}
.conversation-shell{display:flex;flex-direction:column;min-height:calc(100vh - 220px)}
.conversation-header{display:flex;flex-wrap:wrap;align-items:center;gap:14px;padding-bottom:18px;border-bottom:1px solid var(--border)}
.conversation-header-main{display:flex;align-items:center;gap:12px;flex:1;min-width:0}
.conversation-header-main h1{margin:0;font-size:22px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.conversation-header-actions{display:flex;gap:10px;flex-wrap:wrap}
.chat-messages{flex:1;display:flex;flex-direction:column;gap:16px;padding:22px 2px 32px}
.chat-empty{padding:60px 12px;text-align:center;color:var(--muted)}
.chat-message{display:flex;gap:10px}
.chat-message.user{justify-content:flex-end}
.chat-message.assistant{justify-content:flex-start}
.chat-bubble-wrap{max-width:min(680px,78%);display:flex;flex-direction:column;gap:6px}
.chat-message.user .chat-bubble-wrap{align-items:flex-end}
.chat-bubble{padding:14px 16px;border-radius:16px;line-height:1.55;box-shadow:var(--shadow)}
.chat-message.user .chat-bubble{background:var(--navy);color:#fff;border-radius:16px 16px 4px 16px}
.chat-message.assistant .chat-bubble{background:#fff;border:1px solid var(--border);border-radius:16px 16px 16px 4px}
.chat-bubble p{margin:0 0 8px}
.chat-bubble p:last-child{margin-bottom:0}
.chat-meta{font-size:12px;color:var(--muted);padding:0 4px}
.chat-attachments{display:flex;flex-wrap:wrap;gap:8px;margin-top:8px}
.chat-attachment-chip{display:inline-flex;align-items:center;gap:6px;border:1px solid var(--border);background:#F8FAFB;border-radius:999px;padding:6px 12px;font-size:13px;color:var(--navy);text-decoration:none}
.chat-attachment-chip button{border:0;background:transparent;color:inherit;font-size:15px;line-height:1;padding:0}
.chat-message.user .chat-attachment-chip{background:rgba(255,255,255,.14);border-color:rgba(255,255,255,.32);color:#fff}
.chat-response-actions{display:flex;flex-wrap:wrap;gap:8px;margin-top:4px}
.chat-pending-attachments{display:flex;flex-wrap:wrap;gap:8px;padding:0 2px}
.chat-pending-attachments:empty{display:none}
.chat-composer{position:sticky;bottom:0;background:var(--bg);padding:14px 0 4px;display:flex;gap:10px;align-items:flex-end;border-top:1px solid var(--border)}
.chat-composer[hidden]{display:none}
.chat-composer textarea{flex:1;resize:none;min-height:46px;max-height:160px;border:1px solid #CBD3DA;border-radius:10px;padding:12px 14px;font-size:15px;outline:none}
.chat-composer textarea:focus{border-color:var(--gold);box-shadow:0 0 0 3px rgba(177,141,90,.14);outline:none}
.chat-composer-closed{position:sticky;bottom:0;background:var(--bg);padding:16px 0;display:flex;align-items:center;justify-content:space-between;gap:14px;border-top:1px solid var(--border);color:var(--muted)}
.chat-composer-closed[hidden]{display:none}
.chat-composer-closed p{margin:0}

/* Zentraler Dateibereich eines Vorgangs (Anforderung 6, WhatsApp-artige Filter) */
.filter-chip-row{display:flex;flex-wrap:wrap;gap:8px;margin-bottom:14px}
.filter-chip{border:1px solid var(--border);background:#fff;color:var(--text);border-radius:999px;padding:7px 14px;font-size:13px}
.filter-chip.active{background:var(--navy);color:#fff;border-color:var(--navy)}
.file-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(220px,1fr));gap:12px;margin-top:4px}
.file-card{border:1px solid var(--border);border-radius:12px;padding:14px;display:flex;flex-direction:column;gap:8px;text-decoration:none;color:var(--text);background:#F8FAFB}
.file-card:hover{border-color:var(--gold)}
.file-card-icon{font-size:22px}
.file-card-name{font-weight:700;overflow-wrap:anywhere;font-size:14px}
.file-card-meta{font-size:12px;color:var(--muted)}

@media(max-width:767px){
  .conversation-header{align-items:flex-start;flex-direction:column}
  .chat-bubble-wrap{max-width:92%}
}

/* Admin-/Diagnoseansicht (Anforderung 7) - einzige Stelle mit technischen Interna */
.admin-diagnostic-intro{color:var(--muted);margin:-6px 0 18px}
.admin-diagnostic-layout{display:grid;grid-template-columns:minmax(0,1.1fr) minmax(0,1.6fr);gap:18px;align-items:start}
.admin-conversation-row{cursor:pointer;grid-template-columns:34px minmax(0,1fr) 140px}
.admin-conversation-row.active{background:#FBF5EC}
#adminAgentRunsPanel{max-height:70vh;overflow:auto}
.admin-run-card{border:1px solid var(--border);border-radius:12px;padding:14px 16px;margin-top:14px;background:#F8FAFB}
.admin-run-card:first-of-type{margin-top:16px}
.admin-run-head{display:flex;justify-content:space-between;align-items:center;gap:10px;font-size:14px}
.admin-run-meta{display:flex;flex-wrap:wrap;gap:14px;color:var(--muted);font-size:13px;margin-top:8px}
.admin-run-error{color:#9B2C2C}
.admin-run-card .work-log{margin:12px 0 0;max-height:220px}
@media(max-width:900px){.admin-diagnostic-layout{grid-template-columns:1fr}}
