:root {
  color-scheme: light;
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", system-ui, sans-serif;
  color: #172c3b;
  background: #edf2f6;
  --ink: #172c3b;
  --muted: #556879;
  --line: #dce5ed;
  --paper: #fff;
  --blue: #235ab3;
  --teal: #146b62;
  --amber: #8d4f1d;
  --red: #a0383d;
  font-synthesis: none;
  font-size: 16px;
  line-height: 1.55;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; }
h1, h2, p { margin: 0; }
a, button, select, input { font: inherit; }
button, select { cursor: pointer; }
button:disabled { cursor: wait; opacity: .55; }
:focus-visible { outline: 3px solid var(--blue); outline-offset: 4px; }

.wrap { width: min(74rem, calc(100% - 4rem)); margin-inline: auto; }
.topbar { background: var(--paper); border-bottom: 1px solid var(--line); }
.topbar-inner { min-height: 4.125rem; display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.identity { display: flex; align-items: center; gap: .75rem; color: var(--ink); text-decoration: none; font-weight: 700; letter-spacing: -.015em; }
.mark { position: relative; display: flex; justify-content: space-between; align-items: center; width: 2.125rem; height: 1.875rem; padding-inline: .28rem; border-radius: .44rem; background: #e5efff; }
.mark::before { content: ""; position: absolute; inset: 50% .38rem auto; height: 1px; background: #6d97d2; }
.mark i { position: relative; width: .32rem; height: .32rem; border-radius: 50%; background: var(--blue); }
.mark i:nth-child(2) { width: .43rem; height: .43rem; }
.toolbar { display: flex; align-items: center; gap: .5rem; }
.button { padding: .48rem .9rem; min-height: 2.6rem; border: 1px solid transparent; border-radius: .43rem; font-size: .875rem; font-weight: 650; line-height: 1.35; white-space: nowrap; }
.button.subtle { color: var(--ink); background: var(--paper); border-color: var(--line); }
.button.subtle:hover { background: #f1f6fb; border-color: #bdccda; }
.button.ghost { color: var(--muted); background: transparent; }
.button.ghost:hover { background: #edf2f6; }
.button.primary { color: #fff; background: var(--blue); }
.button.primary:hover { background: #1b468b; }

.waiting { padding-block: 4rem; color: var(--muted); }
.gate { display: grid; grid-template-columns: minmax(0, 1fr) minmax(18rem, 24rem); gap: 3rem; align-items: center; max-width: 53rem; padding-block: clamp(3.5rem, 14vh, 9rem); }
.gate-copy h1, .overview h1 { font-size: clamp(2rem, 4vw, 2.65rem); line-height: 1.16; letter-spacing: -.035em; font-weight: 730; }
.gate-copy p { color: var(--muted); margin-top: .8rem; max-width: 20rem; }
.login-form { display: grid; gap: .8rem; padding: 1.45rem 1.55rem 1.6rem; }
.repeat-field { display: grid; gap: .5rem; }
.login-form h2 { margin-bottom: .15rem; font-size: 1.2rem; }
.login-form label { color: var(--ink); font-size: .875rem; font-weight: 650; }
.login-form input { min-width: 0; height: 2.85rem; border: 1px solid #becddb; background: #fafcfe; border-radius: .43rem; padding-inline: .75rem; color: var(--ink); }
.login-form .button { margin-top: .2rem; min-height: 2.85rem; }
.hint { color: var(--muted); font-size: .875rem; }

.dashboard { padding-block: 2.35rem 3.5rem; }
.overview { display: flex; align-items: flex-end; justify-content: space-between; gap: .85rem; margin-bottom: 1.45rem; }
.overview-detail { margin-top: .48rem; color: var(--muted); font-size: .875rem; }
.hub-status, .channel-status { display: inline-flex; align-items: center; gap: .45rem; white-space: nowrap; color: var(--teal); font-size: .875rem; font-weight: 650; }
.hub-status { background: #e1f2ed; border: 1px solid #c9e3d9; border-radius: 2rem; padding: .38rem .7rem; }
.hub-status[data-state="offline"], .channel-status[data-state="offline"] { color: var(--amber); }
.hub-status[data-state="offline"] { background: #fff0da; border-color: #eedcbe; }
.dot { width: .45rem; height: .45rem; border-radius: 50%; background: currentColor; flex: none; }
.alert { color: var(--red); font-size: .875rem; }
.inline-alert { padding: .65rem .9rem; margin-bottom: 1rem; background: #fff6e9; border: 1px solid #f0d9b8; border-radius: .5rem; color: var(--amber); }

.flow { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); background: var(--paper); border: 1px solid var(--line); border-radius: .75rem; margin-bottom: 1.1rem; overflow: hidden; }
.station { --phase-color: #627586; min-width: 0; padding: 1.05rem 1.14rem 1.1rem; }
.station + .station { border-left: 1px solid var(--line); }
.station[data-phase="running"] { --phase-color: var(--blue); }
.station[data-phase="pending"] { --phase-color: var(--amber); }
.station[data-phase="done"] { --phase-color: var(--teal); }
.station-label { display: flex; align-items: center; gap: .58rem; font-size: .875rem; font-weight: 700; color: var(--phase-color); }
.station-label span { display: block; position: relative; flex: 1; max-width: 2.2rem; height: 2px; background: currentColor; margin-right: .18rem; }
.station-label span::after { content: ""; position: absolute; right: -.18rem; top: -.12rem; width: .38rem; height: .38rem; border-radius: 50%; background: currentColor; }
.station strong { display: block; margin-top: .18rem; font-size: clamp(1.85rem, 4vw, 2.55rem); font-variant-numeric: tabular-nums; line-height: 1.24; font-weight: 720; letter-spacing: -.025em; }
.station small { font-size: .875rem; color: var(--muted); line-height: 1.4; }

.columns { display: grid; grid-template-columns: minmax(0, 1.8fr) minmax(17rem, 1fr); align-items: start; gap: 1.1rem; }
.side { display: grid; gap: 1.1rem; min-width: 0; }
.panel { min-width: 0; background: var(--paper); border: 1px solid var(--line); border-radius: .75rem; }
.panel-head { display: flex; align-items: center; justify-content: space-between; gap: .75rem; padding: .95rem 1.1rem; border-bottom: 1px solid var(--line); }
.panel-head h2 { font-size: 1rem; font-weight: 730; line-height: 1.4; }
.panel-meta { color: var(--muted); font-size: .875rem; white-space: nowrap; font-variant-numeric: tabular-nums; }
.filter { position: relative; }
.filter::after { content: ""; position: absolute; top: .79rem; right: .7rem; width: .38rem; height: .38rem; border-right: 1.5px solid var(--muted); border-bottom: 1.5px solid var(--muted); transform: rotate(45deg); pointer-events: none; }
.filter select { appearance: none; padding: .3rem 1.6rem .3rem .66rem; border: 1px solid var(--line); border-radius: .38rem; color: var(--ink); background: #f8fafc; font-size: .875rem; }
.rows { list-style: none; padding: 0; margin: 0; }
.rows li + li { border-top: 1px solid #e7edf3; }
.run, .compact-row, .empty { padding: .87rem 1.1rem; }
.run { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: start; gap: .7rem; }
.row-title { display: block; color: var(--ink); font-size: .9375rem; overflow-wrap: anywhere; line-height: 1.45; }
.row-note { margin-top: .2rem; color: var(--muted); font-size: .875rem; overflow-wrap: anywhere; }
.row-meta { display: block; margin-top: .25rem; color: var(--muted); font-size: .8125rem; line-height: 1.4; overflow-wrap: anywhere; font-variant-numeric: tabular-nums; }
.status-tag { border-radius: .3rem; padding: .16rem .42rem; background: #edf1f6; color: #475e70; font-size: .8125rem; font-weight: 650; line-height: 1.5; white-space: nowrap; }
.status-tag[data-tone="teal"] { background: #e5f2ee; color: var(--teal); }
.status-tag[data-tone="amber"] { background: #fff0da; color: var(--amber); }
.status-tag[data-tone="blue"] { background: #e5efff; color: var(--blue); }
.status-tag[data-tone="red"] { background: #fcebe9; color: var(--red); }
.empty { display: grid; gap: .22rem; padding-block: 1rem 1.15rem; color: var(--muted); font-size: .875rem; }
.empty strong { color: var(--ink); font-weight: 650; }
.more { margin: .65rem 1.1rem 1rem; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }

@media (max-width: 50rem) {
  .wrap { width: calc(100% - 2.25rem); }
  .columns { grid-template-columns: minmax(0, 1fr); }
  .side { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 35rem) {
  .wrap { width: calc(100% - 1.6rem); }
  .topbar-inner { min-height: 3.75rem; gap: .4rem; }
  .identity { gap: .45rem; font-size: .925rem; }
  .toolbar { gap: .15rem; }
  .toolbar .button { padding-inline: .53rem; }
  .dashboard { padding-block: 1.55rem 2.5rem; }
  .overview { align-items: flex-start; }
  .overview-detail { font-size: .8125rem; }
  .hub-status { margin-top: .2rem; font-size: .8125rem; padding: .26rem .5rem; }
  .flow { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .station { padding: .78rem .87rem; }
  .station:nth-child(3) { border-left: 0; }
  .station:nth-child(n+3) { border-top: 1px solid var(--line); }
  .station-label span { max-width: 1.45rem; }
  .side { grid-template-columns: minmax(0, 1fr); }
  .gate { grid-template-columns: minmax(0, 1fr); gap: 1.45rem; padding: 2.9rem .3rem; }
  .panel-head, .run, .compact-row, .empty { padding-inline: .88rem; }
}
