/* 安防运维平台 — 视觉主题（全部本地，无 CDN） */
:root {
  --so-primary: #1677ff;
  --so-primary-dim: #0958d9;
  --so-accent: #13c2c2;
  --so-bg-deep: #f5f7fa;
  --so-bg-panel: #ffffff;
  --so-bg-elevated: #ffffff;
  --so-border: #e4e7ed;
  --so-text: #1f2937;
  --so-text-muted: #6b7280;
  --so-glow: rgba(22, 119, 255, 0.25);
  --so-radius: 10px;
  --so-radius-lg: 12px;
  --so-shadow: 0 6px 24px rgba(15, 23, 42, 0.08);
  --el-color-primary: #1677ff;
  --el-color-primary-light-3: #4096ff;
  --el-color-primary-light-5: #69b1ff;
  --el-color-primary-light-7: #91caff;
  --el-color-primary-light-8: #bae0ff;
  --el-color-primary-light-9: #e6f4ff;
  --el-color-primary-dark-2: #0958d9;
  --el-bg-color: #f5f7fa;
  --el-bg-color-page: #f0f2f5;
  --el-border-radius-base: 8px;
  --el-font-family: "Segoe UI", "PingFang SC", "Microsoft YaHei", "Helvetica Neue", sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }

html, body, #app {
  height: 100%;
  margin: 0;
}

body {
  font-family: var(--el-font-family);
  background: var(--so-bg-deep);
  color: var(--so-text);
  -webkit-font-smoothing: antialiased;
}

.muted { color: var(--so-text-muted); font-size: 13px; line-height: 1.6; }

.boot-fallback {
  max-width: 480px;
  margin: 80px auto;
  padding: 28px 32px;
  background: var(--so-bg-elevated);
  border: 1px solid var(--so-border);
  border-radius: var(--so-radius-lg);
  line-height: 1.7;
}

/* ——— 登录页 ——— */
.login-scene {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 1fr 1fr;
  position: relative;
  overflow: hidden;
}

.login-scene__bg {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 70% 60% at 10% 20%, rgba(22, 119, 255, 0.12), transparent 55%),
    radial-gradient(ellipse 60% 50% at 90% 80%, rgba(19, 194, 194, 0.1), transparent 50%),
    linear-gradient(165deg, #eef4ff 0%, #f8fafc 45%, #f0f5ff 100%);
  z-index: 0;
}

.login-scene__grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(22,119,255,.06) 1px, transparent 1px),
    linear-gradient(90deg, rgba(22,119,255,.06) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: radial-gradient(ellipse 70% 70% at 30% 50%, black, transparent);
  z-index: 0;
}

.login-hero {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 64px 72px;
}

.login-hero__badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  border-radius: 999px;
  font-size: 12px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--so-primary);
  background: rgba(0, 212, 170, 0.08);
  border: 1px solid rgba(0, 212, 170, 0.25);
  width: fit-content;
  margin-bottom: 28px;
}

.login-hero__title {
  margin: 0;
  font-size: clamp(32px, 4vw, 44px);
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.02em;
  color: #0f172a;
}

.login-hero__sub {
  margin: 20px 0 0;
  max-width: 420px;
  font-size: 16px;
  line-height: 1.75;
  color: var(--so-text-muted);
}

.login-hero__stats {
  display: flex;
  gap: 32px;
  margin-top: 48px;
  padding-top: 32px;
  border-top: 1px solid var(--so-border);
}

.login-hero__stat strong {
  display: block;
  font-size: 28px;
  font-weight: 600;
  color: var(--so-primary);
}

.login-hero__stat span {
  font-size: 13px;
  color: var(--so-text-muted);
}

.login-panel {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 48px;
}

.login-glass {
  width: 100%;
  max-width: 420px;
  padding: 40px 36px 36px;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--so-border);
  border-radius: var(--so-radius-lg);
  box-shadow: var(--so-shadow), 0 0 0 1px rgba(0, 212, 170, 0.06);
}

.login-glass h2 {
  margin: 0 0 8px;
  font-size: 22px;
  font-weight: 600;
}

.login-glass .login-glass__hint {
  margin: 0 0 28px;
  font-size: 14px;
  color: var(--so-text-muted);
}

.login-glass .el-form-item__label {
  color: var(--so-text-muted) !important;
  font-weight: 500;
}

.login-glass .el-input__wrapper {
  background: #fff !important;
}

.login-glass .el-button--primary {
  height: 44px;
  font-size: 15px;
  font-weight: 600;
  border: none;
  background: linear-gradient(135deg, var(--so-primary) 0%, var(--so-primary-dim) 100%) !important;
  box-shadow: 0 8px 24px var(--so-glow);
}

.login-glass .el-button--primary:hover {
  filter: brightness(1.08);
}

@media (max-width: 960px) {
  .login-scene { grid-template-columns: 1fr; }
  .login-hero { display: none; }
  .login-panel { min-height: 100vh; }
}

/* ——— 主框架 ——— */
.app-shell {
  min-height: 100vh;
  display: flex;
  background: var(--so-bg-deep);
}

.app-sidebar {
  width: 248px;
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  background: #fff;
  border-right: 1px solid var(--so-border);
  box-shadow: 2px 0 8px rgba(15, 23, 42, 0.04);
  position: relative;
  transition: width 0.22s ease;
  z-index: 30;
}

.app-sidebar.is-collapsed .nav-group__head {
  display: none;
}

.app-sidebar.is-collapsed .nav-group__body {
  display: none !important;
}

.app-sidebar.is-collapsed .nav-group__icons {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 4px 8px 8px;
}

.app-sidebar.is-resizing {
  transition: none;
  user-select: none;
}

.app-sidebar__brand {
  padding: 22px 16px 14px;
  border-bottom: 1px solid var(--so-border);
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
}

.sidebar-toggle {
  flex-shrink: 0;
  border: 1px solid var(--so-border);
  border-radius: 8px;
  background: #f8fafc;
  color: var(--so-text-muted);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.sidebar-foot-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  min-height: 32px;
}

.app-sidebar.is-collapsed .sidebar-foot-row {
  justify-content: center;
}

.sidebar-toggle-inline {
  flex-shrink: 0;
  width: 28px;
  height: 28px;
  border: 1px solid var(--so-border);
  border-radius: 6px;
  background: #f8fafc;
  color: var(--so-text-muted);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.sidebar-toggle-inline:hover {
  color: var(--so-primary);
  border-color: var(--so-primary);
}

.app-sidebar.is-collapsed .sidebar-toggle-inline svg {
  transform: rotate(180deg);
}

.sidebar-foot-hint {
  margin: 0;
  font-size: 11px;
  color: var(--so-text-muted);
  line-height: 1.3;
  flex: 1;
}

.app-sidebar__logo {
  display: flex;
  align-items: center;
  gap: 12px;
}

.app-sidebar__logo-icon {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--so-primary), #0891b2);
  box-shadow: 0 4px 16px var(--so-glow);
}

.app-sidebar__logo-text strong {
  display: block;
  font-size: 15px;
  font-weight: 600;
  letter-spacing: 0.02em;
}

.app-sidebar__logo-text span {
  font-size: 11px;
  color: var(--so-text-muted);
}

.app-nav {
  flex: 1;
  padding: 8px 10px 16px;
  overflow-y: auto;
}

.nav-group {
  margin-bottom: 6px;
}

.nav-group__head {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 12px;
  border: none;
  background: transparent;
  cursor: pointer;
  border-radius: 8px;
  text-transform: none;
}

.nav-group__title {
  font-size: 14px;
  font-weight: 700;
  color: var(--so-text-muted);
  letter-spacing: 0.02em;
  transition: color 0.18s;
}

.nav-group.is-active .nav-group__title {
  color: var(--so-primary);
}

.nav-group.is-active .nav-group__head:hover .nav-group__title {
  color: var(--so-primary);
}

.nav-group__head:hover {
  background: #f1f5f9;
}

.nav-group:not(.is-open) .nav-group__chev {
  transform: rotate(-90deg);
}

.nav-group__chev {
  display: inline-block;
  transition: transform 0.18s;
  font-size: 16px;
  line-height: 1;
  color: var(--so-text-muted);
  padding: 0 2px;
}

.nav-group.is-active .nav-group__chev {
  color: var(--so-primary);
}

.nav-group__body {
  padding: 2px 0 6px;
}

.nav-group__icons {
  display: none;
}

.nav-item-wrap {
  margin-bottom: 2px;
}

.app-nav__link {
  position: relative;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px 10px 14px;
  border-radius: 10px;
  color: var(--so-text);
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  transition: background 0.18s, color 0.18s;
}

.app-nav__link:hover {
  color: var(--so-text);
  background: #f1f5f9;
}

.app-nav__link.is-active {
  color: var(--so-primary);
  background: var(--el-color-primary-light-9);
}

.app-nav__indicator {
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%) scaleY(0.4);
  width: 4px;
  height: 22px;
  border-radius: 0 4px 4px 0;
  background: var(--so-primary);
  opacity: 0;
  transition: opacity 0.18s, transform 0.18s;
}

.app-nav__link.is-active .app-nav__indicator {
  opacity: 1;
  transform: translateY(-50%) scaleY(1);
}

.app-nav__link--icon {
  justify-content: center;
  padding: 10px;
}

.app-nav__icon .nav-icon,
.app-nav__icon svg.nav-icon {
  width: 20px;
  height: 20px;
  opacity: 0.88;
}

.nav-drag-hint {
  margin-left: auto;
  font-size: 10px;
  color: #cbd5e1;
  cursor: grab;
  padding: 0 2px;
}

.nav-item-wrap:hover .nav-drag-hint {
  color: #94a3b8;
}

.nav-sub {
  margin: 2px 0 6px 0;
  padding: 2px 0 4px 28px;
  display: flex;
  flex-direction: column;
  gap: 0;
  border-left: 1px solid #c4c9d0;
  margin-left: 26px;
}

.nav-sub__link {
  position: relative;
  font-size: 13px;
  font-weight: 400;
  padding: 8px 12px 8px 10px;
  border-radius: 6px;
  color: #94a3b8;
  text-decoration: none;
}

.nav-sub__link:hover {
  color: #64748b;
  background: transparent;
}

.nav-sub__link.is-active {
  color: var(--so-primary);
  background: transparent;
  font-weight: 500;
}

.sidebar-resizer {
  position: absolute;
  top: 0;
  right: 0;
  width: 5px;
  height: 100%;
  cursor: col-resize;
  z-index: 5;
}

.sidebar-resizer:hover {
  background: rgba(37, 99, 235, 0.12);
}

.nav-flyout {
  position: fixed;
  z-index: 4000;
  min-width: 160px;
  padding: 8px;
  background: #fff;
  border: 1px solid var(--so-border);
  border-radius: 10px;
  box-shadow: 0 12px 40px rgba(15, 23, 42, 0.14);
}

.nav-flyout__title {
  font-size: 13px;
  font-weight: 600;
  padding: 6px 10px 8px;
  color: var(--so-text);
  border-bottom: 1px solid var(--so-border);
  margin-bottom: 4px;
}

.nav-flyout__link {
  display: block;
  padding: 8px 10px;
  border-radius: 8px;
  font-size: 13px;
  color: var(--so-text-muted);
  text-decoration: none;
}

.nav-flyout__link:hover,
.nav-flyout__link.is-active {
  background: var(--el-color-primary-light-9);
  color: var(--so-primary);
}

.app-sidebar__foot {
  padding: 12px 12px 14px;
  border-top: 1px solid var(--so-border);
  margin-top: auto;
}

.insp-month-scroll { overflow-x: auto; }
.insp-month-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
  font-family: "Microsoft YaHei", "SimSun", serif;
}
.insp-month-table th,
.insp-month-table td {
  border: 1px solid #333;
  padding: 6px 8px;
  vertical-align: middle;
}
.insp-month-table th {
  background: #f3f4f6;
  font-weight: 600;
  text-align: center;
}
.insp-month-table .c-center { text-align: center; }
.insp-month-table .c-wrap { max-width: 220px; line-height: 1.4; }
.insp-month-table .c-tick {
  text-align: center;
  cursor: pointer;
  min-width: 44px;
  user-select: none;
}
.insp-tick {
  display: inline-block;
  min-width: 18px;
  font-weight: 700;
  font-size: 16px;
}
.insp-tick--ok { color: #16a34a; }
.insp-tick--bad { color: #dc2626; }
.insp-tick--empty { color: transparent; }
.insp-month-foot { margin-top: 10px; font-size: 12px; }

.restart-steps {
  margin: 0;
  padding: 0;
  list-style: none;
}
.restart-steps__item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 0;
  font-size: 14px;
  color: #94a3b8;
}
.restart-steps__dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #e2e8f0;
  flex-shrink: 0;
}
.restart-steps__item--active { color: #1e293b; font-weight: 500; }
.restart-steps__item--active .restart-steps__dot { background: #f59e0b; animation: restart-pulse 1s infinite; }
.restart-steps__item--done { color: #16a34a; }
.restart-steps__item--done .restart-steps__dot { background: #16a34a; }
.restart-steps__item--err { color: #dc2626; }
.restart-steps__item--err .restart-steps__dot { background: #dc2626; }
@keyframes restart-pulse {
  50% { opacity: 0.45; }
}
.restart-steps__sub { font-size: 12px; color: #94a3b8; font-weight: 400; }
.restart-svc { margin: 10px 0 0; font-size: 13px; }
.restart-log {
  margin: 10px 0 0;
  padding: 8px 10px;
  max-height: 120px;
  overflow: auto;
  font-size: 11px;
  line-height: 1.45;
  background: #0f172a;
  color: #e2e8f0;
  border-radius: 8px;
}
.insp-month-doc .insp-remark-input .el-input__wrapper { box-shadow: none; padding: 0 4px; }

.app-body {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.app-topbar {
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 28px;
  background: #fff;
  border-bottom: 1px solid var(--so-border);
}

.app-topbar__title {
  font-size: 15px;
  font-weight: 500;
  color: var(--so-text-muted);
}

.app-topbar__title b {
  color: var(--so-text);
  font-weight: 600;
}

.app-user {
  display: flex;
  align-items: center;
  gap: 14px;
}

.app-user__avatar {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: #e2e8f0;
  border: 1px solid #cbd5e1;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 600;
  color: #64748b;
}

.app-user__name {
  font-size: 14px;
  font-weight: 500;
}

.app-user__role {
  font-size: 12px;
  color: var(--so-text-muted);
}

.app-main {
  flex: 1;
  padding: 28px;
  overflow: auto;
  background: var(--so-bg-deep);
}

.page-head {
  margin-bottom: 24px;
}

.page-head h1 {
  margin: 0 0 6px;
  font-size: 24px;
  font-weight: 600;
  letter-spacing: -0.02em;
}

.page-head p {
  margin: 0;
  color: var(--so-text-muted);
  font-size: 14px;
}

/* KPI 卡片 */
.kpi-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 20px;
  margin-bottom: 24px;
}

.kpi-card {
  position: relative;
  padding: 22px 22px 20px;
  border-radius: var(--so-radius-lg);
  background: var(--so-bg-elevated);
  border: 1px solid var(--so-border);
  overflow: hidden;
  transition: transform 0.2s, border-color 0.2s;
}

.kpi-card:hover {
  transform: translateY(-2px);
  border-color: rgba(0, 212, 170, 0.2);
}

.kpi-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--so-primary), var(--so-accent));
  opacity: 0.85;
}

.kpi-card__icon {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 14px;
  background: rgba(0, 212, 170, 0.12);
  color: var(--so-primary);
}

.kpi-card--blue .kpi-card__icon { background: rgba(59, 130, 246, 0.15); color: #60a5fa; }
.kpi-card--blue::before { background: linear-gradient(90deg, #3b82f6, #8b5cf6); }

.kpi-card--amber .kpi-card__icon { background: rgba(245, 158, 11, 0.15); color: #fbbf24; }
.kpi-card__meta {
  margin: 10px 0 0;
  font-size: 13px;
  line-height: 1.45;
}

.kpi-card--teal .kpi-card__icon { background: rgba(20, 184, 166, 0.15); color: #2dd4bf; }
.kpi-card--teal::before {
  background: linear-gradient(90deg, #14b8a6, #2dd4bf);
}

.backup-hints {
  margin: 0;
  padding-left: 1.1em;
  font-size: 13px;
  line-height: 1.55;
}

.backup-hints li {
  margin-bottom: 6px;
}

.backup-section-title {
  margin: 0 0 12px;
  font-size: 15px;
  font-weight: 600;
}

.backup-site-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}

.backup-upload {
  display: inline-block;
}

.place-tree-node {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding-right: 8px;
}

.wo-field-with-pick {
  display: flex;
  align-items: center;
  gap: 6px;
}

.wo-boot-loading {
  padding: 24px 20px;
  text-align: center;
}
.wo-loc-pick-list {
  max-height: 280px;
  overflow: auto;
  margin-bottom: 12px;
  border: 1px solid var(--el-border-color-lighter);
  border-radius: 6px;
}
.wo-loc-pick-row {
  display: block;
  width: 100%;
  text-align: left;
  padding: 8px 12px;
  border: none;
  border-bottom: 1px solid var(--el-border-color-extra-light);
  background: #fff;
  cursor: pointer;
  font: inherit;
  color: inherit;
  line-height: 1.45;
}
.wo-loc-pick-row:hover { background: var(--el-fill-color-light); }
.wo-loc-pick-row:last-child { border-bottom: none; }
.wo-kw-hl {
  background: #fff566;
  color: inherit;
  padding: 0 1px;
  border-radius: 2px;
}
.wo-field-with-pick .wo-sheet-input {
  flex: 1;
  min-width: 0;
}

.wo-pick-btn {
  flex-shrink: 0;
  padding: 4px 8px;
}

.kpi-card--amber::before { background: linear-gradient(90deg, #f59e0b, #f97316); }

.kpi-card__label {
  font-size: 13px;
  color: var(--so-text-muted);
  margin-bottom: 6px;
}

.kpi-card__value {
  font-size: 18px;
  font-weight: 600;
  line-height: 1.4;
}

.status-dot {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.status-dot::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #64748b;
}

.status-dot.is-up::before {
  background: var(--so-primary);
  box-shadow: 0 0 12px var(--so-glow);
  animation: pulse-dot 2s ease-in-out infinite;
}

@keyframes pulse-dot {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.5; }
}

.panel-card {
  border-radius: var(--so-radius-lg);
  background: var(--so-bg-elevated);
  border: 1px solid var(--so-border);
  padding: 24px 28px;
}

.panel-card h3 {
  margin: 0 0 12px;
  font-size: 16px;
  font-weight: 600;
}

.quick-entry-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 12px;
  margin-top: 16px;
}

.quick-entry-card {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  border-radius: var(--so-radius-lg);
  border: 1px solid var(--so-border);
  background: var(--so-bg-deep);
  text-decoration: none;
  color: var(--so-text);
  transition: border-color 0.15s, box-shadow 0.15s, transform 0.12s;
}

.quick-entry-card:hover {
  border-color: var(--el-color-primary);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.06);
  transform: translateY(-1px);
}

.quick-entry-card.is-frequent {
  border-color: rgba(64, 158, 255, 0.35);
}

.quick-entry-card__icon {
  flex-shrink: 0;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  background: rgba(64, 158, 255, 0.1);
  color: var(--el-color-primary);
}

.quick-entry-card__icon .nav-icon {
  width: 22px;
  height: 22px;
}

.quick-entry-card__label {
  font-weight: 600;
  font-size: 14px;
  min-width: 0;
}

.empty-state {
  text-align: center;
  padding: 48px 24px;
}

.empty-state__icon {
  width: 72px;
  height: 72px;
  margin: 0 auto 20px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.04);
  color: var(--so-text-muted);
}

.empty-state h3 {
  margin: 0 0 8px;
  font-size: 18px;
}

/* Element 深色适配 */
.app-main .el-card {
  --el-card-bg-color: var(--so-bg-elevated);
  border: 1px solid var(--so-border);
  color: var(--so-text);
}

.app-topbar .el-button--default {
  background: transparent;
  border-color: var(--so-border);
  color: var(--so-text-muted);
}

.app-topbar .el-button--default:hover {
  border-color: var(--so-primary);
  color: var(--so-primary);
}

/* 设备台账 */
.dev-sheet-title { text-align: center; font-size: 18px; margin: 0 0 16px; font-weight: 600; color: var(--so-text); }
.dev-filter-bar .dev-filter-form {
  display: flex; flex-wrap: wrap; align-items: flex-end; gap: 4px 0; width: 100%;
}
.dev-filter-bar .dev-filter-actions { margin-left: auto; }
.dev-filter-bar .dev-filter-actions .el-button + .el-button,
.dev-filter-bar .dev-filter-actions .el-upload { margin-left: 8px; }
.dev-table-wrap { overflow-x: auto; width: 100%; }
.dev-table { font-size: 13px; min-width: max-content; }
.dev-table.el-table--striped .el-table__body tr.el-table__row--striped td.el-table__cell {
  background-color: #f3f6fa;
}
.dev-table .el-table__body tr:hover:not(.dev-row-selected) > td.el-table__cell {
  background-color: #eef2f7 !important;
}
.dev-table .el-table__body tr.dev-row-selected > td.el-table__cell {
  background-color: #6eb5ff !important;
  color: #0c1e3d;
  box-shadow: inset 4px 0 0 #1d4ed8;
}
.dev-table .el-table__body tr.dev-row-selected:hover > td.el-table__cell {
  background-color: #4da3ff !important;
}
.dev-table .el-table__body tr.dev-row-selected.el-table__row--striped > td.el-table__cell {
  background-color: #6eb5ff !important;
}
.dev-form .el-form-item__label { font-size: 13px; }
.dev-status { font-weight: 600; }
.dev-status--ok { color: #16a34a; }
.dev-status--off { color: #dc2626; }
.dev-status--warn { color: #ca8a04; }
/* 网络拓扑 */
.topo-opm .topo-form { flex-wrap: wrap; }
.topo-bar .topo-tools { margin-left: auto; }
.topo-hint { margin: 0 0 8px; font-size: 12px; }
.topo-map-panel { padding: 0; overflow: hidden; }
.topo-type-bar {
  display: flex; flex-wrap: wrap; align-items: center; gap: 10px 16px;
  padding: 12px 16px; border-bottom: 1px solid #e2e8f0; background: #f8fafc;
}
.topo-type-bar-title { font-size: 13px; font-weight: 600; color: #334155; margin-right: 4px; }
.topo-type-chip {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 12px; color: #475569;
}
.topo-type-swatch {
  display: inline-block; width: 28px; height: 4px; border-radius: 2px;
}
.topo-type-bar-sep { width: 1px; height: 20px; background: #e2e8f0; margin: 0 4px; }
.topo-type-swatch--link { width: 18px; height: 18px; border-radius: 3px; }
.topo-type-hint { font-size: 11px; margin-left: auto; max-width: 280px; text-align: right; line-height: 1.3; }
.topo-edge-pill--ports { stroke: #94a3b8; stroke-width: 1.2; }
.topo-edge-pill--route { fill: #f5f3ff; stroke: #c4b5fd; }
.topo-edge-pill-bg--uplink { fill: #fff7ed; stroke: #fdba74; stroke-width: 1; }
.topo-edge-pill-bg--downlink { fill: #ecfdf5; stroke: #6ee7b7; stroke-width: 1; }
.topo-edge-label--uplink {
  fill: #c2410c;
  font-size: 9px;
  font-weight: 600;
  stroke: none;
}
.topo-edge-label--downlink {
  fill: #047857;
  font-size: 9px;
  font-weight: 600;
  stroke: none;
}
.topo-edge-label--route { fill: #6d28d9; font-size: 10px; font-weight: 600; stroke: #f5f3ff; stroke-width: 4px; }
.topo-map-inner {
  display: flex; align-items: stretch; min-height: 720px;
}
@media (max-width: 900px) {
  .topo-map-inner { flex-direction: column; min-height: auto; }
  .topo-legend {
    flex-direction: row; flex-wrap: wrap; border-right: none;
    border-bottom: 1px solid #e2e8f0;
  }
  .topo-legend ul { display: flex; flex-wrap: wrap; gap: 8px; }
  .topo-legend li { margin-bottom: 0; }
  .topo-type-hint { margin-left: 0; width: 100%; }
}
.topo-legend {
  flex: 0 0 196px; padding: 14px 12px;
  border-right: 1px solid #e2e8f0; background: #fff;
}
.topo-legend h3 { margin: 0 0 10px; font-size: 13px; font-weight: 600; }
.topo-legend-sub { margin: 14px 0 8px; font-size: 12px; font-weight: 600; color: #5b21b6; }
.topo-node--expandable { cursor: pointer; }
.topo-node--expandable .topo-node-card { stroke: #93c5fd; stroke-width: 1.2; }
.topo-node--open .topo-node-card { stroke: #2563eb; stroke-width: 1.5; }
.topo-expand-chip { fill: #2563eb; stroke: #1d4ed8; stroke-width: 1.2; filter: drop-shadow(0 0 4px rgba(37,99,235,.45)); }
.topo-expand-chip--rail { stroke-width: 1; filter: drop-shadow(0 0 3px rgba(37,99,235,.35)); pointer-events: all; }
.topo-map-inner:has(.topo-stage:only-child) .topo-stage { flex: 1; width: 100%; }
.topo-expand-hint:not(.is-open) .topo-expand-chip { animation: topo-expand-pulse 1.2s ease-in-out infinite; }
.topo-expand-arrow { fill: #fff; font-size: 13px; font-weight: 700; font-family: Segoe UI, sans-serif; user-select: none; }
.topo-expand-badge { fill: #fde68a; font-size: 9px; font-weight: 700; font-family: Segoe UI, sans-serif; user-select: none; }
.topo-node-gw { fill: #7c3aed; font-size: 9px; font-family: Segoe UI, Consolas, sans-serif; }
.topo-node-desc { fill: #64748b; font-size: 9px; font-family: Segoe UI, sans-serif; }
.topo-node--edit { cursor: grab; }
.topo-node--edit:active { cursor: grabbing; }
.topo-legend-draggable { cursor: grab; }
.topo-legend-draggable:active { opacity: 0.85; }
@keyframes topo-expand-pulse {
  0%, 100% { opacity: 1; transform: translateX(0); }
  50% { opacity: 0.82; }
}
.wo-sheet-img-actions { margin-top: 4px; text-align: center; }
.topo-legend ul { list-style: none; margin: 0; padding: 0; }
.topo-legend li {
  display: flex; align-items: center; gap: 8px;
  margin-bottom: 10px; font-size: 11px; color: var(--text-muted, #475569);
}
.topo-legend-label { line-height: 1.35; }
.topo-legend-glyph { flex-shrink: 0; background: #f1f5f9; border-radius: 4px; }
.topo-legend-note { margin-top: 12px; font-size: 11px; line-height: 1.4; }
.topo-stage {
  position: relative; flex: 1 1 auto; min-height: 720px; overflow: hidden; cursor: grab;
  user-select: none;
  background-color: #f8fafc;
  background-image: radial-gradient(#cbd5e1 1px, transparent 1px);
  background-size: 18px 18px;
}
.topo-stage:active { cursor: grabbing; }
.topo-svg { display: block; width: 100%; height: auto; min-height: 700px; }
.topo-node-card {
  fill: #fff;
  stroke: #cbd5e1;
  stroke-width: 1;
  filter: drop-shadow(0 3px 8px rgba(15, 23, 42, 0.08));
}
.topo-node--sel .topo-node-card {
  stroke: #f59e0b;
  stroke-width: 2;
  filter: drop-shadow(0 4px 12px rgba(245, 158, 11, 0.35));
}
.topo-node-status { fill: #22c55e; stroke: #fff; stroke-width: 1.5; }
.topo-node-glyph { pointer-events: none; }
.topo-node-name { fill: #0f172a; font-size: 12px; font-weight: 600; font-family:Segoe UI, sans-serif; }
.topo-node-model { fill: #64748b; font-size: 10px; font-family:Segoe UI, sans-serif; }
.topo-node-ip { fill: #334155; font-size: 10px; font-family:Consolas, monospace; }
.topo-node-ports { fill: #94a3b8; font-size: 9px; font-family:Segoe UI, sans-serif; }
.topo-edge line {
  stroke: #64748b; stroke-width: 2; stroke-linecap: round;
}
.topo-node { cursor: pointer; }
.topo-edges-labels { pointer-events: none; }
.topo-edge-pill {
  fill: #ffffff;
  fill-opacity: 1;
  stroke: #cbd5e1;
  stroke-width: 1.2;
  paint-order: stroke fill;
}
.topo-loading {
  position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
  background: rgba(255,255,255,.65); font-size: 14px;
}
.topo-detail-block { margin-top: 12px; font-size: 13px; }
.topo-edge-label {
  fill: #1e293b;
  font-size: 10px;
  text-anchor: middle;
  dominant-baseline: middle;
  pointer-events: none;
  font-family: Segoe UI, Consolas, sans-serif;
  paint-order: stroke fill;
  stroke: #ffffff;
  stroke-width: 3px;
  stroke-linejoin: round;
}
.topo-drawer .topo-sub { margin: 16px 0 8px; font-size: 14px; }
.topo-tags { display: flex; flex-wrap: wrap; gap: 6px; margin: 10px 0; }
.topo-port-filter { display: flex; align-items: center; gap: 12px; margin-bottom: 8px; flex-wrap: wrap; }
.topo-table { font-size: 12px; }
.topo-detail-block ul { margin: 6px 0 0; padding-left: 18px; }

.dev-kw-hit {
  background: #fde047;
  color: inherit;
  padding: 0 2px;
  border-radius: 2px;
}

/* 维修工单 */
.wo-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; }
.wo-stats { margin-bottom: 20px; }
.wo-filter .el-form-item { margin-bottom: 12px; }
.wo-table-wrap .wo-toolbar {
  display: flex; justify-content: space-between; align-items: center; margin-bottom: 12px;
}
.wo-pager { margin-top: 16px; display: flex; justify-content: flex-end; }
.wo-table { --el-table-bg-color: #fff; --el-table-tr-bg-color: #fff; --el-table-header-bg-color: #fafafa; }
.topbar-bell { position: relative; margin-right: 8px; }
.topbar-bell__icon { display: inline-flex; align-items: center; justify-content: center; color: var(--so-text-muted); }
.topbar-bell__icon .topbar-icon { width: 20px; height: 20px; }
.topbar-bell:hover .topbar-bell__icon { color: var(--so-primary); }
.topbar-icon { display: block; }
.user-menu-item { display: inline-flex; align-items: center; gap: 8px; }
.user-menu-icon { width: 16px; height: 16px; display: block; flex-shrink: 0; color: var(--so-text-muted); }
.table-pager { display: flex; justify-content: flex-end; margin-top: 12px; }

.so-message-box.el-message-box {
  border-radius: 14px;
  padding: 2px 4px 6px;
  box-shadow: 0 16px 48px rgba(15, 23, 42, 0.14);
  border: 1px solid #e2e8f0;
  max-width: 440px;
}

.so-message-box .el-message-box__header {
  padding: 18px 20px 6px;
}

.so-message-box .el-message-box__title {
  font-size: 17px;
  font-weight: 600;
  color: #0f172a;
}

.so-message-box .el-message-box__headerbtn {
  top: 14px;
  right: 14px;
}

.so-message-box .el-message-box__content {
  padding: 6px 20px 4px;
}

.so-message-box .el-message-box__status {
  font-size: 26px !important;
  top: 20px;
}

.so-message-box .el-message-box__message {
  padding-left: 34px;
  line-height: 1.5;
}

.so-msgbox__lead {
  margin: 0 0 8px;
  font-size: 14px;
  color: #64748b;
}

.so-msgbox__name {
  margin: 0 0 8px;
  font-size: 16px;
  font-weight: 600;
  color: #0f172a;
  word-break: break-all;
}

.so-msgbox__meta {
  margin: 0 0 10px;
  font-size: 13px;
  color: #94a3b8;
}

.so-msgbox__hint {
  margin: 4px 0 0;
  padding: 8px 10px;
  font-size: 13px;
  line-height: 1.45;
  color: #b45309;
  background: #fffbeb;
  border: 1px solid #fde68a;
  border-radius: 8px;
}

.so-message-box .el-message-box__btns {
  padding: 12px 20px 18px;
}

.so-message-box .el-message-box__btns .el-button {
  min-width: 80px;
  border-radius: 8px;
}
.topbar-bell .badge { position: absolute; top: -4px; right: -4px; min-width: 16px; height: 16px; padding: 0 4px; border-radius: 8px; background: #f56c6c; color: #fff; font-size: 11px; line-height: 16px; text-align: center; }
.msg-item { padding: 10px 0; border-bottom: 1px solid var(--so-border); cursor: pointer; }
.msg-item.unread { font-weight: 600; }
.user-trigger { display: flex; align-items: center; gap: 10px; cursor: pointer; padding: 4px 8px; border-radius: 8px; }
.user-trigger:hover { background: #f3f4f6; }
.acc-subnav { border-bottom: 1px solid var(--so-border); margin-bottom: 4px; }
.wo-form .el-form-item__label { color: var(--so-text-muted); }

/* 维修单 — 与 Word 模板一致的表格式单据 */
.wo-sheet-doc {
  max-width: 920px; margin: 0 auto; padding: 24px 28px; background: #fff; color: #111;
  border: 1px solid var(--so-border); border-radius: 10px;
}
.wo-sheet-title {
  text-align: center; font-size: 22px; font-weight: 700; margin: 0 0 18px; letter-spacing: 0.08em;
}
.wo-sheet-meta {
  margin-top: 12px; padding-top: 12px; border-top: 1px dashed var(--so-border); max-width: 420px;
}
.wo-sheet-meta .el-form-item { margin-bottom: 0; }
.wo-sheet-table { width: 100%; border-collapse: collapse; margin: 0; table-layout: fixed; }
.wo-sheet-table td {
  border: 1px solid #333; padding: 8px 10px; font-size: 14px; vertical-align: middle; line-height: 1.45;
}
.wo-sheet-table .lbl {
  width: 15%; min-width: 72px; background: #f7f7f7; font-weight: 600; text-align: center;
  color: #222;
}
.wo-sheet-table .lbl--wide { width: 18%; }
.wo-sheet-table .val { background: #fff; }
.wo-sheet-table .val--tall { vertical-align: top; min-height: 88px; }
.wo-sheet-table .wo-lbl-stack { display: inline-block; line-height: 1.35; }
.wo-sheet-fill {
  width: 100%; border: none; outline: none; background: transparent; font-size: 14px;
  font-family: inherit; color: #111; resize: vertical; line-height: 1.5;
}
.wo-sheet-fill--area { min-height: 72px; padding: 2px 0; }
.wo-sheet-doc .el-input__wrapper,
.wo-sheet-doc .el-textarea__inner {
  box-shadow: none !important; background: transparent !important; padding: 0 2px;
}
.wo-sheet-doc .el-date-editor { --el-date-editor-width: 100%; }
.wo-sheet-doc .el-input-number { width: 140px; }
.wo-sheet-chk { font-family: "Microsoft YaHei", "SimSun", sans-serif; }
.wo-sheet-imgs { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 4px; }
.wo-sheet-imgs .wo-sheet-thumb { width: 200px; height: 150px; border: 1px solid #ccc; border-radius: 4px; background: #f8f8f8; }
.wo-sheet-imgs .wo-sheet-thumb .el-image__inner { object-fit: contain; }
.wo-sheet-img-item { max-width: 200px; }
.wo-sheet-img-item .muted { font-size: 11px; margin-top: 4px; display: flex; justify-content: space-between; gap: 8px; }
.wo-sheet-fee { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 16px; }
.wo-sheet-view-p { margin: 0; white-space: pre-wrap; word-break: break-word; }
.wo-img-list { display: flex; flex-wrap: wrap; gap: 16px; margin-bottom: 16px; }
.wo-img-item {
  width: 160px; border: 1px solid var(--so-border); border-radius: 8px; overflow: hidden; background: #0c1018;
}
.wo-img-item img { width: 100%; height: 120px; object-fit: cover; display: block; }
.wo-img-meta {
  padding: 6px 8px; font-size: 11px; display: flex; justify-content: space-between; align-items: center;
  color: var(--so-text-muted);
}

/* 打印 */
body.wo-print-mode { background: #fff !important; color: #111 !important; }
.wo-print-doc { max-width: 920px; margin: 24px auto; padding: 24px 28px; background: #fff; color: #111; }
.wo-print-doc .wo-sheet-table .lbl { background: #f7f7f7; }
.wo-print-actions { margin-bottom: 16px; text-align: right; }
.wo-print-title { text-align: center; font-size: 22px; margin: 0 0 20px; }
.wo-print-table { width: 100%; border-collapse: collapse; margin: 12px 0; }
.wo-print-table td { border: 1px solid #333; padding: 8px 10px; font-size: 14px; vertical-align: top; }
.wo-print-table .lbl { width: 22%; background: #f5f5f5; font-weight: 600; }
.wo-print-block { margin: 16px 0; font-size: 14px; line-height: 1.6; }
.wo-print-imgs { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 8px; }
.wo-print-imgs img { max-width: 220px; max-height: 160px; border: 1px solid #ccc; }
.wo-print-loading { text-align: center; padding: 48px; color: #666; }

@media print {
  .no-print { display: none !important; }
  .app-sidebar, .app-topbar { display: none !important; }
  body.wo-print-mode { margin: 0; }
  .wo-sheet-doc { border: none; box-shadow: none; padding: 0; max-width: none; }
}