:root {
  font-family: system-ui, "Microsoft YaHei", sans-serif;
  background: #edf2f7;
  color: #162a40;
}

* { box-sizing: border-box; }
body { margin: 0; line-height: 1.5; }
a { color: #155e96; text-underline-offset: .16em; }
header { background: #142941; color: #fff; padding: 1.15rem 0; }
.width { width: min(100% - 2rem, 58rem); margin-inline: auto; }
.brand { font-size: 1.125rem; font-weight: 750; }
.topbar, .topbar nav { display: flex; align-items: center; gap: .9rem; }
.topbar { justify-content: space-between; flex-wrap: wrap; }
.topbar a, .topbar button { color: #fff; }
.topbar .brand { text-decoration: none; }
.topbar button { background: transparent; border: 0; padding: 0; text-decoration: underline; }
main { padding: 2rem 0 3rem; }
h1 { font-size: clamp(1.8rem, 4vw, 2.4rem); margin: 0; letter-spacing: -.025em; }
h2 { font-size: 1.2rem; margin: 0; }
.muted { margin: .45rem 0 1.25rem; color: #435c72; }
.panel { background: #fff; border: 1px solid #d3dee7; border-radius: .9rem; padding: 1.25rem; margin-top: 1rem; }
.panel-title, .actions, .row-actions { display: flex; align-items: center; gap: .75rem; }
.panel-title { justify-content: space-between; }
.panel-title span { color: #526b80; font-size: .9rem; }
.route-form { display: grid; grid-template-columns: minmax(0, 1fr) minmax(6rem, .35fr) auto; gap: .75rem; align-items: end; margin-top: .8rem; }
.route-form label { display: grid; gap: .3rem; font-size: .9rem; font-weight: 650; }
input, button { font: inherit; }
input { min-width: 0; width: 100%; padding: .55rem .65rem; border: 1px solid #9cacc0; border-radius: .45rem; background: #f8fbfd; color: #162a40; }
button { cursor: pointer; }
.primary { border: 1px solid #194a78; border-radius: .45rem; padding: .55rem .8rem; background: #194a78; color: #fff; font-weight: 650; }
.primary:hover { background: #123856; }
:focus-visible { outline: .18rem solid #3479b5; outline-offset: .12rem; }
.table-wrap { overflow-x: auto; margin-top: .65rem; }
table { width: 100%; border-collapse: collapse; }
th, td { text-align: left; padding: .7rem .4rem; border-bottom: 1px solid #dce5ed; }
thead th { font-size: .9rem; color: #435c72; white-space: nowrap; }
tbody th { overflow-wrap: anywhere; font-weight: 600; }
small { display: block; font-weight: 400; color: #435c72; }
.port { font-variant-numeric: tabular-nums; }
.row-actions { white-space: nowrap; }
.delete { border: 0; background: transparent; color: #952939; padding: 0; text-decoration: underline; text-underline-offset: .16em; }
.message { border-radius: .45rem; padding: .65rem .75rem; }
.success { background: #dcefe6; color: #1c573f; }
.error { background: #f9e7e9; color: #852735; }
.login-shell { display: grid; place-items: start center; padding-top: clamp(2rem, 8vh, 6rem); }
.login-card { width: min(100%, 29rem); padding: clamp(1.25rem, 6vw, 2rem); }
.login-card h1 { margin-bottom: 1rem; }
.login-tabs { display: flex; gap: 1rem; border-bottom: 1px solid #dce5ed; margin-bottom: 1rem; }
.login-tabs a { padding-bottom: .55rem; }
.login-tabs a[aria-current] { font-weight: 650; text-decoration-thickness: .15em; }
.settings-panel { max-width: 36rem; }
.settings-fields, .settings-fields label { display: grid; gap: .35rem; }
.settings-fields { gap: 1rem; }
.settings-fields label { font-weight: 650; }
.settings-fields :is(button, input) { min-height: 2.6rem; }
.settings-fields .checkbox { display: flex; align-items: center; }
.checkbox input { min-height: 0; width: auto; }
.field-help { margin: -.65rem 0 0; color: #435c72; }
.secondary { border: 1px solid #9cacc0; border-radius: .45rem; padding: .55rem .8rem; background: #edf4fb; color: #194a78; }
button:disabled { background: #edf0f4; color: #506476; cursor: default; }
.screen-reader-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }

@media (max-width: 40rem) {
  .route-form { grid-template-columns: 1fr; }
  .route-form .actions { margin-top: .25rem; }
}
