/* One report vocabulary, scoped to the opt-in workspace. */
:root[data-design="next"] {
  --report-indent: 24px;
  --report-toggle: 28px;
  --report-cell-y: 12px;
}
:root[data-design="next"] .report-original-grouping { display:none; }
:root[data-design="next"] .report-levels {
  display:flex; flex-wrap:wrap; align-items:center; gap:10px;
  margin:0 0 18px; min-width:0;
}
:root[data-design="next"] :is(.report-level,.deep-chip) {
  display:grid; grid-template-columns:minmax(0,1fr) auto;
  align-items:center; gap:4px 8px; flex:0 1 220px;
  min-width:160px; max-width:100%; padding:8px 10px;
  border:1px solid var(--line); border-radius:8px; background:var(--paper);
}
:root[data-design="next"] :is(.report-level-label,.deep-chip-label) {
  grid-column:1; font-size:11px; font-weight:500; color:var(--muted); line-height:1.4;
}
:root[data-design="next"] :is(.report-level,.deep-chip) > :is(select,.ws-control) { grid-column:1; grid-row:2; width:100%; min-width:0; max-width:100%; }
:root[data-design="next"] :is(.report-level,.deep-chip) > .ws-control {
  min-height:32px; height:auto; padding:5px 24px 5px 0;
  border:0; border-radius:4px; background:transparent; box-shadow:none;
  font-size:13px; font-weight:550; white-space:normal; overflow-wrap:anywhere;
}
:root[data-design="next"] :is(.report-level,.deep-chip) > .ws-control::after { right:2px; }
:root[data-design="next"] :is(.report-level,.deep-chip):focus-within { border-color:var(--emerald); }
:root[data-design="next"] .deep-chip-remove { grid-column:2; grid-row:1 / 3; margin:0; width:28px; height:28px; }
:root[data-design="next"] .deep-chip-arrow { display:none; }
:root[data-design="next"] .deep-chip-add { min-height:38px; }
:root[data-design="next"] .report-levels .report-expand-all {
  width:auto; min-width:0; min-height:38px; height:auto; padding:8px 12px;
  margin:0 0 0 auto; font-size:12px; white-space:normal; line-height:1.4;
}
:root[data-design="next"] .table-toolbar { align-items:center; gap:12px; }
:root[data-design="next"] .table-toolbar > .muted { margin-left:auto; }
:root[data-design="next"] .report-table {
  border-collapse:separate; border-spacing:0 2px; font-size:13px; font-variant-numeric:tabular-nums;
}
:root[data-design="next"] .report-table :is(th,td) { padding:var(--report-cell-y) 14px; vertical-align:top; }
:root[data-design="next"] .report-table thead th {
  background:var(--surface-soft); color:var(--muted); font-size:12px; font-weight:550;
}
:root[data-design="next"] .report-table .sort-button { gap:8px; text-align:left; white-space:normal; overflow-wrap:anywhere; }
:root[data-design="next"] .report-table :is(th,td).numeric { text-align:right; vertical-align:middle; }
:root[data-design="next"] .report-table tbody tr > :is(th,td) { background:var(--paper); }
:root[data-design="next"] :is(#report-table,.reconciliation-table).report-tree tbody tr[data-level="0"] > :is(th,td) {
  background:color-mix(in oklab,var(--cobalt) 10%,var(--surface-soft)); font-weight:600;
  border-top:1px solid var(--line); border-bottom:1px solid var(--line);
}
:root[data-design="next"] .report-table tbody tr[data-level="1"] > :is(th,td):first-child { padding-left:38px; }
:root[data-design="next"] .report-table tbody tr[data-level="2"] > :is(th,td):first-child { padding-left:62px; }
:root[data-design="next"] :is(#report-table,.reconciliation-table) tbody tr[data-level] > :is(th,td):first-child {
  white-space:normal; max-width:none; min-width:0; border-right:0;
}
:root[data-design="next"] .report-label { display:flex; align-items:flex-start; gap:10px; min-width:0; }
:root[data-design="next"] .report-label-body { min-width:0; flex:1; }
:root[data-design="next"] :is(.report-name,.report-label-body > .cell-label,.report-label-body > .breakdown-label) {
  display:block; max-width:none; white-space:normal; overflow:visible; overflow-wrap:anywhere;
  color:var(--ink); font-weight:550; line-height:1.5;
}
:root[data-design="next"] .report-label-body .cell-secondary { margin:4px 0 0; font-size:11px; line-height:1.45; white-space:normal; overflow-wrap:anywhere; }
:root[data-design="next"] .report-row-actions { display:flex; flex-wrap:wrap; align-items:center; gap:6px; margin-top:8px; }
:root[data-design="next"] .report-table :is(.row-toggle,.deep-disclosure.icon-button,.report-label > .icon-button) {
  display:inline-flex; align-items:center; justify-content:center; flex:0 0 var(--report-toggle);
  width:var(--report-toggle); min-width:var(--report-toggle); height:var(--report-toggle); min-height:var(--report-toggle);
  padding:5px; margin:0; border:1px solid var(--control-border); border-radius:6px;
  background:var(--paper); color:var(--muted); transform:none;
}
:root[data-design="next"] .report-table .row-chevron { width:16px; height:16px; flex-shrink:0; }
:root[data-design="next"] .report-table :is(.row-toggle,.icon-button)[aria-expanded="true"] { transform:none; background:var(--mint); color:var(--emerald-dark); }
:root[data-design="next"] .report-table [aria-expanded="true"] > .row-chevron { transform:rotate(90deg); }
:root[data-design="next"] .report-row-actions .rec-click-button {
  display:inline-flex; align-items:center; gap:4px; width:auto; height:28px; min-height:28px;
  padding:4px 8px; margin:0; font-size:11px;
}
:root[data-design="next"] .report-row-actions .rec-download-button { margin:0; width:28px; height:28px; min-height:28px; }
:root[data-design="next"] .report-table tbody tr:hover > :is(th,td) { background:var(--hover); }
:root[data-design="next"] :is(#report-table,.reconciliation-table).report-tree tbody tr[data-level="0"]:hover > :is(th,td) { background:color-mix(in oklab,var(--cobalt) 14%,var(--surface-soft)); }
:root[data-design="next"] .report-table tfoot :is(th,td) { background:var(--mint); color:var(--ink); font-weight:650; }
:root[data-design="next"] .report-table .rec-click-detail > td { padding:12px 14px 18px 38px; background:var(--surface-soft); }
:root[data-design="next"] .report-table .rec-click-table { border-spacing:0; }
:root[data-design="next"] .report-table .rec-click-table :is(th,td) { padding:10px 12px; }
@media(max-width:700px) {
  :root[data-design="next"] :is(.report-level,.deep-chip) { flex:1 1 150px; min-width:0; }
  :root[data-design="next"] .report-levels .report-expand-all { margin-left:0; }
  :root[data-design="next"] .report-levels { gap:8px; }
}
@media(pointer:coarse) {
  :root[data-design="next"] { --report-toggle:36px; }
  :root[data-design="next"] :is(.report-level,.deep-chip) > .ws-control { min-height:36px; }
}

:root[data-design="next"] .report-table tbody th { color:var(--ink); }
:root[data-design="next"] #deep-table .deep-label { max-width:none; }
:root[data-design="next"] #deep-table .deep-level-0 > th { border-left:0; }
:root[data-design="next"] .report-label:not(:has(> [aria-expanded]))::before {
  content:''; flex:0 0 var(--report-toggle); width:var(--report-toggle);
}
/* Resolve the older icon-only and compact-note rules at their owning controls. */
:root[data-design="next"] .report-levels .report-expand-all { flex:0 0 auto; white-space:nowrap; }
:root[data-design="next"] .report-table .sort-button { white-space:nowrap; overflow-wrap:normal; }
:root[data-design="next"] :is(#report-table,.reconciliation-table) > thead th:first-child { min-width:340px; }
:root[data-design="next"] :is(#report-table,.reconciliation-table) > tbody tr[data-level] > :is(th,td):first-child { min-width:340px; }
:root[data-design="next"] :is(#report-table,#deep-table,.reconciliation-table) :is(.report-label,.deep-label) [aria-expanded] { transform:none; }
:root[data-design="next"] :is(#report-table,.reconciliation-table) .report-label > :is(.row-toggle,.icon-button) { margin:0; }
:root[data-design="next"] .reconciliation-table th[scope="row"] .report-row-actions .rec-click-button {
  flex:0 0 auto; width:auto; min-width:0; margin:0; padding:4px 8px; transform:none;
}
:root[data-design="next"] .report-table .rec-file-note,
:root[data-design="next"] .report-table .rec-file-note:is(:hover,:focus) {
  display:block; width:auto; height:auto; margin:4px 0 0; padding:0;
  background:transparent; border-radius:0; color:var(--muted); font-size:11px; line-height:1.45;
}
:root[data-design="next"] .report-table tbody :is(th,td) { font-size:13px; }
:root[data-design="next"] :is(#report-table,.reconciliation-table) tbody tr[data-level] > :is(th,td) { background:var(--paper); }
:root[data-design="next"] :is(#report-table,.reconciliation-table).report-tree tbody tr[data-level="0"] > :is(th,td) { background:color-mix(in oklab,var(--cobalt) 10%,var(--surface-soft)); }
:root[data-design="next"] :is(#report-table,.reconciliation-table) tbody tr[data-level]:hover > :is(th,td) { background:var(--hover); }
:root[data-design="next"] :is(#report-table,.reconciliation-table).report-tree tbody tr[data-level="0"]:hover > :is(th,td) { background:color-mix(in oklab,var(--cobalt) 14%,var(--surface-soft)); }
:root[data-design="next"] .ws-settings-row:not(:has(.deep-quality-filters,.deep-decision-settings)) { display:none; }
:root[data-design="next"] .report-level { grid-template-columns:minmax(0,1fr); }
:root[data-design="next"] :is(.report-level,.deep-chip) > .ws-control { padding-right:0; gap:8px; }
:root[data-design="next"] :is(#report-table,.reconciliation-table) tbody tr:is([data-level="1"],[data-level="2"]) > :first-child,
:root[data-design="next"] :is(#report-table,.reconciliation-table):not(.report-tree) tbody tr[data-level] > :first-child { background:var(--paper); }
:root[data-design="next"] :is(#report-table,.reconciliation-table) tbody tr:is([data-level="1"],[data-level="2"]):hover > :first-child,
:root[data-design="next"] :is(#report-table,.reconciliation-table):not(.report-tree) tbody tr[data-level]:hover > :first-child { background:var(--hover); }

/* Filter actions belong to their own row; grouping actions remain inside the panel. */
:root[data-design="next"] .filter-category.merge-category { padding:14px; }
:root[data-design="next"] .merge-category .grouping-disclosure .buyer-grouping {
  margin:0; padding:0; align-items:center; gap:12px 18px;
}
:root[data-design="next"] .merge-category .buyer-grouping label { min-width:0; line-height:1.5; }
:root[data-design="next"] .merge-category #edit-buyer-groups { flex:0 0 auto; max-width:100%; margin-left:auto; align-self:center; }
:root[data-design="next"] #filters > .filter-actions {
  display:flex; justify-content:flex-end; grid-column:1 / -1;
  width:100%; padding-top:12px; border-top:1px solid var(--line); order:1;
}
:root[data-design="next"] .filter-actions #reset-filters {
  margin:0; min-height:38px; padding:8px 12px; border:1px solid var(--control-border);
  border-radius:8px; background:var(--paper); color:var(--ink);
}
@media(max-width:700px) {
  :root[data-design="next"] .merge-category #edit-buyer-groups { margin-left:0; }
}
