:root {
  color-scheme: light;
  --primary: #37b5c1;
  --deep: #137e89;
  --ink: #5e5873;
  --muted: #827d92;
  --line: #ebe9f1;
  --bg: #f8f8fa;
  --shadow: 0 4px 24px 0 #22292f09;
  font: 15px/1.5
    -apple-system,BlinkMacSystemFont,"Segoe UI","PingFang SC","Microsoft YaHei",sans-serif;
  color: var(--ink);
  background: var(--bg);
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
}
a {
  color: inherit;
  text-decoration: none;
}
button,
input {
  font: inherit;
}
button {
  cursor: pointer;
}
button:disabled {
  cursor: wait;
  opacity: .6;
}
button:focus-visible,
a:focus-visible {
  outline: 3px solid #37b5c155;
  outline-offset: 4px;
}
h1,
h2,
p {
  margin: 0;
}
h1 {
  font-size: 26px;
  line-height: 1.4;
  letter-spacing: .3px;
  font-weight: 600;
}
h2 {
  font-size: 17px;
  font-weight: 600;
}
.quiet,
.caption,
.metric-note {
  color: var(--muted);
  font-size: 13px;
}
.topbar {
  height: 76px;
  background: #fff;
  box-shadow: var(--shadow);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 max(28px,calc((100vw - 1192px)/2));
  gap: 20px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 21px;
  font-weight: 650;
  letter-spacing: 1px;
}
.brand svg {
  color: var(--primary);
  width: 38px;
  height: 38px;
}
.account {
  display: flex;
  align-items: center;
  gap: 20px;
  font-size: 13px;
}
.text-button {
  background: none;
  border: 0;
  color: var(--muted);
  padding: 8px;
}
main {
  max-width: 1192px;
  margin: 38px auto;
  padding: 0 24px;
}
.page-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 25px;
}
.eyebrow {
  color: var(--deep);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 1px;
  margin-bottom: 5px;
}
.page-heading h1 {
  margin-bottom: 7px;
}
.dot {
  margin: 0 6px;
}
.heading-actions {
  display: flex;
  align-items: center;
  gap: 18px;
}
.primary {
  border: 1px solid var(--primary);
  background: var(--primary);
  color: white;
  font-weight: 600;
  border-radius: 5px;
  min-height: 40px;
  padding: 9px 22px;
  box-shadow: 0 3px 9px #37b5c125;
}
.primary:hover {
  background: #2da4b0;
}
.secondary {
  border: 1px solid #b0e2e6;
  background: #edf9fa;
  color: var(--deep);
  border-radius: 5px;
  padding: 8px 20px;
  min-height: 40px;
}
.secondary:hover {
  background: #def3f5;
}
.status {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  white-space: nowrap;
  font-size: 12px;
  border-radius: 4px;
  padding: 4px 9px;
}
.status i {
  width: 6px;
  height: 6px;
  background: currentColor;
  border-radius: 50%;
}
.good {
  color: #25885d;
  background: #e8f7ef;
}
.warn {
  color: #a5670f;
  background: #fff2df;
}
.danger {
  color: #b7474e;
  background: #fcebed;
}
.metrics {
  display: grid;
  grid-template-columns: 1.2fr 1fr 1fr;
  gap: 22px;
  margin-bottom: 24px;
}
.metric,
.panel {
  background: #fff;
  border-radius: 7px;
  box-shadow: var(--shadow);
}
.metric {
  padding: 24px 26px;
}
.metric > span:first-child {
  font-size: 14px;
}
.remaining {
  background: linear-gradient(120deg,#eaf9fa,#fff);
  border: 1px solid #d6eff1;
  padding: 23px 25px;
}
.remaining .metric-value {
  color: var(--deep);
}
.metric-value {
  font-size: 36px;
  font-weight: 600;
  line-height: 1.4;
  margin: 9px 0 7px;
  font-variant-numeric: tabular-nums;
  letter-spacing: -.6px;
}
.metric-value small {
  font-size: 14px;
  font-weight: 400;
  margin-left: 9px;
  color: var(--muted);
  letter-spacing: 0;
}
.panel {
  padding: 22px 26px;
}
.section-heading {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-bottom: 22px;
}
.quota {
  margin-bottom: 24px;
}
progress {
  appearance: none;
  width: 100%;
  height: 8px;
  border: 0;
  border-radius: 20px;
  background: #eaf5f6;
  display: block;
}
progress::-webkit-progress-bar {
  background: #eaf5f6;
  border-radius: 20px;
}
progress::-webkit-progress-value {
  background: var(--primary);
  border-radius: 20px;
}
progress::-moz-progress-bar {
  background: var(--primary);
  border-radius: 20px;
}
.cycle {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  color: var(--muted);
  font-size: 12px;
  margin-top: 18px;
}
.cycle strong {
  font-size: 13px;
  display: inline-block;
  color: var(--ink);
  font-weight: 400;
  margin-top: 4px;
}
.details-grid {
  display: grid;
  grid-template-columns: minmax(0,1.8fr) minmax(300px,1fr);
  gap: 24px;
}
.trend {
  min-width: 0;
}
.chart {
  width: 100%;
  height: auto;
  display: block;
  overflow: visible;
}
.chart rect {
  fill: var(--primary);
  opacity: .85;
}
.chart rect:hover {
  opacity: 1;
}
.grid-line {
  stroke: #efedf4;
  stroke-width: 1;
}
.chart-label {
  font-size: 12px;
  fill: var(--muted);
}
.caption {
  font-size: 11px;
  margin-top: 12px;
}
.empty-chart {
  height: 200px;
  display: grid;
  place-items: center;
  color: var(--muted);
}
.empty-alert {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px 0 23px;
}
.empty-alert strong {
  font-size: 15px;
  font-weight: 500;
}
.check,
.unknown {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: #e8f7ef;
  color: #25885d;
  font-size: 21px;
}
.unknown {
  color: #a5670f;
  background: #fff2df;
}
.thresholds {
  border-top: 1px solid var(--line);
  padding-top: 15px;
}
.thresholds p {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  font-size: 12px;
  margin: 8px 0;
}
.thresholds strong {
  font-weight: 500;
  text-align: right;
  white-space: nowrap;
}
.alert-item {
  display: flex;
  gap: 10px;
  align-items: center;
  margin-bottom: 17px;
}
.alert-item p {
  font-size: 13px;
}
.freshness {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 25px;
  margin-top: 23px;
  font-size: 11px;
  color: var(--muted);
}
.freshness strong {
  font-weight: 400;
  color: var(--ink);
  margin-left: 5px;
}
.freshness > span:last-child {
  margin-left: auto;
}
footer {
  max-width: 1192px;
  padding: 0 24px;
  margin: 30px auto 22px;
  color: #aaa6b5;
  font-size: 11px;
  display: flex;
  justify-content: space-between;
}
.message {
  padding: 14px 17px;
  border-radius: 5px;
  margin-bottom: 22px;
  font-size: 13px;
}
.message strong {
  display: block;
  margin-bottom: 4px;
}
.error {
  color: #a14d3f;
  background: #fff0e9;
  border: 1px solid #f7d8cb;
}
.refresh-message:empty {
  display: none;
}
.refresh-message {
  font-size: 13px;
  color: #a5670f;
  margin: 0 0 16px;
}
.login {
  width: 420px;
  max-width: calc(100% - 36px);
  margin: 70px auto 90px;
  padding: 32px;
  background: white;
  border-radius: 7px;
  box-shadow: var(--shadow);
}
.login-mark {
  color: var(--primary);
  margin-bottom: 15px;
}
.login-mark svg {
  height: 46px;
  width: 46px;
}
.login h1 {
  font-size: 23px;
  margin-bottom: 7px;
}
.login > .quiet {
  margin-bottom: 28px;
}
.login label {
  display: block;
  font-size: 13px;
  margin: 19px 0 7px;
}
.login input {
  width: 100%;
  height: 42px;
  padding: 9px 12px;
  border: 1px solid #d8d6e0;
  border-radius: 5px;
  color: var(--ink);
  background: #fff;
}
.login input:focus {
  outline: 0;
  border-color: var(--primary);
  box-shadow: 0 2px 8px #22292f15;
}
.login .primary {
  width: 100%;
  margin-top: 26px;
}
.login .message {
  margin-top: 20px;
  margin-bottom: 0;
}
@media (max-width:760px) {
  .topbar {
    height: 65px;
    padding: 0 20px;
  }
  .brand {
    font-size: 19px;
  }
  .brand svg {
    width: 31px;
    height: 31px;
  }
  .topbar > .quiet {
    display: none;
  }
  main {
    margin: 26px auto;
    padding: 0 18px;
  }
  .page-heading {
    align-items: flex-start;
  }
  .heading-actions {
    gap: 8px;
    flex-direction: column;
    align-items: flex-end;
  }
  .heading-actions .secondary {
    padding: 6px 18px;
    min-height: 36px;
  }
  h1 {
    font-size: 24px;
  }
  .metrics {
    gap: 12px;
    grid-template-columns: 1fr 1fr;
  }
  .metrics .remaining {
    grid-column: 1/-1;
  }
  .metric {
    padding: 19px;
  }
  .remaining {
    padding: 18px;
  }
  .metric-value {
    font-size: 28px;
  }
  .remaining .metric-value {
    font-size: 39px;
  }
  .details-grid {
    grid-template-columns: 1fr;
    gap: 18px;
  }
  .panel {
    padding: 20px;
  }
  .cycle {
    flex-direction: column;
    gap: 14px;
  }
  .cycle strong {
    font-size: 12px;
  }
  .freshness {
    flex-direction: column;
    gap: 8px;
  }
  .freshness > span:last-child {
    margin-left: 0;
  }
  .section-heading {
    margin-bottom: 18px;
  }
  .login {
    margin-top: 42px;
    padding: 28px;
  }
  .account {
    gap: 10px;
  }
  footer {
    padding: 0 18px;
  }
  .metric-value small {
    font-size: 12px;
    margin-left: 6px;
  }
}
@media (prefers-reduced-motion:no-preference) {
  button {
    transition: background .15s ease;
  }
}
.chart-label {
  font-size: 18px;
}
@media (max-width:760px) {
  .chart-label {
    font-size: 30px;
  }
  .chart {
    min-height: 140px;
  }
}
.panes {
  max-width: 1192px;
  margin: 24px auto 0;
  padding: 0 24px;
  display: flex;
  gap: 8px;
  border-bottom: 1px solid var(--line);
}
.panes a {
  padding: 12px 18px;
  font-size: 14px;
  border-bottom: 2px solid transparent;
}
.panes a[aria-current=page] {
  color: var(--deep);
  border-color: var(--primary);
  background: #edf9fa;
}
.next-collection {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px 16px;
  margin-bottom: 24px;
  font-size: 13px;
}
.next-collection strong {
  color: var(--deep);
  font-variant-numeric: tabular-nums;
}
.record-tools,
.record-filter,
.notification-meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
}
.record-tools {
  justify-content: space-between;
  margin-bottom: 20px;
}
.record-filter {
  font-size: 13px;
}
.record-filter select {
  font: inherit;
  color: var(--ink);
  padding: 9px;
  border: 1px solid var(--line);
  border-radius: 5px;
  background: white;
}
.record-table {
  padding: 0;
  overflow: hidden;
}
.record-table table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}
.record-table th,
.record-table td {
  padding: 15px 18px;
  text-align: left;
  border-bottom: 1px solid var(--line);
}
.record-table th {
  font-weight: 500;
  color: var(--muted);
  background: #fafcfc;
}
.record-table tr:last-child td {
  border: 0;
}
.empty-records {
  padding: 48px 20px;
  text-align: center !important;
  color: var(--muted);
}
.pagination {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 22px;
  font-size: 13px;
}
.pagination a {
  color: var(--deep);
  padding: 8px 12px;
  background: #edf9fa;
  border-radius: 5px;
}
.notification-records {
  display: grid;
  gap: 14px;
}
.notification-record {
  background: white;
  border-radius: 7px;
  box-shadow: var(--shadow);
  padding: 22px 26px;
}
.notification-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 15px;
  margin-bottom: 14px;
}
.notification-heading h2 {
  font-size: 15px;
  overflow-wrap: anywhere;
}
.notification-meta {
  color: var(--muted);
  font-size: 12px;
  gap: 12px 24px;
}
footer {
  justify-content: center;
  gap: 4px;
}
@media (max-width:760px) {
  .panes {
    padding: 0 18px;
    gap: 0;
    margin-top: 16px;
  }
  .panes a {
    padding: 12px 14px;
  }
  .next-collection .quiet {
    flex-basis: 100%;
  }
  .record-tools {
    align-items: flex-start;
  }
  .record-filter {
    gap: 8px;
  }
  .record-filter .secondary {
    padding: 8px 14px;
  }
  .record-table {
    padding: 0;
    background: none;
    box-shadow: none;
    overflow: visible;
  }
  .record-table table,
  .record-table tbody,
  .record-table tr {
    display: block;
  }
  .record-table thead {
    display: none;
  }
  .record-table tr {
    background: white;
    border-radius: 7px;
    box-shadow: var(--shadow);
    padding: 12px 16px;
    margin-bottom: 12px;
  }
  .record-table td {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 14px;
    padding: 8px 0;
    border: 0;
    text-align: right;
  }
  .record-table td::before {
    content: attr(data-label);
    color: var(--muted);
    flex-shrink: 0;
  }
  .record-table .empty-records {
    display: block;
    padding: 28px 0;
  }
  .notification-record {
    padding: 20px;
  }
}
/* Resource overview: three balances stay above details on small screens. */
.topbar {
  height: 58px;
}
.panes {
  margin-top: 10px;
}
.panes a {
  padding: 9px 16px;
}
main {
  margin: 20px auto;
}
.compact-heading {
  margin-bottom: 14px;
}
.compact-heading h1 {
  font-size: 23px;
  margin: 0;
}
.resource-list {
  display: grid;
  gap: 8px;
  margin-bottom: 12px;
}
.resource-row {
  display: grid;
  grid-template-columns: minmax(0,1fr) auto 64px 12px;
  align-items: center;
  gap: 20px;
  padding: 13px 18px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 7px;
  min-height: 76px;
}
.resource-row:hover {
  border-color: #8fd4db;
  background: #f6fcfc;
}
.resource-row.selected {
  border-color: var(--primary);
  background: #eefafb;
  box-shadow: inset 3px 0 var(--primary);
}
.resource-name {
  display: grid;
  gap: 2px;
  min-width: 0;
}
.resource-name strong {
  font-size: 15px;
  overflow-wrap: anywhere;
}
.resource-name small,
.resource-balance small {
  font-size: 12px;
  color: var(--muted);
}
.resource-balance {
  display: flex;
  gap: 8px;
  align-items: baseline;
}
.resource-balance strong {
  font-size: 28px;
  color: var(--deep);
  font-variant-numeric: tabular-nums;
  font-weight: 600;
}
.resource-arrow {
  font-size: 23px;
  color: var(--deep);
}
.resource-row .status {
  justify-self: end;
}
.next-collection {
  margin: 0 0 23px;
  justify-content: space-between;
  font-size: 12px;
}
.next-collection strong {
  font-weight: 500;
}
.detail-links {
  display: flex;
  gap: 18px;
  color: var(--deep);
  font-size: 13px;
}
#resource-details > .section-heading {
  margin-bottom: 13px;
}
.detail-facts {
  display: grid;
  grid-template-columns: repeat(4,minmax(0,1fr));
  gap: 16px;
  padding: 16px 20px;
  background: #fff;
  border-radius: 7px;
  margin-bottom: 16px;
}
.detail-facts > div {
  display: grid;
  gap: 5px;
}
.detail-facts span {
  font-size: 12px;
  color: var(--muted);
}
.detail-facts strong {
  font-size: 14px;
  font-weight: 500;
}
.details-grid {
  gap: 16px;
}
.panel {
  padding: 18px 20px;
}
.section-heading {
  margin-bottom: 14px;
}
.empty-chart {
  height: 160px;
}
.chart-label {
  font-size: 15px;
}
.freshness {
  margin-top: 16px;
}
.record-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 18px 0;
}
@media (max-width:760px) {
  .topbar {
    height: 54px;
    padding: 0 14px;
  }
  .brand {
    font-size: 17px;
    gap: 7px;
  }
  .brand svg {
    width: 28px;
    height: 28px;
  }
  .panes {
    margin-top: 5px;
    padding: 0 14px;
  }
  .panes a {
    font-size: 13px;
    padding: 9px 12px;
  }
  main {
    margin: 14px auto;
    padding: 0 14px;
  }
  .compact-heading {
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
  }
  .compact-heading h1 {
    font-size: 20px;
  }
  .compact-heading .heading-actions {
    flex-direction: row;
    align-items: center;
    gap: 8px;
  }
  .heading-actions .secondary {
    min-height: 34px;
    padding: 5px 12px;
  }
  .resource-row {
    padding: 10px 12px;
    gap: 8px;
    grid-template-columns: minmax(0,1fr) auto 56px 8px;
    min-height: 72px;
  }
  .resource-name strong {
    font-size: 13px;
  }
  .resource-name small {
    font-size: 11px;
  }
  .resource-balance {
    display: grid;
    grid-template-columns: auto auto;
    column-gap: 4px;
    row-gap: 0;
    align-items: baseline;
  }
  .resource-balance > small:first-child {
    grid-column: 1 / -1;
    font-size: 10px;
  }
  .resource-balance strong {
    font-size: 23px;
    line-height: 1.2;
  }
  .resource-balance > small:last-child {
    font-size: 10px;
  }
  .resource-row .status {
    font-size: 10px;
    padding: 3px 5px;
  }
  .resource-arrow {
    font-size: 18px;
  }
  .next-collection {
    margin-bottom: 20px;
    gap: 5px;
  }
  .next-collection .quiet {
    flex-basis: auto;
  }
  .detail-facts {
    grid-template-columns: 1fr 1fr;
    gap: 14px;
    padding: 14px;
  }
  .detail-facts strong {
    font-size: 12px;
  }
  .details-grid {
    grid-template-columns: 1fr;
  }
  .detail-links {
    gap: 12px;
    font-size: 12px;
  }
  .chart-label {
    font-size: 24px;
  }
  .record-filter {
    font-size: 12px;
  }
  .record-filter select {
    max-width: 145px;
  }
}
