.crm-reports-page{height:100%;display:flex;flex-direction:column;background:#fff;color:#283142;font:14px Inter,Arial,sans-serif}
.crm-reports-header{height:64px;min-height:64px;display:flex;align-items:center;gap:8px;padding:0 22px;border-bottom:1px solid #e3e7ec}.crm-reports-header h1{font-size:20px;letter-spacing:-.4px;margin:0;font-weight:650}.crm-reports-header span{font-size:12px;color:#939ba8;margin-right:6px}.crm-reports-header button{height:34px;border:1px solid #dae0e7;border-radius:9px;background:#fff;padding:0 13px;font:inherit;cursor:pointer}.crm-reports-header button:last-child{background:#151c2b;color:white;border-color:#151c2b}.crm-reports-header button:disabled{opacity:.5;cursor:default}
.crm-reports-layout{min-height:0;flex:1;display:flex}.crm-reports-rail{width:285px;flex:none;border-right:1px solid #e3e7ec;padding:20px 16px;overflow-y:auto;display:flex;flex-direction:column;gap:20px}.crm-reports-rail section{display:flex;flex-direction:column;gap:9px}.crm-reports-rail h2{font-size:11px;text-transform:uppercase;letter-spacing:.06em;color:#8992a2;margin:0;font-weight:700}.crm-reports-rail label{display:flex;flex-direction:column;gap:5px;color:#738092;font-size:12px}.crm-reports-rail label span{color:#36466b}.crm-reports-rail select,.crm-reports-rail input[type=date]{height:34px;max-width:100%;border:1px solid #dde3e9;border-radius:8px;background:#f7f8fa;padding:0 9px;font:13px Inter,Arial,sans-serif;color:#35425a}.crm-report-tabs{display:flex;border-radius:9px;background:#eff1f3;padding:2px;gap:2px}.crm-report-tabs button{border:0;background:transparent;color:#8a94a3;font:600 13px Inter,Arial,sans-serif;padding:7px 10px;border-radius:7px;cursor:pointer}.crm-report-tabs button.active{background:#fff;color:#343d4c;box-shadow:0 1px 3px #d6dce2}.crm-report-pill{align-self:flex-start;background:#e3efff;color:#235acf;border:1px solid #8dbdff;border-radius:20px;padding:5px 12px;font-size:13px}.crm-report-check{display:flex!important;flex-direction:row!important;align-items:center!important;margin:0 0 8px}.crm-report-period{display:flex;gap:2px;border:1px solid #dfe4eb;border-radius:8px;overflow:hidden}.crm-report-period button{flex:1;min-width:0;border:0;background:white;padding:8px 3px;font:11px Inter,Arial,sans-serif;color:#69768b;cursor:pointer}.crm-report-period button.active{background:#3069e9;color:#fff}.crm-report-legacy{margin-top:auto;border:0;background:none;text-align:left;color:#5d6d8a;font:12px Inter,Arial,sans-serif;text-decoration:underline;cursor:pointer;padding:8px 0}
.crm-reports-main{min-width:0;min-height:0;flex:1;display:flex;flex-direction:column}.crm-reports-toolbar{height:73px;min-height:73px;display:flex;justify-content:space-between;align-items:center;padding:0 20px;border-bottom:1px solid #e0e5ea}.crm-reports-toolbar h2{margin:0;font-size:14px}.crm-reports-toolbar span{color:#7a8595;font-size:12px}.crm-report-view{display:flex;border:1px solid #dfe4eb;border-radius:9px;overflow:hidden}.crm-report-view button{border:0;background:white;color:#738092;padding:8px 15px;font:13px Inter,Arial,sans-serif;cursor:pointer}.crm-report-view button.active{background:#2d67e9;color:#fff}.crm-report-output{min-height:0;overflow:auto;flex:1}.crm-report-output table{width:100%;border-collapse:collapse;font-size:13px}.crm-report-output th{position:sticky;top:0;background:#fff;color:#8a929e;text-align:left;text-transform:uppercase;letter-spacing:.04em;font-size:11px;font-weight:650;height:43px;padding:0 22px;z-index:1}.crm-report-output td{height:52px;padding:0 22px;border-bottom:1px solid #f0f2f4;color:#495365}.crm-report-output tr:nth-child(odd) td{background:#f5f6f7}.crm-report-output td:last-child,.crm-report-output th:last-child{text-align:right}.crm-report-empty{padding:45px;color:#8b95a3;text-align:center}.crm-report-error{padding:12px 20px;color:#a51e27;background:#fff4f4}.crm-report-error button{text-decoration:underline;background:none;border:0;color:inherit;cursor:pointer}.crm-report-footer{height:52px;min-height:52px;display:flex;align-items:center;justify-content:space-between;border-top:1px solid #e2e6e9;padding:0 20px;color:#8c96a4;font-size:12px}.crm-report-footer span:last-child{display:flex;align-items:center;gap:8px}.crm-report-footer button{border:0;border-radius:8px;padding:7px 10px;background:#f2f4f6;color:#49566b;cursor:pointer}.crm-report-footer button:disabled{opacity:.5;cursor:default}.crm-report-footer b{padding:8px 11px;background:#2e67e9;color:white;border-radius:8px}.crm-report-chart{display:grid;gap:14px;padding:24px}.crm-report-chart>div{display:grid;grid-template-columns:minmax(180px,240px) minmax(30px,1fr) 50px;align-items:center;gap:15px}.crm-report-chart>div span{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.crm-report-chart>div i{display:block;height:18px;border-radius:5px;background:#3e78ec}.crm-report-chart>div strong{text-align:right}
@media(max-width:700px){.crm-reports-header{padding:0 12px}.crm-reports-header span{display:none}.crm-reports-rail{width:180px;padding:14px 10px}.crm-reports-toolbar{padding:0 10px}.crm-report-output td,.crm-report-output th{padding:0 10px}.crm-report-chart>div{grid-template-columns:100px minmax(30px,1fr) 35px}}

/* Reference report density at desktop viewports. */
.crm-reports-toolbar{height:56px;min-height:56px}
.crm-report-output th{height:40px}
.crm-report-output td{height:40px}
.crm-report-footer{height:44px;min-height:44px}

.crm-comparison-controls{display:flex;align-items:end;flex-wrap:wrap;gap:10px;padding:18px 16px 16px}.crm-comparison-controls label{display:flex;flex-direction:column;gap:5px;font-size:11px;color:#7c8797}.crm-comparison-controls select{min-width:100px;height:34px;padding:0 9px;border:1px solid #dfe4eb;border-radius:8px;background:#fff;color:#263345;font:13px Inter,Arial,sans-serif}.crm-comparison-controls>span{padding-bottom:8px;color:#8690a0}
.crm-comparison-legend{display:flex;align-items:center;gap:22px;padding:0 17px 14px;font-size:12px;color:#697386}.crm-comparison-legend span{display:inline-flex;align-items:center;gap:6px}.crm-comparison-legend span:last-child{margin-left:auto;color:#a2aab6}.crm-comparison-legend i{width:12px;height:12px;display:inline-block;border-radius:2px}.crm-comparison-legend .first,.crm-comparison-bars .first{background:#60a5fa}.crm-comparison-legend .second,.crm-comparison-bars .second{background:#34d399}
.crm-comparison-table{min-width:650px}.crm-comparison-table th,.crm-comparison-table td{height:37px!important;padding:0 12px!important}.crm-comparison-table thead th{background:#f7f8fa!important;color:#66717f!important}.crm-comparison-table td:nth-child(2),.crm-comparison-table td:nth-child(3),.crm-comparison-table td:nth-child(4),.crm-comparison-table th:nth-child(2),.crm-comparison-table th:nth-child(3),.crm-comparison-table th:nth-child(4){text-align:right}.crm-comparison-table td:last-child,.crm-comparison-table th:last-child{text-align:left}.crm-comparison-table tbody tr.current td{background:#eff6ff!important}.crm-comparison-table tbody td:nth-child(2),.crm-comparison-table tfoot td:nth-child(2){color:#2563eb}.crm-comparison-table tbody td:nth-child(3),.crm-comparison-table tfoot td:nth-child(3){color:#059669}.crm-comparison-table td.positive{color:#059669}.crm-comparison-table td.negative{color:#ef4444}.crm-comparison-table tfoot th,.crm-comparison-table tfoot td{background:#f1f3f5!important;font-weight:650}.crm-comparison-bars{display:flex;flex-direction:column;gap:2px;max-width:240px}.crm-comparison-bars i{display:block;height:7px;min-width:1px;border-radius:2px}

.crm-reports-main:has(.crm-comparison-table){background:#f3f4f6}
.crm-reports-header button,.crm-report-view button{display:inline-flex;align-items:center;justify-content:center;gap:8px}
.crm-reports-header svg,.crm-report-view svg{flex:none}
.crm-report-output[aria-busy=true] table{opacity:.6;pointer-events:none}
.crm-report-output .crm-report-group-table th,.crm-report-output .crm-report-group-table td{padding:8px 12px;text-align:left}
.crm-report-output .crm-report-group-table .number{text-align:right;font-variant-numeric:tabular-nums}
.crm-report-output .crm-report-expand{width:32px;padding:8px}
.crm-report-expand button,.crm-report-group-table th button{border:0;background:transparent;color:inherit;font:inherit;cursor:pointer;padding:0;text-transform:inherit;letter-spacing:inherit}
.crm-report-expand button{display:flex;align-items:center}
.crm-report-group-table .crm-report-detail{padding:12px 16px;border-left:2px solid #60a5fa;background:#eff6ff66}
.crm-report-output .crm-report-detail-table td,.crm-report-output .crm-report-detail-table th{background:transparent;text-align:left;white-space:nowrap}
.crm-report-output .crm-report-group-table tfoot td{background:#f3f4f6;font-weight:600}
.crm-report-detail-paging{display:flex;align-items:center;justify-content:flex-end;gap:8px;margin-top:12px}
.crm-report-detail-paging>span:first-child{margin-right:auto}
.crm-report-detail-paging button{background:#fff;border:1px solid #e5e7eb;border-radius:6px;padding:4px 8px;color:#4b5563;cursor:pointer}
.crm-report-detail-paging button:disabled{opacity:.5;cursor:default}
.crm-saved-menu{position:fixed;inset:auto;margin:0;width:300px;max-height:min(480px,75vh);overflow:auto;background:white;border:1px solid #e5e7eb;border-radius:8px;padding:4px;box-shadow:0 10px 20px #0000001a;color:#374151;font:14px Inter,Arial,sans-serif}
.crm-saved-menu button{display:flex;align-items:center;justify-content:space-between;gap:8px;width:100%;background:transparent;border:0;border-radius:6px;padding:8px 10px;text-align:left;font:inherit;color:inherit;cursor:pointer}
.crm-saved-menu button:hover,.crm-saved-menu button.active{background:#f3f4f6}
.crm-saved-menu button:disabled{opacity:.5;cursor:wait}
.crm-saved-menu small{color:#6b7280;font-size:11px}
.crm-saved-menu p{margin:8px;color:#6b7280}
.crm-saved-actions:has(button){border-bottom:1px solid #e5e7eb;padding-bottom:4px;margin-bottom:4px}
.crm-report-dialog{width:min(440px,calc(100vw - 32px));border:1px solid #e5e7eb;border-radius:12px;padding:24px;background:white;color:#374151;box-shadow:0 20px 40px #0003;font:14px Inter,Arial,sans-serif}
.crm-report-dialog::backdrop{background:#0006}
.crm-report-dialog h2{margin:0 0 20px;font-size:18px;font-weight:600}
.crm-report-dialog label{display:grid;gap:6px}
.crm-report-dialog input{width:100%;height:36px;box-sizing:border-box;background:#f3f4f6;border:1px solid #e5e7eb;border-radius:6px;padding:8px 10px;font:inherit}
.crm-report-dialog footer{display:flex;justify-content:flex-end;gap:8px;margin-top:24px}
.crm-report-dialog button{border:0;border-radius:6px;padding:7px 12px;background:#f3f4f6;color:#374151;font:inherit;cursor:pointer}
.crm-report-dialog button.primary{background:#111827;color:#fff}.crm-report-dialog button.danger{background:#dc2626;color:#fff}
.crm-report-dialog button:disabled{opacity:.5;cursor:wait}.crm-report-dialog [role=alert]{color:#b91c1c}
.crm-comparison-controls{align-items:center;gap:6px;padding:15px 16px 14px}
.crm-comparison-controls label{display:flex;flex-direction:row;align-items:center;gap:4px;border:1px solid #9ec4ff;border-radius:18px;background:#e2eeff;padding:4px 10px;color:#8190a3;font-size:12px}
.crm-comparison-controls select{height:auto;min-width:0;border:0;background:transparent;color:#2552bc;font-weight:600;padding:0 2px;max-width:120px}
.crm-comparison-controls>span{padding:0 5px}
.crm-comparison-legend{padding:0 16px 14px}
.crm-comparison-table{width:calc(100% - 32px)!important;margin:0 16px;max-width:900px;font-size:13px}
.crm-comparison-table th,.crm-comparison-table td{height:36px!important}
.crm-comparison-table tbody td{background:#f3f4f6!important;border:0!important}
.crm-comparison-table tbody tr.current td{background:#eef0ff!important}
.crm-comparison-table thead th{height:32px!important;background:#fff!important}
.crm-comparison-table tfoot th,.crm-comparison-table tfoot td{background:#f3f4f6!important}
.crm-comparison-table{table-layout:fixed}
.crm-comparison-table th:nth-child(1){width:90px}
.crm-comparison-table th:nth-child(2),.crm-comparison-table th:nth-child(3),.crm-comparison-table th:nth-child(4){width:90px}
.crm-comparison-bars i{min-width:0}
.crm-comparison-table tbody td:nth-child(3),.crm-comparison-table tfoot td:nth-child(3){color:#243143}
/* Reports/FieldSelect.vue: w-72 menu, text-xs pills, max-h-64 list. */
.crm-reports-rail{width:288px;padding:16px;box-sizing:border-box}
.crm-reports-rail[hidden],.crm-reports-page [hidden]{display:none!important}
.crm-reports-toolbar{gap:12px;padding:10px 16px;height:auto;min-height:56px;box-sizing:border-box}
.crm-reports-toolbar>div:first-of-type{min-width:0;flex:1}
.crm-reports-toolbar>div:first-of-type>span{display:block;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
#report-toggle-rail{border:0;background:transparent;color:#6b7280;padding:6px;display:flex;cursor:pointer}
#report-toggle-rail[aria-expanded=true] svg{transform:rotate(90deg)}
.crm-field-select{display:inline-flex;align-items:center;align-self:flex-start;max-width:100%;position:relative}
.crm-field-trigger{display:inline-flex;align-items:center;gap:6px;max-width:256px;border:0;border-radius:999px;padding:4px 12px;background:#f3f4f6;color:#4b5563;font:500 12px/16px Inter,Arial,sans-serif;cursor:pointer;text-align:left}
.crm-field-trigger>span{flex:none;font-weight:600;color:#6b7280}.crm-field-trigger strong{font-weight:inherit;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.crm-field-trigger svg{flex:none}.crm-field-trigger.active{background:#dbeafe;color:#1e40af;box-shadow:0 0 0 1px #93c5fd}.crm-field-trigger.active strong{font-weight:600}
.crm-field-clear{width:20px;height:20px;flex:none;margin-left:4px;background:transparent;border:0;color:#9ca3af;border-radius:50%;cursor:pointer;padding:0;font-size:16px}
.crm-field-clear:hover{background:#e5e7eb;color:#374151}
.crm-field-menu{position:fixed;inset:auto;margin:0;padding:4px 0;width:288px;box-sizing:border-box;border:1px solid #e5e7eb;border-radius:8px;background:#fff;box-shadow:0 10px 15px -3px #0002,0 4px 6px -4px #0002;color:#374151;font:14px/20px Inter,Arial,sans-serif}
.crm-field-search{padding:4px 8px;border-bottom:1px solid #f3f4f6}.crm-field-search input{width:100%;box-sizing:border-box;border:1px solid #e5e7eb;border-radius:4px;background:#f9fafb;padding:4px 8px;font:inherit;color:inherit}
.crm-field-options{max-height:256px;overflow-y:auto;padding:4px 0}.crm-field-options button{display:flex;width:100%;align-items:center;gap:8px;background:transparent;border:0;padding:6px 12px;text-align:left;font:inherit;color:inherit;cursor:pointer}
.crm-field-options button span{min-width:0;flex:1;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.crm-field-options button svg{flex:none;color:#d1d5db}.crm-field-options button small{font-size:10px;color:#9ca3af}
.crm-field-options button[aria-selected=true]{background:#eff6ff;color:#1d4ed8;font-weight:600}.crm-field-options button[aria-selected=true] svg{color:#2563eb}.crm-field-options button:hover{background:#f9fafb}.crm-field-options button.highlight{box-shadow:inset 0 0 0 1px #60a5fa}.crm-field-options p{padding:12px;margin:0;color:#9ca3af}
.crm-field-menu footer{display:flex;justify-content:space-between;border-top:1px solid #f3f4f6;padding:6px 12px}.crm-field-menu footer button{font:12px/16px Inter,Arial,sans-serif;border:0;background:none;color:#6b7280;cursor:pointer}.crm-field-menu footer [data-done]{color:#2563eb;font-weight:500}
.crm-report-filter-heading{display:flex;gap:8px;align-items:center}.crm-report-filter-heading .crm-report-check{margin:0 0 0 auto;font-size:12px;white-space:nowrap}.crm-report-filter-heading input{width:14px;height:14px;margin:0}.crm-report-filter-heading button{background:none;border:0;padding:0;color:#6b7280;cursor:pointer;font-size:12px}
#report-more-filters{border:1px dashed #d1d5db;border-radius:999px;background:#fff;color:#4b5563;padding:4px 12px;font:12px/16px Inter,Arial,sans-serif;cursor:pointer}
#report-compare{display:flex;align-items:center;justify-content:center;gap:6px;border:1px solid #e5e7eb;border-radius:6px;padding:6px 12px;background:#fff;color:#374151;font:500 12px/16px Inter,Arial,sans-serif;cursor:pointer}
#report-compare.active{border-color:#2563eb;color:#2563eb;background:#eff6ff}#report-compare:disabled{opacity:.5;cursor:default}
@media(max-width:700px){.crm-reports-rail{width:240px}.crm-reports-toolbar{flex-wrap:wrap}.crm-report-view{margin-left:auto}.crm-reports-header{padding:0 12px}.crm-reports-header h1{margin-right:auto}.crm-reports-header button{padding:0 8px}.crm-report-period button{font-size:11px}}

/* Keep the builder and results usable together on narrow screens. Table and
   field-menu scrolling stays local instead of widening the whole page. */
@media(max-width:700px){
  .crm-reports-header{height:auto;min-height:64px;flex-wrap:wrap;padding:12px;flex-shrink:0}
  .crm-reports-layout{flex-direction:column;overflow:hidden}
  .crm-reports-rail{width:100%;max-height:42dvh;border-right:0;border-bottom:1px solid #e3e7ec;flex-direction:row;flex-wrap:wrap;gap:16px;flex-shrink:0}
  .crm-reports-rail section{flex:1 1 200px;min-width:0}
  .crm-reports-main{width:100%;min-height:0}
  .crm-reports-toolbar{flex-shrink:0}
  .crm-report-view{max-width:100%;overflow-x:auto;flex-shrink:0;flex-basis:100%;margin-left:0;justify-content:flex-end}
  .crm-report-view button{white-space:nowrap;padding:8px 10px;flex-shrink:0}
  .crm-report-footer{padding:0 12px;flex-shrink:0}
  .crm-field-menu{max-width:calc(100vw - 16px)}
}
