* { box-sizing: border-box; margin: 0; padding: 0; }

html, body {
  height: 100%;
  overflow: hidden;
  font-family: "Microsoft YaHei", "PingFang SC", sans-serif;
  background: #050a14;
  color: #b8d4f0;
}

.cm-layout {
  display: flex;
  height: 100vh;
  overflow: hidden;
  background: #050a14;
}

.cm-sidebar {
  width: 240px;
  flex-shrink: 0;
  background: linear-gradient(180deg, #0a1628 0%, #061018 100%);
  border-right: 1px solid rgba(0, 200, 255, 0.15);
  display: flex;
  flex-direction: column;
}

.cm-brand {
  padding: 18px 16px;
  border-bottom: 1px solid rgba(0, 200, 255, 0.12);
}

.cm-brand-icon {
  width: 40px;
  height: 40px;
  border-radius: 8px;
  background: linear-gradient(135deg, #00d4ff, #0066ff);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  margin-bottom: 10px;
  box-shadow: 0 0 20px rgba(0, 200, 255, 0.35);
  animation: cmPulse 3s ease-in-out infinite;
}

@keyframes cmPulse {
  0%, 100% { box-shadow: 0 0 16px rgba(0, 200, 255, 0.3); }
  50% { box-shadow: 0 0 28px rgba(0, 200, 255, 0.55); }
}

.cm-brand h2 {
  font-size: 15px;
  color: #e6f7ff;
  font-weight: 600;
}

.cm-brand p {
  font-size: 10px;
  color: rgba(126, 200, 255, 0.55);
  margin-top: 6px;
  line-height: 1.5;
}

.cm-nav {
  flex: 1;
  padding: 10px 0;
  overflow-y: auto;
}

.cm-nav a {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 11px 18px;
  color: rgba(184, 212, 240, 0.65);
  font-size: 13px;
  text-decoration: none;
  border-left: 3px solid transparent;
  transition: all 0.2s;
}

.cm-nav a:hover {
  color: #00e5ff;
  background: rgba(0, 150, 255, 0.08);
}

.cm-nav a.active {
  color: #fff;
  background: linear-gradient(90deg, rgba(0, 120, 255, 0.35), transparent);
  border-left-color: #00e5ff;
}

.cm-nav .ico { width: 18px; text-align: center; }

.cm-chain-deco {
  padding: 14px;
  margin: 8px 12px 12px;
  text-align: center;
  border: 1px solid rgba(0, 200, 255, 0.2);
  border-radius: 8px;
  background: rgba(0, 60, 120, 0.15);
}

.cm-chain-deco .cubes {
  font-size: 28px;
  margin-bottom: 8px;
  animation: cmFloat 4s ease-in-out infinite;
}

@keyframes cmFloat {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-4px); }
}

.cm-chain-deco p {
  font-size: 10px;
  color: rgba(126, 200, 255, 0.7);
  line-height: 1.5;
}

.cm-sys-nav {
  padding: 10px 12px;
  border-top: 1px solid rgba(0, 200, 255, 0.1);
}

.cm-sys-nav .sys-nav-title {
  font-size: 10px;
  color: rgba(126, 200, 255, 0.45);
  margin-bottom: 6px;
}

.cm-sys-nav .sys-nav-links { display: flex; flex-wrap: wrap; gap: 5px; }

.cm-sys-nav .sys-nav-link {
  padding: 3px 7px;
  font-size: 10px;
  border-radius: 4px;
  color: rgba(184, 212, 240, 0.65);
  background: rgba(255, 255, 255, 0.05);
  text-decoration: none;
}

.cm-sys-nav .sys-nav-link:hover { color: #00e5ff; background: rgba(0, 150, 255, 0.2); }
.cm-sys-nav .sys-nav-link.active { color: #fff; background: #1890ff; }

.cm-main {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.cm-topbar {
  flex-shrink: 0;
  padding: 12px 20px;
  display: grid;
  grid-template-columns: auto minmax(160px, 1fr) auto;
  align-items: center;
  gap: 12px 16px;
  border-bottom: 1px solid rgba(0, 200, 255, 0.12);
  background: rgba(10, 22, 40, 0.8);
}

.cm-topbar-title h1 {
  font-size: 18px;
  color: #e6f7ff;
  font-weight: 600;
}

.cm-topbar-title p {
  font-size: 11px;
  color: rgba(126, 200, 255, 0.6);
  margin-top: 2px;
}

.cm-topbar-title {
  min-width: 0;
}

.cm-search {
  min-width: 0;
  max-width: 100%;
  position: relative;
}

.cm-search input {
  width: 100%;
  padding: 8px 12px 8px 34px;
  background: rgba(0, 30, 60, 0.6);
  border: 1px solid rgba(0, 200, 255, 0.25);
  border-radius: 6px;
  color: #e6f7ff;
  font-size: 13px;
  outline: none;
}

.cm-search input:focus {
  border-color: #00e5ff;
  box-shadow: 0 0 12px rgba(0, 229, 255, 0.2);
}

.cm-search .si {
  position: absolute;
  left: 10px;
  top: 50%;
  transform: translateY(-50%);
  opacity: 0.5;
}

.cm-topbar-tools {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-shrink: 0;
  justify-self: end;
}

.cm-tool-btn {
  background: none;
  border: none;
  color: #7ec8ff;
  font-size: 18px;
  cursor: pointer;
  position: relative;
}

.cm-tool-btn .dot {
  position: absolute;
  top: -2px;
  right: -4px;
  width: 8px;
  height: 8px;
  background: #ff4d4f;
  border-radius: 50%;
  animation: cmBlink 1.5s infinite;
}

@keyframes cmBlink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.4; }
}

.cm-user {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: #b8d4f0;
}

.cm-user .av {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: linear-gradient(135deg, #597ef7, #00d4ff);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  color: #fff;
}

.cm-user .online { color: #52c41a; font-size: 11px; }

.cm-content {
  flex: 1;
  min-height: 0;
  overflow: hidden;
  padding: 10px 14px 12px;
  display: flex;
  flex-direction: column;
}

.cm-view {
  display: none;
  flex: 1;
  flex-direction: column;
  min-height: 0;
  overflow: hidden;
}

.cm-view.active { display: flex; }

#cmListHost { display: contents; }

.cm-kpi-row {
  flex-shrink: 0;
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 10px;
  margin-bottom: 10px;
}

.cm-kpi {
  padding: 12px 14px;
  background: linear-gradient(135deg, rgba(0, 50, 100, 0.4), rgba(0, 25, 50, 0.6));
  border: 1px solid rgba(0, 200, 255, 0.25);
  border-radius: 6px;
  position: relative;
  overflow: hidden;
}

.cm-kpi::after {
  content: "";
  position: absolute;
  top: 0;
  left: -100%;
  width: 60%;
  height: 2px;
  background: linear-gradient(90deg, transparent, #00e5ff, transparent);
  animation: cmScan 3s linear infinite;
}

@keyframes cmScan {
  0% { left: -100%; }
  100% { left: 200%; }
}

.cm-kpi.bsn { border-color: rgba(82, 196, 26, 0.4); }

.cm-kpi .lbl { font-size: 11px; color: rgba(126, 200, 255, 0.75); }
.cm-kpi .val { font-size: 20px; font-weight: 700; color: #fff; margin: 4px 0; }
.cm-kpi .tr { font-size: 11px; }
.cm-kpi .tr.up { color: #52c41a; }
.cm-kpi .tr.down { color: #ff7875; }
.cm-kpi .spark { height: 24px; margin-top: 4px; }

.cm-home-grid {
  flex: 1;
  min-height: 0;
  display: grid;
  grid-template-columns: 1fr 300px;
  grid-template-rows: 1fr 1fr;
  gap: 10px;
}

.cm-panel {
  background: rgba(8, 20, 40, 0.75);
  border: 1px solid rgba(0, 180, 255, 0.2);
  border-radius: 6px;
  display: flex;
  flex-direction: column;
  min-height: 0;
  overflow: hidden;
}

.cm-panel-head {
  flex-shrink: 0;
  padding: 8px 12px;
  font-size: 13px;
  font-weight: 600;
  color: #00e5ff;
  border-bottom: 1px solid rgba(0, 180, 255, 0.15);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.cm-panel-body { flex: 1; min-height: 0; overflow: hidden; }

.cm-table-wrap { flex: 1; min-height: 0; overflow: hidden; }

.cm-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
}

.cm-table th,
.cm-table td {
  padding: 8px 10px;
  text-align: left;
  border-bottom: 1px solid rgba(0, 150, 255, 0.1);
}

.cm-table th {
  background: rgba(0, 60, 120, 0.3);
  color: rgba(126, 200, 255, 0.85);
  font-weight: 500;
}

.cm-table tbody tr {
  transition: background 0.2s;
}

.cm-table tbody tr:hover {
  background: rgba(0, 120, 255, 0.1);
}

.cm-table .link {
  color: #00e5ff;
  cursor: pointer;
  margin-right: 8px;
}

.cm-tag {
  display: inline-block;
  padding: 1px 6px;
  border-radius: 3px;
  font-size: 11px;
}

.cm-tag.green { color: #95de64; background: rgba(82, 196, 26, 0.15); border: 1px solid rgba(82, 196, 26, 0.4); }
.cm-tag.orange { color: #ffc069; background: rgba(250, 140, 22, 0.15); border: 1px solid rgba(250, 140, 22, 0.4); }
.cm-tag.red { color: #ff7875; background: rgba(255, 77, 79, 0.15); border: 1px solid rgba(255, 77, 79, 0.4); }
.cm-tag.blue { color: #69c0ff; background: rgba(24, 144, 255, 0.15); border: 1px solid rgba(24, 144, 255, 0.4); }
.cm-tag.gray { color: #8c8c8c; background: rgba(255, 255, 255, 0.05); border: 1px solid rgba(255, 255, 255, 0.15); }

.cm-pagination {
  flex-shrink: 0;
  padding: 8px 12px;
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  color: rgba(126, 200, 255, 0.7);
  border-top: 1px solid rgba(0, 150, 255, 0.1);
}

.cm-pagination button {
  min-width: 26px;
  height: 26px;
  border: 1px solid rgba(0, 200, 255, 0.3);
  background: rgba(0, 40, 80, 0.5);
  color: #b8d4f0;
  border-radius: 4px;
  cursor: pointer;
}

.cm-pagination button:disabled { opacity: 0.4; cursor: not-allowed; }

.cm-home-left {
  grid-row: 1 / 3;
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-height: 0;
}

.cm-home-left .cm-panel { flex: 1; }

.cm-bsn-card {
  padding: 12px;
  font-size: 12px;
  line-height: 1.9;
  color: rgba(184, 212, 240, 0.85);
}

.cm-bsn-card .status-run {
  display: inline-block;
  padding: 2px 10px;
  background: rgba(82, 196, 26, 0.2);
  color: #95de64;
  border: 1px solid #52c41a;
  border-radius: 4px;
  margin-bottom: 8px;
  animation: cmRunPulse 2s ease-in-out infinite;
}

@keyframes cmRunPulse {
  0%, 100% { box-shadow: 0 0 0 rgba(82, 196, 26, 0); }
  50% { box-shadow: 0 0 12px rgba(82, 196, 26, 0.4); }
}

.cm-bsn-card strong { color: #00e5ff; }

.cm-right-col {
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-height: 0;
}

.cm-right-col .cm-panel { flex: 1; }

.cm-chart { width: 100%; height: 100%; min-height: 80px; }

.cm-net-list { padding: 8px 12px; }

.cm-net-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 0;
  border-bottom: 1px solid rgba(0, 150, 255, 0.08);
  font-size: 12px;
}

.cm-net-item .dot-live {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #52c41a;
  animation: cmBlink 1.5s infinite;
  margin-right: 6px;
}

.cm-node-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  padding: 8px;
}

.cm-node-box {
  padding: 10px;
  background: rgba(0, 60, 120, 0.25);
  border: 1px solid rgba(0, 200, 255, 0.2);
  border-radius: 6px;
  text-align: center;
  font-size: 11px;
}

.cm-node-box .st { color: #52c41a; font-weight: 600; }
.cm-node-box .ms { color: #00e5ff; font-size: 16px; margin-top: 4px; }

.cm-security {
  padding: 12px;
  text-align: center;
}

.cm-security .score {
  font-size: 36px;
  font-weight: 700;
  color: #52c41a;
  text-shadow: 0 0 20px rgba(82, 196, 26, 0.5);
}

.cm-security .sub { font-size: 11px; color: rgba(126, 200, 255, 0.7); margin-top: 8px; }

.cm-list-view { gap: 10px; }

.cm-filter {
  flex-shrink: 0;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  background: rgba(8, 20, 40, 0.75);
  border: 1px solid rgba(0, 180, 255, 0.2);
  border-radius: 6px;
}

.cm-filter select {
  padding: 6px 10px;
  background: rgba(0, 30, 60, 0.8);
  border: 1px solid rgba(0, 200, 255, 0.25);
  border-radius: 4px;
  color: #b8d4f0;
  font-size: 12px;
}

.cm-btn {
  padding: 6px 14px;
  border-radius: 4px;
  font-size: 13px;
  border: none;
  cursor: pointer;
}

.cm-btn-primary {
  background: linear-gradient(135deg, #1890ff, #0066cc);
  color: #fff;
}

.cm-btn-default {
  background: rgba(0, 40, 80, 0.6);
  color: #b8d4f0;
  border: 1px solid rgba(0, 200, 255, 0.3);
}

.cm-list-panel { flex: 1; min-height: 0; }

.backend-toast {
  position: fixed;
  top: 64px;
  left: 50%;
  transform: translateX(-50%) translateY(-16px);
  padding: 10px 20px;
  background: rgba(0, 20, 40, 0.95);
  border: 1px solid #00e5ff;
  color: #e6f7ff;
  border-radius: 6px;
  font-size: 13px;
  z-index: 9999;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s, transform 0.25s;
}

.backend-toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

.thumb-cell { font-size: 20px; }

@media (max-width: 1400px) {
  .cm-kpi-row { grid-template-columns: repeat(3, 1fr); }
  .cm-home-grid { grid-template-columns: 1fr; grid-template-rows: auto; }
}
