/* The shared reporting dashboard (reporting-dashboard.js), used by vendors, ISOs and Ascend admins. */
.rd-dashboard { --chart-1: #2f4bff; }
:root[data-theme="dark"] .rd-dashboard { --chart-1: #6f83ff; }
.rd-dashboard[aria-busy=true] :is(.rd-figure, .rd-chart, .rd-customers) { opacity: .5; transition: opacity .15s ease; }
.rd-controls { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: start; gap: 12px 20px; margin-top: 8px; }
@media (max-width: 720px) { .rd-controls { grid-template-columns: 1fr; } }
.rd-switch { display: flex; flex-wrap: wrap; gap: 6px; }
.rd-switch button { min-height: 38px; padding: 0 14px; border: 1px solid var(--rule); border-radius: 999px; background: var(--panel); color: var(--text); font: inherit; font-size: 14px; font-weight: 550; cursor: pointer; }
.rd-switch button:hover { background: var(--tint); }
.rd-switch button[aria-pressed=true] { border-color: var(--text); background: var(--text); color: var(--canvas); }
.rd-filters { display: flex; align-items: center; gap: 8px; }
.rd-filters select { min-height: 38px; padding: 0 30px 0 12px; border: 1px solid var(--rule); border-radius: 8px; background-color: var(--panel); color: var(--text); font: inherit; font-size: 14px; }
.rd-figure { margin: 28px 0 8px; }
.rd-hero { margin: 0; color: var(--text); font-size: clamp(40px, 6vw, 56px); font-weight: 650; letter-spacing: -.04em; line-height: 1.05; }
.rd-caption { margin: 6px 0 0; color: var(--quiet); font-size: 14px; }
.rd-chart { position: relative; min-height: 280px; margin-top: 8px; border-radius: 8px; }
.rd-chart:focus-visible { outline: 2px solid var(--focus); outline-offset: 4px; }
.rd-chart svg { display: block; width: 100%; height: auto; overflow: visible; }
.rd-grid { stroke: var(--rule); stroke-width: 1; }
.rd-tick { fill: var(--quiet); font-size: 12px; font-variant-numeric: tabular-nums; }
.rd-line { fill: none; stroke: var(--chart-1); stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; }
.rd-area { fill: var(--chart-1); opacity: .1; }
.rd-bar { fill: var(--chart-1); }
.rd-bar.is-active { opacity: .78; }
.rd-dot { fill: var(--chart-1); stroke: var(--canvas); stroke-width: 2; }
.rd-cross { stroke: var(--edge); stroke-width: 1; }
.rd-tip:not([hidden]) { position: absolute; z-index: 2; display: grid; gap: 1px; padding: 8px 10px; border: 1px solid var(--rule); border-radius: 8px; background: var(--panel); box-shadow: 0 6px 20px rgb(21 23 36 / .12); transform: translate(-50%, calc(-100% - 12px)); pointer-events: none; white-space: nowrap; }
.rd-tip strong { color: var(--text); font-size: 15px; }
.rd-tip span { color: var(--quiet); font-size: 12px; }
.rd-empty { display: grid; place-content: center; justify-items: center; gap: 6px; min-height: 280px; border: 1px dashed var(--rule); border-radius: 12px; color: var(--quiet); }
.rd-empty strong { color: var(--text); font-size: 16px; }
.rd-customers { margin-top: 36px; }
.rd-customers h2 { margin: 0 0 10px; font-size: 18px; letter-spacing: -.01em; }
.rd-table-wrap { overflow-x: auto; }
.rd-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.rd-table :is(th, td) { padding: 12px 12px 12px 0; border-bottom: 1px solid var(--rule); text-align: start; white-space: nowrap; }
.rd-table thead th { color: var(--quiet); font-size: 12px; font-weight: 600; }
.rd-table tbody th { font-weight: 600; white-space: normal; }
.rd-table .rd-number { text-align: end; padding-inline: 12px 0; font-variant-numeric: tabular-nums; }
.rd-table thead th[aria-sort] { color: var(--text); }
.rd-table td[data-ranked] { color: var(--text); font-weight: 650; }
.rd-table td:not([data-ranked]) { color: var(--quiet); }
.rd-none { margin: 0; color: var(--quiet); font-size: 14px; }
.rd-customers .text-button { min-height: 44px; }
@media (prefers-reduced-motion: reduce) { .rd-dashboard[aria-busy=true] * { transition: none; } }

.rd-chart svg [hidden] { display: none; }

/* Reporting: heading actions and the Add metric menu */
.rd-heading-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 18px; }
.rd-added { display: inline-flex; align-items: stretch; border: 1px solid var(--rule); border-radius: 999px; background: var(--panel); }
.rd-added:has([aria-pressed=true]) { border-color: var(--text); background: var(--text); }
.rd-switch .rd-added button[data-rd-metric] { border: 0; border-radius: 999px 0 0 999px; padding-inline-end: 6px; background: transparent; }
.rd-switch .rd-added button[data-rd-metric][aria-pressed=true] { color: var(--canvas); }
.rd-switch .rd-unpin, .rd-switch .rd-unpin:hover { display: inline-grid; place-items: center; width: 30px; min-height: 36px; padding: 0 8px 0 0; border: 0; border-radius: 0 999px 999px 0; background: transparent; color: var(--quiet); cursor: pointer; }
.rd-added:has([aria-pressed=true]) .rd-unpin { color: var(--canvas); }
.rd-unpin svg { width: 14px; height: 14px; }
.rd-switch .rd-unpin:hover { color: var(--text); }
.rd-switch .rd-added:has([aria-pressed=true]) .rd-unpin { color: var(--canvas); }
.rd-switch .rd-added:has([aria-pressed=true]) .rd-unpin:hover { color: var(--canvas); opacity: .75; }
.rd-add { position: relative; }
.rd-switch .rd-add-button { display: inline-flex; align-items: center; gap: 6px; border-style: dashed; color: var(--accent-text); }
.rd-add-button svg { width: 15px; height: 15px; }
.rd-menu { position: absolute; z-index: 20; inset-block-start: calc(100% + 6px); inset-inline-start: 0; width: min(340px, calc(100vw - 32px)); max-height: 380px; overflow: auto; padding: 8px; border: 1px solid var(--rule); border-radius: 12px; background: var(--panel); box-shadow: 0 14px 34px rgb(9 14 32 / .16); }
.rd-menu[hidden] { display: none; }
.rd-menu section + section { margin-top: 6px; padding-top: 6px; border-top: 1px solid var(--rule); }
.rd-menu h3 { margin: 4px 8px 6px; color: var(--quiet); font-size: 12px; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; }
.rd-menu-list { display: flex; flex-wrap: wrap; gap: 6px; padding: 0 8px 6px; }
.rd-menu-row { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; align-items: center; gap: 6px; padding: 3px 8px; border-radius: 8px; font-size: 14px; }
.rd-menu-row:hover { background: var(--tint); }
.rd-menu-row span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rd-menu button { min-height: 32px; padding: 0 12px; border: 1px solid var(--rule); border-radius: 8px; background: var(--canvas); color: var(--text); font: inherit; font-size: 13px; font-weight: 550; cursor: pointer; }
.rd-menu button:hover:not([disabled]) { border-color: var(--chart-1); color: var(--accent-text); }
.rd-menu button[disabled] { opacity: .4; cursor: default; }

/* Shared pieces: refresh button, status, the table heading row, drill-down rows and breadcrumbs */
.rd-dashboard .ui-icon { width: 17px; height: 17px; }
.rd-dashboard .quiet-icon { display: inline-grid; place-items: center; flex: 0 0 44px; width: 44px; height: 44px; }
.rd-status { color: var(--quiet); font-size: 13px; }
.rd-status:empty { display: none; }
.rd-table-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 16px; margin-bottom: 10px; }
.rd-table-head h2 { margin: 0; }
.rd-customers .rd-table-head h2 { margin: 0; }
.rd-open { display: inline-flex; align-items: center; gap: 6px; min-height: 32px; padding: 0; border: 0; background: none; color: var(--accent-text); font: inherit; font-weight: 600; text-align: start; cursor: pointer; }
.rd-open:hover { text-decoration: underline; text-underline-offset: 3px; }
.rd-open .ui-icon { width: 14px; height: 14px; flex: none; }
.rd-table tbody th small { display: block; margin-top: 2px; color: var(--quiet); font-size: 12px; font-weight: 400; }
.rd-note { margin: 10px 0 0; color: var(--quiet); font-size: 12px; }
.rd-scope { display: inline-flex; gap: 0; border: 1px solid var(--rule); border-radius: 8px; overflow: hidden; }
.rd-scope button { min-height: 36px; padding: 0 12px; border: 0; background: var(--panel); color: var(--quiet); font: inherit; font-size: 13px; cursor: pointer; }
.rd-scope button + button { border-inline-start: 1px solid var(--rule); }
.rd-scope button[aria-pressed=true] { background: var(--selection); color: var(--accent-text); font-weight: 600; }
.rd-crumbs { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 6px; margin: 0 0 6px; padding: 0; list-style: none; color: var(--quiet); font-size: 13px; }
.rd-crumbs li + li::before { content: "/"; margin-inline-end: 6px; color: var(--edge); }
.rd-crumbs button { min-height: 28px; padding: 0; border: 0; background: none; color: var(--accent-text); font: inherit; cursor: pointer; }
.rd-crumbs button:hover { text-decoration: underline; text-underline-offset: 3px; }
.rd-crumbs [aria-current] { color: var(--text); font-weight: 600; }
/* The ISO page styles tables globally; the dashboard's table stays plain on both sides. */
.rd-table :is(th, td), .rd-table thead th { background: transparent; }
.rd-table tbody tr:hover { background: transparent; }
.rd-table thead th { color: var(--quiet); font-size: 12px; font-weight: 600; }
.rd-table tbody th { color: var(--text); font-size: 14px; font-weight: 600; }
