/* ========================================================
   Infoguardix National Firewall Management Platform
   Design System: Calm Light Default Theme + Soft Charcoal Dark Theme
   ======================================================== */

:root {
  /* Surface & Backgrounds - Calm, High-legibility Slate/Zinc */
  --bg-primary: #f8fafc;
  --bg-surface: #ffffff;
  --bg-surface-elevated: #f1f5f9;
  --bg-surface-hover: #e2e8f0;
  --bg-surface-active: #cbd5e1;

  /* Borders & Dividers */
  --border-subtle: #e2e8f0;
  --border-strong: #cbd5e1;
  --border-focus: #0284c7;

  /* Text Colors - High contrast slate */
  --text-primary: #0f172a;
  --text-secondary: #475569;
  --text-muted: #64748b;
  --text-inverted: #ffffff;

  /* Restrained Accents */
  --accent-blue: #0284c7;
  --accent-blue-subtle: #e0f2fe;
  --accent-teal: #0d9488;
  --accent-teal-subtle: #ccfbf1;

  /* Telecom Status Colors (with accessible tint backgrounds) */
  --status-allowed: #15803d;
  --status-allowed-bg: #dcfce7;
  --status-allowed-border: #86efac;

  --status-warning: #b45309;
  --status-warning-bg: #fef3c7;
  --status-warning-border: #fcd34d;

  --status-blocked: #b91c1c;
  --status-blocked-bg: #fee2e2;
  --status-blocked-border: #fca5a5;

  --status-purple: #7e22ce;
  --status-purple-bg: #f3e8ff;
  --status-purple-border: #d8b4fe;

  --status-info: #0369a1;
  --status-info-bg: #e0f2fe;
  --status-info-border: #7dd3fc;

  /* Typography */
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --font-mono: 'JetBrains Mono', 'Fira Code', Consolas, monospace;

  /* Geometry & Shadows */
  --radius-xs: 4px;
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 14px;

  --shadow-sm: 0 1px 2px rgba(15, 23, 42, 0.05);
  --shadow-md: 0 4px 6px -1px rgba(15, 23, 42, 0.08), 0 2px 4px -2px rgba(15, 23, 42, 0.05);
  --shadow-lg: 0 10px 15px -3px rgba(15, 23, 42, 0.1), 0 4px 6px -4px rgba(15, 23, 42, 0.05);
  --shadow-xl: 0 20px 25px -5px rgba(15, 23, 42, 0.15), 0 8px 10px -6px rgba(15, 23, 42, 0.1);
}

/* Telecom NOC Navy/Slate Dark Theme (Previous Restored) */
[data-theme="dark"], body.dark-mode {
  --bg-primary: #0b0f19;
  --bg-surface: #111827;
  --bg-surface-elevated: #1f2937;
  --bg-surface-hover: #283548;
  --bg-surface-active: #374151;

  --border-subtle: #1f2937;
  --border-strong: #374151;
  --border-focus: #3b82f6;

  --text-primary: #f9fafb;
  --text-secondary: #9ca3af;
  --text-muted: #6b7280;
  --text-inverted: #0b0f19;

  --accent-blue: #3b82f6;
  --accent-blue-subtle: rgba(59, 130, 246, 0.15);
  --accent-teal: #06b6d4;
  --accent-teal-subtle: rgba(6, 182, 212, 0.15);

  --status-allowed: #10b981;
  --status-allowed-bg: rgba(16, 185, 129, 0.15);
  --status-allowed-border: rgba(16, 185, 129, 0.35);

  --status-warning: #f59e0b;
  --status-warning-bg: rgba(245, 158, 11, 0.15);
  --status-warning-border: rgba(245, 158, 11, 0.35);

  --status-blocked: #ef4444;
  --status-blocked-bg: rgba(239, 68, 68, 0.15);
  --status-blocked-border: rgba(239, 68, 68, 0.35);

  --status-purple: #8b5cf6;
  --status-purple-bg: rgba(139, 92, 246, 0.15);
  --status-purple-border: rgba(139, 92, 246, 0.35);

  --status-info: #0ea5e9;
  --status-info-bg: rgba(14, 165, 233, 0.15);
  --status-info-border: rgba(14, 165, 233, 0.35);

  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.3);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.4);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.5);
  --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.6);
}

/* Base Reset */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html, body {
  height: 100%;
}

body {
  background-color: var(--bg-primary);
  color: var(--text-primary);
  font-family: var(--font-sans);
  font-size: 13.5px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

/* ==========================================
   APP SHELL & LAYOUT
   ========================================== */

.app-container {
  display: flex;
  width: 100vw;
  height: 100vh;
  overflow: hidden;
  position: relative;
}

/* Mobile backdrop */
.sidebar-backdrop {
  position: fixed;
  inset: 0;
  background-color: rgba(15, 23, 42, 0.4);
  z-index: 99;
  display: none;
  backdrop-filter: blur(2px);
}

.sidebar-backdrop.active {
  display: block;
}

/* Sidebar */
.sidebar {
  width: 280px;
  background-color: var(--bg-surface);
  border-right: 1px solid var(--border-subtle);
  display: flex;
  flex-direction: column;
  flex-shrink: 0;
  z-index: 100;
  transition: transform 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  overflow-y: auto;
}

.sidebar-header {
  padding: 10px 14px;
  min-height: 85px;
  border-bottom: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}

.brand-wrapper {
  display: flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  width: 100%;
}

.brand-logo-container {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  max-width: 270px;
  height: 75px;
  text-decoration: none;
  overflow: hidden;
}

.sidebar-logo-img {
  width: 100%;
  max-width: 270px;
  max-height: 75px;
  height: auto;
  object-fit: contain;
  display: block;
  transition: transform 0.2s ease, filter 0.2s ease;
}

.sidebar-logo-img:hover {
  transform: scale(1.02);
  filter: drop-shadow(0 0 10px rgba(56, 189, 248, 0.4));
}

.logo-theme-light {
  display: none;
}

.logo-theme-dark {
  display: block;
}

[data-theme="light"] .logo-theme-dark {
  display: none !important;
}

[data-theme="light"] .logo-theme-light {
  display: block !important;
}

.brand-icon {
  width: 36px;
  height: 36px;
  background: linear-gradient(135deg, rgba(2, 132, 199, 0.25), rgba(13, 148, 136, 0.25));
  border: 1px solid rgba(56, 189, 248, 0.35);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 8px rgba(2, 132, 199, 0.25);
  flex-shrink: 0;
  overflow: hidden;
  padding: 3px;
}

.brand-icon .brand-logo-img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
  filter: drop-shadow(0 0 6px rgba(56, 189, 248, 0.45));
}

.brand-text h1 {
  font-size: 14.5px;
  font-weight: 700;
  letter-spacing: -0.2px;
  color: var(--text-primary);
  line-height: 1.2;
}

.brand-text p {
  font-size: 11px;
  color: var(--text-muted);
  font-weight: 500;
}

.sidebar-close-btn {
  display: none;
  background: transparent;
  border: none;
  font-size: 20px;
  color: var(--text-muted);
  cursor: pointer;
  padding: 4px;
}

.sidebar-nav {
  padding: 12px 10px;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.nav-section-title {
  font-size: 10.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  color: var(--text-muted);
  padding: 12px 10px 4px 10px;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  text-decoration: none;
  font-weight: 500;
  font-size: 13px;
  transition: all 0.15s ease;
}

.nav-item:hover {
  background-color: var(--bg-surface-hover);
  color: var(--text-primary);
}

.nav-item.active {
  background-color: var(--accent-blue-subtle);
  color: var(--accent-blue);
  font-weight: 600;
}

.nav-item .icon {
  font-size: 15px;
  width: 18px;
  text-align: center;
  flex-shrink: 0;
}

/* Submenu navigation items */
.nav-subgroup {
  display: flex;
  flex-direction: column;
  gap: 1px;
  margin-left: 20px;
  border-left: 2px solid var(--border-subtle);
  padding-left: 6px;
  margin-top: 2px;
  margin-bottom: 4px;
}

.nav-subitem {
  padding: 5px 10px;
  border-radius: var(--radius-xs);
  color: var(--text-muted);
  text-decoration: none;
  font-size: 12px;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 8px;
  transition: all 0.15s ease;
}

.nav-subitem:hover {
  background-color: var(--bg-surface-hover);
  color: var(--text-primary);
}

.nav-subitem.active {
  color: var(--accent-blue);
  background-color: var(--accent-blue-subtle);
  font-weight: 600;
}

.nav-badge {
  font-size: 9px;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: var(--radius-xs);
  margin-left: auto;
  text-transform: uppercase;
  font-family: var(--font-mono);
  background-color: var(--bg-surface-elevated);
  color: var(--text-muted);
  border: 1px solid var(--border-subtle);
  letter-spacing: 0.3px;
}

.nav-badge.badge-live {
  background-color: var(--status-allowed-bg);
  color: var(--status-allowed);
  border-color: var(--status-allowed-border);
}

.nav-badge.badge-alert {
  background-color: var(--status-blocked-bg);
  color: var(--status-blocked);
  border-color: var(--status-blocked-border);
}

.nav-badge.badge-sim {
  background-color: var(--accent-blue-subtle);
  color: var(--accent-blue);
  border-color: rgba(59, 130, 246, 0.3);
}

.sidebar-footer {
  padding: 14px 16px;
  border-top: 1px solid var(--border-subtle);
  background-color: var(--bg-surface);
}

.user-badge {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.user-info {
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.user-name {
  font-size: 12.5px;
  font-weight: 600;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.user-role {
  font-size: 11px;
  color: var(--text-muted);
  font-family: var(--font-mono);
}

.logout-link {
  background: var(--bg-surface-elevated);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-xs);
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 14px;
  transition: all 0.15s ease;
}

.logout-link:hover {
  background-color: var(--status-blocked-bg);
  color: var(--status-blocked);
  border-color: var(--status-blocked-border);
}

/* ==========================================
   MAIN VIEWPORT & TOPBAR
   ========================================== */

.main-viewport {
  flex: 1;
  display: flex;
  flex-direction: column;
  height: 100vh;
  overflow-y: auto;
  overflow-x: hidden;
  background-color: var(--bg-primary);
  min-width: 0;
}

.topbar {
  background-color: var(--bg-surface);
  border-bottom: 1px solid var(--border-subtle);
  padding: 10px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  position: sticky;
  top: 0;
  z-index: 50;
  min-height: 56px;
}

.topbar-left {
  display: flex;
  align-items: center;
  gap: 14px;
  min-width: 0;
}

.sidebar-toggle-btn {
  display: none;
  background: transparent;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: 6px 10px;
  color: var(--text-secondary);
  cursor: pointer;
  font-size: 16px;
  line-height: 1;
}

.sidebar-toggle-btn:hover {
  background-color: var(--bg-surface-hover);
  color: var(--text-primary);
}

/* Breadcrumbs */
.breadcrumbs-nav {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.breadcrumbs-nav a {
  color: var(--text-secondary);
  text-decoration: none;
  transition: color 0.15s;
}

.breadcrumbs-nav a:hover {
  color: var(--accent-blue);
}

.breadcrumbs-nav .crumb-separator {
  color: var(--border-strong);
}

.breadcrumbs-nav .crumb-current {
  color: var(--text-primary);
  font-weight: 600;
}

.env-pill {
  font-size: 10px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 9999px;
  background-color: var(--accent-blue-subtle);
  color: var(--accent-blue);
  border: 1px solid rgba(2, 132, 199, 0.2);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.topbar-right {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
}

/* Topbar Actions & Streamlined Controls */
.topbar-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.topbar-control-group {
  display: flex;
  align-items: center;
  gap: 6px;
  background-color: var(--bg-surface-elevated);
  padding: 3px 8px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-subtle);
  font-size: 11.5px;
}

.topbar-select {
  background: transparent;
  border: none;
  font-size: 11.5px;
  font-weight: 600;
  color: var(--text-primary);
  cursor: pointer;
  outline: none;
  padding: 1px 4px;
}

.topbar-chip-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--bg-surface-elevated);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: 4px 10px;
  font-size: 11.5px;
  font-weight: 600;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all 0.15s ease;
  white-space: nowrap;
}

.topbar-chip-btn:hover {
  background-color: var(--bg-surface-hover);
  color: var(--text-primary);
  border-color: var(--border-strong);
}

.topbar-dropdown {
  position: relative;
  display: inline-block;
}

.topbar-dropdown-menu {
  position: absolute;
  right: 0;
  top: calc(100% + 6px);
  background: var(--bg-surface);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  padding: 12px 14px;
  z-index: 200;
  display: none;
  min-width: 290px;
}

.topbar-dropdown-menu.active {
  display: block;
}

/* Theme Toggle Button */
.theme-toggle-btn {
  background: var(--bg-surface-elevated);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: 5px 10px;
  color: var(--text-secondary);
  font-size: 13px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: all 0.15s ease;
}

.theme-toggle-btn:hover {
  background-color: var(--bg-surface-hover);
  color: var(--text-primary);
  border-color: var(--border-strong);
}

.theme-toggle-btn.icon-only-btn {
  padding: 5px 8px;
  min-width: 32px;
  height: 30px;
  justify-content: center;
}

/* Live stream status indicator */
.live-indicator {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 11.5px;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 9999px;
  background-color: var(--bg-surface-elevated);
  border: 1px solid var(--border-subtle);
  color: var(--text-secondary);
  transition: all 0.2s ease;
}

.live-indicator.icon-only-badge {
  padding: 6px;
  min-width: 24px;
  height: 24px;
  justify-content: center;
  border-radius: 50%;
}

.pulse-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background-color: var(--status-warning);
  display: inline-block;
  transition: background-color 0.2s ease;
}

.live-indicator.status-connected {
  background-color: var(--status-allowed-bg);
  border-color: var(--status-allowed-border);
  color: var(--status-allowed);
}

.live-indicator.status-connected .pulse-dot {
  background-color: var(--status-allowed);
  box-shadow: 0 0 0 2px rgba(21, 128, 61, 0.2);
}

.live-indicator.status-polling {
  background-color: var(--status-info-bg);
  border-color: var(--status-info-border);
  color: var(--status-info);
}

.live-indicator.status-polling .pulse-dot {
  background-color: var(--status-info);
}

.live-indicator.status-disconnected,
.live-indicator.status-stopped {
  background-color: var(--status-blocked-bg);
  border-color: var(--status-blocked-border);
  color: var(--status-blocked);
}

.live-indicator.status-disconnected .pulse-dot,
.live-indicator.status-stopped .pulse-dot {
  background-color: var(--status-blocked);
}

.live-indicator.status-paused {
  background-color: var(--status-warning-bg);
  border-color: var(--status-warning-border);
  color: var(--status-warning);
}

.live-indicator.status-paused .pulse-dot {
  background-color: var(--status-warning);
}

.topbar-clock {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text-muted);
}

/* ==========================================
   CONTENT AREA & CARDS
   ========================================== */

.content-area {
  padding: 24px;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 20px;
  max-width: 1600px;
  width: 100%;
  margin: 0 auto;
}

/* Header Banner / Title Section */
.page-header-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
  margin-bottom: 4px;
}

.page-header-title {
  font-size: 20px;
  font-weight: 700;
  color: var(--text-primary);
  letter-spacing: -0.3px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.page-header-desc {
  font-size: 13px;
  color: var(--text-secondary);
  margin-top: 4px;
  max-width: 800px;
}

.page-header-meta {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.meta-pill {
  font-size: 11.5px;
  padding: 4px 10px;
  background-color: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 6px;
}

.meta-pill strong {
  color: var(--text-primary);
}

/* Synthetic Data Disclaimer Banner */
.synthetic-disclaimer-banner {
  background: var(--status-info-bg);
  border: 1px solid var(--status-info-border);
  border-left: 4px solid var(--accent-blue);
  border-radius: var(--radius-sm);
  padding: 10px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  font-size: 12.5px;
  color: var(--status-info);
}

.synthetic-disclaimer-banner .banner-text {
  display: flex;
  align-items: center;
  gap: 8px;
}

.synthetic-disclaimer-banner strong {
  font-weight: 600;
}

/* Base Card */
.card {
  background-color: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  transition: border-color 0.15s ease;
}

.card:hover {
  border-color: var(--border-strong);
}

.card-header {
  padding: 14px 20px;
  border-bottom: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.card-title {
  font-size: 14.5px;
  font-weight: 600;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: 8px;
}

.card-subtitle {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 2px;
}

.card-body {
  padding: 20px;
}

/* KPI Cards Grid */
.kpi-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 16px;
}

.kpi-card {
  background-color: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 16px 18px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  box-shadow: var(--shadow-sm);
  position: relative;
  overflow: hidden;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.kpi-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.kpi-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.kpi-label {
  font-size: 11.5px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--text-muted);
}

.kpi-icon {
  font-size: 16px;
  color: var(--text-secondary);
}

.kpi-value {
  font-size: 24px;
  font-weight: 700;
  color: var(--text-primary);
  font-family: var(--font-mono);
  line-height: 1.1;
}

.kpi-subtext {
  font-size: 11px;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 4px;
}

.kpi-badge {
  font-size: 10px;
  padding: 2px 6px;
  border-radius: var(--radius-xs);
  font-weight: 600;
}

/* ==========================================
   BADGES & STATUS PILLS
   ========================================== */

.badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 8px;
  border-radius: var(--radius-xs);
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.4px;
  white-space: nowrap;
}

.badge-allowed {
  background-color: var(--status-allowed-bg);
  color: var(--status-allowed);
  border: 1px solid var(--status-allowed-border);
}

.badge-blocked {
  background-color: var(--status-blocked-bg);
  color: var(--status-blocked);
  border: 1px solid var(--status-blocked-border);
}

.badge-warning, .badge-flagged {
  background-color: var(--status-warning-bg);
  color: var(--status-warning);
  border: 1px solid var(--status-warning-border);
}

.badge-info {
  background-color: var(--status-info-bg);
  color: var(--status-info);
  border: 1px solid var(--status-info-border);
}

.badge-purple {
  background-color: var(--status-purple-bg);
  color: var(--status-purple);
  border: 1px solid var(--status-purple-border);
}

.badge-draft {
  background-color: var(--bg-surface-elevated);
  color: var(--text-secondary);
  border: 1px solid var(--border-strong);
}

/* ==========================================
   TABLES & DATA DISPLAY
   ========================================== */

.table-responsive {
  width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  font-size: 13px;
}

.data-table thead {
  background-color: var(--bg-surface-elevated);
  border-bottom: 1px solid var(--border-subtle);
  position: sticky;
  top: 0;
  z-index: 10;
}

.data-table th {
  padding: 10px 14px;
  font-weight: 600;
  font-size: 11.5px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--text-muted);
  white-space: nowrap;
}

.data-table td {
  padding: 12px 14px;
  border-bottom: 1px solid var(--border-subtle);
  color: var(--text-secondary);
  vertical-align: middle;
}

.data-table tbody tr {
  transition: background-color 0.1s ease;
}

.data-table tbody tr:hover {
  background-color: var(--bg-surface-hover);
}

.mono-cell {
  font-family: var(--font-mono);
  font-size: 12px;
}

/* Table Search & Filter Toolbar */
.table-toolbar {
  padding: 14px 18px;
  border-bottom: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  background-color: var(--bg-surface);
}

.toolbar-search {
  position: relative;
  min-width: 240px;
  flex: 1;
  max-width: 380px;
}

.toolbar-search input {
  width: 100%;
  padding: 7px 12px 7px 32px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-strong);
  background-color: var(--bg-surface);
  color: var(--text-primary);
  font-size: 12.5px;
}

.toolbar-search .search-icon {
  position: absolute;
  left: 10px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  font-size: 13px;
}

.toolbar-filters {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.filter-select {
  padding: 6px 10px;
  font-size: 12px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-strong);
  background-color: var(--bg-surface);
  color: var(--text-primary);
}

/* ==========================================
   BUTTONS & FORMS
   ========================================== */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 7px 14px;
  border-radius: var(--radius-sm);
  font-size: 12.5px;
  font-weight: 600;
  cursor: pointer;
  border: 1px solid transparent;
  transition: all 0.15s ease;
  text-decoration: none;
  white-space: nowrap;
  line-height: 1.3;
}

.btn:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.btn-primary {
  background-color: var(--accent-blue);
  color: #ffffff;
}

.btn-primary:hover:not(:disabled) {
  background-color: #0369a1;
  box-shadow: var(--shadow-sm);
}

.btn-secondary {
  background-color: var(--bg-surface-elevated);
  border-color: var(--border-strong);
  color: var(--text-primary);
}

.btn-secondary:hover:not(:disabled) {
  background-color: var(--bg-surface-hover);
}

.btn-outline {
  background-color: transparent;
  border-color: var(--border-strong);
  color: var(--text-primary);
}

.btn-outline:hover:not(:disabled) {
  background-color: var(--bg-surface-hover);
}

.btn-success {
  background-color: var(--status-allowed);
  color: #ffffff;
}

.btn-success:hover:not(:disabled) {
  background-color: #166534;
}

.btn-warning {
  background-color: var(--status-warning);
  color: #ffffff;
}

.btn-warning:hover:not(:disabled) {
  background-color: #92400e;
}

.btn-danger {
  background-color: var(--status-blocked);
  color: #ffffff;
}

.btn-danger:hover:not(:disabled) {
  background-color: #991b1b;
}

.btn-sm {
  padding: 4px 8px;
  font-size: 11.5px;
}

/* Form Controls */
.form-group {
  display: flex;
  flex-direction: column;
  gap: 5px;
  margin-bottom: 14px;
}

.form-label {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-secondary);
}

.form-hint {
  font-size: 11px;
  color: var(--text-muted);
}

.form-input, .form-select, .form-textarea {
  background-color: var(--bg-surface);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  padding: 8px 12px;
  color: var(--text-primary);
  font-family: inherit;
  font-size: 13px;
  transition: border-color 0.15s, box-shadow 0.15s;
}

.form-input:focus, .form-select:focus, .form-textarea:focus {
  outline: none;
  border-color: var(--border-focus);
  box-shadow: 0 0 0 3px rgba(2, 132, 199, 0.15);
}

/* ==========================================
   CORRIDOR SUMMARY WIDGET
   ========================================== */

.corridor-summary-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 16px;
}

.corridor-card {
  background-color: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.corridor-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.corridor-title {
  font-weight: 600;
  font-size: 13.5px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.corridor-metrics {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 10px;
  background-color: var(--bg-surface-elevated);
  border-radius: var(--radius-sm);
  padding: 10px;
  text-align: center;
}

.corridor-metric-val {
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 15px;
  color: var(--text-primary);
}

.corridor-metric-lbl {
  font-size: 10.5px;
  color: var(--text-muted);
  text-transform: uppercase;
}

/* ==========================================
   DRY-RUN / TEST PANEL
   ========================================== */

.dry-run-panel {
  background-color: var(--bg-surface-elevated);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 18px;
}

.dry-run-result-box {
  background-color: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: 14px;
  margin-top: 14px;
  display: none;
}

.dry-run-result-box.active {
  display: block;
}

/* ==========================================
   SLIDE-OVER RULE DETAIL DRAWER
   ========================================== */

.drawer-backdrop {
  position: fixed;
  inset: 0;
  background-color: rgba(15, 23, 42, 0.4);
  z-index: 1000;
  display: none;
  backdrop-filter: blur(2px);
  transition: opacity 0.2s ease;
}

.drawer-backdrop.active {
  display: block;
}

.slide-over-drawer {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  width: 100%;
  max-width: 540px;
  background-color: var(--bg-surface);
  box-shadow: var(--shadow-xl);
  z-index: 1001;
  display: flex;
  flex-direction: column;
  transform: translateX(100%);
  transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  border-left: 1px solid var(--border-strong);
}

.slide-over-drawer.active {
  transform: translateX(0);
}

.drawer-header {
  padding: 16px 20px;
  border-bottom: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: space-between;
  background-color: var(--bg-surface-elevated);
}

.drawer-title {
  font-size: 15px;
  font-weight: 700;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: 8px;
}

.drawer-close {
  background: transparent;
  border: none;
  font-size: 22px;
  color: var(--text-muted);
  cursor: pointer;
  line-height: 1;
  padding: 2px 6px;
  border-radius: var(--radius-xs);
}

.drawer-close:hover {
  background-color: var(--bg-surface-hover);
  color: var(--text-primary);
}

.drawer-body {
  padding: 20px;
  overflow-y: auto;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.drawer-section {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.drawer-section-title {
  font-size: 11.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  color: var(--text-muted);
}

.drawer-props-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.drawer-prop-item {
  background-color: var(--bg-surface-elevated);
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-subtle);
}

.drawer-prop-label {
  font-size: 10.5px;
  color: var(--text-muted);
  text-transform: uppercase;
}

.drawer-prop-value {
  font-size: 12.5px;
  font-weight: 600;
  color: var(--text-primary);
  font-family: var(--font-mono);
  margin-top: 2px;
}

.conditions-viewer {
  background-color: var(--bg-primary);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: 12px;
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text-primary);
  overflow-x: auto;
  white-space: pre-wrap;
}

.drawer-footer {
  padding: 14px 20px;
  border-top: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  background-color: var(--bg-surface-elevated);
}

/* ==========================================
   TRAFFIC LAB SIMULATOR COMPONENTS
   ========================================== */

/* Scenario Presets Grid */
.scenario-presets-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 12px;
}

.scenario-card {
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 14px;
  background-color: var(--bg-surface);
  cursor: pointer;
  transition: all 0.15s ease;
  position: relative;
}

.scenario-card:hover {
  border-color: var(--accent-blue);
  box-shadow: var(--shadow-sm);
}

.scenario-card.active {
  border-color: var(--accent-blue);
  background-color: var(--accent-blue-subtle);
  box-shadow: 0 0 0 1px var(--accent-blue);
}

.scenario-title {
  font-weight: 700;
  font-size: 13px;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: 8px;
}

.scenario-desc {
  font-size: 11.5px;
  color: var(--text-secondary);
  margin-top: 4px;
  line-height: 1.4;
}

/* Visual Signaling Flow Pipeline */
.sim-flow-pipeline {
  background-color: var(--bg-surface-elevated);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 18px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  overflow-x: auto;
}

.pipeline-node {
  background-color: var(--bg-surface);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  padding: 10px 14px;
  display: flex;
  flex-direction: column;
  align-items: center;
  min-width: 140px;
  text-align: center;
  box-shadow: var(--shadow-sm);
  position: relative;
  flex-shrink: 0;
}

.pipeline-node.active-pulse {
  border-color: var(--accent-blue);
  box-shadow: 0 0 0 2px rgba(2, 132, 199, 0.2);
}

.pipeline-node-icon {
  font-size: 20px;
  margin-bottom: 4px;
}

.pipeline-node-title {
  font-size: 12px;
  font-weight: 700;
  color: var(--text-primary);
}

.pipeline-node-sub {
  font-size: 10.5px;
  color: var(--text-muted);
}

.pipeline-connector {
  flex: 1;
  min-width: 40px;
  height: 2px;
  background-color: var(--border-strong);
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}

.pipeline-particle {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background-color: var(--accent-blue);
  position: absolute;
  opacity: 0;
}

/* Animated particle when simulation running */
body.sim-active .pipeline-particle {
  opacity: 1;
  animation: moveParticle 1.4s infinite linear;
}

@keyframes moveParticle {
  0% { left: 0%; opacity: 0.2; }
  50% { opacity: 1; }
  100% { left: 100%; opacity: 0.2; }
}

@media (prefers-reduced-motion: reduce) {
  body.sim-active .pipeline-particle {
    animation: none;
    opacity: 0.8;
  }
}

/* Simulator controls action bar */
.sim-controls-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

/* ==========================================
   MODALS
   ========================================== */

.modal-backdrop {
  position: fixed;
  inset: 0;
  background-color: rgba(15, 23, 42, 0.5);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  backdrop-filter: blur(2px);
  padding: 16px;
}

.modal-backdrop.active {
  display: flex;
}

.modal-content {
  background-color: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  width: 100%;
  max-width: 620px;
  box-shadow: var(--shadow-xl);
  overflow: hidden;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
}

.modal-header {
  padding: 16px 20px;
  border-bottom: 1px solid var(--border-subtle);
  display: flex;
  justify-content: space-between;
  align-items: center;
  background-color: var(--bg-surface-elevated);
}

.modal-title {
  font-size: 15px;
  font-weight: 700;
  color: var(--text-primary);
}

.modal-close {
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 20px;
  cursor: pointer;
  padding: 2px 6px;
  border-radius: var(--radius-xs);
}

.modal-close:hover {
  background-color: var(--bg-surface-hover);
  color: var(--text-primary);
}

.modal-body {
  padding: 20px;
  overflow-y: auto;
}

/* ==========================================
   RESPONSIVE LAYOUT & BREAKPOINTS
   ========================================== */

@media (max-width: 1024px) {
  .sidebar {
    position: fixed;
    top: 0;
    bottom: 0;
    left: 0;
    transform: translateX(-100%);
    box-shadow: var(--shadow-xl);
  }

  .sidebar.open {
    transform: translateX(0);
  }

  .sidebar-toggle-btn {
    display: inline-flex;
  }

  .sidebar-close-btn {
    display: block;
  }

  .content-area {
    padding: 16px;
    gap: 16px;
  }
}

@media (max-width: 768px) {
  .topbar {
    padding: 8px 14px;
  }

  .topbar-clock {
    display: none;
  }

  .page-header-row {
    flex-direction: column;
  }

  .page-header-meta {
    width: 100%;
  }

  .kpi-grid {
    grid-template-columns: 1fr 1fr;
  }

  .drawer-props-grid {
    grid-template-columns: 1fr;
  }

  .slide-over-drawer {
    max-width: 100%;
  }

  .table-toolbar {
    flex-direction: column;
    align-items: stretch;
  }

  .toolbar-search {
    max-width: 100%;
  }
}

@media (max-width: 480px) {
  .kpi-grid {
    grid-template-columns: 1fr;
  }
}

/* ==========================================
   CARRIER QUALITY & WIRESHARK PROTOCOL TRACE
   ========================================== */

.carrier-kpi-bar {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
  padding: 10px 16px;
  background-color: var(--bg-surface-elevated);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  margin-bottom: 14px;
}

.carrier-kpi-item {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 11.5px;
  color: var(--text-muted);
}

.carrier-kpi-item strong {
  color: var(--text-primary);
  font-family: var(--font-mono);
  font-size: 13px;
}

/* Protocol Inspector Tabs */
.protocol-tabs-nav {
  display: flex;
  gap: 6px;
  border-bottom: 1px solid var(--border-subtle);
  margin-bottom: 14px;
  padding-bottom: 4px;
  overflow-x: auto;
}

.protocol-tab-btn {
  background: transparent;
  border: none;
  padding: 6px 12px;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-muted);
  cursor: pointer;
  border-radius: var(--radius-xs);
  transition: all 0.15s ease;
  white-space: nowrap;
}

.protocol-tab-btn:hover {
  color: var(--text-primary);
  background-color: var(--bg-surface-hover);
}

.protocol-tab-btn.active {
  color: var(--accent-blue);
  background-color: var(--accent-blue-subtle);
}

.protocol-pane {
  display: none;
}

.protocol-pane.active {
  display: block;
}

/* Signaling Ladder (Call Sequence Flow) */
.ladder-timeline {
  display: flex;
  flex-direction: column;
  gap: 10px;
  position: relative;
  padding-left: 24px;
  border-left: 2px dashed var(--border-strong);
  margin: 12px 0 12px 8px;
}

.ladder-step-node {
  position: relative;
  background-color: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: 8px 12px;
  font-size: 12px;
  box-shadow: var(--shadow-sm);
}

.ladder-step-dot {
  position: absolute;
  left: -31px;
  top: 10px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background-color: var(--accent-blue);
  border: 2px solid var(--bg-surface);
}

.ladder-step-node.verdict-blocked {
  border-left: 3px solid var(--status-blocked);
}
.ladder-step-node.verdict-blocked .ladder-step-dot {
  background-color: var(--status-blocked);
}

.ladder-step-node.verdict-allowed {
  border-left: 3px solid var(--status-allowed);
}
.ladder-step-node.verdict-allowed .ladder-step-dot {
  background-color: var(--status-allowed);
}

/* Wireshark Hex View */
.hex-view-container {
  background-color: #070a12;
  color: #38bdf8;
  font-family: var(--font-mono);
  font-size: 11.5px;
  padding: 12px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-strong);
  overflow-x: auto;
  line-height: 1.45;
  white-space: pre;
}

/* ========================================================
   CARRIER NOC DONUT CHARTS & THREAT BREAKDOWN WIDGETS
   ======================================================== */

.donut-chart-container {
  position: relative;
  height: 200px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.donut-center-label {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  text-align: center;
  pointer-events: none;
}

.donut-center-pct {
  font-size: 22px;
  font-weight: 700;
  color: var(--text-primary);
  font-family: var(--font-mono);
  line-height: 1.1;
}

.donut-center-sub {
  font-size: 9.5px;
  color: var(--text-muted);
  text-transform: uppercase;
  font-weight: 700;
  letter-spacing: 0.8px;
  margin-top: 2px;
}

/* "Why Calls Are Blocked" Threat Cause Breakdown */
.cause-breakdown-list {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.cause-item {
  padding: 8px 10px;
  border-radius: var(--radius-xs);
  background: var(--bg-surface-elevated);
  border-left: 3px solid var(--status-blocked);
  margin-bottom: 6px;
}

.cause-header-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 12px;
  margin-bottom: 4px;
}

.cause-title {
  font-weight: 600;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: 6px;
}

.cause-stat {
  font-family: var(--font-mono);
  font-size: 11.5px;
  font-weight: 700;
}

.cause-bar-track {
  width: 100%;
  height: 5px;
  background-color: rgba(255, 255, 255, 0.08);
  border-radius: 3px;
  overflow: hidden;
}

.cause-bar-val {
  height: 100%;
  border-radius: 3px;
  transition: width 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Bangladesh Interconnect Trunk Status Matrix */
.trunk-status-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 10px;
}

.trunk-chip {
  background-color: var(--bg-surface-elevated);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: 10px 12px;
  transition: all 0.15s ease;
}

.trunk-chip:hover {
  border-color: var(--border-strong);
  transform: translateY(-1px);
}

.trunk-chip-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 6px;
}

.trunk-chip-name {
  font-size: 12px;
  font-weight: 700;
  color: var(--text-primary);
}

.trunk-chip-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 11px;
  color: var(--text-muted);
  font-family: var(--font-mono);
}

/* Live Stream Filter Tabs */
.live-filter-tabs {
  display: flex;
  gap: 6px;
}

.live-filter-btn {
  padding: 3px 9px;
  font-size: 11px;
  border-radius: var(--radius-xs);
  border: 1px solid var(--border-subtle);
  background: var(--bg-surface);
  color: var(--text-secondary);
  cursor: pointer;
  transition: all 0.15s ease;
}

.live-filter-btn:hover {
  color: var(--text-primary);
  border-color: var(--border-strong);
}

.live-filter-btn.active {
  background: var(--accent-blue);
  color: #fff;
  border-color: var(--accent-blue);
  font-weight: 600;
}

/* ========================================================
   END-TO-END SIGNALING & POLICY FLOW PIPELINE VISUALIZER
   ======================================================== */
.signaling-pipeline-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  margin-bottom: 20px;
  overflow: hidden;
}

.pipeline-header {
  padding: 12px 18px;
  background: var(--bg-surface-elevated);
  border-bottom: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
}

.pipeline-corridor-tabs {
  display: flex;
  gap: 6px;
  background: var(--bg-base);
  padding: 3px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-subtle);
}

.pipeline-corridor-btn {
  padding: 5px 12px;
  font-size: 11.5px;
  font-weight: 600;
  border-radius: var(--radius-xs);
  border: none;
  background: transparent;
  color: var(--text-secondary);
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: all 0.2s ease;
}

.pipeline-corridor-btn:hover {
  color: var(--text-primary);
  background: rgba(255, 255, 255, 0.05);
}

.pipeline-corridor-btn.active {
  background: var(--accent-blue);
  color: #fff;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
}

.pipeline-hops-flow {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 12px;
  padding: 18px 20px;
  position: relative;
  align-items: stretch;
}

@media (max-width: 1024px) {
  .pipeline-hops-flow {
    grid-template-columns: 1fr;
    gap: 16px;
  }
}

.pipeline-hop-box {
  background: var(--bg-surface-elevated);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: 14px;
  display: flex;
  flex-direction: column;
  position: relative;
  transition: all 0.2s ease;
}

.pipeline-hop-box:hover {
  border-color: var(--accent-blue);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
  transform: translateY(-2px);
}

.pipeline-hop-box.hop-firewall {
  border-color: var(--accent-blue);
  background: linear-gradient(180deg, rgba(59, 130, 246, 0.08) 0%, var(--bg-surface-elevated) 100%);
  box-shadow: 0 0 15px rgba(59, 130, 246, 0.15);
}

.pipeline-hop-badge {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  padding: 2px 6px;
  border-radius: var(--radius-xs);
  display: inline-flex;
  align-items: center;
  width: fit-content;
  margin-bottom: 8px;
}

.hop-num-tag {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 700;
  color: var(--text-muted);
  position: absolute;
  top: 10px;
  right: 12px;
}

.pipeline-hop-title {
  font-size: 13px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 6px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.pipeline-hop-desc {
  font-size: 11px;
  color: var(--text-secondary);
  line-height: 1.45;
  margin-bottom: 10px;
  flex-grow: 1;
}

.pipeline-hop-metrics {
  margin-top: auto;
  padding-top: 8px;
  border-top: 1px solid var(--border-subtle);
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 11px;
  font-family: var(--font-mono);
}

.pipeline-arrow-separator {
  position: absolute;
  right: -12px;
  top: 50%;
  transform: translateY(-50%);
  z-index: 2;
  color: var(--accent-blue);
  font-size: 14px;
}

/* Call Signaling Trace Modal */
.call-trace-modal {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 1050;
  background-color: rgba(5, 8, 16, 0.85);
  backdrop-filter: blur(4px);
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.call-trace-modal.active {
  display: flex;
}

.call-trace-dialog {
  background: var(--bg-surface);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-md);
  width: 100%;
  max-width: 860px;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.6);
  overflow: hidden;
}

.call-trace-header {
  padding: 16px 20px;
  background: var(--bg-surface-elevated);
  border-bottom: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.call-trace-body {
  padding: 20px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.call-trace-hops-timeline {
  display: flex;
  flex-direction: column;
  gap: 10px;
  position: relative;
  padding-left: 24px;
}

.call-trace-hops-timeline::before {
  content: '';
  position: absolute;
  left: 8px;
  top: 10px;
  bottom: 10px;
  width: 2px;
  background: var(--border-subtle);
}

.call-trace-hop-node {
  position: relative;
  background: var(--bg-surface-elevated);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-xs);
  padding: 10px 14px;
  font-size: 12px;
}

.call-trace-hop-node::before {
  content: '';
  position: absolute;
  left: -20px;
  top: 14px;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--accent-blue);
  border: 2px solid var(--bg-surface);
}

.call-trace-hop-node.node-dropped::before {
  background: var(--status-blocked);
}

.call-trace-hop-node.node-allowed::before {
  background: var(--status-allowed);
}

/* ==========================================
   TRAFFIC LAB SIMULATOR: TELECOM SUITE STYLES
   ========================================== */

.sim-chart-grid-4 {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  margin-bottom: 16px;
}

@media (max-width: 1024px) {
  .sim-chart-grid-4 {
    grid-template-columns: 1fr;
  }
}

.attack-inject-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  padding: 10px 14px;
  background: var(--bg-surface-elevated);
  border: 1px dashed var(--border-strong);
  border-radius: var(--radius-sm);
  margin-bottom: 16px;
}

.attack-inject-label {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--text-muted);
  letter-spacing: 0.5px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.attack-btn {
  padding: 4px 11px;
  font-size: 11.5px;
  font-weight: 600;
  border-radius: var(--radius-xs);
  cursor: pointer;
  border: 1px solid transparent;
  transition: all 0.15s ease;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.attack-btn-danger {
  background: rgba(239, 68, 68, 0.15);
  color: #ef4444;
  border-color: rgba(239, 68, 68, 0.35);
}

.attack-btn-danger:hover {
  background: #ef4444;
  color: #fff;
}

.attack-btn-warning {
  background: rgba(245, 158, 11, 0.15);
  color: #f59e0b;
  border-color: rgba(245, 158, 11, 0.35);
}

.attack-btn-warning:hover {
  background: #f59e0b;
  color: #fff;
}

.attack-btn-purple {
  background: rgba(139, 92, 246, 0.15);
  color: #8b5cf6;
  border-color: rgba(139, 92, 246, 0.35);
}

.attack-btn-purple:hover {
  background: #8b5cf6;
  color: #fff;
}

.attack-btn-blue {
  background: rgba(59, 130, 246, 0.15);
  color: #3b82f6;
  border-color: rgba(59, 130, 246, 0.35);
}

.attack-btn-blue:hover {
  background: #3b82f6;
  color: #fff;
}

/* Wireshark-Style Protocol Dissector Stream Table */
.dissector-table {
  width: 100%;
  border-collapse: collapse;
  font-family: var(--font-mono);
  font-size: 11px;
}

.dissector-table th {
  background-color: var(--bg-surface-elevated);
  color: var(--text-muted);
  font-weight: 700;
  text-align: left;
  padding: 8px 10px;
  border-bottom: 2px solid var(--border-strong);
  font-family: var(--font-sans);
  font-size: 11px;
  text-transform: uppercase;
}

.dissector-table td {
  padding: 6px 10px;
  border-bottom: 1px solid var(--border-subtle);
  vertical-align: middle;
}

.dissector-table tr:hover td {
  background-color: var(--bg-surface-hover);
}

.dissector-row-drop td {
  background-color: rgba(239, 68, 68, 0.05);
}

.dissector-row-drop:hover td {
  background-color: rgba(239, 68, 68, 0.12);
}

.dissector-row-flag td {
  background-color: rgba(245, 158, 11, 0.05);
}

.dissector-proto-badge {
  display: inline-block;
  font-size: 10px;
  font-weight: 700;
  padding: 1px 6px;
  border-radius: var(--radius-xs);
  text-transform: uppercase;
}

.proto-sip {
  background: rgba(59, 130, 246, 0.18);
  color: #3b82f6;
  border: 1px solid rgba(59, 130, 246, 0.35);
}

.proto-isup {
  background: rgba(239, 68, 68, 0.18);
  color: #ef4444;
  border: 1px solid rgba(239, 68, 68, 0.35);
}

.proto-diameter {
  background: rgba(139, 92, 246, 0.18);
  color: #8b5cf6;
  border: 1px solid rgba(139, 92, 246, 0.35);
}

.proto-smpp {
  background: rgba(245, 158, 11, 0.18);
  color: #f59e0b;
  border: 1px solid rgba(245, 158, 11, 0.35);
}

.proto-gtp {
  background: rgba(16, 185, 129, 0.18);
  color: #10b981;
  border: 1px solid rgba(16, 185, 129, 0.35);
}

/* Frame Dissector Modal Tree View */
.wireshark-tree {
  display: flex;
  flex-direction: column;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 12px;
}

.wireshark-layer {
  background: var(--bg-surface-elevated);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-xs);
  overflow: hidden;
}

.wireshark-layer-header {
  padding: 8px 12px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: space-between;
  cursor: pointer;
  user-select: none;
  background: rgba(255, 255, 255, 0.02);
}

.wireshark-layer-body {
  padding: 8px 14px;
  border-top: 1px solid var(--border-subtle);
  font-size: 11.5px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  color: var(--text-secondary);
}

.wireshark-field-row {
  display: flex;
  gap: 12px;
  line-height: 1.4;
}

.wireshark-field-name {
  color: var(--text-muted);
  min-width: 220px;
}

.wireshark-field-val {
  color: var(--text-primary);
  word-break: break-all;
}

