.report-theme-row{ display:grid; grid-template-columns:minmax(0,1fr) 150px; align-items:center; gap:16px; padding:14px 0; border-bottom:1px dashed var(--line-soft); }
.report-theme-row:last-of-type{ border-bottom:none; }
.report-theme-controls{ min-width:0; }
.report-theme-controls label{ font-size:13px; color:var(--text); letter-spacing:normal; text-transform:none; margin-bottom:8px; }
.report-theme-controls select{ width:100%; min-width:0; font-size:12px; }
.report-theme-preview{ margin:0; min-width:0; }
.report-theme-preview-viewport{ position:relative; overflow:hidden; border:1px solid var(--line-soft); border-radius:8px; background:#fff; min-width:0; }
.report-theme-preview-viewport iframe{ display:block; width:100%; height:120px; border:0; pointer-events:none; }
.report-theme-preview-open{ position:absolute; inset:0; width:100%; padding:0; border:0; border-radius:8px; background:transparent; cursor:zoom-in; }
.report-theme-preview-open:focus-visible{ outline:3px solid var(--green); outline-offset:-3px; }
.report-theme-preview figcaption{ margin-top:6px; font-size:10px; line-height:1.5; color:var(--text-dim); text-align:center; overflow-wrap:anywhere; }
.report-preview-dialog{ width:min(1040px,calc(100vw - 24px)); max-width:none; max-height:calc(100dvh - 24px); padding:16px; margin:auto; color:var(--text); background:var(--panel); border:1px solid var(--line); border-radius:14px; }
.report-preview-dialog[open]{ display:flex; flex-direction:column; gap:12px; }
.report-preview-dialog::backdrop{ background:rgba(0,0,0,.7); }
.report-preview-dialog-header{ display:flex; align-items:center; justify-content:space-between; gap:12px; flex:none; }
.report-preview-dialog-header h3{ margin:0; font-size:14px; }
.report-preview-close{ flex:none; padding:8px 12px; background:var(--panel-2); color:var(--text); border:1px solid var(--line); }
.report-preview-dialog-body{ overflow:auto; min-height:0; }
@media(max-width:480px){
  .report-theme-row{ grid-template-columns:minmax(0,1fr); gap:12px; }
  .report-theme-preview{ width:180px; max-width:100%; justify-self:center; }
}
