    :root {
      color-scheme: light;
      --bg: #f5f5f2;
      --sidebar: #fbfbf9;
      --surface: #ffffff;
      --surface-raised: #ffffff;
      --surface-soft: #f8faf8;
      --surface-hover: #f3f7f5;
      --ink: #172724;
      --ink-2: #40534f;
      --muted: #73817d;
      --faint: #9aa6a2;
      --line: #e3e8e5;
      --line-strong: #d6deda;
      --primary: #147d6c;
      --primary-hover: #0f6c5d;
      --primary-soft: #e9f5f1;
      --primary-line: #cce5dd;
      --online: #17816d;
      --online-soft: #e8f5f0;
      --danger: #c44747;
      --danger-soft: #fff0ee;
      --danger-line: #f1d5d1;
      --warning: #9a681c;
      --warning-soft: #fff7e8;
      --warning-line: #eee0c3;
      --unknown: #6c7875;
      --unknown-soft: #f0f2f1;
      --chart-cpu: #168574;
      --chart-memory: #6678c9;
      --chart-rx: #168574;
      --chart-tx: #b37a37;
      --chart-telecom: #2f72cf;
      --chart-unicom: #c94f4f;
      --chart-mobile: #c58a28;
      --shadow-sm: 0 1px 2px rgba(20, 42, 36, .025), 0 4px 16px rgba(20, 42, 36, .025);
      --shadow-md: 0 14px 40px rgba(20, 42, 36, .08), 0 2px 8px rgba(20, 42, 36, .04);
      --radius: 14px;
      --sidebar-width: 224px;
    }

    html[data-theme="dark"] {
      color-scheme: dark;
      --bg: #111a20;
      --sidebar: #151f26;
      --surface: #19252c;
      --surface-raised: #1d2a32;
      --surface-soft: #1c292f;
      --surface-hover: #213239;
      --ink: #e8efec;
      --ink-2: #bac9c4;
      --muted: #8fa29c;
      --faint: #71867f;
      --line: #2a393f;
      --line-strong: #36484e;
      --primary: #55bda8;
      --primary-hover: #70ceb9;
      --primary-soft: #1c3834;
      --primary-line: #2b5048;
      --online: #62c5ad;
      --online-soft: #1c3834;
      --danger: #ef8881;
      --danger-soft: #3b2728;
      --danger-line: #583537;
      --warning: #dbb66f;
      --warning-soft: #393225;
      --warning-line: #55492f;
      --unknown: #a0afaa;
      --unknown-soft: #29353a;
      --chart-cpu: #59c3ac;
      --chart-memory: #99a8f1;
      --chart-rx: #59c3ac;
      --chart-tx: #dfac6e;
      --chart-telecom: #79a9ff;
      --chart-unicom: #ff8585;
      --chart-mobile: #e8b45e;
      --shadow-sm: 0 1px 2px rgba(0, 0, 0, .08);
      --shadow-md: 0 18px 48px rgba(0, 0, 0, .28);
    }

    * { box-sizing: border-box; }
    [hidden] { display: none !important; }
    html { scroll-behavior: smooth; }
    body {
      margin: 0;
      min-width: 320px;
      background: var(--bg);
      color: var(--ink);
      font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
      font-size: 14px;
      line-height: 1.5;
      -webkit-font-smoothing: antialiased;
    }
    button, select, input { font: inherit; }
    button, select { -webkit-tap-highlight-color: transparent; }
    button { color: inherit; }
    button:not(:disabled), select:not(:disabled), [role="button"] { cursor: pointer; }
    button:focus-visible, select:focus-visible, input:focus-visible, [role="button"]:focus-visible {
      outline: 3px solid color-mix(in srgb, var(--primary) 30%, transparent);
      outline-offset: 3px;
    }
    a { color: inherit; }
    svg { display: block; }
    .icon { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; flex: 0 0 auto; }
    .icon-sm { width: 15px; height: 15px; }
    .num, .metric-value, .stat-value, .chart-current, code { font-variant-numeric: tabular-nums lining-nums; }
    .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; }

    .sidebar {
      position: fixed;
      inset: 0 auto 0 0;
      width: var(--sidebar-width);
      z-index: 30;
      display: flex;
      flex-direction: column;
      padding: 26px 16px 18px;
      background: var(--sidebar);
      border-right: 1px solid var(--line);
    }
    .brand { display: flex; align-items: center; gap: 11px; padding: 0 10px; }
    .brand-mark {
      width: 35px; height: 35px; border-radius: 11px;
      display: grid; place-items: center;
      color: #fff; background: #147d6c;
      box-shadow: 0 5px 14px rgba(20, 125, 108, .2);
    }
    .brand-mark .icon { width: 21px; height: 21px; stroke-width: 2; }
    .brand-name { font-size: 20px; font-weight: 730; letter-spacing: .08em; line-height: 1.15; }
    .brand-sub { margin-top: 3px; color: var(--muted); font-size: 10px; letter-spacing: .12em; text-transform: uppercase; }
    .environment {
      margin: 27px 5px 24px;
      padding: 11px 12px;
      display: flex; align-items: center; gap: 9px;
      border: 1px solid var(--line);
      border-radius: 10px;
      background: var(--surface);
      color: var(--ink-2);
      font-size: 12px;
    }
    .environment .env-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--online); box-shadow: 0 0 0 3px var(--online-soft); }
    .nav-label { padding: 0 12px 8px; color: var(--faint); font-size: 10px; font-weight: 650; letter-spacing: .12em; }
    .side-nav { display: grid; gap: 5px; }
    .nav-item {
      width: 100%; min-height: 43px; padding: 0 12px;
      display: flex; align-items: center; gap: 11px;
      border: 0; border-radius: 9px;
      background: transparent; color: var(--muted);
      text-align: left; font-size: 13px; font-weight: 520;
      transition: background .16s, color .16s;
    }
    .nav-item:hover { background: var(--surface-hover); color: var(--ink); }
    .nav-item.active { background: var(--primary-soft); color: var(--primary); font-weight: 650; }
    .nav-item .nav-count { margin-left: auto; min-width: 21px; padding: 1px 6px; border-radius: 10px; background: var(--danger-soft); color: var(--danger); text-align: center; font-size: 11px; }
    .sidebar-bottom { margin-top: auto; }
    .privacy-note { margin: 14px 5px 16px; padding: 14px; border-radius: 11px; background: var(--surface-soft); border: 1px solid var(--line); }
    .privacy-note-title { display: flex; align-items: center; gap: 7px; font-size: 12px; font-weight: 650; color: var(--ink-2); }
    .privacy-note p { margin: 7px 0 0; color: var(--muted); font-size: 11px; line-height: 1.7; }
    .profile { display: flex; align-items: center; gap: 10px; padding: 12px 8px 0; border-top: 1px solid var(--line); }
    .avatar { width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; background: var(--surface-soft); border: 1px solid var(--line-strong); color: var(--ink-2); font-size: 12px; font-weight: 700; }
    .profile-name { font-size: 12px; font-weight: 600; }
    .profile-role { color: var(--muted); font-size: 10px; }

    .app-shell { min-height: 100vh; margin-left: var(--sidebar-width); }
    .topbar {
      height: 68px; padding: 0 34px;
      display: flex; align-items: center; justify-content: space-between; gap: 18px;
      border-bottom: 1px solid var(--line);
      background: color-mix(in srgb, var(--bg) 90%, transparent);
      position: sticky; top: 0; z-index: 20;
      backdrop-filter: blur(14px);
    }
    .crumbs { display: flex; align-items: center; gap: 8px; color: var(--muted); font-size: 12px; }
    .crumbs strong { color: var(--ink-2); font-weight: 600; }
    .demo-badge { display: inline-flex; align-items: center; gap: 5px; padding: 3px 8px; margin-left: 6px; border: 1px solid var(--warning-line); border-radius: 6px; color: var(--warning); background: var(--warning-soft); font-size: 10px; font-weight: 650; }
    .top-actions { display: flex; align-items: center; gap: 9px; }
    .preview-control { display: flex; align-items: center; gap: 7px; color: var(--muted); font-size: 11px; }
    .preview-control select {
      height: 34px; padding: 0 28px 0 10px;
      border: 1px solid var(--line); border-radius: 8px;
      background: var(--surface); color: var(--ink-2); font-size: 11px;
    }
    .icon-button {
      width: 36px; height: 36px; padding: 0;
      display: inline-grid; place-items: center;
      appearance: none; -webkit-appearance: none;
      border: 1px solid var(--line); border-radius: 9px;
      background: var(--surface); color: var(--ink-2);
      transition: background .16s, border-color .16s, transform .16s;
    }
    .icon-button:hover { background: var(--surface-hover); border-color: var(--line-strong); }
    .icon-button:active { transform: translateY(1px); }
    #themeToggle { background-color: var(--surface); color: var(--ink-2); transition: border-color .16s, transform .16s; }
    #themeToggle .icon { color: inherit; fill: none; stroke: currentColor; stroke-width: 1.8; }
    html[data-theme="dark"] #themeToggle { background-color: #19252c; color: #e8efec; border-color: #36484e; }
    html[data-theme="dark"] #themeToggle:hover { background-color: #213239; color: #ffffff; border-color: #52656b; }
    .mobile-nav-label { display: none; }

    main { width: 100%; max-width: 1540px; margin: 0 auto; padding: 30px 34px 22px; }
    .page-heading { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; margin-bottom: 25px; }
    .eyebrow { margin-bottom: 5px; color: var(--primary); font-size: 11px; font-weight: 700; letter-spacing: .1em; }
    h1 { margin: 0; font-size: clamp(25px, 2.2vw, 31px); line-height: 1.25; letter-spacing: -.035em; font-weight: 710; }
    .heading-sub { margin: 8px 0 0; color: var(--muted); font-size: 12px; }
    .heading-sub .divider { margin: 0 7px; color: var(--line-strong); }
    .button {
      min-height: 40px; padding: 0 15px;
      display: inline-flex; align-items: center; justify-content: center; gap: 8px;
      border: 1px solid var(--line-strong); border-radius: 9px;
      background: var(--surface); color: var(--ink-2);
      font-size: 12px; font-weight: 620;
      transition: background .16s, border-color .16s, transform .16s, box-shadow .16s;
    }
    .button:hover { background: var(--surface-hover); border-color: color-mix(in srgb, var(--line-strong) 70%, var(--ink)); }
    .button:active { transform: translateY(1px); }
    .button-primary { background: var(--primary); border-color: var(--primary); color: #fff; box-shadow: 0 4px 12px color-mix(in srgb, var(--primary) 18%, transparent); }
    html[data-theme="dark"] .button-primary { color: #10231f; }
    .button-primary:hover { background: var(--primary-hover); border-color: var(--primary-hover); }
    .button-quiet { border-color: transparent; background: transparent; box-shadow: none; }
    .button-danger-quiet { color: var(--danger); }

    .stats-panel {
      display: grid; grid-template-columns: repeat(4, 1fr);
      margin-bottom: 18px; padding: 4px 0;
      border: 1px solid var(--line); border-radius: var(--radius);
      background: var(--surface); box-shadow: var(--shadow-sm);
    }
    .stat { min-height: 95px; padding: 19px 24px; display: flex; align-items: center; gap: 15px; position: relative; }
    .stat:not(:last-child)::after { content: ""; position: absolute; right: 0; top: 21px; bottom: 21px; width: 1px; background: var(--line); }
    .stat-icon { width: 39px; height: 39px; border-radius: 11px; display: grid; place-items: center; color: var(--ink-2); background: var(--surface-soft); border: 1px solid var(--line); }
    .stat.online .stat-icon { color: var(--online); background: var(--online-soft); border-color: transparent; }
    .stat.offline .stat-icon { color: var(--danger); background: var(--danger-soft); border-color: transparent; }
    .stat-label { color: var(--muted); font-size: 11px; margin-bottom: 1px; }
    .stat-value { font-size: 26px; line-height: 1.15; font-weight: 690; letter-spacing: -.04em; }
    .stat-unit { margin-left: 4px; color: var(--faint); font-size: 10px; font-weight: 500; letter-spacing: 0; }
    .stat.offline .stat-value { color: var(--danger); }

    .alert {
      display: flex; align-items: center; gap: 13px;
      min-height: 60px; margin-bottom: 22px; padding: 11px 15px;
      border: 1px solid var(--danger-line); border-radius: 11px;
      background: var(--danger-soft);
    }
    .alert-icon { width: 32px; height: 32px; flex: 0 0 auto; display: grid; place-items: center; border-radius: 9px; background: color-mix(in srgb, var(--danger) 10%, transparent); color: var(--danger); }
    .alert-copy { min-width: 0; flex: 1; }
    .alert-title { color: var(--danger); font-size: 12px; font-weight: 680; }
    .alert-desc { margin-top: 2px; color: var(--ink-2); font-size: 11px; }
    .alert .button { min-height: 33px; background: transparent; border-color: var(--danger-line); color: var(--danger); }
    .alert.warning { background: var(--warning-soft); border-color: var(--warning-line); }
    .alert.warning .alert-icon, .alert.warning .alert-title { color: var(--warning); }
    .alert.warning .alert-icon { background: color-mix(in srgb, var(--warning) 10%, transparent); }

    .list-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 14px; margin-bottom: 15px; }
    .filter-tabs { display: flex; align-items: center; gap: 4px; padding: 3px; border: 1px solid var(--line); border-radius: 9px; background: var(--surface); }
    .filter-tab { min-height: 31px; padding: 0 12px; border: 0; border-radius: 6px; background: transparent; color: var(--muted); font-size: 11px; }
    .filter-tab:hover:not(:disabled) { color: var(--ink); background: var(--surface-hover); }
    .filter-tab.active { color: var(--ink); background: var(--surface-soft); box-shadow: 0 0 0 1px var(--line); font-weight: 650; }
    .filter-tab:disabled { opacity: .45; cursor: not-allowed; }
    .tab-count { margin-left: 4px; color: var(--faint); font-variant-numeric: tabular-nums; }
    .list-caption { display: flex; align-items: center; gap: 6px; color: var(--muted); font-size: 11px; }

    .node-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 15px; }
    .node-card {
      min-width: 0; min-height: 238px; padding: 18px;
      border: 1px solid var(--line); border-radius: 13px;
      background: var(--surface); box-shadow: var(--shadow-sm);
      transition: transform .18s, border-color .18s, box-shadow .18s;
    }
    .node-card[role="button"]:hover { transform: translateY(-2px); border-color: var(--primary-line); box-shadow: 0 10px 25px rgba(25, 57, 48, .06); }
    html[data-theme="dark"] .node-card[role="button"]:hover { box-shadow: 0 10px 28px rgba(0,0,0,.18); }
    .node-card.offline-card { border-color: var(--danger-line); }
    .node-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
    .node-identity { display: flex; align-items: center; min-width: 0; gap: 11px; }
    .server-glyph { width: 37px; height: 37px; flex: 0 0 auto; display: grid; place-items: center; border: 1px solid var(--line); border-radius: 10px; background: var(--surface-soft); color: var(--ink-2); }
    .offline-card .server-glyph { color: var(--danger); background: var(--danger-soft); border-color: transparent; }
    .node-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 14px; font-weight: 680; letter-spacing: -.01em; }
    .node-location { margin-top: 2px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--muted); font-size: 10px; }
    .status-badge { flex: 0 0 auto; display: inline-flex; align-items: center; gap: 5px; padding: 4px 8px; border-radius: 20px; background: var(--online-soft); color: var(--online); font-size: 10px; font-weight: 650; white-space: nowrap; }
    .status-dot { width: 5px; height: 5px; border-radius: 50%; background: currentColor; }
    .status-badge.offline { color: var(--danger); background: var(--danger-soft); }
    .status-badge.stale { color: var(--warning); background: var(--warning-soft); }
    .status-badge.unknown { color: var(--unknown); background: var(--unknown-soft); }
    .resources { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 14px; margin-top: 20px; }
    .metric-top { display: flex; align-items: baseline; justify-content: space-between; gap: 4px; }
    .metric-label { color: var(--muted); font-size: 10px; }
    .metric-value { color: var(--ink-2); font-size: 12px; font-weight: 650; }
    .meter { height: 4px; margin-top: 8px; overflow: hidden; border-radius: 5px; background: var(--surface-soft); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--line) 60%, transparent); }
    .meter > span { display: block; height: 100%; border-radius: inherit; background: var(--primary); }
    .meter.memory > span { background: #7182ca; }
    .meter.disk > span { background: #8b9692; }
    html[data-theme="dark"] .meter.memory > span { background: #99a8e4; }
    .network-row { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 10px; margin-top: 17px; padding: 12px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
    .network-item { display: flex; align-items: center; gap: 6px; min-width: 0; color: var(--muted); font-size: 10px; }
    .network-item .icon { color: var(--faint); }
    .network-item strong { margin-left: auto; color: var(--ink-2); font-size: 10px; font-weight: 600; white-space: nowrap; }
    .node-foot { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: 11px; color: var(--muted); font-size: 10px; }
    .last-seen { display: flex; align-items: center; gap: 5px; }
    .details-link { display: flex; align-items: center; gap: 2px; color: var(--primary); font-weight: 600; }
    .offline-summary { margin-top: 18px; padding: 13px; border-radius: 9px; background: var(--danger-soft); }
    .offline-summary-title { display: flex; align-items: center; gap: 7px; color: var(--danger); font-size: 11px; font-weight: 650; }
    .offline-summary p { margin: 5px 0 0; color: var(--ink-2); font-size: 10px; line-height: 1.7; }
    .offline-card .network-row { margin-top: 12px; padding-bottom: 0; border-bottom: 0; }
    .unknown-summary { margin-top: 26px; padding: 20px 12px; text-align: center; border: 1px dashed var(--line-strong); border-radius: 9px; color: var(--muted); font-size: 11px; }

    .state-panel { grid-column: 1 / -1; min-height: 300px; padding: 48px 24px; display: grid; place-items: center; text-align: center; border: 1px dashed var(--line-strong); border-radius: var(--radius); background: color-mix(in srgb, var(--surface) 60%, transparent); }
    .state-icon { width: 52px; height: 52px; margin: 0 auto 15px; display: grid; place-items: center; border: 1px solid var(--line); border-radius: 15px; background: var(--surface); color: var(--muted); }
    .state-icon .icon { width: 24px; height: 24px; }
    .state-title { margin: 0; font-size: 16px; font-weight: 670; }
    .state-desc { max-width: 380px; margin: 8px auto 18px; color: var(--muted); font-size: 12px; line-height: 1.8; }
    .skeleton-card { min-height: 238px; padding: 18px; border: 1px solid var(--line); border-radius: 13px; background: var(--surface); }
    .skeleton { position: relative; overflow: hidden; border-radius: 6px; background: var(--surface-soft); }
    .skeleton::after { content: ""; position: absolute; inset: 0; transform: translateX(-100%); background: linear-gradient(90deg, transparent, color-mix(in srgb, var(--surface) 75%, transparent), transparent); animation: shimmer 1.5s infinite; }
    @keyframes shimmer { to { transform: translateX(100%); } }

    .page-footer { margin-top: 28px; padding: 17px 2px 4px; display: flex; align-items: center; justify-content: space-between; gap: 16px; border-top: 1px solid var(--line); color: var(--muted); font-size: 10px; }
    .security-line { display: flex; align-items: center; gap: 7px; }
    .security-line .icon { color: var(--primary); }
    .footer-meta { text-align: right; }

    /* Node details */
    .back-button { margin: -4px 0 20px; padding-left: 0; }
    .detail-heading { align-items: center; margin-bottom: 20px; }
    .detail-title-wrap { display: flex; align-items: center; gap: 13px; }
    .detail-title-wrap .server-glyph { width: 45px; height: 45px; border-radius: 12px; }
    .detail-title-line { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; }
    .detail-title-line h1 { font-size: 26px; }
    .detail-heading .heading-sub { margin-top: 4px; }
    .detail-info { display: grid; grid-template-columns: repeat(4, 1fr); margin-bottom: 18px; padding: 18px 0; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
    .info-item { padding: 0 20px; min-width: 0; }
    .info-item:not(:last-child) { border-right: 1px solid var(--line); }
    .info-label { color: var(--muted); font-size: 10px; }
    .info-value { margin-top: 5px; color: var(--ink-2); font-size: 12px; font-weight: 570; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
    .detail-section-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin: 25px 0 13px; }
    .section-title { margin: 0; font-size: 14px; font-weight: 680; }
    .section-sub { margin: 4px 0 0; color: var(--muted); font-size: 10px; }
    .range-tabs { display: flex; gap: 3px; padding: 3px; border: 1px solid var(--line); border-radius: 9px; background: var(--surface); }
    .range-button { min-width: 43px; min-height: 30px; padding: 0 10px; border: 0; border-radius: 6px; background: transparent; color: var(--muted); font-size: 11px; }
    .range-button:hover { background: var(--surface-hover); color: var(--ink); }
    .range-button.active { color: var(--primary); background: var(--primary-soft); font-weight: 700; }
    .chart-grid-layout { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 15px; }
    .chart-card { min-width: 0; padding: 18px 18px 13px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); box-shadow: var(--shadow-sm); }
    .chart-card.network-card { grid-column: 1 / -1; }
    .chart-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
    .chart-name { color: var(--ink-2); font-size: 12px; font-weight: 650; }
    .chart-sub { margin-top: 3px; color: var(--muted); font-size: 10px; }
    .chart-current { color: var(--ink); font-size: 22px; font-weight: 690; letter-spacing: -.035em; }
    .chart-current small { margin-left: 2px; color: var(--muted); font-size: 10px; font-weight: 500; letter-spacing: 0; }
    .trend-chart { position: relative; width: 100%; margin-top: 7px; }
    .trend-chart svg { width: 100%; height: auto; min-height: 160px; overflow: visible; }
    .chart-grid-line { stroke: var(--line); stroke-width: 1; stroke-dasharray: 3 4; }
    .chart-axis-text { fill: var(--faint); font-size: 9px; font-family: inherit; }
    .chart-line { fill: none; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
    .chart-hover-line { stroke: var(--line-strong); stroke-width: 1; }
    .chart-hit { fill: transparent; cursor: crosshair; }
    .chart-tooltip { position: absolute; z-index: 4; top: 12px; min-width: 112px; padding: 8px 10px; pointer-events: none; border: 1px solid var(--line-strong); border-radius: 8px; background: var(--surface-raised); box-shadow: var(--shadow-md); color: var(--ink-2); font-size: 10px; transform: translateX(-50%); }
    .chart-tooltip strong { display: block; margin-bottom: 4px; color: var(--muted); font-weight: 550; }
    .tooltip-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 2px; }
    .chart-foot { display: flex; align-items: center; gap: 20px; padding-top: 10px; border-top: 1px solid var(--line); color: var(--muted); font-size: 10px; }
    .chart-foot strong { margin-left: 4px; color: var(--ink-2); font-weight: 600; }
    .chart-legend { display: flex; align-items: center; gap: 12px; color: var(--muted); font-size: 10px; }
    .legend-item { display: flex; align-items: center; gap: 5px; }
    .legend-line { width: 12px; height: 2px; border-radius: 2px; }
    .disk-card { margin-top: 15px; padding: 18px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
    .disk-list { display: grid; gap: 14px; margin-top: 16px; }
    .disk-row { display: grid; grid-template-columns: minmax(140px, .8fr) 2fr 110px; align-items: center; gap: 20px; }
    .disk-name { display: flex; align-items: center; gap: 8px; color: var(--ink-2); font-size: 11px; }
    .disk-usage { color: var(--muted); font-size: 10px; text-align: right; }
    .disk-usage strong { color: var(--ink-2); font-weight: 600; }
    .disk-row .meter { margin: 0; height: 6px; }
    .offline-detail-hero { padding: 30px; text-align: center; border: 1px solid var(--danger-line); border-radius: var(--radius); background: var(--surface); }
    .offline-detail-hero .state-icon { color: var(--danger); background: var(--danger-soft); border-color: var(--danger-line); }
    .last-known { margin-top: 18px; padding: 20px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
    .last-known-grid { display: grid; grid-template-columns: repeat(3,1fr); gap: 12px; margin-top: 16px; }
    .last-known-item { padding: 16px; border-radius: 10px; background: var(--surface-soft); }
    .last-known-item strong { display: block; margin-top: 5px; color: var(--muted); font-size: 22px; font-weight: 650; }

    /* Dialog */
    .modal-backdrop { position: fixed; inset: 0; z-index: 100; display: grid; place-items: center; padding: 20px; background: rgba(13, 26, 24, .48); backdrop-filter: blur(5px); }
    .modal { width: min(570px, 100%); max-height: calc(100vh - 40px); overflow: auto; border: 1px solid var(--line); border-radius: 17px; background: var(--surface-raised); box-shadow: var(--shadow-md); }
    .modal-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 15px; padding: 23px 24px 18px; border-bottom: 1px solid var(--line); }
    .modal-title { margin: 0; font-size: 18px; font-weight: 700; letter-spacing: -.02em; }
    .modal-desc { margin: 5px 0 0; color: var(--muted); font-size: 11px; }
    .modal-body { padding: 22px 24px; }
    .steps { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-bottom: 21px; }
    .step { display: flex; align-items: center; gap: 9px; padding: 10px; border-radius: 9px; background: var(--surface-soft); color: var(--muted); font-size: 11px; }
    .step.active { color: var(--primary); background: var(--primary-soft); }
    .step-number { width: 21px; height: 21px; flex: 0 0 auto; display: grid; place-items: center; border: 1px solid currentColor; border-radius: 50%; font-size: 10px; font-weight: 700; }
    .field-label { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 8px; color: var(--ink-2); font-size: 11px; font-weight: 620; }
    .demo-label { padding: 2px 6px; border-radius: 5px; color: var(--danger); background: var(--danger-soft); font-size: 9px; font-weight: 650; }
    .token-box { display: flex; align-items: center; gap: 8px; padding: 7px 7px 7px 12px; border: 1px solid var(--line-strong); border-radius: 9px; background: var(--surface-soft); }
    .token-box code { min-width: 0; flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--ink-2); font-family: ui-monospace, SFMono-Regular, Consolas, monospace; font-size: 11px; user-select: all; }
    .token-box .button { min-height: 32px; flex: 0 0 auto; padding: 0 10px; }
    .validity { display: flex; align-items: center; gap: 5px; margin-top: 7px; color: var(--warning); font-size: 10px; }
    .command-label { margin: 19px 0 8px; color: var(--ink-2); font-size: 11px; font-weight: 620; }
    .command-box { padding: 13px; overflow-wrap: anywhere; border-radius: 9px; background: #14231f; color: #c5ded5; font-family: ui-monospace, SFMono-Regular, Consolas, monospace; font-size: 10px; line-height: 1.8; }
    html[data-theme="dark"] .command-box { background: #10191e; }
    .command-note { margin: 7px 0 0; color: var(--muted); font-size: 10px; }
    .security-tips { display: grid; grid-template-columns: 1fr 1fr; gap: 9px 14px; margin-top: 20px; padding: 14px; border: 1px solid var(--line); border-radius: 10px; }
    .security-tip { display: flex; align-items: center; gap: 7px; color: var(--ink-2); font-size: 10px; }
    .security-tip .icon { color: var(--primary); }
    .prototype-note { margin: 16px 0 0; padding: 10px 12px; border-radius: 8px; background: var(--warning-soft); color: var(--warning); font-size: 10px; line-height: 1.7; }
    .modal-foot { display: flex; justify-content: flex-end; gap: 9px; padding: 16px 24px 20px; border-top: 1px solid var(--line); }

    .toast { position: fixed; z-index: 150; left: 50%; bottom: 26px; transform: translate(-50%, 15px); display: flex; align-items: center; gap: 8px; max-width: calc(100% - 32px); padding: 11px 15px; border: 1px solid var(--line-strong); border-radius: 10px; background: var(--surface-raised); box-shadow: var(--shadow-md); color: var(--ink-2); font-size: 11px; opacity: 0; pointer-events: none; transition: opacity .18s, transform .18s; }
    .toast.show { opacity: 1; transform: translate(-50%, 0); }
    .toast .icon { color: var(--primary); }

    @media (min-width: 1500px) { .node-grid { grid-template-columns: repeat(4, minmax(0,1fr)); } }
    @media (max-width: 1120px) {
      :root { --sidebar-width: 202px; }
      main { padding: 26px 24px 20px; }
      .topbar { padding: 0 24px; }
      .node-grid { grid-template-columns: repeat(2, minmax(0,1fr)); }
      .stat { padding: 17px; gap: 10px; }
      .stat-icon { width: 34px; height: 34px; }
      .preview-control > span { display: none; }
      .detail-info { grid-template-columns: repeat(2,1fr); gap: 16px 0; }
      .info-item:nth-child(2) { border-right: 0; }
    }
    @media (max-width: 760px) {
      :root { --sidebar-width: 0px; }
      .sidebar { position: relative; inset: auto; width: 100%; height: 64px; padding: 0 18px; flex-direction: row; align-items: center; justify-content: space-between; border-right: 0; border-bottom: 1px solid var(--line); }
      .brand { padding: 0; }
      .brand-mark { width: 31px; height: 31px; border-radius: 9px; }
      .brand-name { font-size: 18px; }
      .brand-sub, .environment, .side-nav, .nav-label, .sidebar-bottom { display: none; }
      .mobile-nav-label { display: inline-flex; align-items: center; gap: 6px; padding: 6px 10px; border-radius: 8px; background: var(--primary-soft); color: var(--primary); font-size: 11px; font-weight: 650; }
      .app-shell { margin-left: 0; }
      .topbar { height: 54px; padding: 0 18px; }
      .crumbs { display: none; }
      .top-actions { width: 100%; justify-content: space-between; }
      .preview-control > span { display: inline; }
      main { padding: 23px 18px 18px; }
      .page-heading { align-items: flex-start; margin-bottom: 20px; }
      .heading-sub .divider, .heading-sub .timezone { display: none; }
      h1 { font-size: 25px; }
      .page-heading > .button { min-width: 40px; padding: 0 12px; }
      .stats-panel { grid-template-columns: repeat(2,1fr); }
      .stat { min-height: 79px; padding: 14px 16px; }
      .stat:nth-child(2)::after { display: none; }
      .stat:nth-child(-n+2) { border-bottom: 1px solid var(--line); }
      .stat-value { font-size: 23px; }
      .alert { align-items: flex-start; flex-wrap: wrap; padding: 12px; }
      .alert-copy { padding-top: 1px; }
      .alert > .button { margin-left: 44px; }
      .list-toolbar { align-items: flex-start; }
      .list-caption { display: none; }
      .filter-tabs { width: 100%; overflow-x: auto; }
      .filter-tab { flex: 1; white-space: nowrap; padding: 0 8px; }
      .node-grid { grid-template-columns: 1fr; }
      .node-card { min-height: 230px; }
      .page-footer { align-items: flex-start; flex-direction: column; gap: 6px; }
      .footer-meta { text-align: left; }
      .detail-heading { align-items: flex-start; flex-direction: column; }
      .detail-title-wrap { align-items: flex-start; }
      .detail-title-line h1 { font-size: 22px; }
      .detail-heading > .button { align-self: stretch; }
      .detail-section-head { align-items: flex-start; flex-direction: column; }
      .range-tabs { width: 100%; }
      .range-button { flex: 1; min-height: 36px; }
      .chart-grid-layout { grid-template-columns: 1fr; }
      .chart-card.network-card { grid-column: auto; }
      .chart-card { padding: 15px 12px 12px; }
      .trend-chart svg { min-height: 145px; }
      .disk-row { grid-template-columns: 1fr; gap: 7px; }
      .disk-usage { text-align: left; }
      .last-known-grid { grid-template-columns: 1fr; }
      .modal-backdrop { padding: 12px; align-items: end; }
      .modal { max-height: calc(100vh - 24px); border-radius: 16px 16px 12px 12px; }
      .modal-head, .modal-body { padding-left: 18px; padding-right: 18px; }
      .modal-foot { padding-left: 18px; padding-right: 18px; }
      .security-tips { grid-template-columns: 1fr; }
    }
    @media (max-width: 390px) {
      main { padding-left: 14px; padding-right: 14px; }
      .topbar { padding: 0 14px; }
      .preview-control > span { display: none; }
      .stat { padding: 13px; }
      .stat-icon { display: none; }
      .page-heading { gap: 10px; }
      #dashboardTitle { font-size: 22px; letter-spacing: -.045em; }
      .page-heading > .button { padding: 0 10px; gap: 6px; font-size: 11px; white-space: nowrap; }
      .network-row { gap: 5px; }
      .network-item { gap: 4px; }
      .network-item strong { font-size: 9px; }
      .detail-info { grid-template-columns: 1fr; }
      .info-item { padding: 8px 16px; }
      .info-item:not(:last-child) { border-right: 0; border-bottom: 1px solid var(--line); }
      .info-item:last-child { padding-bottom: 0; }
      .info-item:first-child { padding-top: 0; }
      .steps { grid-template-columns: 1fr; }
    }
    @media (prefers-reduced-motion: reduce) {
      *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
    }
/* Real application additions */
.svg-defs { position: absolute; width: 0; height: 0; overflow: hidden; }
.mobile-only { display: none; }
.live-badge { display: inline-flex; align-items: center; gap: 6px; margin-left: 4px; padding: 3px 8px; border: 1px solid var(--line); border-radius: 20px; background: var(--surface); color: var(--muted); font-size: 10px; }
.live-dot { width: 5px; height: 5px; border-radius: 50%; background: var(--online); box-shadow: 0 0 0 3px var(--online-soft); }
.refresh-note { color: var(--muted); font-size: 10px; }
.environment .demo-badge { color: var(--muted); border-color: var(--line); background: var(--surface-soft); }
.profile-copy { min-width: 0; flex: 1; }
.profile-logout { width: 30px; height: 30px; display: grid; place-items: center; border: 0; border-radius: 7px; background: transparent; color: var(--faint); }
.profile-logout:hover { color: var(--danger); background: var(--danger-soft); }
.node-name-wrap { min-width: 0; }
.unknown-hint { font-size: 10px; color: var(--faint); }
.chart-live { margin-left: auto; color: var(--faint); }
.button:disabled { opacity: .55; cursor: wait; transform: none !important; }
.inline-note { max-width: 540px; margin: 12px auto 0; color: var(--muted); font-size: 11px; line-height: 1.8; }
.form-field { display: block; margin-bottom: 17px; }
.form-field .field-label { margin-bottom: 8px; }
.field-label small { color: var(--faint); font-weight: 400; }
.text-input { width: 100%; height: 43px; padding: 0 13px; border: 1px solid var(--line-strong); border-radius: 9px; background: var(--surface); color: var(--ink); outline: none; }
.text-input::placeholder { color: var(--faint); }
.text-input:focus { border-color: var(--primary); box-shadow: 0 0 0 3px color-mix(in srgb, var(--primary) 13%, transparent); }
.form-error { margin: 0 0 12px; padding: 9px 11px; border: 1px solid var(--danger-line); border-radius: 8px; background: var(--danger-soft); color: var(--danger); font-size: 11px; }
.command-box { white-space: pre-wrap; user-select: all; }
.detail-actions { display: flex; align-items: center; justify-content: flex-end; gap: 7px; flex-wrap: wrap; }
.detail-actions .button { min-height: 35px; padding: 0 11px; }
.chart-empty { min-height: 190px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 9px; color: var(--faint); font-size: 11px; border: 1px dashed var(--line); border-radius: 9px; }
.chart-empty .icon { width: 23px; height: 23px; opacity: .7; }
.disk-name small { display: block; max-width: 210px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--faint); font-size: 9px; }
.audit-card { min-height: 300px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); overflow: hidden; }
.audit-row { display: grid; grid-template-columns: 132px minmax(0,1fr) 140px; gap: 18px; align-items: center; padding: 15px 18px; border-bottom: 1px solid var(--line); }
.audit-row:last-child { border-bottom: 0; }
.audit-time, .audit-ip { color: var(--muted); font-size: 10px; font-variant-numeric: tabular-nums; }
.audit-ip { text-align: right; overflow: hidden; text-overflow: ellipsis; }
.audit-action { color: var(--ink-2); font-size: 12px; font-weight: 600; }
.audit-result { display: inline-block; margin-left: 5px; padding: 1px 6px; border-radius: 5px; font-size: 9px; font-weight: 600; }
.audit-result.ok { color: var(--online); background: var(--online-soft); }
.audit-result.deny { color: var(--danger); background: var(--danger-soft); }
.audit-detail { margin-top: 3px; color: var(--muted); font-size: 10px; overflow-wrap: anywhere; }
.audit-empty { min-height: 300px; display: grid; place-items: center; align-content: center; gap: 10px; color: var(--muted); font-size: 12px; text-align: center; }
.audit-empty .icon { width: 26px; height: 26px; margin: 0 auto; }
.audit-loading { padding: 24px 18px; }
.skeleton-line { height: 20px; }
.skeleton-sub { height: 10px; margin-top: 12px; }
.skeleton-box { height: 40px; }
.skeleton-foot { height: 45px; margin-top: 25px; }
.skeleton-hero { height: 80px; margin-top: 22px; border-radius: 12px; }
.skeleton-hero.short { height: 220px; }
.skeleton-metrics { display: grid; grid-template-columns: repeat(3, 1fr); gap: 15px; margin-top: 32px; }
.w30 { width: 30%; } .w45 { width: 45%; } .w68 { width: 68%; }
.detail-loading { padding-top: 6px; }
.range-button, .filter-tab { transition: background .15s, color .15s; }
.mobile-tabbar { display: none; }

@media (max-width: 1120px) {
  .audit-row { grid-template-columns: 110px minmax(0,1fr); }
  .audit-ip { display: none; }
}
@media (max-width: 760px) {
  body { padding-bottom: 70px; }
  .mobile-only { display: inline-grid; }
  .mobile-nav-label { display: none; }
  .refresh-note { display: none; }
  .top-actions { width: auto; justify-content: flex-end; }
  .topbar { justify-content: flex-end; }
  .detail-actions { width: 100%; justify-content: flex-start; }
  .detail-actions .button { flex: 1; }
  .audit-row { grid-template-columns: 1fr; gap: 4px; padding: 14px 15px; }
  .audit-time { order: 2; }
  .audit-main { order: 1; }
  .audit-ip { display: none; }
  .mobile-tabbar { position: fixed; z-index: 25; left: 0; right: 0; bottom: 0; height: 64px; display: grid; grid-template-columns: repeat(4, 1fr); padding: 5px 8px calc(5px + env(safe-area-inset-bottom)); border-top: 1px solid var(--line); background: color-mix(in srgb, var(--surface) 94%, transparent); backdrop-filter: blur(16px); }
  .mobile-tab { min-width: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; border: 0; border-radius: 9px; background: transparent; color: var(--muted); font-size: 9px; }
  .mobile-tab .icon { width: 19px; height: 19px; }
  .mobile-tab.active { color: var(--primary); background: var(--primary-soft); }
  .modal { padding-bottom: env(safe-area-inset-bottom); }
  .security-tips { gap: 8px; }
}
@media (max-width: 390px) {
  h1 { font-size: 21px; }
  .page-heading { align-items: center; }
  .page-heading > .button { padding: 0 10px; }
  .detail-title-line h1 { font-size: 21px; }
  .stat-value { font-size: 21px; }
}

/* Public read-only dashboard */
.guest-only { display: none !important; }
.is-public .admin-only { display: none !important; }
.is-public .guest-only { display: inline-flex !important; }
.is-public .profile.guest-only { display: flex !important; }
.is-public .mobile-tabbar { grid-template-columns: repeat(2, 1fr); }
.guest-login { min-height: 34px; padding: 0 12px; font-size: 11px; text-decoration: none; }
.guest-profile { text-decoration: none; }
.public-note { display: flex; align-items: center; gap: 6px; margin-left: 2px; color: var(--muted); font-size: 10px; }
.public-note::before { content: ""; width: 5px; height: 5px; border-radius: 50%; background: var(--primary); }
@media (max-width: 760px) {
  .guest-login { min-height: 34px; padding: 0 10px; }
  .is-public .topbar { justify-content: flex-end; }
}

    /* Three-carrier latency */
    .line-card { margin-top: 15px; padding: 18px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
    .line-card .chart-head { align-items: flex-start; }
    .line-card .chart-legend { flex-wrap: wrap; gap: 10px; }
    .line-tag { display: inline-flex; align-items: center; gap: 6px; padding: 3px 8px; border: 1px solid var(--line); border-radius: 999px; color: var(--muted); font-size: 10px; }
    .line-dot { display: inline-block; width: 6px; height: 6px; margin-right: 6px; border-radius: 50%; }
    .line-dot.telecom { background: var(--chart-telecom); }
    .line-dot.unicom { background: var(--chart-unicom); }
    .line-dot.mobile { background: var(--chart-mobile); }
    .line-empty { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 18px; border: 1px dashed var(--line); border-radius: 10px; color: var(--muted); font-size: 12px; }
    @media (max-width: 760px) {
      .line-card { padding: 15px 12px 12px; }
      .line-empty { align-items: flex-start; flex-direction: column; }
    }
    .line-card .chart-head { flex-wrap: wrap; gap: 12px; }
    .line-card .detail-actions { flex-wrap: wrap; justify-content: flex-end; gap: 6px; }
    .line-card .trend-chart { margin-top: 4px; }
