/* MWAN Inventory — base styles */

* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
               "Hiragino Sans GB", sans-serif;
  background: #f4f6f9;
  color: #303133;
}

[v-cloak] { display: none; }
.muted { color: #909399; }

/* ---------- Auth ---------- */
.auth-loading {
  max-width: 420px;
  margin: 18vh auto 0;
  padding: 24px;
}
.login-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 44px;
  overflow: hidden;
  position: relative;
  background:
    radial-gradient(ellipse at 50% 120%, rgba(0, 82, 204, 0.2), transparent 48%),
    linear-gradient(118deg, #040914 0%, #071933 45%, #021028 100%);
}
.login-page::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(rgba(120, 190, 255, 0.055) 1px, transparent 1px),
    linear-gradient(90deg, rgba(120, 190, 255, 0.045) 1px, transparent 1px);
  background-size: 58px 58px;
  mask-image: linear-gradient(90deg, rgba(0,0,0,0.92), rgba(0,0,0,0.36));
}
.login-page::after {
  content: "";
  position: absolute;
  inset: auto -6% -18% -6%;
  height: 38%;
  background:
    linear-gradient(90deg, transparent, rgba(18, 101, 255, 0.22), transparent),
    linear-gradient(180deg, transparent, rgba(0, 178, 255, 0.08));
  transform: skewY(-4deg);
  border-top: 1px solid rgba(109, 201, 255, 0.24);
}
.login-scanline {
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0.16;
  background: repeating-linear-gradient(
    180deg,
    rgba(255,255,255,0.16) 0,
    rgba(255,255,255,0.16) 1px,
    transparent 1px,
    transparent 7px
  );
  mix-blend-mode: screen;
}
.login-shell {
  position: relative;
  z-index: 1;
  width: min(1220px, 100%);
  min-height: 680px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 450px;
  border: 1px solid rgba(149, 204, 255, 0.18);
  border-radius: 8px;
  overflow: hidden;
  background: rgba(5, 16, 36, 0.78);
  box-shadow: 0 32px 86px rgba(0,0,0,0.42), inset 0 1px 0 rgba(255,255,255,0.08);
  backdrop-filter: blur(16px);
}
.login-visual {
  position: relative;
  min-height: 680px;
  padding: 58px;
  color: #fff;
  overflow: hidden;
  background:
    linear-gradient(130deg, rgba(4, 28, 76, 0.92), rgba(3, 12, 30, 0.8)),
    repeating-linear-gradient(116deg, rgba(255,255,255,0.045) 0, rgba(255,255,255,0.045) 1px, transparent 1px, transparent 42px);
}
.login-visual::before {
  content: "";
  position: absolute;
  left: -15%;
  top: 16%;
  width: 118%;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(97, 188, 255, 0.9), transparent);
  box-shadow:
    0 96px 0 rgba(0, 103, 255, 0.38),
    0 192px 0 rgba(103, 224, 227, 0.22),
    0 288px 0 rgba(255,255,255,0.08);
  transform: rotate(-16deg);
}
.login-visual::after {
  content: "";
  position: absolute;
  inset: 34px 28px;
  border: 1px solid rgba(119, 199, 255, 0.12);
  pointer-events: none;
}
.login-visual-top {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 110px;
}
.login-wordmark {
  font-size: 40px;
  font-weight: 800;
  color: #f7fbff;
  text-shadow: 0 0 22px rgba(0, 103, 255, 0.72);
}
.login-live-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 30px;
  padding: 5px 10px;
  border: 1px solid rgba(103, 224, 227, 0.26);
  border-radius: 4px;
  color: #b8d5f6;
  font-size: 12px;
  text-transform: uppercase;
  background: rgba(2, 12, 27, 0.38);
}
.login-live-pill span {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #27f2a9;
  box-shadow: 0 0 14px rgba(39, 242, 169, 0.9);
}
.login-visual-kicker {
  position: relative;
  margin-bottom: 12px;
  color: #67e0e3;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
}
.login-visual-title {
  position: relative;
  max-width: 560px;
  font-size: 52px;
  line-height: 1.08;
  font-weight: 700;
  margin-bottom: 18px;
  text-shadow: 0 18px 46px rgba(0,0,0,0.42);
}
.login-visual-copy {
  position: relative;
  max-width: 540px;
  color: #c2d7f0;
  font-size: 17px;
  line-height: 1.62;
}
.login-signal-panel {
  position: absolute;
  left: 58px;
  right: 72px;
  bottom: 52px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}
.login-signal-panel > div {
  border: 1px solid rgba(103,224,227,0.28);
  background: rgba(4,14,30,0.5);
  border-radius: 6px;
  padding: 14px;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.05);
}
.login-signal-panel span {
  display: block;
  color: #9fb9d6;
  font-size: 12px;
  text-transform: uppercase;
}
.login-signal-panel b {
  display: block;
  margin-top: 4px;
  color: #67e0e3;
  font-size: 16px;
}
.login-network-map {
  position: absolute;
  right: 54px;
  top: 154px;
  width: 340px;
  height: 300px;
  opacity: 0.92;
}
.map-node,
.map-line,
.map-pulse {
  position: absolute;
  display: block;
}
.map-node {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: #65dfff;
  border: 1px solid rgba(255,255,255,0.75);
  box-shadow: 0 0 18px rgba(103,224,227,0.82), 0 0 42px rgba(0,103,255,0.38);
}
.map-node.n1 { left: 18px; top: 28px; }
.map-node.n2 { left: 154px; top: 78px; }
.map-node.n3 { left: 286px; top: 34px; }
.map-node.n4 { left: 86px; top: 218px; }
.map-node.n5 { left: 252px; top: 232px; }
.map-node.n6 { left: 292px; top: 154px; background: #0a67ff; }
.map-line {
  height: 1px;
  transform-origin: left center;
  background: linear-gradient(90deg, rgba(103,224,227,0.96), rgba(0,103,255,0.24));
}
.map-line.l1 { left: 28px; top: 38px; width: 142px; transform: rotate(19deg); }
.map-line.l2 { left: 164px; top: 84px; width: 140px; transform: rotate(-21deg); }
.map-line.l3 { left: 94px; top: 224px; width: 170px; transform: rotate(5deg); }
.map-line.l4 { left: 160px; top: 90px; width: 154px; transform: rotate(113deg); }
.map-line.l5 { left: 262px; top: 238px; width: 88px; transform: rotate(-64deg); }
.map-pulse {
  width: 42px;
  height: 2px;
  border-radius: 999px;
  background: linear-gradient(90deg, transparent, #ffffff, transparent);
  filter: drop-shadow(0 0 10px rgba(103,224,227,0.8));
}
.map-pulse.p1 {
  left: 118px;
  top: 66px;
  transform: rotate(19deg);
  animation: loginPulseA 2.8s ease-in-out infinite;
}
.map-pulse.p2 {
  left: 216px;
  top: 162px;
  transform: rotate(113deg);
  animation: loginPulseB 3.4s ease-in-out infinite;
}
@keyframes loginPulseA {
  0%, 100% { opacity: 0; translate: -32px 0; }
  35%, 55% { opacity: 1; }
  80% { opacity: 0; translate: 48px 0; }
}
@keyframes loginPulseB {
  0%, 100% { opacity: 0; translate: 0 -26px; }
  38%, 58% { opacity: 1; }
  86% { opacity: 0; translate: 0 38px; }
}
.login-panel {
  position: relative;
  width: 100%;
  background:
    linear-gradient(180deg, rgba(255,255,255,0.96), rgba(245,248,253,0.98)),
    #fff;
  border-radius: 0;
  padding: 60px 48px;
  box-shadow: none;
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.login-panel-accent {
  position: absolute;
  left: 0;
  top: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, #0a67ff, #67e0e3, #0a67ff);
}
.login-brand {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 30px;
}
.login-logo {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 56px;
  height: 56px;
  border-radius: 6px;
  background: linear-gradient(145deg, #005aff, #0730a6);
  color: #fff;
  font-size: 28px;
  font-weight: 700;
  box-shadow: 0 16px 32px rgba(10, 103, 255, 0.34);
}
.login-brand h1 {
  margin: 0;
  font-size: 28px;
  line-height: 1.2;
}
.login-brand p {
  margin: 6px 0 0;
  color: #606266;
  font-size: 13px;
  line-height: 1.45;
}
.login-form .el-form-item {
  margin-bottom: 20px;
}
.login-form .el-form-item__label {
  color: #283b59;
  font-weight: 700;
}
.login-form .el-input__wrapper {
  min-height: 46px;
  border-radius: 6px;
  box-shadow: 0 0 0 1px #d7e1ef inset;
  transition: box-shadow 0.18s ease, background 0.18s ease;
}
.login-form .el-input__wrapper:hover,
.login-form .el-input__wrapper.is-focus {
  box-shadow: 0 0 0 1px #0a67ff inset, 0 0 0 4px rgba(10,103,255,0.08);
}
.login-button {
  width: 100%;
  margin-top: 10px;
  height: 48px;
  font-weight: 600;
  border: 0;
  border-radius: 6px;
  background: linear-gradient(90deg, #0730a6, #0a67ff);
  box-shadow: 0 16px 30px rgba(10, 103, 255, 0.3);
}
.login-button:hover,
.login-button:focus {
  background: linear-gradient(90deg, #062a91, #005aff);
}
.login-footnote {
  margin-top: 24px;
  color: #728197;
  font-size: 12px;
  text-align: center;
}
.user-admin-layout {
  display: grid;
  grid-template-columns: 250px 1fr;
  gap: 14px;
}
.user-admin-dialog {
  max-width: 1180px;
}
.user-create-card {
  align-self: start;
}
.user-create-actions {
  margin-top: 14px;
}
.user-table-wrap {
  min-width: 0;
}
.user-table-actions {
  display: flex;
  justify-content: flex-end;
  margin-bottom: 8px;
}
.login-history-link {
  font-weight: 500;
  color: #606266;
}
.login-history-link:hover {
  color: #409EFF;
}
.login-history-arrow {
  color: #409EFF;
  font-weight: 700;
  margin-left: 4px;
}

@media (max-width: 900px) {
  .login-page {
    padding: 20px;
  }
  .login-shell {
    grid-template-columns: 1fr;
    min-height: 0;
  }
  .login-visual {
    min-height: 340px;
    padding: 32px;
  }
  .login-visual::after {
    inset: 18px;
  }
  .login-visual-top {
    margin-bottom: 44px;
    align-items: flex-start;
  }
  .login-visual-title {
    font-size: 34px;
  }
  .login-network-map,
  .login-signal-panel {
    display: none;
  }
  .login-panel {
    padding: 34px 28px;
  }
}

/* ---------- Header ---------- */
.app-header {
  display: flex; align-items: center; justify-content: space-between;
  background: linear-gradient(90deg, #2b3a55, #3d5076);
  color: #fff;
  padding: 0 24px; height: 56px; line-height: 56px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}
.brand { display: flex; align-items: center; gap: 12px; }
.brand .logo { font-size: 22px; color: #67E0E3; }
.brand .title { font-size: 18px; font-weight: 600; }
.brand .subtitle { font-size: 12px; color: #b8c2d4; }

.header-actions { display: flex; align-items: center; gap: 8px; }
.snap-label { font-size: 13px; color: #b8c2d4; }
.user-menu-button {
  color: #2f8f22;
  font-weight: 600;
}
.user-menu-caret {
  margin-left: 4px;
  color: #606266;
  font-size: 11px;
}

/* ---------- Main ---------- */
.app-main {
  padding: 16px 24px;
  max-width: 1500px;
  margin: 0 auto;
}
.main-tabs {
  margin-bottom: 12px;
}
.main-tabs .el-tabs__header {
  margin-bottom: 12px;
}

/* ---------- KPI cards ---------- */
.kpi-row {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 12px;
  margin-bottom: 16px;
}
.kpi-card {
  background: #fff;
  border-left: 4px solid #409EFF;
  border-radius: 6px;
  padding: 16px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.06);
}
.kpi-label { font-size: 13px; color: #909399; margin-bottom: 6px;
              display: flex; justify-content: space-between; align-items: center; }
.kpi-arrow { color: #c0c4cc; font-size: 16px; transition: transform 0.15s; }
.kpi-clickable { cursor: pointer; transition: transform 0.1s, box-shadow 0.1s; }
.kpi-clickable:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0,0,0,0.08);
}
.kpi-clickable:hover .kpi-arrow { color: #409EFF; transform: translateX(3px); }
.kpi-value { font-size: 28px; font-weight: 600; color: #303133; }
.kpi-sub { font-size: 11px; color: #909399; margin-top: 4px; }

/* ---------- Chart row ---------- */
.chart-row {
  display: grid;
  grid-template-columns:
    minmax(340px, 1.15fr)
    minmax(340px, 1.15fr)
    minmax(320px, 0.9fr);
  gap: 12px;
  margin-bottom: 16px;
}
.chart-card { padding: 0; }
.chart-canvas { width: 100%; height: 240px; }
.card-title { font-weight: 600; }
.card-hint { font-size: 12px; color: #909399; margin-left: 8px; }
.chart-compact .el-card__header {
  padding-left: 16px;
  padding-right: 16px;
}
.chart-compact .card-title {
  font-size: 15px;
}

.chart3d-wrap {
  position: relative;
}
.chart-growth .chart-canvas {
  height: 240px;
}
@media (max-width: 1100px) {
  .chart-row {
    grid-template-columns: repeat(2, minmax(320px, 1fr));
  }
}
@media (max-width: 760px) {
  .chart-row {
    grid-template-columns: 1fr;
  }
}
.port-speed-buttons {
  margin-left: auto;
  flex-shrink: 0;
}
.port-speed-buttons .el-button {
  min-width: 44px;
  padding-left: 8px;
  padding-right: 8px;
}
.chart-3d .util-summary {
  display: flex; flex-direction: column; gap: 10px;
  padding: 8px 0 0; font-size: 13px;
}
.chart-3d .util-summary > div { display: flex; align-items: center; gap: 6px; }
.chart-3d .util-primary {
  justify-content: space-between;
  gap: 10px;
  white-space: nowrap;
}
.chart-3d .util-primary > div {
  min-width: 0;
}
.util-key {
  display: inline-block; padding: 1px 8px; border-radius: 3px;
  background: #909399; color: #fff; font-size: 12px; font-weight: 600;
}
.util-pct { color: #909399; font-size: 12px; }
.util-derived {
  color: #606266;
  font-size: 12px;
  justify-content: space-between;
}
.chart-distribution .el-card__body {
  padding: 10px 12px 12px;
}
.distribution-stack {
  display: grid;
  grid-template-rows: auto auto;
  gap: 8px;
}
.distribution-section {
  min-width: 0;
}
.mini-chart-title {
  color: #303133;
  font-size: 12px;
  font-weight: 600;
  line-height: 16px;
  margin-bottom: 2px;
}
.chart-distribution .chart-chassis-canvas {
  height: 196px;
}
.chart-distribution .chart-region-canvas {
  height: 160px;
}

/* ---------- Full cards ---------- */
.full-card { margin-bottom: 16px; }

/* ---------- Filters ---------- */
.filters {
  display: flex; gap: 8px; align-items: center; flex-wrap: wrap;
  margin-bottom: 12px;
}
.result-count {
  margin-left: auto; font-size: 13px; color: #909399;
}
.filter-label {
  font-size: 12px;
  color: #606266;
}

.pager { margin-top: 12px; display: flex; justify-content: flex-end; }

/* ---------- Site detail drawer ---------- */
.section-title {
  margin: 18px 0 8px;
  font-size: 14px;
  font-weight: 600;
  color: #2b3a55;
  border-left: 3px solid #67E0E3;
  padding-left: 8px;
}
.util-cards {
  display: grid; grid-template-columns: repeat(6, 1fr); gap: 8px;
  margin-bottom: 8px;
}
.util-mini {
  background: #f4f6f9; border-radius: 4px;
  padding: 10px; text-align: center;
}
.util-mini .k { font-size: 11px; color: #909399; }
.util-mini .v { font-size: 20px; font-weight: 600; color: #303133; }

.detail-tabs { margin-top: 10px; }
.detail-tabs .el-tabs__content {
  min-width: 0;
}
.site-ports-table {
  width: 100%;
  font-size: 12px;
}
.site-ports-table .el-table__header th.el-table__cell,
.site-ports-table .el-table__body td.el-table__cell {
  padding: 3px 0;
}
.site-ports-table .cell {
  padding: 0 6px;
  line-height: 18px;
  white-space: nowrap;
}
.site-ports-table .el-table__expand-icon {
  margin-right: 2px;
}
.site-ports-table .el-table__indent {
  padding-left: 10px !important;
}
.site-ports-table .el-tag {
  height: 20px;
  padding: 0 6px;
  line-height: 18px;
}
.port-cli-text {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 12px;
}
.port-breakout-count {
  margin-left: 4px;
  min-width: 0;
  padding: 0 4px !important;
  font-size: 10px;
}
.ports-scroll-actions {
  display: inline-flex;
  gap: 4px;
  align-items: center;
  margin-left: 2px;
}
.ports-scroll-actions .el-button {
  width: 28px;
  padding: 0;
  font-size: 16px;
  line-height: 1;
}

/* ---------- Faceplate ---------- */
.faceplate-legend {
  display: flex; gap: 14px; align-items: center; flex-wrap: wrap;
  font-size: 12px; color: #606266;
  margin-bottom: 12px;
}
.faceplate-legend .lg {
  display: inline-block; width: 14px; height: 14px;
  border-radius: 3px; margin-right: 4px; vertical-align: middle;
  border: 1px solid rgba(0,0,0,0.1);
}
.lg-up    { background: #67C23A; }
.lg-equip { background: #E6A23C; }
.lg-empty { background: #DCDFE6; }
.lg-fault { background: #F56C6C; }
.lg-breakout-marker {
  display: inline-block; width: 14px; height: 14px;
  background: #909399; border-radius: 3px; position: relative;
  margin-right: 4px; vertical-align: middle;
}
.lg-breakout-marker::after {
  content: ""; position: absolute; top: 0; right: 0;
  width: 0; height: 0;
  border-top: 6px solid #67E0E3;
  border-left: 6px solid transparent;
}
.lg-spacer { flex: 1; }

/* ---------- Chassis frame (P4-1) ---------- */
.chassis-frame {
  background: #131c2c;
  border: 1px solid #3d5076;
  border-radius: 6px;
  box-shadow: 0 4px 16px rgba(0,0,0,0.4), inset 0 1px 0 rgba(255,255,255,0.04);
  overflow: hidden;
}
.chassis-titlebar {
  display: flex; align-items: center; gap: 12px;
  padding: 8px 16px;
  background: linear-gradient(180deg, #2a3956, #1f2c45);
  border-bottom: 1px solid #3d5076;
  font-size: 12px; color: #b8c2d4;
}
.chassis-titlebar .chassis-vendor {
  background: #67E0E3; color: #1a2236;
  padding: 2px 8px; border-radius: 3px;
  font-weight: 700; font-size: 11px; letter-spacing: 0.5px;
}
.chassis-titlebar .chassis-model { font-weight: 600; color: #fff; }
.chassis-titlebar .chassis-meta { margin-left: auto; opacity: 0.75; }

.faceplate {
  display: flex; flex-direction: column; gap: 6px;
  background: #1f2a40;
  padding: 10px; min-height: 200px;
}
.chassis-frame .faceplate { background: transparent; padding: 12px 14px; }
.card-strip {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 10px;
  background: #2b3a55; border-radius: 5px;
  padding: 8px 10px;
  border-left: 3px solid #5d6d8a;
  color: #cfd8e6;
  align-items: center;
}
.card-strip.strip-cpm    { border-left-color: #E6A23C; }
.card-strip.strip-sfm    { border-left-color: #909399; }
.card-strip.strip-daughter { border-left-color: #67E0E3; }
.card-strip.strip-down   { opacity: 0.55; }
.card-strip.strip-placeholder {
  background: #1a2236; border-left-color: #4a5570;
  border: 1px dashed #4a5570; opacity: 0.55;
}
.card-strip.strip-placeholder .card-slot-name { color: #93a0bb; }
.card-strip.strip-placeholder .card-type { color: #6b7895; font-style: italic; }
.placeholder-text { color: #6b7895 !important; font-style: italic; }

/* ---------- Section dividers in faceplate (P4 phase 2) ---------- */
.section-divider {
  display: flex; align-items: center; justify-content: space-between;
  margin: 8px 0 4px;
  padding: 4px 10px;
  background: linear-gradient(90deg, rgba(103,224,227,0.12), transparent);
  border-left: 3px solid #67E0E3;
  border-radius: 3px;
  font-size: 11px; letter-spacing: 0.5px;
  text-transform: uppercase;
  color: #cfd8e6;
}
.section-divider:first-child { margin-top: 0; }
.section-divider .section-label { font-weight: 600; }
.section-divider .section-stats { color: #93a0bb; font-weight: 400; }
.section-cpm  { border-left-color: #E6A23C; background: linear-gradient(90deg, rgba(230,162,60,0.15), transparent); }
.section-sfm  { border-left-color: #909399; background: linear-gradient(90deg, rgba(144,147,153,0.15), transparent); }
.section-external { border-left-color: #B084EB; background: linear-gradient(90deg, rgba(176,132,235,0.15), transparent); }

.card-strip .card-meta {
  display: flex; flex-direction: column; gap: 2px; min-width: 0;
}
.card-slot-line {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  min-width: 0;
}
.card-strip .card-slot-name { font-weight: 600; font-size: 12px; color: #fff; }
.number-copy-chip {
  appearance: none;
  border: 1px solid rgba(103,224,227,0.45);
  background: rgba(103,224,227,0.12);
  color: #dffcff;
  border-radius: 3px;
  padding: 2px 5px;
  font-size: 10px;
  line-height: 1.2;
  font-family: ui-monospace, "SF Mono", Menlo, monospace;
  cursor: pointer;
  max-width: 122px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.number-copy-chip:hover {
  background: rgba(103,224,227,0.22);
  border-color: rgba(103,224,227,0.8);
}
.card-strip .card-type {
  font-size: 11px; color: #b8c2d4;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.card-strip .card-tags { display: flex; gap: 4px; margin-top: 2px; flex-wrap: wrap; }

.card-strip .card-ports {
  display: flex; flex-wrap: wrap; gap: 3px;
  align-content: center;
}
.card-strip .card-noports {
  font-size: 11px; color: #5d6d8a; font-style: italic;
}

.port-cell {
  width: 28px; height: 28px;
  border-radius: 3px;
  display: flex; align-items: center; justify-content: center;
  font-size: 9px; color: rgba(255,255,255,0.85);
  font-family: ui-monospace, "SF Mono", Menlo, monospace;
  cursor: pointer;
  border: 1px solid rgba(0,0,0,0.18);
  transition: transform 0.08s;
  position: relative;
}
.port-cell:hover { transform: scale(1.18); z-index: 2; }
.port-up    { background: #67C23A; }
.port-equip { background: #E6A23C; }
.port-empty { background: #6b7895; color: rgba(255,255,255,0.45); }
.port-fault { background: #F56C6C; }
.port-highlight { outline: 2px solid #67E0E3; outline-offset: 1px; }
/* Triangular corner marker indicating this connector has breakout sub-port(s). */
.port-breakout-marker {
  position: absolute; top: 0; right: 0;
  width: 0; height: 0;
  border-top: 7px solid #67E0E3;
  border-left: 7px solid transparent;
  pointer-events: none;
}
.card-port-count {
  font-size: 10px; color: #cfd8e6; margin-left: 4px; opacity: 0.7;
}

/* ---------- Tree-mode tweaks for the Ports table ---------- */
.breakout-row {
  font-family: ui-monospace, "SF Mono", Menlo, monospace;
  color: #909399; font-size: 12px;
}

.empty-hint {
  text-align: center; color: #909399; font-size: 13px; padding: 30px;
}

/* ---------- Neighbors tab (P5) ---------- */
.neighbors-summary {
  display: flex; gap: 18px; align-items: center;
  padding: 8px 12px; margin-bottom: 12px;
  background: #f4f6f9; border-radius: 4px;
  font-size: 13px; color: #606266;
}
.neighbors-summary b { color: #303133; font-size: 14px; }

.neighbor-group { margin-bottom: 14px; }
.neighbor-head {
  display: flex; align-items: center; gap: 10px;
  padding: 6px 10px;
  background: #f4f6f9; border-left: 3px solid #67E0E3;
  border-radius: 3px; font-size: 13px;
}
.neighbor-head.kind-internal { border-left-color: #67C23A; background: rgba(103,194,58,0.08); }
.neighbor-head.kind-external { border-left-color: #E6A23C; background: rgba(230,162,60,0.08); }
.neighbor-head.kind-reserved { border-left-color: #909399; background: rgba(144,147,153,0.08); }
.neighbor-name { font-weight: 600; color: #303133; }
.neighbor-chassis { font-weight: 400; color: #909399; font-size: 12px; margin-left: 6px; }
.neighbor-ports-count { color: #909399; font-size: 12px; margin-left: auto;
                          display: flex; gap: 8px; align-items: center; }
.neighbor-ports-count .lag-count {
  background: #409EFF; color: #fff;
  padding: 1px 8px; border-radius: 3px; font-weight: 600; font-size: 11px;
}

.lag-block {
  margin-top: 6px;
  border: 1px solid rgba(64,158,255,0.4);
  border-radius: 4px;
  overflow: hidden;
}
.lag-block .el-table { background: rgba(64,158,255,0.04); }
.lag-block .el-table__cell { background: transparent !important; }
.member-block { margin-top: 6px; padding-left: 18px;
                border-left: 2px dashed #DCDFE6; }
.member-label { font-size: 12px; color: #606266; padding: 4px 0; }
.member-label .muted { color: #909399; font-size: 11px; }

/* ---------- Distribution dialog ---------- */
.dist-controls {
  display: flex; gap: 12px; align-items: center; flex-wrap: wrap;
  margin-bottom: 8px;
}

/* ---------- Audit / analysis ---------- */
.audit-summary {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 10px;
}
.audit-metric {
  background: #fafbfd;
  border: 1px solid #e4e7ed;
  border-radius: 4px;
  padding: 10px 12px;
}
.audit-metric .k { font-size: 12px; color: #909399; }
.audit-metric .v { margin-top: 4px; font-size: 22px; font-weight: 600; color: #303133; }
.audit-tabs .filters { margin: 0 0 8px; }
.audit-pagination {
  margin-top: 8px;
  justify-content: flex-end;
}
.audit-chart-panel {
  margin: 0 0 10px;
  border: 1px solid #e4e7ed;
  border-radius: 4px;
  background: #fafbfd;
  padding: 10px 12px 6px;
}
.audit-chart-title {
  font-size: 12px;
  color: #909399;
  margin-bottom: 2px;
}
.audit-chart {
  width: 100%;
  height: 240px;
}
.service-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}
.service-kpi-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin-bottom: 12px;
}
.service-kpi-card {
  background: #fafbfd;
  border: 1px solid #e4e7ed;
  border-radius: 4px;
  padding: 10px 12px;
  min-width: 0;
}
.service-kpi-card .k {
  font-size: 12px;
  color: #909399;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.service-kpi-card .v {
  margin-top: 4px;
  font-size: 22px;
  font-weight: 600;
  color: #303133;
  line-height: 1.15;
}
.service-kpi-card .hint {
  margin-top: 5px;
  font-size: 11px;
  color: #909399;
  line-height: 1.35;
  white-space: normal;
  overflow: hidden;
}
.service-widget-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}
.service-widget {
  border: 1px solid #e4e7ed;
  border-radius: 4px;
  background: #fff;
  padding: 10px;
  min-width: 0;
}
.service-widget-head {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 8px;
}
.service-widget-head .title {
  font-weight: 600;
  color: #303133;
  font-size: 13px;
}
.service-widget-head .metric {
  color: #909399;
  font-size: 12px;
}
.service-widget-row {
  padding: 6px 0;
  border-top: 1px solid #f0f2f5;
}
.service-widget-row:first-of-type { border-top: 0; }
.service-row-main {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  align-items: baseline;
}
.service-row-main .label {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 12px;
  color: #303133;
}
.service-row-main .value {
  font-size: 12px;
  font-weight: 600;
  color: #303133;
}
.service-row-bar {
  height: 4px;
  margin: 5px 0 3px;
  background: #eef3fb;
  border-radius: 3px;
  overflow: hidden;
}
.service-row-bar span {
  display: block;
  height: 100%;
  background: #5B8FF9;
}
.service-row-hint {
  font-size: 11px;
  color: #909399;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.service-dashboard-empty {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px;
  border: 1px solid #e4e7ed;
  border-radius: 4px;
  background: #fafbfd;
}
.recommendation-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}
.recommendation-item {
  border: 1px solid #e4e7ed;
  border-left: 3px solid #409EFF;
  border-radius: 4px;
  padding: 10px;
  background: #fff;
}
.recommendation-theme { font-weight: 600; color: #303133; margin-bottom: 6px; }
.recommendation-signal { font-size: 12px; color: #606266; margin-bottom: 6px; }
.recommendation-action { font-size: 12px; color: #909399; line-height: 1.45; }

/* ---------- RSVP LSP overview ---------- */
.lsp-summary {
  grid-template-columns: repeat(6, minmax(0, 1fr));
}
.lsp-quality-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  margin: 12px 0 14px;
}
.lsp-controls {
  margin-bottom: 8px;
}
.lsp-optimize-panel {
  border: 1px solid #f3d19e;
  border-left: 4px solid #e6a23c;
  border-radius: 4px;
  background: #fffaf2;
  padding: 10px 12px 12px;
  margin-bottom: 12px;
}
.lsp-optimize-head {
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  gap: 12px;
  align-items: flex-start;
  margin-bottom: 8px;
}
.lsp-optimize-title-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  width: 100%;
}
.lsp-optimize-title-row > div {
  min-width: 0;
}
.lsp-optimize-actions {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  flex-wrap: wrap;
  gap: 6px;
  width: 100%;
}
.lsp-optimize-head b,
.lsp-optimize-head span {
  display: block;
}
.lsp-optimize-head b {
  color: #303133;
  font-size: 14px;
}
.lsp-optimize-head span {
  color: #606266;
  font-size: 12px;
  margin-top: 2px;
}
.lsp-optimize-table {
  border: 1px solid #ebeef5;
  border-radius: 4px;
}
.lsp-optimize-table .el-table__row {
  cursor: pointer;
}
.lsp-opt-progress-panel {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.lsp-opt-progress-meta {
  display: flex;
  align-items: center;
  gap: 10px;
  color: #606266;
  font-size: 13px;
}
.lsp-opt-resource {
  color: #909399;
}
.lsp-opt-progress-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}
.lsp-opt-progress-grid > div {
  border: 1px solid #ebeef5;
  border-radius: 4px;
  background: #fafbfd;
  padding: 8px 10px;
  min-width: 0;
}
.lsp-opt-progress-grid span,
.lsp-opt-progress-grid b {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.lsp-opt-progress-grid span {
  color: #909399;
  font-size: 12px;
}
.lsp-opt-progress-grid b {
  color: #303133;
  font-size: 13px;
  margin-top: 2px;
}
.lsp-opt-log-box {
  height: 280px;
}
.lsp-topo-shell {
  position: relative;
  margin-bottom: 12px;
}
.lsp-topo-canvas {
  width: 100%;
  height: 1080px;
  background: #fafbfd;
  border: 1px solid #e4e7ed;
  border-radius: 4px;
  margin-bottom: 0;
}
.lsp-creation-card {
  margin-top: 0;
}
.lsp-creation-grid {
  display: grid;
  grid-template-columns: minmax(380px, 0.7fr) minmax(760px, 1.3fr);
  gap: 10px;
  align-items: start;
}
.lsp-creation-panel {
  border: 1px solid #e4e7ed;
  border-radius: 6px;
  padding: 12px;
  background: #fff;
  min-width: 0;
}
.lsp-creation-input-panel {
  padding: 10px;
}
.lsp-creation-project-panel {
  overflow: hidden;
}
.lsp-creation-panel-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 700;
  color: #303133;
  margin-bottom: 10px;
}
.lsp-creation-form-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 10px;
  flex-wrap: wrap;
}
.lsp-creation-form-row .el-button {
  flex: 0 0 auto;
}
.lsp-creation-name-input {
  flex: 1 1 160px;
  min-width: 150px;
}
.lsp-creation-pair-select {
  flex: 0 0 98px;
  width: 98px;
}
.lsp-creation-vendor-select {
  flex: 0 0 86px;
  width: 86px;
}
.lsp-creation-endpoint-select {
  flex: 1 1 120px;
  min-width: 120px;
}
.lsp-creation-table {
  margin-top: 10px;
}
.lsp-creation-detail {
  margin-top: 14px;
  border-top: 1px solid #ebeef5;
  padding-top: 12px;
}
.lsp-creation-detail-spacer {
  flex: 1;
}
.lsp-creation-row-actions {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 12px;
  white-space: nowrap;
}
.lsp-creation-row-actions .el-button + .el-button {
  margin-left: 0;
}
.lsp-creation-project-panel .el-table .cell {
  overflow: hidden;
  text-overflow: ellipsis;
}
.lsp-creation-review-dialog .el-dialog__body {
  padding-top: 8px;
}
.lsp-creation-review-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.lsp-creation-review-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  align-items: center;
  min-width: 0;
}
.lsp-creation-review-tab {
  appearance: none;
  border: 0;
  background: transparent;
  padding: 0;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  opacity: 0.72;
}
.lsp-creation-review-tab.is-active,
.lsp-creation-review-tab:hover {
  opacity: 1;
  text-decoration: underline;
  text-underline-offset: 4px;
}
.lsp-creation-review-body {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  gap: 14px;
  min-height: 560px;
}
.lsp-creation-review-canvas {
  height: 560px;
  min-width: 0;
  border: 1px solid #e4e7ed;
  border-radius: 6px;
  background: #fbfcff;
}
.lsp-creation-review-side {
  display: grid;
  gap: 12px;
  align-content: start;
  max-height: 560px;
  overflow: auto;
  padding-right: 2px;
}
.lsp-creation-review-path {
  border: 1px solid #dcdfe6;
  border-left-width: 4px;
  border-radius: 6px;
  padding: 8px;
  background: #fff;
}
.lsp-creation-review-path-title {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
}
.lsp-creation-review-path-title b {
  font-size: 12px;
}
.lsp-creation-review-path-title em {
  margin-left: auto;
  font-size: 11px;
  color: #909399;
  font-style: normal;
}
.lsp-creation-review-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}
.lsp-creation-review-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}
.lsp-creation-review-actions .result-count {
  white-space: normal;
}
@media (max-width: 1240px) {
  .lsp-creation-grid {
    grid-template-columns: 1fr;
  }
  .lsp-creation-review-body {
    grid-template-columns: 1fr;
  }
  .lsp-creation-review-side {
    max-height: none;
  }
}
.lsp-path-legend {
  position: static;
  width: 100%;
  max-width: none;
  max-height: none;
  overflow: visible;
  border: 1px solid #e4e7ed;
  border-radius: 4px;
  background: #fff;
  box-shadow: 0 1px 3px rgba(31,45,61,0.06);
  padding: 10px 12px;
  margin-top: 10px;
}
.lsp-path-legend-title {
  color: #909399;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0;
  margin-bottom: 8px;
}
.lsp-path-legend-items {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 8px;
}
.lsp-lsp-groups {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(420px, 1fr));
  gap: 10px;
}
.lsp-lsp-group {
  border: 1px solid #e4e7ed;
  border-radius: 4px;
  background: #fbfcff;
  padding: 9px 10px;
  min-width: 0;
}
.lsp-lsp-name {
  color: #303133;
  font-size: 13px;
  font-weight: 700;
  margin-bottom: 7px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.lsp-lsp-paths {
  display: grid;
  gap: 6px;
}
.lsp-lsp-path-row {
  display: grid;
  grid-template-columns: 34px 86px minmax(0, 1fr);
  gap: 8px;
  align-items: center;
  min-width: 0;
  cursor: pointer;
  border-radius: 4px;
  padding: 3px 4px;
  margin: -3px -4px;
  transition: background 0.15s ease, box-shadow 0.15s ease;
}
.lsp-lsp-path-row:hover,
.lsp-lsp-path-row.is-focused,
.lsp-path-legend-item:hover,
.lsp-path-legend-item.is-focused {
  background: #f2f8ff;
  box-shadow: inset 0 0 0 1px rgba(64,158,255,0.22);
}
.lsp-lsp-path-row.is-flowing,
.lsp-path-legend-item.is-flowing {
  background: #ecf5ff;
  box-shadow: inset 0 0 0 1px rgba(64,158,255,0.45);
}
.lsp-path-legend-item {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  gap: 8px;
  align-items: center;
  border: 1px solid #e4e7ed;
  border-left-width: 4px;
  border-radius: 4px;
  background: #fbfcff;
  padding: 8px 10px 8px 8px;
  min-width: 0;
  cursor: pointer;
  transition: background 0.15s ease, box-shadow 0.15s ease, opacity 0.15s ease;
}
.lsp-path-legend-item.is-candidate {
  background: #fffaf2;
  border-style: dashed;
}
.lsp-path-legend-line {
  width: 30px;
  height: 4px;
  border-radius: 999px;
  box-shadow: 0 0 0 2px rgba(255,255,255,0.9);
}
.lsp-path-legend-line.is-candidate {
  opacity: 0.45;
  background-image: repeating-linear-gradient(
    90deg,
    rgba(255,255,255,0) 0,
    rgba(255,255,255,0) 7px,
    rgba(255,255,255,0.9) 7px,
    rgba(255,255,255,0.9) 11px
  );
}
.lsp-candidate-hop-seq {
  display: block;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: #606266;
  background: rgba(255,255,255,0.68);
  border: 1px solid #ebeef5;
  border-radius: 3px;
  padding: 2px 4px;
  font-size: 10px;
  line-height: 1.25;
  letter-spacing: 0;
}
.lsp-path-legend-divider {
  height: 1px;
  background: #e4e7ed;
  margin: 10px 0 8px;
}
.lsp-path-legend-gain {
  color: #606266;
  font-size: 12px;
  font-weight: 700;
  margin-top: 8px;
  text-align: right;
}
.lsp-path-legend-copy {
  display: grid;
  gap: 2px;
  min-width: 0;
}
.lsp-path-legend-copy b,
.lsp-path-legend-copy span,
.lsp-path-legend-copy em {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.lsp-path-legend-copy b {
  font-size: 13px;
}
.lsp-path-legend-copy span {
  color: #606266;
  font-size: 12px;
}
.lsp-path-legend-copy em {
  color: #909399;
  font-size: 11px;
  font-style: normal;
}
.lsp-review-panel {
  border: 1px solid #dcdfe6;
  border-radius: 4px;
  background: #fff;
  padding: 12px;
  margin-bottom: 12px;
}
.lsp-table-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.25fr);
  gap: 12px;
}
.lsp-table-panel {
  border: 1px solid #e4e7ed;
  border-radius: 4px;
  background: #fff;
  padding: 10px;
  min-width: 0;
}
.lsp-panel-title {
  font-size: 13px;
  font-weight: 600;
  color: #303133;
  margin-bottom: 8px;
}
.lsp-analysis-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin-bottom: 8px;
}
.lsp-analysis-card {
  border: 1px solid #e4e7ed;
  border-radius: 4px;
  background: #fafbfd;
  padding: 8px 10px;
}
.lsp-analysis-card span,
.lsp-analysis-card em {
  display: block;
  color: #909399;
  font-size: 11px;
  font-style: normal;
}
.lsp-analysis-card b {
  display: block;
  color: #303133;
  font-size: 17px;
  margin: 2px 0;
}
.lsp-recommendation-summary {
  border: 1px solid #dcdfe6;
  border-left-width: 4px;
  border-radius: 4px;
  background: #fafbfd;
  padding: 10px 12px;
  margin: 4px 0 12px;
}
.lsp-recommendation-summary.is-success {
  border-left-color: #67c23a;
  background: #f6fbf2;
}
.lsp-recommendation-summary.is-warning {
  border-left-color: #e6a23c;
  background: #fffaf2;
}
.lsp-recommendation-summary.is-info {
  border-left-color: #409eff;
  background: #f4f9ff;
}
.lsp-recommendation-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: baseline;
  color: #303133;
  font-weight: 700;
}
.lsp-recommendation-head b {
  color: #606266;
  font-size: 12px;
  white-space: nowrap;
}
.lsp-recommendation-meta {
  color: #909399;
  font-size: 11px;
  margin-top: 2px;
}
.lsp-recommendations {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 8px;
  margin-top: 8px;
}
.lsp-recommended-configs {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(680px, 1fr));
  gap: 10px;
  margin-top: 10px;
}
.lsp-config-card {
  border: 1px solid var(--lsp-config-border, #f3d19e);
  border-radius: 4px;
  background: linear-gradient(180deg, var(--lsp-config-soft, rgba(255,255,255,0.82)), rgba(255,255,255,0.92));
  padding: 9px 10px;
  min-width: 0;
  box-shadow: inset 4px 0 0 var(--lsp-config-color, #e6a23c);
}
.lsp-config-card.is-review-only {
  border-style: dashed;
  background: linear-gradient(180deg, rgba(255, 251, 235, 0.92), rgba(255,255,255,0.94));
}
.lsp-config-title {
  display: grid;
  gap: 2px;
  margin-bottom: 8px;
}
.lsp-config-title b {
  color: var(--lsp-config-color, #303133);
  font-size: 12px;
  display: flex;
  align-items: center;
  gap: 6px;
}
.lsp-config-title-line {
  display: inline-block;
  width: 28px;
  height: 4px;
  border-radius: 999px;
  background: var(--lsp-config-color, #e6a23c);
  box-shadow: 0 0 0 2px var(--lsp-config-soft, rgba(230,162,60,0.08));
}
.lsp-config-title span {
  color: #606266;
  font-size: 11px;
  line-height: 1.35;
}
.lsp-config-compare {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 8px;
}
.lsp-config-side {
  min-width: 0;
}
.lsp-config-side.is-wide {
  grid-column: 1 / -1;
}
.lsp-config-label {
  color: #909399;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0;
  text-transform: uppercase;
  margin: 0 0 4px;
}
.lsp-config-block {
  margin: 0;
  padding: 7px 8px;
  border: 1px solid #e4e7ed;
  border-radius: 4px;
  background: #1f2933;
  color: #d8dee9;
  font-size: 10.5px;
  line-height: 1.36;
  overflow-x: auto;
}
.lsp-config-line {
  display: block;
  white-space: pre;
}
.lsp-config-line.is-path,
.lsp-config-line.is-exit {
  color: #f5f7fa;
  font-weight: 700;
}
.lsp-config-line.is-changed {
  color: #fff7d6;
  background: var(--lsp-config-line-bg, rgba(230,162,60,0.38));
  box-shadow: inset 3px 0 0 var(--lsp-config-color, #e6a23c);
}
.lsp-recommendation-item {
  border: 1px solid #e4e7ed;
  border-radius: 4px;
  background: rgba(255,255,255,0.72);
  padding: 8px 10px;
}
.lsp-recommendation-item b,
.lsp-recommendation-item span {
  display: block;
}
.lsp-recommendation-item b {
  color: #303133;
  font-size: 12px;
}
.lsp-recommendation-item span {
  color: #606266;
  font-size: 12px;
  line-height: 1.45;
  margin-top: 2px;
  white-space: pre-line;
}
.lsp-recommendation-item.is-success {
  border-color: #d1edc4;
}
.lsp-recommendation-item.is-warning {
  border-color: #f3d19e;
}
.lsp-recommendation-item.is-info {
  border-color: #c6e2ff;
}
.lsp-path-swatch {
  display: inline-block;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  box-shadow: inset 0 0 0 2px rgba(255,255,255,0.75);
}
.lsp-link-dialog {
  display: grid;
  gap: 12px;
}
.lsp-dialog-title {
  font-weight: 600;
  color: #303133;
}
.lsp-dialog-metrics {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}
.lsp-dialog-metrics div {
  border: 1px solid #e4e7ed;
  border-radius: 4px;
  padding: 10px;
  background: #fafbfd;
}
.lsp-dialog-metrics span {
  display: block;
  color: #909399;
  font-size: 12px;
}
.lsp-dialog-metrics b {
  display: block;
  color: #303133;
  font-size: 20px;
  margin-top: 4px;
}
.lsp-dialog-source {
  color: #606266;
  font-size: 12px;
  line-height: 1.45;
}

.link-map-dialog {
  min-height: 180px;
}
.link-map-metrics {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 10px;
  margin: 12px 0;
}
.link-map-metrics div {
  border: 1px solid #e4e7ed;
  border-radius: 4px;
  padding: 10px;
  background: #fafbfd;
}
.link-map-metrics span {
  display: block;
  color: #909399;
  font-size: 12px;
}
.link-map-metrics b {
  display: block;
  color: #303133;
  font-size: 20px;
  margin-top: 4px;
}
.link-map-igp {
  border: 1px solid rgba(103,194,58,0.28);
  background: rgba(103,194,58,0.08);
  border-radius: 4px;
  padding: 8px 10px;
  margin-bottom: 10px;
}
.link-map-external {
  border-color: rgba(64,158,255,0.28);
  background: rgba(64,158,255,0.08);
}
.link-map-igp-row {
  display: grid;
  grid-template-columns: 150px minmax(0, 1fr) minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  color: #606266;
  font-size: 12px;
}
.map-endpoint-name {
  font-weight: 600;
  color: #303133;
}
.map-endpoint-cli {
  font-family: ui-monospace, "SF Mono", Menlo, monospace;
  color: #606266;
  font-size: 12px;
  margin-top: 2px;
}
.map-endpoint-ip {
  font-family: ui-monospace, "SF Mono", Menlo, monospace;
  color: #409EFF;
  font-size: 12px;
  margin-top: 2px;
}
.map-member-panel {
  padding: 8px 16px 12px 44px;
  background: #fafbfd;
}

/* ---------- Site detail rate breakdown ---------- */
.rate-breakdown {
  margin: 6px 0 14px;
  background: #fafbfd;
  border: 1px solid #e4e7ed;
  border-radius: 4px;
  padding: 10px 14px;
}
.rate-breakdown-title {
  font-size: 12px; color: #909399;
  margin-bottom: 4px;
  min-height: 24px;
}
.rate-chart { width: 100%; height: 200px; }

/* ---------- Topology graph (P5.2) ---------- */
.topo-chart-wrap {
  position: relative;
  width: 100%;
}
.topo-canvas {
  width: 100%; height: 930px;
  background: #fafbfd; border: 1px solid #e4e7ed;
  border-radius: 4px;
}
.topo-capacity-layer {
  position: absolute;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
  z-index: 3;
}
.topo-capacity-label {
  position: absolute;
  transform: translate(-50%, -50%);
  white-space: nowrap;
  color: #8a5a00;
  font-size: 9px;
  font-weight: 600;
  line-height: 1.15;
  background: rgba(255,255,255,0.95);
  border: 1px solid rgba(230,162,60,0.52);
  border-radius: 3px;
  padding: 1px 3px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.08);
}
.topo-control-label {
  font-size: 12px;
  color: #606266;
  margin-left: 4px;
}

.audit-breakdown-cell {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 2px;
  line-height: 1.25;
}
.audit-breakdown-vision {
  width: 100%;
  align-items: stretch;
}
.audit-breakdown-vision .audit-total {
  text-align: right;
}
.audit-total {
  font-weight: 600;
  color: #303133;
}
.audit-subline {
  max-width: 180px;
  color: #909399;
  font-size: 11px;
  white-space: normal;
  word-break: keep-all;
}
.audit-stack-wrap {
  width: 100%;
  margin-top: 4px;
}
.audit-stack-bar {
  display: flex;
  justify-content: flex-start;
  width: 100%;
  min-width: 160px;
  height: 14px;
  background: #edf2f7;
  border: 1px solid #d8dee8;
  border-radius: 999px;
  overflow: hidden;
}
.audit-stack-segment {
  position: relative;
  display: block;
  flex: 0 0 auto;
  min-width: 3px;
  height: 100%;
}
.audit-stack-segment + .audit-stack-segment {
  box-shadow: inset 1px 0 0 rgba(255,255,255,0.75);
}
.audit-stack-segment-label {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  color: #fff;
  font-size: 9px;
  font-weight: 700;
  line-height: 1;
  text-shadow: 0 1px 2px rgba(0,0,0,0.35);
  white-space: nowrap;
  pointer-events: none;
}
.audit-stack-legend {
  display: flex;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 2px 7px;
  max-width: none;
  margin-top: 3px;
  text-align: right;
}
.audit-speed-breakdown-item {
  font-size: 11px;
  font-weight: 600;
  white-space: nowrap;
}
.audit-speed-header {
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  gap: 5px;
  width: 100%;
}
.audit-speed-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  display: inline-block;
}
.audit-status-bar {
  height: 15px;
}
.audit-site-cell {
  display: flex;
  flex-direction: column;
  gap: 2px;
  line-height: 1.2;
}
.audit-site-name {
  color: #303133;
  font-weight: 600;
}
.audit-site-ip {
  color: #909399;
  font-size: 11px;
}
.audit-vision-wrap {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.audit-vision-row {
  display: grid;
  grid-template-columns: 18px 1fr;
  align-items: center;
  gap: 3px;
}
.audit-vision-key {
  font-size: 10px;
  color: #909399;
  font-weight: 600;
  text-align: center;
}
.audit-vision-bar {
  height: 10px;
  width: 100%;
  border-radius: 999px;
  overflow: hidden;
  background: #ebeef5;
  display: flex;
}
.audit-vision-bar > span {
  height: 100%;
  display: block;
  position: relative;
  min-width: 0;
  overflow: hidden;
}
.seg-label {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  color: #fff;
  font-size: 10px;
  font-weight: 600;
  line-height: 1;
  text-shadow: 0 1px 2px rgba(0,0,0,0.35);
  white-space: nowrap;
  pointer-events: none;
}
.seg-u { background: #409EFF; }
.seg-i { background: #67C23A; }
.seg-f { background: #E6A23C; }
.audit-vision-legend {
  color: #606266;
  font-size: 10px;
  line-height: 1.2;
}

/* ---------- Synchronize progress ---------- */
.sync-progress-panel {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.sync-progress-meta {
  display: flex;
  align-items: center;
  gap: 10px;
  color: #606266;
  font-size: 13px;
}
.sync-log-box {
  height: 260px;
  overflow: auto;
  border: 1px solid #dcdfe6;
  border-radius: 6px;
  background: #f8fafc;
  padding: 8px 10px;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 12px;
  line-height: 1.55;
}
.sync-log-line {
  display: grid;
  grid-template-columns: 70px 88px 1fr;
  gap: 8px;
  align-items: baseline;
  border-bottom: 1px solid rgba(220,223,230,0.5);
  padding: 3px 0;
}
.sync-log-line:last-child {
  border-bottom: 0;
}
.sync-log-time {
  color: #909399;
}
.sync-log-stage {
  color: #409EFF;
  font-weight: 600;
}
.sync-error {
  border: 1px solid #f5c2c7;
  background: #fff5f5;
  color: #c45656;
  border-radius: 6px;
  padding: 8px 10px;
  font-size: 13px;
}

/* ---------- Status dots ---------- */
.dot { display: inline-block; width: 10px; height: 10px; border-radius: 50%; }
.dot-up   { background: #67C23A; box-shadow: 0 0 4px rgba(103,194,58,0.5); }
.dot-down { background: #DCDFE6; }

/* ---------- Row hover ---------- */
.el-table__row { cursor: pointer; }
