:root {
  color-scheme: light;
  font-family: Inter, "Microsoft YaHei", "PingFang SC", sans-serif;
  color: #132e47;
  background: #f0f5f9;
  font-synthesis: none;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; }
.topbar { background: #072f55; color: white; }
.topbar-inner, main { width: min(1120px, calc(100% - 48px)); margin-inline: auto; }
.topbar-inner { min-height: 64px; display: flex; align-items: center; justify-content: space-between; }
.brand { display: flex; gap: 10px; align-items: center; font-size: 17px; font-weight: 800; letter-spacing: .09em; }
.brand img { width: 30px; height: 30px; padding: 3px; background: white; border-radius: 6px; }
main { padding: 32px 0 50px; }
.hero {
  min-height: 148px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 30px 34px;
  margin-bottom: 22px;
  border-radius: 16px;
  color: white;
  background: #093859;
  background-image: linear-gradient(90deg, #052e50 1%, #06365bea 40%, #08385840 100%), url('/assets/cold-chain-banner.png');
  background-size: cover;
  background-position: center, center 48%;
}
h1 { margin: 0; font-size: clamp(25px, 4vw, 38px); letter-spacing: .025em; }
h2 { margin: 0; font-size: 19px; }
.hero p { margin: 12px 0 0; color: #ebf5fd; font-size: 14px; }
.panel { border: 1px solid #dae5ef; border-radius: 13px; background: white; }
.login { padding: 24px; max-width: 520px; }
.login-controls, .toolbar, .panel-heading { display: flex; align-items: center; gap: 12px; }
.login-controls { margin-top: 12px; }
input, button, select { font: inherit; min-height: 40px; padding: 8px 12px; border-radius: 7px; }
input, select { border: 1px solid #aebfd0; background: white; color: #132e47; }
input { flex: 1; min-width: 0; }
button { border: 1px solid transparent; background: #0862a9; color: white; font-weight: 650; cursor: pointer; white-space: nowrap; }
button:disabled { opacity: .65; cursor: wait; }
button.secondary { border-color: #c6d5e3; color: #134f7b; background: white; }
:focus-visible { outline: 3px solid #4ca5ea; outline-offset: 3px; }
.toolbar { margin: 0 0 18px; flex-wrap: wrap; }
.toolbar label, .panel-heading label { display: flex; align-items: center; gap: 9px; color: #475d72; font-size: 14px; }
.toolbar select { max-width: 55vw; }
.toolbar .secondary { margin-left: auto; }
.connection { border-radius: 20px; padding: 5px 10px; font-size: 13px; background: #e5ecf4; color: #374e65; }
.connection[data-fresh="true"] { background: #e0f4ed; color: #056144; }
.metrics { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; margin: 0 0 18px; }
.metrics .panel { padding: 16px 20px; }
dt { color: #485f75; font-size: 14px; }
.metrics dd { margin: 10px 0 0; font-weight: 750; font-size: clamp(18px, 2.6vw, 28px); font-variant-numeric: tabular-nums; }
.notice, .trend, .detail { padding: 20px; }
.notice, #login-status { color: #84401d; }
.notice { margin: 0 0 18px; }
.panel-heading { justify-content: space-between; flex-wrap: wrap; }
.panel-heading h2 span { color: #4a6077; font-weight: 500; font-size: 14px; }
canvas { width: 100%; height: 240px; display: block; margin-top: 14px; }
.chart-summary { color: #526a80; margin: 13px 0 0; font-size: 14px; }
.detail { margin-top: 18px; }
.detail dl { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px 22px; margin-bottom: 0; }
.detail dd { margin: 7px 0 0; overflow-wrap: anywhere; }
@media (max-width: 610px) {
  .topbar-inner, main { width: calc(100% - 28px); }
  main { padding-top: 19px; }
  .hero { padding: 22px; min-height: 122px; }
  .metrics, .detail dl { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .panel, .metrics .panel { padding: 14px; }
  canvas { height: 195px; }
}
