#view-reports .saved-reports-panel, #view-reports .report-builder { padding: 28px; }
.saved-reports-heading, .rb-section-heading { display:flex; justify-content:space-between; align-items:flex-start; gap:20px; }
.saved-reports-heading h2, .rb-section h3 { margin:0 0 8px; }
.saved-reports-heading p, .report-help { color:#64748b; font-size:13px; line-height:1.5; margin:6px 0 12px; }
.rb-section { padding:24px 0; border-bottom:1px solid #e2e8f0; }
.rb-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:20px; }
.report-builder label, .report-search { display:flex; flex-direction:column; gap:8px; font-size:13px; font-weight:600; color:#334155; min-width:0; }
.report-builder input:not([type=checkbox]), .report-builder select, .report-search input { box-sizing:border-box; width:100%; min-width:0; min-height:42px; padding:10px 12px; border:1px solid #cbd5e1; border-radius:8px; background:#fff; color:#172b4d; font-family:inherit; font-size:14px; font-weight:400; line-height:1.4; }
.report-builder input:focus-visible, .report-builder select:focus-visible, .report-search input:focus-visible { outline:2px solid #386ba1; outline-offset:2px; }
.rb-columns { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:10px; }
.report-builder .rb-check { flex-direction:row; align-items:center; gap:10px; font-weight:500; }
.rb-columns .rb-check { padding:12px; border:1px solid #e2e8f0; border-radius:8px; background:#f8fafc; }
.rb-columns .rb-check:has(input:checked) { background:#edf4fc; border-color:#a5bfdc; }
.report-builder input[type=checkbox] { width:17px; height:17px; min-height:0; margin:0; flex-shrink:0; accent-color:#17395c; }
.rb-filter-row { display:grid; grid-template-columns:minmax(0,1fr) minmax(0,1fr) minmax(0,1fr) auto; gap:12px; align-items:end; margin-top:14px; }
.rb-remove-filter { min-height:42px; }
#rb-filters:empty::before { content:'No filters — include all records you can access.'; display:block; padding:16px; background:#f8fafc; border:1px dashed #cbd5e1; border-radius:8px; color:#64748b; font-size:13px; }
#rb-sched-fields { margin-top:20px; }
#rb-sched-fields.hidden { display:none; }
#rb-note { color:#b91c1c; font-size:14px; }
.rb-footer, .report-row-actions { display:flex; flex-wrap:wrap; gap:8px; }
.report-row-actions .btn { white-space:nowrap; }
.report-search { max-width:420px; margin-top:20px; }
.saved-reports-table { min-width:720px; width:100%; }
.saved-reports-table td { vertical-align:middle; padding:16px 12px; }
.report-visibility { display:inline-block; padding:4px 8px; border-radius:6px; background:#edf2f7; color:#475569; font-size:12px; }
.report-empty { text-align:center; padding:36px !important; color:#64748b; }
.report-empty strong { color:#172b4d; }
#saved-report-output .table-wrap { max-height:540px; overflow:auto; }
@media(max-width:1000px) { .rb-columns { grid-template-columns:repeat(2,minmax(0,1fr)); } .rb-filter-row { grid-template-columns:repeat(2,minmax(0,1fr)); } }
@media(max-width:600px) {
 #view-reports .saved-reports-panel, #view-reports .report-builder { padding:16px; }
 .saved-reports-heading, .rb-section-heading { flex-direction:column; gap:12px; }
 .rb-grid, .rb-columns, .rb-filter-row { grid-template-columns:minmax(0,1fr); }
 .rb-section { padding:20px 0; }
 .report-row-actions { min-width:180px; }
}
#view-reports > .tabs { display:flex; flex-wrap:nowrap; overflow-x:auto; gap:4px; }
#view-reports > .tabs .tab { flex:0 0 auto; white-space:nowrap; }
