/* Only the chat uses a viewport layout; other admin sections keep page scrolling. */
body[data-admin-section="assistant"]{height:100vh;height:100dvh;min-height:0;overflow:hidden}
body[data-admin-section="assistant"] .admin-app{height:100%;display:flex;flex-direction:column}
body[data-admin-section="assistant"] .topbar{flex-shrink:0}
body[data-admin-section="assistant"] .admin-layout{flex:1;min-height:0;overflow:hidden}
body[data-admin-section="assistant"] .workspace{display:flex;flex-direction:column;height:100%;min-height:0;padding-bottom:max(12px,env(safe-area-inset-bottom))}
body[data-admin-section="assistant"] .page-header{flex-shrink:0}
body[data-admin-section="assistant"] .section-content{display:flex;flex-direction:column;flex:1;min-height:0}
@media(min-width:901px){body[data-admin-section="assistant"] .sidebar{height:100%;min-height:0;overflow:auto}}
.assistant-chat{display:flex;flex-direction:column;flex:1;gap:14px;width:100%;max-width:1080px;margin:0 auto;min-width:0;min-height:0}
.assistant-policy{font-size:13px;color:#6b7280;margin:0;line-height:1.5}
.assistant-dialogs{display:flex;flex-shrink:0;align-items:center;gap:8px;min-width:0}
.assistant-dialog-select{flex:1;min-width:0;width:0;max-width:100%;height:40px;border:1px solid #d8dde5;border-radius:10px;background:#fff;padding:8px;font:inherit;text-overflow:ellipsis}
.assistant-dialogs .button{flex-shrink:0}
.assistant-policy,.assistant-notice,.assistant-compose{flex-shrink:0}
.assistant-history{display:flex;flex-direction:column;flex:1;gap:22px;min-height:0;overflow:auto;padding:8px 4px;overscroll-behavior:contain}
.assistant-history>*{flex-shrink:0}
.assistant-run,.assistant-question,.assistant-answer{min-width:0;overflow-wrap:anywhere}
.assistant-question{background:#f1f4f7;border-radius:14px;padding:16px 18px;margin-left:7%}
.assistant-question p{margin:8px 0 0;white-space:pre-wrap}
.assistant-answer{padding:18px;border:1px solid #e5e7eb;border-radius:14px;margin-top:12px;background:#fff}
.assistant-answer-text{white-space:normal;line-height:1.65;margin-top:10px}
.assistant-answer-text p{margin:0 0 .8em;white-space:pre-wrap}
.assistant-answer-text h3,.assistant-answer-text h4,.assistant-answer-text h5,.assistant-answer-text h6{font-size:1em;line-height:1.4;margin:1em 0 .5em;letter-spacing:normal}
.assistant-answer-text h3{font-size:1.15em}
.assistant-answer-text ul,.assistant-answer-text ol{margin:.6em 0;padding-left:24px}
.assistant-answer-text li{margin:.3em 0}
.assistant-answer-text li>ul,.assistant-answer-text li>ol{margin:.3em 0}
.assistant-answer-text code{font-family:ui-monospace,SFMono-Regular,Consolas,monospace;font-size:.9em;background:#f3f4f6;border-radius:4px;padding:2px 5px}
.assistant-answer-text pre{max-width:100%;max-height:320px;overflow:auto;white-space:pre;background:#f3f4f6;border-radius:8px;padding:12px;line-height:1.5}
.assistant-answer-text pre code{padding:0;white-space:pre}
.assistant-answer-text blockquote{margin:.8em 0;border-left:3px solid #d8dde5;padding-left:12px;color:#596578}
.assistant-answer-text hr{border:0;border-top:1px solid #d8dde5;margin:1em 0}
.assistant-answer-text>:first-child{margin-top:0}
.assistant-answer-text>:last-child{margin-bottom:0}
.assistant-table{max-width:100%;overflow:auto;margin:.8em 0}
.assistant-table table{border-collapse:collapse;width:100%;font-size:.95em}
.assistant-table th,.assistant-table td{border:1px solid #d8dde5;text-align:left;vertical-align:top;padding:7px 10px;min-width:100px}
.assistant-table th{background:#f6f8fa;font-weight:700}
.assistant-stage{color:#6b7280}
.assistant-compose{display:flex;flex-direction:column;gap:10px;border:1px solid #d8dde5;border-radius:14px;padding:14px;background:#fff}
.assistant-text{box-sizing:border-box;width:100%;min-height:64px;max-height:min(160px,18dvh);resize:vertical;border:0;padding:4px;line-height:1.5;font:inherit;background:transparent}
.assistant-text:focus{outline:2px solid #a9b8ca;outline-offset:3px}
.assistant-controls{display:flex;gap:8px;flex-wrap:wrap;align-items:center}
.assistant-controls .button-primary{margin-left:auto}
.assistant-file{display:flex;gap:10px;align-items:center;justify-content:space-between;border-radius:8px;padding:7px 10px;background:#f4f6f8;overflow-wrap:anywhere}
.assistant-file span{min-width:0}
.assistant-file .button{flex-shrink:0}
.assistant-selected{display:flex;flex-direction:column;gap:6px;max-height:min(112px,12dvh);overflow:auto;overscroll-behavior:contain}
.assistant-selected:empty{display:none}
.assistant-selected>*{flex-shrink:0}
.assistant-file-name{display:block;font-size:13px;color:#596578;margin-top:8px}
.assistant-empty{display:grid;place-items:center;min-height:220px;text-align:center;color:#6b7280;padding:20px;line-height:1.6}
.assistant-notice:empty{display:none}
.assistant-notice{margin:0;color:#6b7280;font-size:14px}
.assistant-evidence{border-top:1px solid #e5e7eb;margin-top:16px;padding-top:12px;font-size:13px}
.assistant-evidence details{margin-top:10px}
.assistant-evidence summary{cursor:pointer;overflow-wrap:anywhere}
.assistant-evidence pre{max-height:300px;overflow:auto;white-space:pre-wrap;overflow-wrap:anywhere;background:#f6f8fa;padding:10px;border-radius:8px}
@media(max-width:600px){.assistant-question{margin-left:3%;padding:12px}.assistant-answer{padding:12px}.assistant-compose{padding:10px}.assistant-controls .button{padding-left:10px;padding-right:10px}.assistant-controls .button-primary{margin-left:0}}
@media(max-width:600px),(max-height:700px){
  body[data-admin-section="assistant"] .workspace{padding-top:12px}
  body[data-admin-section="assistant"] .page-header{margin-bottom:10px;padding-bottom:10px}
  body[data-admin-section="assistant"] .page-kicker,body[data-admin-section="assistant"] .page-subtitle{display:none}
  .assistant-chat{gap:8px}
  .assistant-policy{font-size:12px;line-height:1.4;max-height:52px;overflow:auto}
  .assistant-text{height:72px;max-height:72px}
  .assistant-selected{max-height:48px}
  .assistant-notice{max-height:44px;overflow:auto}
}
