/* rx-reports.css - Reports and Analytics. Same dark glass; orange is the one data colour (single-series charts only). */
.rp-msg { margin: 6px 0; font-size: 13.5px; color: var(--ink2); }
.rp-date { flex: 0 1 150px; width: auto; }

/* number tiles */
.rp-tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 10px; margin-bottom: 12px; }
/* tiles drawn by rxChart.kpi (the shared themed tile) sit in the same grid */
.rp-kpi { display: grid; min-width: 0; }
.rp-kpi > .rxch-kpi { height: 100%; width: 100%; text-align: left; font: inherit; color: inherit; }
.rp-kpi--wide { grid-column: span 2; }
.rp-tile { display: flex; flex-direction: column; gap: 4px; min-width: 0; padding: 14px 16px; border-radius: 18px; border: 1px solid var(--line); background: var(--card); }
.rp-tile__l { font-size: 12.5px; color: var(--ink2); }
.rp-tile__v { font-size: 24px; font-weight: 300; letter-spacing: -.02em; line-height: 1.15; overflow-wrap: anywhere; }
.rp-tile__s { font-size: 12px; color: var(--ink2); }
.rp-tile--warn { border-color: var(--bad); }
.rp-tile--warn .rp-tile__s { color: var(--bad); font-weight: 500; }

/* cards */
.rp-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 12px; margin-bottom: 12px; align-items: start; }
.rp-grid--main { grid-template-columns: minmax(0, 2fr) minmax(260px, 1fr); }
.rp-card { min-width: 0; padding: 16px; border-radius: 22px; border: 1px solid var(--line); background: var(--card); margin-bottom: 12px; }
.rp-grid > .rp-card { margin-bottom: 0; }
.rp-card h3 { margin: 0 0 10px; font-size: 15px; font-weight: 500; }

/* daily line chart */
.rp-chart { position: relative; }
.rp-chart svg { display: block; width: 100%; height: auto; overflow: visible; }
.rp-gridline { stroke: var(--line); stroke-width: 1; }
.rp-axis { stroke: var(--line-hover); stroke-width: 1; }
.rp-tick { fill: var(--ink2); font-size: 11px; font-family: var(--font); }
.rp-line { fill: none; stroke: var(--ac); stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; }
.rp-area { fill: var(--ac); opacity: .14; }
.rp-dot { fill: var(--ac); stroke: var(--solid); stroke-width: 2; }
.rp-dot--on { stroke: #fff; }
.rp-cross { stroke: var(--line-hover); stroke-width: 1; stroke-dasharray: 3 3; }
.rp-tip { position: absolute; top: 0; transform: translateX(-50%); display: flex; flex-direction: column; gap: 2px; padding: 8px 10px; border-radius: 12px;
  background: var(--solid); box-shadow: var(--pop-shadow); font-size: 12.5px; white-space: nowrap; pointer-events: none; z-index: 3; }
.rp-tip b { font-weight: 500; }

/* horizontal bars */
.rp-bars { display: flex; flex-direction: column; gap: 8px; }
.rp-bar { display: grid; grid-template-columns: minmax(80px, 38%) minmax(0, 1fr) auto; align-items: center; gap: 10px; font-size: 13px; }
.rp-bar__l { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rp-bar__t { height: 10px; border-radius: 4px; background: var(--tint); overflow: hidden; }
.rp-bar__t i { display: block; height: 100%; border-radius: 4px; background: var(--ac); }
.rp-bar__v { font-variant-numeric: tabular-nums; color: var(--ink); }

/* tables */
.rp-tablewrap { overflow-x: auto; }
.rp-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.rp-table th { text-align: left; font-weight: 500; font-size: 12px; color: var(--ink2); padding: 6px 8px; border-bottom: 1px solid var(--line); }
.rp-table td { padding: 7px 8px; border-bottom: 1px solid var(--line); }
.rp-table .num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.rp-table tr:last-child td { border-bottom: 0; }

/* waiting for you */
.rp-wait { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.rp-wait li { position: relative; display: flex; align-items: center; justify-content: space-between; gap: 10px; min-height: 44px; padding: 0 2px; border-bottom: 1px solid var(--line); font-size: 13.5px; }
.rp-wait li:last-child { border-bottom: 0; }
.rp-wait a { flex: 1; padding: 10px 0; color: var(--ink); text-decoration: none; }
.rp-wait a::after { content: ""; position: absolute; inset: 0; }   /* the whole row is the tap area */
.rp-wait a:focus-visible { outline: none; }
.rp-wait li:focus-within { outline: 2px solid var(--ac-text); outline-offset: -2px; border-radius: 8px; }
.rp-wait a:hover { text-decoration: underline; text-decoration-color: var(--ac-text); }
.rp-wait b { min-width: 28px; padding: 2px 8px; border-radius: 999px; text-align: center; font-weight: 500; font-size: 12.5px; background: var(--tint-2); }
.rp-wait li.is-on b { background: var(--ac); color: #fff; }

/* the target meter in "At a glance" */
.rp-meter { display: block; height: 6px; margin-top: 6px; border-radius: 4px; background: var(--tint-2); overflow: hidden; }
.rp-meter i { display: block; height: 100%; border-radius: 4px; background: var(--ac); }
.rp-meter.is-short i { background: repeating-linear-gradient(135deg, var(--ac) 0 6px, rgba(255,255,255,.35) 6px 9px); }

/* Dashboard blocks, and the Customise pop-up */
.rp-grid--dash { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.rp-grid--dash > .rp-card--wide { grid-column: 1 / -1; }
.rp-grow { flex: 1; }
.rp-cust { position: fixed; inset: 0; z-index: 80; display: flex; align-items: flex-start; justify-content: center; padding: 10vh 16px 16px; background: var(--scrim); }
.rp-cust__card { width: min(460px, 100%); max-height: calc(100vh - 10vh - 16px); overflow-y: auto; overscroll-behavior: contain; padding: 20px; border-radius: 24px; background: var(--solid); box-shadow: var(--pop-shadow); }
.rp-cust__card h3 { margin: 0 0 6px; font-size: 18px; font-weight: 400; }
.rp-cust__note { margin: 0 0 12px; font-size: 13px; color: var(--ink2); }
.rp-cust__list { list-style: none; margin: 0; padding: 0; }
.rp-cust__list li { display: flex; align-items: center; gap: 6px; min-height: 44px; border-bottom: 1px solid var(--line); font-size: 14px; }
.rp-cust__list label { flex: 1; display: flex; align-items: center; gap: 8px; cursor: pointer; }
.rp-cust__list input { width: 18px; height: 18px; accent-color: var(--ac); }
.rp-cust__mv { width: 36px; height: 36px; border: 1px solid var(--ctl-line); border-radius: 50%; background: var(--ctl); color: var(--ink); font-size: 15px; cursor: pointer; }
.rp-cust__mv:disabled { opacity: .35; cursor: default; }
.rp-cust__acts { display: flex; gap: 8px; margin-top: 16px; }
/* Business scorecard (186) */
.rp-score { margin-bottom: 12px; }
.rp-score__s { font-size: 12px; color: var(--ink2, rgba(255,255,255,.7)); }
.rp-score .rxch-kpis { margin-top: 8px; }
/* Customise > for a role (Admins, 170) */
.rp-cust__role { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--line, rgba(255,255,255,.14)); }
.rp-cust__role .rp-cust__note { flex-basis: 100%; margin: 0; }

@media (orientation: portrait), (max-width: 760px) {
  .rp-grid--dash { grid-template-columns: minmax(0, 1fr); }
  .rp-grid--main { grid-template-columns: minmax(0, 1fr); }
  .rp-tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .rp-tile__v { font-size: 20px; }
  .rp-grid { grid-template-columns: minmax(0, 1fr); }
  #rpTools .ux-tools__pick, #rpTools .rp-date { flex: 1 1 140px; }
  #rpTools .ux-tools__add { margin-left: 0; }
}
/* a new company's getting-started card on the Dashboard */
.rp-start { border-color: rgba(var(--ac-rgb), .45); }
.rp-start__lead { margin: 4px 0 8px; font-size: 13.5px; color: var(--ink2); }
.rp-start__lead a, .rp-start__go { color: var(--ac-text); font-weight: 600; text-decoration: none; }
.rp-start__lead a:hover, .rp-start__go:hover { text-decoration: underline; }
.rp-start__list { margin: 0 0 8px; padding-left: 20px; font-size: 14px; line-height: 1.6; }

/* a tile that opens the list behind it */
.rp-tile--go { color: inherit; text-decoration: none; transition: border-color .15s ease, transform .15s ease; }
.rp-tile--go:hover, .rp-tile--go:focus-visible { border-color: var(--ac); outline: none; }
.rp-tile--go:active { transform: scale(.985); }
.rp-tile--go .rp-tile__l::after { content: " ›"; color: var(--ac-text); }
@media (prefers-reduced-motion: reduce) { .rp-tile--go { transition: none; } .rp-tile--go:active { transform: none; } }
/* the Dashboard's find-anything box */
.rp-find { flex: 1 1 260px; min-width: 0; }
@media (max-width: 640px) { .rp-find { flex-basis: 100%; } }
/* Today: what needs this person now */
.rp-today__g.is-act { border-color: rgba(var(--ac-rgb), .55); }
.rp-today__g.is-act .rp-tile__v { color: var(--ac-text); }
.rp-today__list { margin: 4px 0 0; padding: 0; list-style: none; display: grid; gap: 3px; font-size: 12.5px; }
.rp-today__list a { color: var(--ink); text-decoration: underline; text-decoration-color: var(--ac-text); text-underline-offset: 3px; display: inline-block; min-height: 24px; line-height: 24px; }
.rp-today__more { color: var(--ink2); }
/* My reports: scheduled reports */
.rp-my { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 12px; padding: 10px 0; border-top: 1px solid var(--line); }
.rp-my:first-of-type { border-top: 0; }
.rp-my.is-due .rp-my__t b { color: var(--ac-text); }
.rp-my__t { min-width: 0; flex: 1 1 260px; display: flex; flex-direction: column; gap: 2px; }
.rp-my__t b { font-weight: 500; }
.rp-my__t small { font-size: 12.5px; color: var(--ink2); }
.rp-my__a { display: flex; flex-wrap: wrap; gap: 6px; }
.rp-myform__g { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 10px; margin: 8px 0 12px; }
.rp-myform__f { display: flex; flex-direction: column; gap: 4px; font-size: 12.5px; color: var(--ink2); min-width: 0; }
.rp-myform__f .ux-in { width: 100%; min-width: 0; }
.rp-myform__f[hidden] { display: none; }
/* placeholders that hold a block's place while its data arrives, at the same height as the real tiles */
.rp-today .rp-tile, .rp-ph { min-height: 128px; }
.rp-ph { gap: 10px; }
.rp-ph span { display: block; border-radius: 6px; background: var(--tint-2); }
.rp-ph__l { width: 45%; height: 12px; }
.rp-ph__v { width: 30%; height: 24px; }
.rp-ph__s { width: 70%; height: 12px; }
@media (prefers-reduced-motion: no-preference) { .rp-ph span { animation: rp-pulse 1.2s ease-in-out infinite alternate; } }
@keyframes rp-pulse { from { opacity: .45; } to { opacity: .9; } }
@media (max-width: 640px) { .rp-today--wait .rp-ph:nth-child(n+3) { display: none; } }

/* Explore: the pivot table scrolls sideways on its own when it has many columns */
.rp-xwrap { overflow-x: auto; }
#rpTools .rp-xpick { flex: 0 1 190px; }
.rp-x tbody th, .rp-x tfoot th { font-weight: 500; color: var(--ink); font-size: 13px; white-space: nowrap; }
.rp-x tfoot td, .rp-x tfoot th { font-weight: 600; border-top: 1px solid var(--line); }
.rp-x .rp-x__t { font-weight: 600; }
@media (max-width: 700px) { #rpTools .rp-xpick { flex: 1 1 140px; } }

/* Goals (131) on the Dashboard */
.rp-goals__h { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 10px; }
.rp-goals__h h3 { margin: 0; }
.rp-cust__list li .rp-grow { flex: 1; min-width: 0; }

/* Pinned reports on the Dashboard */
.rp-pins { margin-bottom: 12px; }
.rp-pin__t { color: inherit; text-decoration: none; }
.rp-pin__t:hover, .rp-pin__t:focus-visible { color: var(--ac-text); text-decoration: underline; }
