:root {
  color-scheme: light;
  font-family: Inter, "PingFang SC", "Microsoft YaHei", system-ui, sans-serif;
  background: #f4f6fa;
  color: #16213a;
  font-size: 16px;
  --muted: #53627c;
  --blue: #305ad1;
  --border: #dce3ef;
  --surface: #fff;
  --dark: #14213e;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; }
a { color: inherit; }
button, input, select { font: inherit; }
button {
  background: var(--surface); border: 1px solid #c7d2e8; color: #243a71;
  font-size: .875rem; border-radius: 8px; padding: .56rem .85rem; cursor: pointer;
}
button:hover { background: #eaf0ff; }
button:disabled { opacity: .52; cursor: wait; }
:focus-visible { outline: 3px solid #6385ff; outline-offset: 3px; }
.primary { background: var(--blue); border-color: var(--blue); color: #fff; font-weight: 650; }
.primary:hover { background: #274bb6; }
.destructive { color: #a83144; }
.shell { min-height: 100vh; display: grid; grid-template-columns: 230px minmax(0, 1fr); }
.sidebar { padding: 30px 22px 20px; display: flex; flex-direction: column; background: var(--dark); color: #e5ebfa; }
.brand { display: flex; gap: 12px; align-items: center; text-decoration: none; font-size: 1.1rem; font-weight: 750; }
.brand small { display: block; margin-top: 3px; font-size: .8rem; color: #9fafd4; font-weight: 500; }
.brand-icon { display: grid; place-items: center; border-radius: 10px; background: #2e56cb; color: white; width: 40px; height: 40px; font-size: 1.4rem; }
nav { display: grid; gap: 7px; margin: 46px -7px 20px; }
nav a { display: flex; gap: 12px; padding: .75rem .85rem; text-decoration: none; border-radius: 9px; }
nav a:hover, nav a[aria-current] { background: #2b3d68; color: #fff; }
nav a[aria-current] { font-weight: 700; }
.logout { width: fit-content; margin-top: auto; background: transparent; color: #dbe5fc; border-color: #46577e; }
.logout:hover { background: #2b3d68; }
.shell main { max-width: 1540px; width: 100%; padding: 42px 4.1vw; margin: 0 auto; }
.page-header { display: flex; align-items: end; justify-content: space-between; gap: 20px; margin-bottom: 24px; flex-wrap: wrap; }
h1, h2, h3, p { margin-top: 0; }
h1 { font-size: clamp(1.55rem, 3.2vw, 2.15rem); margin-bottom: .4rem; letter-spacing: -.035em; }
h2 { font-size: 1.15rem; margin-bottom: .85rem; }
h3 { font-size: 1rem; margin-bottom: .55rem; }
#description, .muted, .meta { color: var(--muted); font-size: .875rem; line-height: 1.55; }
#description { margin-bottom: 0; }
.actions { display: flex; align-items: center; flex-wrap: wrap; gap: .55rem; }
.group { display: grid; gap: 16px; margin-bottom: 24px; }
.card { border: 1px solid var(--border); background: var(--surface); border-radius: 13px; padding: 20px; }
.card p:last-child { margin-bottom: 0; }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 14px; flex-wrap: wrap; }
.card-head h2, .card-head h3 { margin-bottom: 0; }
.run { border-top: 1px solid var(--border); padding: 14px 0 0; margin-top: 14px; display: grid; gap: .5rem; }
.run p { margin: 0; }
.product-process { position: relative; }
.product-process-title { cursor: pointer; min-height: 2.1rem; }
.product-process-title h2 { display: inline; }
.product-process-title .meta { margin-left: .65rem; }
.product-controls { float: right; margin: -.25rem 0 .4rem .7rem; }
.product-process details > p { margin: .75rem 0 0; }
.run .card-head { margin-bottom: 0; }
.development-fields { margin: 0; display: grid; gap: .5rem; }
.development-fields > div { display: grid; grid-template-columns: 4.15rem 1fr; gap: .45rem; }
.development-fields dt { color: var(--muted); font-size: .875rem; }
.development-fields dd { margin: 0; font-size: .9rem; overflow-wrap: anywhere; }
.development-steps { border: 1px solid var(--border); border-radius: 8px; padding: .6rem .75rem; }
.development-steps summary { cursor: pointer; }
.development-steps summary .meta { margin-left: .65rem; }
.development-steps progress { margin-top: .65rem; }
.development-steps ol { margin: .35rem 0 0; padding: 0; list-style: none; }
.development-steps li { display: flex; align-items: center; justify-content: space-between; gap: .65rem; padding: .42rem .4rem; font-size: .86rem; }
.development-steps li[aria-current] { background: #e9eefb; border-radius: 5px; }
.development-steps li .badge { white-space: nowrap; }
.run-code, code { font-size: .8rem; overflow-wrap: anywhere; }
.badge { display: inline-block; border-radius: 100px; background: #e9eefb; color: #294782; padding: .22rem .65rem; font-size: .79rem; font-weight: 650; }
.badge.failed, .badge.exhausted, .badge.blocked { background: #ffe4e9; color: #981f34; }
.badge.succeeded, .badge.healthy, .badge.complete { background: #deefe6; color: #1b6545; }
.badge.tight { background: #fff1d4; color: #805a05; }
progress { width: 100%; height: 12px; accent-color: var(--blue); }
.progress-row { display: flex; align-items: center; gap: 1rem; }
.progress-row span { white-space: nowrap; }
.table-wrap { overflow-x: auto; padding: 2px; }
table { width: 100%; border-collapse: collapse; white-space: nowrap; }
th, td { padding: .7rem .6rem; border-bottom: 1px solid var(--border); text-align: left; font-size: .875rem; }
th { color: var(--muted); font-weight: 650; }
td:first-child, th:first-child { padding-left: 0; }
input, select, textarea { border-radius: 7px; border: 1px solid #bfcbe1; color: #172849; background: #fff; min-height: 40px; max-width: 100%; padding: .45rem .55rem; font: inherit; font-size: .875rem; }
textarea { resize: vertical; }
.launch-diagnostics summary { cursor: pointer; margin-bottom: .45rem; }
.launch-diagnostics .table-wrap { margin-top: .6rem; }
td input[type=number] { width: 75px; }
td input[type=text] { width: 155px; }
form { display: grid; gap: .7rem; }
label { font-size: .875rem; font-weight: 650; display: grid; gap: .35rem; }
dialog { max-width: min(690px, 92vw); width: 100%; border: 1px solid var(--border); border-radius: 13px; color: #16213a; padding: 0; overflow: auto; }
dialog::backdrop { background: rgb(18 28 48 / .55); }
.dialog-body { padding: 25px; }
.dialog-body section + section { margin-top: 20px; }
.dialog-body form { margin-bottom: 14px; }
.selection { display: grid; gap: 12px; }
.split { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(240px, 100%), 1fr)); gap: 12px; }
.note { color: #a83144; }
#notice { background: #e7edfc; border-radius: 8px; padding: .75rem; color: #28416f; overflow-wrap: anywhere; }
#notice.error { background: #ffedf0; color: #981f34; }
.login-page { min-height: 100vh; display: grid; place-items: center; padding: 18px; background: #edf2fb; }
.login-card { border: 1px solid var(--border); border-radius: 16px; background: #fff; max-width: 440px; padding: 34px; width: 100%; box-shadow: 0 18px 55px rgb(28 46 82 / .09); }
.login-card .brand { margin-bottom: 36px; }
.login-card .brand small { color: var(--muted); }
.login-card h1 { font-size: 1.65rem; margin-bottom: 1.4rem; }
.login-card button { margin: .45rem 0 .7rem; }
.login-card .muted { margin-bottom: 0; }
@media (max-width: 740px) {
  .shell { grid-template-columns: minmax(0, 1fr); }
  .sidebar { padding: 15px; display: grid; grid-template-columns: 1fr auto; gap: 12px; }
  .sidebar nav { grid-row: 2; grid-column: 1 / -1; grid-template-columns: repeat(4, 1fr); margin: 0; }
  nav a { justify-content: center; padding: .55rem .15rem; font-size: .83rem; gap: 4px; }
  .logout { margin-top: 0; }
  .shell main { padding: 26px 13px; }
  .card { padding: 15px; }
}

.product-matrix { margin-top: 14px; border: 1px solid var(--border); border-radius: 10px; }
.product-matrix-title { padding: .75rem .85rem; cursor: pointer; }
.product-matrix-title .meta { margin-left: .7rem; }
.product-matrix .table-wrap { padding: 0 .85rem .6rem; }
.execution-config { display: grid; gap: .35rem; min-width: 12rem; }
.execution-config .meta { white-space: normal; max-width: 20rem; }
