.report-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  margin: 10px 0 32px;
}
.report-heading h1 {
  font-size: clamp(28px, 3.4vw, 46px);
  letter-spacing: -1.6px;
  margin: 8px 0;
}
.report-heading p {
  max-width: 640px;
  line-height: 1.7;
}
.report-spark {
  font-size: 33px;
  color: var(--apricot-700);
  margin-inline-start: 14px;
}
.report-actions {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
}
.report-control-panel {
  border: 1px solid var(--border);
  background: var(--white);
  border-radius: 22px;
  box-shadow: 0 10px 35px var(--shadow-soft);
  overflow: hidden;
}
.report-control-top {
  display: flex;
  gap: 18px;
  flex-wrap: wrap;
  padding: 26px;
  background: var(--surface);
}
.report-control-top label,
.report-platform-body label,
.target-fields label,
.target-currency-row label,
.custom-metric-fields label,
.report-delivery-policy {
  display: grid;
  gap: 7px;
  font-size: 12px;
  color: var(--text-secondary-strong);
}
.report-control-top input,
.report-control-top select,
.report-platform-body input,
.report-platform-body select,
.target-fields input,
.target-fields select,
.target-currency-row input,
.custom-metric-fields input,
.custom-metric-fields select,
.report-delivery-policy select {
  min-height: 40px;
  background: var(--white);
  border: 1px solid var(--border-strong);
  border-radius: 9px;
  padding: 9px 12px;
  min-width: 0;
  width: 100%;
  font: inherit;
  color: var(--text-strong);
}
.report-name {
  flex: 1;
  min-width: 160px;
}
.report-date-fields {
  display: flex;
  gap: 12px;
}
.report-date-fields[hidden] {
  display: none;
}
.report-date-fields input[type='number'] {
  width: 70px;
}
.report-section-label {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 23px 25px 16px;
}
/* A section heading (F-43) that keeps the look of the label it replaced. */
h2.report-section-label {
  font: inherit;
  letter-spacing: inherit;
  margin: 0;
}
.report-section-label > span {
  border: 1px solid var(--border);
  border-radius: 50%;
  width: 27px;
  height: 27px;
  display: grid;
  place-items: center;
  font-size: 11px;
}
.report-section-label strong {
  color: var(--text);
}
.report-section-label small {
  margin-inline-start: 5px;
  font-size: 12px;
}
.report-platforms {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 12px;
  padding: 0 24px 24px;
  align-items: start;
}
.report-platform {
  border: 1px solid var(--border);
  border-radius: 13px;
  background: var(--white);
}
.report-platform summary {
  display: flex;
  gap: 10px;
  align-items: center;
  padding: 15px;
  cursor: pointer;
  list-style: none;
}
.report-platform summary:after {
  content: '⌄';
  margin-inline-start: auto;
  color: var(--text-secondary);
}
.report-platform-dot {
  display: grid;
  place-items: center;
  background: var(--surface-selected);
  color: var(--text-accent);
  width: 30px;
  height: 30px;
  border-radius: 10px;
  font-size: 16px;
}
.platform-meta {
  background: var(--platform-meta-bg);
}
.platform-google {
  background: var(--platform-google-bg);
}
.platform-tiktok {
  background: var(--platform-tiktok-bg);
  color: var(--platform-tiktok);
}
.platform-snapchat {
  background: var(--platform-snapchat-bg);
}
.platform-linkedin {
  background: var(--platform-linkedin-bg);
  color: var(--platform-linkedin);
}
.platform-microsoft {
  background: var(--platform-microsoft-bg);
}
.report-platform-body {
  padding: 2px 16px 17px;
  border-top: 1px solid var(--border);
}
.report-platform-body .report-account {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 0;
  border-bottom: 1px solid var(--border);
}
.report-account input,
.report-platform-body .check input {
  width: 16px;
  min-height: 16px;
  accent-color: var(--link);
}
.report-platform-body .check {
  display: flex;
  gap: 8px;
  align-items: center;
  padding: 12px 0;
}
.report-account small {
  display: block;
  color: var(--muted);
  font:
    10px ui-monospace,
    monospace;
  padding-top: 4px;
}
.report-platform-body > label:last-of-type {
  margin-top: 15px;
}
.native-settings {
  font-size: 11px;
  margin-top: 14px;
}
.native-settings summary {
  padding: 0;
  font-size: 12px;
}
.native-settings textarea {
  width: 100%;
  border: 1px solid var(--border-strong);
  border-radius: 7px;
  padding: 8px;
  resize: vertical;
}
.native-settings small {
  display: block;
  line-height: 1.6;
  overflow-wrap: anywhere;
}
.report-options {
  border-top: 1px solid var(--border);
  padding-bottom: 8px;
}
.report-options > summary {
  cursor: pointer;
  list-style: none;
}
.report-options[open] > summary {
  background: var(--surface-raised);
}
.report-options-grid {
  display: grid;
  grid-template-columns: 1fr 2fr;
  gap: 30px;
  padding: 10px 24px;
}
.report-options h3 {
  font-size: 15px;
}
.report-options > p {
  padding: 0 25px;
}
.metric-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}
.metric-pills label {
  cursor: pointer;
}
.metric-pills input {
  position: absolute;
  opacity: 0;
  width: 1px;
  height: 1px;
}
.metric-pills span {
  display: block;
  padding: 7px 10px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 7px;
  font-size: 11px;
}
.metric-pills input:checked + span {
  background: var(--surface-selected);
  border-color: var(--border-accent-strong);
  color: var(--text-accent-strong);
}
.metric-pills input:focus-visible + span {
  outline: 2px solid var(--iris-700);
  outline-offset: 2px;
}
.custom-metric-heading {
  display: flex;
  justify-content: space-between;
  gap: 15px;
  align-items: center;
  padding: 18px 24px 0;
}
.custom-metric-heading p {
  font-size: 12px;
}
.custom-metric-row {
  display: flex;
  align-items: center;
  gap: 16px;
  border-top: 1px solid var(--border);
  padding: 13px 0;
  font-size: 12px;
}
.custom-metric-row > div {
  flex: 1;
}
.custom-metric-row code {
  display: block;
  color: var(--muted);
  font-size: 12px;
  margin-top: 5px;
}
.custom-metric-fields {
  display: grid;
  grid-template-columns: 1fr 1fr 2fr 100px auto;
  align-items: end;
  gap: 12px;
  padding: 16px 24px;
}
#custom-metric-list {
  padding: 10px 24px;
}
.target-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(270px, 1fr));
  gap: 14px;
  padding: 8px 24px 24px;
}
.target-card {
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 18px;
  background: var(--surface-raised);
}
.target-card h3 {
  margin: 0 0 15px;
}
.target-fields {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 10px;
}
/* DEC-01: targets for accounts in another currency reuse the card's KPI, sample and lag. */
.target-currencies {
  display: grid;
  gap: 8px;
  margin-top: 12px;
}
.target-currency-row {
  display: grid;
  grid-template-columns: 1fr 1fr auto;
  gap: 10px;
  align-items: end;
}
/* The Sheets delivery choice sits between the report options and the run bar, aligned with the sections above. */
.report-delivery-policy {
  max-width: 380px;
  padding: 16px 25px;
}
.report-runbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 18px 24px;
  border-top: 1px solid var(--border);
  background: var(--surface-raised);
  font-size: 12px;
}
.report-runbar > div {
  display: flex;
  gap: 10px;
}
.report-results-heading {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 18px;
  margin: 35px 0 15px;
}
.report-results-heading h2 {
  margin: 8px 0;
}
.report-progress {
  display: flex;
  align-items: center;
  gap: 16px;
  background: var(--surface-subtle);
  border: 1px solid var(--border-accent);
  border-radius: 14px;
  padding: 20px;
  margin: 15px 0;
  color: var(--text-accent-strong);
}
.report-progress p {
  font-size: 12px;
  margin: 6px 0;
}
/* RPT-05: partial snapshot strip, queued time and stall notice. */
.report-status-strip {
  margin: 15px 0;
  padding: 14px 18px;
  border: 1px solid var(--line-strong);
  border-inline-start: 4px solid var(--warning-ink);
  border-radius: 12px;
  background: var(--warning-bg);
  color: var(--ink);
}
.report-status-strip p {
  margin: 6px 0 0;
  font-size: 13px;
  line-height: 1.5;
}
.report-status-strip code {
  font-size: 11px;
}
.report-queued {
  margin: -6px 0 12px;
  font-size: 12px;
  color: var(--muted);
}
.report-stall .button,
.report-refresh .button {
  margin-top: 8px;
}
.report-card-footer,
.report-summary-excludes {
  margin: 8px 0 0;
  font-size: 11px;
  color: var(--muted);
}
/* RPT-05: native evidence rows keep their row header visible while scrolling sideways (RTL-aware). */
#report-native-rows .evidence-rows-table td {
  min-width: 6rem;
}
#report-native-rows .evidence-rows-table th[scope='row'] {
  position: sticky;
  inset-inline-start: 0;
  z-index: 1;
  background: var(--white);
}
.evidence-rows-table .evidence-copy {
  margin-inline-start: 4px;
  padding: 2px 6px;
}
.report-progress > span:last-child {
  margin-inline-start: auto;
  font-size: 11px;
}
.report-source-health {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 16px 0;
}
.source-health {
  border: 1px solid var(--border);
  border-radius: 9px;
  background: var(--white);
  padding: 10px 12px;
  min-width: 160px;
  flex: 1;
  font-size: 11px;
}
.source-health summary {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  cursor: pointer;
}
.source-health strong {
  font-size: 10px;
  color: var(--status-success-ink);
}
.source-health.attention strong {
  color: var(--status-warning-ink);
}
.source-health p {
  line-height: 1.7;
}
.report-table-wrap {
  overflow: auto;
  max-height: 700px;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 14px;
}
.report-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  white-space: nowrap;
  font-size: 12px;
}
.report-table th {
  position: sticky;
  top: 0;
  background: var(--surface-subtle);
  color: var(--text-secondary);
  z-index: 1;
  font-size: 10px;
  letter-spacing: 0.2px;
  padding: 15px;
  text-align: end;
  border-bottom: 1px solid var(--border);
}
.report-table th:first-child,
.report-table th:nth-child(2),
.report-table th:last-child {
  text-align: start;
}
.report-table td {
  padding: 17px 15px;
  border-bottom: 1px solid var(--border);
  text-align: end;
  vertical-align: top;
  font-variant-numeric: tabular-nums;
}
.report-table td:first-child {
  text-align: start;
  min-width: 245px;
  max-width: 300px;
  white-space: normal;
}
.report-table td:nth-child(2) {
  text-align: start;
}
.report-table .metric-qualifier {
  margin-inline-start: 2px;
  color: var(--muted);
  text-decoration: none;
  cursor: help;
}
.report-table td strong {
  display: block;
  color: var(--text);
  font-size: 12px;
}
.report-table td small {
  display: block;
  margin-top: 7px;
  line-height: 1.65;
}
.report-table td details {
  margin-top: 8px;
}
.report-table td pre {
  max-width: 260px;
  max-height: 200px;
  overflow: auto;
}
.report-table .recommendation {
  min-width: 270px;
  max-width: 330px;
  white-space: normal;
  text-align: start;
}
.recommendation p {
  font-size: 11px;
  color: var(--muted);
  line-height: 1.65;
  margin: 8px 0 0;
}
.recommendation-as-of {
  display: block;
  margin-top: 6px;
  font-size: 12px;
  color: var(--muted);
}
/* One token pair per decision meaning, in both themes, with a symbol so colour is not the only cue. Decisions without
   a budget direction (wait, needs review, needs a target, insufficient data, observe) share the neutral hold pair
   (WEB-01: the dark theme previously collapsed "Scale" and "Needs review" into one colour). */
.recommendation-pill {
  border-radius: 6px;
  background: var(--decision-hold-bg);
  color: var(--decision-hold-ink);
  padding: 5px 8px;
  font-size: 12px;
  display: inline-block;
}
.recommendation-pill::before {
  content: '• ' / '';
}
.recommendation-pill.decision-scale {
  background: var(--decision-positive-bg);
  color: var(--decision-positive-ink);
}
.recommendation-pill.decision-scale::before {
  content: '↑ ' / '';
}
.recommendation-pill.decision-maintain {
  background: var(--decision-steady-bg);
  color: var(--decision-steady-ink);
}
.recommendation-pill.decision-maintain::before {
  content: '→ ' / '';
}
.recommendation-pill.decision-pull_back {
  background: var(--decision-caution-bg);
  color: var(--decision-caution-ink);
}
.recommendation-pill.decision-pull_back::before {
  content: '↓ ' / '';
}
.recommendation-pill.decision-reconsider_pause {
  background: var(--decision-negative-bg);
  color: var(--decision-negative-ink);
}
.recommendation-pill.decision-reconsider_pause::before {
  content: '‖ ' / '';
}
.report-pagination {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 15px 2px;
}
.report-pagination > div {
  display: flex;
  gap: 8px;
}
.native-field-tags {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  padding-top: 15px;
}
.native-field-tags code {
  padding: 6px;
  background: var(--surface-subtle);
  border-radius: 5px;
  font-size: 10px;
  overflow-wrap: anywhere;
}
.report-history {
  margin-top: 28px;
}
.report-history-row {
  display: flex;
  align-items: center;
  gap: 20px;
  width: 100%;
  text-align: start;
  border: 0;
  border-top: 1px solid var(--border);
  padding: 15px 0;
  cursor: pointer;
}
.report-history-row > span:first-child {
  flex: 1;
}
.report-history-row strong,
.report-history-row small {
  display: block;
}
.report-history-row small {
  font-size: 11px;
  margin-top: 6px;
}
.report-delivery-dialog {
  width: min(740px, 94vw);
  padding: 28px;
  border: 1px solid var(--border);
  border-radius: 20px;
  max-height: 90vh;
  overflow: auto;
  background: var(--surface-raised);
  color: var(--text);
}
.report-delivery-dialog::backdrop {
  background: var(--overlay);
  backdrop-filter: blur(4px);
}
.report-delivery-dialog section {
  border-top: 1px solid var(--border);
  margin-top: 22px;
  padding-top: 12px;
}
/* WEB-01: #897593 measured 4.11:1 on the dialog, 3.69:1 on the report context and 3.57:1 on a notice (axe, browser
   QA wave 2); the themed muted ink reaches 4.5:1 on each, and a notice keeps its own ink. */
.report-delivery-dialog p {
  font-size: 13px;
  line-height: 1.7;
  color: var(--muted);
}
.report-delivery-dialog p.notice {
  color: var(--ink);
}
.report-delivery-dialog label {
  display: grid;
  gap: 8px;
  font-size: 12px;
  margin: 12px 0;
}
.report-delivery-dialog input,
.report-delivery-dialog select {
  min-height: 40px;
  width: 100%;
  border: 1px solid var(--border-strong);
  border-radius: 8px;
  padding: 9px;
  background: var(--white);
  font: inherit;
}
.report-delivery-dialog .workspace-form {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  align-items: end;
}
.report-delivery-dialog .workspace-form .button {
  align-self: end;
}
#report-bind-files fieldset {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 12px;
  min-inline-size: 0;
  margin: 0;
  padding: 16px;
  border: 1px solid var(--border);
  border-radius: 8px;
}
#report-bind-files .work-filter,
#report-bind-files .form-note {
  grid-column: 1 / -1;
}
.schedule-row {
  display: flex;
  justify-content: space-between;
  border-top: 1px solid var(--border);
  padding: 13px 0;
}
.schedule-row small {
  display: block;
  line-height: 1.7;
  color: var(--muted);
  font-size: 12px;
  margin-top: 5px;
}
.password-field {
  display: flex;
  position: relative;
}
.password-field input {
  width: 100%;
  padding-inline-end: 65px;
}
.password-toggle {
  position: absolute;
  inset-inline-end: 9px;
  top: 50%;
  transform: translateY(-50%);
  border: 0;
  color: var(--text-accent);
  background: transparent;
  padding: 8px;
  cursor: pointer;
  font-size: 11px;
}
.recovery-key {
  display: block;
  padding: 18px;
  background: var(--surface-subtle);
  border: 1px dashed var(--border-accent-strong);
  border-radius: 10px;
  overflow-wrap: anywhere;
  font-size: 14px;
  line-height: 1.8;
  margin: 15px 0;
}
.account-security-panel {
  margin-top: 22px;
}
.account-security-panel .auth-form {
  max-width: 440px;
}
.team-list {
  margin: 18px 0;
}
.team-list select {
  border: 1px solid var(--border-strong);
  padding: 8px;
  border-radius: 7px;
  background: var(--white);
}
/* EXP-04 A: the delivery status bar stays at the foot of the dialog, beside the actions, in its tone. */
.report-delivery-dialog .delivery-status {
  position: sticky;
  bottom: 0;
  z-index: 1;
  margin-top: 18px;
  padding: 15px;
  border: 1px solid var(--line);
  border-radius: 10px;
  font-size: 13px;
  line-height: 1.7;
  color: var(--ink);
  background: var(--surface-accent);
  box-shadow: 0 -6px 16px var(--shadow);
  overflow-wrap: anywhere;
}
.report-delivery-dialog .delivery-status[hidden] {
  display: none;
}
.report-delivery-dialog .delivery-status.success {
  color: var(--success-ink);
  background: var(--success-bg);
}
.report-delivery-dialog .delivery-status.warning {
  color: var(--warning-ink);
  background: var(--warning-bg);
}
.report-delivery-dialog .delivery-status.error {
  color: var(--danger);
  background: var(--danger-bg);
  border-color: var(--danger);
}
.report-delivery-dialog .delivery-status a {
  color: inherit;
}
.delivery-preview {
  margin-top: 14px;
}
.delivery-preview h4 {
  margin: 0;
}
.schedule-preview-table th small {
  display: block;
  font-weight: 400;
}
@media (max-width: 1100px) {
  .report-heading {
    align-items: flex-start;
    flex-direction: column;
  }
  .report-options-grid {
    grid-template-columns: 1fr;
  }
  .custom-metric-fields {
    grid-template-columns: 1fr 1fr;
  }
  .report-section-label small {
    display: none;
  }
  .report-results-heading {
    align-items: flex-start;
    flex-direction: column;
  }
}
@media (max-width: 600px) {
  .report-platforms {
    grid-template-columns: 1fr;
    padding: 0 14px 16px;
  }
  .report-delivery-policy {
    padding: 16px 14px;
  }
  .report-control-top {
    padding: 18px;
    flex-direction: column;
  }
  .report-control-top label {
    flex: 1;
  }
  .report-runbar {
    align-items: flex-start;
    flex-direction: column;
    gap: 14px;
    padding: 18px;
  }
  .report-control-panel {
    border-radius: 14px;
  }
  .report-actions {
    width: 100%;
  }
  .custom-metric-heading {
    align-items: flex-start;
    flex-direction: column;
  }
  .custom-metric-fields {
    grid-template-columns: 1fr;
  }
  .target-grid {
    padding: 12px;
  }
  .report-history-row {
    gap: 10px;
  }
  .report-history-row > span:last-child {
    display: none;
  }
  .report-delivery-dialog .workspace-form,
  #report-bind-files fieldset {
    grid-template-columns: 1fr;
  }
  .report-pagination {
    align-items: flex-start;
    flex-direction: column;
    gap: 10px;
  }
  .report-heading h1 {
    letter-spacing: -0.8px;
  }
  .report-section-label {
    padding: 18px 14px;
  }
  .report-options-grid {
    padding: 12px;
  }
}

.report-summary-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 16px;
  margin: 20px 0;
}
.report-summary-card {
  border: 1px solid var(--line);
  border-radius: 22px;
  padding: 23px;
  background: linear-gradient(135deg, var(--paper-warm), var(--surface));
}
.report-summary-card > small {
  color: var(--text-secondary-strong);
}
.report-summary-card h3 {
  margin: 14px 0;
  font-size: 22px;
}
.report-summary-card h3 span {
  font-size: 12px;
  font-weight: 400;
}
/* The spend, clicks and CPC figures wrap: an Arabic currency figure ("170.30 US$") is wider than "$170.30", and the
   unwrapped row widened a 320-pixel page to 339 (RPT-07's rendered case). */
.report-summary-card > div {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 26px;
}
.report-summary-card > div > span {
  min-width: 0;
}
.report-summary-card strong {
  display: block;
  font-size: 21px;
  margin-top: 7px;
  overflow-wrap: anywhere;
}
.report-summary-card p {
  font-size: 13px;
  color: var(--text-secondary-strong);
}
.report-summary-card code {
  overflow-wrap: anywhere;
  white-space: normal;
}
.owner-operations {
  margin-bottom: 40px;
}
.owner-operations input:not([type='checkbox']),
.owner-operations select {
  width: 100%;
  margin: 6px 0 14px;
}
.owner-operations form label {
  display: block;
}
.owner-operations pre {
  overflow: auto;
  max-height: 300px;
}
.owner-operations .workspace-form p {
  grid-column: 1/-1;
}
/* WEB-08: owner Settings sub-navigation (Safety first) and its groups. */
.settings-subnav ul {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 0 24px;
  padding: 0;
  list-style: none;
}
.settings-subnav li[hidden] {
  display: none;
}
.settings-subnav a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding-inline: 16px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--ink);
  background: var(--surface-subtle);
  text-decoration: none;
}
.settings-group {
  margin-block-end: 32px;
  scroll-margin-block-start: 16px;
}
.settings-group[hidden] {
  display: none;
}
.settings-group > h2,
.settings-group-heading {
  margin-block: 0 14px;
  scroll-margin-block-start: 16px;
}
.worker-health-details > summary {
  min-height: 44px;
  cursor: pointer;
}

.report-actions > select {
  min-height: 44px;
  padding-block: 0;
  padding-inline: 14px 36px;
  border: 1px solid var(--line);
  border-radius: 12px;
  color: var(--ink);
  background: var(--surface-raised);
  font: inherit;
  max-width: 100%;
}
.source-diagnostic {
  line-height: 1.6;
  overflow-wrap: anywhere;
}
.source-diagnostic > strong {
  display: block;
  color: var(--danger);
}
.source-diagnostic small {
  display: block;
  margin: 7px 0;
}
.source-next-action {
  padding: 12px 14px;
  background: var(--paper-warm);
  border: 1px solid var(--warning-line);
  border-radius: 10px;
  color: var(--text-warm);
}
.source-health .report-actions {
  margin-top: 14px;
}
.activity-failure {
  padding: 15px 20px;
  margin-bottom: 18px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--surface-raised);
}
.activity-failure > summary {
  cursor: pointer;
  font-weight: 600;
  color: var(--danger-strong);
}
.report-date-summary {
  flex-basis: 100%;
  margin: 0;
  color: var(--text);
  font-size: 14px;
  font-weight: 600;
  line-height: 1.6;
}
.report-empty h3 {
  color: var(--text);
}
.report-empty p {
  line-height: 1.7;
}
.report-empty .button {
  margin-top: 10px;
}
.report-date-fields {
  flex-wrap: wrap;
}

.delivery-report-context {
  padding: 16px 18px;
  background: var(--surface-subtle);
  border: 1px solid var(--border);
  border-radius: 12px;
  margin: 14px 0;
}
.delivery-report-context p {
  margin: 6px 0 0;
  overflow-wrap: anywhere;
}
.report-delivery-dialog .delivery-wide {
  grid-column: 1/-1;
}
.delivery-alternatives {
  padding: 12px 0;
}
.delivery-alternatives summary {
  cursor: pointer;
  font-size: 13px;
}
.delivery-section > .button {
  margin-top: 12px;
}
.schedule-row {
  gap: 16px;
  align-items: flex-start;
}
.schedule-row > div {
  min-width: 0;
}
.schedule-row small {
  overflow-wrap: anywhere;
}
.schedule-row .report-actions {
  margin-top: 10px;
  flex-wrap: wrap;
}
.report-delivery-dialog .eyebrow {
  margin: 0;
}
.report-library {
  margin-bottom: 22px;
}
.report-library label {
  display: grid;
  gap: 7px;
  font-size: 12px;
  max-width: 100%;
  color: var(--text-soft);
}
.report-library select {
  min-height: 44px;
  max-width: 100%;
  width: min(360px, 80vw);
  padding: 9px;
  border: 1px solid var(--border-strong);
  border-radius: 9px;
  background: var(--surface-raised);
  color: var(--text);
  font: inherit;
}
.report-library .report-actions {
  align-items: end;
}
.report-library .form-note {
  color: var(--text-soft);
  line-height: 1.6;
}
.report-history-item {
  display: flex;
  align-items: center;
  gap: 12px;
}
.report-history-item .report-history-row {
  min-width: 0;
  flex: 1;
}
.report-history-item .report-history-row strong {
  overflow-wrap: anywhere;
}
.report-control-top label[hidden],
.report-delivery-dialog label[hidden] {
  display: none;
}
.report-control-top > .form-note {
  flex-basis: 100%;
  margin: 0;
  line-height: 1.6;
  color: var(--text-soft);
}
.report-delivery-dialog small {
  line-height: 1.6;
}
.button.danger {
  color: var(--danger-strong);
  border-color: var(--danger-line);
}
/* The theme's focus colour: the fixed #7351a1 measured 2.57:1 on the dark-theme panel (QA-03 focus contrast). */
.report-library :focus-visible,
.report-delivery-dialog :focus-visible {
  outline: 3px solid var(--iris-700);
  outline-offset: 3px;
}
.report-table caption {
  text-align: start;
  padding: 12px;
  color: var(--text-soft);
}
.schedule-row > .report-actions {
  flex-shrink: 0;
}
@media (max-width: 600px) {
  .report-library .report-actions > label {
    width: 100%;
  }
  .report-library select {
    width: 100%;
  }
  .report-history-item {
    gap: 6px;
  }
  .schedule-row {
    flex-wrap: wrap;
  }
  .report-delivery-dialog {
    padding: 18px;
  }
  .report-runbar > div {
    flex-wrap: wrap;
  }
}
.metric-sources summary {
  cursor: pointer;
  font-weight: 600;
}
.metric-sources td small {
  display: block;
  margin-top: 2px;
}
.metric-sources code {
  overflow-wrap: anywhere;
}
.mfa-steps {
  padding-inline-start: 1.25em;
}
.mfa-steps li {
  margin-bottom: 18px;
}
.mfa-steps .recovery-key {
  letter-spacing: 0.08em;
  margin: 10px 0;
}
/* Row headers of the report table keep the look of the first data column and stay visible while the metrics scroll
   sideways (RPT-05; inline-start, so RTL too). */
.report-table tbody th {
  position: sticky;
  top: auto;
  inset-inline-start: 0;
  background: var(--white);
  z-index: 1;
  color: inherit;
  font-size: 12px;
  font-weight: 400;
  letter-spacing: 0;
  padding: 17px 15px;
  border-bottom: 1px solid var(--border);
  text-align: start;
  vertical-align: top;
  min-width: 9rem;
  max-width: 15rem;
  white-space: normal;
  overflow-wrap: anywhere;
}
.report-table tbody th strong {
  display: block;
  color: var(--text);
  font-size: 12px;
}
.report-table tbody th small {
  display: block;
  margin-top: 7px;
  line-height: 1.65;
}
.report-table tbody th details {
  margin-top: 8px;
}
.report-table tbody th pre {
  max-width: 260px;
  max-height: 200px;
  overflow: auto;
}
/* RPT-05: the corner header stays put both ways; the context cell holds the IDs, parents, account and source details. */
.report-rows-table thead th:first-child {
  inset-inline-start: 0;
  z-index: 2;
}
.report-rows-table .report-row-context {
  min-width: 13rem;
  max-width: 18rem;
  white-space: normal;
  text-align: start;
  overflow-wrap: anywhere;
}
.report-rows-table .report-row-context > span {
  display: block;
}
.report-window-tile > div {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(6.5rem, 1fr));
  gap: 12px 18px;
}
.report-window-tile strong {
  font-size: 17px;
  overflow-wrap: anywhere;
}
.report-sparkline {
  display: block;
  width: 100%;
  height: 36px;
  margin-top: 14px;
  color: var(--iris);
}
/* Time runs from the inline start in both directions. */
html[dir='rtl'] .report-sparkline {
  transform: scaleX(-1);
}
/* RPT-05: on phones each report row reads as a card: the name, its context, a metric grid and the decision. The column
   headers stay available to assistive technology, and each value is labelled by its column. */
@media (max-width: 600px) {
  .report-table-wrap:has(.report-rows-table) {
    max-height: none;
  }
  .report-rows-table,
  .report-rows-table tbody {
    display: block;
    white-space: normal;
  }
  .report-rows-table caption {
    display: block;
  }
  .report-rows-table thead {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip-path: inset(50%);
    white-space: nowrap;
  }
  .report-rows-table tbody tr {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 4px 14px;
    padding: 14px;
    border-bottom: 1px solid var(--border);
  }
  .report-rows-table tbody th,
  .report-rows-table tbody td {
    position: static;
    display: block;
    min-width: 0;
    max-width: none;
    padding: 4px 0;
    border-bottom: 0;
    text-align: start;
    white-space: normal;
    overflow-wrap: anywhere;
  }
  .report-rows-table tbody th,
  .report-rows-table .report-row-context,
  .report-rows-table .recommendation {
    grid-column: 1 / -1;
  }
  .report-rows-table tbody th strong {
    font-size: 14px;
  }
  .report-rows-table td[data-label]::before {
    content: attr(data-label);
    display: block;
    margin-bottom: 2px;
    font-size: 10px;
    color: var(--muted);
  }
  .report-rows-table td pre {
    max-width: 100%;
  }
}
.mfa-qr {
  display: block;
  width: 196px;
  height: 196px;
  margin: 12px 0;
  background: var(--white);
  border: 1px solid var(--line-strong);
  border-radius: 8px;
}
