/* ==========================================================================
   VERTERON NOC — DESIGN SYSTEM & LAYOUT
   Modern Executive NOC Layout with Dark Sidebar & Warm Clean Dashboard
   ========================================================================== */

:root {
  /* Cores Institucionais Verteron */
  --vt-orange: #EF5921;
  --vt-orange-light: #F7931C;
  --vt-orange-glow: rgba(239, 89, 33, 0.25);
  
  /* Sidebar Escura (Dark Executive) */
  --vt-sidebar-bg: #0E131F;
  --vt-sidebar-hover: #182032;
  --vt-sidebar-active: #2B1D1E;
  --vt-sidebar-border: #1E2638;
  --vt-sidebar-text: #94A3B8;
  
  /* Dashboard Claro e Executivo (Warm NOC) */
  --vt-main-bg: #F8F6F0;
  --vt-card-bg: #FFFFFF;
  --vt-card-border: #E6E3DB;
  --vt-card-hover-border: #D1CDC4;
  --vt-text-title: #111827;
  --vt-text-body: #374151;
  --vt-text-muted: #6B7280;
  
  /* Status NOC */
  --vt-green: #10B981;
  --vt-green-bg: #DCFCE7;
  --vt-green-text: #15803D;
  --vt-green-border: #86EFAC;
  
  --vt-yellow: #F59E0B;
  --vt-yellow-bg: #FEF3C7;
  --vt-yellow-text: #B45309;
  --vt-yellow-border: #FCD34D;
  
  --vt-red: #EF4444;
  --vt-red-bg: #FEE2E2;
  --vt-red-text: #B91C1C;
  --vt-red-border: #FCA5A5;

  --vt-purple: #8B5CF6;
  --vt-purple-bg: #F3E8FF;
  --vt-purple-text: #6B21A8;

  --font-mono: 'JetBrains Mono', 'Fira Code', monospace;
  --font-display: 'Montserrat', sans-serif;
  --font-body: 'Inter', system-ui, -apple-system, sans-serif;
}

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

body {
  background-color: var(--vt-main-bg);
  color: var(--vt-text-body);
  font-family: var(--font-body);
  height: 100vh;
  overflow: hidden;
  display: flex;
}

/* --------------------------------------------------------------------------
   Sidebar
   -------------------------------------------------------------------------- */
.sidebar {
  width: 250px;
  background-color: var(--vt-sidebar-bg);
  color: var(--vt-sidebar-text);
  display: flex;
  flex-direction: column;
  flex-shrink: 0;
  border-right: 1px solid var(--vt-sidebar-border);
  transition: all 0.3s ease;
  z-index: 30;
}

.sidebar-logo {
  padding: 16px 14px;
  border-bottom: 1px solid var(--vt-sidebar-border);
  display: flex;
  align-items: center;
  justify-content: center;
}

.sidebar-brand-wrapper {
  background: #FFFFFF;
  padding: 7px 12px;
  border-radius: 9px;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.25);
  transition: all 0.2s ease;
  text-decoration: none;
}

.sidebar-brand-wrapper:hover {
  background: #FAFAFA;
  box-shadow: 0 4px 12px rgba(239, 89, 33, 0.25);
}

.sidebar-brand-img {
  height: 28px;
  width: auto;
  max-width: 100%;
  object-fit: contain;
}

.nav-link {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 16px;
  margin: 4px 12px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 500;
  color: #94A3B8;
  text-decoration: none;
  transition: all 0.2s ease;
  position: relative;
  cursor: pointer;
}

.nav-link i {
  font-size: 15px;
  width: 20px;
  text-align: center;
}

.nav-link:hover {
  background-color: var(--vt-sidebar-hover);
  color: #F1F5F9;
}

.nav-link.active {
  background-color: var(--vt-sidebar-active);
  color: #EF5921;
  font-weight: 700;
  border: 1px solid rgba(239, 89, 33, 0.4);
  box-shadow: 0 2px 8px rgba(239, 89, 33, 0.15);
}

.nav-badge {
  margin-left: auto;
  padding: 2px 8px;
  border-radius: 9999px;
  font-size: 10px;
  font-weight: 700;
  background-color: #1E293B;
  color: #94A3B8;
  border: 1px solid #334155;
}

.nav-badge.active-alert {
  background-color: rgba(239, 68, 68, 0.2);
  color: #F87171;
  border-color: rgba(239, 68, 68, 0.4);
}

/* --------------------------------------------------------------------------
   Main Content Layout
   -------------------------------------------------------------------------- */
.main-wrapper {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-width: 0;
  height: 100vh;
  overflow-y: auto;
  background-color: var(--vt-main-bg);
}

/* Executive Cards */
.noc-card {
  background-color: var(--vt-card-bg);
  border: 1px solid var(--vt-card-border);
  border-radius: 12px;
  padding: 16px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.03), 0 2px 8px rgba(0, 0, 0, 0.02);
  transition: all 0.2s ease;
  position: relative;
}

.noc-card:hover {
  border-color: var(--vt-card-hover-border);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

.noc-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
  padding-bottom: 8px;
  border-bottom: 1px solid #F3F1EC;
}

.noc-card-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-display);
  font-size: 13px;
  font-weight: 700;
  color: var(--vt-text-title);
  letter-spacing: -0.01em;
}

/* Dot indicators */
.dot-green {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background-color: var(--vt-green);
  display: inline-block;
}

.dot-orange {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background-color: var(--vt-orange);
  display: inline-block;
}

/* Status Badges */
.badge-operational {
  background-color: var(--vt-green-bg);
  color: var(--vt-green-text);
  border: 1px solid var(--vt-green-border);
  padding: 4px 12px;
  border-radius: 9999px;
  font-size: 11px;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.pulse-circle {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background-color: #10B981;
  position: relative;
  display: inline-block;
}

.pulse-circle::after {
  content: '';
  position: absolute;
  top: -2px;
  left: -2px;
  right: -2px;
  bottom: -2px;
  border-radius: 50%;
  border: 2px solid #10B981;
  animation: pulse-ring 2s cubic-bezier(0.215, 0.61, 0.355, 1) infinite;
}

@keyframes pulse-ring {
  0% { transform: scale(0.9); opacity: 0.9; }
  70% { transform: scale(1.8); opacity: 0; }
  100% { transform: scale(0.9); opacity: 0; }
}

/* Pill buttons */
.btn-pill {
  background-color: #FFFFFF;
  border: 1px solid #DCD8CD;
  color: #374151;
  padding: 6px 14px;
  border-radius: 9999px;
  font-size: 12px;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
}

.btn-pill:hover {
  background-color: #F8F6F0;
  border-color: #BFB8A9;
  color: #111827;
}

/* Mini KPI Container in Card 1 */
.kpi-mini-card {
  background-color: #FDFCF9;
  border: 1px solid #EAE6DF;
  border-radius: 10px;
  padding: 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.icon-badge-green {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background-color: #D1FAE5;
  color: #059669;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
}

.icon-badge-peach {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background-color: #FEF3C7;
  color: #D97706;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
}

/* Modals High Stacking Priority */
#modal-history,
#modal-alerts {
  z-index: 99999 !important;
}

/* Leaflet Map Customization & Stacking Context Isolation */
#bgp-world-map {
  background: #E8ECEF;
  border-radius: 8px;
  overflow: hidden;
  position: relative;
  z-index: 1 !important;
  isolation: isolate;
}

#bgp-world-map .leaflet-pane {
  z-index: 2 !important;
}

#bgp-world-map .leaflet-top,
#bgp-world-map .leaflet-bottom {
  z-index: 5 !important;
}

.leaflet-popup-content-wrapper {
  border-radius: 8px;
  font-family: var(--font-body);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.15);
}

.noc-map-marker {
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 9999px;
  color: #FFFFFF;
  font-weight: 800;
  font-size: 10px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
  border: 2px solid #FFFFFF;
  transition: transform 0.2s ease;
}

.noc-map-marker:hover {
  transform: scale(1.15);
}

/* Custom Scrollbars */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}

::-webkit-scrollbar-track {
  background: #F1EFE9;
}

::-webkit-scrollbar-thumb {
  background: #D1CDC4;
  border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--vt-orange);
}

/* Tab Panels */
.tab-panel {
  display: none;
}

.tab-panel.active {
  display: block;
}
