/* Shared admin typography and interaction baseline. */
:root {
  font-size: 16px;
  line-height: 1.5;
  color: #1c2e46;
}
body {
  font-size: 16px;
}
main {
  min-width: 0;
}
p {
  color: #53647b;
}
h2,
.risk-panel h3 {
  font-size: 19px;
  line-height: 1.35;
}
button,
input,
select {
  min-height: 44px;
}
button {
  line-height: 1.35;
}
:where(button, a, input, select, [tabindex]):focus-visible {
  outline: 3px solid #365ee8;
  outline-offset: 3px;
}
nav button {
  font-size: 16px;
}
aside {
  overflow-y: auto;
}
.risk-tabs {
  flex-wrap: wrap;
  row-gap: 4px;
}
.risk-tabs button {
  font-size: 15px;
  min-height: 48px;
}
.risk-global,
.risk-chart-axis {
  flex-wrap: wrap;
  gap: 12px;
}
.risk-head-meta {
  flex-shrink: 0;
}
.risk-badge,
.badge {
  line-height: 1.5;
}
.risk-kpi strong,
.metrics strong {
  font-variant-numeric: tabular-nums;
}
.risk-kpi small {
  line-height: 1.55;
  display: block;
}
.risk-kpi {
  min-width: 0;
}
.account-card-stats {
  flex-wrap: wrap;
  gap: 10px;
}
.account-card:hover {
  border-color: #5477d4;
  box-shadow: 0 3px 14px #243b6510;
}
.account-card.selected {
  box-shadow: 0 0 0 2px #4466dc;
}
th {
  color: #435671;
  font-weight: 650;
}
td {
  line-height: 1.5;
}
tbody tr:hover {
  background: #f5f8ff;
}
.risk-chart {
  --chart-success: #2563eb;
  --chart-failure: #c45c14;
  height: 190px;
  padding-top: 20px;
}
.risk-chart-bar {
  position: relative;
}
.risk-chart-bar .chart-success {
  background: #2563eb;
}
.risk-chart-bar .chart-failure {
  background: repeating-linear-gradient(135deg, #c45c14 0 4px, #f4b579 4px 6px);
}
.risk-chart-bar:hover,
.risk-chart-bar:focus-visible {
  background-color: #2563eb0d;
}
.chart-tooltip {
  display: none;
  position: absolute;
  bottom: calc(100% + 8px);
  left: 50%;
  transform: translateX(-50%);
  z-index: 5;
  width: 240px;
  max-width: 70vw;
  border-radius: 8px;
  padding: 10px 12px;
  background: #172237;
  color: #fff;
  font-size: 14px;
  line-height: 1.5;
  box-shadow: 0 6px 20px #17223730;
  pointer-events: none;
}
.risk-chart-bar:nth-child(-n + 5) .chart-tooltip {
  left: 0;
  transform: none;
}
.risk-chart-bar:nth-last-child(-n + 5) .chart-tooltip {
  left: auto;
  right: 0;
  transform: none;
}
.risk-chart-bar:hover .chart-tooltip,
.risk-chart-bar:focus .chart-tooltip {
  display: block;
}
.chart-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 24px;
  margin-top: 20px;
  color: #354760;
  font-size: 14px;
}
.legend-item {
  display: inline-flex;
  align-items: center;
  gap: 9px;
}
.legend-marker {
  width: 14px;
  height: 14px;
  border-radius: 3px;
  flex-shrink: 0;
}
.legend-marker.success {
  background: #2563eb;
}
.legend-marker.failure {
  background: repeating-linear-gradient(135deg, #c45c14 0 4px, #f4b579 4px 6px);
}
.chart-scale {
  font-size: 13px;
  color: #53647b;
  margin: 16px 0 10px;
}
@media (max-width: 1200px) {
  .risk-two {
    grid-template-columns: minmax(0, 1fr);
  }
}
@media (max-width: 750px) {
  .risk-page-head,
  .page-head {
    flex-wrap: wrap;
  }
  .risk-head-meta {
    display: flex;
  }
  .risk-kpis,
  .metrics {
    grid-template-columns: minmax(0, 1fr);
  }
  header {
    height: auto;
    min-height: 70px;
    gap: 12px;
    flex-wrap: wrap;
    padding: 14px 0;
  }
}

.empty-state {
  padding: 32px 24px;
  text-align: center;
  color: #53647b;
  background: #fff;
  border-radius: 10px;
  line-height: 1.65;
}

.pagination {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 18px 0;
  flex-wrap: wrap;
}
/* Payment-day selection stays separate from the live gateway controls. */
.payment-date-filter {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px 24px;
  margin: 0 0 24px;
  padding: 20px 24px;
  background: #fff;
  border: 1px solid #dce3ed;
  border-radius: 12px;
}
.payment-date-filter label {
  display: grid;
  gap: 8px;
}
.payment-date-filter input {
  width: 200px;
  min-height: 44px;
}
.payment-date-filter p {
  flex: 1 1 300px;
  margin: 0;
  color: #465e7a;
}
#overview[aria-busy="true"] .metrics {
  opacity: 0.55;
}
#chart .bar:focus-visible {
  outline: 3px solid #173e39;
  outline-offset: 2px;
}
@media (max-width: 600px) {
  .payment-date-filter {
    padding: 16px;
  }
  .payment-date-filter label,
  .payment-date-filter input {
    width: 100%;
  }
}
