:root {
  --bg: #f5f7fb;
  --surface: #ffffff;
  --surface-soft: #f8fafc;
  --text: #142033;
  --muted: #667085;
  --muted-light: #667085;
  --line: #e7ebf1;
  --primary: #275efe;
  --primary-dark: #1849d6;
  --primary-soft: #edf2ff;
  --green: #0b744b;
  --green-soft: #e9f8f1;
  --green-line: #c7ecdc;
  --red: #b72839;
  --red-soft: #fff0f1;
  --red-line: #f6ced3;
  --gray: #596273;
  --gray-soft: #f1f3f6;
  --gray-line: #dde1e7;
  --shadow-sm: 0 1px 2px rgb(16 24 40 / 4%), 0 5px 16px rgb(16 24 40 / 4%);
  --shadow-md: 0 20px 50px rgb(34 49 80 / 9%);
  --radius-lg: 20px;
  --radius-md: 14px;
  --shell: 1120px;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  background: var(--bg);
  color: var(--text);
  font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

body {
  min-height: 100vh;
  margin: 0;
  background:
    radial-gradient(circle at 72% 4%, rgb(69 123 255 / 9%), transparent 31rem),
    linear-gradient(180deg, #f9fbff 0, var(--bg) 31rem);
}

button,
input {
  font: inherit;
}

button {
  -webkit-tap-highlight-color: transparent;
}

.page-shell {
  width: min(calc(100% - 48px), var(--shell));
  margin-inline: auto;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: fixed;
  z-index: 100;
  top: 10px;
  left: 10px;
  padding: 10px 14px;
  border-radius: 8px;
  color: #fff;
  background: var(--primary-dark);
  text-decoration: none;
  transform: translateY(-160%);
  transition: transform 160ms ease;
}

.skip-link:focus {
  transform: translateY(0);
}

.site-header {
  height: 72px;
  border-bottom: 1px solid rgb(218 224 235 / 78%);
  background: rgb(250 252 255 / 82%);
  backdrop-filter: blur(14px);
}

.header-inner {
  display: flex;
  height: 100%;
  align-items: center;
  justify-content: space-between;
}

.brand {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  gap: 11px;
  color: var(--text);
  text-decoration: none;
}

.brand-mark {
  display: inline-flex;
  width: 35px;
  height: 35px;
  align-items: flex-end;
  justify-content: center;
  gap: 3px;
  padding: 8px;
  border-radius: 11px;
  background: linear-gradient(145deg, #3b73ff, #1d4ed8);
  box-shadow: 0 7px 18px rgb(39 94 254 / 23%);
}

.brand-mark span {
  width: 4px;
  border-radius: 4px;
  background: #fff;
}

.brand-mark span:nth-child(1) {
  height: 7px;
  opacity: 0.65;
}

.brand-mark span:nth-child(2) {
  height: 12px;
  opacity: 0.82;
}

.brand-mark span:nth-child(3) {
  height: 17px;
}

.brand-name {
  font-size: 16px;
  font-weight: 720;
  letter-spacing: 0.02em;
}

.header-label {
  color: #667085;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.14em;
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 48px;
  align-items: end;
  padding: 72px 0 38px;
}

.eyebrow {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 14px;
  color: var(--primary);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.04em;
}

.eyebrow span {
  width: 8px;
  height: 8px;
  border: 2px solid #fff;
  border-radius: 50%;
  background: var(--primary);
  box-shadow: 0 0 0 3px rgb(39 94 254 / 14%);
}

.hero h1 {
  max-width: 650px;
  margin: 0;
  color: #122039;
  font-size: clamp(34px, 5vw, 54px);
  font-weight: 760;
  letter-spacing: -0.045em;
  line-height: 1.12;
}

.hero-description {
  max-width: 650px;
  margin: 20px 0 0;
  color: var(--muted);
  font-size: 16px;
  line-height: 1.85;
}

.refresh-panel {
  display: flex;
  min-width: 248px;
  flex-direction: column;
  align-items: flex-end;
  gap: 14px;
}

.refresh-meta {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 4px;
  color: var(--muted-light);
  font-size: 13px;
  line-height: 1.4;
}

.refresh-meta time {
  color: #475467;
  font-size: 14px;
  font-variant-numeric: tabular-nums;
  font-weight: 650;
}

.refresh-button,
.secondary-button {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  justify-content: center;
  gap: 9px;
  padding: 0 17px;
  border: 1px solid transparent;
  border-radius: 11px;
  color: #fff;
  background: var(--primary);
  box-shadow: 0 8px 20px rgb(39 94 254 / 18%);
  cursor: pointer;
  font-size: 14px;
  font-weight: 680;
  transition: background-color 160ms ease, box-shadow 160ms ease, transform 160ms ease;
}

.refresh-button:hover:not(:disabled) {
  background: var(--primary-dark);
  box-shadow: 0 10px 24px rgb(39 94 254 / 25%);
  transform: translateY(-1px);
}

.refresh-button:active:not(:disabled) {
  transform: translateY(0);
}

.refresh-button:disabled {
  cursor: wait;
  opacity: 0.72;
}

.refresh-icon {
  position: relative;
  width: 15px;
  height: 15px;
  border: 2px solid currentColor;
  border-left-color: transparent;
  border-radius: 50%;
}

.refresh-icon::after {
  position: absolute;
  right: -3px;
  bottom: -1px;
  width: 5px;
  height: 5px;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  content: "";
  transform: rotate(13deg);
}

.refresh-button.is-loading .refresh-icon {
  animation: spin 800ms linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

.statistics {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  margin-bottom: 32px;
}

.stat-card {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 16px;
  padding: 21px 22px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: rgb(255 255 255 / 88%);
  box-shadow: var(--shadow-sm);
}

.stat-icon {
  position: relative;
  display: grid;
  width: 42px;
  height: 42px;
  flex: 0 0 auto;
  place-items: center;
  border-radius: 12px;
}

.stat-icon::before,
.stat-icon::after {
  position: absolute;
  content: "";
}

.stat-total .stat-icon {
  background: var(--primary-soft);
}

.stat-total .stat-icon::before {
  width: 17px;
  height: 17px;
  border: 2px solid var(--primary);
  border-radius: 5px;
}

.stat-total .stat-icon::after {
  width: 5px;
  height: 5px;
  border-radius: 2px;
  background: var(--primary);
}

.stat-normal .stat-icon {
  background: var(--green-soft);
}

.stat-normal .stat-icon::before {
  width: 18px;
  height: 10px;
  border-bottom: 2px solid var(--green);
  border-left: 2px solid var(--green);
  transform: translateY(-2px) rotate(-45deg);
}

.stat-abnormal .stat-icon {
  background: var(--red-soft);
}

.stat-abnormal .stat-icon::before,
.stat-abnormal .stat-icon::after {
  width: 2px;
  height: 20px;
  border-radius: 2px;
  background: var(--red);
}

.stat-abnormal .stat-icon::before {
  transform: rotate(45deg);
}

.stat-abnormal .stat-icon::after {
  transform: rotate(-45deg);
}

.stat-card p {
  margin: 0 0 5px;
  color: var(--muted);
  font-size: 13px;
}

.stat-card strong {
  color: var(--text);
  font-size: 25px;
  font-variant-numeric: tabular-nums;
  font-weight: 750;
  letter-spacing: -0.025em;
}

.stat-normal strong {
  color: var(--green);
}

.stat-abnormal strong {
  color: var(--red);
}

.status-section {
  min-height: 320px;
  padding: 27px;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: rgb(255 255 255 / 92%);
  box-shadow: var(--shadow-md);
}

.section-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 24px;
}

.section-heading h2 {
  margin: 0;
  font-size: 19px;
  font-weight: 730;
  letter-spacing: -0.015em;
}

.section-heading p {
  margin: 6px 0 0;
  color: var(--muted-light);
  font-size: 13px;
}

.search-wrap {
  position: relative;
  width: min(100%, 340px);
  flex: 0 1 340px;
}

.search-wrap input {
  width: 100%;
  min-height: 48px;
  padding: 0 50px 0 42px;
  border: 2px solid #bcc9dc;
  border-radius: 13px;
  outline: none;
  color: var(--text);
  background: #fff;
  box-shadow: 0 4px 14px rgb(34 49 80 / 7%);
  font-size: 16px;
  line-height: 1.4;
  appearance: none;
  -webkit-appearance: none;
  transition: border-color 160ms ease, box-shadow 160ms ease, background-color 160ms ease;
}

.search-wrap input::-webkit-search-cancel-button {
  display: none;
  appearance: none;
  -webkit-appearance: none;
}

.search-wrap input::placeholder {
  color: #667085;
  opacity: 1;
}

.search-wrap input:focus {
  border-color: var(--primary);
  background: #fff;
  box-shadow: 0 0 0 4px rgb(39 94 254 / 14%), 0 8px 20px rgb(34 49 80 / 9%);
}

.search-wrap input:focus-visible {
  outline: none;
}

.search-icon {
  position: absolute;
  z-index: 1;
  top: 50%;
  left: 16px;
  width: 14px;
  height: 14px;
  border: 2px solid var(--primary);
  border-radius: 50%;
  pointer-events: none;
  transform: translateY(-57%);
}

.search-icon::after {
  position: absolute;
  right: -5px;
  bottom: -4px;
  width: 6px;
  height: 2px;
  border-radius: 2px;
  background: var(--primary);
  content: "";
  transform: rotate(45deg);
}

.clear-search {
  position: absolute;
  top: 50%;
  right: 0;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 0;
  border-radius: 8px;
  color: #7c8798;
  background: transparent;
  cursor: pointer;
  transform: translateY(-50%);
}

.clear-search:hover {
  color: #344054;
  background: #edf0f5;
}

.clear-search span::before,
.clear-search span::after {
  position: absolute;
  top: 15px;
  left: 21px;
  width: 2px;
  height: 14px;
  border-radius: 2px;
  background: currentColor;
  content: "";
}

.clear-search span::before {
  transform: rotate(45deg);
}

.clear-search span::after {
  transform: rotate(-45deg);
}

.feedback {
  display: flex;
  min-height: 48px;
  align-items: center;
  gap: 11px;
  margin: -4px 0 20px;
  padding: 11px 13px;
  border: 1px solid #dbe5ff;
  border-radius: 11px;
  color: #34519d;
  background: #f2f6ff;
  font-size: 13px;
}

.feedback[hidden] {
  display: none;
}

.feedback p {
  flex: 1;
  margin: 0;
  line-height: 1.5;
}

.feedback-error {
  border-color: var(--red-line);
  color: #a72e3c;
  background: var(--red-soft);
}

.feedback-icon {
  position: relative;
  width: 20px;
  height: 20px;
  flex: 0 0 auto;
  border: 2px solid currentColor;
  border-radius: 50%;
}

.feedback-icon::before,
.feedback-icon::after {
  position: absolute;
  left: 7px;
  width: 2px;
  border-radius: 2px;
  background: currentColor;
  content: "";
}

.feedback-icon::before {
  top: 4px;
  height: 6px;
}

.feedback-icon::after {
  top: 12px;
  height: 2px;
}

.feedback-retry {
  min-height: 44px;
  padding: 0 12px;
  border: 1px solid rgb(209 58 74 / 35%);
  border-radius: 8px;
  color: #a72e3c;
  background: #fff;
  cursor: pointer;
  font-size: 13px;
  font-weight: 650;
}

.feedback-retry:hover {
  border-color: rgb(209 58 74 / 60%);
  background: #fffafb;
}

.status-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.status-card {
  position: relative;
  min-width: 0;
  min-height: 134px;
  overflow: hidden;
  padding: 19px 20px 20px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--surface);
  transition: border-color 160ms ease, box-shadow 160ms ease, transform 160ms ease;
}

.status-card::before {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
  width: 3px;
  border-radius: 3px 0 0 3px;
  background: var(--gray);
  content: "";
}

.status-card:hover {
  border-color: #d7dde7;
  box-shadow: 0 10px 26px rgb(34 49 80 / 7%);
  transform: translateY(-1px);
}

.status-card.status-normal::before {
  background: var(--green);
}

.status-card.status-abnormal::before {
  background: var(--red);
}

.card-topline {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
}

.status-badge {
  display: inline-flex;
  min-width: 0;
  max-width: 58%;
  min-height: 28px;
  align-items: flex-start;
  gap: 7px;
  padding: 4px 9px;
  border: 1px solid var(--gray-line);
  border-radius: 999px;
  color: var(--gray);
  background: var(--gray-soft);
  font-size: 12px;
  font-weight: 680;
  line-height: 1.4;
}

.status-badge span:last-child {
  min-width: 0;
  overflow-wrap: anywhere;
  white-space: normal;
}

.status-dot {
  width: 7px;
  height: 7px;
  flex: 0 0 auto;
  margin-top: 5px;
  border-radius: 50%;
  background: currentColor;
  box-shadow: 0 0 0 3px rgb(105 115 134 / 12%);
}

.status-normal .status-badge {
  border-color: var(--green-line);
  color: var(--green);
  background: var(--green-soft);
}

.status-normal .status-dot {
  box-shadow: 0 0 0 3px rgb(19 138 91 / 12%);
}

.status-abnormal .status-badge {
  border-color: var(--red-line);
  color: var(--red);
  background: var(--red-soft);
}

.status-abnormal .status-dot {
  box-shadow: 0 0 0 3px rgb(209 58 74 / 12%);
}

.time-wrap {
  display: flex;
  min-width: 0;
  max-width: 42%;
  flex-direction: column;
  align-items: flex-end;
  gap: 3px;
  color: var(--muted-light);
  font-size: 12px;
  line-height: 1.4;
  overflow-wrap: anywhere;
  text-align: right;
  white-space: normal;
}

.check-time {
  max-width: 100%;
  color: #667085;
  font-size: 13px;
  font-variant-numeric: tabular-nums;
  font-weight: 620;
  line-height: 1.4;
  overflow-wrap: anywhere;
  white-space: normal;
}

.status-card h3 {
  display: block;
  margin: 20px 0 0;
  color: #27364d;
  font-size: 15px;
  font-weight: 650;
  letter-spacing: 0.005em;
  line-height: 1.65;
  overflow-wrap: anywhere;
  white-space: normal;
}

.skeleton-card {
  pointer-events: none;
}

.skeleton-card::before {
  background: #e5e9f0;
}

.skeleton-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 24px;
}

.skeleton {
  display: block;
  overflow: hidden;
  border-radius: 7px;
  background: #edf0f4;
}

.skeleton::after {
  display: block;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgb(255 255 255 / 72%), transparent);
  content: "";
  transform: translateX(-100%);
  animation: shimmer 1.35s infinite;
}

.skeleton-badge {
  width: 76px;
  height: 27px;
  border-radius: 999px;
}

.skeleton-time {
  width: 108px;
  height: 12px;
}

.skeleton-title {
  width: 74%;
  height: 13px;
  margin-bottom: 9px;
}

.skeleton-title-short {
  width: 46%;
  margin-bottom: 0;
}

@keyframes shimmer {
  100% {
    transform: translateX(100%);
  }
}

.empty-state {
  display: flex;
  min-height: 270px;
  grid-column: 1 / -1;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 36px 18px;
  text-align: center;
}

.empty-icon {
  position: relative;
  width: 54px;
  height: 54px;
  margin-bottom: 18px;
  border-radius: 17px;
  background: var(--primary-soft);
}

.empty-icon::before {
  position: absolute;
  top: 14px;
  left: 14px;
  width: 18px;
  height: 18px;
  border: 2px solid #6e8ef5;
  border-radius: 50%;
  content: "";
}

.empty-icon::after {
  position: absolute;
  top: 32px;
  left: 32px;
  width: 10px;
  height: 2px;
  border-radius: 2px;
  background: #6e8ef5;
  content: "";
  transform: rotate(45deg);
}

.empty-state h3 {
  margin: 0;
  font-size: 17px;
  font-weight: 700;
}

.empty-state p {
  max-width: 380px;
  margin: 9px 0 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.7;
}

.empty-state .secondary-button {
  min-height: 44px;
  margin-top: 18px;
  padding-inline: 15px;
  box-shadow: none;
}

.site-footer {
  padding: 27px 0 38px;
  color: #667085;
  font-size: 12px;
}

.footer-inner {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
}

.footer-separator {
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: #b1b8c4;
}

.noscript-message {
  position: fixed;
  right: 20px;
  bottom: 20px;
  left: 20px;
  z-index: 50;
  max-width: 620px;
  margin-inline: auto;
  padding: 14px 18px;
  border: 1px solid var(--red-line);
  border-radius: 11px;
  color: #a72e3c;
  background: #fff;
  box-shadow: var(--shadow-md);
  text-align: center;
}

button:focus-visible,
input:focus-visible,
a:focus-visible {
  outline: 3px solid var(--primary);
  outline-offset: 3px;
}

@media (max-width: 760px) {
  .page-shell {
    width: min(calc(100% - 32px), var(--shell));
  }

  .site-header {
    height: 64px;
  }

  .hero {
    grid-template-columns: 1fr;
    gap: 26px;
    align-items: start;
    padding: 48px 0 30px;
  }

  .hero h1 {
    font-size: clamp(29px, 6vw, 38px);
  }

  .hero-description {
    margin-top: 16px;
    font-size: 15px;
    line-height: 1.75;
  }

  .refresh-panel {
    width: 100%;
    min-width: 0;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
  }

  .refresh-meta {
    align-items: flex-start;
  }

  .statistics {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
  }

  .stat-card {
    flex-direction: column;
    align-items: flex-start;
    gap: 13px;
    padding: 17px;
  }

  .stat-icon {
    width: 36px;
    height: 36px;
    border-radius: 10px;
  }

  .stat-card strong {
    font-size: 23px;
  }

  .status-section {
    padding: 20px;
  }

  .section-heading {
    align-items: flex-start;
    flex-direction: column;
    gap: 18px;
  }

  .search-wrap {
    width: 100%;
    flex-basis: auto;
  }

  .status-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 480px) {
  .page-shell {
    width: min(calc(100% - 20px), var(--shell));
  }

  .site-header {
    height: 56px;
  }

  .brand-mark {
    width: 32px;
    height: 32px;
    padding: 7px;
    border-radius: 10px;
  }

  .brand-name {
    font-size: 15px;
  }

  .header-label {
    display: none;
  }

  .hero {
    gap: 14px;
    padding: 24px 0 18px;
  }

  .eyebrow {
    gap: 7px;
    margin-bottom: 8px;
    font-size: 12px;
  }

  .eyebrow span {
    width: 7px;
    height: 7px;
  }

  .hero h1 {
    font-size: 29px;
    letter-spacing: -0.035em;
    line-height: 1.18;
  }

  .hero-description {
    margin-top: 9px;
    font-size: 14px;
    line-height: 1.55;
  }

  .hero-detail {
    display: none;
  }

  .refresh-panel {
    align-items: center;
    flex-direction: row;
    flex-wrap: nowrap;
    gap: 8px;
  }

  .refresh-meta {
    min-width: 0;
    font-size: 12px;
  }

  .refresh-meta time {
    font-size: 13px;
  }

  .refresh-button {
    width: auto;
    min-height: 44px;
    flex: 0 0 auto;
    padding-inline: 13px;
    box-shadow: 0 6px 16px rgb(39 94 254 / 16%);
  }

  .statistics {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
    margin-bottom: 16px;
  }

  .stat-card {
    min-height: 66px;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 3px;
    padding: 8px 4px;
    border-radius: 12px;
    text-align: center;
  }

  .stat-card > div {
    width: 100%;
    min-width: 0;
  }

  .stat-icon {
    display: none;
  }

  .stat-card p {
    margin-bottom: 2px;
    font-size: 12px;
    line-height: 1.25;
    white-space: nowrap;
  }

  .stat-card strong {
    font-size: 22px;
    line-height: 1.1;
  }

  .status-section {
    margin-inline: 0;
    padding: 13px 11px;
    border-radius: 15px;
  }

  .section-heading {
    gap: 11px;
    margin-bottom: 14px;
  }

  .section-heading h2 {
    font-size: 18px;
  }

  .section-heading p {
    margin-top: 4px;
    font-size: 13px;
  }

  .search-wrap {
    order: -1;
  }

  .search-wrap input {
    min-height: 48px;
    font-size: 16px;
  }

  .status-card {
    min-height: 0;
    padding: 15px;
  }

  .card-topline {
    align-items: flex-start;
    flex-direction: row;
    gap: 10px;
  }

  .status-badge {
    max-width: 44%;
    font-size: 13px;
  }

  .time-wrap {
    align-items: flex-end;
    max-width: 56%;
    margin-left: auto;
    font-size: 12px;
    text-align: right;
  }

  .check-time {
    font-size: 14px;
  }

  .status-card h3 {
    margin-top: 12px;
    font-size: 16px;
    line-height: 1.55;
  }

  .status-grid {
    gap: 10px;
  }

  .footer-inner {
    align-items: center;
    flex-direction: column;
    gap: 5px;
    text-align: center;
  }

  .footer-separator {
    display: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
