:root {
  font-family: "Geist", "Inter", "PingFang SC", "Microsoft YaHei", system-ui, sans-serif;
  color: #0a1317; background: #fff; font-size: 15px; line-height: 1.5;
  --soft: #f1f4f7; --line: #dee3e9; --muted: #536473; --blue: #0064e0;
}
* { box-sizing: border-box; }
body { margin: 0; min-height: 100vh; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; }
button { cursor: pointer; }
button:disabled { cursor: wait; opacity: .5; }
a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible { outline: 3px solid #0064e0; outline-offset: 3px; }
.header { border-bottom: 1px solid var(--line); background: #fff; }
.header-inner { max-width: 1352px; padding: 0 40px; margin: auto; min-height: 74px; display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 20px; }
.brand, .account { display: flex; align-items: center; gap: 12px; white-space: nowrap; font-weight: 680; }
.brand-mark { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 11px; background: #0a1317; color: white; font-weight: 760; }
nav { display: flex; align-items: center; gap: 4px; padding: 4px; border-radius: 100px; background: var(--soft); }
nav a { padding: 8px 20px; border-radius: 100px; font-size: 14px; font-weight: 650; }
nav a[aria-current] { background: #0a1317; color: #fff; }
.account { justify-self: end; color: var(--muted); font-size: 13px; }
.account span { overflow: hidden; text-overflow: ellipsis; max-width: 100px; }
.account button { background: white; border: 1px solid var(--line); padding: 5px 12px; border-radius: 100px; color: inherit; }
main { max-width: 1352px; margin: auto; padding: 45px 40px 64px; min-height: calc(100vh - 150px); }
.hero { background: var(--soft); border-radius: 32px; padding: 36px 40px; margin-bottom: 30px; display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; }
.hero > div:first-child { min-width: 0; }
h1, h2, h3, p { margin: 0; overflow-wrap: anywhere; }
h1 { font-size: clamp(29px, 4vw, 50px); font-weight: 570; letter-spacing: -.05em; line-height: 1.19; }
h2 { font-size: 23px; font-weight: 630; letter-spacing: -.025em; margin-bottom: 13px; }
h3 { font-size: 17px; font-weight: 650; }
.lead { margin-top: 11px; color: var(--muted); font-size: 16px; }
.crumb { display: inline-block; font-size: 13px; color: var(--blue); margin-bottom: 16px; }
.status, .runtime { display: inline-flex; align-items: center; gap: 6px; border-radius: 100px; background: var(--soft); color: #41566b; padding: 5px 11px; font-size: 12px; font-weight: 650; white-space: nowrap; }
.runtime-group { display: flex; flex-wrap: wrap; gap: 8px; }
.runtime { background: white; border: 1px solid var(--line); }
.runtime:before { content: ""; width: 7px; height: 7px; background: #8595a4; border-radius: 50%; }
.runtime.online:before { background: #31a24c; }
.status.done { color: #17632f; background: #e5f5e9; }
.status.blocked, .status.interrupted { color: #9c2136; background: #fdecef; }
.status.awaiting_plan_confirmation, .status.reviewing, .status.waiting_user { color: #765016; background: #fff4d9; }
.status.running, .status.verifying { color: #0857b4; background: #e5f1ff; }
.metrics { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-bottom: 34px; }
.metric, .panel, .app-card { border: 1px solid var(--line); border-radius: 24px; background: #fff; padding: 23px 25px; }
.metric strong { display: block; font-size: 34px; font-weight: 550; letter-spacing: -.045em; margin-top: 3px; }
.muted, .metric span { color: var(--muted); font-size: 13px; }
.toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-bottom: 16px; }
.toolbar h2 { margin: 0 auto 0 0; }
input, select, textarea { min-height: 44px; border: 1px solid #ced0d4; border-radius: 12px; background: white; padding: 9px 13px; color: #0a1317; max-width: 100%; }
input[type=search] { border-radius: 100px; background: var(--soft); border-color: transparent; min-width: 210px; }
select { border-radius: 100px; }
textarea { display: block; width: 100%; margin-top: 6px; }
.table { border: 1px solid var(--line); border-radius: 24px; overflow: auto; }
table { width: 100%; border-collapse: collapse; text-align: left; }
th { color: var(--muted); background: #f8fafb; font-size: 13px; font-weight: 600; white-space: nowrap; }
td, th { padding: 15px 19px; border-bottom: 1px solid var(--line); }
tr:last-child td { border-bottom: 0; }
td:first-child { min-width: 205px; }
td a, .text-link { font-weight: 620; }
td a:hover, .text-link:hover { color: var(--blue); }
td small { display: block; margin-top: 4px; color: var(--muted); }
.table time { font-size: 13px; white-space: nowrap; color: var(--muted); }
.empty { padding: 36px 20px; color: var(--muted); text-align: center; }
.grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.app-card { display: flex; min-height: 175px; flex-direction: column; gap: 12px; transition: border-color .16s; }
.app-card:hover { border-color: #8595a4; }
.app-card .meta { margin-top: auto; display: flex; flex-wrap: wrap; gap: 10px; align-items: center; color: var(--muted); font-size: 13px; }
.detail-grid { display: grid; grid-template-columns: minmax(0, 1.65fr) minmax(0, 1fr); gap: 20px; align-items: start; }
.stack { display: grid; gap: 18px; min-width: 0; }
.panel { min-width: 0; }
.panel ul, .panel ol { margin: 9px 0 0; padding-left: 20px; }
.panel li + li { margin-top: 5px; }
.panel h3 { margin-top: 15px; }
.panel p + p { margin-top: 8px; }
.timeline { list-style: none; padding: 0 !important; }
.timeline li { padding: 9px 0; border-bottom: 1px solid var(--line); margin: 0 !important; }
.timeline li:last-child { border: 0; }
.timeline time { display: block; color: var(--muted); font-size: 12px; }
details summary { cursor: pointer; font-weight: 630; }
dl { display: grid; grid-template-columns: max-content minmax(0, 1fr); gap: 9px 15px; margin: 0; }
dt { color: var(--muted); } dd { margin: 0; overflow-wrap: anywhere; }
code { font: 13px ui-monospace, monospace; overflow-wrap: anywhere; }
.buttons { display: flex; flex-wrap: wrap; gap: 9px; margin-top: 14px; }
.button { min-height: 44px; border-radius: 100px; border: 1px solid #0a1317; padding: 10px 19px; display: inline-flex; align-items: center; justify-content: center; font-size: 14px; font-weight: 680; background: #fff; color: #0a1317; }
.button.primary { background: #000; color: #fff; }
.button.outline:hover { background: var(--soft); }
.feedback { color: #9c2136; margin-top: 9px; }
.login { max-width: 570px; margin: 30px auto; background: var(--soft); border-radius: 32px; padding: 35px; }
.login input { width: 100%; margin: 10px 0 14px; }
dialog { border: 1px solid var(--line); border-radius: 24px; width: min(440px, 92vw); padding: 24px; }
dialog::backdrop { background: #0a131755; }
footer { display: flex; flex-wrap: wrap; justify-content: space-between; padding: 22px 40px; border-top: 1px solid var(--line); color: var(--muted); font-size: 13px; }
@media (max-width: 850px) { .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } .detail-grid { grid-template-columns: 1fr; } }
@media (max-width: 640px) {
  .header-inner { grid-template-columns: 1fr auto; gap: 8px; padding: 12px 16px; }
  nav { grid-column: 1 / -1; grid-row: 2; justify-self: start; } .account { grid-column: 2; grid-row: 1; }
  main { padding: 22px 16px 40px; } .hero { padding: 23px; align-items: flex-start; flex-direction: column; gap: 12px; }
  .metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; } .metric, .panel, .app-card { padding: 16px; }
  .grid { grid-template-columns: 1fr; } .toolbar h2 { width: 100%; } input[type=search] { min-width: 0; flex: 1 1 150px; }
  td, th { padding: 12px; } footer { padding: 18px 16px; }
}
