:root {
  color-scheme: light;
  --bg: #f4f7fc;
  --surface: #fff;
  --ink: #14213b;
  --muted: #4c5c74;
  --line: #dce5f1;
  --blue: #1e40af;
  --hover: #edf3fd;
  --focus: #235ac5;
  --radius: 16px;
  --mono: "Fira Code", ui-monospace, SFMono-Regular, Consolas, monospace;
  font: 100%/1.5 "Fira Sans", Inter, system-ui, -apple-system, "PingFang SC", "Microsoft YaHei", sans-serif;
  color: var(--ink);
  background: var(--bg);
}

*, *::before, *::after { box-sizing: border-box; }
body { margin: 0; min-height: 100vh; }
[hidden] { display: none !important; }
h1, h2, h3, p, dl, dd { margin: 0; }
h1, h2, h3 { text-wrap: balance; }
a { color: inherit; }
button, input, select { font: inherit; }
button, summary, select { cursor: pointer; touch-action: manipulation; }
button:disabled { cursor: wait; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; }
#overview, #deployments { scroll-margin-top: 20px; }

.sr-only, .skip:not(:focus) {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}
.skip:focus { position: absolute; z-index: 4; left: 16px; top: 10px; padding: 8px 14px; background: white; }

.topbar { background: white; border-bottom: 1px solid var(--line); }
.topbar-inner, .shell { max-width: 1232px; margin-inline: auto; padding-inline: 32px; }
.topbar-inner { display: flex; align-items: center; gap: 34px; min-height: 72px; }
.brand { display: inline-flex; align-items: center; gap: 11px; color: var(--ink); text-decoration: none; font-size: 1.2rem; font-weight: 780; letter-spacing: -.03em; }
.brand-mark { display: inline-grid; place-items: center; width: 31px; height: 31px; background: #193d98; border-radius: 9px; }
.brand-mark::before { content: ""; height: 13px; width: 13px; border: 2px solid #fff; transform: rotate(45deg); border-radius: 3px; }
nav { display: flex; align-items: center; gap: 8px; }
nav a { display: inline-flex; align-items: center; min-height: 44px; padding: 0 12px; color: var(--muted); text-decoration: none; border-radius: 8px; font-size: .9rem; }
nav a:hover, .brand:hover { color: var(--blue); }
nav a:hover { background: var(--hover); }
.workspace { margin-left: auto; padding: 5px 11px; color: #264785; background: #eef4ff; border: 1px solid #dce8fc; border-radius: 30px; white-space: nowrap; font-size: .8125rem; }

.shell { padding-top: 32px; }
.hero { position: relative; isolation: isolate; overflow: hidden; min-height: 270px; display: flex; align-items: center; padding: 36px 44px; border-radius: 22px; background: linear-gradient(105deg, #132952, #163470 62%, #214999); color: white; }
.hero-content { z-index: 1; }
.hero h1 { font-size: clamp(2.1rem, 3.2vw, 3.05rem); line-height: 1.18; letter-spacing: .01em; }
.hero p { margin-block: 12px 25px; color: #dce8ff; }
.hero-art { position: absolute; inset: 0 0 0 auto; width: min(57%, 660px); opacity: .8; pointer-events: none; }
.hero-art::before { position: absolute; inset: 0; content: ""; background: linear-gradient(#85a8ff18 1px, transparent 1px), linear-gradient(90deg, #85a8ff18 1px, transparent 1px); background-size: 32px 32px; mask-image: radial-gradient(ellipse at 63% 55%, #000, transparent 72%); }
.orbit { position: absolute; top: 51%; left: 64%; width: var(--diameter); aspect-ratio: 1; border-radius: 36%; border: 1px solid #9db8ff50; transform: translate(-50%, -50%) rotate(37deg); }
.orbit-one { --diameter: 120px; background: #729cff23; border-color: #9db8ff98; }
.orbit-two { --diameter: 195px; }
.orbit-three { --diameter: 270px; }
.orbit-four { --diameter: 345px; }
.orbit-point { position: absolute; width: 8px; height: 8px; background: #a7c7ff; box-shadow: 0 0 22px #81adff; border-radius: 50%; }
.point-one { top: 18%; left: 69%; }
.point-two { top: 64%; left: 47%; width: 5px; height: 5px; }
.point-three { top: 73%; left: 83%; width: 6px; height: 6px; }

.button { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 8px 16px; border: 1px solid transparent; border-radius: 9px; font-weight: 680; }
.hero-button { background: #f8fbff; color: #183966; }
.hero-button:hover { background: #e0edff; }
.hero-button:focus-visible { outline-color: #e5eeff; }
.hero-button span { font-size: 1.3rem; line-height: 1; }
.primary { background: var(--blue); color: white; }
.primary:hover { background: #163285; }
.secondary { background: white; color: var(--ink); border-color: #b7c8df; }
.secondary:hover { background: var(--hover); }

.metrics { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; margin-block: 20px 30px; }
.stat { padding: 18px 22px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); }
.stat dt { color: var(--muted); display: flex; align-items: center; gap: 7px; font-size: .9375rem; }
.stat dd { margin-top: 5px; font: 650 1.9rem/1.25 var(--mono); font-variant-numeric: tabular-nums; }
.metric-dot { width: 8px; height: 8px; border-radius: 50%; }
.metric-dot.success { background: #19835a; }
.metric-dot.running { background: #c87b11; }
.metric-dot.failed { background: #c64747; }

.panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); }
.section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; flex-wrap: wrap; padding: 22px 24px 12px; }
.section-head h2, dialog h2 { font-size: 1.35rem; }
#result-count { color: var(--muted); font-size: .875rem; font-variant-numeric: tabular-nums; }
.toolbar { display: flex; gap: 10px; padding: 4px 24px 17px; overflow: hidden; }
.search { position: relative; display: block; min-width: 0; width: min(100%, 310px); }
.search input, dialog input, dialog select { width: 100%; min-height: 44px; border: 1px solid #b7c8df; border-radius: 9px; background-color: white; color: var(--ink); padding: 8px 12px; }
.search input { padding-left: 37px; }
::placeholder { color: #526580; }
.search-icon { position: absolute; top: 14px; left: 14px; width: 13px; height: 13px; border-radius: 50%; border: 1.7px solid #4e6281; pointer-events: none; }
.search-icon::after { content: ""; position: absolute; width: 6px; height: 2px; left: 8px; top: 10px; background: #4e6281; transform: rotate(45deg); }
.status-filter { position: relative; }
.status-filter summary { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-width: 116px; min-height: 44px; padding: 8px 12px; border: 1px solid #b7c8df; border-radius: 9px; white-space: nowrap; list-style: none; }
.status-filter summary::-webkit-details-marker { display: none; }
.status-filter summary:hover, .status-filter[open] summary { background: var(--hover); }
.chevron { width: 7px; height: 7px; border: solid var(--muted); border-width: 0 1.5px 1.5px 0; transform: translateY(-2px) rotate(45deg); }
.status-options { position: absolute; z-index: 2; right: 0; top: calc(100% + 6px); min-width: 146px; margin: 0; padding: 5px; border: 1px solid var(--line); border-radius: 10px; background: white; box-shadow: 0 9px 24px #152b5222; }
.status-options label { display: flex; align-items: center; gap: 9px; min-height: 44px; border-radius: 6px; padding: 6px 9px; cursor: pointer; white-space: nowrap; }
.status-options label:hover, .status-options label:has(:checked) { background: var(--hover); }
.status-options input { margin: 0; accent-color: var(--blue); }

.table-wrap { overflow-x: auto; border-radius: 0 0 var(--radius) var(--radius); }
table { width: 100%; table-layout: fixed; border-collapse: collapse; text-align: left; }
th, td { padding: 12px 16px; }
th:first-child, td:first-child { padding-left: 24px; width: 35%; }
th:last-child, td:last-child { padding-right: 24px; width: 17%; text-align: right; }
th:nth-child(2) { width: 16%; }
th:nth-child(3) { width: 13%; }
th { background: #f1f5fb; color: #405371; font-size: .875rem; font-weight: 650; }
td { border-top: 1px solid var(--line); }
tr:hover td { background: #f9fbff; }
.project-name { display: block; color: var(--ink); font-weight: 690; white-space: nowrap; overflow: hidden; }
.project-code { display: block; color: var(--muted); font: .8125rem/1.5 var(--mono); }
time, .environment { color: var(--muted); font-size: .875rem; }
time { white-space: nowrap; font-variant-numeric: tabular-nums; }
.status { display: inline-flex; align-items: center; gap: 6px; padding: 3px 9px; border-radius: 18px; font-size: .875rem; white-space: nowrap; }
.status::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.status.success { color: #15583d; background: #e7f6ed; }
.status.running { color: #754506; background: #fff1d7; }
.status.failed { color: #9e3037; background: #fcebed; }
.detail-button { min-height: 44px; color: var(--blue); border: 0; border-radius: 8px; padding-inline: 8px; background: transparent; font-size: .875rem; font-weight: 680; white-space: nowrap; }
.detail-button:hover { color: #102b7e; background: var(--hover); }
.empty { padding: 42px 18px; text-align: center; border-top: 1px solid var(--line); }
.empty p { margin: 8px 0 18px; color: var(--muted); }
footer { padding: 23px 0 32px; color: var(--muted); font-size: .875rem; }

dialog { position: fixed; inset: 0; width: min(100% - 32px, 470px); max-height: calc(100dvh - 32px); overscroll-behavior: contain; border: 1px solid #dbe5f4; border-radius: 16px; padding: 25px; color: var(--ink); box-shadow: 0 16px 70px #1123413b; }
dialog::backdrop { background: #122143a3; }
.dialog-copy { margin: 6px 0 20px; color: var(--muted); }
.field { display: block; margin: 14px 0 6px; font-size: .9375rem; font-weight: 650; }
dialog select { appearance: none; padding-right: 30px; background-image: linear-gradient(45deg, transparent 50%, #4c5c74 50%), linear-gradient(135deg, #4c5c74 50%, transparent 50%); background-position: right 17px center, right 12px center; background-size: 5px 5px; background-repeat: no-repeat; }
.field-error { color: #a02731; font-size: .875rem; margin-top: 6px; }
input[aria-invalid="true"] { border-color: #aa2632; }
.dialog-actions { display: flex; justify-content: flex-end; gap: 10px; flex-wrap: wrap; margin-top: 23px; }
.detail-project { margin: 10px 0 16px; font-weight: 720; overflow-wrap: anywhere; }
.detail-fields { display: grid; grid-template-columns: max-content minmax(0, 1fr); gap: 9px 14px; }
.detail-fields dt { color: var(--muted); }
.detail-fields dd { overflow-wrap: anywhere; }
.toast { width: fit-content; margin: 0 0 24px; padding: 12px 15px; border: 1px solid #b8dfc7; border-radius: 9px; background: #e7f6ed; color: #15583d; }

@media (max-width: 900px) {
  .table-wrap table { min-width: 690px; }
  .hero { padding-inline: 28px; }
}
@media (max-width: 640px) {
  .topbar-inner, .shell { padding-inline: 16px; }
  .topbar-inner { flex-wrap: wrap; gap: 0 9px; padding-block: 8px; }
  .workspace { order: 1; }
  nav { order: 2; width: 100%; }
  nav a:first-child { padding-left: 0; }
  .hero-art { opacity: .3; }
  .metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .stat, .section-head { padding-inline: 14px; }
  .toolbar { padding-inline: 14px; }
}
