:root {
  color-scheme: light;
  --bg: oklch(1 0 0);
  --surface: oklch(.976 .003 247);
  --surface-hover: oklch(.952 .006 247);
  --ink: oklch(.235 .016 247);
  --muted: oklch(.478 .018 247);
  --line: oklch(.9 .009 247);
  --primary: oklch(.501 .16 247);
  --primary-hover: oklch(.445 .15 247);
  --primary-tint: oklch(.956 .022 247);
  --success: oklch(.41 .105 160);
  --success-tint: oklch(.964 .025 160);
  --warning: oklch(.435 .105 65);
  --warning-tint: oklch(.972 .035 80);
  --danger: oklch(.493 .17 25);
  --danger-tint: oklch(.967 .019 25);
  --radius: 8px;
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;
  --z-sidebar: 10;
  --z-toast: 40;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  font-size: 14px;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
* { box-sizing: border-box; }
body { margin: 0; min-width: 320px; }
button, input, select { font: inherit; }
button, a, input, select, summary { -webkit-tap-highlight-color: transparent; }
button { cursor: pointer; }
button, a { touch-action: manipulation; }
button:disabled { cursor: not-allowed; opacity: .55; }
a { color: var(--primary); }
button { color: inherit; }
button:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible, summary:focus-visible { outline: 3px solid var(--primary); outline-offset: 3px; }
input:focus-visible, select:focus-visible { outline-width: 2px; outline-offset: 1px; }
input[type="checkbox"] { width: 16px; height: 16px; accent-color: var(--primary); cursor: pointer; flex-shrink: 0; }
input, select { min-width: 0; }
input:not([type="checkbox"]), select { border: 1px solid var(--line); border-radius: 6px; background: var(--bg); color: var(--ink); padding: 9px 11px; min-height: 40px; transition: border-color .15s; }
input:not([type="checkbox"]):hover, select:hover { border-color: oklch(.73 .025 247); }
input::placeholder { color: var(--muted); opacity: 1; }
input[type="search"]::-webkit-search-cancel-button { cursor: pointer; }
select { padding-right: 30px; }
[hidden] { display: none !important; }
.icon-sprite, .sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
.icon { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; flex-shrink: 0; vertical-align: middle; }
h1,h2,h3,p { margin: 0; }
h1,h2,h3 { text-wrap: balance; }
p { line-height: 1.65; text-wrap: pretty; }
h1 { font-size: 25px; line-height: 1.4; letter-spacing: -.025em; font-weight: 650; }
h2 { font-size: 16px; line-height: 1.5; font-weight: 650; }
h3 { font-size: 15px; font-weight: 650; }
code,.mono { font-family: var(--mono); font-size: .9em; font-variant-numeric: tabular-nums; }
.button { display: inline-flex; justify-content: center; align-items: center; gap: 7px; min-height: 38px; padding: 8px 13px; border: 1px solid transparent; border-radius: 6px; text-decoration: none; font-size: 13px; line-height: 1.4; font-weight: 550; white-space: nowrap; transition: background-color .15s, border-color .15s; }
.button .icon { width: 16px; height: 16px; }
.primary { background: var(--primary); color: oklch(1 0 0); border-color: var(--primary); }
.primary:hover:not(:disabled) { background: var(--primary-hover); border-color: var(--primary-hover); }
.secondary { background: var(--bg); border-color: var(--line); color: var(--ink); }
.secondary:hover:not(:disabled) { background: var(--surface-hover); border-color: oklch(.8 .012 247); }
.danger { background: var(--danger); color: oklch(1 0 0); border-color: var(--danger); }
.danger:hover:not(:disabled) { background: oklch(.44 .15 25); }
.text-button { display: inline-flex; align-items: center; justify-content: center; gap: 5px; border: 0; border-radius: 4px; padding: 5px 4px; background: transparent; color: var(--primary); font-size: 12px; font-weight: 550; line-height: 1.5; white-space: nowrap; }
.text-button:hover:not(:disabled) { background: var(--primary-tint); }
.text-button .icon { width: 15px; height: 15px; }
.danger-text { color: var(--danger); }
.danger-text:hover:not(:disabled) { background: var(--danger-tint); }
.icon-button { display: inline-flex; align-items: center; justify-content: center; width: 32px; height: 32px; padding: 0; border: 0; border-radius: 6px; background: transparent; color: var(--muted); }
.icon-button:hover:not(:disabled) { background: var(--surface-hover); color: var(--ink); }
.skip-link { position: fixed; left: 16px; top: -100px; padding: 12px 16px; color: var(--bg); background: var(--primary); z-index: 50; border-radius: 6px; }
.skip-link:focus { top: 12px; }
.brand-mark { display: inline-flex; align-items: center; justify-content: center; width: 34px; height: 34px; border-radius: 8px; color: oklch(1 0 0); background: var(--primary); flex-shrink: 0; }
.brand-mark .icon { width: 22px; height: 22px; stroke-width: 1.8; }
.boot { min-height: 100dvh; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 18px; color: var(--muted); }
.boot .brand-mark { width: 42px; height: 42px; }
.login-view { min-height: 100dvh; background: var(--surface); display: flex; align-items: center; justify-content: center; flex-direction: column; padding: 40px 24px; }
.login-card { width: min(100%, 390px); border: 1px solid var(--line); border-radius: 12px; padding: 32px; background: var(--bg); }
.login-brand { display: flex; align-items: center; gap: 10px; font-size: 19px; letter-spacing: -.02em; font-weight: 650; margin-bottom: 32px; }
.login-card h1 { font-size: 23px; }
.login-intro { margin: 8px 0 26px; font-size: 13px; color: var(--muted); }
.field { display: flex; flex-direction: column; gap: 7px; margin-bottom: 19px; }
.field label { font-size: 12px; font-weight: 600; }
.field input, .field select { width: 100%; }
.field-hint { font-size: 11px; color: var(--muted); line-height: 1.5; overflow-wrap: anywhere; }
.password-field { position: relative; }
.password-field input { padding-right: 60px; }
.password-field button { position: absolute; right: 7px; top: 5px; height: 30px; padding: 0 7px; border: 0; border-radius: 4px; background: transparent; color: var(--muted); font-size: 12px; }
.password-field button:hover { background: var(--surface); }
.login-submit { width: 100%; margin-top: 3px; min-height: 42px; font-size: 14px; }
.login-foot { border-top: 1px solid var(--line); margin-top: 27px; padding-top: 20px; display: flex; gap: 7px; align-items: center; justify-content: center; color: var(--muted); font-size: 11px; }
.login-foot .icon { width: 14px; height: 14px; }
.login-version { margin-top: 22px; color: var(--muted); font-size: 11px; }
.form-error { border: 1px solid oklch(.86 .055 25); border-radius: 6px; background: var(--danger-tint); color: var(--danger); padding: 10px 11px; font-size: 12px; margin: 6px 0 14px; overflow-wrap: anywhere; }
.app { min-height: 100dvh; display: flex; }
.sidebar { width: 210px; flex-shrink: 0; position: fixed; inset: 0 auto 0 0; background: var(--surface); border-right: 1px solid var(--line); display: flex; flex-direction: column; z-index: var(--z-sidebar); }
.brand { display: flex; align-items: center; gap: 11px; padding: 28px 23px 29px; color: var(--ink); font-size: 18px; font-weight: 650; text-decoration: none; letter-spacing: -.03em; line-height: 1.2; }
.brand small { display: block; color: var(--muted); font-size: 10px; letter-spacing: .04em; font-weight: 450; margin-top: 6px; }
.navigation { display: flex; flex-direction: column; gap: 5px; padding: 0 12px; }
.nav-button { border: 0; border-radius: 6px; padding: 11px 12px; min-height: 42px; display: flex; align-items: center; gap: 10px; background: transparent; text-align: left; font-size: 13px; font-weight: 500; color: var(--muted); }
.nav-button:hover { background: var(--surface-hover); color: var(--ink); }
.nav-button.active { background: var(--primary-tint); color: var(--primary); font-weight: 600; }
.nav-count { margin-left: auto; font-family: var(--mono); font-size: 11px; opacity: .85; }
.sidebar-foot { margin-top: auto; padding: 24px; font-size: 10px; color: var(--muted); line-height: 1.8; }
.sidebar-foot small { display: block; margin-top: 8px; font-size: 10px; }
.foot-dot { display: inline-block; width: 6px; height: 6px; background: var(--primary); border-radius: 50%; margin-right: 5px; }
.workspace { margin-left: 210px; min-width: 0; flex: 1; display: flex; flex-direction: column; }
.topbar { min-height: 65px; border-bottom: 1px solid var(--line); display: flex; justify-content: space-between; align-items: center; gap: 20px; padding: 0 32px; }
.workspace-label { display: flex; align-items: center; gap: 13px; color: var(--muted); font-size: 11px; }
.workspace-label #topbar-location { color: var(--ink); font-weight: 500; }
.workspace-separator { color: oklch(.73 .015 247); }
.account { display: flex; align-items: center; gap: 9px; font-size: 12px; color: var(--muted); }
.account > .icon { width: 14px; height: 14px; }
.account > .text-button { font-size: 10px; margin-left: 3px; }
#current-user { max-width: 180px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
#main-content { flex: 1; padding: 33px 32px 24px; max-width: 1700px; width: 100%; margin: 0 auto; }
#main-content:focus { outline: none; }
.page-header { display: flex; justify-content: space-between; align-items: center; gap: 20px; }
.page-header p { margin-top: 7px; color: var(--muted); font-size: 12px; }
.page-utilities { display: flex; align-items: center; gap: 8px; }
.refresh-line { display: flex; align-items: center; gap: 13px; margin: 18px 0 23px; min-height: 24px; color: var(--muted); font-size: 10px; }
.auto-refresh { display: flex; gap: 6px; align-items: center; cursor: pointer; }
.auto-refresh input { margin: 0; width: 13px; height: 13px; }
.refresh-line .text-button { font-size: 10px; padding: 2px 4px; }
.refresh-line .icon { width: 12px; height: 12px; }
.refreshing .icon { animation: rotate .85s linear infinite; }
.notice { display: flex; align-items: flex-start; gap: 9px; padding: 13px 14px; border: 1px solid var(--line); border-radius: 7px; color: var(--muted); background: var(--surface); font-size: 12px; margin-bottom: 20px; }
.notice > .icon { width: 16px; height: 16px; margin-top: 2px; }
.notice p { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.notice.error { color: var(--danger); border-color: oklch(.87 .055 25); background: var(--danger-tint); }
.notice.error .text-button { color: var(--danger); }
.notice.compact { padding: 10px; font-size: 11px; margin: 0 0 16px; }
.network-strip { min-height: 92px; padding: 19px 23px; border: 1px solid var(--line); border-radius: var(--radius); display: flex; align-items: center; gap: 24px; margin-bottom: 32px; }
.network-node { display: flex; align-items: center; gap: 11px; min-width: 0; flex: 1; }
.network-node-icon { width: 34px; height: 34px; border-radius: 7px; background: var(--surface); display: flex; align-items: center; justify-content: center; color: var(--muted); flex-shrink: 0; }
.network-node-body { min-width: 0; }
.network-node-name { display: flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 600; }
.network-node-name > span:first-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.network-node-address { color: var(--muted); font-size: 10px; margin-top: 6px; display: flex; flex-wrap: wrap; gap: 4px 13px; }
.network-node-address span { white-space: nowrap; }
.network-node-address code { font-size: 10px; }
.network-link { display: flex; align-items: center; gap: 9px; color: var(--muted); font-size: 10px; flex-shrink: 0; width: 120px; }
.network-link::before,.network-link::after { content: ""; height: 1px; background: var(--line); flex: 1; }
.network-link .icon { width: 15px; height: 15px; color: var(--primary); }
.network-link-label { display: flex; align-items: center; gap: 4px; white-space: nowrap; }
.status-dot { display: inline-block; width: 6px; height: 6px; border-radius: 50%; background: var(--muted); flex-shrink: 0; }
.status-dot.online { background: var(--success); }
.status-dot.offline { background: var(--danger); }
.network-empty { color: var(--muted); font-size: 12px; }
.mapping-layout { min-width: 0; display: grid; grid-template-columns: minmax(0,1fr); gap: 26px; align-items: start; }
.mapping-layout.editor-open { grid-template-columns: minmax(0,1fr) 340px; }
.mapping-main { min-width: 0; }
.section-heading { display: flex; align-items: center; justify-content: space-between; gap: 18px; margin-bottom: 20px; }
.section-heading h2 { display: flex; gap: 8px; align-items: center; }
.section-heading p { font-size: 11px; color: var(--muted); margin-top: 5px; }
.count-badge { min-width: 22px; padding: 1px 6px; border: 1px solid var(--line); border-radius: 5px; font: 10px/1.5 var(--mono); color: var(--muted); text-align: center; background: var(--surface); }
.filters { display: flex; align-items: center; gap: 8px; margin-bottom: 14px; }
.filters select { min-height: 35px; padding: 7px 26px 7px 9px; font-size: 11px; width: 100%; }
.search-field { display: flex; align-items: center; position: relative; min-width: 140px; flex: 1; }
.search-field .icon { position: absolute; left: 10px; width: 14px; height: 14px; color: var(--muted); pointer-events: none; }
.search-field input { width: 100%; min-height: 35px; padding: 7px 10px 7px 31px; font-size: 11px; }
.filters > label:not(.search-field) { min-width: 95px; max-width: 160px; }
.table-wrap { border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
table { border-collapse: collapse; width: 100%; text-align: left; font-size: 12px; }
th { padding: 10px 12px; color: var(--muted); background: var(--surface); font-size: 10px; font-weight: 500; }
td { padding: 17px 12px; vertical-align: middle; border-top: 1px solid var(--line); }
tbody tr:hover { background: oklch(.99 .002 247); }
.mapping-table th:first-child,.mapping-table td:first-child { padding-left: 0; background: inherit; }
.mapping-table thead tr { background: var(--surface); }
.mapping-table th:first-child { padding-left: 11px; }
.mapping-table .actions-heading { text-align: right; }
.mapping-name { border: 0; padding: 0; background: none; color: var(--ink); font-weight: 600; font-size: 12px; text-align: left; line-height: 1.5; max-width: 100%; overflow-wrap: anywhere; }
.mapping-name:hover { color: var(--primary); }
.mapping-route { display: flex; gap: 8px; align-items: center; margin-top: 7px; color: var(--muted); font-size: 10px; line-height: 1.6; }
.mapping-endpoint { min-width: 0; }
.mapping-endpoint-label { display: block; margin-bottom: 1px; color: var(--muted); font-size: 9px; }
.mapping-endpoint code { white-space: nowrap; font-size: 10px; color: var(--ink); }
.mapping-route .icon { width: 13px; height: 13px; }
.protocol { display: inline-flex; white-space: nowrap; font: 9px/1.5 var(--mono); color: var(--muted); background: var(--surface); border: 1px solid var(--line); border-radius: 4px; padding: 2px 5px; }
.status-cell { min-width: 85px; }
.mapping-status { display: flex; flex-direction: column; align-items: flex-start; gap: 6px; }
.status-tag { display: inline-flex; align-items: center; gap: 5px; font-size: 10px; line-height: 1.5; white-space: nowrap; color: var(--muted); }
.status-tag.success { color: var(--success); }
.status-tag.warning { color: var(--warning); }
.status-tag.danger { color: var(--danger); }
.status-tag .icon { width: 12px; height: 12px; }
.state-toggle { display: flex; align-items: center; gap: 6px; border: 0; padding: 3px 0; background: transparent; color: var(--muted); font-size: 9px; }
.toggle-track { display: inline-block; width: 24px; height: 14px; border-radius: 7px; background: oklch(.78 .015 247); position: relative; transition: background-color .15s; }
.toggle-track::after { content: ""; width: 10px; height: 10px; position: absolute; top: 2px; left: 2px; background: var(--bg); border-radius: 50%; transition: transform .15s; }
.state-toggle[aria-checked="true"] .toggle-track { background: var(--primary); }
.state-toggle[aria-checked="true"] .toggle-track::after { transform: translateX(10px); }
.row-actions { display: flex; justify-content: flex-end; gap: 5px; white-space: nowrap; }
.row-actions .text-button { font-size: 10px; padding: 5px; }
.mapping-row.is-editing { background: var(--primary-tint); }
.mapping-row.is-editing:hover { background: var(--primary-tint); }
.mapping-footnote { display: flex; gap: 7px; color: var(--muted); font-size: 10px; margin-top: 17px; }
.mapping-footnote .icon { width: 13px; height: 13px; margin-top: 2px; }
.empty-state { min-height: 255px; padding: 35px 20px; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); display: flex; align-items: center; justify-content: center; flex-direction: column; text-align: center; }
.empty-icon { width: 42px; height: 42px; display: flex; align-items: center; justify-content: center; background: var(--surface); border: 1px solid var(--line); border-radius: 10px; color: var(--muted); margin-bottom: 15px; }
.empty-icon .icon { width: 20px; height: 20px; }
.empty-state h3 { font-size: 14px; }
.empty-state p { color: var(--muted); font-size: 11px; max-width: 340px; margin: 7px 0 18px; }
.loading-rows { border-top: 1px solid var(--line); }
.loading-rows div { height: 79px; border-bottom: 1px solid var(--line); position: relative; }
.loading-rows div::before,.loading-rows div::after { content: ""; position: absolute; left: 12px; top: 20px; width: 95px; height: 10px; border-radius: 3px; background: var(--surface-hover); }
.loading-rows div::after { top: 41px; width: 65%; height: 9px; background: var(--surface); }
.editor { border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; background: var(--bg); position: sticky; top: 20px; }
.editor-header { display: flex; justify-content: space-between; align-items: center; margin: 0 0 23px; gap: 10px; }
.editor-kicker { display: block; font-size: 10px; color: var(--muted); margin-bottom: 4px; }
.editor-header h2 { font-size: 17px; }
.editor .field { margin-bottom: 17px; }
.editor .field label { font-size: 11px; }
.editor input:not([type="checkbox"]),.editor select { font-size: 12px; min-height: 37px; padding-top: 8px; padding-bottom: 8px; }
.field-pair { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.route-preview { background: var(--surface); border: 1px solid var(--line); padding: 11px; border-radius: 6px; margin-bottom: 18px; display: flex; align-items: center; gap: 8px; color: var(--muted); font-size: 10px; }
.route-preview .icon { width: 13px; height: 13px; flex-shrink: 0; }
.preview-endpoint { flex: 1; min-width: 0; }
.preview-endpoint span { display: block; font-size: 9px; margin-bottom: 3px; }
.preview-endpoint code { font-size: 9px; display: block; overflow-wrap: anywhere; color: var(--ink); }
.enable-choice { display: flex; align-items: flex-start; gap: 8px; margin: 0 0 17px; cursor: pointer; }
.enable-choice input { margin: 2px 0 0; }
.enable-choice strong { display: block; font-weight: 550; font-size: 11px; }
.enable-choice small { display: block; color: var(--muted); line-height: 1.5; font-size: 10px; margin-top: 4px; }
.editor-actions { display: flex; align-items: center; gap: 8px; padding-top: 3px; }
.editor-actions .primary { flex: 1; }
.editor-existing-actions { border-top: 1px solid var(--line); margin-top: 19px; padding-top: 14px; display: flex; justify-content: space-between; gap: 8px; }
.editor-existing-actions .text-button { font-size: 10px; }
.workspace-footer { display: flex; justify-content: space-between; gap: 14px; color: var(--muted); font-size: 9px; padding: 20px 32px; border-top: 1px solid var(--line); }
.node-list { display: flex; flex-direction: column; gap: 22px; }
.node-panel { border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.node-heading { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 18px 21px; border-bottom: 1px solid var(--line); background: var(--surface); }
.node-title { display: flex; align-items: center; gap: 10px; min-width: 0; }
.node-title > .icon { width: 20px; height: 20px; color: var(--muted); }
.node-title h3 { font-size: 14px; overflow-wrap: anywhere; }
.node-title p { font-size: 9px; color: var(--muted); font-family: var(--mono); margin-top: 3px; }
.node-head-status { display: flex; align-items: center; gap: 12px; font-size: 10px; color: var(--muted); white-space: nowrap; }
.node-details { padding: 18px 21px; }
.node-facts { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); column-gap: 24px; row-gap: 17px; margin: 0 0 21px; }
.node-facts dt { color: var(--muted); font-size: 10px; margin-bottom: 6px; }
.node-facts dd { margin: 0; font-size: 12px; line-height: 1.55; overflow-wrap: anywhere; }
.node-facts dd code { display: block; font-size: 11px; }
.node-facts dd small { display: block; font-size: 9px; color: var(--muted); margin-top: 3px; }
.node-subheading { font-size: 11px; font-weight: 600; margin-bottom: 10px; }
.reserved-ports { display: flex; gap: 5px; align-items: center; flex-wrap: wrap; margin-bottom: 22px; }
.port-chip { font: 10px/1.5 var(--mono); padding: 2px 6px; border: 1px solid var(--line); background: var(--surface); border-radius: 4px; color: var(--muted); }
.node-traffic { border: 1px solid var(--line); border-radius: 6px; overflow: hidden; margin-bottom: 18px; }
.node-traffic th,.node-traffic td { font-size: 10px; padding: 9px 11px; }
.node-traffic td:not(:first-child) { font-family: var(--mono); }
.node-listeners { border-top: 1px solid var(--line); }
.node-listeners summary { padding: 13px 0 0; font-weight: 550; font-size: 11px; cursor: pointer; }
.node-listeners[open] summary { margin-bottom: 12px; }
.listeners-wrap { overflow-x: auto; }
.listener-table th,.listener-table td { font-size: 10px; padding: 9px 10px; }
.listener-table td { font-family: var(--mono); }
.listener-table td:last-child { font-family: inherit; }
.node-message { color: var(--muted); font-size: 11px; padding: 12px 0; }
.node-warnings { margin: 0 0 16px; padding: 10px 12px; list-style: none; color: var(--warning); font-size: 11px; background: var(--warning-tint); border: 1px solid oklch(.88 .06 80); border-radius: 6px; }
.node-warnings li + li { margin-top: 7px; }
.event-table td { padding: 14px 12px; font-size: 11px; }
.event-table td:first-child { white-space: nowrap; font: 10px/1.65 var(--mono); color: var(--muted); width: 145px; }
.event-table td:nth-child(2) { width: 125px; font-weight: 550; }
.event-table td:nth-child(3) { overflow-wrap: anywhere; max-width: 550px; color: var(--muted); }
.event-table td:last-child { width: 70px; }
.confirm-dialog { width: min(430px,calc(100% - 32px)); padding: 0; border: 1px solid var(--line); border-radius: 10px; background: var(--bg); color: var(--ink); }
.confirm-dialog::backdrop { background: oklch(.15 .008 247 / .32); }
.dialog-content { padding: 27px; }
.dialog-icon { display: flex; align-items: center; justify-content: center; background: var(--danger-tint); color: var(--danger); border-radius: 8px; width: 36px; height: 36px; margin-bottom: 17px; }
.dialog-icon.neutral { color: var(--primary); background: var(--primary-tint); }
.dialog-content h2 { font-size: 18px; margin-bottom: 10px; }
.dialog-content p { color: var(--muted); font-size: 12px; white-space: pre-line; overflow-wrap: anywhere; }
.dialog-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 26px; }
.password-dialog .dialog-content h2 { margin-bottom: 8px; }
.password-dialog .password-intro { margin-bottom: 22px; font-size: 11px; }
.password-dialog .field { margin-bottom: 16px; }
.password-dialog .field label { font-size: 11px; }
.password-dialog .field-hint { font-size: 10px; }
.toasts { position: fixed; right: 24px; bottom: 23px; z-index: var(--z-toast); display: flex; flex-direction: column; gap: 8px; width: min(390px,calc(100vw - 32px)); pointer-events: none; }
.toast { display: flex; align-items: flex-start; gap: 9px; padding: 13px 12px 13px 15px; background: var(--ink); color: var(--bg); border-radius: 7px; pointer-events: auto; animation: toast-in .18s ease-out; }
.toast > .icon { width: 16px; height: 16px; margin-top: 2px; }
.toast p { flex: 1; font-size: 12px; overflow-wrap: anywhere; }
.toast .icon-button { color: oklch(.85 0 0); width: 22px; height: 22px; }
.toast .icon-button:hover { background: oklch(.4 .015 247); color: var(--bg); }
.toast.error { background: var(--danger); }
.probe-result { margin-top: 6px; font-size: 9px; line-height: 1.5; color: var(--muted); max-width: 210px; }
.probe-result.success { color: var(--success); }
.probe-result.failure { color: var(--danger); }
@keyframes rotate { to { transform: rotate(360deg); } }
@keyframes toast-in { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: translateY(0); } }
@media (min-width:1600px) { .mapping-layout.editor-open { grid-template-columns: minmax(0,1fr) 370px; } .mapping-route { gap: 12px; } .mapping-endpoint code { font-size: 11px; } }
@media (max-width:1200px) {
  .sidebar { width: 184px; }
  .workspace { margin-left: 184px; }
  .brand { padding-left: 19px; padding-right: 15px; }
  .topbar { padding: 0 25px; }
  #main-content { padding-left: 25px; padding-right: 25px; }
  .mapping-layout.editor-open { grid-template-columns: minmax(0,1fr) 310px; gap: 20px; }
  .editor { padding: 16px; }
  .editor-open .mapping-table thead { display: none; }
  .editor-open .mapping-table tbody { display: flex; flex-direction: column; }
  .editor-open .mapping-table tr { display: grid; grid-template-columns: minmax(0,1fr) auto; padding: 14px 0; border-bottom: 1px solid var(--line); }
  .editor-open .mapping-table tr:last-child { border-bottom: 0; }
  .editor-open .mapping-table td { padding: 3px 0; border: 0; }
  .editor-open .mapping-table td:first-child { grid-column: 1 / -1; margin-bottom: 8px; }
  .editor-open .mapping-table td:nth-child(2) { align-self: center; }
  .editor-open .mapping-table .status-cell { justify-self: end; }
  .editor-open .mapping-status { flex-direction: row; gap: 10px; align-items: center; }
  .editor-open .mapping-table td:last-child { grid-column: 1 / -1; margin-top: 6px; }
  .editor-open .row-actions { justify-content: flex-start; }
  .editor-open .filters { flex-wrap: wrap; }
  .editor-open .search-field { flex-basis: 100%; }
  .editor-open .filters > label:not(.search-field) { flex: 1; max-width: none; }
  .network-strip { gap: 15px; padding: 17px; }
  .network-link { width: 85px; }
  .network-node-address { flex-direction: column; gap: 2px; }
  .node-facts { grid-template-columns: repeat(3,minmax(0,1fr)); }
}
@media (max-width:920px) {
  .page-header { align-items: flex-start; }
  .page-utilities .button { padding: 8px 10px; }
  .page-utilities .button span { display: none; }
  .page-utilities .button .icon { width: 17px; height: 17px; }
  .mapping-layout.editor-open { grid-template-columns: minmax(0,1fr); }
  .editor { position: static; grid-row: 1; max-width: 560px; width: 100%; }
  .editor-open .mapping-table thead { display: table-header-group; }
  .editor-open .mapping-table tbody { display: table-row-group; }
  .editor-open .mapping-table tr { display: table-row; padding: 0; }
  .editor-open .mapping-table td { display: table-cell; padding: 15px 10px; border-top: 1px solid var(--line); }
  .editor-open .mapping-table td:first-child { padding-left: 0; }
  .editor-open .mapping-status { flex-direction: column; gap: 6px; align-items: flex-start; }
  .editor-open .row-actions { justify-content: flex-end; }
  .editor-open .filters { flex-wrap: nowrap; }
  .editor-open .search-field { flex-basis: auto; }
  .network-node-icon { display: none; }
  .network-link { width: 75px; }
  .network-strip { margin-bottom: 25px; }
  .node-facts { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .event-table td:nth-child(2) { width: auto; }
}
@media (max-width:700px) {
  :root { font-size: 14px; }
  .app { flex-direction: column; }
  .sidebar { width: 100%; position: static; border-right: 0; border-bottom: 1px solid var(--line); }
  .brand { padding: 17px 19px 14px; font-size: 17px; }
  .brand .brand-mark { width: 30px; height: 30px; border-radius: 7px; }
  .brand .brand-mark .icon { width: 20px; height: 20px; }
  .brand small { display: inline; font-size: 11px; letter-spacing: 0; margin-left: 11px; font-weight: 400; }
  .navigation { flex-direction: row; gap: 4px; padding: 0 12px 10px; }
  .nav-button { flex: 1; justify-content: center; padding: 9px; gap: 6px; min-height: 39px; font-size: 12px; }
  .nav-button .icon { width: 16px; height: 16px; }
  .nav-count { margin-left: 1px; font-size: 10px; }
  .sidebar-foot { display: none; }
  .workspace { margin-left: 0; }
  .topbar { min-height: 44px; padding: 0 20px; }
  .workspace-label { font-size: 10px; gap: 9px; }
  .workspace-root,.workspace-label .workspace-separator { display: none; }
  .account { font-size: 11px; gap: 5px; }
  .account > .icon { display: none; }
  #current-user { max-width: 110px; }
  #main-content { padding: 25px 19px; }
  h1 { font-size: 22px; }
  .page-header { gap: 12px; }
  .page-header p { font-size: 11px; margin-top: 6px; max-width: 280px; }
  .page-utilities { gap: 5px; }
  .page-utilities .button { padding: 7px 8px; min-height: 33px; }
  .page-utilities .button .icon { width: 15px; height: 15px; }
  .refresh-line { gap: 10px; font-size: 9px; margin-top: 17px; margin-bottom: 18px; }
  .network-strip { gap: 11px; padding: 15px; margin-bottom: 27px; }
  .network-node-name { font-size: 12px; gap: 5px; }
  .network-node-address { font-size: 9px; }
  .network-node-address code { font-size: 9px; }
  .network-link { width: 42px; gap: 3px; }
  .network-link-label { font-size: 0; gap: 0; }
  .network-link-label .icon { width: 17px; height: 17px; }
  .section-heading { gap: 12px; margin-bottom: 16px; }
  .section-heading h2 { font-size: 15px; }
  .section-heading p { font-size: 10px; }
  .section-heading .button { font-size: 11px; padding: 8px 10px; min-height: 35px; }
  .filters { flex-wrap: wrap; gap: 7px; }
  .filters .search-field,.editor-open .filters .search-field { flex-basis: 100%; }
  .filters > label:not(.search-field),.editor-open .filters > label:not(.search-field) { flex: 1; max-width: none; }
  .mapping-table thead,.editor-open .mapping-table thead { display: none; }
  .mapping-table tbody,.editor-open .mapping-table tbody { display: flex; flex-direction: column; }
  .mapping-table tr,.editor-open .mapping-table tr { display: grid; grid-template-columns: minmax(0,1fr) auto; padding: 16px 0; border-bottom: 1px solid var(--line); }
  .mapping-table tr:last-child,.editor-open .mapping-table tr:last-child { border-bottom: 0; }
  .mapping-table td,.editor-open .mapping-table td { display: block; padding: 3px 0; border: 0; }
  .mapping-table td:first-child,.editor-open .mapping-table td:first-child { grid-column: 1 / -1; margin-bottom: 11px; }
  .mapping-table td:nth-child(2) { align-self: center; }
  .mapping-table .status-cell { justify-self: end; }
  .mapping-status,.editor-open .mapping-status { flex-direction: row; align-items: center; gap: 12px; }
  .mapping-table td:last-child { grid-column: 1 / -1; margin-top: 5px; }
  .mapping-name { font-size: 13px; }
  .mapping-route { font-size: 10px; gap: 12px; }
  .mapping-endpoint code { font-size: 11px; }
  .mapping-endpoint-label { font-size: 9px; }
  .row-actions,.editor-open .row-actions { justify-content: flex-start; }
  .row-actions .text-button { font-size: 11px; min-height: 30px; padding: 3px 5px; }
  .state-toggle { font-size: 10px; }
  .status-tag { font-size: 10px; }
  .editor { padding: 19px; }
  .editor-header h2 { font-size: 17px; }
  .editor input:not([type="checkbox"]),.editor select { font-size: 14px; min-height: 41px; }
  .editor .field label { font-size: 12px; }
  .editor .field-hint { font-size: 10px; }
  .route-preview code { font-size: 10px; }
  .editor-actions .button { min-height: 40px; font-size: 13px; }
  .enable-choice strong { font-size: 12px; }
  .enable-choice small { font-size: 11px; }
  .workspace-footer { padding: 16px 19px; font-size: 9px; }
  .node-heading { padding: 15px; }
  .node-title h3 { font-size: 13px; }
  .node-head-status { gap: 7px; font-size: 9px; }
  .node-details { padding: 16px; }
  .node-facts { column-gap: 18px; }
  .node-facts dd code { font-size: 10px; }
  .node-facts dt { font-size: 9px; }
  .node-facts dd { font-size: 11px; }
  .event-table thead { display: none; }
  .event-table tbody { display: flex; flex-direction: column; }
  .event-table tr { display: grid; grid-template-columns: 1fr auto; padding: 13px 0; border-bottom: 1px solid var(--line); }
  .event-table tr:last-child { border-bottom: 0; }
  .event-table td { display: block; padding: 3px 0; border: 0; }
  .event-table td:first-child { width: auto; font-size: 9px; order: 0; }
  .event-table td:nth-child(2) { width: auto; grid-column: 1; order: 2; font-size: 12px; }
  .event-table td:nth-child(3) { max-width: none; grid-column: 1 / -1; order: 3; font-size: 11px; }
  .event-table td:last-child { width: auto; grid-column: 2; grid-row: 1; }
  .toasts { right: 16px; bottom: 16px; }
}
@media (max-width:380px) { #main-content { padding-left: 14px; padding-right: 14px; } .network-strip { padding: 12px; gap: 7px; } .network-link { width: 26px; } .network-node-address code { font-size: 8px; } .mapping-endpoint code { font-size: 10px; } .page-header h1 { font-size: 20px; } .page-utilities .button { min-height: 31px; padding: 7px; } }
@media (prefers-reduced-motion:reduce) { *,*::before,*::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; } }
