#custom-report-modal .modal-container { width: min(1040px,100%); }
#custom-report-modal .modal-body { display:grid; grid-template-columns:240px minmax(0,1fr); gap:24px; }
.custom-report-sidebar { border-right:1px solid var(--color-border); padding-right:20px; }
.custom-report-sidebar h4 { margin:18px 0 10px; font-size:13px; }
.custom-report-list { display:grid; gap:8px; }
.custom-report-list button { text-align:left; justify-content:flex-start; overflow-wrap:anywhere; }
.custom-report-field { display:grid; gap:8px; margin-bottom:16px; font-size:13px; }
.custom-report-field input:not([type=checkbox]),.custom-report-field textarea {
 width:100%; box-sizing:border-box; background:var(--color-bg-body); color:var(--color-text-primary);
 border:1px solid var(--color-border); border-radius:10px; padding:11px 12px; font:inherit;
}
.custom-report-field textarea { resize:vertical; min-height:110px; line-height:1.65; }
#custom-report-editor { min-height:300px; }
.custom-report-sources { max-height:190px; overflow:auto; border:1px solid var(--color-border); border-radius:12px; }
.custom-report-source { display:flex; align-items:flex-start; gap:10px; padding:10px 12px; font-size:13px; overflow-wrap:anywhere; }
.custom-report-source input { accent-color:var(--color-accent); margin-top:3px; width:16px; flex:0 0 16px; }
.custom-report-source span { flex:1; min-width:0; }
.custom-report-status { font-size:13px; line-height:1.6; color:var(--color-text-secondary); white-space:pre-line; }
.custom-report-status[data-error=true] { color:#f08080; }
.custom-report-toolbar { display:flex; flex-wrap:wrap; gap:8px; margin:12px 0; }
.custom-report-discord-option { display:flex; align-items:center; justify-content:space-between; gap:16px; margin:12px 0 18px; padding:14px; border:1px solid var(--color-border); border-radius:12px; font-size:13px; }
.custom-report-discord-option p { margin-top:5px; font-size:12px; color:var(--color-text-secondary); line-height:1.5; }
.custom-report-discord-option .toggle-switch { flex:0 0 44px; }
.custom-report-preview { border:1px solid var(--color-border); border-radius:12px; padding:18px; overflow:auto; max-height:500px; }
.custom-report-preview table { border-collapse:collapse; font-size:12px; }
.custom-report-preview td,.custom-report-preview th { border:1px solid var(--color-border); padding:6px; }
.custom-report-preview img { max-width:100%; }
#custom-report-modal [hidden] { display:none!important; }
#custom-report-modal .custom-report-delete { color:var(--color-error); }
@media(max-width:700px) {
 #custom-report-modal .modal-body { grid-template-columns:1fr; }
 .custom-report-sidebar { border-right:0; border-bottom:1px solid var(--color-border); padding:0 0 16px; }
 .custom-report-list { max-height:140px; overflow:auto; }
}
