:root {
  color-scheme: light;
  --ink: #142033;
  --muted: #6f7c8f;
  --line: #e5e9f0;
  --panel: #ffffff;
  --canvas: #f3f5f8;
  --nav: #0c1423;
  --nav-soft: #172238;
  --blue: #316fea;
  --blue-soft: #eaf1ff;
  --green: #16a274;
  --amber: #e49a28;
  --red: #de5962;
  font-family: Inter, "PingFang SC", "Microsoft YaHei", system-ui, sans-serif;
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--canvas); color: var(--ink); font-size: 14px; }
[hidden] { display: none !important; }
.login-screen { min-height: 100vh; display: grid; place-items: center; padding: 24px; background: radial-gradient(circle at 20% 10%, #1c3157 0, transparent 34%), radial-gradient(circle at 90% 90%, #173d50 0, transparent 28%), #0b1322; }
.login-card { width: min(420px, 100%); padding: 36px; border-radius: 16px; background: #fff; box-shadow: 0 28px 90px #02071280; }
.login-brand { display: flex; align-items: center; gap: 12px; margin-bottom: 34px; }
.login-brand strong, .login-brand small { display: block; }
.login-brand strong { font-size: 18px; }
.login-brand small { color: #8a96a8; font-size: 8px; letter-spacing: 1.5px; margin-top: 3px; }
.eyebrow { color: var(--blue); text-transform: uppercase; letter-spacing: 1.3px; font-size: 10px; font-weight: 800; margin: 0 0 8px; }
.login-card h1 { margin: 0; font-size: 28px; letter-spacing: -.7px; }
.login-copy { color: var(--muted); margin: 10px 0 25px; line-height: 1.6; font-size: 12px; }
.login-card label { display: block; color: #526075; font-size: 11px; font-weight: 700; margin-top: 15px; }
.login-card input { display: block; width: 100%; margin-top: 7px; border: 1px solid var(--line); border-radius: 8px; padding: 11px; outline: 0; }
.login-card input:focus { border-color: #7ea3ea; box-shadow: 0 0 0 3px var(--blue-soft); }
.login-button { width: 100%; margin-top: 8px; height: 42px; }
.form-error { min-height: 18px; margin: 9px 0 0; color: var(--red); font-size: 10px; }
.demo-link { display: block; margin: 17px auto 0; border: 0; background: none; color: #63728a; font-size: 11px; text-decoration: underline; cursor: pointer; }
.login-note { color: #9aa3b1; text-align: center; font-size: 9px; line-height: 1.6; margin: 22px 0 0; }
button, input, select { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
.app-shell { min-height: 100vh; display: flex; }
.sidebar { width: 236px; min-height: 100vh; background: var(--nav); color: #d8e0ef; position: fixed; inset: 0 auto 0 0; display: flex; flex-direction: column; padding: 22px 14px 16px; z-index: 20; }
.brand { height: 52px; color: white; text-decoration: none; display: flex; gap: 12px; align-items: center; padding: 0 10px; }
.brand-mark { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 10px; background: linear-gradient(145deg, #3d7cf2, #2359c9); font-size: 20px; font-weight: 800; box-shadow: 0 8px 22px #07101f; }
.brand strong, .brand small { display: block; }
.brand strong { font-size: 17px; letter-spacing: .2px; }
.brand small { color: #74839a; letter-spacing: 1.5px; font-size: 8px; margin-top: 2px; }
.nav { flex: 1; margin-top: 24px; }
.nav p { color: #5f6d82; font-size: 10px; letter-spacing: 1.2px; margin: 22px 12px 7px; }
.nav a { position: relative; display: flex; align-items: center; gap: 12px; color: #9eabc0; text-decoration: none; height: 42px; padding: 0 12px; border-radius: 8px; margin: 3px 0; font-weight: 550; }
.nav a:hover { color: white; background: #121e32; }
.nav a.active { color: white; background: var(--nav-soft); }
.nav a.active::before { content: ""; position: absolute; width: 3px; height: 19px; left: -14px; background: #4b82ee; border-radius: 2px; }
.nav-icon { width: 18px; text-align: center; color: #71819a; font-weight: 700; }
.nav a.active .nav-icon { color: #71a0ff; }
.control-card { border: 1px solid #22304a; background: #111c30; border-radius: 10px; padding: 12px; display: flex; gap: 10px; align-items: center; margin: 10px 2px; }
.control-card strong, .control-card small { display: block; }
.control-card strong { color: #dfe7f5; font-size: 11px; }
.control-card small { color: #687891; font-size: 10px; margin-top: 4px; }
.pulse { width: 8px; height: 8px; border-radius: 50%; background: #22bd83; box-shadow: 0 0 0 4px #174632; }
.sidebar-user { border-top: 1px solid #1c293d; padding: 15px 4px 0; display: grid; grid-template-columns: 34px 1fr 26px; gap: 9px; align-items: center; }
.avatar { width: 34px; height: 34px; display: grid; place-items: center; border-radius: 9px; background: #24314a; color: #b8c7dc; font-size: 10px; font-weight: 700; }
.sidebar-user strong, .sidebar-user small { display: block; font-size: 11px; }
.sidebar-user small { color: #64748c; margin-top: 3px; }
.sidebar-user button { border: 0; color: #72829b; background: none; cursor: pointer; }
.main { width: calc(100% - 236px); margin-left: 236px; min-width: 0; }
.topbar { height: 68px; padding: 0 32px; display: flex; align-items: center; gap: 14px; background: white; border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 10; }
.breadcrumb { display: flex; align-items: center; gap: 9px; margin-right: auto; font-size: 13px; }
.breadcrumb span, .breadcrumb b { color: #a0a9b7; font-weight: 400; }
.global-search { width: 254px; height: 36px; background: #f5f7fa; border: 1px solid #ebedf2; border-radius: 8px; display: flex; align-items: center; padding: 0 11px; gap: 8px; color: #8490a2; }
.global-search:focus-within { border-color: #8fb0ef; box-shadow: 0 0 0 3px #eaf1ff; }
.global-search input { border: 0; outline: 0; background: transparent; min-width: 0; width: 100%; color: var(--ink); font-size: 12px; }
.icon-button, .menu-button { width: 36px; height: 36px; border: 1px solid var(--line); border-radius: 8px; background: white; color: #68768a; cursor: pointer; }
.icon-button:hover { border-color: #b9c7dc; color: var(--blue); }
.notification { position: relative; font-size: 8px; color: #8390a2; }
.notification i { position: absolute; right: 7px; top: 6px; width: 6px; height: 6px; background: var(--red); border: 2px solid white; border-radius: 50%; }
.menu-button { display: none; }
.content { padding: 28px 32px 48px; max-width: 1600px; margin: 0 auto; }
.page-head { display: flex; justify-content: space-between; align-items: flex-end; margin-bottom: 22px; }
.page-head h1 { font-size: 23px; letter-spacing: -.5px; margin: 0 0 7px; }
.page-head p { margin: 0; color: var(--muted); font-size: 12px; }
.page-actions { display: flex; gap: 9px; }
.button { border: 1px solid var(--line); border-radius: 7px; height: 36px; padding: 0 14px; background: white; color: #48576b; cursor: pointer; font-weight: 600; font-size: 12px; }
.button.primary { background: var(--blue); border-color: var(--blue); color: white; box-shadow: 0 5px 12px #316fea30; }
.button.danger { color: var(--red); border-color: #efc3c7; }
.button:disabled { opacity: .5; cursor: not-allowed; }
.demo-banner { display: flex; justify-content: space-between; gap: 12px; background: #fff8e9; border: 1px solid #f0dfb9; color: #856425; padding: 10px 13px; border-radius: 8px; margin-bottom: 16px; font-size: 12px; }
.demo-banner button { border: 0; background: none; color: #7b5b1f; text-decoration: underline; cursor: pointer; }
.metrics { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-bottom: 14px; }
.metric, .panel { background: var(--panel); border: 1px solid var(--line); border-radius: 10px; box-shadow: 0 1px 2px #14203308; }
.metric { min-height: 116px; padding: 18px; position: relative; overflow: hidden; }
.metric-label { color: #718095; font-size: 11px; margin-bottom: 12px; }
.metric strong { display: block; font-size: 26px; letter-spacing: -.8px; line-height: 1; }
.metric-foot { color: #8390a2; font-size: 10px; margin-top: 11px; }
.metric-foot .up { color: var(--green); font-weight: 700; }
.metric-badge { position: absolute; right: 16px; top: 17px; width: 33px; height: 33px; display: grid; place-items: center; border-radius: 8px; background: var(--blue-soft); color: var(--blue); font-weight: 700; }
.grid-main { display: grid; grid-template-columns: minmax(0, 1.7fr) minmax(260px, .8fr); gap: 14px; margin-bottom: 14px; }
.panel { padding: 18px; min-width: 0; }
.panel-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 18px; }
.panel-head h2 { font-size: 14px; margin: 0; }
.panel-head p { margin: 5px 0 0; font-size: 10px; color: var(--muted); }
.panel-head select { border: 1px solid var(--line); border-radius: 6px; padding: 6px 8px; color: #68768a; background: white; font-size: 10px; }
.chart-wrap { height: 220px; position: relative; }
.chart-wrap canvas { width: 100%; height: 100%; }
.node-summary { display: grid; place-items: center; min-height: 220px; text-align: center; }
.availability-number strong { display: block; font-size: 27px; }
.availability-number small { color: var(--muted); font-size: 10px; }
.node-availability { width: min(220px, 90%); height: 8px; border: 0; border-radius: 9px; overflow: hidden; appearance: none; margin-top: 14px; }
.node-availability::-webkit-progress-bar { background: #e7ebf1; border-radius: 9px; }
.node-availability::-webkit-progress-value { background: var(--green); border-radius: 9px; }
.node-availability::-moz-progress-bar { background: var(--green); border-radius: 9px; }
.node-legend { width: 100%; margin-top: 20px; }
.legend-row { display: flex; justify-content: space-between; border-top: 1px solid #eef1f5; padding: 10px 3px 0; margin-top: 9px; font-size: 11px; color: var(--muted); }
.legend-row b { color: var(--ink); }
.alerts-panel { padding: 0; overflow: hidden; margin-bottom: 14px; }
.alerts-panel .panel-head { padding: 18px 18px 0; margin-bottom: 12px; }
.alerts-list { border-top: 1px solid var(--line); }
.alert-row { display: grid; grid-template-columns: 10px minmax(0, 1fr) auto; align-items: center; gap: 11px; padding: 12px 18px; border-bottom: 1px solid #eef1f5; }
.alert-row:last-child { border-bottom: 0; }
.alert-mark { width: 8px; height: 8px; border-radius: 50%; background: var(--amber); box-shadow: 0 0 0 4px #fff3dc; }
.alert-row.critical .alert-mark { background: var(--red); box-shadow: 0 0 0 4px #fdecef; }
.alert-row strong, .alert-row small { display: block; }
.alert-row strong { color: #344258; font-size: 11px; }
.alert-row small { color: var(--muted); font-size: 9px; margin-top: 3px; }
.alerts-clear { padding: 18px; color: var(--green); font-size: 11px; }
.table-panel { padding: 0; overflow: hidden; }
.table-panel .panel-head { padding: 18px 18px 0; }
.table-tools { display: flex; gap: 8px; }
.table-search { border: 1px solid var(--line); border-radius: 7px; padding: 7px 10px; font-size: 11px; outline: none; width: 190px; }
table { width: 100%; border-collapse: collapse; }
th { color: #8591a2; background: #f9fafb; font-size: 10px; text-align: left; font-weight: 600; letter-spacing: .2px; padding: 10px 16px; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
td { padding: 13px 16px; border-bottom: 1px solid #eef1f5; font-size: 11px; color: #536175; }
tr:last-child td { border-bottom: 0; }
tbody tr:hover { background: #fafcff; }
.primary-cell { display: flex; align-items: center; gap: 10px; }
.initial { width: 30px; height: 30px; display: grid; place-items: center; border-radius: 8px; background: #eef3fb; color: #4f6f9f; font-weight: 700; font-size: 10px; }
.primary-cell strong, .primary-cell small { display: block; }
.primary-cell strong { color: #29384e; font-size: 11px; }
.primary-cell small { color: #929cab; margin-top: 3px; font-size: 9px; }
.status { display: inline-flex; align-items: center; gap: 5px; padding: 4px 7px; border-radius: 999px; font-size: 9px; font-weight: 700; }
.status::before { content: ""; width: 5px; height: 5px; border-radius: 50%; background: currentColor; }
.status.online, .status.active { color: #12835f; background: #e8f7f1; }
.status.trial, .status.testing, .status.maintenance { color: #a36e18; background: #fff4df; }
.status.expired, .status.offline, .status.suspended, .status.revoked { color: #b54550; background: #fdecef; }
.action-link { color: var(--blue); border: 0; background: none; padding: 4px 0; cursor: pointer; font-weight: 600; font-size: 10px; }
.action-link:disabled { color: #a5aebb; cursor: not-allowed; }
.action-group { display: flex; align-items: center; gap: 10px; white-space: nowrap; }
.filter-select { border: 1px solid var(--line); border-radius: 7px; padding: 7px 9px; background: white; color: #586579; font-size: 11px; }
.mono { font-family: "SFMono-Regular", Consolas, monospace; font-size: 10px; }
.progress { height: 6px; width: 110px; background: #edf0f4; border-radius: 9px; overflow: hidden; }
.progress i { display: block; height: 100%; background: var(--blue); border-radius: inherit; }
.node-capacity { display: block; width: 110px; height: 6px; border: 0; border-radius: 9px; overflow: hidden; appearance: none; }
.node-capacity::-webkit-progress-bar { background: #edf0f4; border-radius: 9px; }
.node-capacity::-webkit-progress-value { background: var(--blue); border-radius: 9px; }
.node-capacity::-moz-progress-bar { background: var(--blue); border-radius: 9px; }
.spaced-panel { margin-top: 14px; }
.node-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.node-card { padding: 18px; }
.node-card-top { display: flex; justify-content: space-between; align-items: flex-start; }
.node-card h3 { font-size: 14px; margin: 0 0 5px; }
.node-card p { font-size: 10px; color: var(--muted); margin: 0; }
.node-stats { display: grid; grid-template-columns: 1fr 1fr; margin: 20px 0 15px; gap: 12px; }
.node-stat small, .node-stat strong { display: block; }
.node-stat small { color: var(--muted); font-size: 9px; }
.node-stat strong { margin-top: 5px; font-size: 15px; }
.topology { display: grid; grid-template-columns: 1fr auto 1fr auto 1fr; align-items: center; gap: 10px; padding: 18px; margin-bottom: 14px; }
.topology-box { text-align: center; border: 1px solid var(--line); border-radius: 9px; padding: 14px 8px; background: #fafbfc; }
.topology-box b, .topology-box small { display: block; }
.topology-box small { color: var(--muted); margin-top: 5px; font-size: 9px; }
.topology-arrow { color: #91a0b4; }
.log-line { display: flex; gap: 12px; align-items: flex-start; }
.log-mark { width: 8px; height: 8px; border-radius: 50%; background: var(--blue); margin-top: 3px; box-shadow: 0 0 0 4px var(--blue-soft); }
.empty { padding: 60px 20px; text-align: center; color: var(--muted); }
.empty strong { display: block; color: #45546a; margin-bottom: 7px; }
.toast { position: fixed; right: 22px; bottom: 22px; background: #152136; color: white; border-radius: 8px; padding: 11px 14px; font-size: 11px; box-shadow: 0 10px 30px #0b122040; transform: translateY(20px); opacity: 0; pointer-events: none; transition: .2s; z-index: 50; }
.toast.show { transform: translateY(0); opacity: 1; }
dialog { border: 0; padding: 0; border-radius: 12px; width: min(440px, calc(100% - 30px)); box-shadow: 0 30px 80px #0b122050; }
dialog::backdrop { background: #07101f90; backdrop-filter: blur(3px); }
.dialog-card { padding: 24px; }
.dialog-head { display: flex; justify-content: space-between; align-items: flex-start; }
.dialog-head p { color: var(--blue); font-weight: 700; margin: 0 0 4px; font-size: 10px; }
.dialog-head h2 { margin: 0; font-size: 19px; }
.dialog-head button { border: 0; background: none; font-size: 23px; color: #8994a4; cursor: pointer; }
.dialog-copy { font-size: 11px; color: var(--muted); line-height: 1.7; }
.dialog-card label { display: block; color: #586579; font-size: 11px; font-weight: 600; margin-top: 15px; }
.dialog-card input, .dialog-card select { display: block; width: 100%; border: 1px solid var(--line); border-radius: 8px; padding: 10px; margin-top: 7px; outline: 0; background: white; }
.dialog-card input:focus, .dialog-card select:focus { border-color: #7ea3ea; box-shadow: 0 0 0 3px var(--blue-soft); }
.dialog-card input:disabled { background: #f5f7fa; color: #778397; }
.dialog-card .check-row { display: flex; align-items: center; gap: 9px; }
.dialog-card .check-row input { width: auto; margin: 0; }
.dialog-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 22px; }
.pager { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 18px; border-top: 1px solid var(--line); color: var(--muted); font-size: 10px; }
.pager > div { display: flex; gap: 8px; }
@media (max-width: 1100px) { .metrics { grid-template-columns: 1fr 1fr; } .node-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 820px) {
  .sidebar { transform: translateX(-100%); transition: .2s; box-shadow: 15px 0 40px #0b122040; }
  .sidebar.open { transform: translateX(0); }
  .main { width: 100%; margin-left: 0; }
  .menu-button { display: inline-block; }
  .topbar { padding: 0 16px; }
  .global-search { width: 180px; }
  .content { padding: 22px 16px 40px; }
  .grid-main { grid-template-columns: 1fr; }
  .node-grid { grid-template-columns: 1fr; }
}
@media (max-width: 560px) {
  .login-card { padding: 28px 22px; }
  .global-search { display: none; }
  .breadcrumb { font-size: 11px; }
  .metrics { grid-template-columns: 1fr; }
  .page-head { display: block; }
  .page-actions { margin-top: 14px; }
  .table-panel { overflow-x: auto; }
  table { min-width: 700px; }
  .topology { grid-template-columns: 1fr; }
  .topology-arrow { transform: rotate(90deg); }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { scroll-behavior: auto !important; transition: none !important; } }
