/* Shared compact report primitives. Phase 1.1 consumer: Revenue Audit. */
.report-page { display:grid; gap:12px; min-width:0; }
.report-header { display:flex; align-items:flex-start; justify-content:space-between; gap:16px; padding:0; background:transparent; }
.report-header-copy { min-width:240px; }
.report-breadcrumb { margin-bottom:2px; color:var(--rv-primary); font-size:10px; line-height:1.2; font-weight:600; }
.report-header h1 { margin:0; color:var(--rv-text); font-size:22px; line-height:1.2; font-weight:700; letter-spacing:-.015em; }
.report-header p { max-width:640px; margin:3px 0 0; color:var(--rv-text-muted); font-size:11px; line-height:1.35; }
.report-header-meta,.report-header-controls { display:flex; align-items:flex-end; justify-content:flex-end; flex-wrap:wrap; gap:8px; }
.report-toolbar { display:flex; align-items:center; justify-content:flex-end; flex-wrap:wrap; gap:6px; }
.report-toolbar form { margin:0; }
.report-button { min-height:32px; height:32px; display:inline-flex; align-items:center; justify-content:center; padding:5px 10px; border:1px solid var(--rv-border); border-radius:6px; background:var(--rv-surface); color:var(--rv-text-secondary); font-size:11px; line-height:1; font-weight:600; text-decoration:none; white-space:nowrap; }
.report-button:hover { border-color:var(--rv-border-strong); color:var(--rv-primary-hover); }
.report-button--primary { border-color:var(--rv-primary); background:var(--rv-primary); color:var(--rv-surface); }
.report-button--primary:hover { background:var(--rv-primary-hover); color:var(--rv-surface); }
.report-kpi-grid { display:grid; grid-template-columns:repeat(6,minmax(0,1fr)); gap:10px; }
.stat-card { height:90px; min-height:90px; display:grid; grid-template-columns:28px minmax(0,1fr); grid-template-rows:28px 24px 12px; gap:2px 8px; padding:10px 11px; border:1px solid var(--rv-border); border-radius:8px; background:var(--rv-surface); box-shadow:0 1px 2px rgba(15,23,42,.04); }
.stat-card-icon { grid-row:1/2; width:28px; height:28px; display:grid; place-items:center; border-radius:7px; background:var(--rv-primary-soft); color:var(--rv-primary-hover); font-size:11px; font-weight:700; }
.stat-card--success .stat-card-icon { background:var(--rv-success-soft); color:var(--rv-success); }
.stat-card--warning .stat-card-icon { background:var(--rv-warning-soft); color:var(--rv-warning); }
.stat-card-title { align-self:center; color:var(--rv-text-muted); font-size:11px; line-height:1.2; font-weight:600; }
.stat-card-value { grid-column:1/-1; align-self:end; color:var(--rv-text); font-size:22px; line-height:1.05; font-weight:700; font-variant-numeric:tabular-nums; }
.stat-card-description { grid-column:1/-1; min-height:12px; align-self:end; color:var(--rv-text-muted); font-size:9px; line-height:1.2; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.report-filter-card,.report-table-card { min-width:0; overflow:hidden; border:1px solid var(--rv-border); border-radius:8px; background:var(--rv-surface); box-shadow:0 1px 2px rgba(15,23,42,.04); }
.report-card-header,.results-toolbar { min-height:46px; display:flex; align-items:center; justify-content:space-between; gap:10px; padding:8px 12px; border-bottom:1px solid var(--rv-border); }
.report-card-header h3,.results-toolbar h2 { margin:0; color:var(--rv-text); font-size:13px; line-height:1.25; font-weight:600; }
.report-card-header p { margin:2px 0 0; color:var(--rv-text-muted); font-size:11px; line-height:1.25; }
.report-card-actions { display:flex; align-items:center; flex-wrap:wrap; gap:6px; }
.report-filter-body { padding:0 12px; }
.filter-section { padding:10px 0; border-bottom:1px solid var(--rv-border); }
.filter-section:last-child { border-bottom:0; }
.filter-section-header { display:grid; gap:1px; margin-bottom:8px; }
.filter-section-header strong { color:var(--rv-text); font-size:12px; font-weight:600; }
.filter-section-header small { color:var(--rv-text-muted); font-size:10px; }
.filter-section--card,.filter-section--card:last-child { padding:var(--rv-space-3); border:1px solid var(--rv-border); border-radius:var(--rv-radius-sm); background:var(--rv-surface); box-shadow:var(--rv-shadow-sm); }
.filter-section--card .filter-section-header { gap:var(--rv-space-1); margin-bottom:var(--rv-space-3); }
.filter-section--card .filter-section-header strong { color:var(--rv-primary-hover); font-size:.8125rem; line-height:1.2; font-weight:700; }
.filter-section--card .filter-section-header small { font-size:.6875rem; line-height:1.35; }
.filter-section--card .filter-grid { gap:var(--rv-space-3); align-items:stretch; }
.filter-section--card .filter-field { height:100%; gap:var(--rv-space-1); }
.filter-section--card .filter-field > input,.filter-section--card .filter-field > select { margin-top:auto; }
.filter-section--checkboxes .filter-grid--checks { gap:var(--rv-space-2); }
.filter-section--checkboxes .filter-grid--checks label { min-width:0; min-height:var(--rv-space-7); padding:var(--rv-space-1) var(--rv-space-2); border:1px solid var(--rv-border); border-radius:var(--rv-radius-sm); background:var(--rv-surface-muted); cursor:pointer; transition:background-color .15s ease,border-color .15s ease,color .15s ease; }
.filter-section--checkboxes .filter-grid--checks label:hover { border-color:var(--rv-border-strong); background:var(--rv-primary-soft); color:var(--rv-primary-hover); }
.filter-field--numeric-range .filter-range { gap:0; }
.filter-field--numeric-range .filter-range > input:first-child { border-radius:var(--rv-radius-sm) 0 0 var(--rv-radius-sm); }
.filter-field--numeric-range .filter-range > input:last-child { border-left:0; border-radius:0 var(--rv-radius-sm) var(--rv-radius-sm) 0; }
.filter-grid { display:grid; grid-template-columns:repeat(5,minmax(0,1fr)); gap:9px 10px; align-items:start; }
.filter-grid--revenue-audit { grid-template-columns:repeat(5,minmax(0,1fr)); }
.filter-field { min-width:0; display:flex; flex-direction:column; gap:4px; }
.filter-field > label,.results-toolbar label { color:var(--rv-text-secondary); font-size:11px; line-height:1.15; font-weight:600; }
.filter-field input,.filter-field select,.results-toolbar select { width:100%; min-height:32px; height:32px; padding:5px 8px; border-radius:6px; font-size:12px; }
.report-multiselect-native { position:absolute!important; width:1px!important; height:1px!important; min-height:1px!important; padding:0!important; opacity:0; pointer-events:none; }
.report-multiselect { position:relative; min-width:0; }
.report-multiselect-trigger { width:100%; min-height:32px; height:32px; display:flex; align-items:center; justify-content:space-between; gap:8px; padding:5px 8px; border:1px solid var(--rv-border); border-radius:6px; background:var(--rv-surface); color:var(--rv-text-secondary); font-size:12px; text-align:left; }
.report-multiselect-trigger span:first-child { min-width:0; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.report-multiselect-trigger:focus,.report-multiselect.is-open .report-multiselect-trigger { border-color:var(--rv-primary); outline:2px solid var(--rv-primary-soft); outline-offset:0; }
.report-multiselect-panel { position:fixed; z-index:var(--rv-z-popover); display:none; padding:7px; border:1px solid var(--rv-border); border-radius:8px; background:var(--rv-surface); box-shadow:var(--rv-shadow-md); }
.report-multiselect-panel.is-open { display:block; }
.report-multiselect-search { width:100%; height:30px!important; min-height:30px!important; margin-bottom:6px; }
.report-multiselect-all,.report-multiselect-option { display:flex; align-items:center; gap:7px; min-height:30px; padding:5px 6px; border-radius:5px; color:var(--rv-text-secondary); font-size:11px; cursor:pointer; }
.report-multiselect-all { border-bottom:1px solid var(--rv-border); border-radius:0; font-weight:600; }
.report-multiselect-all:hover,.report-multiselect-option:hover { background:var(--rv-surface-muted); }
.report-multiselect-all input,.report-multiselect-option input { width:14px!important; height:14px!important; min-height:14px!important; margin:0; }
.report-multiselect-list { max-height:224px; overflow:auto; overscroll-behavior:contain; }
.report-multiselect-empty,.report-multiselect-more { margin:6px; color:var(--rv-text-muted); font-size:10px; }
.report-column-filter-trigger { flex:0 0 24px; width:24px; height:24px; display:grid; place-items:center; padding:0; border:1px solid transparent; border-radius:5px; background:transparent; color:var(--rv-text-muted); cursor:pointer; transition:background-color .15s ease,border-color .15s ease,color .15s ease; }
.report-column-filter-trigger:hover { border-color:var(--rv-border); background:var(--rv-surface); color:var(--rv-primary-hover); }
.report-column-filter-trigger[aria-expanded="true"] { border-color:var(--rv-primary); background:var(--rv-primary-soft); color:var(--rv-primary); }
.has-column-filter .report-column-filter-trigger { border-color:var(--rv-primary); background:var(--rv-primary); color:var(--rv-surface); }
.has-column-filter .report-column-filter-trigger:hover { background:var(--rv-primary-hover); color:var(--rv-surface); }
.report-column-filter-trigger:focus-visible { outline:2px solid var(--rv-primary-soft); outline-offset:1px; }
.report-column-filter-trigger svg { width:14px; height:14px; fill:currentColor; pointer-events:none; }
.report-column-filter-popup { position:fixed; z-index:calc(var(--rv-z-popover) + 10); display:none; padding:8px; border:1px solid var(--rv-border); border-radius:8px; background:var(--rv-surface); box-shadow:var(--rv-shadow-md); }
.report-column-filter-popup.is-open { display:block; }
.report-column-filter-search { width:100%; height:30px; margin-bottom:6px; padding:5px 7px; border:1px solid var(--rv-border); border-radius:5px; font-size:11px; }
.report-column-filter-search:focus { border-color:var(--rv-primary); outline:2px solid var(--rv-primary-soft); outline-offset:0; }
.report-column-filter-all,.report-column-filter-option { display:flex; align-items:center; gap:7px; min-height:29px; padding:5px 6px; color:var(--rv-text-secondary); font-size:11px; cursor:pointer; }
.report-column-filter-all { border-bottom:1px solid var(--rv-border); font-weight:600; }
.report-column-filter-all:hover,.report-column-filter-option:hover { background:var(--rv-surface-muted); }
.report-column-filter-all input,.report-column-filter-option input { width:14px; height:14px; margin:0; }
.report-column-filter-list { max-height:min(260px,40vh); overflow-x:hidden; overflow-y:auto; overscroll-behavior:contain; touch-action:pan-y; scrollbar-gutter:stable; }
.report-column-filter-option[hidden] { display:none; }
.report-column-filter-empty { padding:12px 6px; color:var(--rv-text-muted); font-size:10px; text-align:center; }
.report-column-filter-actions { display:flex; justify-content:space-between; gap:8px; padding-top:7px; border-top:1px solid var(--rv-border); }
.report-column-filter-actions button { min-height:28px; padding:4px 9px; border:1px solid var(--rv-border); border-radius:5px; background:var(--rv-surface); color:var(--rv-text-secondary); font-size:11px; cursor:pointer; }
.report-column-filter-actions button[data-action="apply"] { border-color:var(--rv-primary); background:var(--rv-primary); color:#fff; }
.filter-range { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:var(--rv-space-2); }
.filter-grid--checks { grid-template-columns:repeat(5,minmax(0,1fr)); gap:6px 10px; }
.filter-grid--checks label,.filter-check { display:flex; align-items:center; gap:6px; min-height:24px; color:var(--rv-text-secondary); font-size:11px; line-height:1.2; }
.filter-grid--checks input,.filter-check input { width:14px; height:14px; min-height:14px; margin:0; }
.advanced-filters { margin:0 -12px; border-top:1px solid var(--rv-border); }
.advanced-filters > summary { min-height:34px; display:flex; align-items:center; gap:5px; padding:7px 12px; color:var(--rv-primary-hover); font-size:11px; font-weight:600; cursor:pointer; list-style:none; }
.advanced-filters > summary::-webkit-details-marker { display:none; }
.advanced-filters > summary span { transition:transform .15s ease; }
.advanced-filters[open] > summary span { transform:rotate(180deg); }
.advanced-filters-body { padding:0 12px; border-top:1px solid var(--rv-border); background:var(--rv-surface-muted); }
.advanced-filters-body--cards { display:grid; gap:var(--rv-space-3); padding:var(--rv-space-3); }
.data-table-scroll { max-height:calc(100vh - 250px); min-height:160px; overflow:auto; }
.data-table { width:100%; border-collapse:separate; border-spacing:0; font-size:11px; }
.data-table thead th { position:sticky; top:0; z-index:2; height:34px; padding:6px 8px; border-bottom:1px solid var(--rv-border); background:var(--rv-bg); color:var(--rv-text-secondary); font-size:10px; line-height:1.15; font-weight:600; white-space:nowrap; }
.data-table tbody td { height:36px; padding:6px 8px; border-bottom:1px solid var(--rv-border); color:var(--rv-text-secondary); font-size:11px; line-height:1.2; white-space:nowrap; }
.data-table tbody tr:hover td { background:var(--rv-surface-muted); }
.data-table .aa-drill-row > td { font-weight:600; cursor:pointer; transition:background-color .15s ease,color .15s ease; }
.data-table .aa-drill-row:hover > td { background:var(--rv-primary-soft); }
.data-table .aa-drill-row.is-expanded > td { background:var(--rv-primary-soft); color:var(--rv-text); }
.data-table .aa-drill-row.is-expanded > td:first-child { box-shadow:inset 3px 0 0 var(--rv-primary); }
.report-drilldown-row > td { height:auto!important; padding:8px 0 10px!important; border-bottom:1px solid var(--rv-border); background:var(--rv-surface-muted)!important; white-space:normal!important; }
.report-drilldown-panel { min-width:0; margin-right:12px; padding:8px 10px 10px; border:1px solid var(--rv-border); border-radius:7px; background:var(--rv-bg); }
.report-drilldown-level-1 { margin-left:12px; }
.report-drilldown-level-2 { margin-left:28px; }
.report-drilldown-level-3 { margin-left:44px; }
.report-drilldown-header { min-height:28px; display:flex; align-items:center; justify-content:space-between; gap:12px; padding:0 2px 6px; }
.report-drilldown-header strong { color:var(--rv-text); font-size:11px; font-weight:650; }
.report-drilldown-header span { color:var(--rv-text-muted); font-size:10px; }
.report-drilldown-scroll { max-width:100%; overflow-x:auto; overscroll-behavior-x:contain; border:1px solid var(--rv-border); border-radius:6px; background:var(--rv-surface); }
.report-drilldown-table { width:100%; min-width:820px; border-collapse:separate; border-spacing:0; table-layout:auto; font-size:10px; }
.report-drilldown-table th { height:30px; padding:5px 8px; border-bottom:1px solid var(--rv-border); background:var(--rv-surface-muted); color:var(--rv-text-secondary); font-size:9px; font-weight:650; line-height:1.1; text-align:left; white-space:nowrap; }
.report-drilldown-table td { height:34px!important; max-width:260px; padding:5px 8px!important; border-bottom:1px solid var(--rv-border); background:var(--rv-surface)!important; color:var(--rv-text-secondary); font-size:10px!important; font-weight:400!important; line-height:1.15; white-space:nowrap!important; }
.report-drilldown-table tbody tr:nth-child(even) > td { background:var(--rv-surface)!important; }
.report-drilldown-table tbody tr:hover > td { background:var(--rv-primary-soft)!important; }
.report-drilldown-cell--number,.report-drilldown-cell--money,.report-drilldown-cell--percent { text-align:right!important; font-variant-numeric:tabular-nums; }
.report-drilldown-cell--toggle { width:34px; text-align:center!important; }
.report-drilldown-ellipsis { display:block; max-width:250px; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.report-drilldown-total td { border-top:1px solid var(--rv-border-strong)!important; border-bottom:0!important; background:var(--rv-surface-muted)!important; color:var(--rv-text)!important; font-weight:650!important; }
.report-drilldown-share { min-width:128px; display:flex; align-items:center; justify-content:flex-end; gap:7px; }
.report-drilldown-share > span { width:72px; height:6px; overflow:hidden; border-radius:999px; background:var(--rv-primary-soft); }
.report-drilldown-share > span > i { display:block; height:100%; border-radius:inherit; background:var(--rv-primary); }
.report-drilldown-share > b { min-width:46px; color:var(--rv-text-secondary); font-size:9px; font-weight:600; text-align:right; }
.report-drilldown-skeleton { display:grid; gap:7px; padding:7px 2px; }
.report-drilldown-skeleton i { height:12px; border-radius:4px; background:linear-gradient(90deg,var(--rv-surface-muted),var(--rv-border),var(--rv-surface-muted)); background-size:200% 100%; animation:report-drill-pulse 1.2s ease-in-out infinite; }
.report-drilldown-skeleton i:nth-child(2) { width:88%; }
.report-drilldown-skeleton i:nth-child(3) { width:72%; }
.report-drilldown-error,.report-drilldown-empty { padding:9px 4px; color:var(--rv-text-muted); font-size:10px; }
.report-drilldown-error { color:var(--rv-danger); }
@keyframes report-drill-pulse { from { background-position:100% 0; } to { background-position:-100% 0; } }
.results-count { color:var(--rv-text-muted); font-size:11px; }
.report-pagination { min-height:42px; display:flex; align-items:center; justify-content:flex-end; flex-wrap:wrap; gap:6px; padding:5px 10px; }
.pagination-button { min-height:30px; height:30px; padding:4px 9px; border:1px solid var(--rv-border); border-radius:6px; background:var(--rv-surface); color:var(--rv-text-secondary); font-size:11px; }
.pagination-button:disabled { opacity:.45; cursor:not-allowed; }
.pagination-current { min-width:44px; color:var(--rv-text-muted); font-size:11px; text-align:center; }
@media(min-width:1440px){.filter-grid--basic{grid-template-columns:repeat(6,minmax(0,1fr))}}
@media(max-width:1439px){.report-kpi-grid{grid-template-columns:repeat(3,minmax(0,1fr))}.filter-grid{grid-template-columns:repeat(4,minmax(0,1fr))}}
@media(max-width:1099px){.report-kpi-grid,.filter-grid,.filter-grid--checks{grid-template-columns:repeat(2,minmax(0,1fr))}.report-header{flex-direction:column}.report-header-meta,.report-header-controls{width:100%;justify-content:flex-start}}
@media(max-width:699px){.report-card-header,.results-toolbar{align-items:flex-start;flex-direction:column}.report-header-meta,.report-header-controls,.report-toolbar,.report-card-actions{width:100%;justify-content:flex-start}.report-kpi-grid,.filter-grid,.filter-grid--checks{grid-template-columns:1fr}.filter-range{grid-template-columns:1fr}.filter-grid--revenue-audit .filter-range{grid-template-columns:repeat(2,minmax(0,1fr))}.report-pagination{justify-content:center}}
@media(max-width:699px){.report-drilldown-panel{margin-right:6px}.report-drilldown-level-1{margin-left:6px}.report-drilldown-level-2{margin-left:18px}.report-drilldown-level-3{margin-left:30px}}
@media(max-width:699px){.report-multiselect-panel{top:15vh;left:16px;right:16px;width:auto;max-height:70vh}.report-multiselect-list{max-height:50vh}}
@media(prefers-reduced-motion:reduce){.report-page *{scroll-behavior:auto!important;transition:none!important;animation:none!important}}
