.create-report-dialog{width:min(800px,calc(100vw - 32px));max-height:calc(100dvh - 40px);padding:0;border:1px solid var(--line,#dfe5ed);border-radius:12px;box-shadow:0 24px 80px #172d3d30;background:var(--panel,#fff);color:var(--ink,#17263b)}
.create-report-dialog::backdrop{background:#12293766}
.create-report-form{display:flex;flex-direction:column;max-height:calc(100dvh - 42px);margin:0}
.create-report-form>header{display:flex;align-items:center;justify-content:space-between;padding:22px 24px 18px;border-bottom:1px solid var(--line)}
.create-report-form h2{font-size:21px;margin:4px 0 0;font-weight:650;letter-spacing:-.02em}
.create-report-close{width:32px;height:32px;border:0;background:transparent;border-radius:6px;font-size:24px;color:var(--muted)}
.create-report-close:hover{background:var(--bg)}
.create-report-body{padding:22px 24px;overflow:auto;min-height:0}
.create-report-name{display:block;font-weight:600;margin-bottom:7px}
.create-report-body input:not([type=radio]):not([type=checkbox]){width:100%;min-height:40px;padding:9px 11px;border:1px solid var(--line);border-radius:6px;background:white}
.create-report-modes{border:0;padding:0;margin:22px 0 0;display:grid;grid-auto-flow:column;grid-auto-columns:minmax(130px,1fr);gap:8px;overflow-x:auto}
.create-report-modes legend{font-weight:600;padding:0 0 9px}
.create-report-modes label{display:flex;align-items:flex-start;gap:8px;padding:12px 10px;border:1px solid var(--line);border-radius:7px;cursor:pointer}
.create-report-modes label:has(:checked){border-color:var(--accent);background:#eff6f8}
.create-report-dialog input:is([type=radio],[type=checkbox]){width:16px;height:16px;margin:2px 0 0;flex:0 0 auto;accent-color:var(--accent)}
.create-report-dialog strong{display:block;font-size:13px;font-weight:600;overflow-wrap:anywhere}
.create-report-dialog small{display:block;font-size:11px;color:var(--muted);line-height:1.6;margin-top:3px}
#create-report-library{margin-top:20px}
#create-report-library[hidden]{display:none}
.create-report-selection{font-size:12px;color:var(--muted);margin:10px 0}
.create-report-choices{border:1px solid var(--line);border-radius:7px;max-height:240px;min-height:74px;overflow:auto;padding:8px}
.create-report-choice{display:flex;align-items:flex-start;gap:10px;padding:10px;border-radius:5px;cursor:pointer}
.create-report-choice:hover,.create-report-choice:has(:checked){background:#eff6f8}
.create-report-choice input{margin-top:4px!important}
.create-report-hint{font-size:12px;line-height:1.65;color:var(--muted);margin:12px 0 0}
.create-report-error{color:#aa342f;background:#fff4f2;border:1px solid #f1cac5;padding:10px 12px;border-radius:6px;margin:16px 0 0;overflow-wrap:anywhere}
.create-report-form>footer{display:flex;justify-content:flex-end;gap:8px;padding:16px 24px;border-top:1px solid var(--line);background:#fafcfc}
.create-report-dialog :focus-visible{outline:2px solid var(--accent);outline-offset:3px}
.create-report-dialog button:disabled{opacity:.5;cursor:default}
@media(max-width:520px){.create-report-modes{grid-auto-columns:minmax(130px,1fr)}.create-report-modes label{padding:9px}.create-report-modes small{margin:0}.create-report-body{padding:18px}.create-report-form>header,.create-report-form>footer{padding:16px 18px}}

.create-report-guided { margin-top:20px; }
.create-report-guided [hidden] { display:none; }
.create-report-guided > div { display:grid; gap:12px; margin-top:12px; }
.create-report-guided label { display:flex; gap:8px; align-items:center; flex-wrap:wrap; }
.create-report-guided select { min-width:0; max-width:100%; padding:8px; }
.create-report-guided fieldset { display:flex; flex-wrap:wrap; gap:12px; max-height:180px; overflow:auto; }
.create-report-guided table { display:block; overflow:auto; max-width:100%; border-collapse:collapse; }
.create-report-guided th { padding:8px; border:1px solid #dce3e9; }
.report-wizard{width:min(1180px,calc(100vw - 32px));height:min(820px,calc(100dvh - 40px));padding:0;border:1px solid var(--line,#dfe5ed);border-radius:16px;color:var(--ink,#17263b);background:white;box-shadow:0 24px 80px #172d3d30;overflow:hidden}
.report-wizard::backdrop{background:#12293766}
.report-wizard[open]{display:flex;flex-direction:column}
.report-wizard>header{display:flex;justify-content:space-between;align-items:center;padding:18px 24px;border-bottom:1px solid var(--line,#dfe5ed)}
.report-wizard h2{margin:0;font-size:22px}
.report-wizard>header button{border:0;background:none;font-size:26px;color:#64748b;cursor:pointer}
.report-wizard-steps{display:flex;gap:8px;padding:12px 24px;border-bottom:1px solid var(--line,#dfe5ed);flex-wrap:wrap}
.report-wizard-steps button{border:0;padding:9px 14px;background:#f1f5f9;border-radius:8px;color:inherit;cursor:pointer}
.report-wizard-steps button[aria-current=step]{background:#176b80;color:white}
.report-wizard-work{display:grid;grid-template-columns:minmax(270px,360px) minmax(0,1fr);flex:1;min-height:0}
.report-wizard-controls{padding:24px;overflow:auto;min-width:0;border-inline-end:1px solid #dfe5ed}
.report-wizard-controls section>label,.report-wizard-controls div>label{display:grid;gap:7px;margin-bottom:18px;font-size:13px;font-weight:600}
.report-wizard-controls input:not([type=radio]):not([type=checkbox]),.report-wizard-controls select{box-sizing:border-box;width:100%;min-width:0;padding:10px;border:1px solid #dfe5ed;border-radius:7px;background:#fff;color:inherit}
.report-wizard-controls fieldset{border:1px solid #dfe5ed;padding:14px;border-radius:8px;margin:0 0 20px;display:grid;gap:12px}
.report-wizard-controls fieldset label{display:flex;align-items:center;gap:8px;overflow-wrap:anywhere}
.report-wizard-controls input:is([type=radio],[type=checkbox]){accent-color:#176b80}
.report-wizard-visual{display:flex;flex-direction:column;min-width:0;min-height:0;padding:18px;background:#f1f5f9}
.report-wizard-visual p{margin:0 0 12px;font-size:13px;color:#526479}
.report-wizard-visual iframe{flex:1;min-height:220px;min-width:0;width:100%;box-sizing:border-box;border:1px solid #e2e8f0;border-radius:6px;background:white}
.report-wizard-visual small{padding-top:10px;font-size:11px;color:#526479}
.report-wizard-template-mini{display:grid;gap:4px;width:64px;padding:7px;background:#f1f5f9;border-radius:5px}
.report-wizard-template-mini i{height:5px;background:#cbd5e1}.report-wizard-template-mini i:first-child{height:10px;background:var(--template-accent)}
.report-wizard>footer{display:flex;justify-content:flex-end;gap:8px;padding:14px 24px;border-top:1px solid #dfe5ed}
.report-wizard>footer button{padding:10px 18px;cursor:pointer}.report-wizard button:disabled{opacity:.5;cursor:default}
.report-wizard [hidden]{display:none!important}.report-wizard-error{background:#fff4f2;color:#aa342f;padding:12px;border-radius:8px;overflow-wrap:anywhere}
.report-wizard :focus-visible{outline:2px solid #176b80;outline-offset:3px}
@media(max-width:720px){.report-wizard-work{display:flex;flex-direction:column;overflow:auto}.report-wizard-controls{flex:none;overflow:visible;border:0;padding:18px}.report-wizard-visual{flex:none;height:380px}.report-wizard-steps{padding:10px;gap:5px}.report-wizard-steps button{padding:8px}.report-wizard>header{padding:16px}.report-wizard>footer{padding:12px}}

.report-wizard-extra-datasets{max-height:200px;overflow:auto}.report-wizard-controls section>section{border:1px solid #e2e8f0;border-radius:8px;padding:10px;margin:10px 0}.report-wizard-controls section>section button{margin:4px}

/* Page-first wizard: explicit composition presets and per-component configuration. */
.report-wizard-context{margin:0;padding:10px 24px 0;color:#64748b;font-size:12px}
.report-wizard-layouts{grid-template-columns:repeat(2,minmax(0,1fr));border:0!important;padding:0!important}
.report-wizard-layouts>label{position:relative;display:grid!important;gap:8px!important;padding:12px;border:1px solid #dfe5ed;border-radius:10px;cursor:pointer;align-content:start}
.report-wizard-layouts>label:has(:checked){border-color:#176b80;background:#eef8fa;box-shadow:0 0 0 1px #176b80}
.report-wizard-layouts input{position:absolute;inset-inline-end:8px;top:8px}
.wizard-layout-thumb{height:74px;display:flex;flex-direction:column;gap:5px;padding:8px;background:#f4f7fa;border-radius:5px}
.wizard-layout-thumb i{display:block;flex:1;min-height:12px;border-radius:2px;border:1px solid #c6d7df}
.wizard-thumb-table{background:repeating-linear-gradient(0deg,#d4e0e5 0 2px,white 2px 8px)}
.wizard-thumb-chart{background:linear-gradient(90deg,transparent 8%,#7eb6c5 8% 24%,transparent 24% 35%,#3f879d 35% 53%,transparent 53% 64%,#a3cbd5 64% 84%,transparent 84%)}
.wizard-thumb-kpi{background:#dfedf2;color:#176b80;font-weight:bold;text-align:center;font-style:normal}
.wizard-component-tabs{display:flex;gap:6px;flex-wrap:wrap;margin:16px 0}
.wizard-component-tabs button[aria-current=true]{background:#176b80;color:white}
.report-wizard-controls h3{font-size:15px;margin:4px 0 14px}
.report-wizard-controls p{font-size:12px;line-height:1.6;color:#526479}
.report-wizard-controls .wizard-component-config{padding:0;border:0}
.report-wizard-controls .wizard-fields{max-height:200px;overflow:auto}
.wizard-column-order>div{display:flex;align-items:center;gap:4px;margin-bottom:5px}
.wizard-column-order>div>span{flex:1;min-width:0;overflow-wrap:anywhere;font-size:12px}
.wizard-column-order button{padding:3px 9px}
.report-wizard-controls details{margin:18px 0;border:1px solid #dfe5ed;padding:12px;border-radius:8px}
.report-wizard-controls summary{cursor:pointer;font-weight:600;font-size:13px;margin-bottom:12px}
.report-wizard-controls details>label{display:grid;gap:6px;margin:12px 0;font-size:13px}
.report-wizard-error{white-space:pre-line}
.report-wizard>footer{flex-wrap:wrap}
@media(max-width:720px){.report-wizard-layouts{grid-template-columns:repeat(2,minmax(0,1fr))}.report-wizard>footer button{padding:8px 10px}}

/* Guided creation polish: readable choices, quiet advanced controls, clear next steps. */
.report-wizard{width:min(1280px,calc(100vw - 32px));height:min(900px,calc(100dvh - 32px));border-radius:18px}
.report-wizard>header{padding:18px 24px;background:#fff;flex-shrink:0}
.report-wizard>header p{margin:5px 0 0;font-size:13px;color:#64748b}
.report-wizard>header button{width:36px;height:36px;border-radius:8px;padding:0}
.report-wizard>header button:hover{background:#f1f5f9}
.report-wizard-context{padding-top:12px;font-weight:500}
.report-wizard-steps{padding:10px 24px 14px;gap:12px;flex-shrink:0}
.report-wizard-steps button{background:transparent;color:#607184;border:1px solid transparent;font-weight:600;min-height:40px}
.report-wizard-steps button[aria-current=step]{background:#edf7f9;color:#155b70;border-color:#b8dbe3}
.report-wizard-work{grid-template-columns:minmax(340px,430px) minmax(0,1fr)}
.report-wizard-controls{padding:22px 24px;scrollbar-width:thin;scrollbar-color:#cbd5e1 transparent}
.wizard-name-fields{display:grid;grid-template-columns:1fr 1fr;gap:12px}
.report-wizard-controls .wizard-name-fields>label{margin-bottom:20px;font-size:12px}
.report-wizard-controls h3{font-size:17px;margin:0 0 6px;letter-spacing:-.015em}
.report-wizard-controls h3+p{margin:0 0 16px}
.report-wizard-layouts{gap:10px!important;margin-bottom:16px!important}
.report-wizard-layouts legend{position:absolute;width:1px;height:1px;padding:0;overflow:hidden;clip-path:inset(50%)}
.report-wizard-layouts>label{gap:5px!important;padding:10px 12px;transition:border-color .15s,background .15s}
.report-wizard-layouts>label:hover{border-color:#79aebc;background:#f6fafb}
.report-wizard-layouts>label:has(:focus-visible){outline:2px solid #176b80;outline-offset:3px}
.report-wizard-layouts strong{font-size:13px;font-weight:650;line-height:1.35}
.report-wizard-layouts small{font-size:11px;line-height:1.4;color:#607184}
.wizard-layout-thumb{height:32px;padding:5px 18px 5px 5px;gap:3px;background:#f3f6f8}
.wizard-layout-thumb i{min-height:7px}
.report-wizard-layouts input{top:13px;inset-inline-end:12px;width:14px;height:14px}
.wizard-component-tabs{gap:8px;margin:16px 0 8px}
.wizard-component-tabs button{font-size:12px;border:1px solid #dce5eb;border-radius:8px;padding:9px 12px}
.wizard-component-tabs button[data-ready=true]::after{content:'✓';margin-inline-start:8px;color:#14734c}
.wizard-component-tabs button[aria-current=true]::after{color:white}
.report-wizard-controls .wizard-completion{font-size:11px;color:#607184;margin:0 0 20px}
.report-wizard-controls .wizard-component-config>label{margin-bottom:14px}
.wizard-field-actions{display:flex;align-items:center;gap:6px;margin-bottom:8px}
.wizard-field-actions button{font-size:11px;padding:5px 8px!important;margin:0!important}
.wizard-field-actions span{font-size:11px;color:#64748b;margin-inline-start:auto}
.report-wizard-controls .wizard-column-tools>label{font-size:12px;margin-bottom:8px}
.report-wizard-controls .wizard-fields{gap:0;padding:6px 10px;max-height:190px;background:#fcfdfe}
.report-wizard-controls .wizard-fields label{font-size:12px;padding:7px 4px;border-radius:4px;cursor:pointer}
.report-wizard-controls .wizard-fields label:hover{background:#edf5f7}
.report-wizard-controls .wizard-fields legend{font-size:12px;color:#607184;padding:0 4px}
.report-wizard-controls .wizard-fields input{width:16px;height:16px;margin:0;flex-shrink:0}
.report-wizard-controls details{border-color:#e5ebef;background:#fcfdfe;margin:14px 0;padding:12px}
.report-wizard-controls details:not([open])>summary{margin-bottom:0}
.wizard-reuse-dataset{font-size:12px!important;margin:0 0 12px!important;color:#176b80!important}
.report-wizard-controls .wizard-review-page{padding:16px;margin:14px 0;border:1px solid #dce5eb;border-radius:10px;background:white}
.report-wizard-controls .wizard-review-page p{overflow-wrap:anywhere}
.report-wizard-controls .wizard-review-page button{font-size:11px;padding:6px 9px}
.report-wizard-visual{padding:20px;background:#f2f5f8}
.report-wizard-visual iframe{box-shadow:0 3px 16px #223b5010;border-radius:8px}
.report-wizard>footer{align-items:center;background:#fff;padding:14px 24px;flex-shrink:0}
.report-wizard .wizard-footer-hint{flex:1;min-width:160px;margin:0;color:#64748b;font-size:12px;line-height:1.5}
.report-wizard>footer button{min-height:40px;border-radius:8px;font-size:13px}
.report-wizard>footer .primary{background:#176b80;color:white;border:1px solid #176b80}
@media(max-width:850px){.report-wizard-work{grid-template-columns:minmax(300px,380px) minmax(0,1fr)}.report-wizard-controls{padding:18px}.report-wizard-visual{padding:14px}}
@media(max-width:720px){.report-wizard{height:calc(100dvh - 24px);width:calc(100vw - 24px);max-height:none}.report-wizard-steps{padding:8px 14px 12px;gap:2px;justify-content:space-between}.report-wizard-steps button{font-size:11px;padding:7px 8px}.report-wizard-context{padding-inline:18px}.report-wizard>header{padding:16px 18px}.report-wizard>header p{font-size:12px}.report-wizard>footer{padding:10px 14px;gap:6px}.report-wizard .wizard-footer-hint{flex-basis:100%;font-size:11px}.report-wizard>footer button{font-size:12px;padding:8px 10px}.report-wizard-layouts small{font-size:10px}.report-wizard-controls{padding:18px}.report-wizard-visual{height:360px}.wizard-name-fields{gap:10px}.wizard-field-actions{flex-wrap:wrap}}
@media(prefers-reduced-motion:reduce){.report-wizard-layouts>label{transition:none}}

.report-wizard-context{overflow-wrap:anywhere}
.report-wizard-controls button{max-width:100%;white-space:normal;overflow-wrap:anywhere}

/* Wizard guidance, page navigation, and readiness checks. */
.wizard-fields label small{margin-inline-start:auto;color:#607184;font-size:10px}
.wizard-chart-suggestion{border:1px solid #c5dde5!important;border-radius:8px;background:#f2f9fb;padding:12px!important;margin-top:16px!important;font-size:12px}
.wizard-chart-suggestion p{margin:8px 0!important}
.wizard-page-navigator{display:flex;gap:8px;overflow-x:auto;padding:4px 2px 14px;margin-bottom:12px}
.wizard-page-navigator button{flex:0 0 105px;border:1px solid #dce5eb;border-radius:8px;background:white;font-size:11px;padding:8px;color:#334155;cursor:pointer}
.wizard-page-navigator button[aria-current=true]{border-color:#176b80;background:#edf7f9}
.wizard-page-thumb{height:42px;margin-top:7px;padding:5px;min-width:60px}
.wizard-review-thumbnail{float:inline-end;width:82px;border:1px solid #dae5ea;background:white;border-radius:7px;cursor:pointer}
.wizard-review-page{display:flow-root}
.wizard-checks{flex-shrink:0;margin-top:12px;padding:12px;border:1px solid #d8e4e9;background:white;border-radius:8px;max-height:150px;overflow:auto;font-size:12px}
.report-wizard-visual .wizard-checks p{font-size:11px;margin:6px 0 0}
.wizard-checks [data-level=warning]{color:#805819!important}
.wizard-checks [data-level=pass]{color:#22654d!important}
@media(max-width:720px){.report-wizard-visual:has(.wizard-checks:not([hidden])){height:540px}.wizard-checks{max-height:180px}}

/* Wizard filters and recovery: contained controls, logical RTL spacing. */
.wizard-parameters{min-width:0;border:1px solid #dce5eb;border-radius:10px;margin:16px 0;padding:14px;background:#f8fbfc}
.wizard-parameters legend{font-size:13px;font-weight:650;padding-inline:5px}
.report-wizard-controls .wizard-parameters>label{display:grid;gap:6px;margin:12px 0;font-size:12px;overflow-wrap:anywhere}
.wizard-parameters input,.wizard-parameters select{min-width:0;width:100%;box-sizing:border-box}
.wizard-recovery-status{margin:0;padding:7px 24px;font-size:11px;color:#526779;background:#f4f8fa;overflow-wrap:anywhere;flex-shrink:0}
.report-wizard :is(button,input,select,summary):focus-visible{outline:2px solid #176b80;outline-offset:3px}
.report-wizard[dir=rtl] .wizard-layout-thumb{padding-inline:5px 18px}
.report-wizard[dir=rtl] .wizard-page-thumb{padding:5px}
@media(max-width:720px){.wizard-recovery-status{padding:6px 18px}.wizard-parameters{padding:10px}}

.report-wizard-controls .wizard-filter-choices{max-height:280px;overflow:auto;background:white;padding:10px;gap:6px;margin:10px 0}
.report-wizard-controls .wizard-filter-choices>label{display:flex;font-size:12px;align-items:center;gap:8px;margin:0;padding:5px 2px}
.report-wizard-controls .wizard-filter-choices>label:has(input[type=search]){display:grid}
.report-wizard-controls .wizard-filter-choices input[type=checkbox]{width:16px;height:16px;flex-shrink:0}

.creation-recovery{width:min(560px,calc(100vw - 32px))}
.creation-recovery .create-report-body p{line-height:1.6;margin:0}
.creation-recovery .create-report-body .create-report-error{margin-top:14px}
.creation-recovery footer{flex-wrap:wrap}
.creation-recovery footer button{white-space:normal;max-width:100%}

/* Wizard arrangement and appearance controls retain keyboard alternatives to drag. */
.wizard-arrangement{display:grid;grid-template-columns:1fr 1fr;gap:8px;background:#f8fafc;padding:12px!important}
.wizard-arrangement>strong,.wizard-arrangement>p{grid-column:1/-1;margin:0}
.report-wizard-controls .wizard-arrangement>label{font-size:12px;margin:0}
.wizard-arrangement button{font-size:11px;padding:6px;margin:0!important}
.wizard-component-tabs button[draggable=true]{cursor:grab}
.wizard-component-tabs button[draggable=true]:active{cursor:grabbing}
.wizard-appearance[open]{display:grid;grid-template-columns:1fr 1fr;gap:10px}
.wizard-appearance>summary,.wizard-appearance>p,.wizard-appearance>button{grid-column:1/-1}
.report-wizard-controls .wizard-appearance>label{margin:0;font-size:12px}
.report-wizard-controls .wizard-appearance input[type=color]{height:34px;padding:3px;cursor:pointer}
.report-wizard-controls .wizard-appearance label:has(input[type=checkbox]){display:flex;align-items:center;gap:8px}
.wizard-field-suggestions{padding:12px!important;background:#f6fafb}
.wizard-field-suggestions>div{border-top:1px solid #dfe5ed;margin-top:8px;padding-top:8px}
.wizard-checks button{font-size:11px;padding:4px 8px;margin:0 0 10px}
.wizard-review-page [data-level=warning]{color:#8a461b;background:#fff6e7;border-radius:6px;padding:8px}
@media(max-width:400px){.wizard-arrangement,.wizard-appearance[open]{grid-template-columns:1fr}}
