

.feature-panel {
  min-height: 26rem;
}

.skip-link {
  position: absolute;
  left: -999px;
  top: 0;
  background: #111827;
  color: #ffffff;
  padding: 0.6rem 0.9rem;
  border-radius: 0 0 8px 0;
  z-index: 1001;
}

.skip-link:focus {
  left: 0;
}

.global-loading {
  position: fixed;
  top: 1rem;
  left: 50%;
  transform: translateX(-50%);
  display: none;
  align-items: center;
  gap: 0.6rem;
  padding: 0.55rem 0.85rem;
  border-radius: 999px;
  background: rgba(17, 24, 39, 0.92);
  color: #f3f4f6;
  border: 1px solid rgba(255, 255, 255, 0.12);
  z-index: 999;
}

.global-loading.visible {
  display: inline-flex;
}

.spinner {
  width: 1rem;
  height: 1rem;
  border: 2px solid rgba(255, 255, 255, 0.35);
  border-top-color: #38bd78;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

.skeleton {
  position: relative;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-sm);
}

.skeleton::after {
  content: '';
  position: absolute;
  inset: 0;
  transform: translateX(-100%);
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.16), transparent);
  animation: skeleton-shimmer 1.2s infinite;
}

@keyframes skeleton-shimmer {
  100% {
    transform: translateX(100%);
  }
}

.inline-error {
  padding: 0.8rem 0.9rem;
  border-radius: var(--radius-md);
  border: 1px solid rgba(239, 68, 68, 0.45);
  background: rgba(239, 68, 68, 0.12);
  color: #fecaca;
  font-size: 0.92rem;
}

.toast-container {
  position: fixed;
  top: 1rem;
  right: 1rem;
  z-index: 1200;
  display: grid;
  gap: 0.5rem;
  max-width: min(88vw, 360px);
}

.toast {
  padding: 0.7rem 0.9rem;
  border-radius: 0.65rem;
  color: #f9fafb;
  border: 1px solid transparent;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.25);
  animation: toast-in 220ms ease-out;
}

.toast-success {
  background: rgba(22, 163, 74, 0.94);
  border-color: rgba(134, 239, 172, 0.5);
}

.toast-error {
  background: rgba(185, 28, 28, 0.94);
  border-color: rgba(252, 165, 165, 0.5);
}

.toast-warning {
  background: rgba(180, 83, 9, 0.94);
  border-color: rgba(253, 224, 71, 0.5);
}

.toast-info {
  background: rgba(30, 64, 175, 0.94);
  border-color: rgba(147, 197, 253, 0.5);
}

.toast-exit {
  animation: toast-out 220ms ease-in forwards;
}

@keyframes toast-in {
  from {
    transform: translateX(18px);
    opacity: 0;
  }
  to {
    transform: translateX(0);
    opacity: 1;
  }
}

@keyframes toast-out {
  from {
    transform: translateX(0);
    opacity: 1;
  }
  to {
    transform: translateX(18px);
    opacity: 0;
  }
}

.auto-refresh-toggle {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  font-size: 0.88rem;
  color: var(--text-muted);
}


.compact-list {
  gap: 0.75rem;
}

.compact-list .overview-item,
.mini-card {
  padding: 0.95rem 1rem;
}

.split-panel {
  display: grid;
  gap: var(--space-4);
  margin-top: var(--space-4);
}

.binding-toolbar {
  display: grid;
  gap: var(--space-3);
  margin-bottom: var(--space-4);
}

.binding-form {
  display: grid;
  gap: var(--space-4);
  margin-top: var(--space-4);
}

.field-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.field {
  display: grid;
  gap: var(--space-2);
}

.form-actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-3);
}

.form-feedback {
  min-height: 6rem;
}

.risk-list {
  margin: 0;
  padding-left: 1.25rem;
  color: var(--text-muted);
}

.health-summary-grid {
  display: grid;
  gap: var(--space-3);
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin-bottom: var(--space-3);
}

.health-summary-note {
  margin-top: var(--space-3);
  padding: 0.85rem 1rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.03);
}

.health-mini-card {
  transition: border-color 180ms ease, background 180ms ease, box-shadow 180ms ease;
}

.catalog-hint-block {
  align-content: start;
}

.status-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.26rem 0.68rem;
  border-radius: 999px;
  font-size: 0.82rem;
  font-weight: 600;
  line-height: 1.2;
  border: 1px solid var(--border);
  white-space: nowrap;
}

.status-idle {
  color: var(--text-muted);
  background: rgba(255, 255, 255, 0.04);
  border-color: var(--border);
}

.status-ok {
  color: #b6f0c9;
  background: rgba(56, 189, 120, 0.14);
  border-color: rgba(56, 189, 120, 0.35);
}

.status-warning {
  color: #f6d28b;
  background: rgba(245, 158, 11, 0.14);
  border-color: rgba(245, 158, 11, 0.35);
}

.status-error {
  color: #fecaca;
  background: rgba(239, 68, 68, 0.14);
  border-color: rgba(239, 68, 68, 0.35);
}

.selector-status {
  margin-top: var(--space-2);
  padding: 0.7rem 0.85rem;
  border-radius: var(--radius-md);
  font-size: 0.92rem;
  line-height: 1.5;
  border: 1px solid var(--border);
}

.selector-status-idle {
  color: var(--text-muted);
  background: rgba(255, 255, 255, 0.03);
}

.selector-status-ok {
  color: #b6f0c9;
  background: rgba(56, 189, 120, 0.1);
  border-color: rgba(56, 189, 120, 0.3);
}

.selector-status-warning {
  color: #f6d28b;
  background: rgba(245, 158, 11, 0.1);
  border-color: rgba(245, 158, 11, 0.3);
}

/* 强化健康节点高亮 */
.highlight-healthy {
  color: #38bd78;
  font-weight: 600;
  text-shadow: 0 0 8px rgba(56, 189, 120, 0.3);
}

/* 搜索输入框样式 */
.search-input {
  margin-bottom: 0.5rem;
  padding: 0.6rem 0.85rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.04);
  color: var(--text);
  font-size: 0.92rem;
  transition: border-color 180ms ease, background 180ms ease;
}

.search-input:focus {
  outline: none;
  border-color: rgba(56, 189, 120, 0.4);
  background: rgba(255, 255, 255, 0.06);
}

.search-input::placeholder {
  color: var(--text-muted);
  opacity: 0.6;
}

/* 选择器图例 - 视觉标识强化 */
.selector-legend {
  display: flex;
  gap: 0.75rem;
  margin-top: var(--space-2);
  flex-wrap: wrap;
}

.legend-badge {
  display: inline-flex;
  align-items: center;
  padding: 0.4rem 0.75rem;
  border-radius: var(--radius-sm);
  font-size: 0.85rem;
  font-weight: 500;
  border: 1px solid;
  transition: transform 120ms ease, box-shadow 120ms ease;
}

.legend-badge:hover {
  transform: translateY(-1px);
}

.legend-badge-imported {
  background: rgba(56, 189, 120, 0.12);
  color: #b6f0c9;
  border-color: rgba(56, 189, 120, 0.35);
  box-shadow: 0 0 12px rgba(56, 189, 120, 0.15);
}

.legend-badge-healthy {
  background: rgba(56, 189, 120, 0.2);
  color: #38bd78;
  border-color: rgba(56, 189, 120, 0.5);
  font-weight: 600;
  box-shadow: 0 0 16px rgba(56, 189, 120, 0.25);
}

.legend-badge-catalog {
  background: rgba(255, 255, 255, 0.04);
  color: var(--text-muted);
  border-color: var(--border);
}

/* 选择器摘要提示 */
.selector-summary {
  margin-top: var(--space-2);
  padding: 0.6rem 0.8rem;
  border-radius: var(--radius-sm);
  font-size: 0.88rem;
  line-height: 1.5;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--border);
  color: var(--text-muted);
}

/* Failover 面板搜索行 */
.panel-search-row {
  margin-bottom: var(--space-3);
}

.table-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.9rem;
  flex-wrap: wrap;
  margin-bottom: 0.85rem;
  padding: 0.8rem 0.95rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.03);
}

.table-toolbar-empty {
  margin-bottom: 0.75rem;
}

.table-pagination-info {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
  font-size: 0.9rem;
  color: var(--text-muted);
}

.table-pagination-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.table-page-size {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  font-size: 0.9rem;
  color: var(--text-muted);
}

.table-page-size select {
  padding: 0.45rem 0.7rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.04);
  color: var(--text);
}

.table.compact-table tbody tr:nth-child(even) {
  background: rgba(255, 255, 255, 0.02);
}

.table.compact-table tbody tr:hover {
  background: rgba(56, 189, 120, 0.12);
  transition: background 160ms ease;
}


.button-small {
  padding: 0.5rem 0.8rem;
  font-size: 0.88rem;
}


/* === Source Port Binding form === */
.port-binding-input { width: 120px; }
.port-binding-select { width: 100px; }
.port-binding-outbound { min-width: 180px; }
.port-binding-actions { display: flex; gap: 0.5rem; }

/* === Responsive for port binding toolbar === */
@media (max-width: 640px) {
  .port-binding-input,
  .port-binding-select,
  .port-binding-outbound {
    width: 100% !important;
    min-width: unset !important;
  }
  .port-binding-actions {
    width: 100%;
  }
  .port-binding-actions button {
    flex: 1;
  }
  .binding-toolbar {
    flex-direction: column;
    align-items: stretch !important;
    gap: 0.5rem;
  }
  .binding-toolbar > div {
    width: 100%;
  }
}

@media (max-width: 1100px) {
  .summary-grid,
  .content-grid,
  .feature-grid,
  .status-grid,
  .health-summary-grid,
  .field-grid {
    grid-template-columns: 1fr;
  }

  .hero {
    grid-template-columns: 1fr;
  }

  .hero-actions {
    align-items: flex-start;
    gap: 0.75rem;
  }

  .auto-refresh-toggle {
    width: 100%;
    justify-content: flex-start;
  }
  
  .selector-legend {
    gap: 0.5rem;
  }
  
  .legend-badge {
    font-size: 0.8rem;
    padding: 0.35rem 0.6rem;
  }

  .table-toolbar,
  .table-pagination-actions,
  .table-pagination-info {
    align-items: flex-start;
    flex-direction: column;
  }

  .table-page-size {
    width: 100%;
    justify-content: space-between;
  }
}

@media (max-width: 768px) {
  .toast-container {
    left: 0.75rem;
    right: 0.75rem;
    top: 0.75rem;
    max-width: none;
  }

  .global-loading {
    top: 0.7rem;
    max-width: calc(100vw - 1.5rem);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }
}

.sortable-header {
  cursor: pointer;
  user-select: none;
  transition: color 0.15s ease;
}
.sortable-header:hover {
  color: var(--color-accent, #2563eb);
}
