:root {
  --bg-primary: #0b0f19;
  --bg-secondary: #141c2f;
  --bg-tertiary: #1f2d4d;
  --glass-bg: rgba(20, 28, 47, 0.65);
  --glass-border: rgba(255, 255, 255, 0.08);
  --accent-color: #00e5ff;
  --accent-success: #00e676;
  --accent-error: #ff1744;
  --accent-warning: #ffea00;
  --text-main: #f5f6fa;
  --text-muted: #8b9bb4;
  --font-family-sans: 'Outfit', sans-serif;
  --font-family-mono: 'Roboto Mono', monospace;
}

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

/* Sleek scrollbar styling for everything */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}
::-webkit-scrollbar-track {
  background: rgba(0, 0, 0, 0.2);
}
::-webkit-scrollbar-thumb {
  background: rgba(0, 229, 255, 0.25);
  border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
  background: rgba(0, 229, 255, 0.5);
}

body {
  background-color: var(--bg-primary);
  color: var(--text-main);
  font-family: var(--font-family-sans);
  overflow-x: hidden;
  min-height: 100vh;
  background-image: 
    radial-gradient(circle at 10% 20%, rgba(0, 229, 255, 0.05) 0%, transparent 40%),
    radial-gradient(circle at 90% 80%, rgba(0, 230, 118, 0.05) 0%, transparent 40%);
  background-attachment: fixed;
}

.blurred {
  filter: blur(15px);
  pointer-events: none;
  transition: filter 0.5s ease;
}

.app-container {
  max-width: 1440px;
  margin: 0 auto;
  padding: 20px;
  transition: filter 0.5s ease;
}

/* ==========================================================================
   LOGIN GLOBAL OVERLAY (PANTALLA DE INICIO)
   ========================================================================== */
.global-login-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(6, 9, 20, 0.85);
  backdrop-filter: blur(25px);
  -webkit-backdrop-filter: blur(25px);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 99999;
  opacity: 1;
  visibility: visible;
  transition: all 0.5s cubic-bezier(0.19, 1, 0.22, 1);
}

.global-login-overlay.hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.login-card {
  background: rgba(20, 28, 47, 0.75);
  border: 1px solid var(--glass-border);
  border-radius: 24px;
  padding: 40px;
  width: 100%;
  max-width: 440px;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.5), 0 0 40px rgba(0, 229, 255, 0.05);
  backdrop-filter: blur(15px);
  display: flex;
  flex-direction: column;
  gap: 20px;
  transform: scale(1);
  transition: transform 0.4s ease;
}

.login-header {
  text-align: center;
  margin-bottom: 10px;
}

.lock-shield {
  font-size: 3rem;
  display: block;
  margin-bottom: 12px;
  animation: float 4s ease-in-out infinite;
}

@keyframes float {
  0% { transform: translateY(0px); }
  50% { transform: translateY(-8px); }
  100% { transform: translateY(0px); }
}

.login-header h2 {
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--text-main);
  letter-spacing: 0.5px;
}

.sub-logo {
  font-size: 0.72rem;
  color: var(--accent-color);
  font-weight: 700;
  letter-spacing: 2px;
  display: block;
  margin-top: 4px;
  margin-bottom: 12px;
}

.login-header p {
  font-size: 0.8rem;
  color: var(--text-muted);
  line-height: 1.4;
}

.login-body {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

/* Header */
.main-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 24px;
  margin-bottom: 20px;
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  backdrop-filter: blur(12px);
  border-radius: 16px;
  box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.3);
}

.logo-area {
  display: flex;
  align-items: center;
  gap: 15px;
}

.logo-area h1 {
  font-size: 1.3rem;
  font-weight: 700;
  letter-spacing: 0.5px;
  background: linear-gradient(90deg, var(--text-main) 30%, var(--accent-color));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* User Profile Badge */
.user-profile-badge {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--glass-border);
  padding: 8px 16px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  gap: 15px;
}

.profile-texts {
  display: flex;
  flex-direction: column;
  gap: 1px;
}

.profile-texts span {
  font-size: 0.75rem;
  color: var(--text-muted);
}

.profile-texts strong {
  color: var(--text-main);
  font-weight: 700;
}

.role-tag {
  font-size: 0.68rem;
  color: var(--accent-success);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.btn-logout-small {
  background: rgba(255, 23, 68, 0.08);
  border: 1px solid rgba(255, 23, 68, 0.3);
  color: var(--accent-error);
  padding: 6px 12px;
  border-radius: 8px;
  font-size: 0.72rem;
  cursor: pointer;
  font-weight: 700;
  font-family: var(--font-family-sans);
  transition: all 0.2s ease;
}

.btn-logout-small:hover {
  background: var(--accent-error);
  color: white;
}

.status-indicator-pulse {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  display: inline-block;
  position: relative;
}

.status-indicator-pulse.active {
  background-color: var(--accent-success);
  box-shadow: 0 0 12px var(--accent-success);
}

.status-indicator-pulse.active::after {
  content: '';
  width: 100%;
  height: 100%;
  background-color: var(--accent-success);
  border-radius: 50%;
  position: absolute;
  top: 0;
  left: 0;
  animation: pulse 1.8s infinite;
  opacity: 0.6;
}

@keyframes pulse {
  0% { transform: scale(1); opacity: 0.8; }
  100% { transform: scale(2.8); opacity: 0; }
}

.system-mode-selector {
  display: flex;
  align-items: center;
  gap: 12px;
}

.mode-label {
  font-size: 0.85rem;
  color: var(--text-muted);
  font-weight: 600;
}

.btn-toggle-zt {
  padding: 10px 20px;
  border-radius: 30px;
  font-family: var(--font-family-sans);
  font-weight: 700;
  border: none;
  cursor: pointer;
  transition: all 0.3s ease;
  letter-spacing: 0.5px;
}

.btn-toggle-zt.zt-active {
  background: linear-gradient(135deg, #00b0ff 0%, #00e5ff 100%);
  color: #0b0f19;
  box-shadow: 0 0 15px rgba(0, 229, 255, 0.4);
}

.btn-toggle-zt.zt-inactive {
  background: linear-gradient(135deg, #ff1744 0%, #ff5252 100%);
  color: #fff;
  box-shadow: 0 0 15px rgba(255, 23, 68, 0.4);
}

/* ==========================================================================
   NAVIGATION TAB SYSTEM (DISEÑO POR VENTANAS)
   ========================================================================== */
.navigation-tabs {
  display: flex;
  gap: 10px;
  margin-bottom: 20px;
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  padding: 8px 12px;
  border-radius: 12px;
  backdrop-filter: blur(12px);
  overflow-x: auto;
}

.nav-tab {
  background: transparent;
  border: none;
  color: var(--text-muted);
  padding: 10px 18px;
  border-radius: 8px;
  cursor: pointer;
  font-family: var(--font-family-sans);
  font-weight: 600;
  font-size: 0.85rem;
  transition: all 0.2s ease;
  white-space: nowrap;
  text-decoration: none;
}

.nav-tab:hover {
  color: var(--text-main);
  background: rgba(255, 255, 255, 0.03);
}

.nav-tab.active {
  color: #0b0f19;
  background: linear-gradient(135deg, #00b0ff 0%, #00e5ff 100%);
  font-weight: 700;
  box-shadow: 0 0 12px rgba(0, 229, 255, 0.35);
}

.tab-panel {
  display: none;
  animation: fadeInTab 0.35s ease-out;
}

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

@keyframes fadeInTab {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ==========================================================================
   WORKSPACE NODE GRID (CARD SELECTORS)
   ========================================================================== */
.workspace-nodes-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
  gap: 15px;
  margin-top: 10px;
}

.workspace-node-card {
  background: rgba(255, 255, 255, 0.01);
  border: 1px solid var(--glass-border);
  padding: 16px 12px;
  border-radius: 12px;
  text-align: center;
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: 0 4px 10px rgba(0,0,0,0.15);
}

.workspace-node-card:hover {
  border-color: var(--accent-color);
  background: rgba(0, 229, 255, 0.03);
  transform: translateY(-2px);
}

.workspace-node-card.selected {
  border-color: var(--accent-color);
  box-shadow: 0 0 10px rgba(0, 229, 255, 0.25);
  background: rgba(0, 229, 255, 0.05);
}

.workspace-node-card .card-icon {
  font-size: 2rem;
  margin-bottom: 8px;
}

.workspace-node-card .card-name {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--text-main);
}

.workspace-node-card .card-vlan {
  font-size: 0.68rem;
  color: var(--text-muted);
  margin-top: 4px;
}

/* Dashboard Grid */
.dashboard-grid {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.grid-card {
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  backdrop-filter: blur(12px);
  border-radius: 16px;
  padding: 24px;
  box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.25);
  transition: border-color 0.3s ease;
}

.grid-card:hover {
  border-color: rgba(0, 229, 255, 0.2);
}

.card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  padding-bottom: 12px;
}

.card-header h2 {
  font-size: 1.2rem;
  font-weight: 600;
  color: var(--text-main);
}

.badge {
  background: rgba(0, 229, 255, 0.1);
  color: var(--accent-color);
  padding: 4px 10px;
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 700;
}

.pt-viewport {
  position: relative;
  width: 100%;
  height: 640px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 16px;
  background: #04060a;
  cursor: grab;
  user-select: none;
  box-shadow: inset 0 0 40px rgba(0,0,0,0.8);
}

.pt-viewport:active {
  cursor: grabbing;
}

.packet-tracer-container {
  position: absolute;
  top: 0;
  left: 0;
  width: 3500px;
  height: 960px;
  background: #05080e;
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 24px;
  box-sizing: border-box;
  transform-origin: 0 0;
}

.pt-svg-wires {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 1;
}

/* Clases animadas de hilos del flujo */
@keyframes pt-dash {
  to {
    stroke-dashoffset: -40;
  }
}

.pt-wire-active {
  stroke: var(--accent-color) !important;
  stroke-width: 3 !important;
  stroke-dasharray: 6,4 !important;
  animation: pt-dash 1.5s linear infinite !important;
  filter: drop-shadow(0 0 6px var(--accent-color));
}

.pt-wire-blocked {
  stroke: var(--accent-error) !important;
  stroke-width: 3.5 !important;
  stroke-dasharray: 5,3 !important;
  animation: pt-dash 0.8s linear infinite !important;
  filter: drop-shadow(0 0 8px var(--accent-error));
}

.pt-wire-passed {
  stroke: var(--accent-success) !important;
  stroke-width: 3.5 !important;
  stroke-dasharray: 6,4 !important;
  animation: pt-dash 1.2s linear infinite !important;
  filter: drop-shadow(0 0 8px var(--accent-success));
}

@keyframes pt-glow-red {
  0% { box-shadow: 0 0 10px rgba(255, 23, 68, 0.4); border-color: rgba(255, 23, 68, 0.5); }
  50% { box-shadow: 0 0 25px rgba(255, 23, 68, 0.9); border-color: var(--accent-error); }
  100% { box-shadow: 0 0 10px rgba(255, 23, 68, 0.4); border-color: rgba(255, 23, 68, 0.5); }
}

.pt-node-blocked {
  animation: pt-glow-red 1s ease-in-out infinite !important;
}

@keyframes pt-glow-green {
  0% { box-shadow: 0 0 10px rgba(0, 230, 118, 0.4); border-color: rgba(0, 230, 118, 0.5); }
  50% { box-shadow: 0 0 25px rgba(0, 230, 118, 0.9); border-color: var(--accent-success); }
  100% { box-shadow: 0 0 10px rgba(0, 230, 118, 0.4); border-color: rgba(0, 230, 118, 0.5); }
}

.pt-node-passed {
  animation: pt-glow-green 1s ease-in-out infinite !important;
}

.pt-zone {
  background: rgba(255, 255, 255, 0.01);
  border: 1px solid rgba(255, 255, 255, 0.02);
  border-radius: 12px;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 15px;
  z-index: 2;
  flex-shrink: 0;
}

.pt-zone-title {
  font-size: 0.7rem;
  font-weight: 700;
  color: var(--text-muted);
  letter-spacing: 1.5px;
  text-transform: uppercase;
  border-bottom: 1px solid rgba(255, 255, 255, 0.03);
  padding-bottom: 6px;
}

.pt-nodes-row {
  display: flex;
  justify-content: space-around;
  align-items: center;
  flex-wrap: wrap;
  gap: 20px;
}

.pt-sub-grid {
  display: flex;
  flex-direction: row;
  gap: 24px;
  width: 100%;
  align-items: stretch;
}

.pt-vlan-block {
  background: rgba(0, 229, 255, 0.01);
  border: 1px solid rgba(0, 229, 255, 0.04);
  border-radius: 10px;
  padding: 12px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}

.pt-vlan-label {
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--accent-color);
  letter-spacing: 0.5px;
}

.pt-node {
  background: #0f1525;
  border: 1px solid var(--glass-border);
  border-radius: 10px;
  padding: 12px 16px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  min-width: 130px;
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: 0 4px 10px rgba(0,0,0,0.3);
}

.pt-node:hover {
  border-color: var(--accent-color);
  box-shadow: 0 0 10px rgba(0, 229, 255, 0.25);
  transform: scale(1.02);
}

.pt-node.selected {
  border-color: var(--accent-color);
  box-shadow: 0 0 12px rgba(0, 229, 255, 0.35);
}

.pt-icon {
  font-size: 2.1rem;
  margin-bottom: 6px;
}

.pt-label {
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--text-main);
}

.pt-ip {
  font-size: 0.68rem;
  color: var(--text-muted);
  margin-top: 2px;
}

.pt-sensor-row {
  display: flex;
  gap: 8px;
  width: 100%;
  justify-content: center;
}

.pt-node.sensor-node-pt {
  padding: 6px 10px;
  font-size: 0.68rem;
  min-width: auto;
  background: #080c14;
}

/* Detail Panel Styling */
.detail-content {
  display: flex;
  flex-direction: column;
  height: auto;
  gap: 12px;
}

.empty-state {
  display: flex;
  justify-content: center;
  align-items: center;
  height: 200px;
  text-align: center;
  color: var(--text-muted);
  font-size: 0.9rem;
}

.node-details {
  display: flex;
  flex-direction: column;
  gap: 15px;
}

.detail-row {
  display: flex;
  justify-content: space-between;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  padding-bottom: 8px;
  font-size: 0.9rem;
}

.detail-row span:first-child {
  color: var(--text-muted);
  font-weight: 500;
}

.detail-row span:last-child {
  font-weight: 700;
}

.detail-section-title {
  margin-top: 15px;
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--accent-color);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.code-viewer-box {
  background: #060913;
  border: 1px solid var(--glass-border);
  border-radius: 8px;
  padding: 12px;
  font-family: var(--font-family-mono);
  font-size: 0.75rem;
  max-height: 180px;
  overflow-y: auto;
  white-space: pre-wrap;
  color: #a5b4fc;
}

/* visual ports bar */
.device-ports-visualizer {
  display: flex;
  gap: 6px;
  background: #05080e;
  border: 1px solid rgba(255, 255, 255, 0.05);
  padding: 8px 12px;
  border-radius: 8px;
  margin-bottom: 15px;
  align-items: center;
  overflow-x: auto;
}

.rj45-port {
  width: 24px;
  height: 24px;
  background: #1e293b;
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 4px;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.rj45-port::before {
  content: '';
  width: 12px;
  height: 8px;
  background: #0f172a;
  border-radius: 1px;
}

.rj45-led {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: #64748b;
  position: absolute;
  top: 2px;
  right: 2px;
}

.rj45-led.active {
  background: var(--accent-success);
  box-shadow: 0 0 6px var(--accent-success);
}
.rj45-led.console-led {
  background: var(--accent-color);
  box-shadow: 0 0 6px var(--accent-color);
}

.rj45-label {
  font-size: 0.55rem;
  position: absolute;
  bottom: 0px;
  color: var(--text-muted);
}

/* Acciones & Logs Footer Grid */
.dashboard-footer-grid {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 20px;
}

@media (max-width: 768px) {
  .dashboard-footer-grid {
    grid-template-columns: 1fr;
  }
}

/* Terminal logs */
.terminal-body {
  background-color: #050811;
  border: 1px solid var(--glass-border);
  border-radius: 8px;
  height: 250px;
  padding: 15px;
  font-family: var(--font-family-mono);
  font-size: 0.8rem;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.terminal-line {
  line-height: 1.4;
  word-break: break-all;
}

.allow-line { color: var(--accent-success); }
.deny-line { color: var(--accent-error); }
.system-line { color: var(--accent-color); }

.btn-clear {
  background: transparent;
  border: 1px solid var(--glass-border);
  color: var(--text-muted);
  padding: 4px 10px;
  border-radius: 4px;
  cursor: pointer;
  font-size: 0.75rem;
  font-family: var(--font-family-sans);
  transition: all 0.2s ease;
}

.btn-clear:hover {
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-main);
}

/* Acciones */
.actions-buttons-list {
  display: flex;
  flex-direction: column;
  gap: 15px;
}

.action-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--glass-border);
  padding: 12px 16px;
  border-radius: 10px;
}

.action-desc strong {
  display: block;
  font-size: 0.85rem;
  color: var(--text-main);
}

.action-desc p {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-top: 2px;
}

.btn-action {
  background: var(--bg-tertiary);
  color: var(--text-main);
  border: 1px solid var(--glass-border);
  padding: 8px 16px;
  border-radius: 6px;
  cursor: pointer;
  font-family: var(--font-family-sans);
  font-size: 0.8rem;
  font-weight: 600;
  transition: all 0.2s ease;
}

.btn-action:hover {
  background: var(--accent-color);
  color: #0b0f19;
  box-shadow: 0 0 10px rgba(0, 229, 255, 0.3);
}

.link-btn {
  text-decoration: none;
  display: inline-block;
  line-height: 1.4;
}

/* Nmap Output Terminal */
.nmap-output-container {
  margin-top: 15px;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  padding-top: 15px;
}

.nmap-output-container h3 {
  font-size: 0.9rem;
  margin-bottom: 8px;
  color: var(--text-muted);
}

.nmap-terminal {
  background: #050811;
  border: 1px solid var(--glass-border);
  border-radius: 8px;
  padding: 12px;
  font-family: var(--font-family-mono);
  font-size: 0.75rem;
  max-height: 150px;
  overflow-y: auto;
  color: #93c5fd;
  white-space: pre-wrap;
}

/* Toggles en el detalle */
.node-toggle-switch {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 10px;
  background: rgba(0, 229, 255, 0.05);
  border: 1px solid rgba(0, 229, 255, 0.1);
  padding: 10px;
  border-radius: 8px;
}

.switch-label {
  font-size: 0.8rem;
  font-weight: 700;
}

.btn-status-toggle {
  padding: 6px 12px;
  border-radius: 4px;
  font-size: 0.75rem;
  font-family: var(--font-family-sans);
  font-weight: 700;
  border: none;
  cursor: pointer;
  transition: background-color 0.2s ease;
}

.btn-status-toggle.online-btn {
  background-color: var(--accent-success);
  color: #0b0f19;
}

.btn-status-toggle.offline-btn {
  background-color: var(--accent-error);
  color: #fff;
}

/* ==========================================================================
   FORMULARIOS DE AUTENTICACIÓN
   ========================================================================== */
.auth-form-container {
  display: flex;
  flex-direction: column;
  gap: 15px;
  background: rgba(255, 23, 68, 0.04);
  border: 1px dashed rgba(255, 23, 68, 0.2);
  padding: 20px;
  border-radius: 12px;
  margin-top: 10px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.auth-header {
  text-align: center;
  margin-bottom: 8px;
}

.auth-header h3 {
  font-size: 1.1rem;
  color: var(--accent-error);
  font-weight: 700;
  letter-spacing: 0.5px;
  text-transform: uppercase;
}

.auth-header p {
  font-size: 0.78rem;
  color: var(--text-muted);
  margin-top: 3px;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
  width: 100%;
}

.form-group label {
  font-size: 0.8rem;
  color: var(--text-muted);
  font-weight: 600;
}

.form-control {
  background: #060913;
  border: 1px solid var(--glass-border);
  color: var(--text-main);
  padding: 10px 14px;
  border-radius: 8px;
  font-family: var(--font-family-sans);
  font-size: 0.9rem;
  transition: all 0.2s ease;
  width: 100%;
}

.form-control:focus {
  outline: none;
  border-color: var(--accent-color);
  box-shadow: 0 0 8px rgba(0, 229, 255, 0.2);
}

.form-control:disabled {
  background: rgba(255, 255, 255, 0.02);
  color: var(--text-muted);
  cursor: not-allowed;
  border-color: rgba(255, 255, 255, 0.03);
}

.btn-submit-auth {
  background: linear-gradient(135deg, #ff1744 0%, #ff5252 100%);
  color: white;
  border: none;
  padding: 12px;
  border-radius: 8px;
  font-family: var(--font-family-sans);
  font-weight: 700;
  font-size: 0.9rem;
  cursor: pointer;
  transition: all 0.3s ease;
  margin-top: 10px;
  letter-spacing: 0.5px;
  width: 100%;
}

.btn-submit-auth:hover {
  box-shadow: 0 0 15px rgba(255, 23, 68, 0.4);
  transform: translateY(-1px);
}

.auth-error-msg {
  color: var(--accent-error);
  font-size: 0.8rem;
  text-align: center;
  font-weight: 600;
  padding: 8px;
  background: rgba(255, 23, 68, 0.08);
  border-radius: 6px;
  border: 1px solid rgba(255, 23, 68, 0.15);
}

/* User Role and Session Control */
.user-session-card {
  background: rgba(0, 229, 255, 0.03);
  border: 1px solid rgba(0, 229, 255, 0.1);
  padding: 12px 16px;
  border-radius: 10px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 15px;
}

.user-session-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.user-session-info span:first-child {
  font-size: 0.75rem;
  color: var(--text-muted);
}

.user-session-info span:last-child {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--accent-success);
}

.btn-logout {
  background: transparent;
  border: 1px solid rgba(255, 23, 68, 0.4);
  color: var(--accent-error);
  padding: 6px 12px;
  border-radius: 6px;
  font-size: 0.75rem;
  cursor: pointer;
  font-family: var(--font-family-sans);
  font-weight: 600;
  transition: all 0.2s ease;
}

.btn-logout:hover {
  background: rgba(255, 23, 68, 0.1);
}

/* ==========================================================================
   CONSOLA VIRTUAL DE NODO INTERACTIVA
   ========================================================================== */
.node-shell-container {
  margin-top: 15px;
  background: #03060f;
  border: 1px solid var(--glass-border);
  border-radius: 10px;
  padding: 12px;
  font-family: var(--font-family-mono);
  display: flex;
  flex-direction: column;
  height: 200px;
  box-shadow: inset 0 0 10px rgba(0,0,0,0.8);
}

.node-shell-output {
  flex-grow: 1;
  overflow-y: auto;
  font-size: 0.75rem;
  color: #a5f3fc;
  white-space: pre-wrap;
  padding-bottom: 8px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  scrollbar-width: thin;
}

.node-shell-input-area {
  display: flex;
  align-items: center;
  gap: 8px;
  padding-top: 8px;
}

.shell-prompt {
  font-size: 0.75rem;
  color: var(--accent-color);
  font-weight: 700;
  white-space: nowrap;
}

.shell-input-field {
  background: transparent;
  border: none;
  outline: none;
  color: #fff;
  font-family: var(--font-family-mono);
  font-size: 0.75rem;
  width: 100%;
}

/* ==========================================================================
   INVENTARIO & PROVISIÓN IAM (ESTILIZADOS)
   ========================================================================== */
.inventory-table-container {
  overflow-x: auto;
  margin-top: 10px;
}

.inventory-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.85rem;
}

.inventory-table th, .inventory-table td {
  padding: 12px 16px;
  text-align: left;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.inventory-table th {
  font-weight: 700;
  color: var(--text-muted);
  background: rgba(0, 0, 0, 0.2);
}

.inventory-table tr:hover {
  background: rgba(255, 255, 255, 0.02);
}

.btn-table-delete {
  background: rgba(255, 23, 68, 0.1);
  border: 1px solid rgba(255, 23, 68, 0.4);
  color: var(--accent-error);
  padding: 4px 8px;
  border-radius: 4px;
  cursor: pointer;
  font-size: 0.75rem;
  font-family: var(--font-family-sans);
  font-weight: 600;
  transition: all 0.2s ease;
}

.btn-table-delete:hover {
  background: var(--accent-error);
  color: white;
  box-shadow: 0 0 8px rgba(255, 23, 68, 0.3);
}

.iam-provision-container {
  display: flex;
  flex-direction: column;
  gap: 15px;
}

.iam-intro {
  font-size: 0.85rem;
  color: var(--text-muted);
  line-height: 1.5;
  background: rgba(0, 229, 255, 0.02);
  border: 1px solid rgba(0, 229, 255, 0.05);
  padding: 15px;
  border-radius: 10px;
}

.iam-intro h3 {
  font-size: 1.05rem;
  margin-bottom: 8px;
  color: var(--accent-color);
}

.iam-form-style {
  background: rgba(255, 255, 255, 0.01);
  border: 1px solid var(--glass-border);
  padding: 24px;
  border-radius: 16px;
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
}

@media (max-width: 768px) {
  .form-grid {
    grid-template-columns: 1fr;
  }
}

.iam-msg-box {
  font-size: 0.85rem;
  padding: 12px 16px;
  border-radius: 8px;
  font-weight: 600;
}

.iam-msg-box.success {
  background: rgba(0, 230, 118, 0.1);
  border: 1px solid rgba(0, 230, 118, 0.3);
  color: var(--accent-success);
}

.iam-msg-box.error {
  background: rgba(255, 23, 68, 0.1);
  border: 1px solid rgba(255, 23, 68, 0.3);
  color: var(--accent-error);
}

/* Modales e inputs */
#device-console-modal .login-card {
  border-color: rgba(0, 229, 255, 0.2);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.8), 0 0 50px rgba(0, 229, 255, 0.1);
}
#device-console-modal .btn-clear {
  color: var(--text-muted);
}
#device-console-modal .btn-clear:hover {
  color: white;
}

/* Simulador de Escenarios Animaciones */
@keyframes pulseAttack {
  0% { box-shadow: 0 0 0 0 rgba(255, 23, 68, 0.7); border-color: #ff1744; }
  70% { box-shadow: 0 0 0 10px rgba(255, 23, 68, 0); border-color: #ff5252; }
  100% { box-shadow: 0 0 0 0 rgba(255, 23, 68, 0); border-color: #ff1744; }
}

@keyframes pulseTarget {
  0% { box-shadow: 0 0 0 0 rgba(255, 170, 0, 0.7); border-color: #ffaa00; }
  70% { box-shadow: 0 0 0 10px rgba(255, 170, 0, 0); border-color: #ffab40; }
  100% { box-shadow: 0 0 0 0 rgba(255, 170, 0, 0); border-color: #ffaa00; }
}

.node-attacking {
  animation: pulseAttack 1s infinite;
  background: rgba(255, 23, 68, 0.1) !important;
  color: #ff1744;
}

.node-target {
  animation: pulseTarget 1s infinite;
  background: rgba(255, 170, 0, 0.1) !important;
  color: #ffaa00;
}

/* --- VLAN and Physical switches styling --- */
.vlan-10-border { border-top: 3px solid #00e5ff !important; }
.vlan-20-border { border-top: 3px solid #00e676 !important; }
.vlan-30-border { border-top: 3px solid #ff9100 !important; }
.vlan-31-border { border-top: 3px solid #ff1744 !important; }
.vlan-99-border { border-top: 3px solid #d500f9 !important; }

.vlan-badge {
  font-size: 0.6rem;
  font-weight: 700;
  padding: 1px 6px;
  border-radius: 4px;
  margin-top: 5px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.vlan-badge.vlan-10 { background: rgba(41, 121, 255, 0.15); color: #2979ff; }
.vlan-badge.vlan-20 { background: rgba(0, 230, 118, 0.15); color: #00e676; }
.vlan-badge.vlan-30 { background: rgba(255, 214, 0, 0.15); color: #ffd600; }
.vlan-badge.vlan-31 { background: rgba(255, 23, 68, 0.15); color: #ff1744; }
.vlan-badge.vlan-40 { background: rgba(255, 0, 127, 0.15); color: #ff007f; }
.vlan-badge.vlan-50 { background: rgba(255, 109, 0, 0.15); color: #ff6d00; }
.vlan-badge.vlan-99 { background: rgba(213, 0, 249, 0.15); color: #d500f9; }

.vlan-40-border { border-top: 3px solid #ff007f !important; }
.vlan-50-border { border-top: 3px solid #ff6d00 !important; }

/* Premium VLAN hover glows */
.pt-node.vlan-10-border:hover {
  box-shadow: 0 0 15px rgba(41, 121, 255, 0.4) !important;
  border-color: #2979ff !important;
}
.pt-node.vlan-20-border:hover {
  box-shadow: 0 0 15px rgba(0, 230, 118, 0.4) !important;
  border-color: #00e676 !important;
}
.pt-node.vlan-30-border:hover {
  box-shadow: 0 0 15px rgba(255, 214, 0, 0.4) !important;
  border-color: #ffd600 !important;
}
.pt-node.vlan-31-border:hover {
  box-shadow: 0 0 15px rgba(255, 23, 68, 0.4) !important;
  border-color: #ff1744 !important;
}
.pt-node.vlan-40-border:hover {
  box-shadow: 0 0 15px rgba(255, 0, 127, 0.4) !important;
  border-color: #ff007f !important;
}
.pt-node.vlan-50-border:hover {
  box-shadow: 0 0 15px rgba(255, 109, 0, 0.4) !important;
  border-color: #ff6d00 !important;
}
.pt-node.vlan-99-border:hover {
  box-shadow: 0 0 15px rgba(213, 0, 249, 0.4) !important;
  border-color: #d500f9 !important;
}

.pt-physical-block {
  background: rgba(255, 255, 255, 0.015);
  border: 1px solid rgba(255, 255, 255, 0.03);
  border-radius: 16px;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 15px;
  align-items: center;
  position: relative;
  transition: all 0.3s ease;
  flex-shrink: 0;
}

.pt-physical-block:hover {
  background: rgba(255, 255, 255, 0.025);
  border-color: rgba(0, 229, 255, 0.1);
}

.pt-physical-devices-row {
  display: flex;
  flex-direction: row;
  flex-wrap: nowrap;
  gap: 12px;
  width: 100%;
  justify-content: center;
  align-items: center;
}

.vlan-subgroup-box {
  transition: all 0.3s ease;
  backdrop-filter: blur(4px);
  position: relative;
  overflow: hidden;
}

.vlan-subgroup-box::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.01) 0%, rgba(255, 255, 255, 0) 100%);
  pointer-events: none;
}

.vlan-subgroup-box:hover {
  background: rgba(255, 255, 255, 0.03) !important;
  transform: translateY(-2px);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
}
