/* Report conversations use the same chat, with a separate task context. */
.report-day-hello{display:block;font-size:16px;margin-bottom:4px}
.report-day-date{display:block;color:var(--muted);font-size:12px;margin-bottom:14px}
.report-day-summary,.report-day-assignments{padding-left:20px;margin:10px 0;line-height:1.7}
.report-day-summary li+li,.report-day-assignments>li+li{margin-top:6px}
.report-day-assignments ul{padding-left:18px}
.report-day-hint{padding-top:12px;margin:12px 0 0;border-top:1px solid var(--line);color:var(--muted)}
.report-chat-step{display:block;color:#076b83;font-size:10px;font-weight:850;letter-spacing:.09em}
.report-chat-heading{min-width:0}
.report-chat-heading strong{line-height:1.4}
.report-chat-active .worker-chat-head>div{min-width:0}
.report-chat-active .worker-ai-mark,.report-chat-active .worker-online{display:none}
.report-chat-active .worker-chat-head{gap:10px}
.report-chat-back{flex:0 0 40px;min-height:44px;width:40px;border:1px solid var(--line);border-radius:12px;color:var(--text);background:transparent;font-size:22px}
.report-chat-change{flex:0 0 auto;min-height:44px;padding:7px 10px;font-size:11px}
.report-chat-active .worker-suggestions,.report-chat-readonly #workerCommandForm,.report-chat-manual #workerCommandForm{display:none!important}
body.worker-mode.report-chat-active #workerMessages{display:flex;flex-direction:column;gap:12px;overflow-y:auto;min-height:0;flex:1 1 auto}
body.worker-mode.report-chat-active #workerMessages>.worker-message{flex:0 0 auto;margin:0}
body.worker-mode.report-chat-active #workerInlinePreview:not(.hidden){flex:0 0 auto;width:100%;max-width:860px;max-height:none;overflow:visible;margin:0 auto;padding:0;border:0;background:transparent;box-shadow:none}
body.worker-mode.report-chat-active #workerInlinePreview .worker-preview-toggle{display:none}
.report-question-card,.report-manual-card{padding:20px;border:1px solid var(--line);border-radius:18px;background:var(--panel-strong,#fff)}
.report-question-card h3,.report-manual-card h3{margin:7px 0 12px;font-size:18px;line-height:1.4}
#workerInlinePreview :is(.report-question-card,.report-manual-card) h3{color:#173247}
.report-question-card ol{padding-left:24px;margin:16px 0;line-height:1.6}
.report-question-card li+li{margin-top:12px}
.report-question-card li::marker{color:#08758e;font-weight:800}
.report-question-card p,.report-manual-card p{font-size:13px;line-height:1.6;color:var(--muted)}
.report-question-required{display:block;color:var(--muted);font-size:10px}
.report-chat-next{min-height:44px;margin-top:12px}
.report-manual-field{display:grid;gap:8px;margin:18px 0}
.report-manual-field>span{display:flex;align-items:baseline;flex-wrap:wrap;gap:8px}
.report-manual-field>span{text-transform:none;letter-spacing:normal}
.report-manual-field strong{font-size:13px;line-height:1.5}
.report-manual-field small{font-size:11px;color:var(--muted)}
.report-manual-field :is(textarea,select){width:100%;min-height:48px;padding:12px;border:1px solid var(--line);border-radius:12px;background:var(--panel-soft,#f7fafb);color:var(--text);font:inherit;font-size:16px}
.report-manual-field [aria-invalid=true]{border-color:var(--red);box-shadow:0 0 0 1px var(--red)}
.report-manual-field .report-field-error{color:var(--red)}
.report-manual-field .report-field-error:empty{display:none}
.report-chat-history{align-self:stretch;margin:16px 0 6px;max-width:860px;width:100%}
.report-chat-history h3{color:var(--muted);font-size:12px;font-weight:700;margin:0 0 10px}
.report-chat-history>button{display:grid;grid-template-columns:32px minmax(0,1fr) 16px;gap:12px;align-items:center;width:100%;padding:14px;text-align:left;color:var(--text);border:1px solid var(--line);border-radius:14px;background:var(--panel-strong,#fff);margin:8px 0}
.report-chat-history>button strong,.report-chat-history>button small{display:block;overflow-wrap:anywhere}
.report-chat-history>button strong{font-size:13px}
.report-chat-history>button small{font-size:11px;color:var(--muted);margin-top:4px}
.report-history-mark{display:grid;place-items:center;width:32px;height:32px;color:#08775f;background:#e5f6ed;border-radius:10px;font-size:20px}
.report-chat-finished strong{font-size:15px;color:var(--green)}
#workerMessages>.inline-processing-status{flex:0 0 auto;align-self:flex-start;max-width:100%;margin:6px 0 12px}
.report-template-dialog,.report-review-dialog{width:min(660px,calc(100% - 24px));max-width:calc(100% - 24px);max-height:calc(100dvh - 40px);padding:24px;border:1px solid var(--line);border-radius:24px;background:var(--panel-strong,#fff);color:var(--text);box-shadow:var(--shadow);overflow:auto}
.report-template-dialog::backdrop,.report-review-dialog::backdrop{background:rgba(3,15,23,.65);backdrop-filter:blur(4px)}
:is(.report-template-dialog,.report-review-dialog)>header{display:flex;gap:12px;justify-content:space-between;align-items:start}
:is(.report-template-dialog,.report-review-dialog)>header h2{font-size:22px;line-height:1.35;margin:7px 0}
:is(.report-template-dialog,.report-review-dialog)>header p{font-size:13px;line-height:1.5;color:var(--muted);margin:7px 0 18px}
:is(.report-template-dialog,.report-review-dialog)>header>button{width:44px;min-height:44px;flex:0 0 44px;font-size:24px;border:1px solid var(--line);border-radius:50%;background:transparent;color:var(--text)}
.report-template-search{display:grid;gap:7px;font-size:12px;font-weight:700;margin:2px 0 16px}
.report-template-search input{width:100%;height:46px;border:1px solid var(--line);border-radius:12px;background:var(--panel-soft,#f7fafb);color:var(--text);padding:10px 14px;font-size:16px}
#reportTemplateSuggestion{font-size:12px;line-height:1.5;color:#076b83}
.report-template-list{display:grid;gap:10px;max-height:48dvh;overflow:auto;padding:4px}
.report-template-list button{display:grid;grid-template-columns:38px minmax(0,1fr) 16px;align-items:center;gap:12px;padding:16px;text-align:left;border:1px solid var(--line);border-radius:14px;background:var(--panel-soft,#f7fafb);color:var(--text)}
.report-template-list button[hidden]{display:none}
.report-template-list button strong,.report-template-list button small,.report-template-list button em{display:block;overflow-wrap:anywhere}
.report-template-list button strong{font-size:14px;line-height:1.4}
.report-template-list button small{font-size:12px;line-height:1.5;color:var(--muted);margin-top:4px}
.report-template-list button em{font-size:11px;font-weight:700;font-style:normal;color:#076b83;margin-top:8px}
.report-template-symbol{display:grid;place-items:center;width:38px;height:42px;border-radius:10px;background:#e1f1f5;color:#08758e;font-size:24px}
.report-template-symbol svg{width:24px;height:24px}
.report-template-list .is-recommended{border:2px solid #168e9e;background:#edf9fb;box-shadow:0 0 0 3px rgba(22,142,158,.12)}
.report-template-error{color:var(--red);font-size:13px}
.report-review-dialog{width:min(900px,calc(100% - 24px))}
#reportReviewBody #workerInlinePreview{width:100%;max-height:none;overflow:visible;margin:0;border:0;background:transparent;padding:0}
#reportReviewBody :is(.worker-preview-toggle,.worker-workflow-controls){display:none}
#reportReviewBody .worker-report-preview{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:14px}
#reportReviewBody .worker-report-review-field:first-child{grid-column:1/-1}
#reportReviewBody .worker-report-review-field textarea{font-size:16px}
#reportReviewBody .worker-preview-actions{display:flex;flex-wrap:wrap;gap:10px;margin-top:18px}
#reportReviewBody .worker-preview-actions button{min-height:44px}
#pdfTemplatePreviewDialog .template-preview-editor{background:var(--panel-soft,#f8fbfc);border-color:var(--line)}
#pdfTemplatePreviewDialog .template-preview-editor>div:first-child strong,#pdfTemplatePreviewDialog .template-preview-field-list label>span{color:var(--text)}
#pdfTemplatePreviewDialog [data-template-preview-field]{background:#fff;color:#173247;border:1px solid #b8cdd6}
#pdfTemplatePreviewDialog .template-preview-empty{height:auto;min-height:240px;color:var(--text);background:var(--panel-soft,#f5f9fa);border-color:var(--line)}
#pdfTemplatePreviewDialog .dialog-head{flex:0 0 auto}
#pdfTemplatePreviewDialog .dialog-head>button{flex:0 0 44px;width:44px;min-height:44px}
#pdfTemplatePreviewDialog .template-preview-actions{flex:0 0 auto;gap:10px;border-top:1px solid var(--line);padding:14px 20px;background:var(--panel-strong,#fff)}
html[data-theme=dark] #pdfTemplatePreviewDialog .template-preview-field-list label.is-required-missing{background:#392329;border-color:#df7c7c}
html[data-theme=dark] #pdfTemplatePreviewDialog .template-preview-field-list label>span em{color:#ffb7b7}
html[data-theme=dark] #pdfTemplatePreviewDialog [data-template-preview-field]{background:#0c2731;color:#e3f2f5;border-color:#537885}
.template-pdf-pages{height:100%;overflow:auto;padding:0 12px 16px;background:#e9eef1;border:1px solid #d3dfe4;border-radius:10px;text-align:center}
.template-pdf-pages nav{position:sticky;top:0;z-index:1;display:flex;align-items:center;justify-content:center;gap:16px;padding:8px;background:#f3f7f9;color:#173247;border-bottom:1px solid #ccdce3;font-size:12px}
.template-pdf-pages nav button{width:44px;height:44px;min-height:44px;color:#173247;border:1px solid #b8cdd6;border-radius:10px;background:#fff}
.template-pdf-pages canvas{display:block;max-width:100%;height:auto;margin:12px auto 0;background:#fff;box-shadow:0 3px 12px #001c3d26}
@media(max-width:800px){
 #pdfTemplatePreviewDialog{height:min(900px,94dvh);max-height:94dvh;overflow:hidden}
 #pdfTemplatePreviewDialog .dialog-head{padding:16px}
 #pdfTemplatePreviewDialog .dialog-head h2{font-size:20px;line-height:1.35}
 #pdfTemplatePreviewDialog .template-preview-workspace{display:flex;flex-direction:column;flex:1 1 auto;min-height:0;overflow:auto;padding:0 14px 14px}
 #pdfTemplatePreviewDialog .template-preview-editor{flex:0 0 auto;overflow:visible;min-height:auto}
 #pdfTemplatePreviewDialog .template-preview-body{flex:0 0 auto;min-height:0}
 #pdfTemplatePreviewDialog .template-pdf-pages{height:auto;overflow:visible}
 #pdfTemplatePreviewDialog .template-preview-body iframe{height:55dvh;min-height:280px;display:block}
 #pdfTemplatePreviewDialog .template-preview-body iframe.hidden{display:none}
 #pdfTemplatePreviewDialog .template-preview-empty{min-height:240px}
 #pdfTemplatePreviewDialog .template-preview-actions{padding:12px 14px;max-height:30dvh;overflow:auto}
}
.report-chat-active .worker-chat-head:has([data-report-chat-back]){display:flex!important}
:is(.report-template-dialog,.report-review-dialog,.report-chat-history,.report-question-card,.report-manual-card) :is(button,input,select,textarea):focus-visible,.report-chat-back:focus-visible,.report-chat-change:focus-visible{outline:3px solid #08758e;outline-offset:3px}
html[data-theme=dark] :is(.report-chat-step,#reportTemplateSuggestion,.report-template-list button em){color:#91e2df}
html[data-theme=dark] .report-template-symbol{color:#91e2df;background:#173b46}
html[data-theme=dark] .report-template-list .is-recommended{border-color:#7bd5d6;background:#10343e;box-shadow:0 0 0 3px rgba(123,213,214,.12)}
html[data-theme=dark] .report-history-mark{color:#8be5c3;background:#173d39}
html[data-theme=dark] .report-question-card li::marker{color:#91e2df}
html[data-theme=dark] #workerInlinePreview :is(.report-question-card,.report-manual-card) h3{color:#dcebee}
html[data-theme=dark] .worker-report-photos{background:#10313b;color:#dcebee;border-color:#3f8d99}
html[data-theme=dark] .worker-report-photos .secondary{background:#173a45;color:#e6f3f9;border-color:#497582}
html[data-theme=dark] :is(.report-template-dialog,.report-review-dialog,.report-chat-history,.report-question-card,.report-manual-card) :is(button,input,select,textarea):focus-visible,html[data-theme=dark] .report-chat-back:focus-visible,html[data-theme=dark] .report-chat-change:focus-visible{outline-color:#91e2df}
@media(max-width:600px){
 .report-template-dialog,.report-review-dialog{padding:18px 14px;border-radius:20px;max-height:calc(100dvh - 24px)}
 :is(.report-template-dialog,.report-review-dialog)>header h2{font-size:19px}
 .report-question-card,.report-manual-card{padding:16px}
 .report-chat-active .worker-chat-head{padding:7px 10px!important}
 .report-chat-active .report-chat-heading strong{font-size:12px}
 .report-chat-active .report-chat-heading small{font-size:10px;max-width:42vw;white-space:nowrap;text-overflow:ellipsis;overflow:hidden}
 .report-chat-change{max-width:83px;line-height:1.3;padding:6px}
 #reportReviewBody .worker-report-preview{grid-template-columns:minmax(0,1fr)}
}
