:root {
  color-scheme: light;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  color: #17243a;
  background: #f4f6fa;
  font-synthesis: none;
  --blue: #163b70;
  --blue-hover: #0d2c57;
  --line: #dfe5ed;
  --muted: #65738a;
}
* { box-sizing: border-box; }
body { margin: 0; font-size: 15px; line-height: 1.55; }
button, input { font: inherit; }
button, a, input { -webkit-tap-highlight-color: transparent; }
button, a { touch-action: manipulation; }
button { cursor: pointer; }
a { color: var(--blue); text-decoration: none; }
button:focus-visible, a:focus-visible { outline: 3px solid #7fabeb; outline-offset: 3px; }
[hidden] { display: none !important; }
h1, h2, h3, p { margin: 0; }
h1, h2 { font-size: 19px; font-weight: 650; line-height: 1.35; }
h3 { font-size: 16px; font-weight: 650; }
.topbar { background: #fff; border-bottom: 1px solid var(--line); }
.topbar-inner { max-width: 1160px; min-height: 68px; margin: auto; padding: 14px 28px; display: flex; justify-content: space-between; align-items: center; gap: 18px; }
.brand { color: var(--blue); font-size: 20px; font-weight: 700; letter-spacing: .03em; }
.account { display: flex; align-items: center; gap: 18px; }
.account-name { color: var(--muted); font-size: 14px; }
.workspace { max-width: 1160px; margin: auto; padding: 26px 28px 24px; }
.dashboard-grid { display: grid; grid-template-columns: minmax(270px, .72fr) minmax(400px, 1.35fr); gap: 22px; align-items: start; }
.card { background: #fff; border: 1px solid var(--line); border-radius: 13px; padding: 25px; box-shadow: 0 2px 7px #1f355505; }
.card-heading { display: flex; gap: 14px; justify-content: space-between; align-items: center; margin-bottom: 23px; }
.caption { font-size: 12px; color: var(--muted); }
.exit-list { display: flex; flex-direction: column; gap: 9px; max-height: 340px; overflow-y: auto; margin-bottom: 24px; }
.exit-item { display: flex; align-items: stretch; border: 1px solid var(--line); border-radius: 8px; background: #fff; }
.exit-item.is-selected { border-color: #6d8ebc; background: #f2f6fc; box-shadow: inset 3px 0 0 var(--blue); }
.exit-select { flex: 1; min-width: 0; text-align: left; background: transparent; border: 0; color: #17243a; padding: 12px 13px; border-radius: 7px; }
.exit-select strong { display: block; font-size: 14px; line-height: 1.4; font-weight: 650; overflow-wrap: anywhere; }
.exit-select span { display: block; color: var(--muted); font-size: 11px; margin-top: 4px; overflow-wrap: anywhere; }
.exit-download { display: flex; align-items: center; padding: 10px 11px; font-size: 12px; font-weight: 550; }
.selection-heading { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-bottom: 12px; border-top: 1px solid var(--line); padding-top: 17px; }
.selection-heading h2 { font-size: 13px; color: var(--muted); font-weight: 550; }
.node-name { font-size: 21px; font-weight: 650; color: var(--blue); overflow-wrap: anywhere; margin-bottom: 22px; }
.facts { margin: 0; }
.facts > div { display: grid; grid-template-columns: 112px minmax(0, 1fr); gap: 10px; padding: 10px 0; border-bottom: 1px solid #edf0f5; }
.facts dt { color: var(--muted); font-size: 13px; }
.facts dd { margin: 0; font-size: 14px; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.service-block { margin-top: 25px; }
.service-block h2 { font-size: 14px; font-weight: 600; margin-bottom: 12px; }
.service-list { list-style: none; margin: 0; padding: 0; }
.service-list li { display: flex; align-items: center; justify-content: space-between; padding: 7px 0; font-size: 13px; }
.badge { display: inline-flex; align-items: center; min-height: 25px; padding: 2px 9px; border-radius: 6px; font-size: 12px; font-weight: 500; }
.badge-good { color: #176343; background: #eaf7ef; }
.badge-bad { color: #9c372f; background: #fff0ee; }
.badge-neutral { color: #62718a; background: #eef2f7; }
.muted { color: var(--muted); font-size: 13px; }
.status-note { margin-top: 18px; }
.form-fields { border: 0; margin: 0; padding: 0; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 18px 16px; min-width: 0; }
.field { display: flex; flex-direction: column; gap: 7px; min-width: 0; font-size: 13px; font-weight: 550; }
.field-wide { grid-column: 1 / -1; }
.field input { width: 100%; min-height: 43px; color: #17243a; border: 1px solid #cdd6e2; border-radius: 7px; padding: 9px 11px; background: #fff; font-size: 15px; line-height: 1.5; box-shadow: 0 1px 2px #0f284603; }
.field input:focus { border-color: #426d9f; outline: 3px solid #dfeaf9; }
.field input::placeholder { color: #8b97a8; font-size: 13px; font-weight: 400; }
.field input:disabled { background: #f7f9fc; color: #65738a; }
.optional { font-weight: 400; color: var(--muted); }
.field-help { font-size: 12px; color: var(--muted); margin-top: -10px; }
.form-actions { display: flex; justify-content: flex-end; flex-wrap: wrap; gap: 10px; margin-top: 3px; }
.button { display: inline-flex; align-items: center; justify-content: center; gap: 5px; border: 1px solid transparent; border-radius: 7px; padding: 9px 15px; min-height: 42px; font-size: 14px; font-weight: 550; line-height: 1.5; white-space: nowrap; transition: background .15s, border-color .15s; }
.button-primary { color: #fff; background: var(--blue); border-color: var(--blue); }
.button-primary:hover { background: var(--blue-hover); border-color: var(--blue-hover); }
.button-secondary { color: var(--blue); background: #fff; border-color: #b8c9df; }
.button-secondary:hover { background: #f0f5fc; }
.button-quiet { color: var(--blue); background: transparent; padding-left: 9px; padding-right: 9px; }
.button-quiet:hover { background: #f0f5fc; }
.button-small { min-height: 32px; padding-top: 4px; padding-bottom: 4px; font-size: 13px; }
.button:disabled, .is-disabled { opacity: .5; pointer-events: none; cursor: default; }
.message { margin-bottom: 20px; padding: 11px 14px; border-radius: 7px; background: #edf3fb; border: 1px solid #d7e3f4; color: #234d7f; font-size: 13px; overflow-wrap: anywhere; }
.message.is-success { background: #edf8f1; border-color: #cee8d8; color: #226244; }
.message.is-error { background: #fff2f0; border-color: #f1d3ce; color: #923e32; }
.form-message { margin: 17px 0 0; }
.form-note { margin-top: 16px; }
.clients-card { margin-top: 22px; }
.client-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); }
.client { padding: 0 22px; border-left: 1px solid var(--line); }
.client:first-child { padding-left: 0; border-left: 0; }
.client:last-child { padding-right: 0; }
.client p { color: var(--muted); font-size: 13px; margin-top: 10px; min-height: 60px; }
.client-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 5px; margin-top: 14px; }
.client .button { font-size: 13px; min-height: 38px; padding: 8px 12px; }
.client .button-quiet { padding-left: 7px; padding-right: 7px; }
.text-link { display: inline-block; font-size: 12px; margin-top: 13px; text-decoration: underline; text-underline-offset: 3px; }
.clients-card > .message { margin-top: 20px; margin-bottom: 0; }
.footer-note { text-align: center; color: #8b96a7; font-size: 12px; margin-top: 22px; }
.login-page { min-height: 100vh; display: grid; place-items: center; padding: 28px 20px; }
.login-card { width: min(100%, 420px); padding: 32px; }
.eyebrow { display: block; font-size: 13px; color: var(--blue); font-weight: 650; margin-bottom: 11px; }
.login-card h1 { font-size: 25px; margin-bottom: 11px; }
.login-card form { margin-top: 27px; }
.login-card .field { margin-top: 18px; }
.login-button { width: 100%; margin-top: 24px; }
.login-card .message { margin-top: 18px; margin-bottom: 0; }
@media (max-width: 900px) {
  .dashboard-grid { grid-template-columns: minmax(240px, .75fr) minmax(340px, 1fr); gap: 16px; }
  .card { padding: 21px; }
  .facts > div { grid-template-columns: 98px minmax(0, 1fr); gap: 8px; }
  .client-grid { grid-template-columns: 1fr; }
  .client { padding: 20px 0; border-left: 0; border-top: 1px solid var(--line); }
  .client:first-child { padding-top: 0; border-top: 0; }
  .client:last-child { padding-bottom: 0; }
  .client p { min-height: 0; }
}
@media (max-width: 700px) {
  .topbar-inner { min-height: 60px; padding: 10px 18px; }
  .brand { font-size: 18px; }
  .account { gap: 9px; }
  .account-name { font-size: 12px; }
  .workspace { padding: 18px 15px; }
  .dashboard-grid { grid-template-columns: 1fr; gap: 16px; }
  .card { border-radius: 10px; padding: 20px; }
  .card-heading { margin-bottom: 18px; }
  .node-name { font-size: 20px; margin-bottom: 14px; }
  .facts > div { grid-template-columns: 112px minmax(0, 1fr); padding: 8px 0; }
  .service-block { margin-top: 19px; }
  .service-list { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
  .service-list li { align-items: flex-start; flex-direction: column; gap: 6px; }
  .status-note { margin-top: 12px; }
  .form-fields { gap: 16px 12px; }
  .form-actions .button { flex: 1; }
  .clients-card { margin-top: 16px; }
  .caption { font-size: 11px; }
  .login-card { padding: 28px 24px; }
}
@media (max-width: 380px) {
  .settings-card .form-fields { grid-template-columns: 1fr; }
  .field-help { margin-top: -6px; }
  .service-list { gap: 4px; }
  .service-list li { font-size: 12px; }
}
@media (prefers-reduced-motion: reduce) {
  .button { transition: none; }
}
