:root {
  color-scheme: light;
  --bg: #f5f5f7;
  --surface: rgba(255, 255, 255, 0.92);
  --surface-solid: #ffffff;
  --text: #1d1d1f;
  --muted: #6e6e73;
  --line: rgba(0, 0, 0, 0.09);
  --blue: #0071e3;
  --blue-hover: #0077ed;
  --purple: #7c5cff;
  --cyan: #4cc9f0;
  --green: #1f9d62;
  --orange: #d97706;
  --red: #d92d20;
  --radius-xl: 28px;
  --radius-lg: 20px;
  --radius-md: 14px;
  --shadow: 0 12px 34px rgba(0, 0, 0, 0.07);
  --shadow-hover: 0 20px 48px rgba(0, 0, 0, 0.11);
}

* { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  background: var(--bg);
}

body {
  margin: 0;
  min-width: 320px;
  color: var(--text);
  background:
    radial-gradient(circle at 10% 4%, rgba(124, 92, 255, 0.09), transparent 24rem),
    radial-gradient(circle at 92% 12%, rgba(76, 201, 240, 0.11), transparent 26rem),
    var(--bg);
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "SF Pro Text",
    "PingFang SC", "Microsoft YaHei", "Segoe UI", sans-serif;
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

a { color: inherit; }
button, input, textarea, select { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }

.skip-link {
  position: fixed;
  z-index: 1000;
  top: 10px;
  left: 10px;
  padding: 10px 14px;
  border-radius: 10px;
  color: #fff;
  background: var(--blue);
  transform: translateY(-150%);
}

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

.shell {
  width: min(1180px, calc(100% - 40px));
  margin: 0 auto;
}

.topbar {
  position: sticky;
  z-index: 50;
  top: 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 64px;
  margin: 12px 0 34px;
  padding: 10px 14px 10px 16px;
  border: 1px solid rgba(255, 255, 255, 0.86);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.78);
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.055);
  backdrop-filter: blur(22px) saturate(170%);
}

.brand {
  display: inline-flex;
  gap: 10px;
  align-items: center;
  color: var(--text);
  font-weight: 700;
  letter-spacing: -0.02em;
  text-decoration: none;
  white-space: nowrap;
}

.brand-mark {
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  border-radius: 12px;
  color: white;
  background: linear-gradient(145deg, #111827 0%, #4f46e5 55%, #22d3ee 130%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.35), 0 7px 16px rgba(79, 70, 229, 0.22);
  font-size: 15px;
  font-weight: 800;
}

.nav {
  display: flex;
  gap: 3px;
  align-items: center;
}

.nav a {
  min-height: 40px;
  padding: 9px 12px;
  border-radius: 11px;
  color: var(--muted);
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  transition: color 160ms ease, background 160ms ease;
}

.nav a:hover { color: var(--text); background: rgba(0, 0, 0, 0.045); }
.nav a[aria-current="page"] { color: var(--text); background: #fff; box-shadow: 0 2px 10px rgba(0, 0, 0, 0.06); }

.hero {
  position: relative;
  isolation: isolate;
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(310px, 0.75fr);
  gap: 44px;
  align-items: center;
  min-height: 430px;
  overflow: hidden;
  padding: 64px;
  border: 1px solid rgba(255, 255, 255, 0.9);
  border-radius: var(--radius-xl);
  background:
    linear-gradient(135deg, rgba(255,255,255,.98), rgba(255,255,255,.80)),
    linear-gradient(135deg, #fff, #eef4ff);
  box-shadow: var(--shadow);
}

.hero::before {
  position: absolute;
  z-index: -1;
  width: 380px;
  height: 380px;
  right: -90px;
  top: -130px;
  border-radius: 50%;
  background: conic-gradient(from 180deg, rgba(0,113,227,.22), rgba(124,92,255,.18), rgba(76,201,240,.24), rgba(0,113,227,.22));
  filter: blur(16px);
  content: "";
}

.hero::after {
  position: absolute;
  z-index: -1;
  inset: 0;
  opacity: .22;
  background-image: radial-gradient(rgba(0, 113, 227, .28) 1px, transparent 1px);
  background-size: 22px 22px;
  mask-image: linear-gradient(to left, #000, transparent 58%);
  content: "";
}

.hero.compact {
  grid-template-columns: 1fr;
  min-height: 260px;
  padding-block: 48px;
}

.eyebrow {
  margin: 0 0 14px;
  color: var(--purple);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: .16em;
  text-transform: uppercase;
}

h1, h2, h3, p { overflow-wrap: anywhere; }
h1, h2, h3 { letter-spacing: -0.035em; }

h1 {
  max-width: 780px;
  margin: 0;
  font-size: clamp(42px, 6vw, 72px);
  line-height: 1.04;
  font-weight: 750;
}

h2 { font-size: clamp(26px, 3vw, 38px); line-height: 1.15; }
h3 { font-size: 21px; line-height: 1.25; }

.lead {
  max-width: 720px;
  margin: 24px 0 0;
  color: var(--muted);
  font-size: clamp(17px, 2vw, 21px);
  line-height: 1.65;
}

.ai-chip {
  display: inline-flex;
  gap: 7px;
  align-items: center;
  margin-top: 24px;
  padding: 8px 11px;
  border: 1px solid rgba(124, 92, 255, .16);
  border-radius: 999px;
  color: #5b46d6;
  background: rgba(124, 92, 255, .07);
  font-size: 13px;
  font-weight: 700;
}

.ai-chip::before {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--purple), var(--cyan));
  box-shadow: 0 0 0 5px rgba(124, 92, 255, .08);
  content: "";
}

.hero-status {
  padding: 24px;
  border: 1px solid rgba(0, 0, 0, 0.075);
  border-radius: var(--radius-lg);
  background: rgba(255, 255, 255, .8);
  box-shadow: 0 12px 30px rgba(0,0,0,.06);
}

.status-line, .status-main, .section-head, .actions, .request-head {
  display: flex;
  align-items: center;
}

.status-line, .section-head, .request-head { justify-content: space-between; gap: 18px; }
.status-main { gap: 9px; font-weight: 700; }

.dot {
  display: inline-block;
  width: 9px;
  height: 9px;
  flex: 0 0 auto;
  border-radius: 50%;
  background: #a1a1aa;
  box-shadow: 0 0 0 5px rgba(161,161,170,.12);
}
.dot.operational, .dot.success { background: var(--green); box-shadow: 0 0 0 5px rgba(31,157,98,.11); }
.dot.degraded, .dot.pending { background: var(--orange); box-shadow: 0 0 0 5px rgba(217,119,6,.11); }
.dot.outage, .dot.down, .dot.failed { background: var(--red); box-shadow: 0 0 0 5px rgba(217,45,32,.1); }

.mini-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin-top: 20px;
}

.mini-stat {
  padding: 16px 10px;
  border-radius: 15px;
  background: #f7f7f9;
  text-align: center;
}

.mini-stat strong { display: block; font-size: 24px; font-variant-numeric: tabular-nums; }
.mini-stat span { display: block; margin-top: 3px; color: var(--muted); font-size: 12px; }

.section { padding: 74px 0 0; }
.section-head { align-items: end; margin-bottom: 24px; }
.section-head h2 { margin: 0; }
.section-head p { max-width: 600px; margin: 7px 0 0; color: var(--muted); }

.grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

.card, .panel {
  border: 1px solid var(--line);
  background: var(--surface);
  box-shadow: 0 8px 28px rgba(0, 0, 0, .045);
}

.card {
  position: relative;
  min-height: 245px;
  padding: 26px;
  border-radius: var(--radius-lg);
  transition: transform 220ms ease, box-shadow 220ms ease, border-color 220ms ease;
}

.card:hover { transform: translateY(-4px); border-color: rgba(0,113,227,.2); box-shadow: var(--shadow-hover); }
.card h3 { margin: 30px 0 9px; }
.card p { margin: 0; color: var(--muted); }

.card-icon, .file-icon {
  display: grid;
  place-items: center;
  color: #fff;
  background: linear-gradient(145deg, #111827, var(--blue));
  box-shadow: 0 8px 18px rgba(0,113,227,.18);
  font-weight: 800;
}

.card-icon { width: 42px; height: 42px; border-radius: 13px; font-size: 13px; }

.card-link {
  display: inline-flex;
  margin-top: 22px;
  color: var(--blue);
  font-size: 14px;
  font-weight: 700;
  text-decoration: none;
}
.card-link:hover { color: var(--blue-hover); }

.panel { padding: 28px; border-radius: var(--radius-lg); }
.panel h2:first-child { margin-top: 0; }

.two-column {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(300px, .85fr);
  gap: 18px;
  align-items: start;
}

.service-list, .report-list, .request-list, .result-list, .file-list { display: grid; gap: 10px; }

.service-row, .report-row, .result-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  gap: 16px;
  align-items: center;
  min-height: 58px;
  padding: 13px 15px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: rgba(248, 248, 250, .85);
}

.service-name { display: flex; gap: 11px; align-items: center; font-weight: 650; }
.latency { min-width: 72px; text-align: right; font-variant-numeric: tabular-nums; }
.muted { color: var(--muted); }

.badge {
  display: inline-flex;
  align-items: center;
  min-height: 27px;
  padding: 4px 9px;
  border-radius: 999px;
  color: #52525b;
  background: #ececf0;
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
}
.badge.operational, .badge.success, .badge.resolved { color: #137149; background: #e8f7ef; }
.badge.degraded, .badge.pending, .badge.processing, .badge.not_run { color: #995b04; background: #fff4dc; }
.badge.outage, .badge.down, .badge.failed, .badge.rejected { color: #b42318; background: #feeceb; }

.button {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 17px;
  border: 0;
  border-radius: 12px;
  color: #fff;
  background: var(--blue);
  box-shadow: 0 6px 16px rgba(0,113,227,.18);
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
  transition: transform 150ms ease, background 150ms ease, opacity 150ms ease;
}
.button:hover { background: var(--blue-hover); transform: translateY(-1px); }
.button.secondary { color: var(--text); background: #eeeef0; box-shadow: none; }
.button.secondary:hover { background: #e5e5e8; }
.button.danger { background: var(--red); box-shadow: 0 6px 16px rgba(217,45,32,.15); }
.button:disabled { opacity: .48; cursor: not-allowed; transform: none; }

.actions { flex-wrap: wrap; gap: 10px; }
.form-grid { display: grid; gap: 18px; }
.field { display: grid; gap: 7px; }
.field label { color: #424245; font-size: 14px; font-weight: 700; }

.input, .textarea, .select {
  width: 100%;
  border: 1px solid rgba(0,0,0,.14);
  border-radius: 12px;
  color: var(--text);
  background: #fff;
  outline: none;
  transition: border 150ms ease, box-shadow 150ms ease;
}
.input, .select { min-height: 48px; padding: 10px 13px; }
.textarea { min-height: 156px; padding: 13px; resize: vertical; }
.input:focus, .textarea:focus, .select:focus { border-color: var(--blue); box-shadow: 0 0 0 4px rgba(0,113,227,.11); }

.message {
  padding: 12px 14px;
  border-radius: 12px;
  color: #52525b;
  background: #f0f0f3;
  font-size: 14px;
}
.message.success { color: #137149; background: #e8f7ef; }
.message.error { color: #b42318; background: #feeceb; }
.hidden { display: none !important; }

.code, .hash {
  overflow-wrap: anywhere;
  color: #3f3f46;
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  font-size: 12px;
}
.code { padding: 12px 14px; border-radius: 12px; background: #f2f2f5; }
.hash { margin-top: 10px; }

.file-row {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 16px;
  align-items: center;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 17px;
  background: #fff;
  box-shadow: 0 6px 20px rgba(0,0,0,.04);
}

.file-icon { width: 48px; height: 48px; border-radius: 14px; font-size: 12px; text-transform: uppercase; }
.file-info h3 { margin: 0 0 4px; font-size: 17px; }
.file-info p { margin: 0; color: var(--muted); font-size: 14px; }
.file-meta { display: flex; flex-wrap: wrap; gap: 7px 16px; margin-top: 7px; color: var(--muted); font-size: 12px; }

.upload-drop {
  padding: 24px;
  border: 1px dashed rgba(0,113,227,.35);
  border-radius: 17px;
  background: rgba(0,113,227,.035);
}
.upload-drop input[type="file"] { width: 100%; }

.progress {
  overflow: hidden;
  height: 10px;
  border-radius: 999px;
  background: #e8e8ec;
}
.progress-bar {
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--blue), var(--purple), var(--cyan));
  transition: width 220ms ease;
}
.progress-meta { display: flex; justify-content: space-between; gap: 12px; color: var(--muted); font-size: 13px; }
.upload-progress {
  display: grid;
  gap: 10px;
  padding: 16px;
  border: 1px solid rgba(0, 113, 227, .14);
  border-radius: 16px;
  background: linear-gradient(135deg, rgba(0, 113, 227, .055), rgba(123, 97, 255, .055));
}
.upload-progress .progress { height: 12px; box-shadow: inset 0 1px 2px rgba(0, 0, 0, .06); }
.upload-progress .progress-bar { box-shadow: 0 0 16px rgba(0, 113, 227, .28); }
.upload-progress .progress-meta strong { color: var(--blue); font-variant-numeric: tabular-nums; }
.progress-details {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  color: var(--muted);
  font-size: 12px;
}
.progress-details span:first-child { min-width: 0; overflow-wrap: anywhere; }
.progress-details span:last-child { flex: 0 0 auto; text-align: right; font-variant-numeric: tabular-nums; }
.upload-progress .button { justify-self: start; padding: 8px 14px; min-height: 38px; }

.result-row { grid-template-columns: minmax(0, 1fr) auto; }
.result-row strong { font-family: "SFMono-Regular", Consolas, monospace; font-size: 13px; }

.request-row {
  display: grid;
  gap: 14px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 17px;
  background: #fff;
}
.request-detail { display: flex; flex-wrap: wrap; gap: 8px 18px; color: var(--muted); font-size: 13px; }

.footer {
  display: flex;
  justify-content: center;
  padding: 56px 0 30px;
  color: var(--muted);
  font-size: 13px;
}
.footer a { text-decoration: none; }
.footer a:hover { color: var(--text); }

:focus-visible { outline: 3px solid rgba(0,113,227,.32); outline-offset: 3px; }

@media (max-width: 900px) {
  .hero { grid-template-columns: 1fr; min-height: 0; padding: 44px; }
  .grid { grid-template-columns: repeat(2, 1fr); }
  .two-column { grid-template-columns: 1fr; }
}

@media (max-width: 650px) {
  .shell { width: min(100% - 24px, 1180px); }
  .topbar { position: relative; top: 0; align-items: flex-start; flex-direction: column; gap: 8px; margin-bottom: 22px; }
  .nav { width: 100%; overflow-x: auto; padding-bottom: 1px; }
  .nav a { flex: 0 0 auto; }
  .hero, .hero.compact { padding: 32px 24px; border-radius: 22px; }
  h1 { font-size: clamp(38px, 13vw, 54px); }
  .lead { font-size: 17px; }
  .grid { grid-template-columns: 1fr; }
  .section { padding-top: 52px; }
  .section-head { align-items: flex-start; flex-direction: column; }
  .panel { padding: 20px; }
  .mini-stats { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .mini-stat { padding-inline: 5px; }
  .mini-stat strong { font-size: 20px; }
  .service-row { grid-template-columns: minmax(0, 1fr) auto; }
  .latency { display: none; }
  .file-row { grid-template-columns: auto minmax(0, 1fr); }
  .file-actions { grid-column: 1 / -1; }
  .file-actions .button { width: 100%; }
  .status-line, .request-head { align-items: flex-start; flex-direction: column; }
}

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